Class: Airwallex::Dispute
- Inherits:
-
APIResource
- Object
- APIResource
- Airwallex::Dispute
- Extended by:
- APIOperations::List, APIOperations::Retrieve
- Defined in:
- lib/airwallex/resources/dispute.rb
Overview
Dispute resource for handling chargebacks and payment disputes
Disputes represent chargebacks or payment disputes initiated by cardholders. Merchants can view disputes, submit evidence to challenge them, or accept them.
Instance Attribute Summary
Attributes inherited from APIResource
Class Method Summary collapse
Instance Method Summary collapse
-
#accept ⇒ Airwallex::Dispute
Accept a dispute without challenging it.
-
#submit_evidence(evidence) ⇒ Airwallex::Dispute
Submit evidence to challenge a dispute.
Methods included from APIOperations::Retrieve
Methods included from APIOperations::List
Methods inherited from APIResource
#changed_attributes, #dirty?, #initialize, #inspect, #method_missing, #refresh, #refresh_from, resource_name, #respond_to_missing?, #to_hash, #to_json, #to_s
Constructor Details
This class inherits a constructor from Airwallex::APIResource
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Airwallex::APIResource
Class Method Details
.resource_path ⇒ Object
30 31 32 |
# File 'lib/airwallex/resources/dispute.rb', line 30 def self.resource_path "/api/v1/disputes" end |
Instance Method Details
#accept ⇒ Airwallex::Dispute
Accept a dispute without challenging it
37 38 39 40 41 |
# File 'lib/airwallex/resources/dispute.rb', line 37 def accept response = Airwallex.client.post("#{resource_path}/#{id}/accept", {}) refresh_from(response) self end |
#submit_evidence(evidence) ⇒ Airwallex::Dispute
Submit evidence to challenge a dispute
56 57 58 59 60 |
# File 'lib/airwallex/resources/dispute.rb', line 56 def submit_evidence(evidence) response = Airwallex.client.post("#{resource_path}/#{id}/evidence", evidence) refresh_from(response) self end |