Class: MetronomeSDK::Models::SchedulePointInTime::ScheduleItem

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/metronome_sdk/models/schedule_point_in_time.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(id: , amount: , quantity: , timestamp: , unit_price: , invoice_id: nil) ⇒ Object

Parameters:

  • id (String) (defaults to: )
  • amount (Float) (defaults to: )
  • quantity (Float) (defaults to: )
  • timestamp (Time) (defaults to: )
  • unit_price (Float) (defaults to: )
  • invoice_id (String, nil) (defaults to: nil)


34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# File 'lib/metronome_sdk/models/schedule_point_in_time.rb', line 34

class ScheduleItem < MetronomeSDK::Internal::Type::BaseModel
  # @!attribute id
  #
  #   @return [String]
  required :id, String

  # @!attribute amount
  #
  #   @return [Float]
  required :amount, Float

  # @!attribute quantity
  #
  #   @return [Float]
  required :quantity, Float

  # @!attribute timestamp
  #
  #   @return [Time]
  required :timestamp, Time

  # @!attribute unit_price
  #
  #   @return [Float]
  required :unit_price, Float

  # @!attribute invoice_id
  #
  #   @return [String, nil]
  optional :invoice_id, String, nil?: true

  # @!method initialize(id:, amount:, quantity:, timestamp:, unit_price:, invoice_id: nil)
  #   @param id [String]
  #   @param amount [Float]
  #   @param quantity [Float]
  #   @param timestamp [Time]
  #   @param unit_price [Float]
  #   @param invoice_id [String, nil]
end

Instance Attribute Details

#amountFloat

Returns:

  • (Float)


43
# File 'lib/metronome_sdk/models/schedule_point_in_time.rb', line 43

required :amount, Float

#idString

Returns:

  • (String)


38
# File 'lib/metronome_sdk/models/schedule_point_in_time.rb', line 38

required :id, String

#invoice_idString?

Returns:

  • (String, nil)


63
# File 'lib/metronome_sdk/models/schedule_point_in_time.rb', line 63

optional :invoice_id, String, nil?: true

#quantityFloat

Returns:

  • (Float)


48
# File 'lib/metronome_sdk/models/schedule_point_in_time.rb', line 48

required :quantity, Float

#timestampTime

Returns:

  • (Time)


53
# File 'lib/metronome_sdk/models/schedule_point_in_time.rb', line 53

required :timestamp, Time

#unit_priceFloat

Returns:

  • (Float)


58
# File 'lib/metronome_sdk/models/schedule_point_in_time.rb', line 58

required :unit_price, Float