Class: Stripe::V2::Billing::ServiceAction

Inherits:
APIResource show all
Defined in:
lib/stripe/resources/v2/billing/service_action.rb

Overview

Service Actions represent actions applied during service assessment periods, such as granting credits to a customer.

Defined Under Namespace

Classes: CreditGrant, CreditGrantPerTenant

Constant Summary collapse

OBJECT_NAME =
"v2.billing.service_action"

Constants inherited from StripeObject

StripeObject::RESERVED_FIELD_NAMES

Instance Attribute Summary collapse

Attributes inherited from APIResource

#save_with_parent

Attributes inherited from StripeObject

#last_response

Class Method Summary collapse

Methods inherited from APIResource

class_name, custom_method, #refresh, #request_stripe_object, resource_url, #resource_url, retrieve, save_nested_resource

Methods included from APIOperations::Request

included

Methods inherited from StripeObject

#==, #[], #[]=, #_get_inner_class_type, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, #hash, #initialize, #inspect, #keys, #marshal_dump, #marshal_load, protected_fields, #serialize_params, #to_hash, #to_json, #to_s, #update_attributes, #values

Constructor Details

This class inherits a constructor from Stripe::StripeObject

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Stripe::StripeObject

Instance Attribute Details

#createdObject (readonly)

Timestamp of when the object was created.



242
243
244
# File 'lib/stripe/resources/v2/billing/service_action.rb', line 242

def created
  @created
end

#credit_grantObject (readonly)

Details for the credit grant. Provided only if ‘type` is “credit_grant”.



258
259
260
# File 'lib/stripe/resources/v2/billing/service_action.rb', line 258

def credit_grant
  @credit_grant
end

#credit_grant_per_tenantObject (readonly)

Details for the credit grant per tenant. Provided only if ‘type` is “credit_grant_per_tenant”.



260
261
262
# File 'lib/stripe/resources/v2/billing/service_action.rb', line 260

def credit_grant_per_tenant
  @credit_grant_per_tenant
end

#idObject (readonly)

Unique identifier for the object.



244
245
246
# File 'lib/stripe/resources/v2/billing/service_action.rb', line 244

def id
  @id
end

#livemodeObject (readonly)

Has the value ‘true` if the object exists in live mode or the value `false` if the object exists in test mode.



256
257
258
# File 'lib/stripe/resources/v2/billing/service_action.rb', line 256

def livemode
  @livemode
end

#lookup_keyObject (readonly)

An internal key you can use to search for this service action.



246
247
248
# File 'lib/stripe/resources/v2/billing/service_action.rb', line 246

def lookup_key
  @lookup_key
end

#objectObject (readonly)

String representing the object’s type. Objects of the same type share the same value of the object field.



248
249
250
# File 'lib/stripe/resources/v2/billing/service_action.rb', line 248

def object
  @object
end

#service_intervalObject (readonly)

The interval for assessing service.



250
251
252
# File 'lib/stripe/resources/v2/billing/service_action.rb', line 250

def service_interval
  @service_interval
end

#service_interval_countObject (readonly)

The length of the interval for assessing service.



252
253
254
# File 'lib/stripe/resources/v2/billing/service_action.rb', line 252

def service_interval_count
  @service_interval_count
end

#typeObject (readonly)

The type of the service action.



254
255
256
# File 'lib/stripe/resources/v2/billing/service_action.rb', line 254

def type
  @type
end

Class Method Details

.field_remappingsObject



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

def self.field_remappings
  @field_remappings = {}
end

.inner_class_typesObject



262
263
264
265
266
267
# File 'lib/stripe/resources/v2/billing/service_action.rb', line 262

def self.inner_class_types
  @inner_class_types = {
    credit_grant: CreditGrant,
    credit_grant_per_tenant: CreditGrantPerTenant,
  }
end

.object_nameObject



10
11
12
# File 'lib/stripe/resources/v2/billing/service_action.rb', line 10

def self.object_name
  "v2.billing.service_action"
end