Class: WhopSDK::Resources::Disputes
- Inherits:
-
Object
- Object
- WhopSDK::Resources::Disputes
- Defined in:
- lib/whop_sdk/resources/disputes.rb
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>
Lists disputes the current actor has access to.
-
#retrieve(id, request_options: {}) ⇒ WhopSDK::Models::Dispute
Retrieves a Dispute by ID.
-
#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
Update a dispute with evidence data to attempt to win the dispute.
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.
181 182 183 |
# File 'lib/whop_sdk/resources/disputes.rb', line 181 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>
Lists disputes the current actor has access to
Required permissions:
-
‘payment:dispute:read`
-
‘plan:basic:read`
-
‘access_pass:basic:read`
-
‘company:basic:read`
-
‘payment:basic:read`
70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/whop_sdk/resources/disputes.rb', line 70 def list(params) parsed, = WhopSDK::DisputeListParams.dump_request(params) @client.request( method: :get, path: "disputes", query: parsed, page: WhopSDK::Internal::CursorPage, model: WhopSDK::Models::DisputeListResponse, options: ) end |
#retrieve(id, request_options: {}) ⇒ WhopSDK::Models::Dispute
Retrieves a Dispute by ID
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`
28 29 30 31 32 33 34 35 |
# File 'lib/whop_sdk/resources/disputes.rb', line 28 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`
108 109 110 111 112 113 114 115 |
# File 'lib/whop_sdk/resources/disputes.rb', line 108 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
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`
167 168 169 170 171 172 173 174 175 176 |
# File 'lib/whop_sdk/resources/disputes.rb', line 167 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 |