Class: WhopSDK::Resources::Refunds
- Inherits:
-
Object
- Object
- WhopSDK::Resources::Refunds
- Defined in:
- lib/whop_sdk/resources/refunds.rb
Instance Method Summary collapse
-
#initialize(client:) ⇒ Refunds
constructor
private
A new instance of Refunds.
-
#list(payment_id: , after: nil, before: nil, created_after: nil, created_before: nil, direction: nil, first: nil, last: nil, request_options: {}) ⇒ WhopSDK::Internal::CursorPage<WhopSDK::Models::RefundListResponse>
Lists Refunds for a payment.
-
#retrieve(id, request_options: {}) ⇒ WhopSDK::Models::RefundRetrieveResponse
Retrieves a Refund by ID.
Constructor Details
#initialize(client:) ⇒ Refunds
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 Refunds.
77 78 79 |
# File 'lib/whop_sdk/resources/refunds.rb', line 77 def initialize(client:) @client = client end |
Instance Method Details
#list(payment_id: , after: nil, before: nil, created_after: nil, created_before: nil, direction: nil, first: nil, last: nil, request_options: {}) ⇒ WhopSDK::Internal::CursorPage<WhopSDK::Models::RefundListResponse>
Lists Refunds for a payment.
Required permissions:
-
‘payment:basic:read`
62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/whop_sdk/resources/refunds.rb', line 62 def list(params) parsed, = WhopSDK::RefundListParams.dump_request(params) @client.request( method: :get, path: "refunds", query: parsed, page: WhopSDK::Internal::CursorPage, model: WhopSDK::Models::RefundListResponse, options: ) end |
#retrieve(id, request_options: {}) ⇒ WhopSDK::Models::RefundRetrieveResponse
Retrieves a Refund by ID
Required permissions:
-
‘payment:basic:read`
-
‘member:email:read`
-
‘member:basic:read`
-
‘member:phone:read`
24 25 26 27 28 29 30 31 |
# File 'lib/whop_sdk/resources/refunds.rb', line 24 def retrieve(id, params = {}) @client.request( method: :get, path: ["refunds/%1$s", id], model: WhopSDK::Models::RefundRetrieveResponse, options: params[:request_options] ) end |