Class: MetronomeSDK::Models::Credit

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

Defined Under Namespace

Modules: Ledger, RateType, Type Classes: Contract, Product

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(id: ) ⇒ Object

Parameters:

  • id (String) (defaults to: )


# File 'lib/metronome_sdk/models/credit.rb', line 130

Instance Attribute Details

#access_scheduleMetronomeSDK::Models::ScheduleDuration?

The schedule that the customer will gain access to the credits.



25
# File 'lib/metronome_sdk/models/credit.rb', line 25

optional :access_schedule, -> { MetronomeSDK::ScheduleDuration }

#applicable_contract_idsArray<String>?

Returns:

  • (Array<String>, nil)


30
# File 'lib/metronome_sdk/models/credit.rb', line 30

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

#applicable_product_idsArray<String>?

Returns:

  • (Array<String>, nil)


35
# File 'lib/metronome_sdk/models/credit.rb', line 35

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

#applicable_product_tagsArray<String>?

Returns:

  • (Array<String>, nil)


40
# File 'lib/metronome_sdk/models/credit.rb', line 40

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

#balanceFloat?

The current balance of the credit or commit. This balance reflects the amount of credit or commit that the customer has access to use at this moment - thus, expired and upcoming credit or commit segments contribute 0 to the balance. The balance will match the sum of all ledger entries with the exception of the case where the sum of negative manual ledger entries exceeds the positive amount remaining on the credit or commit - in that case, the balance will be 0. All manual ledger entries associated with active credit or commit segments are included in the balance, including future-dated manual ledger entries.

Returns:

  • (Float, nil)


53
# File 'lib/metronome_sdk/models/credit.rb', line 53

optional :balance, Float

#contractMetronomeSDK::Models::Credit::Contract?



58
# File 'lib/metronome_sdk/models/credit.rb', line 58

optional :contract, -> { MetronomeSDK::Credit::Contract }

#custom_fieldsHash{Symbol=>String}?

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

Returns:

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


64
# File 'lib/metronome_sdk/models/credit.rb', line 64

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

#descriptionString?

Returns:

  • (String, nil)


69
# File 'lib/metronome_sdk/models/credit.rb', line 69

optional :description, String

#hierarchy_configurationMetronomeSDK::Models::CommitHierarchyConfiguration?

Optional configuration for credit hierarchy access control



75
# File 'lib/metronome_sdk/models/credit.rb', line 75

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

#idString

Returns:

  • (String)


9
# File 'lib/metronome_sdk/models/credit.rb', line 9

required :id, String

#nameString?

Returns:

  • (String, nil)


87
# File 'lib/metronome_sdk/models/credit.rb', line 87

optional :name, String

#netsuite_sales_order_idString?

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

Returns:

  • (String, nil)


93
# File 'lib/metronome_sdk/models/credit.rb', line 93

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, nil)


100
# File 'lib/metronome_sdk/models/credit.rb', line 100

optional :priority, Float

#productMetronomeSDK::Models::Credit::Product



14
# File 'lib/metronome_sdk/models/credit.rb', line 14

required :product, -> { MetronomeSDK::Credit::Product }

#rate_typeSymbol, ...

Returns:



105
# File 'lib/metronome_sdk/models/credit.rb', line 105

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

#salesforce_opportunity_idString?

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

Returns:

  • (String, nil)


111
# File 'lib/metronome_sdk/models/credit.rb', line 111

optional :salesforce_opportunity_id, String

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

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.

Returns:



119
# File 'lib/metronome_sdk/models/credit.rb', line 119

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

#typeSymbol, MetronomeSDK::Models::Credit::Type



19
# File 'lib/metronome_sdk/models/credit.rb', line 19

required :type, enum: -> { MetronomeSDK::Credit::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)


128
# File 'lib/metronome_sdk/models/credit.rb', line 128

optional :uniqueness_key, String

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/metronome_sdk/models/credit.rb', line 197