Class: Stripe::Source::CreateParams

Inherits:
RequestParams show all
Defined in:
lib/stripe/resources/source.rb

Defined Under Namespace

Classes: Mandate, Owner, Receiver, Redirect, SourceOrder

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

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.



1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
# File 'lib/stripe/resources/source.rb', line 1098

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 = 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

#amountObject

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.



1066
1067
1068
# File 'lib/stripe/resources/source.rb', line 1066

def amount
  @amount
end

#currencyObject

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.



1068
1069
1070
# File 'lib/stripe/resources/source.rb', line 1068

def currency
  @currency
end

#customerObject

The ‘Customer` to whom the original source is attached to. Must be set when the original source is not a `Source` (e.g., `Card`).



1070
1071
1072
# File 'lib/stripe/resources/source.rb', line 1070

def customer
  @customer
end

#expandObject

Specifies which fields in the response should be expanded.



1072
1073
1074
# File 'lib/stripe/resources/source.rb', line 1072

def expand
  @expand
end

#flowObject

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.



1074
1075
1076
# File 'lib/stripe/resources/source.rb', line 1074

def flow
  @flow
end

#mandateObject

Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status.



1076
1077
1078
# File 'lib/stripe/resources/source.rb', line 1076

def mandate
  @mandate
end

#metadataObject

Attribute for param field metadata



1078
1079
1080
# File 'lib/stripe/resources/source.rb', line 1078

def 
  @metadata
end

#original_sourceObject

The source to share.



1080
1081
1082
# File 'lib/stripe/resources/source.rb', line 1080

def original_source
  @original_source
end

#ownerObject

Information about the owner of the payment instrument that may be used or required by particular source types.



1082
1083
1084
# File 'lib/stripe/resources/source.rb', line 1082

def owner
  @owner
end

#receiverObject

Optional parameters for the receiver flow. Can be set only if the source is a receiver (‘flow` is `receiver`).



1084
1085
1086
# File 'lib/stripe/resources/source.rb', line 1084

def receiver
  @receiver
end

#redirectObject

Parameters required for the redirect flow. Required if the source is authenticated by a redirect (‘flow` is `redirect`).



1086
1087
1088
# File 'lib/stripe/resources/source.rb', line 1086

def redirect
  @redirect
end

#source_orderObject

Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it.



1088
1089
1090
# File 'lib/stripe/resources/source.rb', line 1088

def source_order
  @source_order
end

#statement_descriptorObject

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.



1090
1091
1092
# File 'lib/stripe/resources/source.rb', line 1090

def statement_descriptor
  @statement_descriptor
end

#tokenObject

An optional token used to create the source. When passed, token properties will override source parameters.



1092
1093
1094
# File 'lib/stripe/resources/source.rb', line 1092

def token
  @token
end

#typeObject

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)



1094
1095
1096
# File 'lib/stripe/resources/source.rb', line 1094

def type
  @type
end

#usageObject

Attribute for param field usage



1096
1097
1098
# File 'lib/stripe/resources/source.rb', line 1096

def usage
  @usage
end