Class: MetronomeSDK::Models::V1::CreditGrantCreateParams
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- MetronomeSDK::Models::V1::CreditGrantCreateParams
- Extended by:
- Internal::Type::RequestParameters::Converter
- Includes:
- Internal::Type::RequestParameters
- Defined in:
- lib/metronome_sdk/models/v1/credit_grant_create_params.rb
Overview
Defined Under Namespace
Classes: GrantAmount, PaidAmount, RolloverSettings
Instance Attribute Summary collapse
- #credit_grant_type ⇒ String?
-
#custom_fields ⇒ Hash{Symbol=>String}?
Custom fields to attach to the credit grant.
-
#customer_id ⇒ String
the Metronome ID of the customer.
-
#effective_at ⇒ Time?
The credit grant will only apply to usage or charges dated on or after this timestamp.
-
#expires_at ⇒ Time
The credit grant will only apply to usage or charges dated before this timestamp.
-
#grant_amount ⇒ MetronomeSDK::Models::V1::CreditGrantCreateParams::GrantAmount
the amount of credits granted.
-
#invoice_date ⇒ Time?
The date to issue an invoice for the paid_amount.
-
#name ⇒ String
the name of the credit grant as it will appear on invoices.
-
#paid_amount ⇒ MetronomeSDK::Models::V1::CreditGrantCreateParams::PaidAmount
the amount paid for this credit grant.
- #priority ⇒ Float
-
#product_ids ⇒ Array<String>?
The product(s) which these credits will be applied to.
- #reason ⇒ String?
-
#rollover_settings ⇒ MetronomeSDK::Models::V1::CreditGrantCreateParams::RolloverSettings?
Configure a rollover for this credit grant so if it expires it rolls over a configured amount to a new credit grant.
-
#uniqueness_key ⇒ String?
Prevents the creation of duplicates.
Attributes included from Internal::Type::RequestParameters
Instance Method Summary collapse
-
#initialize(amount: , credit_type_id: ) ⇒ Object
constructor
the amount paid for this credit grant.
Methods included from Internal::Type::RequestParameters::Converter
Methods included from Internal::Type::RequestParameters
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_id: ) ⇒ Object
the amount paid for this credit grant
|
|
# File 'lib/metronome_sdk/models/v1/credit_grant_create_params.rb', line 146
|
Instance Attribute Details
#credit_grant_type ⇒ String?
49 |
# File 'lib/metronome_sdk/models/v1/credit_grant_create_params.rb', line 49 optional :credit_grant_type, String |
#custom_fields ⇒ Hash{Symbol=>String}?
Custom fields to attach to the credit grant.
55 |
# File 'lib/metronome_sdk/models/v1/credit_grant_create_params.rb', line 55 optional :custom_fields, MetronomeSDK::Internal::Type::HashOf[String] |
#customer_id ⇒ String
the Metronome ID of the customer
15 |
# File 'lib/metronome_sdk/models/v1/credit_grant_create_params.rb', line 15 required :customer_id, String |
#effective_at ⇒ Time?
The credit grant will only apply to usage or charges dated on or after this timestamp
62 |
# File 'lib/metronome_sdk/models/v1/credit_grant_create_params.rb', line 62 optional :effective_at, Time |
#expires_at ⇒ Time
The credit grant will only apply to usage or charges dated before this timestamp
21 |
# File 'lib/metronome_sdk/models/v1/credit_grant_create_params.rb', line 21 required :expires_at, Time |
#grant_amount ⇒ MetronomeSDK::Models::V1::CreditGrantCreateParams::GrantAmount
the amount of credits granted
27 |
# File 'lib/metronome_sdk/models/v1/credit_grant_create_params.rb', line 27 required :grant_amount, -> { MetronomeSDK::V1::CreditGrantCreateParams::GrantAmount } |
#invoice_date ⇒ Time?
The date to issue an invoice for the paid_amount.
68 |
# File 'lib/metronome_sdk/models/v1/credit_grant_create_params.rb', line 68 optional :invoice_date, Time |
#name ⇒ String
the name of the credit grant as it will appear on invoices
33 |
# File 'lib/metronome_sdk/models/v1/credit_grant_create_params.rb', line 33 required :name, String |
#paid_amount ⇒ MetronomeSDK::Models::V1::CreditGrantCreateParams::PaidAmount
the amount paid for this credit grant
39 |
# File 'lib/metronome_sdk/models/v1/credit_grant_create_params.rb', line 39 required :paid_amount, -> { MetronomeSDK::V1::CreditGrantCreateParams::PaidAmount } |
#priority ⇒ Float
44 |
# File 'lib/metronome_sdk/models/v1/credit_grant_create_params.rb', line 44 required :priority, Float |
#product_ids ⇒ Array<String>?
The product(s) which these credits will be applied to. (If unspecified, the credits will be applied to charges for all products.). The array ordering specified here will be used to determine the order in which credits will be applied to invoice line items
77 |
# File 'lib/metronome_sdk/models/v1/credit_grant_create_params.rb', line 77 optional :product_ids, MetronomeSDK::Internal::Type::ArrayOf[String] |
#reason ⇒ String?
82 |
# File 'lib/metronome_sdk/models/v1/credit_grant_create_params.rb', line 82 optional :reason, String |
#rollover_settings ⇒ MetronomeSDK::Models::V1::CreditGrantCreateParams::RolloverSettings?
Configure a rollover for this credit grant so if it expires it rolls over a configured amount to a new credit grant. This feature is currently opt-in only. Contact Metronome to be added to the beta.
90 |
# File 'lib/metronome_sdk/models/v1/credit_grant_create_params.rb', line 90 optional :rollover_settings, -> { MetronomeSDK::V1::CreditGrantCreateParams::RolloverSettings } |
#uniqueness_key ⇒ String?
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.
98 |
# File 'lib/metronome_sdk/models/v1/credit_grant_create_params.rb', line 98 optional :uniqueness_key, String |