Class: GpWebpay::Ws::WsRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/gp_webpay/ws/ws_request.rb

Constant Summary collapse

ATTRS_TO_GP_MAPPER =
{
  'ins0:messageId' => :message_id,
  'ins0:provider' => :provider,
  'ins0:merchantNumber' => :merchant_number,
  'ins0:paymentNumber' => :payment_number,
  'ins0:masterPaymentNumber' => :master_payment_number,
  'ins0:orderNumber' => :order_number,
  'ins0:captureNumber' => :capture_number,
  'ins0:amount' => :amount,
  'ins0:currencyCode' => :currency_code,
  'ins0:captureFlag' => :capture_flag,
  'ins0:tokenData' => :token_data,
  'ins0:returnUrl' => :return_url
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes) ⇒ WsRequest

Returns a new instance of WsRequest.



21
22
23
# File 'lib/gp_webpay/ws/ws_request.rb', line 21

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

Instance Attribute Details

#attributesObject

Returns the value of attribute attributes.



4
5
6
# File 'lib/gp_webpay/ws/ws_request.rb', line 4

def attributes
  @attributes
end

Instance Method Details

#to_gpwebpayObject



25
26
27
# File 'lib/gp_webpay/ws/ws_request.rb', line 25

def to_gpwebpay
  @to_gpwebpay ||= transform_to_gpwebpay
end