Skip to content

Commit

Permalink
Merge pull request #139 from XeroAPI/attributes_bug
Browse files Browse the repository at this point in the history
Attributes bug
  • Loading branch information
SerKnight authored Mar 5, 2021
2 parents 255fa12 + 28897f4 commit d645ae1
Show file tree
Hide file tree
Showing 390 changed files with 392 additions and 392 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ invoices = { invoices: [{ type: XeroRuby::Accounting::Invoice::ACCREC, contact:
invoice = xero_client.accounting_api.create_invoices(tenant_id, invoices).invoices.first

# display out all the serialized data as a hash
puts invoices.attributes
puts invoices.to_attributes
=> {type: 'ACCREC', line_items: [...]}

# Create History
Expand Down Expand Up @@ -343,7 +343,7 @@ xero_client.accounting_api.get_bank_transfers(tenant_id, opts).bank_transfers
1) Not all `opts` parameter combinations are available for all endpoints, and there are likely some undiscovered edge cases. If you encounter a filter / sort / where clause that seems buggy open an issue and we will dig.

2) Some opts string values may need PascalCasing to match casing defined in our [core API docs](https://developer.xero.com/documentation/api/api-overview).
* `opts = { order: 'UpdatedDateUtc DESC'}`
* `opts = { order: 'UpdatedDateUtc DESC'}`

3) If you have use cases outside of these examples let us know.

Expand Down
2 changes: 1 addition & 1 deletion lib/xero-ruby/models/accounting/account.rb
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ def to_hash(downcase: false)
end

# Returns the object in the form of hash with snake_case
def attributes
def to_attributes
to_hash(downcase: true)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/xero-ruby/models/accounting/accounts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def to_hash(downcase: false)
end

# Returns the object in the form of hash with snake_case
def attributes
def to_attributes
to_hash(downcase: true)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/xero-ruby/models/accounting/accounts_payable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def to_hash(downcase: false)
end

# Returns the object in the form of hash with snake_case
def attributes
def to_attributes
to_hash(downcase: true)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/xero-ruby/models/accounting/accounts_receivable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def to_hash(downcase: false)
end

# Returns the object in the form of hash with snake_case
def attributes
def to_attributes
to_hash(downcase: true)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/xero-ruby/models/accounting/action.rb
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def to_hash(downcase: false)
end

# Returns the object in the form of hash with snake_case
def attributes
def to_attributes
to_hash(downcase: true)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/xero-ruby/models/accounting/actions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def to_hash(downcase: false)
end

# Returns the object in the form of hash with snake_case
def attributes
def to_attributes
to_hash(downcase: true)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/xero-ruby/models/accounting/address.rb
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ def to_hash(downcase: false)
end

# Returns the object in the form of hash with snake_case
def attributes
def to_attributes
to_hash(downcase: true)
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ def to_hash(downcase: false)
end

# Returns the object in the form of hash with snake_case
def attributes
def to_attributes
to_hash(downcase: true)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/xero-ruby/models/accounting/allocation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ def to_hash(downcase: false)
end

# Returns the object in the form of hash with snake_case
def attributes
def to_attributes
to_hash(downcase: true)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/xero-ruby/models/accounting/allocations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def to_hash(downcase: false)
end

# Returns the object in the form of hash with snake_case
def attributes
def to_attributes
to_hash(downcase: true)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/xero-ruby/models/accounting/attachment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ def to_hash(downcase: false)
end

# Returns the object in the form of hash with snake_case
def attributes
def to_attributes
to_hash(downcase: true)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/xero-ruby/models/accounting/attachments.rb
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def to_hash(downcase: false)
end

# Returns the object in the form of hash with snake_case
def attributes
def to_attributes
to_hash(downcase: true)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/xero-ruby/models/accounting/balance_details.rb
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def to_hash(downcase: false)
end

# Returns the object in the form of hash with snake_case
def attributes
def to_attributes
to_hash(downcase: true)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/xero-ruby/models/accounting/balances.rb
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def to_hash(downcase: false)
end

# Returns the object in the form of hash with snake_case
def attributes
def to_attributes
to_hash(downcase: true)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/xero-ruby/models/accounting/bank_transaction.rb
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ def to_hash(downcase: false)
end

# Returns the object in the form of hash with snake_case
def attributes
def to_attributes
to_hash(downcase: true)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/xero-ruby/models/accounting/bank_transactions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def to_hash(downcase: false)
end

# Returns the object in the form of hash with snake_case
def attributes
def to_attributes
to_hash(downcase: true)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/xero-ruby/models/accounting/bank_transfer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ def to_hash(downcase: false)
end

# Returns the object in the form of hash with snake_case
def attributes
def to_attributes
to_hash(downcase: true)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/xero-ruby/models/accounting/bank_transfers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def to_hash(downcase: false)
end

# Returns the object in the form of hash with snake_case
def attributes
def to_attributes
to_hash(downcase: true)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/xero-ruby/models/accounting/batch_payment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ def to_hash(downcase: false)
end

# Returns the object in the form of hash with snake_case
def attributes
def to_attributes
to_hash(downcase: true)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/xero-ruby/models/accounting/batch_payment_details.rb
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ def to_hash(downcase: false)
end

# Returns the object in the form of hash with snake_case
def attributes
def to_attributes
to_hash(downcase: true)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/xero-ruby/models/accounting/batch_payments.rb
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def to_hash(downcase: false)
end

# Returns the object in the form of hash with snake_case
def attributes
def to_attributes
to_hash(downcase: true)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/xero-ruby/models/accounting/bill.rb
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def to_hash(downcase: false)
end

# Returns the object in the form of hash with snake_case
def attributes
def to_attributes
to_hash(downcase: true)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/xero-ruby/models/accounting/branding_theme.rb
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ def to_hash(downcase: false)
end

# Returns the object in the form of hash with snake_case
def attributes
def to_attributes
to_hash(downcase: true)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/xero-ruby/models/accounting/branding_themes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def to_hash(downcase: false)
end

# Returns the object in the form of hash with snake_case
def attributes
def to_attributes
to_hash(downcase: true)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/xero-ruby/models/accounting/cis_org_setting.rb
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def to_hash(downcase: false)
end

# Returns the object in the form of hash with snake_case
def attributes
def to_attributes
to_hash(downcase: true)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/xero-ruby/models/accounting/cis_org_settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def to_hash(downcase: false)
end

# Returns the object in the form of hash with snake_case
def attributes
def to_attributes
to_hash(downcase: true)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/xero-ruby/models/accounting/cis_setting.rb
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def to_hash(downcase: false)
end

# Returns the object in the form of hash with snake_case
def attributes
def to_attributes
to_hash(downcase: true)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/xero-ruby/models/accounting/cis_settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def to_hash(downcase: false)
end

# Returns the object in the form of hash with snake_case
def attributes
def to_attributes
to_hash(downcase: true)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/xero-ruby/models/accounting/contact.rb
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ def to_hash(downcase: false)
end

# Returns the object in the form of hash with snake_case
def attributes
def to_attributes
to_hash(downcase: true)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/xero-ruby/models/accounting/contact_group.rb
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ def to_hash(downcase: false)
end

# Returns the object in the form of hash with snake_case
def attributes
def to_attributes
to_hash(downcase: true)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/xero-ruby/models/accounting/contact_groups.rb
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def to_hash(downcase: false)
end

# Returns the object in the form of hash with snake_case
def attributes
def to_attributes
to_hash(downcase: true)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/xero-ruby/models/accounting/contact_person.rb
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def to_hash(downcase: false)
end

# Returns the object in the form of hash with snake_case
def attributes
def to_attributes
to_hash(downcase: true)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/xero-ruby/models/accounting/contacts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def to_hash(downcase: false)
end

# Returns the object in the form of hash with snake_case
def attributes
def to_attributes
to_hash(downcase: true)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/xero-ruby/models/accounting/conversion_balances.rb
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def to_hash(downcase: false)
end

# Returns the object in the form of hash with snake_case
def attributes
def to_attributes
to_hash(downcase: true)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/xero-ruby/models/accounting/conversion_date.rb
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def to_hash(downcase: false)
end

# Returns the object in the form of hash with snake_case
def attributes
def to_attributes
to_hash(downcase: true)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/xero-ruby/models/accounting/credit_note.rb
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ def to_hash(downcase: false)
end

# Returns the object in the form of hash with snake_case
def attributes
def to_attributes
to_hash(downcase: true)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/xero-ruby/models/accounting/credit_notes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def to_hash(downcase: false)
end

# Returns the object in the form of hash with snake_case
def attributes
def to_attributes
to_hash(downcase: true)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/xero-ruby/models/accounting/currencies.rb
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def to_hash(downcase: false)
end

# Returns the object in the form of hash with snake_case
def attributes
def to_attributes
to_hash(downcase: true)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/xero-ruby/models/accounting/currency.rb
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def to_hash(downcase: false)
end

# Returns the object in the form of hash with snake_case
def attributes
def to_attributes
to_hash(downcase: true)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/xero-ruby/models/accounting/element.rb
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def to_hash(downcase: false)
end

# Returns the object in the form of hash with snake_case
def attributes
def to_attributes
to_hash(downcase: true)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/xero-ruby/models/accounting/employee.rb
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ def to_hash(downcase: false)
end

# Returns the object in the form of hash with snake_case
def attributes
def to_attributes
to_hash(downcase: true)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/xero-ruby/models/accounting/employees.rb
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def to_hash(downcase: false)
end

# Returns the object in the form of hash with snake_case
def attributes
def to_attributes
to_hash(downcase: true)
end

Expand Down
Loading

0 comments on commit d645ae1

Please sign in to comment.