Class: Whatsapp::Webhook::Status::Pricing
- Inherits:
-
Object
- Object
- Whatsapp::Webhook::Status::Pricing
- Defined in:
- lib/ruby/whatsapp/webhook/status/pricing.rb
Overview
The billing details attached to a status update.
Instance Attribute Summary collapse
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(billable:, pricing_model:, category:) ⇒ Pricing
constructor
A new instance of Pricing.
Constructor Details
#initialize(billable:, pricing_model:, category:) ⇒ Pricing
Returns a new instance of Pricing.
20 21 22 23 24 |
# File 'lib/ruby/whatsapp/webhook/status/pricing.rb', line 20 def initialize(billable:, pricing_model:, category:) @billable = billable @pricing_model = pricing_model @category = category end |
Instance Attribute Details
#billable ⇒ Boolean?
10 11 12 |
# File 'lib/ruby/whatsapp/webhook/status/pricing.rb', line 10 def billable @billable end |
#category ⇒ String?
Returns e.g. "service", "marketing", "utility", "authentication".
18 19 20 |
# File 'lib/ruby/whatsapp/webhook/status/pricing.rb', line 18 def category @category end |
#pricing_model ⇒ String?
14 15 16 |
# File 'lib/ruby/whatsapp/webhook/status/pricing.rb', line 14 def pricing_model @pricing_model end |
Class Method Details
.deserialize(data) ⇒ Pricing
29 30 31 32 33 |
# File 'lib/ruby/whatsapp/webhook/status/pricing.rb', line 29 def deserialize(data) data ||= {} new(billable: data["billable"], pricing_model: data["pricing_model"], category: data["category"]) end |