class Quickeebooks::Online::Model::Clazz
Constants
- REST_RESOURCE
developer.intuit.com/docs/0025_quickbooksapi/0050_data_services/v2/0400_quickbooks_online/class
- XML_COLLECTION_NODE
- XML_NODE
Public Class Methods
resource_for_collection()
click to toggle source
# File lib/quickeebooks/online/model/clazz.rb, line 53 def self.resource_for_collection "classes" end
Public Instance Methods
to_xml_ns(options = {})
click to toggle source
# File lib/quickeebooks/online/model/clazz.rb, line 42 def to_xml_ns(options = {}) options.merge!(:destination_name => 'Class') to_xml_inject_ns('Clazz', options) end
valid_for_create?()
click to toggle source
# File lib/quickeebooks/online/model/clazz.rb, line 34 def valid_for_create? valid? if type_of.nil? errors.add(:type_of, "Missing required attribute TypeOf for Create") end errors.empty? end
valid_for_deletion?()
click to toggle source
To delete an account Intuit requires we provide Id
and SyncToken fields
# File lib/quickeebooks/online/model/clazz.rb, line 48 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?()
click to toggle source
# File lib/quickeebooks/online/model/clazz.rb, line 27 def valid_for_update? if sync_token.nil? errors.add(:sync_token, "Missing required attribute SyncToken for update") end errors.empty? end