lib/paddle/models/subscription.rb in paddle-2.0.0 vs lib/paddle/models/subscription.rb in paddle-2.1.0
- old
+ new
@@ -6,11 +6,12 @@
def list(**params)
response = Client.get_request("subscriptions", params: params)
Collection.from_response(response, type: Subscription)
end
- def retrieve(id:)
- response = Client.get_request("subscriptions/#{id}")
+ def retrieve(id:, extra: nil)
+ params = extra ? {include: extra} : {}
+ response = Client.get_request("subscriptions/#{id}", params: params)
Subscription.new(response.body["data"])
end
def get_transaction(id:)
response = Client.get_request("subscriptions/#{id}/update-payment-method-transaction")