class CardConnect::Service::ProfileGetResponse
Constants
- FIELDS
- STATUS_APPROVED
- STATUS_NOT_FOUND
Attributes
errors[R]
Public Class Methods
new(response)
click to toggle source
# File lib/cardconnect/services/profile/profile_get_response.rb, line 17 def initialize(response) set_attributes(response, FIELDS) @errors = [] process_errors end
Public Instance Methods
body()
click to toggle source
# File lib/cardconnect/services/profile/profile_get_response.rb, line 27 def body FIELDS.collect{|attr| {attr => send(attr)} }.reduce({}, :merge) end
success?()
click to toggle source
# File lib/cardconnect/services/profile/profile_get_response.rb, line 23 def success? errors.empty? end
Private Instance Methods
process_errors()
click to toggle source
# File lib/cardconnect/services/profile/profile_get_response.rb, line 33 def process_errors @errors << resptext if STATUS_NOT_FOUND == respstat end