class Quickeebooks::Windows::Model::Account
Constants
- REST_RESOURCE
- XML_COLLECTION_NODE
- XML_NODE
Public Instance Methods
valid_for_deletion?()
click to toggle source
To delete an account Intuit requires we provide Id
and SyncToken fields
# File lib/quickeebooks/windows/model/account.rb, line 54 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/windows/model/account.rb, line 45 def valid_for_update? if sync_token.nil? errors.add(:sync_token, "Missing required attribute SyncToken for update") end valid? errors.empty? end
Private Instance Methods
ensure_name_is_valid()
click to toggle source
# File lib/quickeebooks/windows/model/account.rb, line 61 def ensure_name_is_valid if name.nil? errors.add(:name, "Missing required attribute: name") end if name.is_a?(String) && name.index(':') != nil errors.add(:name, "Attribute :name cannot contain a colon") end end