encode<V> static method

V encode<V>(
  1. PaymentMethodDomain instance,
  2. Encoder<V> encoder
)

Implementation

static V encode<V>(
  PaymentMethodDomain instance,
  Encoder<V> encoder,
) {
  final container = encoder.container<String>();
  PaymentMethodDomainResourcePaymentMethodStatus.encode(
    instance.applePay,
    container.nestedSingleValueContainer('apple_pay').encoder,
  );
  container.encodeDateTime(
    'created',
    instance.created,
  );
  container.encodeString(
    'domain_name',
    instance.domainName,
  );
  container.encodeBool(
    'enabled',
    instance.enabled,
  );
  PaymentMethodDomainResourcePaymentMethodStatus.encode(
    instance.googlePay,
    container.nestedSingleValueContainer('google_pay').encoder,
  );
  container.encodeString(
    'id',
    instance.id,
  );
  PaymentMethodDomainResourcePaymentMethodStatus.encode(
    instance.link,
    container.nestedSingleValueContainer('link').encoder,
  );
  container.encodeBool(
    'livemode',
    instance.livemode,
  );
  container.encodeString(
    'object',
    'payment_method_domain',
  );
  PaymentMethodDomainResourcePaymentMethodStatus.encode(
    instance.paypal,
    container.nestedSingleValueContainer('paypal').encoder,
  );
  return container.value;
}