Class: Stripe::V2::Billing::ServiceAction
- Inherits:
-
APIResource
- Object
- StripeObject
- APIResource
- Stripe::V2::Billing::ServiceAction
- 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
-
#created ⇒ Object
readonly
Timestamp of when the object was created.
-
#credit_grant ⇒ Object
readonly
Details for the credit grant.
-
#credit_grant_per_tenant ⇒ Object
readonly
Details for the credit grant per tenant.
-
#id ⇒ Object
readonly
Unique identifier for the object.
-
#livemode ⇒ Object
readonly
Has the value ‘true` if the object exists in live mode or the value `false` if the object exists in test mode.
-
#lookup_key ⇒ Object
readonly
An internal key you can use to search for this service action.
-
#object ⇒ Object
readonly
String representing the object’s type.
-
#service_interval ⇒ Object
readonly
The interval for assessing service.
-
#service_interval_count ⇒ Object
readonly
The length of the interval for assessing service.
-
#type ⇒ Object
readonly
The type of the service action.
Attributes inherited from APIResource
Attributes inherited from StripeObject
Class Method Summary collapse
- .field_encodings ⇒ Object
- .field_remappings ⇒ Object
- .inner_class_types ⇒ Object
- .object_name ⇒ Object
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
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
#created ⇒ Object (readonly)
Timestamp of when the object was created.
250 251 252 |
# File 'lib/stripe/resources/v2/billing/service_action.rb', line 250 def created @created end |
#credit_grant ⇒ Object (readonly)
Details for the credit grant. Provided only if ‘type` is “credit_grant”.
252 253 254 |
# File 'lib/stripe/resources/v2/billing/service_action.rb', line 252 def credit_grant @credit_grant end |
#credit_grant_per_tenant ⇒ Object (readonly)
Details for the credit grant per tenant. Provided only if ‘type` is “credit_grant_per_tenant”.
254 255 256 |
# File 'lib/stripe/resources/v2/billing/service_action.rb', line 254 def credit_grant_per_tenant @credit_grant_per_tenant end |
#id ⇒ Object (readonly)
Unique identifier for the object.
256 257 258 |
# File 'lib/stripe/resources/v2/billing/service_action.rb', line 256 def id @id end |
#livemode ⇒ Object (readonly)
Has the value ‘true` if the object exists in live mode or the value `false` if the object exists in test mode.
258 259 260 |
# File 'lib/stripe/resources/v2/billing/service_action.rb', line 258 def livemode @livemode end |
#lookup_key ⇒ Object (readonly)
An internal key you can use to search for this service action.
260 261 262 |
# File 'lib/stripe/resources/v2/billing/service_action.rb', line 260 def lookup_key @lookup_key end |
#object ⇒ Object (readonly)
String representing the object’s type. Objects of the same type share the same value of the object field.
262 263 264 |
# File 'lib/stripe/resources/v2/billing/service_action.rb', line 262 def object @object end |
#service_interval ⇒ Object (readonly)
The interval for assessing service.
264 265 266 |
# File 'lib/stripe/resources/v2/billing/service_action.rb', line 264 def service_interval @service_interval end |
#service_interval_count ⇒ Object (readonly)
The length of the interval for assessing service.
266 267 268 |
# File 'lib/stripe/resources/v2/billing/service_action.rb', line 266 def service_interval_count @service_interval_count end |
#type ⇒ Object (readonly)
The type of the service action.
268 269 270 |
# File 'lib/stripe/resources/v2/billing/service_action.rb', line 268 def type @type end |
Class Method Details
.field_encodings ⇒ Object
281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 |
# File 'lib/stripe/resources/v2/billing/service_action.rb', line 281 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 |
.field_remappings ⇒ Object
277 278 279 |
# File 'lib/stripe/resources/v2/billing/service_action.rb', line 277 def self.field_remappings @field_remappings = {} end |
.inner_class_types ⇒ Object
270 271 272 273 274 275 |
# File 'lib/stripe/resources/v2/billing/service_action.rb', line 270 def self.inner_class_types @inner_class_types = { credit_grant: CreditGrant, credit_grant_per_tenant: CreditGrantPerTenant, } end |
.object_name ⇒ Object
10 11 12 |
# File 'lib/stripe/resources/v2/billing/service_action.rb', line 10 def self.object_name "v2.billing.service_action" end |