lib/paddle/classic/resources/payments.rb in paddle-2.2.0 vs lib/paddle/classic/resources/payments.rb in paddle-2.2.1
- old
+ new
@@ -1,24 +1,22 @@
module Paddle
module Classic
class PaymentsResource < Resource
-
def list(**params)
response = post_request("2.0/subscription/payments", body: params)
Collection.from_response(response, type: Payment)
end
def reschedule(payment_id:, date:)
- attrs = {payment_id: payment_id, date: date}
+ attrs = { payment_id: payment_id, date: date }
response = post_request("2.0/subscription/payments_reschedule", body: attrs)
- return true if response.success?
+ true if response.success?
end
def refund(order_id:, **params)
- attrs = {order_id: order_id}
+ attrs = { order_id: order_id }
response = post_request("2.0/payment/refund", body: attrs.merge(params))
PaymentRefund.new(response.body["response"])
end
-
end
end
end