Class: Orb::Resources::Coupons::Subscriptions
- Inherits:
-
Object
- Object
- Orb::Resources::Coupons::Subscriptions
- Defined in:
- lib/orb/resources/coupons/subscriptions.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ Subscriptions
constructor
private
A new instance of Subscriptions.
-
#list(coupon_id, cursor: nil, limit: nil, request_options: {}) ⇒ Orb::Internal::Page<Orb::Models::Subscription>
Some parameter documentations has been truncated, see Models::Coupons::SubscriptionListParams for more details.
Constructor Details
#initialize(client:) ⇒ Subscriptions
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Subscriptions.
43 44 45 |
# File 'lib/orb/resources/coupons/subscriptions.rb', line 43 def initialize(client:) @client = client end |
Instance Method Details
#list(coupon_id, cursor: nil, limit: nil, request_options: {}) ⇒ Orb::Internal::Page<Orb::Models::Subscription>
Some parameter documentations has been truncated, see Models::Coupons::SubscriptionListParams for more details.
This endpoint returns a list of all subscriptions that have redeemed a given coupon as a [paginated](/api-reference/pagination) list, ordered starting from the most recently created subscription. For a full discussion of the subscription resource, see [Subscription](/core-concepts#subscription).
28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/orb/resources/coupons/subscriptions.rb', line 28 def list(coupon_id, params = {}) parsed, = Orb::Coupons::SubscriptionListParams.dump_request(params) @client.request( method: :get, path: ["coupons/%1$s/subscriptions", coupon_id], query: parsed, page: Orb::Internal::Page, model: Orb::Subscription, options: ) end |