Class: Buckaruby::RefundTransactionRequest

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

Overview

Request for a creating a refund.

Instance Method Summary collapse

Methods inherited from Request

#execute, #initialize

Constructor Details

This class inherits a constructor from Buckaruby::Request

Instance Method Details

#build_request_params(options) ⇒ Object



206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
# File 'lib/buckaruby/request.rb', line 206

def build_request_params(options)
  params = {
    brq_payment_method: options[:payment_method],
    brq_amount_credit: Amount.new(options[:amount]).to_s,
    brq_currency: options[:currency] || Currency::EURO,
    brq_invoicenumber: options[:invoicenumber]
  }

  key = :"brq_service_#{options[:payment_method]}_action"
  params[key] = Action::REFUND

  params[:brq_originaltransaction] = options[:transaction_id]

  params
end

#operationObject



202
203
204
# File 'lib/buckaruby/request.rb', line 202

def operation
  Operation::TRANSACTION_REQUEST
end