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

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

Defined Under Namespace

Classes: CreditGrant, CreditGrantPerTenant

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(credit_grant: nil, credit_grant_per_tenant: nil, lookup_key: nil, service_interval: nil, service_interval_count: nil, type: nil) ⇒ ServiceActionCreateParams

Returns a new instance of ServiceActionCreateParams.



274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
# File 'lib/stripe/params/v2/billing/service_action_create_params.rb', line 274

def initialize(
  credit_grant: nil,
  credit_grant_per_tenant: nil,
  lookup_key: nil,
  service_interval: nil,
  service_interval_count: nil,
  type: nil
)
  @credit_grant = credit_grant
  @credit_grant_per_tenant = credit_grant_per_tenant
  @lookup_key = lookup_key
  @service_interval = service_interval
  @service_interval_count = service_interval_count
  @type = type
end

Instance Attribute Details

#credit_grantObject

Details for the credit grant. Required if ‘type` is `credit_grant`.



262
263
264
# File 'lib/stripe/params/v2/billing/service_action_create_params.rb', line 262

def credit_grant
  @credit_grant
end

#credit_grant_per_tenantObject

Details for the credit grant per tenant. Required if ‘type` is `credit_grant_per_tenant`.



264
265
266
# File 'lib/stripe/params/v2/billing/service_action_create_params.rb', line 264

def credit_grant_per_tenant
  @credit_grant_per_tenant
end

#lookup_keyObject

An internal key you can use to search for this service action. Maximum length of 200 characters.



266
267
268
# File 'lib/stripe/params/v2/billing/service_action_create_params.rb', line 266

def lookup_key
  @lookup_key
end

#service_intervalObject

The interval for assessing service.



268
269
270
# File 'lib/stripe/params/v2/billing/service_action_create_params.rb', line 268

def service_interval
  @service_interval
end

#service_interval_countObject

The length of the interval for assessing service.



270
271
272
# File 'lib/stripe/params/v2/billing/service_action_create_params.rb', line 270

def service_interval_count
  @service_interval_count
end

#typeObject

The type of the service action.



272
273
274
# File 'lib/stripe/params/v2/billing/service_action_create_params.rb', line 272

def type
  @type
end

Class Method Details

.field_encodingsObject



290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
# File 'lib/stripe/params/v2/billing/service_action_create_params.rb', line 290

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