Class: GpWebpay::Http::HttpRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/gp_webpay/http/http_request.rb

Constant Summary collapse

ATTRS_TO_GP_MAPPER =
{
  'MERCHANTNUMBER' => :merchant_number,
  'OPERATION' => :operation,
  'ORDERNUMBER' => :order_number,
  'AMOUNT' => :amount,
  'CURRENCY' => :currency,
  'DEPOSITFLAG' => :deposit_flag,
  'MERORDERNUM' => :mer_order_num,
  'URL' => :url,
  'DESCRIPTION' => :description,
  'MD' => :md,
  'USERPARAM1' => :user_param1,
  'FASTPAYID' => :fast_pay_id,
  'PAYMETHOD' => :paymethod,
  'DISABLEPAYMETHOD' => :disable_paymethod,
  'PAYMETHODS' => :paymethods,
  'EMAIL' => :email,
  'REFERENCENUMBER' => :reference_number,
  'ADDINFO' => :add_info_to_xml,
  'FASTTOKEN' => :fast_token
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes) ⇒ HttpRequest

Returns a new instance of HttpRequest.



28
29
30
# File 'lib/gp_webpay/http/http_request.rb', line 28

def initialize(attributes)
  @attributes = attributes || {}
end

Instance Attribute Details

#attributesObject

Returns the value of attribute attributes.



4
5
6
# File 'lib/gp_webpay/http/http_request.rb', line 4

def attributes
  @attributes
end

Instance Method Details

#to_gpwebpayObject



32
33
34
# File 'lib/gp_webpay/http/http_request.rb', line 32

def to_gpwebpay
  @to_gpwebpay ||= transform_to_gpwebpay
end