create static method

ChargeTransaction create({
  1. String? special_type,
  2. String? payment_type,
  3. TransactionDetails? transaction_details,
  4. CustomerDetails? customer_details,
  5. String? custom_field1,
  6. String? custom_field2,
  7. String? custom_field3,
  8. CustomExpiry? custom_expiry,
  9. Metadata? metadata,
})
override

return original data json

Implementation

static ChargeTransaction create({

  String? special_type,
  String? payment_type,
    TransactionDetails? transaction_details,
    CustomerDetails? customer_details,
  String? custom_field1,
  String? custom_field2,
  String? custom_field3,
    CustomExpiry? custom_expiry,
    Metadata? metadata,
})  {
  ChargeTransaction chargeTransaction = ChargeTransaction({

    "@type": special_type,
    "payment_type": payment_type,
    "transaction_details": (transaction_details != null)?transaction_details.toJson(): null,
    "customer_details": (customer_details != null)?customer_details.toJson(): null,
    "custom_field1": custom_field1,
    "custom_field2": custom_field2,
    "custom_field3": custom_field3,
    "custom_expiry": (custom_expiry != null)?custom_expiry.toJson(): null,
    "metadata": (metadata != null)?metadata.toJson(): null,


});


return chargeTransaction;

    }