Class: Stripe::PaymentIntent::CreateParams::AmountDetails

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/resources/payment_intent.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.



2192
2193
2194
2195
2196
2197
# File 'lib/stripe/resources/payment_intent.rb', line 2192

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 amount an item was discounted for.



2184
2185
2186
# File 'lib/stripe/resources/payment_intent.rb', line 2184

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.



2186
2187
2188
# File 'lib/stripe/resources/payment_intent.rb', line 2186

def line_items
  @line_items
end

#shippingObject

Contains information about the shipping portion of the amount.



2188
2189
2190
# File 'lib/stripe/resources/payment_intent.rb', line 2188

def shipping
  @shipping
end

#taxObject

Contains information about the tax portion of the amount.



2190
2191
2192
# File 'lib/stripe/resources/payment_intent.rb', line 2190

def tax
  @tax
end