class Payonline::RebillResponse
Constants
- SUCCESS_CODE
Public Class Methods
new(response)
click to toggle source
# File lib/payonline/rebill_response.rb, line 5 def initialize(response) @response = parse_response(response) end
Public Instance Methods
failure?()
click to toggle source
# File lib/payonline/rebill_response.rb, line 13 def failure? !success? end
success?()
click to toggle source
# File lib/payonline/rebill_response.rb, line 9 def success? @response[:result] == SUCCESS_CODE end
Private Instance Methods
parse_response(response)
click to toggle source
# File lib/payonline/rebill_response.rb, line 19 def parse_response(response) CGI.parse(response) .transform_keys { |key| key.to_s.underscore } .transform_values(&:first) .with_indifferent_access end