Class: Stripe::Billing::AlertNotification
- Inherits:
-
APIResource
- Object
- StripeObject
- APIResource
- Stripe::Billing::AlertNotification
- Defined in:
- lib/stripe/resources/billing/alert_notification.rb
Constant Summary collapse
- OBJECT_NAME =
"billing.alert_notification"
Constants inherited from StripeObject
StripeObject::RESERVED_FIELD_NAMES
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Whether the alert was triggered or recovered.
-
#aggregation_period_end ⇒ Object
readonly
End of the aggregation period for which this notification was sent.
-
#aggregation_period_start ⇒ Object
readonly
Start of the aggregation period for which this notification was sent.
-
#alert ⇒ Object
readonly
ID of the billing alert that generated this notification.
-
#alert_type ⇒ Object
readonly
The type of billing alert that generated this notification.
-
#cadence ⇒ Object
readonly
The billing cadence associated with this notification.
-
#currency ⇒ Object
readonly
Three-letter ISO currency code for the value, in lowercase.
-
#custom_pricing_unit ⇒ Object
readonly
Custom pricing unit for the threshold value.
-
#customer ⇒ Object
readonly
ID of the customer for which the alert notification was sent.
-
#id ⇒ Object
readonly
Unique identifier for the object.
-
#livemode ⇒ Object
readonly
If the object exists in live mode, the value is
true. -
#meter ⇒ Object
readonly
ID of the billing meter associated with this notification.
-
#notification_event ⇒ Object
readonly
ID of the event delivered for this notification.
-
#notified_at ⇒ Object
readonly
Time at which the notification was sent.
-
#object ⇒ Object
readonly
String representing the object's type.
-
#subscription ⇒ Object
readonly
ID of the subscription associated with this notification.
-
#value ⇒ Object
readonly
The value that triggered the alert.
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?, field_encodings, #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
#action ⇒ Object (readonly)
Whether the alert was triggered or recovered.
13 14 15 |
# File 'lib/stripe/resources/billing/alert_notification.rb', line 13 def action @action end |
#aggregation_period_end ⇒ Object (readonly)
End of the aggregation period for which this notification was sent. Only present for usage threshold alerts.
15 16 17 |
# File 'lib/stripe/resources/billing/alert_notification.rb', line 15 def aggregation_period_end @aggregation_period_end end |
#aggregation_period_start ⇒ Object (readonly)
Start of the aggregation period for which this notification was sent. Only present for usage threshold alerts.
17 18 19 |
# File 'lib/stripe/resources/billing/alert_notification.rb', line 17 def aggregation_period_start @aggregation_period_start end |
#alert ⇒ Object (readonly)
ID of the billing alert that generated this notification.
19 20 21 |
# File 'lib/stripe/resources/billing/alert_notification.rb', line 19 def alert @alert end |
#alert_type ⇒ Object (readonly)
The type of billing alert that generated this notification.
21 22 23 |
# File 'lib/stripe/resources/billing/alert_notification.rb', line 21 def alert_type @alert_type end |
#cadence ⇒ Object (readonly)
The billing cadence associated with this notification. Only present for spend threshold alerts grouped by billing cadence.
23 24 25 |
# File 'lib/stripe/resources/billing/alert_notification.rb', line 23 def cadence @cadence end |
#currency ⇒ Object (readonly)
Three-letter ISO currency code for the value, in lowercase. Only present for spend and credit balance threshold alerts.
25 26 27 |
# File 'lib/stripe/resources/billing/alert_notification.rb', line 25 def currency @currency end |
#custom_pricing_unit ⇒ Object (readonly)
Custom pricing unit for the threshold value
27 28 29 |
# File 'lib/stripe/resources/billing/alert_notification.rb', line 27 def custom_pricing_unit @custom_pricing_unit end |
#customer ⇒ Object (readonly)
ID of the customer for which the alert notification was sent.
29 30 31 |
# File 'lib/stripe/resources/billing/alert_notification.rb', line 29 def customer @customer end |
#id ⇒ Object (readonly)
Unique identifier for the object.
31 32 33 |
# File 'lib/stripe/resources/billing/alert_notification.rb', line 31 def id @id end |
#livemode ⇒ Object (readonly)
If the object exists in live mode, the value is true. If the object exists in test mode, the value is false.
33 34 35 |
# File 'lib/stripe/resources/billing/alert_notification.rb', line 33 def livemode @livemode end |
#meter ⇒ Object (readonly)
ID of the billing meter associated with this notification. Only present for usage threshold alerts.
35 36 37 |
# File 'lib/stripe/resources/billing/alert_notification.rb', line 35 def meter @meter end |
#notification_event ⇒ Object (readonly)
ID of the event delivered for this notification. Retrievable via the Events API for a limited time; for long-term audit scenarios, capture the full event payload at webhook delivery time.
37 38 39 |
# File 'lib/stripe/resources/billing/alert_notification.rb', line 37 def notification_event @notification_event end |
#notified_at ⇒ Object (readonly)
Time at which the notification was sent. Measured in seconds since the Unix epoch.
39 40 41 |
# File 'lib/stripe/resources/billing/alert_notification.rb', line 39 def notified_at @notified_at end |
#object ⇒ Object (readonly)
String representing the object's type. Objects of the same type share the same value.
41 42 43 |
# File 'lib/stripe/resources/billing/alert_notification.rb', line 41 def object @object end |
#subscription ⇒ Object (readonly)
ID of the subscription associated with this notification. Only present for spend threshold alerts grouped by subscription.
43 44 45 |
# File 'lib/stripe/resources/billing/alert_notification.rb', line 43 def subscription @subscription end |
#value ⇒ Object (readonly)
The value that triggered the alert. This may be a decimal string for custom pricing unit alerts. For usage threshold alerts, this is the meter event count. For credit balance and spend threshold alerts, this is the amount in the smallest currency unit.
45 46 47 |
# File 'lib/stripe/resources/billing/alert_notification.rb', line 45 def value @value end |
Class Method Details
.field_remappings ⇒ Object
51 52 53 |
# File 'lib/stripe/resources/billing/alert_notification.rb', line 51 def self.field_remappings @field_remappings = {} end |
.inner_class_types ⇒ Object
47 48 49 |
# File 'lib/stripe/resources/billing/alert_notification.rb', line 47 def self.inner_class_types @inner_class_types = {} end |
.object_name ⇒ Object
8 9 10 |
# File 'lib/stripe/resources/billing/alert_notification.rb', line 8 def self.object_name "billing.alert_notification" end |