Class: Stripe::V2::Payments::OffSessionPaymentCreateParams::AmountDetails
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::V2::Payments::OffSessionPaymentCreateParams::AmountDetails
- Defined in:
- lib/stripe/params/v2/payments/off_session_payment_create_params.rb
Defined Under Namespace
Classes: LineItem, Shipping, Tax
Instance Attribute Summary collapse
-
#discount_amount ⇒ Object
The amount the total transaction was discounted for.
-
#enforce_arithmetic_validation ⇒ Object
Set to ‘false` to 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 OffSessionPayment.
-
#shipping ⇒ Object
Contains information about the shipping portion of the amount.
-
#tax ⇒ Object
Contains information about the tax portion of the amount.
Instance Method Summary collapse
-
#initialize(discount_amount: nil, enforce_arithmetic_validation: nil, line_items: nil, shipping: nil, tax: 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, tax: nil) ⇒ AmountDetails
Returns a new instance of AmountDetails.
89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/stripe/params/v2/payments/off_session_payment_create_params.rb', line 89 def initialize( discount_amount: nil, enforce_arithmetic_validation: nil, line_items: nil, shipping: nil, tax: nil ) @discount_amount = discount_amount @enforce_arithmetic_validation = enforce_arithmetic_validation @line_items = line_items @shipping = shipping @tax = tax end |
Instance Attribute Details
#discount_amount ⇒ Object
The amount the total transaction was discounted for.
77 78 79 |
# File 'lib/stripe/params/v2/payments/off_session_payment_create_params.rb', line 77 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.
81 82 83 |
# File 'lib/stripe/params/v2/payments/off_session_payment_create_params.rb', line 81 def enforce_arithmetic_validation @enforce_arithmetic_validation end |
#line_items ⇒ Object
A list of line items, each containing information about a product in the OffSessionPayment. There is a maximum of 10 line items.
83 84 85 |
# File 'lib/stripe/params/v2/payments/off_session_payment_create_params.rb', line 83 def line_items @line_items end |
#shipping ⇒ Object
Contains information about the shipping portion of the amount.
85 86 87 |
# File 'lib/stripe/params/v2/payments/off_session_payment_create_params.rb', line 85 def shipping @shipping end |
#tax ⇒ Object
Contains information about the tax portion of the amount.
87 88 89 |
# File 'lib/stripe/params/v2/payments/off_session_payment_create_params.rb', line 87 def tax @tax end |