Class: Stripe::TransferService::CreateParams

Inherits:
RequestParams show all
Defined in:
lib/stripe/services/transfer_service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(amount: nil, currency: nil, description: nil, destination: nil, expand: nil, metadata: nil, source_transaction: nil, source_type: nil, transfer_group: nil) ⇒ CreateParams

Returns a new instance of CreateParams.



85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# File 'lib/stripe/services/transfer_service.rb', line 85

def initialize(
  amount: nil,
  currency: nil,
  description: nil,
  destination: nil,
  expand: nil,
  metadata: nil,
  source_transaction: nil,
  source_type: nil,
  transfer_group: nil
)
  @amount = amount
  @currency = currency
  @description = description
  @destination = destination
  @expand = expand
  @metadata = 
  @source_transaction = source_transaction
  @source_type = source_type
  @transfer_group = transfer_group
end

Instance Attribute Details

#amountObject

A positive integer in cents (or local equivalent) representing how much to transfer.



67
68
69
# File 'lib/stripe/services/transfer_service.rb', line 67

def amount
  @amount
end

#currencyObject

Three-letter [ISO code for currency](www.iso.org/iso-4217-currency-codes.html) in lowercase. Must be a [supported currency](docs.stripe.com/currencies).



69
70
71
# File 'lib/stripe/services/transfer_service.rb', line 69

def currency
  @currency
end

#descriptionObject

An arbitrary string attached to the object. Often useful for displaying to users.



71
72
73
# File 'lib/stripe/services/transfer_service.rb', line 71

def description
  @description
end

#destinationObject

The ID of a connected Stripe account. <a href=“/docs/connect/separate-charges-and-transfers”>See the Connect documentation</a> for details.



73
74
75
# File 'lib/stripe/services/transfer_service.rb', line 73

def destination
  @destination
end

#expandObject

Specifies which fields in the response should be expanded.



75
76
77
# File 'lib/stripe/services/transfer_service.rb', line 75

def expand
  @expand
end

#metadataObject

Set of [key-value pairs](stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to ‘metadata`.



77
78
79
# File 'lib/stripe/services/transfer_service.rb', line 77

def 
  @metadata
end

#source_transactionObject

You can use this parameter to transfer funds from a charge before they are added to your available balance. A pending balance will transfer immediately but the funds will not become available until the original charge becomes available. [See the Connect documentation](stripe.com/docs/connect/separate-charges-and-transfers#transfer-availability) for details.



79
80
81
# File 'lib/stripe/services/transfer_service.rb', line 79

def source_transaction
  @source_transaction
end

#source_typeObject

The source balance to use for this transfer. One of ‘bank_account`, `card`, or `fpx`. For most users, this will default to `card`.



81
82
83
# File 'lib/stripe/services/transfer_service.rb', line 81

def source_type
  @source_type
end

#transfer_groupObject

A string that identifies this transaction as part of a group. See the [Connect documentation](stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details.



83
84
85
# File 'lib/stripe/services/transfer_service.rb', line 83

def transfer_group
  @transfer_group
end