class Stripe::PostCheckoutSessionsRequest

Included Modules

Defined in:

stripe/models/post_checkout_sessions_request.cr

Constant Summary

ERROR_MESSAGE_FOR_BILLING_ADDRESS_COLLECTION = "invalid value for \"billing_address_collection\", must be one of [auto, required]."
ERROR_MESSAGE_FOR_CUSTOMER_CREATION = "invalid value for \"customer_creation\", must be one of [always, if_required]."
ERROR_MESSAGE_FOR_LOCALE = "invalid value for \"locale\", must be one of [auto, bg, cs, da, de, el, en, en-GB, es, es-419, et, fi, fil, fr, fr-CA, hr, hu, id, it, ja, ko, lt, lv, ms, mt, nb, nl, pl, pt, pt-BR, ro, ru, sk, sl, sv, th, tr, vi, zh, zh-HK, zh-TW]."
ERROR_MESSAGE_FOR_MODE = "invalid value for \"mode\", must be one of [payment, setup, subscription]."
ERROR_MESSAGE_FOR_PAYMENT_METHOD_COLLECTION = "invalid value for \"payment_method_collection\", must be one of [always, if_required]."
ERROR_MESSAGE_FOR_PAYMENT_METHOD_TYPES = "invalid value for \"payment_method_types\", must be one of [acss_debit, affirm, afterpay_clearpay, alipay, amazon_pay, au_becs_debit, bacs_debit, bancontact, blik, boleto, card, cashapp, customer_balance, eps, fpx, giropay, grabpay, ideal, klarna, konbini, link, mobilepay, multibanco, oxxo, p24, paynow, paypal, pix, promptpay, revolut_pay, sepa_debit, sofort, swish, twint, us_bank_account, wechat_pay, zip]."
ERROR_MESSAGE_FOR_REDIRECT_ON_COMPLETION = "invalid value for \"redirect_on_completion\", must be one of [always, if_required, never]."
ERROR_MESSAGE_FOR_SUBMIT_TYPE = "invalid value for \"submit_type\", must be one of [auto, book, donate, pay]."
ERROR_MESSAGE_FOR_UI_MODE = "invalid value for \"ui_mode\", must be one of [embedded, hosted]."
MAX_LENGTH_FOR_CANCEL_URL = 5000
MAX_LENGTH_FOR_CLIENT_REFERENCE_ID = 200
MAX_LENGTH_FOR_CUSTOMER = 5000
MAX_LENGTH_FOR_PAYMENT_METHOD_CONFIGURATION = 100
MAX_LENGTH_FOR_RETURN_URL = 5000
MAX_LENGTH_FOR_SUCCESS_URL = 5000
VALID_VALUES_FOR_BILLING_ADDRESS_COLLECTION = String.static_array("auto", "required")
VALID_VALUES_FOR_CUSTOMER_CREATION = String.static_array("always", "if_required")
VALID_VALUES_FOR_LOCALE = String.static_array("auto", "bg", "cs", "da", "de", "el", "en", "en-GB", "es", "es-419", "et", "fi", "fil", "fr", "fr-CA", "hr", "hu", "id", "it", "ja", "ko", "lt", "lv", "ms", "mt", "nb", "nl", "pl", "pt", "pt-BR", "ro", "ru", "sk", "sl", "sv", "th", "tr", "vi", "zh", "zh-HK", "zh-TW")
VALID_VALUES_FOR_MODE = String.static_array("payment", "setup", "subscription")
VALID_VALUES_FOR_PAYMENT_METHOD_COLLECTION = String.static_array("always", "if_required")
VALID_VALUES_FOR_PAYMENT_METHOD_TYPES = String.static_array("acss_debit", "affirm", "afterpay_clearpay", "alipay", "amazon_pay", "au_becs_debit", "bacs_debit", "bancontact", "blik", "boleto", "card", "cashapp", "customer_balance", "eps", "fpx", "giropay", "grabpay", "ideal", "klarna", "konbini", "link", "mobilepay", "multibanco", "oxxo", "p24", "paynow", "paypal", "pix", "promptpay", "revolut_pay", "sepa_debit", "sofort", "swish", "twint", "us_bank_account", "wechat_pay", "zip")
VALID_VALUES_FOR_REDIRECT_ON_COMPLETION = String.static_array("always", "if_required", "never")
VALID_VALUES_FOR_SUBMIT_TYPE = String.static_array("auto", "book", "donate", "pay")
VALID_VALUES_FOR_UI_MODE = String.static_array("embedded", "hosted")

Constructors

Instance Method Summary

Instance methods inherited from module OpenApi::Json

after_initialize after_initialize, eql?(o : self) eql?, to_hash : Hash(String, JSON::Any) to_hash, to_json_any : JSON::Any to_json_any

Class methods inherited from module OpenApi::Json

build_from_hash(hash : Hash) build_from_hash, build_from_json_any(json_any : JSON::Any) build_from_json_any

Instance methods inherited from module OpenApi::Validatable

