Class: Stripe::V2::Billing::ServiceActionCreateParams::CreditGrant
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::V2::Billing::ServiceActionCreateParams::CreditGrant
- Defined in:
- lib/stripe/params/v2/billing/service_action_create_params.rb
Defined Under Namespace
Classes: Amount, ApplicabilityConfig, ExpiryConfig
Instance Attribute Summary collapse
-
#amount ⇒ Object
The amount of the credit grant.
-
#applicability_config ⇒ Object
Defines the scope where the credit grant is applicable.
-
#category ⇒ Object
The category of the credit grant.
-
#expiry_config ⇒ Object
The expiry configuration for the credit grant.
-
#name ⇒ Object
A descriptive name shown in dashboard.
-
#priority ⇒ Object
The desired priority for applying this credit grant.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(amount: nil, applicability_config: nil, category: nil, expiry_config: nil, name: nil, priority: nil) ⇒ CreditGrant
constructor
A new instance of CreditGrant.
Methods inherited from RequestParams
attr_accessor, coerce_params, coerce_value, new, #to_h
Constructor Details
#initialize(amount: nil, applicability_config: nil, category: nil, expiry_config: nil, name: nil, priority: nil) ⇒ CreditGrant
Returns a new instance of CreditGrant.
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/stripe/params/v2/billing/service_action_create_params.rb', line 86 def initialize( amount: nil, applicability_config: nil, category: nil, expiry_config: nil, name: nil, priority: nil ) @amount = amount @applicability_config = applicability_config @category = category @expiry_config = expiry_config @name = name @priority = priority end |
Instance Attribute Details
#amount ⇒ Object
The amount of the credit grant.
74 75 76 |
# File 'lib/stripe/params/v2/billing/service_action_create_params.rb', line 74 def amount @amount end |
#applicability_config ⇒ Object
Defines the scope where the credit grant is applicable.
76 77 78 |
# File 'lib/stripe/params/v2/billing/service_action_create_params.rb', line 76 def applicability_config @applicability_config end |
#category ⇒ Object
The category of the credit grant.
78 79 80 |
# File 'lib/stripe/params/v2/billing/service_action_create_params.rb', line 78 def category @category end |
#expiry_config ⇒ Object
The expiry configuration for the credit grant.
80 81 82 |
# File 'lib/stripe/params/v2/billing/service_action_create_params.rb', line 80 def expiry_config @expiry_config end |
#name ⇒ Object
A descriptive name shown in dashboard.
82 83 84 |
# File 'lib/stripe/params/v2/billing/service_action_create_params.rb', line 82 def name @name end |
#priority ⇒ Object
The desired priority for applying this credit grant. If not specified, it will be set to the default value of 50. The highest priority is 0 and the lowest is 100.
84 85 86 |
# File 'lib/stripe/params/v2/billing/service_action_create_params.rb', line 84 def priority @priority end |
Class Method Details
.field_encodings ⇒ Object
102 103 104 105 106 107 108 109 |
# File 'lib/stripe/params/v2/billing/service_action_create_params.rb', line 102 def self.field_encodings @field_encodings = { amount: { kind: :object, fields: { custom_pricing_unit: { kind: :object, fields: { value: :decimal_string } } }, }, } end |