Class: Tarpon::Request::Subscriber::Entitlement
- Defined in:
- lib/tarpon/request/subscriber/entitlement.rb
Constant Summary
Constants inherited from Base
Instance Method Summary collapse
- #grant_promotional(duration:, start_time_ms: nil) ⇒ Object
-
#initialize(subscriber_path:, entitlement_identifier:, **opts) ⇒ Entitlement
constructor
A new instance of Entitlement.
- #revoke_promotional ⇒ Object
Constructor Details
#initialize(subscriber_path:, entitlement_identifier:, **opts) ⇒ Entitlement
Returns a new instance of Entitlement.
7 8 9 10 11 |
# File 'lib/tarpon/request/subscriber/entitlement.rb', line 7 def initialize(subscriber_path:, entitlement_identifier:, **opts) super(**opts) @subscriber_path = subscriber_path @entitlement_identifier = entitlement_identifier end |
Instance Method Details
#grant_promotional(duration:, start_time_ms: nil) ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/tarpon/request/subscriber/entitlement.rb', line 13 def grant_promotional(duration:, start_time_ms: nil) body = { duration: duration, start_time_ms: start_time_ms } perform(method: :post, path: "#{path}/promotional", key: :secret, body: body) end |
#revoke_promotional ⇒ Object
22 23 24 |
# File 'lib/tarpon/request/subscriber/entitlement.rb', line 22 def revoke_promotional perform(method: :post, path: "#{path}/revoke_promotionals", key: :secret) end |