list_invalid_properties : Array(String) list_invalid_properties, list_invalid_properties_for(key : String) : Array(String) list_invalid_properties_for, valid? : Bool valid?, validate : Nil validate

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]
def self.new(*, after_expiration : Stripe::AfterExpirationParams | Nil = nil, allow_promotion_codes : Bool | Nil = nil, automatic_tax : Stripe::AutomaticTaxParams | Nil = nil, billing_address_collection : String | Nil = nil, cancel_url : String | Nil = nil, client_reference_id : String | Nil = nil, consent_collection : Stripe::ConsentCollectionParams | Nil = nil, currency : String | Nil = nil, custom_fields : Array(Stripe::CustomFieldParam) | Nil = nil, custom_text : Stripe::CustomTextParam | Nil = nil, customer : String | Nil = nil, customer_creation : String | Nil = nil, customer_email : String | Nil = nil, customer_update : Stripe::CustomerUpdateParams | Nil = nil, discounts : Array(Stripe::DiscountParams) | Nil = nil, expand : Array(String) | Nil = nil, expires_at : Int64 | Nil = nil, invoice_creation : Stripe::InvoiceCreationParams | Nil = nil, line_items : Array(Stripe::LineItemParams) | Nil = nil, locale : String | Nil = nil, metadata : Hash(String, String) | Nil = nil, mode : String | Nil = nil, payment_intent_data : Stripe::PaymentIntentDataParams | Nil = nil, payment_method_collection : String | Nil = nil, payment_method_configuration : String | Nil = nil, payment_method_data : Stripe::PaymentMethodDataParam | Nil = nil, payment_method_options : Stripe::PaymentMethodOptionsParam | Nil = nil, payment_method_types : Array(String) | Nil = nil, phone_number_collection : Stripe::PhoneNumberCollectionParams | Nil = nil, redirect_on_completion : String | Nil = nil, return_url : String | Nil = nil, saved_payment_method_options : Stripe::SavedPaymentMethodOptionsParam | Nil = nil, setup_intent_data : Stripe::SetupIntentDataParam | Nil = nil, shipping_address_collection : Stripe::ShippingAddressCollectionParams | Nil = nil, shipping_options : Array(Stripe::ShippingOptionParams) | Nil = nil, submit_type : String | Nil = nil, subscription_data : Stripe::SubscriptionDataParams | Nil = nil, success_url : String | Nil = nil, tax_id_collection : Stripe::TaxIdCollectionParams | Nil = nil, ui_mode : String | Nil = nil) #

Initializes the object @param [Hash] attributes Model attributes in the form of hash


[View source]

Instance Method Detail

def ==(other : self) #

Generates #hash and #== methods from all fields #== @return [Bool] #hash calculates hash code according to all attributes. #hash @return [UInt64] Hash code


def after_expiration : Stripe::AfterExpirationParams | Nil #

[View source]
def after_expiration=(new_value : Stripe::AfterExpirationParams | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] after_expiration Object to be assigned


[View source]
def allow_promotion_codes : Bool | Nil #

[View source]
def allow_promotion_codes=(new_value : Bool | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] allow_promotion_codes Object to be assigned


[View source]
def automatic_tax : Stripe::AutomaticTaxParams | Nil #

[View source]
def automatic_tax=(new_value : Stripe::AutomaticTaxParams | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] automatic_tax Object to be assigned


[View source]
def billing_address_collection : String | Nil #

[View source]
def billing_address_collection=(new_value : String | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] billing_address_collection Object to be assigned


[View source]
def cancel_url : String | Nil #

[View source]
def cancel_url=(new_value : String | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] cancel_url Object to be assigned


[View source]
def client_reference_id : String | Nil #

[View source]
def client_reference_id=(new_value : String | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] client_reference_id Object to be assigned


[View source]
def consent_collection : Stripe::ConsentCollectionParams | Nil #

[View source]
def consent_collection=(new_value : Stripe::ConsentCollectionParams | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] consent_collection Object to be assigned


[View source]
def currency : String | Nil #

[View source]
def currency=(new_value : String | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] currency Object to be assigned


[View source]
def custom_fields : Array(Stripe::CustomFieldParam) | Nil #

[View source]
def custom_fields=(new_value : Array(Stripe::CustomFieldParam) | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] custom_fields Object to be assigned


[View source]
def custom_text : Stripe::CustomTextParam | Nil #

[View source]
def custom_text=(new_value : Stripe::CustomTextParam | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] custom_text Object to be assigned


[View source]
def customer : String | Nil #

[View source]
def customer=(new_value : String | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] customer Object to be assigned


[View source]
def customer_creation : String | Nil #

[View source]
def customer_creation=(new_value : String | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] customer_creation Object to be assigned


[View source]
def customer_email : String | Nil #

[View source]
def customer_email=(new_value : String | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] customer_email Object to be assigned


[View source]
def customer_update : Stripe::CustomerUpdateParams | Nil #

[View source]
def customer_update=(new_value : Stripe::CustomerUpdateParams | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] customer_update Object to be assigned


