Class: Quickeebooks::Online::Model::TrackingClass
- Inherits:
-
IntuitType
- Object
- IntuitType
- Quickeebooks::Online::Model::TrackingClass
- Includes:
- ActiveModel::Validations
- Defined in:
- lib/quickeebooks/online/model/tracking_class.rb
Constant Summary collapse
- XML_NODE =
"Class"
- REST_RESOURCE =
"class"
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from IntuitType
Methods included from Logging
Class Method Details
.resource_for_collection ⇒ Object
37 38 39 |
# File 'lib/quickeebooks/online/model/tracking_class.rb', line 37 def self.resource_for_collection REST_RESOURCE + "es" end |
Instance Method Details
#to_xml_ns(options = {}) ⇒ Object
20 21 22 |
# File 'lib/quickeebooks/online/model/tracking_class.rb', line 20 def to_xml_ns( = {}) to_xml_inject_ns(XML_NODE, ) end |
#valid_for_deletion? ⇒ Boolean
32 33 34 35 |
# File 'lib/quickeebooks/online/model/tracking_class.rb', line 32 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 |
#valid_for_update? ⇒ Boolean
24 25 26 27 28 29 30 |
# File 'lib/quickeebooks/online/model/tracking_class.rb', line 24 def valid_for_update? if sync_token.nil? errors.add(:sync_token, "Missing required attribute SyncToken for update") end valid? errors.empty? end |