serialize method

  1. @override
void serialize(
  1. SerializationWriter writer
)
override

Serializes information the current object writer Serialization writer to use to serialize this model

Implementation

@override
void serialize(SerializationWriter writer) {
  writer.writeStringValue('brand', brand);
  writer.writeStringValue('brand_product', brandProduct);
  writer.writeStringValue('cardholder_name', cardholderName);
  writer.writeStringValue('country', country);
  writer.writeStringValue('description', description);
  writer.writeIntValue('exp_month', expMonth);
  writer.writeIntValue('exp_year', expYear);
  writer.writeStringValue('fingerprint', fingerprint);
  writer.writeStringValue('funding', funding);
  writer.writeStringValue('issuer', issuer);
  writer.writeStringValue('last4', last4);
  writer.writeObjectValue<PaymentMethodCardPresentNetworks>(
      'networks', networks);
  writer.writeObjectValue<PaymentMethodDetailsCardPresentOffline>(
      'offline', offline);
  writer.writeCollectionOfPrimitiveValues<String?>(
      'preferred_locales', preferredLocales);
  writer.writeEnumValue<PaymentMethodCardPresentReadMethod>(
      'read_method', readMethod, (e) => e?.value);
  writer.writeObjectValue<
          PaymentFlowsPrivatePaymentMethodsCardPresentCommonWallet>(
      'wallet', wallet);
  writer.writeAdditionalData(additionalData);
}