class

Stripe::Item

Inherits OpenApi::Json < OpenApi::Validatable < JSON::Serializable::Unmapped < JSON::Serializable < Reference < Object

A line item.

Constants

ERROR_MESSAGE_FOR_OBJECT = "invalid value for \"object\", must be one of [item]."
MAX_LENGTH_FOR_DESCRIPTION = 5000
MAX_LENGTH_FOR_ID = 5000
VALID_VALUES_FOR_OBJECT = String.static_array("item")

Constructors

new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source
new(*, amount_discount : Int64 | Nil = nil, amount_subtotal : Int64 | Nil = nil, amount_tax : Int64 | Nil = nil, amount_total : Int64 | Nil = nil, currency : String | Nil = nil, id : String | Nil = nil, object : String | Nil = nil, price : Stripe::ItemPrice | Nil = nil, quantity : Int64 | Nil = nil, description : String | Nil = nil, discounts : Array(Stripe::LineItemsDiscountAmount) | Nil = nil, taxes : Array(Stripe::LineItemsTaxAmount) | Nil = nil)

Initializes the object @param [Hash] attributes Model attributes in the form of hash

Source

Instance methods

==(other : self)

Generates #hash and #== methods from all fields #== @return [Bool] #hash calculates hash code according to all attributes. #hash @return [UInt64] Hash code

amount_discount

Total discount amount applied. If no discounts were applied, defaults to 0.

Source
amount_discount=(new_value : Int64 | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] amount_discount Object to be assigned

Source
amount_subtotal

Total before any discounts or taxes are applied.

Source
amount_subtotal=(new_value : Int64 | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] amount_subtotal Object to be assigned

Source
amount_tax

Total tax amount applied. If no tax was applied, defaults to 0.

Source
amount_tax=(new_value : Int64 | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] amount_tax Object to be assigned

Source
amount_total

Total after discounts and taxes.

Source
amount_total=(new_value : Int64 | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] amount_total Object to be assigned

Source
currency

Three-letter ISO currency code, in lowercase. Must be a supported currency.

Source
currency=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] currency Object to be assigned

Source
description

An arbitrary string attached to the object. Often useful for displaying to users. Defaults to product name.

Source
description=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] description Object to be assigned

Source
discounts

The discounts applied to the line item.

Source
discounts=(new_value : Array(Stripe::LineItemsDiscountAmount) | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] discounts Object to be assigned

Source
hash(hasher)

Generates #hash and #== methods from all fields #== @return [Bool] #hash calculates hash code according to all attributes. #hash @return [UInt64] Hash code

id

Unique identifier for the object.

Source
id=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] id Object to be assigned

Source
list_invalid_properties

Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properties with the reasons

Source
object

String representing the object's type. Objects of the same type share the same value.

Source
object=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] object Object to be assigned

Source
price
Source
price=(new_value : Stripe::ItemPrice | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] price Object to be assigned

Source
quantity

The quantity of products being purchased.

Source
quantity=(new_value : Int64 | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] quantity Object to be assigned

Source
taxes

The taxes applied to the line item.

Source
taxes=(new_value : Array(Stripe::LineItemsTaxAmount) | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] taxes Object to be assigned

Source
valid?

Check to see if the all the properties in the model are valid @return true if the model is valid

Source