Class: Netaxept::Responses::Response
- Inherits:
-
Object
- Object
- Netaxept::Responses::Response
- Defined in:
- lib/netaxept/responses/response.rb
Direct Known Subclasses
AnnulResponse, AuthResponse, CaptureResponse, CreditResponse, RegisterResponse, SaleResponse
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
Instance Method Summary collapse
-
#initialize(node) ⇒ Response
constructor
A new instance of Response.
- #success? ⇒ Boolean
Constructor Details
#initialize(node) ⇒ Response
Returns a new instance of Response.
8 9 10 11 12 13 14 15 16 |
# File 'lib/netaxept/responses/response.rb', line 8 def initialize(node) super() @errors = [] if(node["Exception"]) errors << Netaxept::ErrorMessage.new(node["Exception"]["Error"]) elsif(node["BBSException"]) errors << Netaxept::ErrorMessage.new(node) end end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
6 7 8 |
# File 'lib/netaxept/responses/response.rb', line 6 def errors @errors end |
Instance Method Details
#success? ⇒ Boolean
18 19 20 |
# File 'lib/netaxept/responses/response.rb', line 18 def success? self.errors.empty? end |