Class: Webhookdb::Subscription::Status
- Inherits:
-
Object
- Object
- Webhookdb::Subscription::Status
- Defined in:
- lib/webhookdb/subscription.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Instance Method Summary collapse
- #as_json(*_o) ⇒ Object
- #display_headers ⇒ Object
-
#initialize(**kw) ⇒ Status
constructor
A new instance of Status.
- #message ⇒ Object
Constructor Details
#initialize(**kw) ⇒ Status
Returns a new instance of Status.
127 128 129 |
# File 'lib/webhookdb/subscription.rb', line 127 def initialize(**kw) @data = kw end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
125 126 127 |
# File 'lib/webhookdb/subscription.rb', line 125 def data @data end |
Instance Method Details
#as_json(*_o) ⇒ Object
146 147 148 |
# File 'lib/webhookdb/subscription.rb', line 146 def as_json(*_o) return @data.merge(message: self., display_headers: self.display_headers) end |
#display_headers ⇒ Object
131 132 133 134 135 136 137 138 139 140 |
# File 'lib/webhookdb/subscription.rb', line 131 def display_headers return [ [:organization_formatted, "Organization"], [:billing_email, "Billing email"], [:plan_name, "Plan name"], [:integrations_used_formatted, "Integrations used"], [:integrations_remaining_formatted, "Integrations left"], [:sub_status, "Status"], ] end |
#message ⇒ Object
142 143 144 |
# File 'lib/webhookdb/subscription.rb', line 142 def return "Use `webhookdb subscription edit` to set up or modify your subscription." end |