toJson method

  1. @override
Map<String, Object?> toJson()

Implementation

@override
Map<String, Object?> toJson() => {
      if (number != null) "number": encodeValue(number),
      if (receiptNumber != null) "receipt_number": encodeValue(receiptNumber),
      if (statementDescriptor != null)
        "statement_descriptor": encodeValue(statementDescriptor),
      if (statementDescriptorPrefix != null)
        "statement_descriptor_prefix": encodeValue(statementDescriptorPrefix),
      if (executePayment != null)
        "execute_payment": encodeValue(executePayment),
      if (finalize != null) "finalize": encodeValue(finalize),
      if (requestMeta != null) "request_meta": encodeValue(requestMeta),
      if (checkoutSettings != null)
        "checkout_settings": encodeValue(checkoutSettings),
      if (invoiceSettings != null)
        "invoice_settings": encodeValue(invoiceSettings),
      if (payoutSettings != null)
        "payout_settings": encodeValue(payoutSettings),
      if (customData != null) "custom_data": encodeValue(customData),
      if (billingDetails != null)
        "billing_details": encodeValue(billingDetails),
      if (shipping != null) "shipping": encodeValue(shipping),
      if (paymentMethodData != null)
        "payment_method_data": encodeValue(paymentMethodData),
      "customer_data": encodeValue(customerData),
      "line_items": encodeValue(lineItems),
    };