Class: Stripe::PaymentIntentCreateParams::AmountDetails

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

Defined Under Namespace

Classes: LineItem, Shipping, Tax

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

Constructor Details

#initialize(discount_amount: nil, line_items: nil, shipping: nil, tax: nil) ⇒ AmountDetails

Returns a new instance of AmountDetails.



169
170
171
172
173
174
# File 'lib/stripe/params/payment_intent_create_params.rb', line 169

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

Instance Attribute Details

#discount_amountObject

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

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



161
162
163
# File 'lib/stripe/params/payment_intent_create_params.rb', line 161

def discount_amount
  @discount_amount
end

#line_itemsObject

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



163
164
165
# File 'lib/stripe/params/payment_intent_create_params.rb', line 163

def line_items
  @line_items
end

#shippingObject

Contains information about the shipping portion of the amount.



165
166
167
# File 'lib/stripe/params/payment_intent_create_params.rb', line 165

def shipping
  @shipping
end

#taxObject

Contains information about the tax portion of the amount.



167
168
169
# File 'lib/stripe/params/payment_intent_create_params.rb', line 167

def tax
  @tax
end