Class: Orb::Models::CreditNote::LineItem
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Orb::Models::CreditNote::LineItem
- Defined in:
- lib/orb/models/credit_note.rb
Defined Under Namespace
Classes: Discount
Instance Attribute Summary collapse
-
#amount ⇒ String
The amount of the line item, including any line item minimums and discounts.
-
#discounts ⇒ Array<Orb::Models::CreditNote::LineItem::Discount>?
Any line item discounts from the invoice’s line item.
-
#end_time_exclusive ⇒ Time?
The end time of the service period for this credit note line item.
-
#id ⇒ String
The Orb id of this resource.
-
#item_id ⇒ String
The id of the item associated with this line item.
-
#name ⇒ String
The name of the corresponding invoice line item.
-
#quantity ⇒ Float?
An optional quantity credited.
-
#start_time_inclusive ⇒ Time?
The start time of the service period for this credit note line item.
-
#subtotal ⇒ String
The amount of the line item, excluding any line item minimums and discounts.
-
#tax_amounts ⇒ Array<Orb::Models::TaxAmount>
Any tax amounts applied onto the line item.
Instance Method Summary collapse
-
#initialize(id: , created_at: , credit_note_number: , credit_note_pdf: , customer: , invoice_id: , line_items: , maximum_amount_adjustment: , memo: , minimum_amount_refunded: , reason: , subtotal: , total: , type: , voided_at: , discounts: nil) ⇒ Object
constructor
The [Credit Note](/invoicing/credit-notes) resource represents a credit that has been applied to a particular invoice.
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(id: , created_at: , credit_note_number: , credit_note_pdf: , customer: , invoice_id: , line_items: , maximum_amount_adjustment: , memo: , minimum_amount_refunded: , reason: , subtotal: , total: , type: , voided_at: , discounts: nil) ⇒ Object
The [Credit Note](/invoicing/credit-notes) resource represents a credit that has been applied to a particular invoice.
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 |
# File 'lib/orb/models/credit_note.rb', line 135 class LineItem < Orb::Internal::Type::BaseModel # @!attribute id # The Orb id of this resource. # # @return [String] required :id, String # @!attribute amount # The amount of the line item, including any line item minimums and discounts. # # @return [String] required :amount, String # @!attribute item_id # The id of the item associated with this line item. # # @return [String] required :item_id, String # @!attribute name # The name of the corresponding invoice line item. # # @return [String] required :name, String # @!attribute quantity # An optional quantity credited. # # @return [Float, nil] required :quantity, Float, nil?: true # @!attribute subtotal # The amount of the line item, excluding any line item minimums and discounts. # # @return [String] required :subtotal, String # @!attribute tax_amounts # Any tax amounts applied onto the line item. # # @return [Array<Orb::Models::TaxAmount>] required :tax_amounts, -> { Orb::Internal::Type::ArrayOf[Orb::TaxAmount] } # @!attribute discounts # Any line item discounts from the invoice's line item. # # @return [Array<Orb::Models::CreditNote::LineItem::Discount>, nil] optional :discounts, -> { Orb::Internal::Type::ArrayOf[Orb::CreditNote::LineItem::Discount] } # @!attribute end_time_exclusive # The end time of the service period for this credit note line item. # # @return [Time, nil] optional :end_time_exclusive, Time, nil?: true # @!attribute start_time_inclusive # The start time of the service period for this credit note line item. # # @return [Time, nil] optional :start_time_inclusive, Time, nil?: true # @!method initialize(id:, amount:, item_id:, name:, quantity:, subtotal:, tax_amounts:, discounts: nil, end_time_exclusive: nil, start_time_inclusive: nil) # @param id [String] The Orb id of this resource. # # @param amount [String] The amount of the line item, including any line item minimums and discounts. # # @param item_id [String] The id of the item associated with this line item. # # @param name [String] The name of the corresponding invoice line item. # # @param quantity [Float, nil] An optional quantity credited. # # @param subtotal [String] The amount of the line item, excluding any line item minimums and discounts. # # @param tax_amounts [Array<Orb::Models::TaxAmount>] Any tax amounts applied onto the line item. # # @param discounts [Array<Orb::Models::CreditNote::LineItem::Discount>] Any line item discounts from the invoice's line item. # # @param end_time_exclusive [Time, nil] The end time of the service period for this credit note line item. # # @param start_time_inclusive [Time, nil] The start time of the service period for this credit note line item. class Discount < Orb::Internal::Type::BaseModel # @!attribute id # # @return [String] required :id, String # @!attribute amount_applied # # @return [String] required :amount_applied, String # @!attribute applies_to_price_ids # # @return [Array<String>] required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String] # @!attribute discount_type # # @return [Symbol, Orb::Models::CreditNote::LineItem::Discount::DiscountType] required :discount_type, enum: -> { Orb::CreditNote::LineItem::Discount::DiscountType } # @!attribute percentage_discount # # @return [Float] required :percentage_discount, Float # @!attribute amount_discount # # @return [String, nil] optional :amount_discount, String, nil?: true # @!attribute reason # # @return [String, nil] optional :reason, String, nil?: true # @!method initialize(id:, amount_applied:, applies_to_price_ids:, discount_type:, percentage_discount:, amount_discount: nil, reason: nil) # @param id [String] # @param amount_applied [String] # @param applies_to_price_ids [Array<String>] # @param discount_type [Symbol, Orb::Models::CreditNote::LineItem::Discount::DiscountType] # @param percentage_discount [Float] # @param amount_discount [String, nil] # @param reason [String, nil] # @see Orb::Models::CreditNote::LineItem::Discount#discount_type module DiscountType extend Orb::Internal::Type::Enum PERCENTAGE = :percentage AMOUNT = :amount # @!method self.values # @return [Array<Symbol>] end end end |
Instance Attribute Details
#amount ⇒ String
The amount of the line item, including any line item minimums and discounts.
146 |
# File 'lib/orb/models/credit_note.rb', line 146 required :amount, String |
#discounts ⇒ Array<Orb::Models::CreditNote::LineItem::Discount>?
Any line item discounts from the invoice’s line item.
182 |
# File 'lib/orb/models/credit_note.rb', line 182 optional :discounts, -> { Orb::Internal::Type::ArrayOf[Orb::CreditNote::LineItem::Discount] } |
#end_time_exclusive ⇒ Time?
The end time of the service period for this credit note line item.
188 |
# File 'lib/orb/models/credit_note.rb', line 188 optional :end_time_exclusive, Time, nil?: true |
#id ⇒ String
The Orb id of this resource.
140 |
# File 'lib/orb/models/credit_note.rb', line 140 required :id, String |
#item_id ⇒ String
The id of the item associated with this line item.
152 |
# File 'lib/orb/models/credit_note.rb', line 152 required :item_id, String |
#name ⇒ String
The name of the corresponding invoice line item.
158 |
# File 'lib/orb/models/credit_note.rb', line 158 required :name, String |
#quantity ⇒ Float?
An optional quantity credited.
164 |
# File 'lib/orb/models/credit_note.rb', line 164 required :quantity, Float, nil?: true |
#start_time_inclusive ⇒ Time?
The start time of the service period for this credit note line item.
194 |
# File 'lib/orb/models/credit_note.rb', line 194 optional :start_time_inclusive, Time, nil?: true |
#subtotal ⇒ String
The amount of the line item, excluding any line item minimums and discounts.
170 |
# File 'lib/orb/models/credit_note.rb', line 170 required :subtotal, String |