PaymentIntentCard.fromJson constructor
PaymentIntentCard.fromJson(
- Object? json
Implementation
factory PaymentIntentCard.fromJson(Object? json) {
final map = (json as Map).cast<String, Object?>();
return PaymentIntentCard(
captureMethod: map['capture_method'] == null
? null
: SessionCaptureMethod.fromJson(map['capture_method']),
cvcToken: map['cvc_token'] == null ? null : (map['cvc_token'] as String),
installments: map['installments'] == null
? null
: InvoiceInstallments.fromJson(map['installments']),
mandateOptions: map['mandate_options'] == null
? null
: PaymentIntentCardMandateOptions.fromJson(map['mandate_options']),
moto: map['moto'] == null ? null : (map['moto'] as bool),
network: map['network'] == null
? null
: PaymentIntentNetwork.fromJson(map['network']),
requestExtendedAuthorization: map['request_extended_authorization'] ==
null
? null
: PaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization
.fromJson(map['request_extended_authorization']),
requestIncrementalAuthorization: map[
'request_incremental_authorization'] ==
null
? null
: PaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization
.fromJson(map['request_incremental_authorization']),
requestMulticapture: map['request_multicapture'] == null
? null
: PaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization
.fromJson(map['request_multicapture']),
requestOvercapture: map['request_overcapture'] == null
? null
: PaymentIntentPaymentMethodOptionsCardRequestExtendedAuthorization
.fromJson(map['request_overcapture']),
requestThreeDSecure: map['request_three_d_secure'] == null
? null
: CheckoutCardPaymentMethodOptionsRequestThreeDSecure.fromJson(
map['request_three_d_secure']),
requireCvcRecollection: map['require_cvc_recollection'] == null
? null
: (map['require_cvc_recollection'] as bool),
setupFutureUsage: map['setup_future_usage'] == null
? null
: PaymentIntentSetupFutureUsage.fromJson(map['setup_future_usage']),
statementDescriptorSuffixKana:
map['statement_descriptor_suffix_kana'] == null
? null
: (map['statement_descriptor_suffix_kana'] as String),
statementDescriptorSuffixKanji:
map['statement_descriptor_suffix_kanji'] == null
? null
: (map['statement_descriptor_suffix_kanji'] as String),
threeDSecure: map['three_d_secure'] == null
? null
: PaymentIntentThreeDSecure.fromJson(map['three_d_secure']),
);
}