Sha256: 8322590994ff2a49db28a5abc99d8c846c18dc6cce7d9d18ae906461ae1fe64e
Contents?: true
Size: 703 Bytes
Versions: 9
Compression:
Stored size: 703 Bytes
Contents
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 } response = post_request("2.0/subscription/payments_reschedule", body: attrs) true if response.success? end def refund(order_id:, **params) 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
Version data entries
9 entries across 9 versions & 1 rubygems