Class: MetronomeSDK::Models::V1::ContractCreateParams::Credit

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

Defined Under Namespace

Modules: RateType Classes: AccessSchedule

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(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/contract_create_params.rb', line 1027

Instance Attribute Details

#access_scheduleMetronomeSDK::Models::V1::ContractCreateParams::Credit::AccessSchedule

Schedule for distributing the credit to the customer.



955
# File 'lib/metronome_sdk/models/v1/contract_create_params.rb', line 955

required :access_schedule, -> { MetronomeSDK::V1::ContractCreateParams::Credit::AccessSchedule }

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


967
# File 'lib/metronome_sdk/models/v1/contract_create_params.rb', line 967

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)


974
# File 'lib/metronome_sdk/models/v1/contract_create_params.rb', line 974

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)


980
# File 'lib/metronome_sdk/models/v1/contract_create_params.rb', line 980

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

#descriptionString?

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

Returns:

  • (String, nil)


986
# File 'lib/metronome_sdk/models/v1/contract_create_params.rb', line 986

optional :description, String

#hierarchy_configurationMetronomeSDK::Models::CommitHierarchyConfiguration?

Optional configuration for credit hierarchy access control



992
# File 'lib/metronome_sdk/models/v1/contract_create_params.rb', line 992

optional :hierarchy_configuration, -> { MetronomeSDK::CommitHierarchyConfiguration }

#nameString?

displayed on invoices

Returns:

  • (String, nil)


998
# File 'lib/metronome_sdk/models/v1/contract_create_params.rb', line 998

optional :name, String

#netsuite_sales_order_idString?

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

Returns:

  • (String, nil)


1004
# File 'lib/metronome_sdk/models/v1/contract_create_params.rb', line 1004

optional :netsuite_sales_order_id, String

#priorityFloat?

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

Returns:

  • (Float, nil)


1011
# File 'lib/metronome_sdk/models/v1/contract_create_params.rb', line 1011

optional :priority, Float

#product_idString

Returns:

  • (String)


960
# File 'lib/metronome_sdk/models/v1/contract_create_params.rb', line 960

required :product_id, String

#rate_typeSymbol, ...



1016
# File 'lib/metronome_sdk/models/v1/contract_create_params.rb', line 1016

optional :rate_type, enum: -> { MetronomeSDK::V1::ContractCreateParams::Credit::RateType }

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



1025
# File 'lib/metronome_sdk/models/v1/contract_create_params.rb', line 1025

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