Class: MetronomeSDK::Models::V1::Customers::CreditCreateParams

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

Overview

Defined Under Namespace

Modules: RateType Classes: AccessSchedule

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

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(amount: , ending_before: , starting_at: ) ⇒ Object

Parameters:

  • amount (Float) (defaults to: )
  • ending_before (Time) (defaults to: )

    RFC 3339 timestamp (exclusive)

  • starting_at (Time) (defaults to: )

    RFC 3339 timestamp (inclusive)



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

Instance Attribute Details

#access_scheduleMetronomeSDK::Models::V1::Customers::CreditCreateParams::AccessSchedule

Schedule for distributing the credit to the customer.



16
# File 'lib/metronome_sdk/models/v1/customers/credit_create_params.rb', line 16

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

#applicable_contract_idsArray<String>?

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

Returns:

  • (Array<String>, nil)


40
# File 'lib/metronome_sdk/models/v1/customers/credit_create_params.rb', line 40

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

#applicable_product_idsArray<String>?

Which products the credit applies to. If both applicable_product_ids and applicable_product_tags are not provided, the credit applies to all products.

Returns:

  • (Array<String>, nil)


47
# File 'lib/metronome_sdk/models/v1/customers/credit_create_params.rb', line 47

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

#applicable_product_tagsArray<String>?

Which tags the credit applies to. If both applicable_product_ids and applicable_product_tags are not provided, the credit applies to all products.

Returns:

  • (Array<String>, nil)


54
# File 'lib/metronome_sdk/models/v1/customers/credit_create_params.rb', line 54

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)


60
# File 'lib/metronome_sdk/models/v1/customers/credit_create_params.rb', line 60

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

#customer_idString

Returns:

  • (String)


21
# File 'lib/metronome_sdk/models/v1/customers/credit_create_params.rb', line 21

required :customer_id, String

#descriptionString?

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

Returns:

  • (String, nil)


66
# File 'lib/metronome_sdk/models/v1/customers/credit_create_params.rb', line 66

optional :description, String

#nameString?

displayed on invoices

Returns:

  • (String, nil)


72
# File 'lib/metronome_sdk/models/v1/customers/credit_create_params.rb', line 72

optional :name, String

#netsuite_sales_order_idString?

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

Returns:

  • (String, nil)


78
# File 'lib/metronome_sdk/models/v1/customers/credit_create_params.rb', line 78

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)


28
# File 'lib/metronome_sdk/models/v1/customers/credit_create_params.rb', line 28

required :priority, Float

#product_idString

Returns:

  • (String)


33
# File 'lib/metronome_sdk/models/v1/customers/credit_create_params.rb', line 33

required :product_id, String

#rate_typeSymbol, ...



83
# File 'lib/metronome_sdk/models/v1/customers/credit_create_params.rb', line 83

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

#salesforce_opportunity_idString?

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

Returns:

  • (String, nil)


89
# File 'lib/metronome_sdk/models/v1/customers/credit_create_params.rb', line 89

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`.



98
# File 'lib/metronome_sdk/models/v1/customers/credit_create_params.rb', line 98

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

#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)


107
# File 'lib/metronome_sdk/models/v1/customers/credit_create_params.rb', line 107

optional :uniqueness_key, String