Class: Dodopayments::Resources::Invoices::Payments
- Inherits:
-
Object
- Object
- Dodopayments::Resources::Invoices::Payments
- Defined in:
- lib/dodopayments/resources/invoices/payments.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ Payments
constructor
private
A new instance of Payments.
- #retrieve(payment_id, request_options: {}) ⇒ StringIO
- #retrieve_refund(refund_id, request_options: {}) ⇒ StringIO
Constructor Details
#initialize(client:) ⇒ Payments
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 Payments.
46 47 48 |
# File 'lib/dodopayments/resources/invoices/payments.rb', line 46 def initialize(client:) @client = client end |
Instance Method Details
#retrieve(payment_id, request_options: {}) ⇒ StringIO
15 16 17 18 19 20 21 22 23 |
# File 'lib/dodopayments/resources/invoices/payments.rb', line 15 def retrieve(payment_id, params = {}) @client.request( method: :get, path: ["invoices/payments/%1$s", payment_id], headers: {"accept" => "application/pdf"}, model: StringIO, options: params[:request_options] ) end |
#retrieve_refund(refund_id, request_options: {}) ⇒ StringIO
33 34 35 36 37 38 39 40 41 |
# File 'lib/dodopayments/resources/invoices/payments.rb', line 33 def retrieve_refund(refund_id, params = {}) @client.request( method: :get, path: ["invoices/refunds/%1$s", refund_id], headers: {"accept" => "application/pdf"}, model: StringIO, options: params[:request_options] ) end |