Class: Quickeebooks::Online::Model::Item
- Inherits:
-
IntuitType
- Object
- IntuitType
- Quickeebooks::Online::Model::Item
- Includes:
- ActiveModel::Validations
- Defined in:
- lib/quickeebooks/online/model/item.rb
Constant Summary collapse
- XML_NODE =
"Item"
- REST_RESOURCE =
<baseURL>/resource/items/v2/<realmID>
"items"
Instance Method Summary collapse
- #taxable? ⇒ Boolean
- #to_xml_ns(options = {}) ⇒ Object
-
#valid_for_deletion? ⇒ Boolean
To delete a record Intuit requires we provide Id and SyncToken fields.
Methods inherited from IntuitType
resource_for_collection, resource_for_singular
Instance Method Details
#taxable? ⇒ Boolean
46 47 48 |
# File 'lib/quickeebooks/online/model/item.rb', line 46 def taxable? taxable == "true" end |
#to_xml_ns(options = {}) ⇒ Object
36 37 38 |
# File 'lib/quickeebooks/online/model/item.rb', line 36 def to_xml_ns( = {}) to_xml_inject_ns('Item', ) end |
#valid_for_deletion? ⇒ Boolean
To delete a record Intuit requires we provide Id and SyncToken fields
41 42 43 44 |
# File 'lib/quickeebooks/online/model/item.rb', line 41 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 |