class Stripe::Source
- Stripe::Source
- Reference
- Object
Overview
Source
objects allow you to accept a variety of payment methods. They represent a customer's payment instrument, and can be used with the Stripe API just like a Card
object: once chargeable, they can be charged, or can be attached to customers. Stripe doesn't recommend using the deprecated Sources API. We recommend that you adopt the PaymentMethods API. This newer API provides access to our latest features and payment method types. Related guides: Sources API and Sources & Customers.
Included Modules
- JSON::Serializable
- JSON::Serializable::Unmapped
- OpenApi::Json
- OpenApi::Validatable
Defined in:
stripe/models/source.crConstant Summary
-
ERROR_MESSAGE_FOR__TYPE =
"invalid value for \"_type\", must be one of [ach_credit_transfer, ach_debit, acss_debit, alipay, au_becs_debit, bancontact, card, card_present, eps, giropay, ideal, klarna, multibanco, p24, sepa_credit_transfer, sepa_debit, sofort, three_d_secure, wechat]."
-
ERROR_MESSAGE_FOR_OBJECT =
"invalid value for \"object\", must be one of [source]."
-
MAX_LENGTH_FOR_CLIENT_SECRET =
5000
-
MAX_LENGTH_FOR_CUSTOMER =
5000
-
MAX_LENGTH_FOR_FLOW =
5000
-
MAX_LENGTH_FOR_ID =
5000
-
MAX_LENGTH_FOR_STATEMENT_DESCRIPTOR =
5000
-
MAX_LENGTH_FOR_STATUS =
5000
-
MAX_LENGTH_FOR_USAGE =
5000
-
VALID_VALUES_FOR__TYPE =
String.static_array("ach_credit_transfer", "ach_debit", "acss_debit", "alipay", "au_becs_debit", "bancontact", "card", "card_present", "eps", "giropay", "ideal", "klarna", "multibanco", "p24", "sepa_credit_transfer", "sepa_debit", "sofort", "three_d_secure", "wechat")
-
VALID_VALUES_FOR_OBJECT =
String.static_array("source")
Constructors
- .new(pull : JSON::PullParser)
-
.new(*, amount : Int64 | Nil = nil, client_secret : String | Nil = nil, created : Int64 | Nil = nil, currency : String | Nil = nil, flow : String | Nil = nil, id : String | Nil = nil, livemode : Bool | Nil = nil, metadata : Hash(String, String) | Nil = nil, object : String | Nil = nil, owner : Stripe::SourceOwner1 | Nil = nil, statement_descriptor : String | Nil = nil, status : String | Nil = nil, _type : String | Nil = nil, usage : String | Nil = nil, ach_credit_transfer : Stripe::SourceTypeAchCreditTransfer | Nil = nil, ach_debit : Stripe::SourceTypeAchDebit | Nil = nil, acss_debit : Stripe::SourceTypeAcssDebit | Nil = nil, alipay : Stripe::SourceTypeAlipay | Nil = nil, au_becs_debit : Stripe::SourceTypeAuBecsDebit | Nil = nil, bancontact : Stripe::SourceTypeBancontact | Nil = nil, card : Stripe::SourceTypeCard | Nil = nil, card_present2 : Stripe::SourceTypeCardPresent | Nil = nil, code_verification : Stripe::SourceCodeVerificationFlow | Nil = nil, customer : String | Nil = nil, eps : Stripe::SourceTypeEps | Nil = nil, giropay : Stripe::SourceTypeGiropay | Nil = nil, ideal : Stripe::SourceTypeIdeal | Nil = nil, klarna : Stripe::SourceTypeKlarna | Nil = nil, multibanco : Stripe::SourceTypeMultibanco | Nil = nil, p24 : Stripe::SourceTypeP24 | Nil = nil, receiver : Stripe::SourceReceiverFlow | Nil = nil, redirect : Stripe::SourceRedirectFlow | Nil = nil, sepa_credit_transfer : Stripe::SourceTypeSepaCreditTransfer | Nil = nil, sepa_debit : Stripe::SourceTypeSepaDebit | Nil = nil, sofort : Stripe::SourceTypeSofort | Nil = nil, source_order : Stripe::SourceOrder | Nil = nil, three_d_secure : Stripe::SourceTypeThreeDSecure | Nil = nil, wechat : Stripe::SourceTypeWechat | 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).
- #ach_credit_transfer : Stripe::SourceTypeAchCreditTransfer | Nil
-
#ach_credit_transfer=(new_value : Stripe::SourceTypeAchCreditTransfer | Nil)
Custom attribute writer method checking allowed values (enum).
- #ach_debit : Stripe::SourceTypeAchDebit | Nil
-
#ach_debit=(new_value : Stripe::SourceTypeAchDebit | Nil)
Custom attribute writer method checking allowed values (enum).
- #acss_debit : Stripe::SourceTypeAcssDebit | Nil
-
#acss_debit=(new_value : Stripe::SourceTypeAcssDebit | Nil)
Custom attribute writer method checking allowed values (enum).
- #alipay : Stripe::SourceTypeAlipay | Nil
-
#alipay=(new_value : Stripe::SourceTypeAlipay | Nil)
Custom attribute writer method checking allowed values (enum).
- #amount : Int64 | Nil
-
#amount=(new_value : Int64 | Nil)
Custom attribute writer method checking allowed values (enum).
- #au_becs_debit : Stripe::SourceTypeAuBecsDebit | Nil
-
#au_becs_debit=(new_value : Stripe::SourceTypeAuBecsDebit | Nil)
Custom attribute writer method checking allowed values (enum).
- #bancontact : Stripe::SourceTypeBancontact | Nil
-
#bancontact=(new_value : Stripe::SourceTypeBancontact | Nil)
Custom attribute writer method checking allowed values (enum).
- #card : Stripe::SourceTypeCard | Nil
-
#card=(new_value : Stripe::SourceTypeCard | Nil)
Custom attribute writer method checking allowed values (enum).
- #card_present : Stripe::SourceTypeCardPresent | Nil
-
#card_present=(new_value : Stripe::SourceTypeCardPresent | Nil)
Custom attribute writer method checking allowed values (enum).
- #client_secret : String | Nil
-
#client_secret=(new_value : String | Nil)
Custom attribute writer method checking allowed values (enum).
- #code_verification : Stripe::SourceCodeVerificationFlow | Nil
-
#code_verification=(new_value : Stripe::SourceCodeVerificationFlow | 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).
- #currency : String | Nil
-
#currency=(new_value : String | Nil)
Custom attribute writer method checking allowed values (enum).
- #customer : String | Nil
-
#customer=(new_value : String | Nil)
Custom attribute writer method checking allowed values (enum).
- #eps : Stripe::SourceTypeEps | Nil
-
#eps=(new_value : Stripe::SourceTypeEps | Nil)
Custom attribute writer method checking allowed values (enum).
- #flow : String | Nil
-
#flow=(new_value : String | Nil)
Custom attribute writer method checking allowed values (enum).
- #giropay : Stripe::SourceTypeGiropay | Nil
-
#giropay=(new_value : Stripe::SourceTypeGiropay | 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::SourceTypeIdeal | Nil
-
#ideal=(new_value : Stripe::SourceTypeIdeal | Nil)
Custom attribute writer method checking allowed values (enum).
- #klarna : Stripe::SourceTypeKlarna | Nil
-
#klarna=(new_value : Stripe::SourceTypeKlarna | 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).
- #multibanco : Stripe::SourceTypeMultibanco | Nil
-
#multibanco=(new_value : Stripe::SourceTypeMultibanco | 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).
- #owner : Stripe::SourceOwner1 | Nil
-
#owner=(new_value : Stripe::SourceOwner1 | Nil)
Custom attribute writer method checking allowed values (enum).
- #p24 : Stripe::SourceTypeP24 | Nil
-
#p24=(new_value : Stripe::SourceTypeP24 | Nil)
Custom attribute writer method checking allowed values (enum).
- #receiver : Stripe::SourceReceiverFlow | Nil
-
#receiver=(new_value : Stripe::SourceReceiverFlow | Nil)
Custom attribute writer method checking allowed values (enum).
- #redirect : Stripe::SourceRedirectFlow | Nil
-
#redirect=(new_value : Stripe::SourceRedirectFlow | Nil)
Custom attribute writer method checking allowed values (enum).
- #sepa_credit_transfer : Stripe::SourceTypeSepaCreditTransfer | Nil
-
#sepa_credit_transfer=(new_value : Stripe::SourceTypeSepaCreditTransfer | Nil)
Custom attribute writer method checking allowed values (enum).
- #sepa_debit : Stripe::SourceTypeSepaDebit | Nil
-
#sepa_debit=(new_value : Stripe::SourceTypeSepaDebit | Nil)
Custom attribute writer method checking allowed values (enum).
- #sofort : Stripe::SourceTypeSofort | Nil
-
#sofort=(new_value : Stripe::SourceTypeSofort | Nil)
Custom attribute writer method checking allowed values (enum).
- #source_order : Stripe::SourceOrder | Nil
-
#source_order=(new_value : Stripe::SourceOrder | Nil)
Custom attribute writer method checking allowed values (enum).
- #statement_descriptor : String | Nil
-
#statement_descriptor=(new_value : String | Nil)
Custom attribute writer method checking allowed values (enum).
- #status : String | Nil
-
#status=(new_value : String | Nil)
Custom attribute writer method checking allowed values (enum).
- #three_d_secure : Stripe::SourceTypeThreeDSecure | Nil
-
#three_d_secure=(new_value : Stripe::SourceTypeThreeDSecure | Nil)
Custom attribute writer method checking allowed values (enum).
- #usage : String | Nil
-
#usage=(new_value : String | 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 : Stripe::SourceTypeWechat | Nil
-
#wechat=(new_value : Stripe::SourceTypeWechat | 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] ach_credit_transfer Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] ach_debit 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] alipay Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] amount 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] bancontact 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] client_secret Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] code_verification 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] currency 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] eps Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] flow Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] giropay 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] klarna 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] 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] owner 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] receiver Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] redirect Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] sepa_credit_transfer 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] source_order Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] statement_descriptor Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] status Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] three_d_secure Object to be assigned
Custom attribute writer method checking allowed values (enum). @param [Object] usage 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 Object to be assigned