Class: ActiveMerchant::Billing::PaymillGateway::ResponseParser

Inherits:
Object
  • Object
show all
Defined in:
lib/active_merchant/billing/gateways/paymill.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(raw_response = "", options = {}) ⇒ ResponseParser

Returns a new instance of ResponseParser.



241
242
243
244
# File 'lib/active_merchant/billing/gateways/paymill.rb', line 241

def initialize(raw_response="", options={})
  @raw_response = raw_response
  @options = options
end

Instance Attribute Details

#messageObject (readonly)

Returns the value of attribute message.



239
240
241
# File 'lib/active_merchant/billing/gateways/paymill.rb', line 239

def message
  @message
end

#optionsObject (readonly)

Returns the value of attribute options.



239
240
241
# File 'lib/active_merchant/billing/gateways/paymill.rb', line 239

def options
  @options
end

#parsedObject (readonly)

Returns the value of attribute parsed.



239
240
241
# File 'lib/active_merchant/billing/gateways/paymill.rb', line 239

def parsed
  @parsed
end

#raw_responseObject (readonly)

Returns the value of attribute raw_response.



239
240
241
# File 'lib/active_merchant/billing/gateways/paymill.rb', line 239

def raw_response
  @raw_response
end

#succeededObject (readonly)

Returns the value of attribute succeeded.



239
240
241
# File 'lib/active_merchant/billing/gateways/paymill.rb', line 239

def succeeded
  @succeeded
end

Instance Method Details

#generate_responseObject



246
247
248
249
250
251
252
253
254
255
# File 'lib/active_merchant/billing/gateways/paymill.rb', line 246

def generate_response
  parse_response
  if parsed['error']
    handle_response_parse_error
  else
    handle_response_correct_parsing
  end

  Response.new(succeeded, message, parsed, options)
end