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

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/metronome_sdk/models/v1/customers/commit_create_params.rb

Overview

Defined Under Namespace

Modules: RateType, Type Classes: AccessSchedule, InvoiceSchedule

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

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(timestamp: , amount: nil, quantity: nil, unit_price: nil) ⇒ Object

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

Parameters:

  • timestamp (Time) (defaults to: )

    timestamp of the scheduled event

  • amount (Float) (defaults to: nil)

    Amount for the charge. Can be provided instead of unit_price and quantity. If am

  • quantity (Float) (defaults to: nil)

    Quantity for the charge. Will be multiplied by unit_price to determine the amoun

  • unit_price (Float) (defaults to: nil)

    Unit price for the charge. Will be multiplied by quantity to determine the amoun



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


Instance Attribute Details

#access_scheduleMetronomeSDK::Models::V1::Customers::CommitCreateParams::AccessSchedule

Schedule for distributing the commit to the customer. For “POSTPAID” commits only one schedule item is allowed and amount must match invoice_schedule total.



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

required :access_schedule, -> { MetronomeSDK::V1::Customers::CommitCreateParams::AccessSchedule }

#applicable_contract_idsArray<String>?

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

Returns:

  • (Array<String>, nil)


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

optional :applicable_contract_ids, MetronomeSDK::Internal::Type::ArrayOf[String]

#applicable_product_idsArray<String>?

Which products the commit applies to. If applicable_product_ids, applicable_product_tags or specifiers are not provided, the commit applies to all products.

Returns:

  • (Array<String>, nil)


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

optional :applicable_product_ids, MetronomeSDK::Internal::Type::ArrayOf[String]

#applicable_product_tagsArray<String>?

Which tags the commit applies to. If applicable_product_ids, applicable_product_tags or specifiers are not provided, the commit applies to all products.

Returns:

  • (Array<String>, nil)


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

optional :applicable_product_tags, MetronomeSDK::Internal::Type::ArrayOf[String]

#custom_fieldsHash{Symbol=>String}?

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

Returns:

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


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

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

#customer_idString

Returns:

  • (String)


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

required :customer_id, String

#descriptionString?

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

Returns:

  • (String, nil)


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

optional :description, String

#invoice_contract_idString?

The contract that this commit will be billed on. This is required for “POSTPAID” commits and for “PREPAID” commits unless there is no invoice schedule above (i.e., the commit is ‘free’), or if do_not_invoice is set to true.

Returns:

  • (String, nil)


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

optional :invoice_contract_id, String

#invoice_scheduleMetronomeSDK::Models::V1::Customers::CommitCreateParams::InvoiceSchedule?

Required for “POSTPAID” commits: the true up invoice will be generated at this time and only one schedule item is allowed; the total must match accesss_schedule amount. Optional for “PREPAID” commits: if not provided, this will be a “complimentary” commit with no invoice.



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

optional :invoice_schedule, -> { MetronomeSDK::V1::Customers::CommitCreateParams::InvoiceSchedule }

#nameString?

displayed on invoices

Returns:

  • (String, nil)


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

optional :name, String

#netsuite_sales_order_idString?

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

Returns:

  • (String, nil)


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

optional :netsuite_sales_order_id, String

#priorityFloat

If multiple credits or commits are applicable, the one with the lower priority will apply first.

Returns:

  • (Float)


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

required :priority, Float

#product_idString

ID of the fixed product associated with the commit. This is required because products are used to invoice the commit amount.

Returns:

  • (String)


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

required :product_id, String

#rate_typeSymbol, ...



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

optional :rate_type, enum: -> { MetronomeSDK::V1::Customers::CommitCreateParams::RateType }

#salesforce_opportunity_idString?

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

Returns:

  • (String, nil)


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

optional :salesforce_opportunity_id, String

#specifiersArray<MetronomeSDK::Models::CommitSpecifierInput>?

List of filters that determine what kind of customer usage draws down a commit or credit. A customer’s usage needs to meet the condition of at least one of the specifiers to contribute to a commit’s or credit’s drawdown. This field cannot be used together with ‘applicable_product_ids` or `applicable_product_tags`.



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

optional :specifiers, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::CommitSpecifierInput] }

#typeSymbol, MetronomeSDK::Models::V1::Customers::CommitCreateParams::Type



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

required :type, enum: -> { MetronomeSDK::V1::Customers::CommitCreateParams::Type }

#uniqueness_keyString?

Prevents the creation of duplicates. If a request to create a commit or credit is made with a uniqueness key that was previously used to create a commit or credit, a new record will not be created and the request will fail with a 409 error.

Returns:

  • (String, nil)


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

optional :uniqueness_key, String

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


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