Class: Einvoice::Tradevan::Result
- Inherits:
-
Result
- Object
- Result
- Einvoice::Tradevan::Result
- Defined in:
- lib/einvoice/tradevan/result.rb
Instance Method Summary collapse
Instance Method Details
#data ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/einvoice/tradevan/result.rb', line 16 def data if response.is_a? ActiveModel::Errors nil else response && response["Message"] end end |
#errors ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/einvoice/tradevan/result.rb', line 4 def errors if response.is_a? ActiveModel::Errors response..join('; ') else response && response["Message"] end end |
#successful? ⇒ Boolean
12 13 14 |
# File 'lib/einvoice/tradevan/result.rb', line 12 def successful? response && !response.is_a?(ActiveModel::Errors) && response["Success"] == 'Y' end |