Class: Stripe::SubscriptionItemUsageRecordService::CreateParams
- Inherits:
-
RequestParams
- Object
- RequestParams
- Stripe::SubscriptionItemUsageRecordService::CreateParams
- Defined in:
- lib/stripe/services/subscription_item_usage_record_service.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
Valid values are ‘increment` (default) or `set`.
-
#expand ⇒ Object
Specifies which fields in the response should be expanded.
-
#quantity ⇒ Object
The usage quantity for the specified timestamp.
-
#timestamp ⇒ Object
The timestamp for the usage event.
Instance Method Summary collapse
-
#initialize(action: nil, expand: nil, quantity: nil, timestamp: nil) ⇒ CreateParams
constructor
A new instance of CreateParams.
Methods inherited from RequestParams
Constructor Details
#initialize(action: nil, expand: nil, quantity: nil, timestamp: nil) ⇒ CreateParams
Returns a new instance of CreateParams.
16 17 18 19 20 21 |
# File 'lib/stripe/services/subscription_item_usage_record_service.rb', line 16 def initialize(action: nil, expand: nil, quantity: nil, timestamp: nil) @action = action @expand = @quantity = quantity @timestamp = end |
Instance Attribute Details
#action ⇒ Object
Valid values are ‘increment` (default) or `set`. When using `increment` the specified `quantity` will be added to the usage at the specified timestamp. The `set` action will overwrite the usage quantity at that timestamp. If the subscription has [billing thresholds](stripe.com/docs/api/subscriptions/object#subscription_object-billing_thresholds), `increment` is the only allowed value.
8 9 10 |
# File 'lib/stripe/services/subscription_item_usage_record_service.rb', line 8 def action @action end |
#expand ⇒ Object
Specifies which fields in the response should be expanded.
10 11 12 |
# File 'lib/stripe/services/subscription_item_usage_record_service.rb', line 10 def @expand end |
#quantity ⇒ Object
The usage quantity for the specified timestamp.
12 13 14 |
# File 'lib/stripe/services/subscription_item_usage_record_service.rb', line 12 def quantity @quantity end |
#timestamp ⇒ Object
The timestamp for the usage event. This timestamp must be within the current billing period of the subscription of the provided ‘subscription_item`, and must not be in the future. When passing `“now”`, Stripe records usage for the current time. Default is `“now”` if a value is not provided.
14 15 16 |
# File 'lib/stripe/services/subscription_item_usage_record_service.rb', line 14 def @timestamp end |