xero-ruby 3.3.0 → 3.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/xero-ruby/api/accounting_api.rb +86 -2
- data/lib/xero-ruby/api/finance_api.rb +961 -0
- data/lib/xero-ruby/api/payroll_au_api.rb +14 -14
- data/lib/xero-ruby/api/payroll_nz_api.rb +18 -12
- data/lib/xero-ruby/api/payroll_uk_api.rb +16 -4
- data/lib/xero-ruby/api_client.rb +13 -2
- data/lib/xero-ruby/configuration.rb +2 -0
- data/lib/xero-ruby/models/accounting/account.rb +34 -34
- data/lib/xero-ruby/models/accounting/account_type.rb +22 -22
- data/lib/xero-ruby/models/accounting/action.rb +2 -2
- data/lib/xero-ruby/models/accounting/address.rb +2 -2
- data/lib/xero-ruby/models/accounting/address_for_organisation.rb +3 -3
- data/lib/xero-ruby/models/accounting/bank_transaction.rb +11 -11
- data/lib/xero-ruby/models/accounting/bank_transfer.rb +35 -1
- data/lib/xero-ruby/models/accounting/batch_payment.rb +4 -4
- data/lib/xero-ruby/models/accounting/branding_theme.rb +1 -1
- data/lib/xero-ruby/models/accounting/budget.rb +2 -2
- data/lib/xero-ruby/models/accounting/budget_balance.rb +2 -2
- data/lib/xero-ruby/models/accounting/contact.rb +89 -4
- data/lib/xero-ruby/models/accounting/contact_group.rb +2 -2
- data/lib/xero-ruby/models/accounting/country_code.rb +240 -240
- data/lib/xero-ruby/models/accounting/credit_note.rb +8 -8
- data/lib/xero-ruby/models/accounting/currency_code.rb +166 -166
- data/lib/xero-ruby/models/accounting/employee.rb +4 -4
- data/lib/xero-ruby/models/accounting/expense_claim.rb +5 -5
- data/lib/xero-ruby/models/accounting/external_link.rb +5 -5
- data/lib/xero-ruby/models/accounting/invoice.rb +14 -14
- data/lib/xero-ruby/models/accounting/journal.rb +25 -25
- data/lib/xero-ruby/models/accounting/line_amount_types.rb +3 -3
- data/lib/xero-ruby/models/accounting/line_item.rb +11 -1
- data/lib/xero-ruby/models/accounting/line_item_item.rb +272 -0
- data/lib/xero-ruby/models/accounting/linked_transaction.rb +8 -8
- data/lib/xero-ruby/models/accounting/manual_journal.rb +5 -5
- data/lib/xero-ruby/models/accounting/organisation.rb +79 -76
- data/lib/xero-ruby/models/accounting/overpayment.rb +6 -6
- data/lib/xero-ruby/models/accounting/payment.rb +10 -10
- data/lib/xero-ruby/models/accounting/payment_term_type.rb +4 -4
- data/lib/xero-ruby/models/accounting/phone.rb +5 -5
- data/lib/xero-ruby/models/accounting/prepayment.rb +7 -7
- data/lib/xero-ruby/models/accounting/purchase_order.rb +5 -5
- data/lib/xero-ruby/models/accounting/quote_line_amount_types.rb +3 -3
- data/lib/xero-ruby/models/accounting/quote_status_codes.rb +6 -6
- data/lib/xero-ruby/models/accounting/receipt.rb +5 -5
- data/lib/xero-ruby/models/accounting/repeating_invoice.rb +5 -5
- data/lib/xero-ruby/models/accounting/report.rb +1 -1
- data/lib/xero-ruby/models/accounting/row_type.rb +4 -4
- data/lib/xero-ruby/models/accounting/schedule.rb +8 -8
- data/lib/xero-ruby/models/accounting/tax_rate.rb +87 -80
- data/lib/xero-ruby/models/accounting/tax_type.rb +66 -59
- data/lib/xero-ruby/models/accounting/time_zone.rb +109 -109
- data/lib/xero-ruby/models/accounting/tracking_category.rb +3 -3
- data/lib/xero-ruby/models/accounting/tracking_option.rb +3 -3
- data/lib/xero-ruby/models/accounting/user.rb +7 -7
- data/lib/xero-ruby/models/app_store/plan.rb +6 -5
- data/lib/xero-ruby/models/app_store/product.rb +30 -9
- data/lib/xero-ruby/models/app_store/subscription.rb +37 -0
- data/lib/xero-ruby/models/app_store/subscription_item.rb +63 -1
- data/lib/xero-ruby/models/assets/asset_status.rb +3 -3
- data/lib/xero-ruby/models/assets/asset_status_query_param.rb +3 -3
- data/lib/xero-ruby/models/assets/book_depreciation_setting.rb +11 -11
- data/lib/xero-ruby/models/files/object_group.rb +12 -11
- data/lib/xero-ruby/models/files/object_type.rb +56 -55
- data/lib/xero-ruby/models/finance/account_usage.rb +342 -0
- data/lib/xero-ruby/models/finance/account_usage_response.rb +254 -0
- data/lib/xero-ruby/models/finance/balance_sheet_account_detail.rb +262 -0
- data/lib/xero-ruby/models/finance/balance_sheet_account_group.rb +234 -0
- data/lib/xero-ruby/models/finance/balance_sheet_account_type.rb +244 -0
- data/lib/xero-ruby/models/finance/balance_sheet_response.rb +252 -0
- data/lib/xero-ruby/models/finance/bank_statement_accounting_response.rb +254 -0
- data/lib/xero-ruby/models/finance/bank_statement_response.rb +232 -0
- data/lib/xero-ruby/models/finance/bank_transaction_response.rb +274 -0
- data/lib/xero-ruby/models/finance/cash_account_response.rb +262 -0
- data/lib/xero-ruby/models/finance/cash_balance.rb +242 -0
- data/lib/xero-ruby/models/finance/cash_validation_response.rb +262 -0
- data/lib/xero-ruby/models/finance/cashflow_account.rb +282 -0
- data/lib/xero-ruby/models/finance/cashflow_activity.rb +244 -0
- data/lib/xero-ruby/models/finance/cashflow_response.rb +254 -0
- data/lib/xero-ruby/models/finance/cashflow_type.rb +244 -0
- data/lib/xero-ruby/models/finance/contact_detail.rb +274 -0
- data/lib/xero-ruby/models/finance/contact_response.rb +232 -0
- data/lib/xero-ruby/models/finance/contact_total_detail.rb +242 -0
- data/lib/xero-ruby/models/finance/contact_total_other.rb +252 -0
- data/lib/xero-ruby/models/finance/credit_note_response.rb +254 -0
- data/lib/xero-ruby/models/finance/current_statement_response.rb +272 -0
- data/lib/xero-ruby/models/finance/data_source_response.rb +362 -0
- data/lib/xero-ruby/models/finance/history_record_response.rb +262 -0
- data/lib/xero-ruby/models/finance/income_by_contact_response.rb +284 -0
- data/lib/xero-ruby/models/finance/invoice_response.rb +254 -0
- data/lib/xero-ruby/models/finance/line_item_response.rb +252 -0
- data/lib/xero-ruby/models/finance/lock_history_model.rb +242 -0
- data/lib/xero-ruby/models/finance/lock_history_response.rb +244 -0
- data/lib/xero-ruby/models/finance/manual_journal_total.rb +222 -0
- data/lib/xero-ruby/models/finance/overpayment_response.rb +254 -0
- data/lib/xero-ruby/models/finance/payment_response.rb +312 -0
- data/lib/xero-ruby/models/finance/pnl_account.rb +272 -0
- data/lib/xero-ruby/models/finance/pnl_account_class.rb +234 -0
- data/lib/xero-ruby/models/finance/pnl_account_type.rb +244 -0
- data/lib/xero-ruby/models/finance/practice_response.rb +262 -0
- data/lib/xero-ruby/models/finance/prepayment_response.rb +254 -0
- data/lib/xero-ruby/models/finance/problem.rb +252 -0
- data/lib/xero-ruby/models/finance/problem_type.rb +44 -0
- data/lib/xero-ruby/models/finance/profit_and_loss_response.rb +262 -0
- data/lib/xero-ruby/models/finance/report_history_model.rb +242 -0
- data/lib/xero-ruby/models/finance/report_history_response.rb +244 -0
- data/lib/xero-ruby/models/finance/statement_balance_response.rb +232 -0
- data/lib/xero-ruby/models/finance/statement_line_response.rb +346 -0
- data/lib/xero-ruby/models/finance/statement_lines_response.rb +382 -0
- data/lib/xero-ruby/models/finance/statement_response.rb +294 -0
- data/lib/xero-ruby/models/finance/total_detail.rb +242 -0
- data/lib/xero-ruby/models/finance/total_other.rb +242 -0
- data/lib/xero-ruby/models/finance/trial_balance_account.rb +312 -0
- data/lib/xero-ruby/models/finance/trial_balance_entry.rb +232 -0
- data/lib/xero-ruby/models/finance/trial_balance_movement.rb +252 -0
- data/lib/xero-ruby/models/finance/trial_balance_response.rb +244 -0
- data/lib/xero-ruby/models/finance/user_activities_response.rb +244 -0
- data/lib/xero-ruby/models/finance/user_response.rb +336 -0
- data/lib/xero-ruby/models/payroll_au/account_type.rb +23 -23
- data/lib/xero-ruby/models/payroll_au/allowance_category.rb +41 -0
- data/lib/xero-ruby/models/payroll_au/allowance_type.rb +10 -7
- data/lib/xero-ruby/models/payroll_au/calendar_type.rb +6 -6
- data/lib/xero-ruby/models/payroll_au/deduction_type.rb +3 -3
- data/lib/xero-ruby/models/payroll_au/deduction_type_calculation_type.rb +3 -3
- data/lib/xero-ruby/models/payroll_au/earnings_rate.rb +14 -4
- data/lib/xero-ruby/models/payroll_au/earnings_rate_calculation_type.rb +3 -3
- data/lib/xero-ruby/models/payroll_au/earnings_type.rb +12 -10
- data/lib/xero-ruby/models/payroll_au/employee.rb +11 -11
- data/lib/xero-ruby/models/payroll_au/employee_status.rb +2 -2
- data/lib/xero-ruby/models/payroll_au/employment_basis.rb +5 -5
- data/lib/xero-ruby/models/payroll_au/employment_termination_payment_type.rb +2 -2
- data/lib/xero-ruby/models/payroll_au/entitlement_final_pay_payout_type.rb +2 -2
- data/lib/xero-ruby/models/payroll_au/leave_line_calculation_type.rb +5 -5
- data/lib/xero-ruby/models/payroll_au/leave_period_status.rb +2 -2
- data/lib/xero-ruby/models/payroll_au/leave_type_contribution_type.rb +4 -4
- data/lib/xero-ruby/models/payroll_au/manual_tax_type.rb +6 -5
- data/lib/xero-ruby/models/payroll_au/pay_run_status.rb +2 -2
- data/lib/xero-ruby/models/payroll_au/payment_frequency_type.rb +7 -7
- data/lib/xero-ruby/models/payroll_au/rate_type.rb +3 -3
- data/lib/xero-ruby/models/payroll_au/residency_status.rb +3 -3
- data/lib/xero-ruby/models/payroll_au/state.rb +8 -8
- data/lib/xero-ruby/models/payroll_au/super_fund_type.rb +2 -2
- data/lib/xero-ruby/models/payroll_au/superannuation_calculation_type.rb +3 -3
- data/lib/xero-ruby/models/payroll_au/superannuation_contribution_type.rb +4 -4
- data/lib/xero-ruby/models/payroll_au/tfn_exemption_type.rb +4 -4
- data/lib/xero-ruby/models/payroll_au/timesheet_status.rb +5 -5
- data/lib/xero-ruby/models/payroll_nz/account.rb +4 -4
- data/lib/xero-ruby/models/payroll_nz/bank_account.rb +2 -2
- data/lib/xero-ruby/models/payroll_nz/benefit.rb +5 -5
- data/lib/xero-ruby/models/payroll_nz/calendar_type.rb +7 -7
- data/lib/xero-ruby/models/payroll_nz/deduction.rb +4 -4
- data/lib/xero-ruby/models/payroll_nz/earnings_rate.rb +18 -18
- data/lib/xero-ruby/models/payroll_nz/employee.rb +2 -2
- data/lib/xero-ruby/models/payroll_nz/employee_leave_type.rb +4 -4
- data/lib/xero-ruby/models/payroll_nz/employee_statutory_leave_balance.rb +6 -6
- data/lib/xero-ruby/models/payroll_nz/employee_statutory_leave_summary.rb +8 -8
- data/lib/xero-ruby/models/payroll_nz/employee_tax.rb +5 -5
- data/lib/xero-ruby/models/payroll_nz/leave_period.rb +2 -2
- data/lib/xero-ruby/models/payroll_nz/pay_run.rb +5 -5
- data/lib/xero-ruby/models/payroll_nz/pay_slip.rb +3 -3
- data/lib/xero-ruby/models/payroll_nz/payment_method.rb +3 -3
- data/lib/xero-ruby/models/payroll_nz/reimbursement.rb +8 -8
- data/lib/xero-ruby/models/payroll_nz/salary_and_wage.rb +5 -5
- data/lib/xero-ruby/models/payroll_nz/statutory_deduction_category.rb +11 -11
- data/lib/xero-ruby/models/payroll_nz/tax_code.rb +19 -19
- data/lib/xero-ruby/models/payroll_nz/tax_settings.rb +2 -2
- data/lib/xero-ruby/models/payroll_nz/timesheet.rb +4 -4
- data/lib/xero-ruby/models/payroll_uk/account.rb +7 -7
- data/lib/xero-ruby/models/payroll_uk/benefit.rb +4 -4
- data/lib/xero-ruby/models/payroll_uk/deduction.rb +12 -12
- data/lib/xero-ruby/models/payroll_uk/earnings_rate.rb +28 -28
- data/lib/xero-ruby/models/payroll_uk/employee.rb +16 -6
- data/lib/xero-ruby/models/payroll_uk/employee_leave_type.rb +4 -4
- data/lib/xero-ruby/models/payroll_uk/employee_statutory_leave_balance.rb +6 -6
- data/lib/xero-ruby/models/payroll_uk/employee_statutory_leave_summary.rb +8 -8
- data/lib/xero-ruby/models/payroll_uk/employment.rb +15 -10
- data/lib/xero-ruby/models/payroll_uk/leave_period.rb +2 -2
- data/lib/xero-ruby/models/payroll_uk/pay_run.rb +11 -11
- data/lib/xero-ruby/models/payroll_uk/pay_run_calendar.rb +6 -6
- data/lib/xero-ruby/models/payroll_uk/payment_method.rb +3 -3
- data/lib/xero-ruby/models/payroll_uk/payslip.rb +3 -3
- data/lib/xero-ruby/models/payroll_uk/salary_and_wage.rb +5 -5
- data/lib/xero-ruby/models/payroll_uk/statutory_deduction_category.rb +14 -14
- data/lib/xero-ruby/models/payroll_uk/timesheet.rb +3 -3
- data/lib/xero-ruby/models/projects/charge_type.rb +3 -3
- data/lib/xero-ruby/models/projects/currency_code.rb +164 -164
- data/lib/xero-ruby/models/projects/project_status.rb +2 -2
- data/lib/xero-ruby/models/projects/task.rb +3 -3
- data/lib/xero-ruby/models/projects/time_entry.rb +3 -3
- data/lib/xero-ruby/version.rb +2 -2
- data/lib/xero-ruby.rb +57 -0
- data/spec/api_client_spec.rb +3 -0
- data/spec/app_store/api/app_store_api_spec.rb +1 -1
- data/spec/configuration_spec.rb +1 -0
- data/spec/finance/api/finance_api_spec.rb +156 -0
- data/spec/finance/models/account_usage_response_spec.rb +58 -0
- data/spec/finance/models/account_usage_spec.rb +112 -0
- data/spec/finance/models/balance_sheet_account_detail_spec.rb +64 -0
- data/spec/finance/models/balance_sheet_account_group_spec.rb +46 -0
- data/spec/finance/models/balance_sheet_account_type_spec.rb +52 -0
- data/spec/finance/models/balance_sheet_response_spec.rb +58 -0
- data/spec/finance/models/bank_statement_response_spec.rb +46 -0
- data/spec/finance/models/cash_account_response_spec.rb +64 -0
- data/spec/finance/models/cash_balance_spec.rb +52 -0
- data/spec/finance/models/cash_validation_response_spec.rb +64 -0
- data/spec/finance/models/cashflow_account_spec.rb +76 -0
- data/spec/finance/models/cashflow_activity_spec.rb +52 -0
- data/spec/finance/models/cashflow_response_spec.rb +58 -0
- data/spec/finance/models/cashflow_type_spec.rb +52 -0
- data/spec/finance/models/current_statement_response_spec.rb +70 -0
- data/spec/finance/models/data_source_response_spec.rb +124 -0
- data/spec/finance/models/history_record_response_spec.rb +64 -0
- data/spec/finance/models/lock_history_model_spec.rb +52 -0
- data/spec/finance/models/lock_history_response_spec.rb +52 -0
- data/spec/finance/models/pnl_account_class_spec.rb +46 -0
- data/spec/finance/models/pnl_account_spec.rb +70 -0
- data/spec/finance/models/pnl_account_type_spec.rb +52 -0
- data/spec/finance/models/practice_response_spec.rb +64 -0
- data/spec/finance/models/problem_spec.rb +58 -0
- data/spec/finance/models/problem_type_spec.rb +34 -0
- data/spec/finance/models/profit_and_loss_response_spec.rb +64 -0
- data/spec/finance/models/report_history_model_spec.rb +52 -0
- data/spec/finance/models/report_history_response_spec.rb +52 -0
- data/spec/finance/models/statement_balance_response_spec.rb +46 -0
- data/spec/finance/models/statement_lines_response_spec.rb +136 -0
- data/spec/finance/models/trial_balance_account_spec.rb +94 -0
- data/spec/finance/models/trial_balance_entry_spec.rb +46 -0
- data/spec/finance/models/trial_balance_movement_spec.rb +58 -0
- data/spec/finance/models/trial_balance_response_spec.rb +52 -0
- data/spec/finance/models/user_activities_response_spec.rb +52 -0
- data/spec/finance/models/user_response_spec.rb +106 -0
- metadata +134 -3
@@ -633,7 +633,7 @@ module XeroRuby
|
|
633
633
|
# Searches payroll employees
|
634
634
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
635
635
|
# @param [Hash] opts the optional parameters
|
636
|
-
# @option opts [
|
636
|
+
# @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
|
637
637
|
# @option opts [String] :where Filter by an any element
|
638
638
|
# @option opts [String] :order Order by an any element
|
639
639
|
# @option opts [Integer] :page e.g. page=1 – Up to 100 employees will be returned in a single API call
|
@@ -646,7 +646,7 @@ module XeroRuby
|
|
646
646
|
# Searches payroll employees
|
647
647
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
648
648
|
# @param [Hash] opts the optional parameters
|
649
|
-
# @option opts [
|
649
|
+
# @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
|
650
650
|
# @option opts [String] :where Filter by an any element
|
651
651
|
# @option opts [String] :order Order by an any element
|
652
652
|
# @option opts [Integer] :page e.g. page=1 – Up to 100 employees will be returned in a single API call
|
@@ -789,7 +789,7 @@ module XeroRuby
|
|
789
789
|
# Retrieves leave applications
|
790
790
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
791
791
|
# @param [Hash] opts the optional parameters
|
792
|
-
# @option opts [
|
792
|
+
# @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
|
793
793
|
# @option opts [String] :where Filter by an any element
|
794
794
|
# @option opts [String] :order Order by an any element
|
795
795
|
# @option opts [Integer] :page e.g. page=1 – Up to 100 objects will be returned in a single API call
|
@@ -802,7 +802,7 @@ module XeroRuby
|
|
802
802
|
# Retrieves leave applications
|
803
803
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
804
804
|
# @param [Hash] opts the optional parameters
|
805
|
-
# @option opts [
|
805
|
+
# @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
|
806
806
|
# @option opts [String] :where Filter by an any element
|
807
807
|
# @option opts [String] :order Order by an any element
|
808
808
|
# @option opts [Integer] :page e.g. page=1 – Up to 100 objects will be returned in a single API call
|
@@ -870,7 +870,7 @@ module XeroRuby
|
|
870
870
|
# Retrieves pay items
|
871
871
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
872
872
|
# @param [Hash] opts the optional parameters
|
873
|
-
# @option opts [
|
873
|
+
# @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
|
874
874
|
# @option opts [String] :where Filter by an any element
|
875
875
|
# @option opts [String] :order Order by an any element
|
876
876
|
# @option opts [Integer] :page e.g. page=1 – Up to 100 objects will be returned in a single API call
|
@@ -883,7 +883,7 @@ module XeroRuby
|
|
883
883
|
# Retrieves pay items
|
884
884
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
885
885
|
# @param [Hash] opts the optional parameters
|
886
|
-
# @option opts [
|
886
|
+
# @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
|
887
887
|
# @option opts [String] :where Filter by an any element
|
888
888
|
# @option opts [String] :order Order by an any element
|
889
889
|
# @option opts [Integer] :page e.g. page=1 – Up to 100 objects will be returned in a single API call
|
@@ -1026,7 +1026,7 @@ module XeroRuby
|
|
1026
1026
|
# Retrieves pay runs
|
1027
1027
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
1028
1028
|
# @param [Hash] opts the optional parameters
|
1029
|
-
# @option opts [
|
1029
|
+
# @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
|
1030
1030
|
# @option opts [String] :where Filter by an any element
|
1031
1031
|
# @option opts [String] :order Order by an any element
|
1032
1032
|
# @option opts [Integer] :page e.g. page=1 – Up to 100 PayRuns will be returned in a single API call
|
@@ -1039,7 +1039,7 @@ module XeroRuby
|
|
1039
1039
|
# Retrieves pay runs
|
1040
1040
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
1041
1041
|
# @param [Hash] opts the optional parameters
|
1042
|
-
# @option opts [
|
1042
|
+
# @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
|
1043
1043
|
# @option opts [String] :where Filter by an any element
|
1044
1044
|
# @option opts [String] :order Order by an any element
|
1045
1045
|
# @option opts [Integer] :page e.g. page=1 – Up to 100 PayRuns will be returned in a single API call
|
@@ -1182,7 +1182,7 @@ module XeroRuby
|
|
1182
1182
|
# Retrieves payroll calendars
|
1183
1183
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
1184
1184
|
# @param [Hash] opts the optional parameters
|
1185
|
-
# @option opts [
|
1185
|
+
# @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
|
1186
1186
|
# @option opts [String] :where Filter by an any element
|
1187
1187
|
# @option opts [String] :order Order by an any element
|
1188
1188
|
# @option opts [Integer] :page e.g. page=1 – Up to 100 objects will be returned in a single API call
|
@@ -1195,7 +1195,7 @@ module XeroRuby
|
|
1195
1195
|
# Retrieves payroll calendars
|
1196
1196
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
1197
1197
|
# @param [Hash] opts the optional parameters
|
1198
|
-
# @option opts [
|
1198
|
+
# @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
|
1199
1199
|
# @option opts [String] :where Filter by an any element
|
1200
1200
|
# @option opts [String] :order Order by an any element
|
1201
1201
|
# @option opts [Integer] :page e.g. page=1 – Up to 100 objects will be returned in a single API call
|
@@ -1557,7 +1557,7 @@ module XeroRuby
|
|
1557
1557
|
# Retrieves superfunds
|
1558
1558
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
1559
1559
|
# @param [Hash] opts the optional parameters
|
1560
|
-
# @option opts [
|
1560
|
+
# @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
|
1561
1561
|
# @option opts [String] :where Filter by an any element
|
1562
1562
|
# @option opts [String] :order Order by an any element
|
1563
1563
|
# @option opts [Integer] :page e.g. page=1 – Up to 100 SuperFunds will be returned in a single API call
|
@@ -1570,7 +1570,7 @@ module XeroRuby
|
|
1570
1570
|
# Retrieves superfunds
|
1571
1571
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
1572
1572
|
# @param [Hash] opts the optional parameters
|
1573
|
-
# @option opts [
|
1573
|
+
# @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
|
1574
1574
|
# @option opts [String] :where Filter by an any element
|
1575
1575
|
# @option opts [String] :order Order by an any element
|
1576
1576
|
# @option opts [Integer] :page e.g. page=1 – Up to 100 SuperFunds will be returned in a single API call
|
@@ -1713,7 +1713,7 @@ module XeroRuby
|
|
1713
1713
|
# Retrieves timesheets
|
1714
1714
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
1715
1715
|
# @param [Hash] opts the optional parameters
|
1716
|
-
# @option opts [
|
1716
|
+
# @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
|
1717
1717
|
# @option opts [String] :where Filter by an any element
|
1718
1718
|
# @option opts [String] :order Order by an any element
|
1719
1719
|
# @option opts [Integer] :page e.g. page=1 – Up to 100 timesheets will be returned in a single API call
|
@@ -1726,7 +1726,7 @@ module XeroRuby
|
|
1726
1726
|
# Retrieves timesheets
|
1727
1727
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
1728
1728
|
# @param [Hash] opts the optional parameters
|
1729
|
-
# @option opts [
|
1729
|
+
# @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
|
1730
1730
|
# @option opts [String] :where Filter by an any element
|
1731
1731
|
# @option opts [String] :order Order by an any element
|
1732
1732
|
# @option opts [Integer] :page e.g. page=1 – Up to 100 timesheets will be returned in a single API call
|
@@ -3150,8 +3150,7 @@ module XeroRuby
|
|
3150
3150
|
# Retrieves employees
|
3151
3151
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
3152
3152
|
# @param [Hash] opts the optional parameters
|
3153
|
-
# @option opts [String] :
|
3154
|
-
# @option opts [String] :last_name Filter by last name
|
3153
|
+
# @option opts [String] :filter Filter by first name and/or lastname
|
3155
3154
|
# @option opts [Integer] :page Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
|
3156
3155
|
# @return [Employees]
|
3157
3156
|
def get_employees(xero_tenant_id, opts = {})
|
@@ -3162,8 +3161,7 @@ module XeroRuby
|
|
3162
3161
|
# Retrieves employees
|
3163
3162
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
3164
3163
|
# @param [Hash] opts the optional parameters
|
3165
|
-
# @option opts [String] :
|
3166
|
-
# @option opts [String] :last_name Filter by last name
|
3164
|
+
# @option opts [String] :filter Filter by first name and/or lastname
|
3167
3165
|
# @option opts [Integer] :page Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
|
3168
3166
|
# @return [Array<(Employees, Integer, Hash)>] Employees data, response status code and response headers
|
3169
3167
|
def get_employees_with_http_info(xero_tenant_id, options = {})
|
@@ -3183,8 +3181,7 @@ module XeroRuby
|
|
3183
3181
|
|
3184
3182
|
# query parameters
|
3185
3183
|
query_params = opts[:query_params] || {}
|
3186
|
-
query_params[:'
|
3187
|
-
query_params[:'lastName'] = opts[:'last_name'] if !opts[:'last_name'].nil?
|
3184
|
+
query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
|
3188
3185
|
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
3189
3186
|
|
3190
3187
|
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
@@ -4419,8 +4416,11 @@ module XeroRuby
|
|
4419
4416
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
4420
4417
|
# @param [Hash] opts the optional parameters
|
4421
4418
|
# @option opts [Integer] :page Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
|
4422
|
-
# @option opts [String] :
|
4423
|
-
# @option opts [String] :
|
4419
|
+
# @option opts [String] :filter Filter by employeeId and/or payrollCalendarId
|
4420
|
+
# @option opts [String] :status filter results by any timesheets with a matching timesheet status
|
4421
|
+
# @option opts [String] :start_date filter results by any timesheets with a startDate on or after the provided date
|
4422
|
+
# @option opts [String] :end_date filter results by any timesheets with a endDate on or before the provided date
|
4423
|
+
# @option opts [String] :sort sort the order of timesheets returned. The default is based on the timesheets createdDate, sorted oldest to newest. Currently, the only other option is to reverse the order based on the timesheets startDate, sorted newest to oldest.
|
4424
4424
|
# @return [Timesheets]
|
4425
4425
|
def get_timesheets(xero_tenant_id, opts = {})
|
4426
4426
|
data, _status_code, _headers = get_timesheets_with_http_info(xero_tenant_id, opts)
|
@@ -4431,8 +4431,11 @@ module XeroRuby
|
|
4431
4431
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
4432
4432
|
# @param [Hash] opts the optional parameters
|
4433
4433
|
# @option opts [Integer] :page Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
|
4434
|
-
# @option opts [String] :
|
4435
|
-
# @option opts [String] :
|
4434
|
+
# @option opts [String] :filter Filter by employeeId and/or payrollCalendarId
|
4435
|
+
# @option opts [String] :status filter results by any timesheets with a matching timesheet status
|
4436
|
+
# @option opts [String] :start_date filter results by any timesheets with a startDate on or after the provided date
|
4437
|
+
# @option opts [String] :end_date filter results by any timesheets with a endDate on or before the provided date
|
4438
|
+
# @option opts [String] :sort sort the order of timesheets returned. The default is based on the timesheets createdDate, sorted oldest to newest. Currently, the only other option is to reverse the order based on the timesheets startDate, sorted newest to oldest.
|
4436
4439
|
# @return [Array<(Timesheets, Integer, Hash)>] Timesheets data, response status code and response headers
|
4437
4440
|
def get_timesheets_with_http_info(xero_tenant_id, options = {})
|
4438
4441
|
opts = options.dup
|
@@ -4452,8 +4455,11 @@ module XeroRuby
|
|
4452
4455
|
# query parameters
|
4453
4456
|
query_params = opts[:query_params] || {}
|
4454
4457
|
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
4455
|
-
query_params[:'
|
4456
|
-
query_params[:'
|
4458
|
+
query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
|
4459
|
+
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
4460
|
+
query_params[:'startDate'] = opts[:'start_date'] if !opts[:'start_date'].nil?
|
4461
|
+
query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil?
|
4462
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
4457
4463
|
|
4458
4464
|
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
4459
4465
|
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
@@ -3594,7 +3594,7 @@ module XeroRuby
|
|
3594
3594
|
# Retrieves employees
|
3595
3595
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
3596
3596
|
# @param [Hash] opts the optional parameters
|
3597
|
-
# @option opts [String] :filter Filter by first name and/or
|
3597
|
+
# @option opts [String] :filter Filter by first name, lastname, and/or whether they are an off-payroll worker
|
3598
3598
|
# @option opts [Integer] :page Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
|
3599
3599
|
# @return [Employees]
|
3600
3600
|
def get_employees(xero_tenant_id, opts = {})
|
@@ -3605,7 +3605,7 @@ module XeroRuby
|
|
3605
3605
|
# Retrieves employees
|
3606
3606
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
3607
3607
|
# @param [Hash] opts the optional parameters
|
3608
|
-
# @option opts [String] :filter Filter by first name and/or
|
3608
|
+
# @option opts [String] :filter Filter by first name, lastname, and/or whether they are an off-payroll worker
|
3609
3609
|
# @option opts [Integer] :page Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
|
3610
3610
|
# @return [Array<(Employees, Integer, Hash)>] Employees data, response status code and response headers
|
3611
3611
|
def get_employees_with_http_info(xero_tenant_id, options = {})
|
@@ -4644,7 +4644,11 @@ module XeroRuby
|
|
4644
4644
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
4645
4645
|
# @param [Hash] opts the optional parameters
|
4646
4646
|
# @option opts [Integer] :page Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
|
4647
|
-
# @option opts [String] :filter Filter by
|
4647
|
+
# @option opts [String] :filter Filter by employeeId and/or payrollCalendarId
|
4648
|
+
# @option opts [String] :status filter results by any timesheets with a matching timesheet status
|
4649
|
+
# @option opts [String] :start_date filter results by any timesheets with a startDate on or after the provided date
|
4650
|
+
# @option opts [String] :end_date filter results by any timesheets with a endDate on or before the provided date
|
4651
|
+
# @option opts [String] :sort sort the order of timesheets returned. The default is based on the timesheets createdDate, sorted oldest to newest. Currently, the only other option is to reverse the order based on the timesheets startDate, sorted newest to oldest.
|
4648
4652
|
# @return [Timesheets]
|
4649
4653
|
def get_timesheets(xero_tenant_id, opts = {})
|
4650
4654
|
data, _status_code, _headers = get_timesheets_with_http_info(xero_tenant_id, opts)
|
@@ -4655,7 +4659,11 @@ module XeroRuby
|
|
4655
4659
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
4656
4660
|
# @param [Hash] opts the optional parameters
|
4657
4661
|
# @option opts [Integer] :page Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
|
4658
|
-
# @option opts [String] :filter Filter by
|
4662
|
+
# @option opts [String] :filter Filter by employeeId and/or payrollCalendarId
|
4663
|
+
# @option opts [String] :status filter results by any timesheets with a matching timesheet status
|
4664
|
+
# @option opts [String] :start_date filter results by any timesheets with a startDate on or after the provided date
|
4665
|
+
# @option opts [String] :end_date filter results by any timesheets with a endDate on or before the provided date
|
4666
|
+
# @option opts [String] :sort sort the order of timesheets returned. The default is based on the timesheets createdDate, sorted oldest to newest. Currently, the only other option is to reverse the order based on the timesheets startDate, sorted newest to oldest.
|
4659
4667
|
# @return [Array<(Timesheets, Integer, Hash)>] Timesheets data, response status code and response headers
|
4660
4668
|
def get_timesheets_with_http_info(xero_tenant_id, options = {})
|
4661
4669
|
opts = options.dup
|
@@ -4676,6 +4684,10 @@ module XeroRuby
|
|
4676
4684
|
query_params = opts[:query_params] || {}
|
4677
4685
|
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
4678
4686
|
query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
|
4687
|
+
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
4688
|
+
query_params[:'startDate'] = opts[:'start_date'] if !opts[:'start_date'].nil?
|
4689
|
+
query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil?
|
4690
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
4679
4691
|
|
4680
4692
|
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
4681
4693
|
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
data/lib/xero-ruby/api_client.rb
CHANGED
@@ -110,6 +110,11 @@ module XeroRuby
|
|
110
110
|
XeroRuby::AppStoreApi.new(self)
|
111
111
|
end
|
112
112
|
|
113
|
+
def finance_api
|
114
|
+
@config.base_url = @config.finance_url
|
115
|
+
XeroRuby::FinanceApi.new(self)
|
116
|
+
end
|
117
|
+
|
113
118
|
# Token Helpers
|
114
119
|
def token_set
|
115
120
|
@config.token_set
|
@@ -183,7 +188,7 @@ module XeroRuby
|
|
183
188
|
end
|
184
189
|
|
185
190
|
def validate_state(params)
|
186
|
-
if params[
|
191
|
+
if params['state'] != @state
|
187
192
|
raise StandardError.new "WARNING: @config.state: #{@state} and OAuth callback state: #{params['state']} do not match!"
|
188
193
|
end
|
189
194
|
return true
|
@@ -284,12 +289,16 @@ module XeroRuby
|
|
284
289
|
method_base_url = @config.payroll_uk_url
|
285
290
|
when "ProjectApi"
|
286
291
|
method_base_url = @config.project_url
|
292
|
+
when "AppStoreApi"
|
293
|
+
method_base_url = @config.app_store_url
|
294
|
+
when "FinanceApi"
|
295
|
+
method_base_url = @config.finance_url
|
287
296
|
else
|
288
297
|
method_base_url = @config.accounting_url
|
289
298
|
end
|
290
299
|
|
291
300
|
connection = Faraday.new(:url => method_base_url, :ssl => ssl_options) do |conn|
|
292
|
-
conn.basic_auth
|
301
|
+
conn.request(:basic_auth, config.username, config.password)
|
293
302
|
if opts[:header_params]["Content-Type"] == "multipart/form-data"
|
294
303
|
conn.request :multipart
|
295
304
|
conn.request :url_encoded
|
@@ -508,6 +517,8 @@ module XeroRuby
|
|
508
517
|
XeroRuby::PayrollUk.const_get(return_type).build_from_hash(data)
|
509
518
|
when 'AppStoreApi'
|
510
519
|
XeroRuby::AppStore.const_get(return_type).build_from_hash(data)
|
520
|
+
when 'FinanceApi'
|
521
|
+
XeroRuby::Finance.const_get(return_type).build_from_hash(data)
|
511
522
|
else
|
512
523
|
XeroRuby::Accounting.const_get(return_type).build_from_hash(data)
|
513
524
|
end
|
@@ -34,6 +34,7 @@ module XeroRuby
|
|
34
34
|
attr_accessor :payroll_nz_url
|
35
35
|
attr_accessor :payroll_uk_url
|
36
36
|
attr_accessor :app_store_url
|
37
|
+
attr_accessor :finance_url
|
37
38
|
|
38
39
|
# Defines API keys used with API Key authentications.
|
39
40
|
#
|
@@ -151,6 +152,7 @@ module XeroRuby
|
|
151
152
|
@payroll_nz_url = 'https://api.xero.com/payroll.xro/2.0/'
|
152
153
|
@payroll_uk_url = 'https://api.xero.com/payroll.xro/2.0/'
|
153
154
|
@app_store_url = 'https://api.xero.com/appstore/2.0/'
|
155
|
+
@finance_url = 'https://api.xero.com/finance.xro/1.0/'
|
154
156
|
@access_token = nil
|
155
157
|
@id_token = nil
|
156
158
|
@api_key = {}
|
@@ -33,20 +33,20 @@ module XeroRuby::Accounting
|
|
33
33
|
|
34
34
|
# Accounts with a status of ACTIVE can be updated to ARCHIVED. See Account Status Codes
|
35
35
|
attr_accessor :status
|
36
|
-
ACTIVE
|
37
|
-
ARCHIVED
|
38
|
-
DELETED
|
36
|
+
ACTIVE ||= "ACTIVE".freeze
|
37
|
+
ARCHIVED ||= "ARCHIVED".freeze
|
38
|
+
DELETED ||= "DELETED".freeze
|
39
39
|
|
40
40
|
# Description of the Account. Valid for all types of accounts except bank accounts (max length = 4000)
|
41
41
|
attr_accessor :description
|
42
42
|
|
43
43
|
# For bank accounts only. See Bank Account types
|
44
44
|
attr_accessor :bank_account_type
|
45
|
-
BANK
|
46
|
-
CREDITCARD
|
47
|
-
PAYPAL
|
48
|
-
NONE
|
49
|
-
EMPTY
|
45
|
+
BANK ||= "BANK".freeze
|
46
|
+
CREDITCARD ||= "CREDITCARD".freeze
|
47
|
+
PAYPAL ||= "PAYPAL".freeze
|
48
|
+
NONE ||= "NONE".freeze
|
49
|
+
EMPTY ||= "".freeze
|
50
50
|
|
51
51
|
|
52
52
|
attr_accessor :currency_code
|
@@ -62,35 +62,35 @@ module XeroRuby::Accounting
|
|
62
62
|
|
63
63
|
# See Account Class Types
|
64
64
|
attr_accessor :_class
|
65
|
-
ASSET
|
66
|
-
EQUITY
|
67
|
-
EXPENSE
|
68
|
-
LIABILITY
|
69
|
-
REVENUE
|
65
|
+
ASSET ||= "ASSET".freeze
|
66
|
+
EQUITY ||= "EQUITY".freeze
|
67
|
+
EXPENSE ||= "EXPENSE".freeze
|
68
|
+
LIABILITY ||= "LIABILITY".freeze
|
69
|
+
REVENUE ||= "REVENUE".freeze
|
70
70
|
|
71
71
|
# If this is a system account then this element is returned. See System Account types. Note that non-system accounts may have this element set as either “” or null.
|
72
72
|
attr_accessor :system_account
|
73
|
-
DEBTORS
|
74
|
-
CREDITORS
|
75
|
-
BANKCURRENCYGAIN
|
76
|
-
GST
|
77
|
-
GSTONIMPORTS
|
78
|
-
HISTORICAL
|
79
|
-
REALISEDCURRENCYGAIN
|
80
|
-
RETAINEDEARNINGS
|
81
|
-
ROUNDING
|
82
|
-
TRACKINGTRANSFERS
|
83
|
-
UNPAIDEXPCLM
|
84
|
-
UNREALISEDCURRENCYGAIN
|
85
|
-
WAGEPAYABLES
|
86
|
-
CISASSETS
|
87
|
-
CISASSET
|
88
|
-
CISLABOUR
|
89
|
-
CISLABOUREXPENSE
|
90
|
-
CISLABOURINCOME
|
91
|
-
CISLIABILITY
|
92
|
-
CISMATERIALS
|
93
|
-
|
73
|
+
DEBTORS ||= "DEBTORS".freeze
|
74
|
+
CREDITORS ||= "CREDITORS".freeze
|
75
|
+
BANKCURRENCYGAIN ||= "BANKCURRENCYGAIN".freeze
|
76
|
+
GST ||= "GST".freeze
|
77
|
+
GSTONIMPORTS ||= "GSTONIMPORTS".freeze
|
78
|
+
HISTORICAL ||= "HISTORICAL".freeze
|
79
|
+
REALISEDCURRENCYGAIN ||= "REALISEDCURRENCYGAIN".freeze
|
80
|
+
RETAINEDEARNINGS ||= "RETAINEDEARNINGS".freeze
|
81
|
+
ROUNDING ||= "ROUNDING".freeze
|
82
|
+
TRACKINGTRANSFERS ||= "TRACKINGTRANSFERS".freeze
|
83
|
+
UNPAIDEXPCLM ||= "UNPAIDEXPCLM".freeze
|
84
|
+
UNREALISEDCURRENCYGAIN ||= "UNREALISEDCURRENCYGAIN".freeze
|
85
|
+
WAGEPAYABLES ||= "WAGEPAYABLES".freeze
|
86
|
+
CISASSETS ||= "CISASSETS".freeze
|
87
|
+
CISASSET ||= "CISASSET".freeze
|
88
|
+
CISLABOUR ||= "CISLABOUR".freeze
|
89
|
+
CISLABOUREXPENSE ||= "CISLABOUREXPENSE".freeze
|
90
|
+
CISLABOURINCOME ||= "CISLABOURINCOME".freeze
|
91
|
+
CISLIABILITY ||= "CISLIABILITY".freeze
|
92
|
+
CISMATERIALS ||= "CISMATERIALS".freeze
|
93
|
+
EMPTY ||= "".freeze
|
94
94
|
|
95
95
|
# Shown if set
|
96
96
|
attr_accessor :reporting_code
|
@@ -14,28 +14,28 @@ require 'date'
|
|
14
14
|
|
15
15
|
module XeroRuby::Accounting
|
16
16
|
class AccountType
|
17
|
-
BANK
|
18
|
-
CURRENT
|
19
|
-
CURRLIAB
|
20
|
-
DEPRECIATN
|
21
|
-
DIRECTCOSTS
|
22
|
-
EQUITY
|
23
|
-
EXPENSE
|
24
|
-
FIXED
|
25
|
-
INVENTORY
|
26
|
-
LIABILITY
|
27
|
-
NONCURRENT
|
28
|
-
OTHERINCOME
|
29
|
-
OVERHEADS
|
30
|
-
PREPAYMENT
|
31
|
-
REVENUE
|
32
|
-
SALES
|
33
|
-
TERMLIAB
|
34
|
-
PAYGLIABILITY
|
35
|
-
PAYG
|
36
|
-
SUPERANNUATIONEXPENSE
|
37
|
-
SUPERANNUATIONLIABILITY
|
38
|
-
WAGESEXPENSE
|
17
|
+
BANK ||= "BANK".freeze
|
18
|
+
CURRENT ||= "CURRENT".freeze
|
19
|
+
CURRLIAB ||= "CURRLIAB".freeze
|
20
|
+
DEPRECIATN ||= "DEPRECIATN".freeze
|
21
|
+
DIRECTCOSTS ||= "DIRECTCOSTS".freeze
|
22
|
+
EQUITY ||= "EQUITY".freeze
|
23
|
+
EXPENSE ||= "EXPENSE".freeze
|
24
|
+
FIXED ||= "FIXED".freeze
|
25
|
+
INVENTORY ||= "INVENTORY".freeze
|
26
|
+
LIABILITY ||= "LIABILITY".freeze
|
27
|
+
NONCURRENT ||= "NONCURRENT".freeze
|
28
|
+
OTHERINCOME ||= "OTHERINCOME".freeze
|
29
|
+
OVERHEADS ||= "OVERHEADS".freeze
|
30
|
+
PREPAYMENT ||= "PREPAYMENT".freeze
|
31
|
+
REVENUE ||= "REVENUE".freeze
|
32
|
+
SALES ||= "SALES".freeze
|
33
|
+
TERMLIAB ||= "TERMLIAB".freeze
|
34
|
+
PAYGLIABILITY ||= "PAYGLIABILITY".freeze
|
35
|
+
PAYG ||= "PAYG".freeze
|
36
|
+
SUPERANNUATIONEXPENSE ||= "SUPERANNUATIONEXPENSE".freeze
|
37
|
+
SUPERANNUATIONLIABILITY ||= "SUPERANNUATIONLIABILITY".freeze
|
38
|
+
WAGESEXPENSE ||= "WAGESEXPENSE".freeze
|
39
39
|
|
40
40
|
# Builds the enum from string
|
41
41
|
# @param [String] The enum value in the form of the string
|
@@ -21,8 +21,8 @@ module XeroRuby::Accounting
|
|
21
21
|
|
22
22
|
# Status of the action for this organisation
|
23
23
|
attr_accessor :status
|
24
|
-
ALLOWED
|
25
|
-
NOT_ALLOWED
|
24
|
+
ALLOWED ||= "ALLOWED".freeze
|
25
|
+
NOT_ALLOWED ||= "NOT-ALLOWED".freeze
|
26
26
|
|
27
27
|
class EnumAttributeValidator
|
28
28
|
attr_reader :datatype
|
@@ -18,8 +18,8 @@ module XeroRuby::Accounting
|
|
18
18
|
class Address
|
19
19
|
# define the type of address
|
20
20
|
attr_accessor :address_type
|
21
|
-
POBOX
|
22
|
-
STREET
|
21
|
+
POBOX ||= "POBOX".freeze
|
22
|
+
STREET ||= "STREET".freeze
|
23
23
|
|
24
24
|
# max length = 500
|
25
25
|
attr_accessor :address_line1
|
@@ -18,9 +18,9 @@ module XeroRuby::Accounting
|
|
18
18
|
class AddressForOrganisation
|
19
19
|
# define the type of address
|
20
20
|
attr_accessor :address_type
|
21
|
-
POBOX
|
22
|
-
STREET
|
23
|
-
DELIVERY
|
21
|
+
POBOX ||= "POBOX".freeze
|
22
|
+
STREET ||= "STREET".freeze
|
23
|
+
DELIVERY ||= "DELIVERY".freeze
|
24
24
|
|
25
25
|
# max length = 500
|
26
26
|
attr_accessor :address_line1
|
@@ -18,14 +18,14 @@ module XeroRuby::Accounting
|
|
18
18
|
class BankTransaction
|
19
19
|
# See Bank Transaction Types
|
20
20
|
attr_accessor :type
|
21
|
-
RECEIVE
|
22
|
-
RECEIVE_OVERPAYMENT
|
23
|
-
RECEIVE_PREPAYMENT
|
24
|
-
SPEND
|
25
|
-
SPEND_OVERPAYMENT
|
26
|
-
SPEND_PREPAYMENT
|
27
|
-
RECEIVE_TRANSFER
|
28
|
-
SPEND_TRANSFER
|
21
|
+
RECEIVE ||= "RECEIVE".freeze
|
22
|
+
RECEIVE_OVERPAYMENT ||= "RECEIVE-OVERPAYMENT".freeze
|
23
|
+
RECEIVE_PREPAYMENT ||= "RECEIVE-PREPAYMENT".freeze
|
24
|
+
SPEND ||= "SPEND".freeze
|
25
|
+
SPEND_OVERPAYMENT ||= "SPEND-OVERPAYMENT".freeze
|
26
|
+
SPEND_PREPAYMENT ||= "SPEND-PREPAYMENT".freeze
|
27
|
+
RECEIVE_TRANSFER ||= "RECEIVE-TRANSFER".freeze
|
28
|
+
SPEND_TRANSFER ||= "SPEND-TRANSFER".freeze
|
29
29
|
|
30
30
|
|
31
31
|
attr_accessor :contact
|
@@ -56,9 +56,9 @@ module XeroRuby::Accounting
|
|
56
56
|
|
57
57
|
# See Bank Transaction Status Codes
|
58
58
|
attr_accessor :status
|
59
|
-
AUTHORISED
|
60
|
-
DELETED
|
61
|
-
VOIDED
|
59
|
+
AUTHORISED ||= "AUTHORISED".freeze
|
60
|
+
DELETED ||= "DELETED".freeze
|
61
|
+
VOIDED ||= "VOIDED".freeze
|
62
62
|
|
63
63
|
|
64
64
|
attr_accessor :line_amount_types
|
@@ -40,6 +40,15 @@ module XeroRuby::Accounting
|
|
40
40
|
# The Bank Transaction ID for the destination account
|
41
41
|
attr_accessor :to_bank_transaction_id
|
42
42
|
|
43
|
+
# The Bank Transaction boolean to show if it is reconciled for the source account
|
44
|
+
attr_accessor :from_is_reconciled
|
45
|
+
|
46
|
+
# The Bank Transaction boolean to show if it is reconciled for the destination account
|
47
|
+
attr_accessor :to_is_reconciled
|
48
|
+
|
49
|
+
# Reference for the transactions.
|
50
|
+
attr_accessor :reference
|
51
|
+
|
43
52
|
# Boolean to indicate if a Bank Transfer has an attachment
|
44
53
|
attr_accessor :has_attachments
|
45
54
|
|
@@ -60,6 +69,9 @@ module XeroRuby::Accounting
|
|
60
69
|
:'currency_rate' => :'CurrencyRate',
|
61
70
|
:'from_bank_transaction_id' => :'FromBankTransactionID',
|
62
71
|
:'to_bank_transaction_id' => :'ToBankTransactionID',
|
72
|
+
:'from_is_reconciled' => :'FromIsReconciled',
|
73
|
+
:'to_is_reconciled' => :'ToIsReconciled',
|
74
|
+
:'reference' => :'Reference',
|
63
75
|
:'has_attachments' => :'HasAttachments',
|
64
76
|
:'created_date_utc' => :'CreatedDateUTC',
|
65
77
|
:'validation_errors' => :'ValidationErrors'
|
@@ -77,6 +89,9 @@ module XeroRuby::Accounting
|
|
77
89
|
:'currency_rate' => :'BigDecimal',
|
78
90
|
:'from_bank_transaction_id' => :'String',
|
79
91
|
:'to_bank_transaction_id' => :'String',
|
92
|
+
:'from_is_reconciled' => :'Boolean',
|
93
|
+
:'to_is_reconciled' => :'Boolean',
|
94
|
+
:'reference' => :'String',
|
80
95
|
:'has_attachments' => :'Boolean',
|
81
96
|
:'created_date_utc' => :'DateTime',
|
82
97
|
:'validation_errors' => :'Array<ValidationError>'
|
@@ -130,6 +145,22 @@ module XeroRuby::Accounting
|
|
130
145
|
self.to_bank_transaction_id = attributes[:'to_bank_transaction_id']
|
131
146
|
end
|
132
147
|
|
148
|
+
if attributes.key?(:'from_is_reconciled')
|
149
|
+
self.from_is_reconciled = attributes[:'from_is_reconciled']
|
150
|
+
else
|
151
|
+
self.from_is_reconciled = false
|
152
|
+
end
|
153
|
+
|
154
|
+
if attributes.key?(:'to_is_reconciled')
|
155
|
+
self.to_is_reconciled = attributes[:'to_is_reconciled']
|
156
|
+
else
|
157
|
+
self.to_is_reconciled = false
|
158
|
+
end
|
159
|
+
|
160
|
+
if attributes.key?(:'reference')
|
161
|
+
self.reference = attributes[:'reference']
|
162
|
+
end
|
163
|
+
|
133
164
|
if attributes.key?(:'has_attachments')
|
134
165
|
self.has_attachments = attributes[:'has_attachments']
|
135
166
|
else
|
@@ -188,6 +219,9 @@ module XeroRuby::Accounting
|
|
188
219
|
currency_rate == o.currency_rate &&
|
189
220
|
from_bank_transaction_id == o.from_bank_transaction_id &&
|
190
221
|
to_bank_transaction_id == o.to_bank_transaction_id &&
|
222
|
+
from_is_reconciled == o.from_is_reconciled &&
|
223
|
+
to_is_reconciled == o.to_is_reconciled &&
|
224
|
+
reference == o.reference &&
|
191
225
|
has_attachments == o.has_attachments &&
|
192
226
|
created_date_utc == o.created_date_utc &&
|
193
227
|
validation_errors == o.validation_errors
|
@@ -202,7 +236,7 @@ module XeroRuby::Accounting
|
|
202
236
|
# Calculates hash code according to all attributes.
|
203
237
|
# @return [Integer] Hash code
|
204
238
|
def hash
|
205
|
-
[from_bank_account, to_bank_account, amount, date, bank_transfer_id, currency_rate, from_bank_transaction_id, to_bank_transaction_id, has_attachments, created_date_utc, validation_errors].hash
|
239
|
+
[from_bank_account, to_bank_account, amount, date, bank_transfer_id, currency_rate, from_bank_transaction_id, to_bank_transaction_id, from_is_reconciled, to_is_reconciled, reference, has_attachments, created_date_utc, validation_errors].hash
|
206
240
|
end
|
207
241
|
|
208
242
|
# Builds the object from hash
|
@@ -51,13 +51,13 @@ module XeroRuby::Accounting
|
|
51
51
|
|
52
52
|
# PAYBATCH for bill payments or RECBATCH for sales invoice payments (read-only)
|
53
53
|
attr_accessor :type
|
54
|
-
PAYBATCH
|
55
|
-
RECBATCH
|
54
|
+
PAYBATCH ||= "PAYBATCH".freeze
|
55
|
+
RECBATCH ||= "RECBATCH".freeze
|
56
56
|
|
57
57
|
# AUTHORISED or DELETED (read-only). New batch payments will have a status of AUTHORISED. It is not possible to delete batch payments via the API.
|
58
58
|
attr_accessor :status
|
59
|
-
AUTHORISED
|
60
|
-
DELETED
|
59
|
+
AUTHORISED ||= "AUTHORISED".freeze
|
60
|
+
DELETED ||= "DELETED".freeze
|
61
61
|
|
62
62
|
# The total of the payments that make up the batch (read-only)
|
63
63
|
attr_accessor :total_amount
|