Class: DineroMailIpn::Reporter
- Inherits:
-
Object
- Object
- DineroMailIpn::Reporter
- Defined in:
- lib/dinero_mail_ipn/reporter.rb
Constant Summary collapse
- VALID_REPORT_STATUS =
Report status list
1
- MALFORMED_REPORT_STATUS =
2
- INVALID_ACCOUNT_NUMBER_REPORT_STATUS =
3
- INVALID_PASSWORD_REPORT_STATUS =
4
- INVALID_REQUEST_TYPE_STATUS =
5
- INVALID_TRANSACTION_ID_REQUEST_STATUS =
6
- INVALID_PASSWORD_OR_ACCOUNT_NUMBER_REQUEST_STATUS =
7
- TRANSACTION_NOT_FOUND_REQUEST_STATUS =
8
Instance Attribute Summary collapse
-
#reports ⇒ Object
readonly
Returns the value of attribute reports.
Instance Method Summary collapse
-
#initialize(xml_response) ⇒ Reporter
constructor
A new instance of Reporter.
- #valid? ⇒ Boolean
Constructor Details
#initialize(xml_response) ⇒ Reporter
Returns a new instance of Reporter.
18 19 20 21 |
# File 'lib/dinero_mail_ipn/reporter.rb', line 18 def initialize(xml_response) @doc = Nokogiri::XML(xml_response.downcase) @reports = build_reports end |
Instance Attribute Details
#reports ⇒ Object (readonly)
Returns the value of attribute reports.
16 17 18 |
# File 'lib/dinero_mail_ipn/reporter.rb', line 16 def reports @reports end |
Instance Method Details
#valid? ⇒ Boolean
23 24 25 |
# File 'lib/dinero_mail_ipn/reporter.rb', line 23 def valid? @doc.xpath("//estadoreporte").first.content.to_i == VALID_REPORT_STATUS end |