Class: Orb::Models::CreditNoteCreateParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/orb/models/credit_note_create_params.rb

Overview

Defined Under Namespace

Modules: Reason Classes: LineItem

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

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(amount: , invoice_line_item_id: , end_date: nil, start_date: nil) ⇒ Object

Some parameter documentations has been truncated, see LineItem for more details.

Parameters:

  • amount (String) (defaults to: )

    The total amount in the invoice’s currency to credit this line item.

  • invoice_line_item_id (String) (defaults to: )

    The ID of the line item to credit.

  • end_date (Date, nil) (defaults to: nil)

    A date string to specify this line item’s credit note service period end date in

  • start_date (Date, nil) (defaults to: nil)

    A date string to specify this line item’s credit note service period start date



# File 'lib/orb/models/credit_note_create_params.rb', line 93

Instance Attribute Details

#end_dateDate?

A date string to specify the global credit note service period end date in the customer’s timezone. This will be applied to all line items that don’t have their own individual service periods specified. If not provided, line items will use their original invoice line item service periods. This date is inclusive.

Returns:

  • (Date, nil)


28
# File 'lib/orb/models/credit_note_create_params.rb', line 28

optional :end_date, Date, nil?: true

#line_itemsArray<Orb::Models::CreditNoteCreateParams::LineItem>



13
# File 'lib/orb/models/credit_note_create_params.rb', line 13

required :line_items, -> { Orb::Internal::Type::ArrayOf[Orb::CreditNoteCreateParams::LineItem] }

#memoString?

An optional memo to attach to the credit note.

Returns:

  • (String, nil)


34
# File 'lib/orb/models/credit_note_create_params.rb', line 34

optional :memo, String, nil?: true

#reasonSymbol, Orb::Models::CreditNoteCreateParams::Reason

An optional reason for the credit note.



19
# File 'lib/orb/models/credit_note_create_params.rb', line 19

required :reason, enum: -> { Orb::CreditNoteCreateParams::Reason }

#start_dateDate?

A date string to specify the global credit note service period start date in the customer’s timezone. This will be applied to all line items that don’t have their own individual service periods specified. If not provided, line items will use their original invoice line item service periods. This date is inclusive.

Returns:

  • (Date, nil)


43
# File 'lib/orb/models/credit_note_create_params.rb', line 43

optional :start_date, Date, nil?: true