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
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.
242 243 244 |
# File 'lib/stripe/resources/v2/billing/service_action.rb', line 242 def created @created end |
#credit_grant ⇒ Object (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_tenant ⇒ Object (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 |
#id ⇒ Object (readonly)
Unique identifier for the object.
244 245 246 |
# File 'lib/stripe/resources/v2/billing/service_action.rb', line 244 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.
256 257 258 |
# File 'lib/stripe/resources/v2/billing/service_action.rb', line 256 def livemode @livemode end |
#lookup_key ⇒ Object (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 |
#object ⇒ Object (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_interval ⇒ Object (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_count ⇒ Object (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 |
#type ⇒ Object (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_remappings ⇒ Object
269 270 271 |
# File 'lib/stripe/resources/v2/billing/service_action.rb', line 269 def self.field_remappings @field_remappings = {} end |
.inner_class_types ⇒ Object
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_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 |