lib/paddle/models/transaction.rb in paddle-2.0.0 vs lib/paddle/models/transaction.rb in paddle-2.1.0
- old
+ new
@@ -12,11 +12,12 @@
attrs = {items: items}
response = Client.post_request("transactions", body: attrs.merge(params))
Transaction.new(response.body["data"])
end
- def retrieve(id:)
- response = Client.get_request("transactions/#{id}")
+ def retrieve(id:, extra: nil)
+ params = extra ? {include: extra} : {}
+ response = Client.get_request("transactions/#{id}", params: params)
Transaction.new(response.body["data"])
end
def update(id:, **params)
response = Client.patch_request("transactions/#{id}", body: params)