Class: Quickeebooks::Windows::Model::Item
- Inherits:
-
IntuitType
- Object
- IntuitType
- Quickeebooks::Windows::Model::Item
- Includes:
- ActiveModel::Validations
- Defined in:
- lib/quickeebooks/windows/model/item.rb
Constant Summary collapse
- XML_COLLECTION_NODE =
'Items'
- XML_NODE =
'Item'
- REST_RESOURCE =
services.intuit.com/sb/item/v2/<realmID>
"item"
Instance Method Summary collapse
- #active? ⇒ Boolean
- #draft? ⇒ Boolean
- #print_grouped_items? ⇒ Boolean
- #synchronized? ⇒ Boolean
- #taxable? ⇒ Boolean
- #to_xml_ns(options = {}) ⇒ Object
-
#valid_for_deletion? ⇒ Boolean
To delete a record Intuit requires we provide Id and SyncToken fields.
Methods included from Logging
Instance Method Details
#active? ⇒ Boolean
67 68 69 |
# File 'lib/quickeebooks/windows/model/item.rb', line 67 def active? active == "true" end |
#draft? ⇒ Boolean
71 72 73 |
# File 'lib/quickeebooks/windows/model/item.rb', line 71 def draft? draft == "true" end |
#print_grouped_items? ⇒ Boolean
75 76 77 |
# File 'lib/quickeebooks/windows/model/item.rb', line 75 def print_grouped_items? print_grouped_items == "true" end |
#synchronized? ⇒ Boolean
79 80 81 |
# File 'lib/quickeebooks/windows/model/item.rb', line 79 def synchronized? synchronized == "true" end |
#taxable? ⇒ Boolean
63 64 65 |
# File 'lib/quickeebooks/windows/model/item.rb', line 63 def taxable? taxable == "true" end |
#to_xml_ns(options = {}) ⇒ Object
53 54 55 |
# File 'lib/quickeebooks/windows/model/item.rb', line 53 def to_xml_ns( = {}) to_xml() end |
#valid_for_deletion? ⇒ Boolean
To delete a record Intuit requires we provide Id and SyncToken fields
58 59 60 61 |
# File 'lib/quickeebooks/windows/model/item.rb', line 58 def valid_for_deletion? return false if(id.nil? || sync_token.nil?) id.to_i > 0 && !sync_token.to_s.empty? && sync_token.to_i >= 0 end |