Class: MetronomeSDK::Models::V1::ContractCreateHistoricalInvoicesParams::Invoice

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/metronome_sdk/models/v1/contract_create_historical_invoices_params.rb

Defined Under Namespace

Modules: BillableStatus, BreakdownGranularity Classes: UsageLineItem

Instance Attribute Summary collapse

Class Method 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(exclusive_end_date: , inclusive_start_date: , quantity: ) ⇒ Object

Parameters:

  • exclusive_end_date (Time) (defaults to: )
  • inclusive_start_date (Time) (defaults to: )
  • quantity (Float) (defaults to: )


27
28
29
30
31
32
33
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
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
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
195
196
# File 'lib/metronome_sdk/models/v1/contract_create_historical_invoices_params.rb', line 27

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

  # @!attribute credit_type_id
  #
  #   @return [String]
  required :credit_type_id, String

  # @!attribute customer_id
  #
  #   @return [String]
  required :customer_id, String

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

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

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

  # @!attribute usage_line_items
  #
  #   @return [Array<MetronomeSDK::Models::V1::ContractCreateHistoricalInvoicesParams::Invoice::UsageLineItem>]
  required :usage_line_items,
           -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::ContractCreateHistoricalInvoicesParams::Invoice::UsageLineItem] }

  # @!attribute billable_status
  #   This field's availability is dependent on your client's configuration.
  #
  #   @return [Symbol, MetronomeSDK::Models::V1::ContractCreateHistoricalInvoicesParams::Invoice::BillableStatus, nil]
  optional :billable_status,
           enum: -> { MetronomeSDK::V1::ContractCreateHistoricalInvoicesParams::Invoice::BillableStatus }

  # @!attribute breakdown_granularity
  #
  #   @return [Symbol, MetronomeSDK::Models::V1::ContractCreateHistoricalInvoicesParams::Invoice::BreakdownGranularity, nil]
  optional :breakdown_granularity,
           enum: -> { MetronomeSDK::V1::ContractCreateHistoricalInvoicesParams::Invoice::BreakdownGranularity }

  # @!attribute custom_fields
  #   Custom fields to be added eg. { "key1": "value1", "key2": "value2" }
  #
  #   @return [Hash{Symbol=>String}, nil]
  optional :custom_fields, MetronomeSDK::Internal::Type::HashOf[String]

  # @!method initialize(contract_id:, credit_type_id:, customer_id:, exclusive_end_date:, inclusive_start_date:, issue_date:, usage_line_items:, billable_status: nil, breakdown_granularity: nil, custom_fields: nil)
  #   @param contract_id [String]
  #
  #   @param credit_type_id [String]
  #
  #   @param customer_id [String]
  #
  #   @param exclusive_end_date [Time]
  #
  #   @param inclusive_start_date [Time]
  #
  #   @param issue_date [Time]
  #
  #   @param usage_line_items [Array<MetronomeSDK::Models::V1::ContractCreateHistoricalInvoicesParams::Invoice::UsageLineItem>]
  #
  #   @param billable_status [Symbol, MetronomeSDK::Models::V1::ContractCreateHistoricalInvoicesParams::Invoice::BillableStatus] This field's availability is dependent on your client's configuration.
  #
  #   @param breakdown_granularity [Symbol, MetronomeSDK::Models::V1::ContractCreateHistoricalInvoicesParams::Invoice::BreakdownGranularity]
  #
  #   @param custom_fields [Hash{Symbol=>String}] Custom fields to be added eg. { "key1": "value1", "key2": "value2" }

  class UsageLineItem < MetronomeSDK::Internal::Type::BaseModel
    # @!attribute exclusive_end_date
    #
    #   @return [Time]
    required :exclusive_end_date, Time

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

    # @!attribute product_id
    #
    #   @return [String]
    required :product_id, String

    # @!attribute presentation_group_values
    #
    #   @return [Hash{Symbol=>String}, nil]
    optional :presentation_group_values, MetronomeSDK::Internal::Type::HashOf[String]

    # @!attribute pricing_group_values
    #
    #   @return [Hash{Symbol=>String}, nil]
    optional :pricing_group_values, MetronomeSDK::Internal::Type::HashOf[String]

    # @!attribute quantity
    #
    #   @return [Float, nil]
    optional :quantity, Float

    # @!attribute subtotals_with_quantity
    #
    #   @return [Array<MetronomeSDK::Models::V1::ContractCreateHistoricalInvoicesParams::Invoice::UsageLineItem::SubtotalsWithQuantity>, nil]
    optional :subtotals_with_quantity,
             -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::ContractCreateHistoricalInvoicesParams::Invoice::UsageLineItem::SubtotalsWithQuantity] }

    # @!method initialize(exclusive_end_date:, inclusive_start_date:, product_id:, presentation_group_values: nil, pricing_group_values: nil, quantity: nil, subtotals_with_quantity: nil)
    #   @param exclusive_end_date [Time]
    #   @param inclusive_start_date [Time]
    #   @param product_id [String]
    #   @param presentation_group_values [Hash{Symbol=>String}]
    #   @param pricing_group_values [Hash{Symbol=>String}]
    #   @param quantity [Float]
    #   @param subtotals_with_quantity [Array<MetronomeSDK::Models::V1::ContractCreateHistoricalInvoicesParams::Invoice::UsageLineItem::SubtotalsWithQuantity>]

    class SubtotalsWithQuantity < MetronomeSDK::Internal::Type::BaseModel
      # @!attribute exclusive_end_date
      #
      #   @return [Time]
      required :exclusive_end_date, Time

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

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

      # @!method initialize(exclusive_end_date:, inclusive_start_date:, quantity:)
      #   @param exclusive_end_date [Time]
      #   @param inclusive_start_date [Time]
      #   @param quantity [Float]
    end
  end

  # This field's availability is dependent on your client's configuration.
  #
  # @see MetronomeSDK::Models::V1::ContractCreateHistoricalInvoicesParams::Invoice#billable_status
  module BillableStatus
    extend MetronomeSDK::Internal::Type::Enum

    BILLABLE = :billable
    UNBILLABLE = :unbillable

    # @!method self.values
    #   @return [Array<Symbol>]
  end

  # @see MetronomeSDK::Models::V1::ContractCreateHistoricalInvoicesParams::Invoice#breakdown_granularity
  module BreakdownGranularity
    extend MetronomeSDK::Internal::Type::Enum

    HOUR = :HOUR
    DAY = :DAY

    # @!method self.values
    #   @return [Array<Symbol>]
  end
