Class: Buckaruby::TransactionRequest

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

Overview

Base class for a transaction request.

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



86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# File 'lib/buckaruby/request.rb', line 86

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

  params.merge!(build_transaction_request_params(options))

  params[:brq_clientip] = options[:client_ip] if options[:client_ip]
  params[:brq_description] = options[:description] if options[:description]
  params[:brq_return] = options[:return_url] if options[:return_url]

  params
end

#build_transaction_request_params(_options) ⇒ Object

Raises:

  • (NotImplementedError)


104
105
106
# File 'lib/buckaruby/request.rb', line 104

def build_transaction_request_params(_options)
  raise NotImplementedError
end

#operationObject



82
83
84
# File 'lib/buckaruby/request.rb', line 82

def operation
  Operation::TRANSACTION_REQUEST
end