class GpWebpay::Ws::WsRequest
Constants
- ATTRS_TO_GP_MAPPER
Attributes
attributes[RW]
Public Class Methods
new(attributes)
click to toggle source
# File lib/gp_webpay/ws/ws_request.rb, line 21 def initialize(attributes) @attributes = attributes || {} end
Public Instance Methods
to_gpwebpay()
click to toggle source
# File lib/gp_webpay/ws/ws_request.rb, line 25 def to_gpwebpay @to_gpwebpay ||= transform_to_gpwebpay end
Private Instance Methods
transform_to_gpwebpay()
click to toggle source
# File lib/gp_webpay/ws/ws_request.rb, line 31 def transform_to_gpwebpay ATTRS_TO_GP_MAPPER.each_with_object({}) do |(k, v), attrs| attribute_value = attributes[v] || attributes[v.to_s] attrs[k] = attribute_value if attribute_value end end