serialize method
Serializes information the current object
writer Serialization writer to use to serialize this model
Implementation
@override
void serialize(SerializationWriter writer) {
writer.writeObjectValue<PaymentSourceAccount>('account', account);
writer.writeStringValue('account_holder_name', accountHolderName);
writer.writeStringValue('account_holder_type', accountHolderType);
writer.writeStringValue('account_type', accountType);
writer.writeObjectValue<SourceTypeAchCreditTransfer>(
'ach_credit_transfer', achCreditTransfer);
writer.writeObjectValue<SourceTypeAchDebit>('ach_debit', achDebit);
writer.writeObjectValue<SourceTypeAcssDebit>('acss_debit', acssDebit);
writer.writeStringValue('address_city', addressCity);
writer.writeStringValue('address_country', addressCountry);
writer.writeStringValue('address_line1', addressLine1);
writer.writeStringValue('address_line1_check', addressLine1Check);
writer.writeStringValue('address_line2', addressLine2);
writer.writeStringValue('address_state', addressState);
writer.writeStringValue('address_zip', addressZip);
writer.writeStringValue('address_zip_check', addressZipCheck);
writer.writeObjectValue<SourceTypeAlipay>('alipay', alipay);
writer.writeEnumValue<PaymentSourceAllowRedisplay>(
'allow_redisplay', allowRedisplay, (e) => e?.value);
writer.writeIntValue('amount', amount);
writer.writeObjectValue<SourceTypeAuBecsDebit>(
'au_becs_debit', auBecsDebit);
writer.writeCollectionOfEnumValues<PaymentSourceAvailablePayoutMethods>(
'available_payout_methods', availablePayoutMethods, (e) => e?.value);
writer.writeObjectValue<SourceTypeBancontact>('bancontact', bancontact);
writer.writeStringValue('bank_name', bankName);
writer.writeStringValue('brand', brand);
writer.writeObjectValue<AccountBusinessProfile>(
'business_profile', businessProfile);
writer.writeEnumValue<PaymentSourceBusinessType>(
'business_type', businessType, (e) => e?.value);
writer.writeObjectValue<AccountCapabilities>('capabilities', capabilities);
writer.writeObjectValue<SourceTypeCard>('card', card);
writer.writeObjectValue<SourceTypeCardPresent>('card_present', cardPresent);
writer.writeBoolValue('charges_enabled', value: chargesEnabled);
writer.writeStringValue('client_secret', clientSecret);
writer.writeObjectValue<SourceCodeVerificationFlow>(
'code_verification', codeVerification);
writer.writeObjectValue<LegalEntityCompany>('company', company);
writer.writeObjectValue<AccountUnificationAccountController>(
'controller', controller);
writer.writeStringValue('country', country);
writer.writeIntValue('created', created);
writer.writeStringValue('currency', currency);
writer.writeObjectValue<PaymentSourceCustomer>('customer', customer);
writer.writeStringValue('cvc_check', cvcCheck);
writer.writeStringValue('default_currency', defaultCurrency);
writer.writeBoolValue('default_for_currency', value: defaultForCurrency);
writer.writeBoolValue('details_submitted', value: detailsSubmitted);
writer.writeStringValue('dynamic_last4', dynamicLast4);
writer.writeStringValue('email', email);
writer.writeObjectValue<SourceTypeEps>('eps', eps);
writer.writeIntValue('exp_month', expMonth);
writer.writeIntValue('exp_year', expYear);
writer.writeObjectValue<PaymentSourceExternalAccounts>(
'external_accounts', externalAccounts);
writer.writeStringValue('fingerprint', fingerprint);
writer.writeStringValue('flow', flow);
writer.writeStringValue('funding', funding);
writer.writeObjectValue<AccountFutureRequirements>(
'future_requirements', futureRequirements);
writer.writeObjectValue<SourceTypeGiropay>('giropay', giropay);
writer.writeObjectValue<AccountGroupMembership>('groups', groups);
writer.writeStringValue('id', id);
writer.writeObjectValue<SourceTypeIdeal>('ideal', ideal);
writer.writeStringValue('iin', iin);
writer.writeObjectValue<Person>('individual', individual);
writer.writeObjectValue<SourceTypeKlarna>('klarna', klarna);
writer.writeStringValue('last4', last4);
writer.writeBoolValue('livemode', value: livemode);
writer.writeObjectValue<PaymentSourceMetadata>('metadata', metadata);
writer.writeObjectValue<SourceTypeMultibanco>('multibanco', multibanco);
writer.writeStringValue('name', name);
writer.writeObjectValue<TokenCardNetworks>('networks', networks);
writer.writeEnumValue<PaymentSourceObject>(
'object', object, (e) => e?.value);
writer.writeObjectValue<SourceOwner>('owner', owner);
writer.writeObjectValue<SourceTypeP24>('p24', p24);
writer.writeBoolValue('payouts_enabled', value: payoutsEnabled);
writer.writeObjectValue<SourceReceiverFlow>('receiver', receiver);
writer.writeObjectValue<SourceRedirectFlow>('redirect', redirect);
writer.writeEnumValue<PaymentSourceRegulatedStatus>(
'regulated_status', regulatedStatus, (e) => e?.value);
writer.writeObjectValue<AccountRequirements>('requirements', requirements);
writer.writeStringValue('routing_number', routingNumber);
writer.writeObjectValue<SourceTypeSepaDebit>('sepa_debit', sepaDebit);
writer.writeObjectValue<AccountSettings>('settings', settings);
writer.writeObjectValue<SourceTypeSofort>('sofort', sofort);
writer.writeObjectValue<SourceOrder>('source_order', sourceOrder);
writer.writeStringValue('statement_descriptor', statementDescriptor);
writer.writeStringValue('status', status);
writer.writeObjectValue<SourceTypeThreeDSecure>(
'three_d_secure', threeDSecure);
writer.writeStringValue('tokenization_method', tokenizationMethod);
writer.writeObjectValue<AccountTosAcceptance>(
'tos_acceptance', tosAcceptance);
writer.writeEnumValue<PaymentSourceType>('type', type_, (e) => e?.value);
writer.writeStringValue('usage', usage);
writer.writeObjectValue<SourceTypeWechat>('wechat', wechat);
writer.writeAdditionalData(additionalData);
}