class

Stripe::CreditNoteLineItemParams

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

Constants

ERROR_MESSAGE_FOR__TYPE = "invalid value for \"_type\", must be one of [custom_line_item, invoice_line_item]."
MAX_LENGTH_FOR_DESCRIPTION = 5000
MAX_LENGTH_FOR_INVOICE_LINE_ITEM = 5000
VALID_VALUES_FOR__TYPE = String.static_array("custom_line_item", "invoice_line_item")

Constructors

new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source
new(*, _type : String | Nil = nil, amount : Int64 | Nil = nil, description : String | Nil = nil, invoice_line_item : String | Nil = nil, quantity : Int64 | Nil = nil, tax_amounts : Stripe::CreditNoteLineItemParamsTaxAmounts | Nil = nil, tax_rates : Stripe::CreditNoteLineItemParamsTaxRates | Nil = nil, unit_amount : Int64 | Nil = nil, unit_amount_decimal : BigDecimal | 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

_type

Type of the credit note line item, one of invoice_line_item or custom_line_item

Source
_type=(new_value : String | Nil)

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

Source
amount

The line item amount to credit. Only valid when type is invoice_line_item.

Source
amount=(new_value : Int64 | Nil)

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

Source
description

The description of the credit note line item. Only valid when the type is custom_line_item.

Source
description=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] description 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

invoice_line_item

The invoice line item to credit. Only valid when the type is invoice_line_item.

Source
invoice_line_item=(new_value : String | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] invoice_line_item 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
quantity

The line item quantity to credit.

Source
quantity=(new_value : Int64 | Nil)

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

Source
tax_amounts
Source
tax_amounts=(new_value : Stripe::CreditNoteLineItemParamsTaxAmounts | Nil)

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

Source
tax_rates
Source
tax_rates=(new_value : Stripe::CreditNoteLineItemParamsTaxRates | Nil)

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

Source
unit_amount

The integer unit amount in cents (or local equivalent) of the credit note line item. This unit_amount will be multiplied by the quantity to get the full amount to credit for this line item. Only valid when type is custom_line_item.

Source
unit_amount=(new_value : Int64 | Nil)

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

Source
unit_amount_decimal

Same as unit_amount, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of unit_amount and unit_amount_decimal can be set.

Source
unit_amount_decimal=(new_value : BigDecimal | Nil)

Custom attribute writer method checking allowed values (enum). @param [Object] unit_amount_decimal 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