Class: Stripe::PaymentIntentCreateParams::TransferData

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/params/payment_intent_create_params.rb

Defined Under Namespace

Classes: PaymentData

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

attr_accessor, coerce_params, coerce_value, field_encodings, new, #to_h

Constructor Details

#initialize(amount: nil, description: nil, destination: nil, metadata: nil, payment_data: nil) ⇒ TransferData

Returns a new instance of TransferData.



2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
# File 'lib/stripe/params/payment_intent_create_params.rb', line 2782

def initialize(
  amount: nil,
  description: nil,
  destination: nil,
  metadata: nil,
  payment_data: nil
)
  @amount = amount
  @description = description
  @destination = destination
  @metadata = 
  @payment_data = payment_data
end

Instance Attribute Details

#amountObject

The amount that will be transferred automatically when a charge succeeds. The amount is capped at the total transaction amount and if no amount is set, the full amount is transferred.

If you intend to collect a fee and you need a more robust reporting experience, using [application_fee_amount](docs.stripe.com/api/payment_intents/create#create_payment_intent-application_fee_amount) might be a better fit for your integration.



2769
2770
2771
# File 'lib/stripe/params/payment_intent_create_params.rb', line 2769

def amount
  @amount
end

#descriptionObject

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



2771
2772
2773
# File 'lib/stripe/params/payment_intent_create_params.rb', line 2771

def description
  @description
end

#destinationObject

If specified, successful charges will be attributed to the destination account for tax reporting, and the funds from charges will be transferred to the destination account. The ID of the resulting transfer will be returned on the successful charge’s ‘transfer` field.



2776
2777
2778
# File 'lib/stripe/params/payment_intent_create_params.rb', line 2776

def destination
  @destination
end

#metadataObject

Set of [key-value pairs](docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.



2778
2779
2780
# File 'lib/stripe/params/payment_intent_create_params.rb', line 2778

def 
  @metadata
end

#payment_dataObject

The data with which to populate the destination payment.



2780
2781
2782
# File 'lib/stripe/params/payment_intent_create_params.rb', line 2780

def payment_data
  @payment_data
end