Class: MetronomeSDK::Models::V1::Customers::CommitCreateParams::AccessSchedule

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

Defined Under Namespace

Classes: ScheduleItem

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(access_schedule: , customer_id: , priority: , product_id: , type: , applicable_contract_ids: nil, applicable_product_ids: nil, applicable_product_tags: nil, custom_fields: nil, description: nil, invoice_contract_id: nil, invoice_schedule: nil, name: nil, netsuite_sales_order_id: nil, rate_type: nil, salesforce_opportunity_id: nil, specifiers: nil, uniqueness_key: nil, request_options: {}) ⇒ Object

Some parameter documentations has been truncated, see MetronomeSDK::Models::V1::Customers::CommitCreateParams for more details.

Parameters:

  • access_schedule (MetronomeSDK::Models::V1::Customers::CommitCreateParams::AccessSchedule) (defaults to: )

    Schedule for distributing the commit to the customer. For “POSTPAID” commits onl

  • customer_id (String) (defaults to: )
  • priority (Float) (defaults to: )

    If multiple credits or commits are applicable, the one with the lower priority w

  • product_id (String) (defaults to: )

    ID of the fixed product associated with the commit. This is required because pro

  • type (Symbol, MetronomeSDK::Models::V1::Customers::CommitCreateParams::Type) (defaults to: )
  • applicable_contract_ids (Array<String>) (defaults to: nil)

    Which contract the commit applies to. If not provided, the commit applies to all

  • applicable_product_ids (Array<String>) (defaults to: nil)

    Which products the commit applies to. If applicable_product_ids, applicable_prod

  • applicable_product_tags (Array<String>) (defaults to: nil)

    Which tags the commit applies to. If applicable*product_ids, applicable_product*

  • custom_fields (Hash{Symbol=>String}) (defaults to: nil)

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

  • description (String) (defaults to: nil)

    Used only in UI/API. It is not exposed to end customers.

  • invoice_contract_id (String) (defaults to: nil)

    The contract that this commit will be billed on. This is required for “POSTPAID”

  • invoice_schedule (MetronomeSDK::Models::V1::Customers::CommitCreateParams::InvoiceSchedule) (defaults to: nil)

    Required for “POSTPAID” commits: the true up invoice will be generated at this t

  • name (String) (defaults to: nil)

    displayed on invoices

  • netsuite_sales_order_id (String) (defaults to: nil)

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

  • rate_type (Symbol, MetronomeSDK::Models::V1::Customers::CommitCreateParams::RateType) (defaults to: nil)
  • salesforce_opportunity_id (String) (defaults to: nil)

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

  • specifiers (Array<MetronomeSDK::Models::CommitSpecifierInput>) (defaults to: nil)

    List of filters that determine what kind of customer usage draws down a commit o

  • uniqueness_key (String) (defaults to: nil)

    Prevents the creation of duplicates. If a request to create a commit or credit i

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


178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
# File 'lib/metronome_sdk/models/v1/customers/commit_create_params.rb', line 178

class AccessSchedule < MetronomeSDK::Internal::Type::BaseModel
  # @!attribute schedule_items
  #
  #   @return [Array<MetronomeSDK::Models::V1::Customers::CommitCreateParams::AccessSchedule::ScheduleItem>]
  required :schedule_items,
           -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::Customers::CommitCreateParams::AccessSchedule::ScheduleItem] }

  # @!attribute credit_type_id
  #   Defaults to USD (cents) if not passed
  #
  #   @return [String, nil]
  optional :credit_type_id, String

  # @!method initialize(schedule_items:, credit_type_id: nil)
  #   Schedule for distributing the commit to the customer. For "POSTPAID" commits
  #   only one schedule item is allowed and amount must match invoice_schedule total.
  #
  #   @param schedule_items [Array<MetronomeSDK::Models::V1::Customers::CommitCreateParams::AccessSchedule::ScheduleItem>]
  #
  #   @param credit_type_id [String] Defaults to USD (cents) if not passed

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

    # @!attribute ending_before
    #   RFC 3339 timestamp (exclusive)
    #
    #   @return [Time]
    required :ending_before, Time

    # @!attribute starting_at
    #   RFC 3339 timestamp (inclusive)
    #
    #   @return [Time]
    required :starting_at, Time

    # @!method initialize(amount:, ending_before:, starting_at:)
    #   @param amount [Float]
    #
    #   @param ending_before [Time] RFC 3339 timestamp (exclusive)
    #
    #   @param starting_at [Time] RFC 3339 timestamp (inclusive)
  end
end

Instance Attribute Details

#credit_type_idString?

Defaults to USD (cents) if not passed

Returns:

  • (String, nil)


189
# File 'lib/metronome_sdk/models/v1/customers/commit_create_params.rb', line 189

optional :credit_type_id, String

#schedule_itemsArray<MetronomeSDK::Models::V1::Customers::CommitCreateParams::AccessSchedule::ScheduleItem>



182
183
# File 'lib/metronome_sdk/models/v1/customers/commit_create_params.rb', line 182

required :schedule_items,
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::Customers::CommitCreateParams::AccessSchedule::ScheduleItem] }