Class: Stripe::Source::CreateParams
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::Source::CreateParams
- Defined in:
- lib/stripe/resources/source.rb
Defined Under Namespace
Classes: Mandate, Owner, Receiver, Redirect, SourceOrder
Instance Attribute Summary collapse
-
#amount ⇒ Object
Amount associated with the source.
-
#currency ⇒ Object
Three-letter [ISO code for the currency](stripe.com/docs/currencies) associated with the source.
-
#customer ⇒ Object
The ‘Customer` to whom the original source is attached to.
-
#expand ⇒ Object
Specifies which fields in the response should be expanded.
-
#flow ⇒ Object
The authentication ‘flow` of the source to create.
-
#mandate ⇒ Object
Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status.
-
#metadata ⇒ Object
Attribute for param field metadata.
-
#original_source ⇒ Object
The source to share.
-
#owner ⇒ Object
Information about the owner of the payment instrument that may be used or required by particular source types.
-
#receiver ⇒ Object
Optional parameters for the receiver flow.
-
#redirect ⇒ Object
Parameters required for the redirect flow.
-
#source_order ⇒ Object
Information about the items and shipping associated with the source.
-
#statement_descriptor ⇒ Object
An arbitrary string to be displayed on your customer’s statement.
-
#token ⇒ Object
An optional token used to create the source.
-
#type ⇒ Object
The ‘type` of the source to create.
-
#usage ⇒ Object
Attribute for param field usage.
Instance Method Summary collapse
-
#initialize(amount: nil, currency: nil, customer: nil, expand: nil, flow: nil, mandate: nil, metadata: nil, original_source: nil, owner: nil, receiver: nil, redirect: nil, source_order: nil, statement_descriptor: nil, token: nil, type: nil, usage: nil) ⇒ CreateParams
constructor
A new instance of CreateParams.
Methods inherited from RequestParams
Constructor Details
#initialize(amount: nil, currency: nil, customer: nil, expand: nil, flow: nil, mandate: nil, metadata: nil, original_source: nil, owner: nil, receiver: nil, redirect: nil, source_order: nil, statement_descriptor: nil, token: nil, type: nil, usage: nil) ⇒ CreateParams
Returns a new instance of CreateParams.
1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 |
# File 'lib/stripe/resources/source.rb', line 1125 def initialize( amount: nil, currency: nil, customer: nil, expand: nil, flow: nil, mandate: nil, metadata: nil, original_source: nil, owner: nil, receiver: nil, redirect: nil, source_order: nil, statement_descriptor: nil, token: nil, type: nil, usage: nil ) @amount = amount @currency = currency @customer = customer @expand = @flow = flow @mandate = mandate @metadata = @original_source = original_source @owner = owner @receiver = receiver @redirect = redirect @source_order = source_order @statement_descriptor = statement_descriptor @token = token @type = type @usage = usage end |
Instance Attribute Details
#amount ⇒ Object
Amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for ‘single_use` sources. Not supported for `receiver` type sources, where charge amount may not be specified until funds land.
1093 1094 1095 |
# File 'lib/stripe/resources/source.rb', line 1093 def amount @amount end |
#currency ⇒ Object
Three-letter [ISO code for the currency](stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready.
1095 1096 1097 |
# File 'lib/stripe/resources/source.rb', line 1095 def currency @currency end |
#customer ⇒ Object
The ‘Customer` to whom the original source is attached to. Must be set when the original source is not a `Source` (e.g., `Card`).
1097 1098 1099 |
# File 'lib/stripe/resources/source.rb', line 1097 def customer @customer end |
#expand ⇒ Object
Specifies which fields in the response should be expanded.
1099 1100 1101 |
# File 'lib/stripe/resources/source.rb', line 1099 def @expand end |
#flow ⇒ Object
The authentication ‘flow` of the source to create. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. It is generally inferred unless a type supports multiple flows.
1101 1102 1103 |
# File 'lib/stripe/resources/source.rb', line 1101 def flow @flow end |
#mandate ⇒ Object
Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status.
1103 1104 1105 |
# File 'lib/stripe/resources/source.rb', line 1103 def mandate @mandate end |
#metadata ⇒ Object
Attribute for param field metadata
1105 1106 1107 |
# File 'lib/stripe/resources/source.rb', line 1105 def @metadata end |
#original_source ⇒ Object
The source to share.
1107 1108 1109 |
# File 'lib/stripe/resources/source.rb', line 1107 def original_source @original_source end |
#owner ⇒ Object
Information about the owner of the payment instrument that may be used or required by particular source types.
1109 1110 1111 |
# File 'lib/stripe/resources/source.rb', line 1109 def owner @owner end |
#receiver ⇒ Object
Optional parameters for the receiver flow. Can be set only if the source is a receiver (‘flow` is `receiver`).
1111 1112 1113 |
# File 'lib/stripe/resources/source.rb', line 1111 def receiver @receiver end |
#redirect ⇒ Object
Parameters required for the redirect flow. Required if the source is authenticated by a redirect (‘flow` is `redirect`).
1113 1114 1115 |
# File 'lib/stripe/resources/source.rb', line 1113 def redirect @redirect end |
#source_order ⇒ Object
Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it.
1115 1116 1117 |
# File 'lib/stripe/resources/source.rb', line 1115 def source_order @source_order end |
#statement_descriptor ⇒ Object
An arbitrary string to be displayed on your customer’s statement. As an example, if your website is ‘RunClub` and the item you’re charging for is a race ticket, you may want to specify a ‘statement_descriptor` of `RunClub 5K race ticket.` While many payment types will display this information, some may not display it at all.
1117 1118 1119 |
# File 'lib/stripe/resources/source.rb', line 1117 def statement_descriptor @statement_descriptor end |
#token ⇒ Object
An optional token used to create the source. When passed, token properties will override source parameters.
1119 1120 1121 |
# File 'lib/stripe/resources/source.rb', line 1119 def token @token end |
#type ⇒ Object
The ‘type` of the source to create. Required unless `customer` and `original_source` are specified (see the [Cloning card Sources](stripe.com/docs/sources/connect#cloning-card-sources) guide)
1121 1122 1123 |
# File 'lib/stripe/resources/source.rb', line 1121 def type @type end |
#usage ⇒ Object
Attribute for param field usage
1123 1124 1125 |
# File 'lib/stripe/resources/source.rb', line 1123 def usage @usage end |