Class: Stripe::Billing::CreditGrant::CreateParams

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/resources/billing/credit_grant.rb

Defined Under Namespace

Classes: Amount, ApplicabilityConfig

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RequestParams

#to_h

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.



211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
# File 'lib/stripe/resources/billing/credit_grant.rb', line 211

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 = 
  @effective_at = effective_at
  @expand = expand
  @expires_at = expires_at
  @metadata = 
  @name = name
  @priority = priority
end

Instance Attribute Details

#amountObject

Amount of this credit grant.



189
190
191
# File 'lib/stripe/resources/billing/credit_grant.rb', line 189

def amount
  @amount
end

#applicability_configObject

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.



191
192
193
# File 'lib/stripe/resources/billing/credit_grant.rb', line 191

def applicability_config
  @applicability_config
end

#categoryObject

The category of this credit grant.



193
194
195
# File 'lib/stripe/resources/billing/credit_grant.rb', line 193

def category
  @category
end

#customerObject

ID of the customer to receive the billing credits.



195
196
197
# File 'lib/stripe/resources/billing/credit_grant.rb', line 195

def customer
  @customer
end

#customer_accountObject

ID of the account to receive the billing credits.



197
198
199
# File 'lib/stripe/resources/billing/credit_grant.rb', line 197

def 
  @customer_account
end

#effective_atObject

The time when the billing credits become effective-when they’re eligible for use. It defaults to the current timestamp if not specified.



199
200
201
# File 'lib/stripe/resources/billing/credit_grant.rb', line 199

def effective_at
  @effective_at
end

#expandObject

Specifies which fields in the response should be expanded.



201
202
203
# File 'lib/stripe/resources/billing/credit_grant.rb', line 201

def expand
  @expand
end

#expires_atObject

The time when the billing credits expire. If not specified, the billing credits don’t expire.



203
204
205
# File 'lib/stripe/resources/billing/credit_grant.rb', line 203

def expires_at
  @expires_at
end

#metadataObject

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.



205
206
207
# File 'lib/stripe/resources/billing/credit_grant.rb', line 205

def 
  @metadata
end

#nameObject

A descriptive name shown in the Dashboard.



207
208
209
# File 'lib/stripe/resources/billing/credit_grant.rb', line 207

def name
  @name
end

#priorityObject

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.



209
210
211
# File 'lib/stripe/resources/billing/credit_grant.rb', line 209

def priority
  @priority
end