getFieldDeserializers method
The deserialization information for the current model
Implementation
@override
Map<String, void Function(ParseNode)> getFieldDeserializers() {
var deserializerMap = <String, void Function(ParseNode)>{};
deserializerMap['adaptive_pricing'] = (node) => adaptivePricing =
node.getObjectValue<PaymentPagesCheckoutSessionAdaptivePricing>(
PaymentPagesCheckoutSessionAdaptivePricing
.createFromDiscriminatorValue);
deserializerMap['after_expiration'] = (node) => afterExpiration =
node.getObjectValue<PaymentPagesCheckoutSessionAfterExpiration>(
PaymentPagesCheckoutSessionAfterExpiration
.createFromDiscriminatorValue);
deserializerMap['allow_promotion_codes'] =
(node) => allowPromotionCodes = node.getBoolValue();
deserializerMap['amount_subtotal'] =
(node) => amountSubtotal = node.getIntValue();
deserializerMap['amount_total'] =
(node) => amountTotal = node.getIntValue();
deserializerMap['automatic_tax'] = (node) => automaticTax =
node.getObjectValue<PaymentPagesCheckoutSessionAutomaticTax>(
PaymentPagesCheckoutSessionAutomaticTax
.createFromDiscriminatorValue);
deserializerMap['billing_address_collection'] = (node) =>
billingAddressCollection =
node.getEnumValue<SessionBillingAddressCollection>((stringValue) =>
SessionBillingAddressCollection.values
.where((enumVal) => enumVal.value == stringValue)
.firstOrNull);
deserializerMap['branding_settings'] = (node) => brandingSettings =
node.getObjectValue<PaymentPagesCheckoutSessionBrandingSettings>(
PaymentPagesCheckoutSessionBrandingSettings
.createFromDiscriminatorValue);
deserializerMap['cancel_url'] = (node) => cancelUrl = node.getStringValue();
deserializerMap['client_reference_id'] =
(node) => clientReferenceId = node.getStringValue();
deserializerMap['client_secret'] =
(node) => clientSecret = node.getStringValue();
deserializerMap['collected_information'] = (node) => collectedInformation =
node.getObjectValue<PaymentPagesCheckoutSessionCollectedInformation>(
PaymentPagesCheckoutSessionCollectedInformation
.createFromDiscriminatorValue);
deserializerMap['consent'] = (node) => consent =
node.getObjectValue<PaymentPagesCheckoutSessionConsent>(
PaymentPagesCheckoutSessionConsent.createFromDiscriminatorValue);
deserializerMap['consent_collection'] = (node) => consentCollection =
node.getObjectValue<PaymentPagesCheckoutSessionConsentCollection>(
PaymentPagesCheckoutSessionConsentCollection
.createFromDiscriminatorValue);
deserializerMap['created'] = (node) => created = node.getIntValue();
deserializerMap['currency'] = (node) => currency = node.getStringValue();
deserializerMap['currency_conversion'] = (node) => currencyConversion =
node.getObjectValue<PaymentPagesCheckoutSessionCurrencyConversion>(
PaymentPagesCheckoutSessionCurrencyConversion
.createFromDiscriminatorValue);
deserializerMap['customer'] = (node) => customer =
node.getObjectValue<SessionCustomer>(
SessionCustomer.createFromDiscriminatorValue);
deserializerMap['customer_account'] =
(node) => customerAccount = node.getStringValue();
deserializerMap['customer_creation'] = (node) => customerCreation =
node.getEnumValue<SessionCustomerCreation>((stringValue) =>
SessionCustomerCreation.values
.where((enumVal) => enumVal.value == stringValue)
.firstOrNull);
deserializerMap['customer_details'] = (node) => customerDetails =
node.getObjectValue<PaymentPagesCheckoutSessionCustomerDetails>(
PaymentPagesCheckoutSessionCustomerDetails
.createFromDiscriminatorValue);
deserializerMap['customer_email'] =
(node) => customerEmail = node.getStringValue();
deserializerMap['custom_fields'] = (node) => customFields = node
.getCollectionOfObjectValues<PaymentPagesCheckoutSessionCustomFields>(
PaymentPagesCheckoutSessionCustomFields
.createFromDiscriminatorValue);
deserializerMap['custom_text'] = (node) => customText =
node.getObjectValue<PaymentPagesCheckoutSessionCustomText>(
PaymentPagesCheckoutSessionCustomText.createFromDiscriminatorValue);
deserializerMap['discounts'] = (node) => discounts =
node.getCollectionOfObjectValues<PaymentPagesCheckoutSessionDiscount>(
PaymentPagesCheckoutSessionDiscount.createFromDiscriminatorValue);
deserializerMap['excluded_payment_method_types'] = (node) =>
excludedPaymentMethodTypes =
node.getCollectionOfPrimitiveValues<String>();
deserializerMap['expires_at'] = (node) => expiresAt = node.getIntValue();
deserializerMap['id'] = (node) => id = node.getStringValue();
deserializerMap['invoice'] = (node) => invoice =
node.getObjectValue<SessionInvoice>(
SessionInvoice.createFromDiscriminatorValue);
deserializerMap['invoice_creation'] = (node) => invoiceCreation =
node.getObjectValue<PaymentPagesCheckoutSessionInvoiceCreation>(
PaymentPagesCheckoutSessionInvoiceCreation
.createFromDiscriminatorValue);
deserializerMap['line_items'] = (node) => lineItems =
node.getObjectValue<SessionLineItems>(
SessionLineItems.createFromDiscriminatorValue);
deserializerMap['livemode'] = (node) => livemode = node.getBoolValue();
deserializerMap['locale'] = (node) => locale =
node.getEnumValue<SessionLocale>((stringValue) => SessionLocale.values
.where((enumVal) => enumVal.value == stringValue)
.firstOrNull);
deserializerMap['metadata'] = (node) => metadata =
node.getObjectValue<SessionMetadata>(
SessionMetadata.createFromDiscriminatorValue);
deserializerMap['mode'] = (node) => mode = node.getEnumValue<SessionMode>(
(stringValue) => SessionMode.values
.where((enumVal) => enumVal.value == stringValue)
.firstOrNull);
deserializerMap['name_collection'] = (node) => nameCollection =
node.getObjectValue<PaymentPagesCheckoutSessionNameCollection>(
PaymentPagesCheckoutSessionNameCollection
.createFromDiscriminatorValue);
deserializerMap['object'] = (node) => object =
node.getEnumValue<SessionObject>((stringValue) => SessionObject.values
.where((enumVal) => enumVal.value == stringValue)
.firstOrNull);
deserializerMap['optional_items'] = (node) => optionalItems = node
.getCollectionOfObjectValues<PaymentPagesCheckoutSessionOptionalItem>(
PaymentPagesCheckoutSessionOptionalItem
.createFromDiscriminatorValue);
deserializerMap['origin_context'] = (node) => originContext =
node.getEnumValue<SessionOriginContext>((stringValue) =>
SessionOriginContext.values
.where((enumVal) => enumVal.value == stringValue)
.firstOrNull);
deserializerMap['payment_intent'] = (node) => paymentIntent =
node.getObjectValue<SessionPaymentIntent>(
SessionPaymentIntent.createFromDiscriminatorValue);
deserializerMap['payment_link'] = (node) => paymentLink =
node.getObjectValue<SessionPaymentLink>(
SessionPaymentLink.createFromDiscriminatorValue);
deserializerMap['payment_method_collection'] = (node) =>
paymentMethodCollection =
node.getEnumValue<SessionPaymentMethodCollection>((stringValue) =>
SessionPaymentMethodCollection.values
.where((enumVal) => enumVal.value == stringValue)
.firstOrNull);
deserializerMap['payment_method_configuration_details'] = (node) =>
paymentMethodConfigurationDetails = node.getObjectValue<
PaymentMethodConfigBizPaymentMethodConfigurationDetails>(
PaymentMethodConfigBizPaymentMethodConfigurationDetails
.createFromDiscriminatorValue);
deserializerMap['payment_method_options'] = (node) => paymentMethodOptions =
node.getObjectValue<CheckoutSessionPaymentMethodOptions>(
CheckoutSessionPaymentMethodOptions.createFromDiscriminatorValue);
deserializerMap['payment_method_types'] = (node) =>
paymentMethodTypes = node.getCollectionOfPrimitiveValues<String>();
deserializerMap['payment_status'] = (node) => paymentStatus =
node.getEnumValue<SessionPaymentStatus>((stringValue) =>
SessionPaymentStatus.values
.where((enumVal) => enumVal.value == stringValue)
.firstOrNull);
deserializerMap['permissions'] = (node) => permissions =
node.getObjectValue<PaymentPagesCheckoutSessionPermissions>(
PaymentPagesCheckoutSessionPermissions
.createFromDiscriminatorValue);
deserializerMap['phone_number_collection'] = (node) =>
phoneNumberCollection = node
.getObjectValue<PaymentPagesCheckoutSessionPhoneNumberCollection>(
PaymentPagesCheckoutSessionPhoneNumberCollection
.createFromDiscriminatorValue);
deserializerMap['presentment_details'] = (node) => presentmentDetails =
node.getObjectValue<PaymentFlowsPaymentIntentPresentmentDetails>(
PaymentFlowsPaymentIntentPresentmentDetails
.createFromDiscriminatorValue);
deserializerMap['recovered_from'] =
(node) => recoveredFrom = node.getStringValue();
deserializerMap['redirect_on_completion'] = (node) => redirectOnCompletion =
node.getEnumValue<SessionRedirectOnCompletion>((stringValue) =>
SessionRedirectOnCompletion.values
.where((enumVal) => enumVal.value == stringValue)
.firstOrNull);
deserializerMap['return_url'] = (node) => returnUrl = node.getStringValue();
deserializerMap['saved_payment_method_options'] = (node) =>
savedPaymentMethodOptions = node.getObjectValue<
PaymentPagesCheckoutSessionSavedPaymentMethodOptions>(
PaymentPagesCheckoutSessionSavedPaymentMethodOptions
.createFromDiscriminatorValue);
deserializerMap['setup_intent'] = (node) => setupIntent =
node.getObjectValue<SessionSetupIntent>(
SessionSetupIntent.createFromDiscriminatorValue);
deserializerMap['shipping_address_collection'] = (node) =>
shippingAddressCollection = node.getObjectValue<
PaymentPagesCheckoutSessionShippingAddressCollection>(
PaymentPagesCheckoutSessionShippingAddressCollection
.createFromDiscriminatorValue);
deserializerMap['shipping_cost'] = (node) => shippingCost =
node.getObjectValue<PaymentPagesCheckoutSessionShippingCost>(
PaymentPagesCheckoutSessionShippingCost
.createFromDiscriminatorValue);
deserializerMap['shipping_options'] = (node) => shippingOptions = node
.getCollectionOfObjectValues<PaymentPagesCheckoutSessionShippingOption>(
PaymentPagesCheckoutSessionShippingOption
.createFromDiscriminatorValue);
deserializerMap['status'] = (node) => status =
node.getEnumValue<SessionStatus>((stringValue) => SessionStatus.values
.where((enumVal) => enumVal.value == stringValue)
.firstOrNull);
deserializerMap['submit_type'] = (node) => submitType =
node.getEnumValue<SessionSubmitType>((stringValue) => SessionSubmitType
.values
.where((enumVal) => enumVal.value == stringValue)
.firstOrNull);
deserializerMap['subscription'] = (node) => subscription =
node.getObjectValue<SessionSubscription>(
SessionSubscription.createFromDiscriminatorValue);
deserializerMap['success_url'] =
(node) => successUrl = node.getStringValue();
deserializerMap['tax_id_collection'] = (node) => taxIdCollection =
node.getObjectValue<PaymentPagesCheckoutSessionTaxIdCollection>(
PaymentPagesCheckoutSessionTaxIdCollection
.createFromDiscriminatorValue);
deserializerMap['total_details'] = (node) => totalDetails =
node.getObjectValue<PaymentPagesCheckoutSessionTotalDetails>(
PaymentPagesCheckoutSessionTotalDetails
.createFromDiscriminatorValue);
deserializerMap['ui_mode'] = (node) => uiMode =
node.getEnumValue<SessionUiMode>((stringValue) => SessionUiMode.values
.where((enumVal) => enumVal.value == stringValue)
.firstOrNull);
deserializerMap['url'] = (node) => url = node.getStringValue();
deserializerMap['wallet_options'] = (node) => walletOptions =
node.getObjectValue<CheckoutSessionWalletOptions>(
CheckoutSessionWalletOptions.createFromDiscriminatorValue);
return deserializerMap;
}