[View source]
def discounts : Array(Stripe::DiscountParams) | Nil #

[View source]
def discounts=(new_value : Array(Stripe::DiscountParams) | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] discounts Object to be assigned


[View source]
def expand : Array(String) | Nil #

[View source]
def expand=(new_value : Array(String) | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] expand Object to be assigned


[View source]
def expires_at : Int64 | Nil #

[View source]
def expires_at=(new_value : Int64 | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] expires_at Object to be assigned


[View source]
def hash(hasher) #

Generates #hash and #== methods from all fields #== @return [Bool] #hash calculates hash code according to all attributes. #hash @return [UInt64] Hash code


def invoice_creation : Stripe::InvoiceCreationParams | Nil #

[View source]
def invoice_creation=(new_value : Stripe::InvoiceCreationParams | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] invoice_creation Object to be assigned


[View source]
def line_items : Array(Stripe::LineItemParams) | Nil #

[View source]
def line_items=(new_value : Array(Stripe::LineItemParams) | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] line_items Object to be assigned


[View source]
def list_invalid_properties : Array(String) #

Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properties with the reasons


[View source]
def locale : String | Nil #

[View source]
def locale=(new_value : String | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] locale Object to be assigned


[View source]
def metadata : Hash(String, String) | Nil #

[View source]
def metadata=(new_value : Hash(String, String) | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] metadata Object to be assigned


[View source]
def mode : String | Nil #

[View source]
def mode=(new_value : String | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] mode Object to be assigned


[View source]
def payment_intent_data : Stripe::PaymentIntentDataParams | Nil #

[View source]
def payment_intent_data=(new_value : Stripe::PaymentIntentDataParams | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] payment_intent_data Object to be assigned


[View source]
def payment_method_collection : String | Nil #

[View source]
def payment_method_collection=(new_value : String | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] payment_method_collection Object to be assigned


[View source]
def payment_method_configuration : String | Nil #

[View source]
def payment_method_configuration=(new_value : String | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] payment_method_configuration Object to be assigned


[View source]
def payment_method_data : Stripe::PaymentMethodDataParam | Nil #

[View source]
def payment_method_data=(new_value : Stripe::PaymentMethodDataParam | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] payment_method_data Object to be assigned


[View source]
def payment_method_options : Stripe::PaymentMethodOptionsParam | Nil #

[View source]
def payment_method_options=(new_value : Stripe::PaymentMethodOptionsParam | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] payment_method_options Object to be assigned


[View source]
def payment_method_types : Array(String) | Nil #

[View source]
def payment_method_types=(new_value : Array(String) | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] payment_method_types Object to be assigned


[View source]
def phone_number_collection : Stripe::PhoneNumberCollectionParams | Nil #

[View source]
def phone_number_collection=(new_value : Stripe::PhoneNumberCollectionParams | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] phone_number_collection Object to be assigned


[View source]
def redirect_on_completion : String | Nil #

[View source]
def redirect_on_completion=(new_value : String | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] redirect_on_completion Object to be assigned


[View source]
def return_url : String | Nil #

[View source]
def return_url=(new_value : String | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] return_url Object to be assigned


[View source]
def saved_payment_method_options : Stripe::SavedPaymentMethodOptionsParam | Nil #

[View source]
def saved_payment_method_options=(new_value : Stripe::SavedPaymentMethodOptionsParam | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] saved_payment_method_options Object to be assigned


[View source]
def setup_intent_data : Stripe::SetupIntentDataParam | Nil #

[View source]
def setup_intent_data=(new_value : Stripe::SetupIntentDataParam | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] setup_intent_data Object to be assigned


[View source]
def shipping_address_collection : Stripe::ShippingAddressCollectionParams | Nil #

[View source]
def shipping_address_collection=(new_value : Stripe::ShippingAddressCollectionParams | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] shipping_address_collection Object to be assigned


[View source]
def shipping_options : Array(Stripe::ShippingOptionParams) | Nil #

[View source]
def shipping_options=(new_value : Array(Stripe::ShippingOptionParams) | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] shipping_options Object to be assigned


[View source]
def submit_type : String | Nil #

[View source]
def submit_type=(new_value : String | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] submit_type Object to be assigned


[View source]
def subscription_data : Stripe::SubscriptionDataParams | Nil #

[View source]
def subscription_data=(new_value : Stripe::SubscriptionDataParams | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] subscription_data Object to be assigned


[View source]
def success_url : String | Nil #

[View source]
def success_url=(new_value : String | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] success_url Object to be assigned


[View source]
def tax_id_collection : Stripe::TaxIdCollectionParams | Nil #

[View source]
def tax_id_collection=(new_value : Stripe::TaxIdCollectionParams | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] tax_id_collection Object to be assigned


[View source]
def ui_mode : String | Nil #

[View source]
def ui_mode=(new_value : String | Nil) #

Custom attribute writer method checking allowed values (enum). @param [Object] ui_mode Object to be assigned


[View source]
def valid? : Bool #

Check to see if the all the properties in the model are valid @return true if the model is valid


[View source]