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.



275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
# File 'lib/stripe/resources/billing/credit_grant.rb', line 275

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.



253
254
255
# File 'lib/stripe/resources/billing/credit_grant.rb', line 253

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.



255
256
257
# File 'lib/stripe/resources/billing/credit_grant.rb', line 255

def applicability_config
  @applicability_config
end

#categoryObject

The category of this credit grant.



257
258
259
# File 'lib/stripe/resources/billing/credit_grant.rb', line 257

def category
  @category
end

#customerObject

ID of the customer to receive the billing credits.



259
260
261
# File 'lib/stripe/resources/billing/credit_grant.rb', line 259

def customer
  @customer
end

#customer_accountObject

ID of the account to receive the billing credits.



261
262
263
# File 'lib/stripe/resources/billing/credit_grant.rb', line 261

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.



263
264
265
# File 'lib/stripe/resources/billing/credit_grant.rb', line 263

def effective_at
  @effective_at
end

#expandObject

Specifies which fields in the response should be expanded.



265
266
267
# File 'lib/stripe/resources/billing/credit_grant.rb', line 265

def expand
  @expand
end

#expires_atObject

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



267
268
269
# File 'lib/stripe/resources/billing/credit_grant.rb', line 267

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.



269
270
271
# File 'lib/stripe/resources/billing/credit_grant.rb', line 269

def 
  @metadata
end

#nameObject

A descriptive name shown in the Dashboard.



271
272
273
# File 'lib/stripe/resources/billing/credit_grant.rb', line 271

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.



273
274
275
# File 'lib/stripe/resources/billing/credit_grant.rb', line 273

def priority
  @priority
end