Class: Stripe::QuoteService::CreateParams::TransferData

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/services/quote_service.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(amount: nil, amount_percent: nil, destination: nil) ⇒ TransferData

Returns a new instance of TransferData.



1028
1029
1030
1031
1032
# File 'lib/stripe/services/quote_service.rb', line 1028

def initialize(amount: nil, amount_percent: nil, destination: nil)
  @amount = amount
  @amount_percent = amount_percent
  @destination = destination
end

Instance Attribute Details

#amountObject

The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field.



1022
1023
1024
# File 'lib/stripe/services/quote_service.rb', line 1022

def amount
  @amount
end

#amount_percentObject

A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. There must be at least 1 line item with a recurring price to use this field.



1024
1025
1026
# File 'lib/stripe/services/quote_service.rb', line 1024

def amount_percent
  @amount_percent
end

#destinationObject

ID of an existing, connected Stripe account.



1026
1027
1028
# File 'lib/stripe/services/quote_service.rb', line 1026

def destination
  @destination
end