Class: Stripe::Billing::CreditGrant::CreateParams
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::Billing::CreditGrant::CreateParams
- Defined in:
- lib/stripe/resources/billing/credit_grant.rb
Defined Under Namespace
Classes: Amount, ApplicabilityConfig
Instance Attribute Summary collapse
-
#amount ⇒ Object
Amount of this credit grant.
-
#applicability_config ⇒ Object
Configuration specifying what this credit grant applies to.
-
#category ⇒ Object
The category of this credit grant.
-
#customer ⇒ Object
ID of the customer to receive the billing credits.
-
#customer_account ⇒ Object
ID of the account to receive the billing credits.
-
#effective_at ⇒ Object
The time when the billing credits become effective-when they’re eligible for use.
-
#expand ⇒ Object
Specifies which fields in the response should be expanded.
-
#expires_at ⇒ Object
The time when the billing credits expire.
-
#metadata ⇒ Object
Set of key-value pairs that you can attach to an object.
-
#name ⇒ Object
A descriptive name shown in the Dashboard.
-
#priority ⇒ Object
The desired priority for applying this credit grant.
Instance Method Summary collapse
-
#initialize(amount: nil, applicability_config: nil, category: nil, customer: nil, customer_account: nil, effective_at: nil, expand: nil, expires_at: nil, metadata: nil, name: nil, priority: nil) ⇒ CreateParams
constructor
A new instance of CreateParams.
Methods inherited from RequestParams
Constructor Details
#initialize(amount: nil, applicability_config: nil, category: nil, customer: nil, customer_account: nil, effective_at: nil, expand: nil, expires_at: nil, metadata: nil, name: nil, priority: nil) ⇒ CreateParams
Returns a new instance of CreateParams.
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 |
# File 'lib/stripe/resources/billing/credit_grant.rb', line 152 def initialize( amount: nil, applicability_config: nil, category: nil, customer: nil, customer_account: nil, effective_at: nil, expand: nil, expires_at: nil, metadata: nil, name: nil, priority: nil ) @amount = amount @applicability_config = applicability_config @category = category @customer = customer @customer_account = customer_account @effective_at = effective_at @expand = @expires_at = expires_at @metadata = @name = name @priority = priority end |
Instance Attribute Details
#amount ⇒ Object
Amount of this credit grant.
130 131 132 |
# File 'lib/stripe/resources/billing/credit_grant.rb', line 130 def amount @amount end |
#applicability_config ⇒ Object
Configuration specifying what this credit grant applies to. We currently only support ‘metered` prices that have a [Billing Meter](docs.stripe.com/api/billing/meter) attached to them.
132 133 134 |
# File 'lib/stripe/resources/billing/credit_grant.rb', line 132 def applicability_config @applicability_config end |
#category ⇒ Object
The category of this credit grant.
134 135 136 |
# File 'lib/stripe/resources/billing/credit_grant.rb', line 134 def category @category end |
#customer ⇒ Object
ID of the customer to receive the billing credits.
136 137 138 |
# File 'lib/stripe/resources/billing/credit_grant.rb', line 136 def customer @customer end |
#customer_account ⇒ Object
ID of the account to receive the billing credits.
138 139 140 |
# File 'lib/stripe/resources/billing/credit_grant.rb', line 138 def customer_account @customer_account end |
#effective_at ⇒ Object
The time when the billing credits become effective-when they’re eligible for use. It defaults to the current timestamp if not specified.
140 141 142 |
# File 'lib/stripe/resources/billing/credit_grant.rb', line 140 def effective_at @effective_at end |
#expand ⇒ Object
Specifies which fields in the response should be expanded.
142 143 144 |
# File 'lib/stripe/resources/billing/credit_grant.rb', line 142 def @expand end |
#expires_at ⇒ Object
The time when the billing credits expire. If not specified, the billing credits don’t expire.
144 145 146 |
# File 'lib/stripe/resources/billing/credit_grant.rb', line 144 def expires_at @expires_at end |
#metadata ⇒ Object
Set of key-value pairs that you can attach to an object. You can use this to store additional information about the object (for example, cost basis) in a structured format.
146 147 148 |
# File 'lib/stripe/resources/billing/credit_grant.rb', line 146 def @metadata end |
#name ⇒ Object
A descriptive name shown in the Dashboard.
148 149 150 |
# File 'lib/stripe/resources/billing/credit_grant.rb', line 148 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.
150 151 152 |
# File 'lib/stripe/resources/billing/credit_grant.rb', line 150 def priority @priority end |