Class: Stripe::CreditNoteLineItem

Inherits:
StripeObject show all
Defined in:
lib/stripe/resources/credit_note_line_item.rb

Overview

The credit note line item object

Defined Under Namespace

Classes: DiscountAmount, PretaxCreditAmount, TaxAmount

Constant Summary collapse

OBJECT_NAME =
"credit_note_line_item"

Constants inherited from StripeObject

StripeObject::RESERVED_FIELD_NAMES

Instance Attribute Summary collapse

Attributes inherited from StripeObject

#last_response

Class Method Summary collapse

Methods inherited from StripeObject

#==, #[], #[]=, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, #hash, #initialize, #inspect, #keys, #marshal_dump, #marshal_load, protected_fields, #serialize_params, #to_hash, #to_json, #to_s, #update_attributes, #values

Constructor Details

This class inherits a constructor from Stripe::StripeObject

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Stripe::StripeObject

Instance Attribute Details

#amountObject (readonly)

The integer amount in cents (or local equivalent) representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts.



43
44
45
# File 'lib/stripe/resources/credit_note_line_item.rb', line 43

def amount
  @amount
end

#amount_excluding_taxObject (readonly)

The integer amount in cents (or local equivalent) representing the amount being credited for this line item, excluding all tax and discounts.



45
46
47
# File 'lib/stripe/resources/credit_note_line_item.rb', line 45

def amount_excluding_tax
  @amount_excluding_tax
end

#descriptionObject (readonly)

Description of the item being credited.



47
48
49
# File 'lib/stripe/resources/credit_note_line_item.rb', line 47

def description
  @description
end

#discount_amountObject (readonly)

The integer amount in cents (or local equivalent) representing the discount being credited for this line item.



49
50
51
# File 'lib/stripe/resources/credit_note_line_item.rb', line 49

def discount_amount
  @discount_amount
end

#discount_amountsObject (readonly)

The amount of discount calculated per discount for this line item



51
52
53
# File 'lib/stripe/resources/credit_note_line_item.rb', line 51

def discount_amounts
  @discount_amounts
end

#idObject (readonly)

Unique identifier for the object.



53
54
55
# File 'lib/stripe/resources/credit_note_line_item.rb', line 53

def id
  @id
end

#invoice_line_itemObject (readonly)

ID of the invoice line item being credited



55
56
57
# File 'lib/stripe/resources/credit_note_line_item.rb', line 55

def invoice_line_item
  @invoice_line_item
end

#livemodeObject (readonly)

Has the value ‘true` if the object exists in live mode or the value `false` if the object exists in test mode.



57
58
59
# File 'lib/stripe/resources/credit_note_line_item.rb', line 57

def livemode
  @livemode
end

#objectObject (readonly)

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



59
60
61
# File 'lib/stripe/resources/credit_note_line_item.rb', line 59

def object
  @object
end

#pretax_credit_amountsObject (readonly)

The pretax credit amounts (ex: discount, credit grants, etc) for this line item.



61
62
63
# File 'lib/stripe/resources/credit_note_line_item.rb', line 61

def pretax_credit_amounts
  @pretax_credit_amounts
end

#quantityObject (readonly)

The number of units of product being credited.



63
64
65
# File 'lib/stripe/resources/credit_note_line_item.rb', line 63

def quantity
  @quantity
end

#tax_amountsObject (readonly)

The amount of tax calculated per tax rate for this line item



65
66
67
# File 'lib/stripe/resources/credit_note_line_item.rb', line 65

def tax_amounts
  @tax_amounts
end

#tax_ratesObject (readonly)

The tax rates which apply to the line item.



67
68
69
# File 'lib/stripe/resources/credit_note_line_item.rb', line 67

def tax_rates
  @tax_rates
end

#typeObject (readonly)

The type of the credit note line item, one of ‘invoice_line_item` or `custom_line_item`. When the type is `invoice_line_item` there is an additional `invoice_line_item` property on the resource the value of which is the id of the credited line item on the invoice.



69
70
71
# File 'lib/stripe/resources/credit_note_line_item.rb', line 69

def type
  @type
end

#unit_amountObject (readonly)

The cost of each unit of product being credited.



71
72
73
# File 'lib/stripe/resources/credit_note_line_item.rb', line 71

def unit_amount
  @unit_amount
end

#unit_amount_decimalObject (readonly)

Same as ‘unit_amount`, but contains a decimal value with at most 12 decimal places.



73
74
75
# File 'lib/stripe/resources/credit_note_line_item.rb', line 73

def unit_amount_decimal
  @unit_amount_decimal
end

#unit_amount_excluding_taxObject (readonly)

The amount in cents (or local equivalent) representing the unit amount being credited for this line item, excluding all tax and discounts.



75
76
77
# File 'lib/stripe/resources/credit_note_line_item.rb', line 75

def unit_amount_excluding_tax
  @unit_amount_excluding_tax
end

Class Method Details

.object_nameObject



8
9
10
# File 'lib/stripe/resources/credit_note_line_item.rb', line 8

def self.object_name
  "credit_note_line_item"
end