Class: CardConnect::Service::ProfileDeleteResponse
- Inherits:
-
Object
- Object
- CardConnect::Service::ProfileDeleteResponse
- Includes:
- Utils
- Defined in:
- lib/cardconnect/services/profile/profile_delete_response.rb
Constant Summary collapse
- FIELDS =
[:resptext, :respcode, :respproc, :respstat, :profileid, :acctid]
- STATUS_APPROVED =
'A'
- STATUS_NOT_FOUND =
'C'
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
Instance Method Summary collapse
- #body ⇒ Object
-
#initialize(response) ⇒ ProfileDeleteResponse
constructor
A new instance of ProfileDeleteResponse.
- #success? ⇒ Boolean
Methods included from Utils
#set_attributes, #symbolize_keys
Constructor Details
#initialize(response) ⇒ ProfileDeleteResponse
Returns a new instance of ProfileDeleteResponse.
14 15 16 17 18 |
# File 'lib/cardconnect/services/profile/profile_delete_response.rb', line 14 def initialize(response) set_attributes(response, FIELDS) @errors = [] process_errors end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
9 10 11 |
# File 'lib/cardconnect/services/profile/profile_delete_response.rb', line 9 def errors @errors end |
Instance Method Details
#body ⇒ Object
24 25 26 |
# File 'lib/cardconnect/services/profile/profile_delete_response.rb', line 24 def body FIELDS.collect{|attr| {attr => send(attr)} }.reduce({}, :merge) end |
#success? ⇒ Boolean
20 21 22 |
# File 'lib/cardconnect/services/profile/profile_delete_response.rb', line 20 def success? errors.empty? end |