Class: Orb::Models::InvoiceCreateParams::LineItem
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Orb::Models::InvoiceCreateParams::LineItem
- Defined in:
- lib/orb/models/invoice_create_params.rb,
sig/orb/models/invoice_create_params.rbs
Defined Under Namespace
Modules: ModelType
Instance Attribute Summary collapse
-
#end_date ⇒ Date
A date string to specify the line item's end date in the customer's timezone.
- #item_id ⇒ String
- #model_type ⇒ Symbol, Orb::Models::InvoiceCreateParams::LineItem::ModelType
-
#name ⇒ String
The name of the line item.
-
#quantity ⇒ Float
The number of units on the line item.
-
#start_date ⇒ Date
A date string to specify the line item's start date in the customer's timezone.
-
#unit_config ⇒ Orb::Models::UnitConfig
Configuration for unit pricing.
Instance Method Summary collapse
- #initialize(end_date:, item_id:, model_type:, name:, quantity:, start_date:, unit_config:) ⇒ Object constructor
- #to_hash ⇒ {
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(end_date:, item_id:, model_type:, name:, quantity:, start_date:, unit_config:) ⇒ Object
129 130 131 132 133 134 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 |
# File 'lib/orb/models/invoice_create_params.rb', line 129 class LineItem < Orb::Internal::Type::BaseModel # @!attribute end_date # A date string to specify the line item's end date in the customer's timezone. # # @return [Date] required :end_date, Date # @!attribute item_id # # @return [String] required :item_id, String # @!attribute model_type # # @return [Symbol, Orb::Models::InvoiceCreateParams::LineItem::ModelType] required :model_type, enum: -> { Orb::InvoiceCreateParams::LineItem::ModelType } # @!attribute name # The name of the line item. # # @return [String] required :name, String # @!attribute quantity # The number of units on the line item # # @return [Float] required :quantity, Float # @!attribute start_date # A date string to specify the line item's start date in the customer's timezone. # # @return [Date] required :start_date, Date # @!attribute unit_config # Configuration for unit pricing # # @return [Orb::Models::UnitConfig] required :unit_config, -> { Orb::UnitConfig } # @!method initialize(end_date:, item_id:, model_type:, name:, quantity:, start_date:, unit_config:) # @param end_date [Date] A date string to specify the line item's end date in the customer's timezone. # # @param item_id [String] # # @param model_type [Symbol, Orb::Models::InvoiceCreateParams::LineItem::ModelType] # # @param name [String] The name of the line item. # # @param quantity [Float] The number of units on the line item # # @param start_date [Date] A date string to specify the line item's start date in the customer's timezone. # # @param unit_config [Orb::Models::UnitConfig] Configuration for unit pricing # @see Orb::Models::InvoiceCreateParams::LineItem#model_type module ModelType extend Orb::Internal::Type::Enum UNIT = :unit # @!method self.values # @return [Array<Symbol>] end end |
Instance Attribute Details
#end_date ⇒ Date
A date string to specify the line item's end date in the customer's timezone.
134 |
# File 'lib/orb/models/invoice_create_params.rb', line 134 required :end_date, Date |
#item_id ⇒ String
139 |
# File 'lib/orb/models/invoice_create_params.rb', line 139 required :item_id, String |
#model_type ⇒ Symbol, Orb::Models::InvoiceCreateParams::LineItem::ModelType
144 |
# File 'lib/orb/models/invoice_create_params.rb', line 144 required :model_type, enum: -> { Orb::InvoiceCreateParams::LineItem::ModelType } |
#name ⇒ String
The name of the line item.
150 |
# File 'lib/orb/models/invoice_create_params.rb', line 150 required :name, String |
#quantity ⇒ Float
The number of units on the line item
156 |
# File 'lib/orb/models/invoice_create_params.rb', line 156 required :quantity, Float |
#start_date ⇒ Date
A date string to specify the line item's start date in the customer's timezone.
162 |
# File 'lib/orb/models/invoice_create_params.rb', line 162 required :start_date, Date |
#unit_config ⇒ Orb::Models::UnitConfig
Configuration for unit pricing
168 |
# File 'lib/orb/models/invoice_create_params.rb', line 168 required :unit_config, -> { Orb::UnitConfig } |
Instance Method Details
#to_hash ⇒ {
118 |
# File 'sig/orb/models/invoice_create_params.rbs', line 118
def to_hash: -> {
|