Class: Stripe::PaymentIntentIncrementAuthorizationParams::AmountDetails

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

Defined Under Namespace

Classes: LineItem, Shipping, Surcharge, Tax

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(discount_amount: nil, enforce_arithmetic_validation: nil, line_items: nil, shipping: nil, surcharge: nil, tax: nil) ⇒ AmountDetails

Returns a new instance of AmountDetails.



207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
# File 'lib/stripe/params/payment_intent_increment_authorization_params.rb', line 207

def initialize(
  discount_amount: nil,
  enforce_arithmetic_validation: nil,
  line_items: nil,
  shipping: nil,
  surcharge: nil,
  tax: nil
)
  @discount_amount = discount_amount
  @enforce_arithmetic_validation = enforce_arithmetic_validation
  @line_items = line_items
  @shipping = shipping
  @surcharge = surcharge
  @tax = tax
end

Instance Attribute Details

#discount_amountObject

The total discount applied on the transaction represented in the [smallest currency unit](docs.stripe.com/currencies#zero-decimal). An integer greater than 0.

This field is mutually exclusive with the ‘amount_details[#][discount_amount]` field.



191
192
193
# File 'lib/stripe/params/payment_intent_increment_authorization_params.rb', line 191

def discount_amount
  @discount_amount
end

#enforce_arithmetic_validationObject

Set to ‘false` to return arithmetic validation errors in the response without failing the request. Use this when you want the operation to proceed regardless of arithmetic errors in the line item data.

Omit or set to ‘true` to immediately return a 400 error when arithmetic validation fails. Use this for strict validation that prevents processing with line item data that has arithmetic inconsistencies.

For card payments, Stripe doesn’t send line item data to card networks if there’s an arithmetic validation error.



197
198
199
# File 'lib/stripe/params/payment_intent_increment_authorization_params.rb', line 197

def enforce_arithmetic_validation
  @enforce_arithmetic_validation
end

#line_itemsObject

A list of line items, each containing information about a product in the PaymentIntent. There is a maximum of 200 line items.



199
200
201
# File 'lib/stripe/params/payment_intent_increment_authorization_params.rb', line 199

def line_items
  @line_items
end

#shippingObject

Contains information about the shipping portion of the amount.



201
202
203
# File 'lib/stripe/params/payment_intent_increment_authorization_params.rb', line 201

def shipping
  @shipping
end

#surchargeObject

Contains information about the surcharge portion of the amount.



203
204
205
# File 'lib/stripe/params/payment_intent_increment_authorization_params.rb', line 203

def surcharge
  @surcharge
end

#taxObject

Contains information about the tax portion of the amount.



205
206
207
# File 'lib/stripe/params/payment_intent_increment_authorization_params.rb', line 205

def tax
  @tax
end