lib/xero_gateway/organisation.rb in xero_gateway-2.3.0 vs lib/xero_gateway/organisation.rb in xero_gateway-2.4.0

- old
+ new

@@ -1,8 +1,9 @@ module XeroGateway class Organisation < BaseRecord attributes({ + "OrganisationID" => :string, "Name" => :string, # Display name of organisation shown in Xero "LegalName" => :string, # Organisation name shown on Reports "PaysTax" => :boolean, # Boolean to describe if organisation is registered with a local tax authority i.e. true, false "Version" => :string, # See Version Types "BaseCurrency" => :string, # Default currency for organisation. See Currency types @@ -16,9 +17,15 @@ "FinancialYearEndMonth" => :string, "PeriodLockDate" => :string, "CreatedDateUTC" => :string, "ShortCode" => :string, "Timezone" => :string, - "LineOfBusiness" => :string + "LineOfBusiness" => :string, + "Addresses" => [Address] }) + + def add_address(address_params) + self.addresses ||= [] + self.addresses << Address.new(address_params) + end end end