Class: MetronomeSDK::Models::V1::CreditGrantListResponse

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/metronome_sdk/models/v1/credit_grant_list_response.rb,
sig/metronome_sdk/models/v1/credit_grant_list_response.rbs

Overview

See Also:

  • MetronomeSDK::Resources::V1::CreditGrants#list

Defined Under Namespace

Classes: Balance, GrantAmount, PaidAmount, Product

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:, credit_type:) ⇒ Object

the amount paid for this credit grant

Parameters:



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

Instance Attribute Details

#balanceMetronomeSDK::Models::V1::CreditGrantListResponse::Balance

The effective balance of the grant as of the end of the customer's current billing period. Expiration deductions will be included only if the grant expires before the end of the current billing period.



20
# File 'lib/metronome_sdk/models/v1/credit_grant_list_response.rb', line 20

required :balance, -> { MetronomeSDK::Models::V1::CreditGrantListResponse::Balance }

#credit_grant_typeString?

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


80
# File 'lib/metronome_sdk/models/v1/credit_grant_list_response.rb', line 80

optional :credit_grant_type, String, nil?: true

#custom_fieldsHash{Symbol=>String}

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

Parameters:

  • value (::Hash[Symbol, String])

Returns:

  • (Hash{Symbol=>String})


26
# File 'lib/metronome_sdk/models/v1/credit_grant_list_response.rb', line 26

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

#customer_idString

the Metronome ID of the customer

Parameters:

  • value (String)

Returns:

  • (String)


32
# File 'lib/metronome_sdk/models/v1/credit_grant_list_response.rb', line 32

required :customer_id, String

#deductionsArray<MetronomeSDK::Models::V1::CreditLedgerEntry>

Parameters:

  • value (::Array[MetronomeSDK::V1::CreditLedgerEntry])

Returns:



37
# File 'lib/metronome_sdk/models/v1/credit_grant_list_response.rb', line 37

required :deductions, -> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::CreditLedgerEntry] }

#effective_atTime

Parameters:

  • value (Time)

Returns:

  • (Time)


42
# File 'lib/metronome_sdk/models/v1/credit_grant_list_response.rb', line 42

required :effective_at, Time

#expires_atTime

Parameters:

  • value (Time)

Returns:

  • (Time)


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

required :expires_at, Time

#grant_amountMetronomeSDK::Models::V1::CreditGrantListResponse::GrantAmount

the amount of credits initially granted



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

required :grant_amount, -> { MetronomeSDK::Models::V1::CreditGrantListResponse::GrantAmount }

#idString

the Metronome ID of the credit grant

Parameters:

  • value (String)

Returns:

  • (String)


12
# File 'lib/metronome_sdk/models/v1/credit_grant_list_response.rb', line 12

required :id, String

#invoice_idString?

the Metronome ID of the invoice with the purchase charge for this credit grant, if applicable

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

optional :invoice_id, String, nil?: true

#nameString

Parameters:

  • value (String)

Returns:

  • (String)


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

required :name, String

the amount paid for this credit grant



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

required :paid_amount, -> { MetronomeSDK::Models::V1::CreditGrantListResponse::PaidAmount }

#pending_deductionsArray<MetronomeSDK::Models::V1::CreditLedgerEntry>

Parameters:

  • value (::Array[MetronomeSDK::V1::CreditLedgerEntry])

Returns:



69
70
# File 'lib/metronome_sdk/models/v1/credit_grant_list_response.rb', line 69

required :pending_deductions,
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::V1::CreditLedgerEntry] }

#priorityFloat

Parameters:

  • value (Float)

Returns:

  • (Float)


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

required :priority, Float

#productsArray<MetronomeSDK::Models::V1::CreditGrantListResponse::Product>?

The products which these credits will be applied to. (If unspecified, the credits will be applied to charges for all products.)



94
95
# File 'lib/metronome_sdk/models/v1/credit_grant_list_response.rb', line 94

optional :products,
-> { MetronomeSDK::Internal::Type::ArrayOf[MetronomeSDK::Models::V1::CreditGrantListResponse::Product] }

#reasonString?

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

optional :reason, String, nil?: true

#uniqueness_keyString?

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

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


108
# File 'lib/metronome_sdk/models/v1/credit_grant_list_response.rb', line 108

optional :uniqueness_key, String, nil?: true

Instance Method Details

#to_hash{

Returns:

  • ({)


84
# File 'sig/metronome_sdk/models/v1/credit_grant_list_response.rbs', line 84

def to_hash: -> {