Skip to content

Commit

Permalink
Merge pull request #78 from XeroAPI/currency_regen
Browse files Browse the repository at this point in the history
Adds graceful time fix
  • Loading branch information
SerKnight authored Sep 28, 2020
2 parents c0012ef + 51aba05 commit 2c5531f
Show file tree
Hide file tree
Showing 129 changed files with 129 additions and 129 deletions.
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 @@ -515,7 +515,7 @@ def _to_hash(value)
# customized data_parser
def parse_date(datestring)
seconds_since_epoch = datestring.scan(/[0-9]+/)[0].to_i / 1000.0
return Time.at(seconds_since_epoch).to_s
return Time.at(seconds_since_epoch).strftime('%Y-%m-%dT%l:%M:%S%z').to_s
end
end
end
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 @@ -204,7 +204,7 @@ def _to_hash(value)
# customized data_parser
def parse_date(datestring)
seconds_since_epoch = datestring.scan(/[0-9]+/)[0].to_i / 1000.0
return Time.at(seconds_since_epoch).to_s
return Time.at(seconds_since_epoch).strftime('%Y-%m-%dT%l:%M:%S%z').to_s
end
end
end
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 @@ -212,7 +212,7 @@ def _to_hash(value)
# customized data_parser
def parse_date(datestring)
seconds_since_epoch = datestring.scan(/[0-9]+/)[0].to_i / 1000.0
return Time.at(seconds_since_epoch).to_s
return Time.at(seconds_since_epoch).strftime('%Y-%m-%dT%l:%M:%S%z').to_s
end
end
end
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 @@ -212,7 +212,7 @@ def _to_hash(value)
# customized data_parser
def parse_date(datestring)
seconds_since_epoch = datestring.scan(/[0-9]+/)[0].to_i / 1000.0
return Time.at(seconds_since_epoch).to_s
return Time.at(seconds_since_epoch).strftime('%Y-%m-%dT%l:%M:%S%z').to_s
end
end
end
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 @@ -464,7 +464,7 @@ def _to_hash(value)
# customized data_parser
def parse_date(datestring)
seconds_since_epoch = datestring.scan(/[0-9]+/)[0].to_i / 1000.0
return Time.at(seconds_since_epoch).to_s
return Time.at(seconds_since_epoch).strftime('%Y-%m-%dT%l:%M:%S%z').to_s
end
end
end
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 @@ -289,7 +289,7 @@ def _to_hash(value)
# customized data_parser
def parse_date(datestring)
seconds_since_epoch = datestring.scan(/[0-9]+/)[0].to_i / 1000.0
return Time.at(seconds_since_epoch).to_s
return Time.at(seconds_since_epoch).strftime('%Y-%m-%dT%l:%M:%S%z').to_s
end
end
end
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 @@ -204,7 +204,7 @@ def _to_hash(value)
# customized data_parser
def parse_date(datestring)
seconds_since_epoch = datestring.scan(/[0-9]+/)[0].to_i / 1000.0
return Time.at(seconds_since_epoch).to_s
return Time.at(seconds_since_epoch).strftime('%Y-%m-%dT%l:%M:%S%z').to_s
end
end
end
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 @@ -252,7 +252,7 @@ def _to_hash(value)
# customized data_parser
def parse_date(datestring)
seconds_since_epoch = datestring.scan(/[0-9]+/)[0].to_i / 1000.0
return Time.at(seconds_since_epoch).to_s
return Time.at(seconds_since_epoch).strftime('%Y-%m-%dT%l:%M:%S%z').to_s
end
end
end
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 @@ -204,7 +204,7 @@ def _to_hash(value)
# customized data_parser
def parse_date(datestring)
seconds_since_epoch = datestring.scan(/[0-9]+/)[0].to_i / 1000.0
return Time.at(seconds_since_epoch).to_s
return Time.at(seconds_since_epoch).strftime('%Y-%m-%dT%l:%M:%S%z').to_s
end
end
end
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 @@ -213,7 +213,7 @@ def _to_hash(value)
# customized data_parser
def parse_date(datestring)
seconds_since_epoch = datestring.scan(/[0-9]+/)[0].to_i / 1000.0
return Time.at(seconds_since_epoch).to_s
return Time.at(seconds_since_epoch).strftime('%Y-%m-%dT%l:%M:%S%z').to_s
end
end
end
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 @@ -490,7 +490,7 @@ def _to_hash(value)
# customized data_parser
def parse_date(datestring)
seconds_since_epoch = datestring.scan(/[0-9]+/)[0].to_i / 1000.0
return Time.at(seconds_since_epoch).to_s
return Time.at(seconds_since_epoch).strftime('%Y-%m-%dT%l:%M:%S%z').to_s
end
end
end
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 @@ -204,7 +204,7 @@ def _to_hash(value)
# customized data_parser
def parse_date(datestring)
seconds_since_epoch = datestring.scan(/[0-9]+/)[0].to_i / 1000.0
return Time.at(seconds_since_epoch).to_s
return Time.at(seconds_since_epoch).strftime('%Y-%m-%dT%l:%M:%S%z').to_s
end
end
end
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 @@ -321,7 +321,7 @@ def _to_hash(value)
# customized data_parser
def parse_date(datestring)
seconds_since_epoch = datestring.scan(/[0-9]+/)[0].to_i / 1000.0
return Time.at(seconds_since_epoch).to_s
return Time.at(seconds_since_epoch).strftime('%Y-%m-%dT%l:%M:%S%z').to_s
end
end
end
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 @@ -204,7 +204,7 @@ def _to_hash(value)
# customized data_parser
def parse_date(datestring)
seconds_since_epoch = datestring.scan(/[0-9]+/)[0].to_i / 1000.0
return Time.at(seconds_since_epoch).to_s
return Time.at(seconds_since_epoch).strftime('%Y-%m-%dT%l:%M:%S%z').to_s
end
end
end
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 @@ -464,7 +464,7 @@ def _to_hash(value)
# customized data_parser
def parse_date(datestring)
seconds_since_epoch = datestring.scan(/[0-9]+/)[0].to_i / 1000.0
return Time.at(seconds_since_epoch).to_s
return Time.at(seconds_since_epoch).strftime('%Y-%m-%dT%l:%M:%S%z').to_s
end
end
end
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 @@ -288,7 +288,7 @@ def _to_hash(value)
# customized data_parser
def parse_date(datestring)
seconds_since_epoch = datestring.scan(/[0-9]+/)[0].to_i / 1000.0
return Time.at(seconds_since_epoch).to_s
return Time.at(seconds_since_epoch).strftime('%Y-%m-%dT%l:%M:%S%z').to_s
end
end
end
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 @@ -204,7 +204,7 @@ def _to_hash(value)
# customized data_parser
def parse_date(datestring)
seconds_since_epoch = datestring.scan(/[0-9]+/)[0].to_i / 1000.0
return Time.at(seconds_since_epoch).to_s
return Time.at(seconds_since_epoch).strftime('%Y-%m-%dT%l:%M:%S%z').to_s
end
end
end
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 @@ -212,7 +212,7 @@ def _to_hash(value)
# customized data_parser
def parse_date(datestring)
seconds_since_epoch = datestring.scan(/[0-9]+/)[0].to_i / 1000.0
return Time.at(seconds_since_epoch).to_s
return Time.at(seconds_since_epoch).strftime('%Y-%m-%dT%l:%M:%S%z').to_s
end
end
end
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 @@ -287,7 +287,7 @@ def _to_hash(value)
# customized data_parser
def parse_date(datestring)
seconds_since_epoch = datestring.scan(/[0-9]+/)[0].to_i / 1000.0
return Time.at(seconds_since_epoch).to_s
return Time.at(seconds_since_epoch).strftime('%Y-%m-%dT%l:%M:%S%z').to_s
end
end
end
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 @@ -204,7 +204,7 @@ def _to_hash(value)
# customized data_parser
def parse_date(datestring)
seconds_since_epoch = datestring.scan(/[0-9]+/)[0].to_i / 1000.0
return Time.at(seconds_since_epoch).to_s
return Time.at(seconds_since_epoch).strftime('%Y-%m-%dT%l:%M:%S%z').to_s
end
end
end
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 @@ -222,7 +222,7 @@ def _to_hash(value)
# customized data_parser
def parse_date(datestring)
seconds_since_epoch = datestring.scan(/[0-9]+/)[0].to_i / 1000.0
return Time.at(seconds_since_epoch).to_s
return Time.at(seconds_since_epoch).strftime('%Y-%m-%dT%l:%M:%S%z').to_s
end
end
end
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 @@ -212,7 +212,7 @@ def _to_hash(value)
# customized data_parser
def parse_date(datestring)
seconds_since_epoch = datestring.scan(/[0-9]+/)[0].to_i / 1000.0
return Time.at(seconds_since_epoch).to_s
return Time.at(seconds_since_epoch).strftime('%Y-%m-%dT%l:%M:%S%z').to_s
end
end
end
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 @@ -204,7 +204,7 @@ def _to_hash(value)
# customized data_parser
def parse_date(datestring)
seconds_since_epoch = datestring.scan(/[0-9]+/)[0].to_i / 1000.0
return Time.at(seconds_since_epoch).to_s
return Time.at(seconds_since_epoch).strftime('%Y-%m-%dT%l:%M:%S%z').to_s
end
end
end
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 @@ -744,7 +744,7 @@ def _to_hash(value)
# customized data_parser
def parse_date(datestring)
seconds_since_epoch = datestring.scan(/[0-9]+/)[0].to_i / 1000.0
return Time.at(seconds_since_epoch).to_s
return Time.at(seconds_since_epoch).strftime('%Y-%m-%dT%l:%M:%S%z').to_s
end
end
end
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 @@ -270,7 +270,7 @@ def _to_hash(value)
# customized data_parser
def parse_date(datestring)
seconds_since_epoch = datestring.scan(/[0-9]+/)[0].to_i / 1000.0
return Time.at(seconds_since_epoch).to_s
return Time.at(seconds_since_epoch).strftime('%Y-%m-%dT%l:%M:%S%z').to_s
end
end
end
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 @@ -204,7 +204,7 @@ def _to_hash(value)
# customized data_parser
def parse_date(datestring)
seconds_since_epoch = datestring.scan(/[0-9]+/)[0].to_i / 1000.0
return Time.at(seconds_since_epoch).to_s
return Time.at(seconds_since_epoch).strftime('%Y-%m-%dT%l:%M:%S%z').to_s
end
end
end
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 @@ -232,7 +232,7 @@ def _to_hash(value)
# customized data_parser
def parse_date(datestring)
seconds_since_epoch = datestring.scan(/[0-9]+/)[0].to_i / 1000.0
return Time.at(seconds_since_epoch).to_s
return Time.at(seconds_since_epoch).strftime('%Y-%m-%dT%l:%M:%S%z').to_s
end
end
end
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 @@ -204,7 +204,7 @@ def _to_hash(value)
# customized data_parser
def parse_date(datestring)
seconds_since_epoch = datestring.scan(/[0-9]+/)[0].to_i / 1000.0
return Time.at(seconds_since_epoch).to_s
return Time.at(seconds_since_epoch).strftime('%Y-%m-%dT%l:%M:%S%z').to_s
end
end
end
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 @@ -518,7 +518,7 @@ def _to_hash(value)
# customized data_parser
def parse_date(datestring)
seconds_since_epoch = datestring.scan(/[0-9]+/)[0].to_i / 1000.0
return Time.at(seconds_since_epoch).to_s
return Time.at(seconds_since_epoch).strftime('%Y-%m-%dT%l:%M:%S%z').to_s
end
end
end
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 @@ -204,7 +204,7 @@ def _to_hash(value)
# customized data_parser
def parse_date(datestring)
seconds_since_epoch = datestring.scan(/[0-9]+/)[0].to_i / 1000.0
return Time.at(seconds_since_epoch).to_s
return Time.at(seconds_since_epoch).strftime('%Y-%m-%dT%l:%M:%S%z').to_s
end
end
end
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 @@ -204,7 +204,7 @@ def _to_hash(value)
# customized data_parser
def parse_date(datestring)
seconds_since_epoch = datestring.scan(/[0-9]+/)[0].to_i / 1000.0
return Time.at(seconds_since_epoch).to_s
return Time.at(seconds_since_epoch).strftime('%Y-%m-%dT%l:%M:%S%z').to_s
end
end
end
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 @@ -212,7 +212,7 @@ def _to_hash(value)
# customized data_parser
def parse_date(datestring)
seconds_since_epoch = datestring.scan(/[0-9]+/)[0].to_i / 1000.0
return Time.at(seconds_since_epoch).to_s
return Time.at(seconds_since_epoch).strftime('%Y-%m-%dT%l:%M:%S%z').to_s
end
end
end
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 @@ -274,7 +274,7 @@ def _to_hash(value)
# customized data_parser
def parse_date(datestring)
seconds_since_epoch = datestring.scan(/[0-9]+/)[0].to_i / 1000.0
return Time.at(seconds_since_epoch).to_s
return Time.at(seconds_since_epoch).strftime('%Y-%m-%dT%l:%M:%S%z').to_s
end
end
end
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 @@ -342,7 +342,7 @@ def _to_hash(value)
# customized data_parser
def parse_date(datestring)
seconds_since_epoch = datestring.scan(/[0-9]+/)[0].to_i / 1000.0
return Time.at(seconds_since_epoch).to_s
return Time.at(seconds_since_epoch).strftime('%Y-%m-%dT%l:%M:%S%z').to_s
end
end
end
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 @@ -204,7 +204,7 @@ def _to_hash(value)
# customized data_parser
def parse_date(datestring)
seconds_since_epoch = datestring.scan(/[0-9]+/)[0].to_i / 1000.0
return Time.at(seconds_since_epoch).to_s
return Time.at(seconds_since_epoch).strftime('%Y-%m-%dT%l:%M:%S%z').to_s
end
end
end
2 changes: 1 addition & 1 deletion lib/xero-ruby/models/accounting/error.rb
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def _to_hash(value)
# customized data_parser
def parse_date(datestring)
seconds_since_epoch = datestring.scan(/[0-9]+/)[0].to_i / 1000.0
return Time.at(seconds_since_epoch).to_s
return Time.at(seconds_since_epoch).strftime('%Y-%m-%dT%l:%M:%S%z').to_s
end
end
end
2 changes: 1 addition & 1 deletion lib/xero-ruby/models/accounting/expense_claim.rb
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ def _to_hash(value)
# customized data_parser
def parse_date(datestring)
seconds_since_epoch = datestring.scan(/[0-9]+/)[0].to_i / 1000.0
return Time.at(seconds_since_epoch).to_s
return Time.at(seconds_since_epoch).strftime('%Y-%m-%dT%l:%M:%S%z').to_s
end
end
end
2 changes: 1 addition & 1 deletion lib/xero-ruby/models/accounting/expense_claims.rb
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def _to_hash(value)
# customized data_parser
def parse_date(datestring)
seconds_since_epoch = datestring.scan(/[0-9]+/)[0].to_i / 1000.0
return Time.at(seconds_since_epoch).to_s
return Time.at(seconds_since_epoch).strftime('%Y-%m-%dT%l:%M:%S%z').to_s
end
end
end
2 changes: 1 addition & 1 deletion lib/xero-ruby/models/accounting/external_link.rb
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ def _to_hash(value)
# customized data_parser
def parse_date(datestring)
seconds_since_epoch = datestring.scan(/[0-9]+/)[0].to_i / 1000.0
return Time.at(seconds_since_epoch).to_s
return Time.at(seconds_since_epoch).strftime('%Y-%m-%dT%l:%M:%S%z').to_s
end
end
end
2 changes: 1 addition & 1 deletion lib/xero-ruby/models/accounting/history_record.rb
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ def _to_hash(value)
# customized data_parser
def parse_date(datestring)
seconds_since_epoch = datestring.scan(/[0-9]+/)[0].to_i / 1000.0
return Time.at(seconds_since_epoch).to_s
return Time.at(seconds_since_epoch).strftime('%Y-%m-%dT%l:%M:%S%z').to_s
end
end
end
2 changes: 1 addition & 1 deletion lib/xero-ruby/models/accounting/history_records.rb
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def _to_hash(value)
# customized data_parser
def parse_date(datestring)
seconds_since_epoch = datestring.scan(/[0-9]+/)[0].to_i / 1000.0
return Time.at(seconds_since_epoch).to_s
return Time.at(seconds_since_epoch).strftime('%Y-%m-%dT%l:%M:%S%z').to_s
end
end
end
2 changes: 1 addition & 1 deletion lib/xero-ruby/models/accounting/invoice.rb
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ def _to_hash(value)
# customized data_parser
def parse_date(datestring)
seconds_since_epoch = datestring.scan(/[0-9]+/)[0].to_i / 1000.0
return Time.at(seconds_since_epoch).to_s
return Time.at(seconds_since_epoch).strftime('%Y-%m-%dT%l:%M:%S%z').to_s
end
end
end
2 changes: 1 addition & 1 deletion lib/xero-ruby/models/accounting/invoice_reminder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def _to_hash(value)
# customized data_parser
def parse_date(datestring)
seconds_since_epoch = datestring.scan(/[0-9]+/)[0].to_i / 1000.0
return Time.at(seconds_since_epoch).to_s
return Time.at(seconds_since_epoch).strftime('%Y-%m-%dT%l:%M:%S%z').to_s
end
end
end
2 changes: 1 addition & 1 deletion lib/xero-ruby/models/accounting/invoice_reminders.rb
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def _to_hash(value)
# customized data_parser
def parse_date(datestring)
seconds_since_epoch = datestring.scan(/[0-9]+/)[0].to_i / 1000.0
return Time.at(seconds_since_epoch).to_s
return Time.at(seconds_since_epoch).strftime('%Y-%m-%dT%l:%M:%S%z').to_s
end
end
end
Loading

0 comments on commit 2c5531f

Please sign in to comment.