Class: LedgerSync::QuickBooksOnline::Util::LedgerErrorParser::AuthorizationMatcher
- Inherits:
-
ErrorMatcher
- Object
- ErrorMatcher
- LedgerSync::QuickBooksOnline::Util::LedgerErrorParser::AuthorizationMatcher
show all
- Defined in:
- lib/ledger_sync/quickbooks_online/util/ledger_error_parser.rb
Instance Attribute Summary
Attributes inherited from ErrorMatcher
#error, #message
Instance Method Summary
collapse
#body, #code, #detail, #error_message, #initialize, #parsed_body
Instance Method Details
#error_class ⇒ Object
43
44
45
|
# File 'lib/ledger_sync/quickbooks_online/util/ledger_error_parser.rb', line 43
def error_class
Error::LedgerError::AuthorizationError
end
|
#match? ⇒ Boolean
51
52
53
54
55
56
|
# File 'lib/ledger_sync/quickbooks_online/util/ledger_error_parser.rb', line 51
def match?
code == 3100 ||
code == '3100' ||
message.downcase.include?('authorizationfailed') ||
message.downcase.include?('errorcode=003100')
end
|
#output_message ⇒ Object
47
48
49
|
# File 'lib/ledger_sync/quickbooks_online/util/ledger_error_parser.rb', line 47
def output_message
"Authorization Failed with: #{error_message}"
end
|