Class: Stripe::PaymentIntentService::CaptureParams

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

Defined Under Namespace

Classes: Hooks, PaymentDetails, TransferData

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(amount_to_capture: nil, application_fee_amount: nil, expand: nil, final_capture: nil, hooks: nil, metadata: nil, payment_details: nil, statement_descriptor: nil, statement_descriptor_suffix: nil, transfer_data: nil) ⇒ CaptureParams

Returns a new instance of CaptureParams.



7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
# File 'lib/stripe/services/payment_intent_service.rb', line 7823

def initialize(
  amount_to_capture: nil,
  application_fee_amount: nil,
  expand: nil,
  final_capture: nil,
  hooks: nil,
  metadata: nil,
  payment_details: nil,
  statement_descriptor: nil,
  statement_descriptor_suffix: nil,
  transfer_data: nil
)
  @amount_to_capture = amount_to_capture
  @application_fee_amount = application_fee_amount
  @expand = expand
  @final_capture = final_capture
  @hooks = hooks
  @metadata = 
  @payment_details = payment_details
  @statement_descriptor = statement_descriptor
  @statement_descriptor_suffix = statement_descriptor_suffix
  @transfer_data = transfer_data
end

Instance Attribute Details

#amount_to_captureObject

The amount to capture from the PaymentIntent, which must be less than or equal to the original amount. Defaults to the full ‘amount_capturable` if it’s not provided.



7800
7801
7802
# File 'lib/stripe/services/payment_intent_service.rb', line 7800

def amount_to_capture
  @amount_to_capture
end

#application_fee_amountObject

The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner’s Stripe account. The amount of the application fee collected will be capped at the total amount captured. For more information, see the PaymentIntents [use case for connected accounts](stripe.com/docs/payments/connected-accounts).



7802
7803
7804
# File 'lib/stripe/services/payment_intent_service.rb', line 7802

def application_fee_amount
  @application_fee_amount
end

#expandObject

Specifies which fields in the response should be expanded.



7804
7805
7806
# File 'lib/stripe/services/payment_intent_service.rb', line 7804

def expand
  @expand
end

#final_captureObject

Defaults to ‘true`. When capturing a PaymentIntent, setting `final_capture` to `false` notifies Stripe to not release the remaining uncaptured funds to make sure that they’re captured in future requests. You can only use this setting when [multicapture](stripe.com/docs/payments/multicapture) is available for PaymentIntents.



7806
7807
7808
# File 'lib/stripe/services/payment_intent_service.rb', line 7806

def final_capture
  @final_capture
end

#hooksObject

Automations to be run during the PaymentIntent lifecycle



7808
7809
7810
# File 'lib/stripe/services/payment_intent_service.rb', line 7808

def hooks
  @hooks
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`.



7810
7811
7812
# File 'lib/stripe/services/payment_intent_service.rb', line 7810

def 
  @metadata
end

#payment_detailsObject

Provides industry-specific information about the charge.



7812
7813
7814
# File 'lib/stripe/services/payment_intent_service.rb', line 7812

def payment_details
  @payment_details
end

#statement_descriptorObject

Text that appears on the customer’s statement as the statement descriptor for a non-card charge. This value overrides the account’s default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](docs.stripe.com/get-started/account/statement-descriptors).

Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead.



7816
7817
7818
# File 'lib/stripe/services/payment_intent_service.rb', line 7816

def statement_descriptor
  @statement_descriptor
end

#statement_descriptor_suffixObject

Provides information about a card charge. Concatenated to the account’s [statement descriptor prefix](docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer’s statement.



7818
7819
7820
# File 'lib/stripe/services/payment_intent_service.rb', line 7818

def statement_descriptor_suffix
  @statement_descriptor_suffix
end

#transfer_dataObject

The parameters that you can use to automatically create a transfer after the payment is captured. Learn more about the [use case for connected accounts](stripe.com/docs/payments/connected-accounts).



7821
7822
7823
# File 'lib/stripe/services/payment_intent_service.rb', line 7821

def transfer_data
  @transfer_data
end