class Stripe::PaymentMethod
- Stripe::PaymentMethod
- Reference
- Object
Overview
PaymentMethod objects represent your customer's payment instruments. You can use them with PaymentIntents to collect payments or save them to Customer objects to store instrument details for future payments. Related guides: Payment Methods and More Payment Scenarios.
Included Modules
- JSON::Serializable
- JSON::Serializable::Unmapped
- OpenApi::Json
- OpenApi::Validatable
Defined in:
stripe/models/payment_method.crConstant Summary
-
ERROR_MESSAGE_FOR__TYPE =
"invalid value for \"_type\", must be one of [acss_debit, affirm, afterpay_clearpay, alipay, amazon_pay, au_becs_debit, bacs_debit, bancontact, blik, boleto, card, card_present, cashapp, customer_balance, eps, fpx, giropay, grabpay, ideal, interac_present, 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_ALLOW_REDISPLAY =
"invalid value for \"allow_redisplay\", must be one of [always, limited, unspecified]."
-
ERROR_MESSAGE_FOR_OBJECT =
"invalid value for \"object\", must be one of [payment_method]."
-
MAX_LENGTH_FOR_ID =
5000
-
VALID_VALUES_FOR__TYPE =
String.static_array("acss_debit", "affirm", "afterpay_clearpay", "alipay", "amazon_pay", "au_becs_debit", "bacs_debit", "bancontact", "blik", "boleto", "card", "card_present", "cashapp", "customer_balance", "eps", "fpx", "giropay", "grabpay", "ideal", "interac_present", "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_ALLOW_REDISPLAY =
String.static_array("always", "limited", "unspecified")
-
VALID_VALUES_FOR_OBJECT =
String.static_array("payment_method")
Constructors
- .new(pull : JSON::PullParser)
-
.new(*, billing_details : Stripe::BillingDetails | Nil = nil, created : Int64 | Nil = nil, customer : Stripe::ConfirmationTokensResourcePaymentMethodPreviewCustomer | Nil = nil, id : String | Nil = nil, livemode : Bool | Nil = nil, metadata : Hash(String, String) | Nil = nil, object : String | Nil = nil, _type : String | Nil = nil, acss_debit : Stripe::PaymentMethodAcssDebit | Nil = nil, affirm : JSON::Any | Nil = nil, afterpay_clearpay : JSON::Any | Nil = nil, alipay : JSON::Any | Nil = nil, allow_redisplay : String | Nil = nil, amazon_pay : JSON::Any | Nil = nil, au_becs_debit : Stripe::PaymentMethodAuBecsDebit | Nil = nil, bacs_debit : Stripe::PaymentMethodBacsDebit | Nil = nil, bancontact : JSON::Any | Nil = nil, blik : JSON::Any | Nil = nil, boleto : Stripe::PaymentMethodBoleto | Nil = nil, card : Stripe::PaymentMethodCard | Nil = nil, card_present2 : Stripe::PaymentMethodCardPresent | Nil = nil, cashapp : Stripe::PaymentMethodCashapp | Nil = nil, customer_balance : JSON::Any | Nil = nil, eps : Stripe::PaymentMethodEps | Nil = nil, fpx : Stripe::PaymentMethodFpx | Nil = nil, giropay : JSON::Any | Nil = nil, grabpay : JSON::Any | Nil = nil, ideal : Stripe::PaymentMethodIdeal | Nil = nil, interac_present : Stripe::PaymentMethodInteracPresent | Nil = nil, klarna : Stripe::PaymentMethodKlarna | Nil = nil, konbini : JSON::Any | Nil = nil, link : Stripe::PaymentMethodLink | Nil = nil, mobilepay : JSON::Any | Nil = nil, multibanco : JSON::Any | Nil = nil, oxxo : JSON::Any | Nil = nil, p24 : Stripe::PaymentMethodP24 | Nil = nil, paynow : JSON::Any | Nil = nil, paypal : Stripe::PaymentMethodPaypal | Nil = nil, pix : JSON::Any | Nil = nil, promptpay : JSON::Any | Nil = nil, radar_options : Stripe::RadarRadarOptions | Nil = nil, revolut_pay : JSON::Any | Nil = nil, sepa_debit : Stripe::PaymentMethodSepaDebit | Nil = nil, sofort : Stripe::PaymentMethodSofort | Nil = nil, swish : JSON::Any | Nil = nil, twint : JSON::Any | Nil = nil, us_bank_account : Stripe::PaymentMethodUsBankAccount | Nil = nil, wechat_pay : JSON::Any | Nil = nil, zip : JSON::Any | Nil = nil)
Initializes the object @param [Hash] attributes Model attributes in the form of hash
Instance Method Summary
-
#==(other : self)
Generates #hash and #== methods from all fields #== @return [Bool] #hash calculates hash code according to all attributes.
- #_type : String | Nil
-
#_type=(new_value : String | Nil)
Custom attribute writer method checking allowed values (enum).
- #acss_debit : Stripe::PaymentMethodAcssDebit | Nil
-
#acss_debit=(new_value : Stripe::PaymentMethodAcssDebit | Nil)
Custom attribute writer method checking allowed values (enum).
- #affirm : JSON::Any | Nil
-
#affirm=(new_value : JSON::Any | Nil)
Custom attribute writer method checking allowed values (enum).
- #afterpay_clearpay : JSON::Any | Nil
-
#afterpay_clearpay=(new_value : JSON::Any | Nil)
Custom attribute writer method checking allowed values (enum).
- #alipay : JSON::Any | Nil
-
#alipay=(new_value : JSON::Any | Nil)
Custom attribute writer method checking allowed values (enum).
- #allow_redisplay : String | Nil
-
#allow_redisplay=(new_value : String | Nil)
Custom attribute writer method checking allowed values (enum).
- #amazon_pay : JSON::Any | Nil
-
#amazon_pay=(new_value : JSON::Any | Nil)
Custom attribute writer method checking allowed values (enum).
- #au_becs_debit : Stripe::PaymentMethodAuBecsDebit | Nil
-
#au_becs_debit=(new_value : Stripe::PaymentMethodAuBecsDebit | Nil)
Custom attribute writer method checking allowed values (enum).
- #bacs_debit : Stripe::PaymentMethodBacsDebit | Nil
-
#bacs_debit=(new_value : Stripe::PaymentMethodBacsDebit | Nil)
Custom attribute writer method checking allowed values (enum).
- #bancontact : JSON::Any | Nil
-
#bancontact=(new_value : JSON::Any | Nil)
Custom attribute writer method checking allowed values (enum).
- #billing_details : Stripe::BillingDetails | Nil
-
#billing_details=(new_value : Stripe::BillingDetails | Nil)
Custom attribute writer method checking allowed values (enum).
- #blik : JSON::Any | Nil
-
#blik=(new_value : JSON::Any | Nil)
Custom attribute writer method checking allowed values (enum).
- #boleto : Stripe::PaymentMethodBoleto | Nil
-
#boleto=(new_value : Stripe::PaymentMethodBoleto | Nil)
Custom attribute writer method checking allowed values (enum).
- #card : Stripe::PaymentMethodCard | Nil
-
#card=(new_value : Stripe::PaymentMethodCard | Nil)
Custom attribute writer method checking allowed values (enum).
- #card_present : Stripe::PaymentMethodCardPresent | Nil
-
#card_present=(new_value : Stripe::PaymentMethodCardPresent | Nil)
Custom attribute writer method checking allowed values (enum).
- #cashapp : Stripe::PaymentMethodCashapp | Nil
-
#cashapp=(new_value : Stripe::PaymentMethodCashapp | Nil)
Custom attribute writer method checking allowed values (enum).
- #created : Int64 | Nil
-
#created=(new_value : Int64 | Nil)
Custom attribute writer method checking allowed values (enum).
- #customer : Stripe::ConfirmationTokensResourcePaymentMethodPreviewCustomer | Nil
-
#customer=(new_value : Stripe::ConfirmationTokensResourcePaymentMethodPreviewCustomer | Nil)
Custom attribute writer method checking allowed values (enum).
- #customer_balance : JSON::Any | Nil
-
#customer_balance=(new_value : JSON::Any | Nil)
Custom attribute writer method checking allowed values (enum).
- #eps : Stripe::PaymentMethodEps | Nil
-
#eps=(new_value : Stripe::PaymentMethodEps | Nil)
Custom attribute writer method checking allowed values (enum).
- #fpx : Stripe::PaymentMethodFpx | Nil
-
#fpx=(new_value : Stripe::PaymentMethodFpx | Nil)
Custom attribute writer method checking allowed values (enum).
- #giropay : JSON::Any | Nil
-
#giropay=(new_value : JSON::Any | Nil)
Custom attribute writer method checking allowed values (enum).
- #grabpay : JSON::Any | Nil
-
#grabpay=(new_value : JSON::Any | Nil)
Custom attribute writer method checking allowed values (enum).
-
#hash(hasher)
Generates #hash and #== methods from all fields #== @return [Bool] #hash calculates hash code according to all attributes.
- #id : String | Nil
-
#id=(new_value : String | Nil)
Custom attribute writer method checking allowed values (enum).
- #ideal : Stripe::PaymentMethodIdeal | Nil
-
#ideal=(new_value : Stripe::PaymentMethodIdeal | Nil)
Custom attribute writer method checking allowed values (enum).
- #interac_present : Stripe::PaymentMethodInteracPresent | Nil
-
#interac_present=(new_value : Stripe::PaymentMethodInteracPresent | Nil)
Custom attribute writer method checking allowed values (enum).
- #klarna : Stripe::PaymentMethodKlarna | Nil
-
#klarna=(new_value : Stripe::PaymentMethodKlarna | Nil)
Custom attribute writer method checking allowed values (enum).
- #konbini : JSON::Any | Nil
-
#konbini=(new_value : JSON::Any | Nil)
Custom attribute writer method checking allowed values (enum).
- #link : Stripe::PaymentMethodLink | Nil
-
#link=(new_value : Stripe::PaymentMethodLink | Nil)
Custom attribute writer method checking allowed values (enum).
-
#list_invalid_properties : Array(String)
Show invalid properties with the reasons.
- #livemode : Bool | Nil
-
#livemode=(new_value : Bool | Nil)
Custom attribute writer method checking allowed values (enum).
- #metadata : Hash(String, String) | Nil
-
#metadata=(new_value : Hash(String, String) | Nil)
Custom attribute writer method checking allowed values (enum).
- #mobilepay : JSON::Any | Nil
-
#mobilepay=(new_value : JSON::Any | Nil)
Custom attribute writer method checking allowed values (enum).
- #multibanco : JSON::Any | Nil
-
#multibanco=(new_value : JSON::Any | Nil)
Custom attribute writer method checking allowed values (enum).
- #object : String | Nil
-
#object=(new_value : String | Nil)
Custom attribute writer method checking allowed values (enum).
- #oxxo : JSON::Any | Nil
-
#oxxo=(new_value : JSON::Any | Nil)
Custom attribute writer method checking allowed values (enum).
- #p24 : Stripe::PaymentMethodP24 | Nil
-
#p24=(new_value : Stripe::PaymentMethodP24 | Nil)
Custom attribute writer method checking allowed values (enum).
- #paynow : JSON::Any | Nil
-
#paynow=(new_value : JSON::Any | Nil)
Custom attribute writer method checking allowed values (enum).
- #paypal : Stripe::PaymentMethodPaypal | Nil
-
#paypal=(new_value : Stripe::PaymentMethodPaypal | Nil)
Custom attribute writer method checking allowed values (enum).
- #pix : JSON::Any | Nil
-
#pix=(new_value : JSON::Any | Nil)
Custom attribute writer method checking allowed values (enum).
- #promptpay : JSON::Any | Nil
-
#promptpay=(new_value : JSON::Any | Nil)
Custom attribute writer method checking allowed values (enum).
- #radar_options : Stripe::RadarRadarOptions | Nil
-
#radar_options=(new_value : Stripe::RadarRadarOptions | Nil)
Custom attribute writer method checking allowed values (enum).
- #revolut_pay : JSON::Any | Nil
-
#revolut_pay=(new_value : JSON::Any | Nil)
Custom attribute writer method checking allowed values (enum).
- #sepa_debit : Stripe::PaymentMethodSepaDebit | Nil
-
#sepa_debit=(new_value : Stripe::PaymentMethodSepaDebit | Nil)
Custom attribute writer method checking allowed values (enum).
- #sofort : Stripe::PaymentMethodSofort | Nil
-
#sofort=(new_value : Stripe::PaymentMethodSofort | Nil)
Custom attribute writer method checking allowed values (enum).
- #swish : JSON::Any | Nil
-
#swish=(new_value : JSON::Any | Nil)
Custom attribute writer method checking allowed values (enum).
- #twint : JSON::Any | Nil
-
#twint=(new_value : JSON::Any | Nil)
Custom attribute writer method checking allowed values (enum).
- #us_bank_account : Stripe::PaymentMethodUsBankAccount | Nil
-
#us_bank_account=(new_value : Stripe::PaymentMethodUsBankAccount | Nil)
Custom attribute writer method checking allowed values (enum).
-
#valid? : Bool
Check to see if the all the properties in the model are valid @return true if the model is valid
- #wechat_pay : JSON::Any | Nil
-
#wechat_pay=(new_value : JSON::Any | Nil)
Custom attribute writer method checking allowed values (enum).
- #zip : JSON::Any | Nil
-
#zip=(new_value : JSON::Any | Nil)
Custom attribute writer method checking allowed values (enum).
Instance methods inherited from module OpenApi::Json
after_initialize
after_initialize,
clone
clone,
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
Initializes the object @param [Hash] attributes Model attributes in the form of hash
Instance Method Detail
Generates #hash and #== methods from all fields #== @return [Bool] #hash calculates hash code according to all attributes. #hash @return [UInt64] Hash code
Custom attribute writer method checking allowed values (enum). @param [Object] _type Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] acss_debit Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] affirm Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] afterpay_clearpay Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] alipay Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] allow_redisplay Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] amazon_pay Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] au_becs_debit Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] bacs_debit Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] bancontact Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] billing_details Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] blik Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] boleto Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] card Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] card_present Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] cashapp Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] created Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] customer Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] customer_balance Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] eps Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] fpx Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] giropay Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] grabpay Object to be assigned
Generates #hash and #== methods from all fields #== @return [Bool] #hash calculates hash code according to all attributes. #hash @return [UInt64] Hash code
Custom attribute writer method checking allowed values (enum). @param [Object] id Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] ideal Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] interac_present Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] klarna Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] konbini Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] link Object to be assigned
Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properties with the reasons
Custom attribute writer method checking allowed values (enum). @param [Object] livemode Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] metadata Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] mobilepay Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] multibanco Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] object Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] oxxo Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] p24 Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] paynow Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] paypal Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] pix Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] promptpay Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] radar_options Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] revolut_pay Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] sepa_debit Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] sofort Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] swish Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] twint Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] us_bank_account Object to be assigned
Check to see if the all the properties in the model are valid @return true if the model is valid
Custom attribute writer method checking allowed values (enum). @param [Object] wechat_pay Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] zip Object to be assigned