Class: WhopSDK::Resources::Disputes
- Inherits:
-
Object
- Object
- WhopSDK::Resources::Disputes
- Defined in:
- lib/whop_sdk/resources/disputes.rb
Overview
Disputes
Instance Method Summary collapse
-
#initialize(client:) ⇒ Disputes
constructor
private
A new instance of Disputes.
-
#list(company_id:, after: nil, before: nil, created_after: nil, created_before: nil, direction: nil, first: nil, last: nil, request_options: {}) ⇒ WhopSDK::Internal::CursorPage<WhopSDK::Models::DisputeListResponse>
Returns a paginated list of disputes for a company, with optional filtering by creation date.
-
#retrieve(id, request_options: {}) ⇒ WhopSDK::Models::Dispute
Retrieves the details of an existing dispute.
-
#submit_evidence(id, request_options: {}) ⇒ WhopSDK::Models::Dispute
Some parameter documentations has been truncated, see Models::DisputeSubmitEvidenceParams for more details.
-
#update_evidence(id, access_activity_log: nil, billing_address: nil, cancellation_policy_attachment: nil, cancellation_policy_disclosure: nil, customer_communication_attachment: nil, customer_email_address: nil, customer_name: nil, notes: nil, product_description: nil, refund_policy_attachment: nil, refund_policy_disclosure: nil, refund_refusal_explanation: nil, service_date: nil, uncategorized_attachment: nil, request_options: {}) ⇒ WhopSDK::Models::Dispute
Some parameter documentations has been truncated, see Models::DisputeUpdateEvidenceParams for more details.
Constructor Details
#initialize(client:) ⇒ Disputes
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 Disputes.
188 189 190 |
# File 'lib/whop_sdk/resources/disputes.rb', line 188 def initialize(client:) @client = client end |
Instance Method Details
#list(company_id:, after: nil, before: nil, created_after: nil, created_before: nil, direction: nil, first: nil, last: nil, request_options: {}) ⇒ WhopSDK::Internal::CursorPage<WhopSDK::Models::DisputeListResponse>
Returns a paginated list of disputes for a company, with optional filtering by creation date. A dispute represents a chargeback or inquiry filed by a customer against a payment.
Required permissions:
-
‘payment:dispute:read`
-
‘plan:basic:read`
-
‘access_pass:basic:read`
-
‘company:basic:read`
-
‘payment:basic:read`
73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/whop_sdk/resources/disputes.rb', line 73 def list(params) parsed, = WhopSDK::DisputeListParams.dump_request(params) query = WhopSDK::Internal::Util.encode_query_params(parsed) @client.request( method: :get, path: "disputes", query: query, page: WhopSDK::Internal::CursorPage, model: WhopSDK::Models::DisputeListResponse, options: ) end |
#retrieve(id, request_options: {}) ⇒ WhopSDK::Models::Dispute
Retrieves the details of an existing dispute.
Required permissions:
-
‘payment:dispute:read`
-
‘plan:basic:read`
-
‘access_pass:basic:read`
-
‘company:basic:read`
-
‘payment:basic:read`
-
‘member:email:read`
-
‘member:basic:read`
-
‘member:phone:read`
29 30 31 32 33 34 35 36 |
# File 'lib/whop_sdk/resources/disputes.rb', line 29 def retrieve(id, params = {}) @client.request( method: :get, path: ["disputes/%1$s", id], model: WhopSDK::Dispute, options: params[:request_options] ) end |
#submit_evidence(id, request_options: {}) ⇒ WhopSDK::Models::Dispute
Some parameter documentations has been truncated, see Models::DisputeSubmitEvidenceParams for more details.
Submit a payment dispute to the payment processor for review. Once submitted, no further edits can be made.
Required permissions:
-
‘payment:dispute`
-
‘plan:basic:read`
-
‘access_pass:basic:read`
-
‘company:basic:read`
-
‘payment:basic:read`
-
‘member:email:read`
-
‘member:basic:read`
-
‘member:phone:read`
112 113 114 115 116 117 118 119 |
# File 'lib/whop_sdk/resources/disputes.rb', line 112 def submit_evidence(id, params = {}) @client.request( method: :post, path: ["disputes/%1$s/submit_evidence", id], model: WhopSDK::Dispute, options: params[:request_options] ) end |
#update_evidence(id, access_activity_log: nil, billing_address: nil, cancellation_policy_attachment: nil, cancellation_policy_disclosure: nil, customer_communication_attachment: nil, customer_email_address: nil, customer_name: nil, notes: nil, product_description: nil, refund_policy_attachment: nil, refund_policy_disclosure: nil, refund_refusal_explanation: nil, service_date: nil, uncategorized_attachment: nil, request_options: {}) ⇒ WhopSDK::Models::Dispute
Some parameter documentations has been truncated, see Models::DisputeUpdateEvidenceParams for more details.
Update a dispute with evidence data to attempt to win the dispute.
Required permissions:
-
‘payment:dispute`
-
‘plan:basic:read`
-
‘access_pass:basic:read`
-
‘company:basic:read`
-
‘payment:basic:read`
-
‘member:email:read`
-
‘member:basic:read`
-
‘member:phone:read`
174 175 176 177 178 179 180 181 182 183 |
# File 'lib/whop_sdk/resources/disputes.rb', line 174 def update_evidence(id, params = {}) parsed, = WhopSDK::DisputeUpdateEvidenceParams.dump_request(params) @client.request( method: :post, path: ["disputes/%1$s/update_evidence", id], body: parsed, model: WhopSDK::Dispute, options: ) end |