Class: Stripe::PaymentIntentDecrementAuthorizationParams::AmountDetails
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::PaymentIntentDecrementAuthorizationParams::AmountDetails
- Defined in:
- lib/stripe/params/payment_intent_decrement_authorization_params.rb
Defined Under Namespace
Classes: LineItem, Shipping, Surcharge, Tax, Tip
Instance Attribute Summary collapse
-
#discount_amount ⇒ Object
The total discount applied on the transaction represented in the smallest currency unit.
-
#enforce_arithmetic_validation ⇒ Object
Set to
falseto return arithmetic validation errors in the response without failing the request. -
#line_items ⇒ Object
A list of line items, each containing information about a product in the PaymentIntent.
-
#shipping ⇒ Object
Contains information about the shipping portion of the amount.
-
#surcharge ⇒ Object
Contains information about the surcharge portion of the amount.
-
#tax ⇒ Object
Contains information about the tax portion of the amount.
-
#tip ⇒ Object
Contains information about the tip portion of the amount.
Instance Method Summary collapse
-
#initialize(discount_amount: nil, enforce_arithmetic_validation: nil, line_items: nil, shipping: nil, surcharge: nil, tax: nil, tip: nil) ⇒ AmountDetails
constructor
A new instance of AmountDetails.
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, tip: nil) ⇒ AmountDetails
Returns a new instance of AmountDetails.
260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 |
# File 'lib/stripe/params/payment_intent_decrement_authorization_params.rb', line 260 def initialize( discount_amount: nil, enforce_arithmetic_validation: nil, line_items: nil, shipping: nil, surcharge: nil, tax: nil, tip: nil ) @discount_amount = discount_amount @enforce_arithmetic_validation = enforce_arithmetic_validation @line_items = line_items @shipping = shipping @surcharge = surcharge @tax = tax @tip = tip end |
Instance Attribute Details
#discount_amount ⇒ Object
The total discount applied on the transaction represented in the smallest currency unit. An integer greater than 0.
This field is mutually exclusive with the amount_details[line_items][#][discount_amount] field.
242 243 244 |
# File 'lib/stripe/params/payment_intent_decrement_authorization_params.rb', line 242 def discount_amount @discount_amount end |
#enforce_arithmetic_validation ⇒ Object
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.
248 249 250 |
# File 'lib/stripe/params/payment_intent_decrement_authorization_params.rb', line 248 def enforce_arithmetic_validation @enforce_arithmetic_validation end |
#line_items ⇒ Object
A list of line items, each containing information about a product in the PaymentIntent. There is a maximum of 200 line items.
250 251 252 |
# File 'lib/stripe/params/payment_intent_decrement_authorization_params.rb', line 250 def line_items @line_items end |
#shipping ⇒ Object
Contains information about the shipping portion of the amount.
252 253 254 |
# File 'lib/stripe/params/payment_intent_decrement_authorization_params.rb', line 252 def shipping @shipping end |
#surcharge ⇒ Object
Contains information about the surcharge portion of the amount.
254 255 256 |
# File 'lib/stripe/params/payment_intent_decrement_authorization_params.rb', line 254 def surcharge @surcharge end |
#tax ⇒ Object
Contains information about the tax portion of the amount.
256 257 258 |
# File 'lib/stripe/params/payment_intent_decrement_authorization_params.rb', line 256 def tax @tax end |
#tip ⇒ Object
Contains information about the tip portion of the amount.
258 259 260 |
# File 'lib/stripe/params/payment_intent_decrement_authorization_params.rb', line 258 def tip @tip end |