Class: Docdata::Order::RefundRequest

Inherits:
Request
  • Object
show all
Defined in:
lib/docdata/order/request.rb

Overview

Create a refund request in the DocData system.

Instance Attribute Summary

Attributes inherited from Request

#options

Instance Method Summary collapse

Methods inherited from Request

#initialize, #to_s

Constructor Details

This class inherits a constructor from Docdata::Order::Request

Instance Method Details

#build_request(builder) ⇒ Object



361
362
363
364
365
366
367
368
369
370
371
372
373
# File 'lib/docdata/order/request.rb', line 361

def build_request(builder)
  # The payment ID on which the refund request needs to be performed.
  builder.paymentId(payment_id)

  # Merchant's internal ID for identifying this refund.
  builder.merchantRefundReference(refund_reference) if refund_reference

  # Optional amount to refund.
  builder.amount(amount, currency: currency) if amount

  # Optional description for this refund.
  builder.description(description) if description
end