end

Instance Attribute Details

#billable_statusSymbol, ...

This field’s availability is dependent on your client’s configuration.



68
69
# File 'lib/metronome_sdk/models/v1/contract_create_historical_invoices_params.rb', line 68

optional :billable_status,
enum: -> { MetronomeSDK::V1::ContractCreateHistoricalInvoicesParams::Invoice::BillableStatus }

#breakdown_granularitySymbol, ...



74
75
# File 'lib/metronome_sdk/models/v1/contract_create_historical_invoices_params.rb', line 74

optional :breakdown_granularity,
enum: -> { MetronomeSDK::V1::ContractCreateHistoricalInvoicesParams::Invoice::BreakdownGranularity }

#contract_idString

Returns:

  • (String)


31
# File 'lib/metronome_sdk/models/v1/contract_create_historical_invoices_params.rb', line 31

required :contract_id, String

#credit_type_idString

Returns:

  • (String)


36
# File 'lib/metronome_sdk/models/v1/contract_create_historical_invoices_params.rb', line 36

required :credit_type_id, String

#custom_fieldsHash{Symbol=>String}?

Custom fields to be added eg. { “key1”: “value1”, “key2”: “value2” }

Returns:

  • (Hash{Symbol=>String}, nil)


81
# File 'lib/metronome_sdk/models/v1/contract_create_historical_invoices_params.rb', line 81

optional :custom_fields, MetronomeSDK::Internal::Type::HashOf[String]

#customer_idString

Returns:

  • (String)


41
# File 'lib/metronome_sdk/models/v1/contract_create_historical_invoices_params.rb', line 41

required :customer_id, String

#exclusive_end_dateTime

Returns:

  • (Time)


46
# File 'lib/metronome_sdk/models/v1/contract_create_historical_invoices_params.rb', line 46

required :exclusive_end_date, Time

#inclusive_start_dateTime

Returns:

  • (Time)


51
# File 'lib/metronome_sdk/models/v1/contract_create_historical_invoices_params.rb', line 51

required :inclusive_start_date, Time

#issue_dateTime

Returns:

  • (Time)


56
# File 'lib/metronome_sdk/models/v1/contract_create_historical_invoices_params.rb', line 56

required :issue_date, Time

#usage_line_itemsArray<MetronomeSDK::Models::V1::ContractCreateHistoricalInvoicesParams::Invoice::UsageLineItem>



61
62
# File 'lib/metronome_sdk/models/v1/contract_create_historical_invoices_params.rb', line 61

required :usage_line_items,
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::ContractCreateHistoricalInvoicesParams::Invoice::UsageLineItem] }

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/metronome_sdk/models/v1/contract_create_historical_invoices_params.rb', line 182