Class: LedgerSync::QuickBooksOnline::Util::OperationErrorParser::DuplicateNameMatcher
- Inherits:
-
ErrorMatcher
- Object
- ErrorMatcher
- LedgerSync::QuickBooksOnline::Util::OperationErrorParser::DuplicateNameMatcher
show all
- Defined in:
- lib/ledger_sync/quickbooks_online/util/operation_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
10
11
12
|
# File 'lib/ledger_sync/quickbooks_online/util/operation_error_parser.rb', line 10
def error_class
Error::OperationError::DuplicateLedgerResourceError
end
|
#match? ⇒ Boolean
18
19
20
21
|
# File 'lib/ledger_sync/quickbooks_online/util/operation_error_parser.rb', line 18
def match?
code == 6240 ||
message.include?('the name supplied already exists')
end
|
#output_message ⇒ Object
14
15
16
|
# File 'lib/ledger_sync/quickbooks_online/util/operation_error_parser.rb', line 14
def output_message
"Resource with same name already exists: #{error_message}"
end
|