Class: Orb::Models::CreditNoteCreateParams::LineItem

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/orb/models/credit_note_create_params.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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(line_items: , reason: , end_date: nil, memo: nil, start_date: nil, request_options: {}) ⇒ Object

Some parameter documentations has been truncated, see Orb::Models::CreditNoteCreateParams for more details.

Parameters:

  • line_items (Array<Orb::Models::CreditNoteCreateParams::LineItem>) (defaults to: )
  • reason (Symbol, Orb::Models::CreditNoteCreateParams::Reason) (defaults to: )

    An optional reason for the credit note.

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

    A date string to specify the global credit note service period end date in the c

  • memo (String, nil) (defaults to: nil)

    An optional memo to attach to the credit note.

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

    A date string to specify the global credit note service period start date in the

  • request_options (Orb::RequestOptions, Hash{Symbol=>Object}) (defaults to: {})


61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# File 'lib/orb/models/credit_note_create_params.rb', line 61

class LineItem < Orb::Internal::Type::BaseModel
  # @!attribute amount
  #   The total amount in the invoice's currency to credit this line item.
  #
  #   @return [String]
  required :amount, String

  # @!attribute invoice_line_item_id
  #   The ID of the line item to credit.
  #
  #   @return [String]
  required :invoice_line_item_id, String

  # @!attribute end_date
  #   A date string to specify this line item's credit note service period end date in
  #   the customer's timezone. If provided, this will be used for this specific line
  #   item. If not provided, will use the global end_date if available, otherwise
  #   defaults to the original invoice line item's end date. This date is inclusive.
  #
  #   @return [Date, nil]
  optional :end_date, Date, nil?: true

  # @!attribute start_date
  #   A date string to specify this line item's credit note service period start date
  #   in the customer's timezone. If provided, this will be used for this specific
  #   line item. If not provided, will use the global start_date if available,
  #   otherwise defaults to the original invoice line item's start date. This date is
  #   inclusive.
  #
  #   @return [Date, nil]
  optional :start_date, Date, nil?: true

  # @!method initialize(amount:, invoice_line_item_id:, end_date: nil, start_date: nil)
  #   Some parameter documentations has been truncated, see
  #   {Orb::Models::CreditNoteCreateParams::LineItem} for more details.
  #
  #   @param amount [String] The total amount in the invoice's currency to credit this line item.
  #
  #   @param invoice_line_item_id [String] The ID of the line item to credit.
  #
  #   @param end_date [Date, nil] A date string to specify this line item's credit note service period end date in
  #
  #   @param start_date [Date, nil] A date string to specify this line item's credit note service period start date
end

Instance Attribute Details

#amountString

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

Returns:

  • (String)


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

required :amount, String

#end_dateDate?

A date string to specify this line item’s credit note service period end date in the customer’s timezone. If provided, this will be used for this specific line item. If not provided, will use the global end_date if available, otherwise defaults to the original invoice line item’s end date. This date is inclusive.

Returns:

  • (Date, nil)


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

optional :end_date, Date, nil?: true

#invoice_line_item_idString

The ID of the line item to credit.

Returns:

  • (String)


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

required :invoice_line_item_id, String

#start_dateDate?

A date string to specify this line item’s credit note service period start date in the customer’s timezone. If provided, this will be used for this specific line item. If not provided, will use the global start_date if available, otherwise defaults to the original invoice line item’s start date. This date is inclusive.

Returns:

  • (Date, nil)


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

optional :start_date, Date, nil?: true