Class: Pago::V2026_04::Models::Dispute
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Overview
Schema representing a dispute.
A dispute is a challenge raised by a customer or their bank regarding a payment.
Constant Summary collapse
- JSON_KEYS =
{ created_at: "created_at", modified_at: "modified_at", id: "id", status: "status", resolved: "resolved", closed: "closed", amount: "amount", tax_amount: "tax_amount", currency: "currency", reason: "reason", evidence_due_by: "evidence_due_by", past_due: "past_due", order_id: "order_id", payment_id: "payment_id", customer: "customer", case_id: "case_id" }.freeze
- REQUIRED_KEYS =
["created_at", "modified_at", "id", "status", "resolved", "closed", "amount", "tax_amount", "currency", "reason", "evidence_due_by", "past_due", "order_id", "payment_id", "customer", "case_id"].freeze
Instance Attribute Summary collapse
-
#amount ⇒ Integer
readonly
Amount in cents disputed.
-
#case_id ⇒ String?
readonly
The ID of the support case for this dispute, if one was opened.
-
#closed ⇒ Boolean
readonly
Whether the dispute is closed (prevented, won, or lost).
-
#created_at ⇒ String
readonly
Creation timestamp of the object.
-
#currency ⇒ String
readonly
Currency code of the dispute.
- #customer ⇒ Models::DisputeCustomer readonly
-
#evidence_due_by ⇒ String?
readonly
Deadline to submit evidence in response to the dispute.
-
#id ⇒ String
readonly
The ID of the object.
-
#modified_at ⇒ String?
readonly
Last modification timestamp of the object.
-
#order_id ⇒ String
readonly
The ID of the order associated with the dispute.
-
#past_due ⇒ Boolean
readonly
Whether the evidence submission deadline has passed.
-
#payment_id ⇒ String
readonly
The ID of the payment associated with the dispute.
-
#reason ⇒ String?
readonly
The reason for the dispute as reported by the card network (e.g.
fraudulent,product_not_received). -
#resolved ⇒ Boolean
readonly
Whether the dispute has been resolved (won or lost).
- #status ⇒ String readonly
-
#tax_amount ⇒ Integer
readonly
Tax amount in cents disputed.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(created_at:, modified_at:, id:, status:, resolved:, closed:, amount:, tax_amount:, currency:, reason:, evidence_due_by:, past_due:, order_id:, payment_id:, customer:, case_id:) ⇒ Dispute
constructor
A new instance of Dispute.
Methods inherited from Model
#==, #[], #field_set?, #hash, #inspect, json_keys, required_json_keys, #to_json, #to_json_hash, wrap_raw
Constructor Details
#initialize(created_at:, modified_at:, id:, status:, resolved:, closed:, amount:, tax_amount:, currency:, reason:, evidence_due_by:, past_due:, order_id:, payment_id:, customer:, case_id:) ⇒ Dispute
Returns a new instance of Dispute.
24215 24216 24217 24218 24219 24220 24221 24222 24223 24224 24225 24226 24227 24228 24229 24230 24231 24232 24233 24234 24235 24236 24237 24238 24239 24240 24241 24242 24243 24244 24245 24246 24247 24248 24249 24250 |
# File 'lib/pago/v2026_04/models.rb', line 24215 def initialize( created_at:, modified_at:, id:, status:, resolved:, closed:, amount:, tax_amount:, currency:, reason:, evidence_due_by:, past_due:, order_id:, payment_id:, customer:, case_id: ) super() assign(:created_at, created_at) assign(:modified_at, modified_at) assign(:id, id) assign(:status, status) assign(:resolved, resolved) assign(:closed, closed) assign(:amount, amount) assign(:tax_amount, tax_amount) assign(:currency, currency) assign(:reason, reason) assign(:evidence_due_by, evidence_due_by) assign(:past_due, past_due) assign(:order_id, order_id) assign(:payment_id, payment_id) assign(:customer, customer) assign(:case_id, case_id) end |
Instance Attribute Details
#amount ⇒ Integer (readonly)
Amount in cents disputed.
24178 24179 24180 |
# File 'lib/pago/v2026_04/models.rb', line 24178 def amount @amount end |
#case_id ⇒ String? (readonly)
The ID of the support case for this dispute, if one was opened.
24213 24214 24215 |
# File 'lib/pago/v2026_04/models.rb', line 24213 def case_id @case_id end |
#closed ⇒ Boolean (readonly)
Whether the dispute is closed (prevented, won, or lost).
24174 24175 24176 |
# File 'lib/pago/v2026_04/models.rb', line 24174 def closed @closed end |
#created_at ⇒ String (readonly)
Creation timestamp of the object.
24155 24156 24157 |
# File 'lib/pago/v2026_04/models.rb', line 24155 def created_at @created_at end |
#currency ⇒ String (readonly)
Currency code of the dispute.
24186 24187 24188 |
# File 'lib/pago/v2026_04/models.rb', line 24186 def currency @currency end |
#customer ⇒ Models::DisputeCustomer (readonly)
24209 24210 24211 |
# File 'lib/pago/v2026_04/models.rb', line 24209 def customer @customer end |
#evidence_due_by ⇒ String? (readonly)
Deadline to submit evidence in response to the dispute. None when no response is required.
24194 24195 24196 |
# File 'lib/pago/v2026_04/models.rb', line 24194 def evidence_due_by @evidence_due_by end |
#id ⇒ String (readonly)
The ID of the object.
24163 24164 24165 |
# File 'lib/pago/v2026_04/models.rb', line 24163 def id @id end |
#modified_at ⇒ String? (readonly)
Last modification timestamp of the object.
24159 24160 24161 |
# File 'lib/pago/v2026_04/models.rb', line 24159 def modified_at @modified_at end |
#order_id ⇒ String (readonly)
The ID of the order associated with the dispute.
24202 24203 24204 |
# File 'lib/pago/v2026_04/models.rb', line 24202 def order_id @order_id end |
#past_due ⇒ Boolean (readonly)
Whether the evidence submission deadline has passed.
24198 24199 24200 |
# File 'lib/pago/v2026_04/models.rb', line 24198 def past_due @past_due end |
#payment_id ⇒ String (readonly)
The ID of the payment associated with the dispute.
24206 24207 24208 |
# File 'lib/pago/v2026_04/models.rb', line 24206 def payment_id @payment_id end |
#reason ⇒ String? (readonly)
The reason for the dispute as reported by the card network (e.g. fraudulent, product_not_received). None until the processor reports it.
24190 24191 24192 |
# File 'lib/pago/v2026_04/models.rb', line 24190 def reason @reason end |
#resolved ⇒ Boolean (readonly)
Whether the dispute has been resolved (won or lost).
24170 24171 24172 |
# File 'lib/pago/v2026_04/models.rb', line 24170 def resolved @resolved end |
#status ⇒ String (readonly)
24166 24167 24168 |
# File 'lib/pago/v2026_04/models.rb', line 24166 def status @status end |
#tax_amount ⇒ Integer (readonly)
Tax amount in cents disputed.
24182 24183 24184 |
# File 'lib/pago/v2026_04/models.rb', line 24182 def tax_amount @tax_amount end |
Class Method Details
.from_json(data) ⇒ Dispute?
24254 24255 24256 24257 24258 24259 24260 24261 24262 24263 24264 24265 24266 24267 24268 24269 24270 24271 24272 24273 24274 24275 24276 24277 24278 24279 24280 |
# File 'lib/pago/v2026_04/models.rb', line 24254 def self.from_json(data) data = ::JSON.parse(data) if data.is_a?(String) data = ::Pago::Serde.object(data) return nil if data.nil? wrap_raw( new( created_at: (data.key?("created_at") ? data["created_at"] : ::Pago::UNSET), modified_at: (data.key?("modified_at") ? data["modified_at"] : ::Pago::UNSET), id: (data.key?("id") ? data["id"] : ::Pago::UNSET), status: (data.key?("status") ? data["status"] : ::Pago::UNSET), resolved: (data.key?("resolved") ? data["resolved"] : ::Pago::UNSET), closed: (data.key?("closed") ? data["closed"] : ::Pago::UNSET), amount: (data.key?("amount") ? data["amount"] : ::Pago::UNSET), tax_amount: (data.key?("tax_amount") ? data["tax_amount"] : ::Pago::UNSET), currency: (data.key?("currency") ? data["currency"] : ::Pago::UNSET), reason: (data.key?("reason") ? data["reason"] : ::Pago::UNSET), evidence_due_by: (data.key?("evidence_due_by") ? data["evidence_due_by"] : ::Pago::UNSET), past_due: (data.key?("past_due") ? data["past_due"] : ::Pago::UNSET), order_id: (data.key?("order_id") ? data["order_id"] : ::Pago::UNSET), payment_id: (data.key?("payment_id") ? data["payment_id"] : ::Pago::UNSET), customer: (data.key?("customer") ? Models::DisputeCustomer.from_json(data["customer"]) : ::Pago::UNSET), case_id: (data.key?("case_id") ? data["case_id"] : ::Pago::UNSET) ), data ) end |