Class: Stripe::V2::Billing::ServiceActionCreateParams::CreditGrantPerTenant

Inherits:
RequestParams
  • Object
show all
Defined in:
lib/stripe/params/v2/billing/service_action_create_params.rb

Defined Under Namespace

Classes: Amount, ApplicabilityConfig, ExpiryConfig, GrantCondition

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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, grant_condition: nil, name: nil, priority: nil) ⇒ CreditGrantPerTenant

Returns a new instance of CreditGrantPerTenant.



234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
# File 'lib/stripe/params/v2/billing/service_action_create_params.rb', line 234

def initialize(
  amount: nil,
  applicability_config: nil,
  category: nil,
  expiry_config: nil,
  grant_condition: nil,
  name: nil,
  priority: nil
)
  @amount = amount
  @applicability_config = applicability_config
  @category = category
  @expiry_config = expiry_config
  @grant_condition = grant_condition
  @name = name
  @priority = priority
end

Instance Attribute Details

#amountObject

The amount of the credit grant.



220
221
222
# File 'lib/stripe/params/v2/billing/service_action_create_params.rb', line 220

def amount
  @amount
end

#applicability_configObject

Defines the scope where the credit grant is applicable.



222
223
224
# File 'lib/stripe/params/v2/billing/service_action_create_params.rb', line 222

def applicability_config
  @applicability_config
end

#categoryObject

The category of the credit grant.



224
225
226
# File 'lib/stripe/params/v2/billing/service_action_create_params.rb', line 224

def category
  @category
end

#expiry_configObject

The expiry configuration for the credit grant.



226
227
228
# File 'lib/stripe/params/v2/billing/service_action_create_params.rb', line 226

def expiry_config
  @expiry_config
end

#grant_conditionObject

The grant condition for the credit grant.



228
229
230
# File 'lib/stripe/params/v2/billing/service_action_create_params.rb', line 228

def grant_condition
  @grant_condition
end

#nameObject

Customer-facing name for the credit grant.



230
231
232
# File 'lib/stripe/params/v2/billing/service_action_create_params.rb', line 230

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.



232
233
234
# File 'lib/stripe/params/v2/billing/service_action_create_params.rb', line 232

def priority
  @priority
end

Class Method Details

.field_encodingsObject



252
253
254
255
256
257
258
259
# File 'lib/stripe/params/v2/billing/service_action_create_params.rb', line 252

def self.field_encodings
  @field_encodings = {
    amount: {
      kind: :object,
      fields: { custom_pricing_unit: { kind: :object, fields: { value: :decimal_string } } },
    },
  }
end