Class: Nombaone::Resources::SubscriptionDunning
- Inherits:
-
BaseResource
- Object
- BaseResource
- Nombaone::Resources::SubscriptionDunning
- Defined in:
- lib/nombaone/resources/subscriptions.rb,
sig/nombaone/resources.rbs
Overview
Read-only view into a subscription's recovery state
(nombaone.subscriptions.dunning).
Instance Method Summary collapse
-
#list_attempts(subscription_id, limit: OMIT, cursor: OMIT, request_options: {}) ⇒ Page<NombaObject>
List every recovery attempt, newest first.
-
#retrieve(subscription_id, request_options: {}) ⇒ NombaObject
Where the subscription stands in dunning.
Methods inherited from BaseResource
#encode, #initialize, #request, #request_page
Constructor Details
This class inherits a constructor from Nombaone::Resources::BaseResource
Instance Method Details
#list_attempts(subscription_id, limit: OMIT, cursor: OMIT, request_options: {}) ⇒ Page<NombaObject>
List every recovery attempt, newest first.
67 68 69 70 |
# File 'lib/nombaone/resources/subscriptions.rb', line 67 def list_attempts(subscription_id, limit: OMIT, cursor: OMIT, request_options: {}) request_page("/subscriptions/#{encode(subscription_id)}/dunning/attempts", query: { limit: limit, cursor: cursor }, options: ) end |
#retrieve(subscription_id, request_options: {}) ⇒ NombaObject
Where the subscription stands in dunning. Check grace_access_until
before cutting access — past_due usually means "not yet", not "no".
56 57 58 |
# File 'lib/nombaone/resources/subscriptions.rb', line 56 def retrieve(subscription_id, request_options: {}) request(:get, "/subscriptions/#{encode(subscription_id)}/dunning", options: ) end |