Class: Pago::V2026_04::Models::RefundDispute

Inherits:
Model
  • Object
show all
Defined in:
lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs

Overview

Dispute associated with a refund, in case we prevented a dispute by issuing a refund.

Constant Summary collapse

JSON_KEYS =

Returns:

  • (Hash[Symbol, String])
{
  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"
}.freeze
REQUIRED_KEYS =

Returns:

  • (Array[String])
["created_at", "modified_at", "id", "status", "resolved", "closed", "amount", "tax_amount", "currency", "reason", "evidence_due_by", "past_due", "order_id", "payment_id"].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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:) ⇒ RefundDispute

Returns a new instance of RefundDispute.

Parameters:

  • created_at: (String)
  • modified_at: (String, nil)
  • id: (String)
  • status: (String)
  • resolved: (Boolean)
  • closed: (Boolean)
  • amount: (Integer)
  • tax_amount: (Integer)
  • currency: (String)
  • reason: (String, nil)
  • evidence_due_by: (String, nil)
  • past_due: (Boolean)
  • order_id: (String)
  • payment_id: (String)


38493
38494
38495
38496
38497
38498
38499
38500
38501
38502
38503
38504
38505
38506
38507
38508
38509
38510
38511
38512
38513
38514
38515
38516
38517
38518
38519
38520
38521
38522
38523
38524
# File 'lib/pago/v2026_04/models.rb', line 38493

def initialize(
  created_at:,
  modified_at:,
  id:,
  status:,
  resolved:,
  closed:,
  amount:,
  tax_amount:,
  currency:,
  reason:,
  evidence_due_by:,
  past_due:,
  order_id:,
  payment_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)
end

Instance Attribute Details

#amountInteger (readonly)

Amount in cents disputed.

Returns:

  • (Integer)


38463
38464
38465
# File 'lib/pago/v2026_04/models.rb', line 38463

def amount
  @amount
end

#closedBoolean (readonly)

Whether the dispute is closed (prevented, won, or lost).

Returns:

  • (Boolean)


38459
38460
38461
# File 'lib/pago/v2026_04/models.rb', line 38459

def closed
  @closed
end

#created_atString (readonly)

Creation timestamp of the object.

Returns:

  • (String)


38440
38441
38442
# File 'lib/pago/v2026_04/models.rb', line 38440

def created_at
  @created_at
end

#currencyString (readonly)

Currency code of the dispute.

Returns:

  • (String)


38471
38472
38473
# File 'lib/pago/v2026_04/models.rb', line 38471

def currency
  @currency
end

#evidence_due_byString? (readonly)

Deadline to submit evidence in response to the dispute. None when no response is required.

Returns:

  • (String, nil)


38479
38480
38481
# File 'lib/pago/v2026_04/models.rb', line 38479

def evidence_due_by
  @evidence_due_by
end

#idString (readonly)

The ID of the object.

Returns:

  • (String)


38448
38449
38450
# File 'lib/pago/v2026_04/models.rb', line 38448

def id
  @id
end

#modified_atString? (readonly)

Last modification timestamp of the object.

Returns:

  • (String, nil)


38444
38445
38446
# File 'lib/pago/v2026_04/models.rb', line 38444

def modified_at
  @modified_at
end

#order_idString (readonly)

The ID of the order associated with the dispute.

Returns:

  • (String)


38487
38488
38489
# File 'lib/pago/v2026_04/models.rb', line 38487

def order_id
  @order_id
end

#past_dueBoolean (readonly)

Whether the evidence submission deadline has passed.

Returns:

  • (Boolean)


38483
38484
38485
# File 'lib/pago/v2026_04/models.rb', line 38483

def past_due
  @past_due
end

#payment_idString (readonly)

The ID of the payment associated with the dispute.

Returns:

  • (String)


38491
38492
38493
# File 'lib/pago/v2026_04/models.rb', line 38491

def payment_id
  @payment_id
end

#reasonString? (readonly)

The reason for the dispute as reported by the card network (e.g. fraudulent, product_not_received). None until the processor reports it.

Returns:

  • (String, nil)


38475
38476
38477
# File 'lib/pago/v2026_04/models.rb', line 38475

def reason
  @reason
end

#resolvedBoolean (readonly)

Whether the dispute has been resolved (won or lost).

Returns:

  • (Boolean)


38455
38456
38457
# File 'lib/pago/v2026_04/models.rb', line 38455

def resolved
  @resolved
end

#statusString (readonly)

Returns:

  • (String)


38451
38452
38453
# File 'lib/pago/v2026_04/models.rb', line 38451

def status
  @status
end

#tax_amountInteger (readonly)

Tax amount in cents disputed.

Returns:

  • (Integer)


38467
38468
38469
# File 'lib/pago/v2026_04/models.rb', line 38467

def tax_amount
  @tax_amount
end

Class Method Details

.from_json(data) ⇒ RefundDispute?

Parameters:

  • data (Hash, String, nil)

Returns:



38528
38529
38530
38531
38532
38533
38534
38535
38536
38537
38538
38539
38540
38541
38542
38543
38544
38545
38546
38547
38548
38549
38550
38551
38552
# File 'lib/pago/v2026_04/models.rb', line 38528

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)
    ),
    data
  )
end