Sha256: ef0356dbb0ae733ca257fc1f0f2f35bbc97bf28690f5046bc7aeedaafb1debbb
Contents?: true
Size: 981 Bytes
Versions: 1
Compression:
Stored size: 981 Bytes
Contents
module XeroGateway module Messages class AccountMessage def self.build_xml(account) b = Builder::XmlMarkup.new b.Account { b.Code account.code b.Name account.name b.Type account.type b.TaxType account.tax_type b.Description account.description } end # Take an Account element and convert it into an Account object def self.from_xml(account_element) account = Account.new account_element.children.each do |element| case(element.name) when "Code" then account.code = element.text when "Name" then account.name = element.text when "Type" then account.type = element.text when "TaxType" then account.tax_type = element.text when "Description" then account.description = element.text end end account end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
tlconnor-xero_gateway-1.0.2 | lib/xero_gateway/messages/account_message.rb |