class CardConnect::Service::BinResponse
Constants
- BIN_INFO_NOT_FOUND
Error
messages- BIN_NOT_ENABLED
- FIELDS
- TOKEN_NOT_FOUND
Attributes
errors[R]
Public Class Methods
new(response)
click to toggle source
# File lib/cardconnect/services/bin/bin_response.rb, line 20 def initialize(response) set_attributes(response, FIELDS) # raise [response, self].inspect @errors = [] end
Public Instance Methods
body()
click to toggle source
# File lib/cardconnect/services/bin/bin_response.rb, line 31 def body FIELDS.collect{|attr| {attr => send(attr)} }.reduce({}, :merge) end
success?()
click to toggle source
# File lib/cardconnect/services/bin/bin_response.rb, line 27 def success? @errors.empty? end