From 9b9a2ec50546a3143dcc68fd2044b8e19d5f4f27 Mon Sep 17 00:00:00 2001 From: sangeet-joy_xero Date: Mon, 29 Jul 2024 13:14:42 +0530 Subject: [PATCH 1/5] Update from OAS 6.1.1 --- docs/v1/accounting/index.html | 148 ++- docs/v1/payroll-au/index.html | 22 +- docs/v1/payroll-nz/index.html | 1095 +++++++++++++++-- xero_python/accounting/api/accounting_api.py | 2 +- .../accounting/docs/BankTransactions.md | 1 + xero_python/accounting/docs/Contacts.md | 1 + xero_python/accounting/docs/CreditNotes.md | 1 + xero_python/accounting/docs/Invoices.md | 1 + xero_python/accounting/docs/Journals.md | 1 + xero_python/accounting/docs/ManualJournals.md | 1 + xero_python/accounting/docs/Overpayments.md | 1 + xero_python/accounting/docs/Payments.md | 1 + xero_python/accounting/docs/Prepayments.md | 1 + xero_python/accounting/docs/PurchaseOrders.md | 1 + .../accounting/models/bank_transactions.py | 32 +- xero_python/accounting/models/contacts.py | 44 +- xero_python/accounting/models/credit_notes.py | 44 +- xero_python/accounting/models/invoices.py | 44 +- xero_python/accounting/models/journals.py | 32 +- .../accounting/models/manual_journals.py | 37 +- xero_python/accounting/models/overpayments.py | 44 +- xero_python/accounting/models/payments.py | 44 +- xero_python/accounting/models/prepayments.py | 44 +- .../accounting/models/purchase_orders.py | 37 +- xero_python/appstore/api/app_store_api.py | 2 +- xero_python/assets/api/asset_api.py | 2 +- xero_python/docs/README.md | 2 +- xero_python/file/api/files_api.py | 2 +- xero_python/finance/api/finance_api.py | 2 +- xero_python/identity/api/identity_api.py | 2 +- xero_python/payrollau/api/payroll_au_api.py | 2 +- xero_python/payrollnz/__init__.py | 14 + xero_python/payrollnz/api/payroll_nz_api.py | 368 +++++- xero_python/payrollnz/docs/Employee.md | 2 + .../payrollnz/docs/EmployeeLeaveSetup.md | 2 + .../payrollnz/docs/EmployeeLeaveType.md | 1 + .../payrollnz/docs/EmployeeWorkingPattern.md | 11 + .../EmployeeWorkingPatternWithWorkingWeeks.md | 12 + ...yeeWorkingPatternWithWorkingWeeksObject.md | 12 + ...eeWorkingPatternWithWorkingWeeksRequest.md | 11 + .../docs/EmployeeWorkingPatternsObject.md | 12 + xero_python/payrollnz/docs/Employment.md | 2 + xero_python/payrollnz/docs/PayrollNZApi.md | 284 ++++- xero_python/payrollnz/docs/SalaryAndWage.md | 1 + xero_python/payrollnz/docs/WorkingWeek.md | 16 + xero_python/payrollnz/models/__init__.py | 14 + xero_python/payrollnz/models/employee.py | 58 + .../payrollnz/models/employee_leave_setup.py | 58 + .../payrollnz/models/employee_leave_type.py | 29 + .../models/employee_working_pattern.py | 103 ++ ...oyee_working_pattern_with_working_weeks.py | 132 ++ ...rking_pattern_with_working_weeks_object.py | 122 ++ ...king_pattern_with_working_weeks_request.py | 96 ++ .../employee_working_patterns_object.py | 122 ++ xero_python/payrollnz/models/employment.py | 63 +- .../payrollnz/models/salary_and_wage.py | 38 + xero_python/payrollnz/models/working_week.py | 268 ++++ xero_python/payrolluk/api/payroll_uk_api.py | 2 +- xero_python/project/api/project_api.py | 2 +- 59 files changed, 3302 insertions(+), 246 deletions(-) create mode 100644 xero_python/payrollnz/docs/EmployeeWorkingPattern.md create mode 100644 xero_python/payrollnz/docs/EmployeeWorkingPatternWithWorkingWeeks.md create mode 100644 xero_python/payrollnz/docs/EmployeeWorkingPatternWithWorkingWeeksObject.md create mode 100644 xero_python/payrollnz/docs/EmployeeWorkingPatternWithWorkingWeeksRequest.md create mode 100644 xero_python/payrollnz/docs/EmployeeWorkingPatternsObject.md create mode 100644 xero_python/payrollnz/docs/WorkingWeek.md create mode 100644 xero_python/payrollnz/models/employee_working_pattern.py create mode 100644 xero_python/payrollnz/models/employee_working_pattern_with_working_weeks.py create mode 100644 xero_python/payrollnz/models/employee_working_pattern_with_working_weeks_object.py create mode 100644 xero_python/payrollnz/models/employee_working_pattern_with_working_weeks_request.py create mode 100644 xero_python/payrollnz/models/employee_working_patterns_object.py create mode 100644 xero_python/payrollnz/models/working_week.py diff --git a/docs/v1/accounting/index.html b/docs/v1/accounting/index.html index 80d8a607..aeeeea08 100644 --- a/docs/v1/accounting/index.html +++ b/docs/v1/accounting/index.html @@ -989,7 +989,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "accounts" }; defs["AccountsPayable"] = { "title" : "", @@ -1056,7 +1056,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "actions" }; defs["Address"] = { "title" : "", @@ -1245,7 +1245,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "allocations" }; defs["Attachment"] = { "title" : "", @@ -1298,7 +1298,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "attachments" }; defs["BalanceDetails"] = { "title" : "", @@ -1468,6 +1468,13 @@ "pagination" : { "$ref" : "#/components/schemas/Pagination" }, + "Warnings" : { + "type" : "array", + "description" : "Displays array of warning messages from the API", + "items" : { + "$ref" : "#/components/schemas/ValidationError" + } + }, "BankTransactions" : { "type" : "array", "items" : { @@ -1476,7 +1483,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "bank_transactions" }; defs["BankTransfer"] = { "title" : "", @@ -1580,7 +1587,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "bank_transfers" }; defs["BatchPayment"] = { "title" : "", @@ -1770,7 +1777,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "batch_payments" }; defs["Bill"] = { "title" : "", @@ -1840,7 +1847,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "branding_themes" }; defs["Budget"] = { "title" : "", @@ -1953,7 +1960,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "budgets" }; defs["CISOrgSetting"] = { "title" : "", @@ -1991,7 +1998,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "cis_settings" }; defs["CISSetting"] = { "title" : "", @@ -2025,7 +2032,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "cis_settings" }; defs["Contact"] = { "title" : "", @@ -2291,7 +2298,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "contact_groups" }; defs["ContactPerson"] = { "title" : "", @@ -2326,6 +2333,13 @@ "pagination" : { "$ref" : "#/components/schemas/Pagination" }, + "Warnings" : { + "type" : "array", + "description" : "Displays array of warning messages from the API", + "items" : { + "$ref" : "#/components/schemas/ValidationError" + } + }, "Contacts" : { "type" : "array", "items" : { @@ -2334,7 +2348,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "contacts" }; defs["ConversionBalances"] = { "title" : "", @@ -2564,6 +2578,13 @@ "pagination" : { "$ref" : "#/components/schemas/Pagination" }, + "Warnings" : { + "type" : "array", + "description" : "Displays array of warning messages from the API", + "items" : { + "$ref" : "#/components/schemas/ValidationError" + } + }, "CreditNotes" : { "type" : "array", "items" : { @@ -2572,7 +2593,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "credit_notes" }; defs["Currencies"] = { "title" : "", @@ -2586,7 +2607,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "currencies" }; defs["Currency"] = { "title" : "", @@ -2721,7 +2742,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "employees" }; defs["Error"] = { "title" : "", @@ -2845,7 +2866,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "expense_claims" }; defs["ExternalLink"] = { "title" : "", @@ -2910,7 +2931,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "history_records" }; defs["ImportSummary"] = { "title" : "", @@ -3271,7 +3292,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "invoice_reminders" }; defs["Invoices"] = { "title" : "", @@ -3280,6 +3301,13 @@ "pagination" : { "$ref" : "#/components/schemas/Pagination" }, + "Warnings" : { + "type" : "array", + "description" : "Displays array of warning messages from the API", + "items" : { + "$ref" : "#/components/schemas/ValidationError" + } + }, "Invoices" : { "type" : "array", "items" : { @@ -3288,7 +3316,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "invoices" }; defs["Item"] = { "title" : "", @@ -3390,7 +3418,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "items" }; defs["Journal"] = { "title" : "", @@ -3526,6 +3554,13 @@ "title" : "", "type" : "object", "properties" : { + "Warnings" : { + "type" : "array", + "description" : "Displays array of warning messages from the API", + "items" : { + "$ref" : "#/components/schemas/ValidationError" + } + }, "Journals" : { "type" : "array", "items" : { @@ -3534,7 +3569,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "journals" }; defs["LineAmountTypes"] = { "title" : "", @@ -3767,7 +3802,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "linked_transactions" }; defs["ManualJournal"] = { "title" : "", @@ -3919,6 +3954,13 @@ "pagination" : { "$ref" : "#/components/schemas/Pagination" }, + "Warnings" : { + "type" : "array", + "description" : "Displays array of warning messages from the API", + "items" : { + "$ref" : "#/components/schemas/ValidationError" + } + }, "ManualJournals" : { "type" : "array", "items" : { @@ -3927,7 +3969,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "manual_journals" }; defs["OnlineInvoice"] = { "title" : "", @@ -3955,7 +3997,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "online_invoices" }; defs["Organisation"] = { "title" : "", @@ -4130,7 +4172,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "organisations" }; defs["Overpayment"] = { "title" : "", @@ -4256,6 +4298,13 @@ "pagination" : { "$ref" : "#/components/schemas/Pagination" }, + "Warnings" : { + "type" : "array", + "description" : "Displays array of warning messages from the API", + "items" : { + "$ref" : "#/components/schemas/ValidationError" + } + }, "Overpayments" : { "type" : "array", "items" : { @@ -4264,7 +4313,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "overpayments" }; defs["Pagination"] = { "title" : "", @@ -4493,7 +4542,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "payment_services" }; defs["PaymentTerm"] = { "title" : "", @@ -4524,6 +4573,13 @@ "pagination" : { "$ref" : "#/components/schemas/Pagination" }, + "Warnings" : { + "type" : "array", + "description" : "Displays array of warning messages from the API", + "items" : { + "$ref" : "#/components/schemas/ValidationError" + } + }, "Payments" : { "type" : "array", "items" : { @@ -4532,7 +4588,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "payments" }; defs["Phone"] = { "title" : "", @@ -4692,6 +4748,13 @@ "pagination" : { "$ref" : "#/components/schemas/Pagination" }, + "Warnings" : { + "type" : "array", + "description" : "Displays array of warning messages from the API", + "items" : { + "$ref" : "#/components/schemas/ValidationError" + } + }, "Prepayments" : { "type" : "array", "items" : { @@ -4700,7 +4763,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "prepayments" }; defs["Purchase"] = { "title" : "", @@ -4894,6 +4957,13 @@ "pagination" : { "$ref" : "#/components/schemas/Pagination" }, + "Warnings" : { + "type" : "array", + "description" : "Displays array of warning messages from the API", + "items" : { + "$ref" : "#/components/schemas/ValidationError" + } + }, "PurchaseOrders" : { "type" : "array", "items" : { @@ -4902,7 +4972,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "purchase_orders" }; defs["Quote"] = { "title" : "", @@ -5061,7 +5131,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "quotes" }; defs["Receipt"] = { "title" : "", @@ -5182,7 +5252,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "receipts" }; defs["RepeatingInvoice"] = { "title" : "", @@ -5310,7 +5380,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "repeating_invoices" }; defs["Report"] = { "title" : "", @@ -5522,7 +5592,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "reports" }; defs["RequestEmpty"] = { "title" : "", @@ -5744,7 +5814,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "tax_rates" }; defs["TaxType"] = { "title" : "", @@ -5904,7 +5974,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "tracking_categories" }; defs["TrackingCategory"] = { "title" : "", @@ -5990,7 +6060,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "options" }; defs["User"] = { "title" : "", @@ -6047,7 +6117,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "users" }; defs["ValidationError"] = { "title" : "", diff --git a/docs/v1/payroll-au/index.html b/docs/v1/payroll-au/index.html index aef69da1..2cbc3bbc 100644 --- a/docs/v1/payroll-au/index.html +++ b/docs/v1/payroll-au/index.html @@ -1469,7 +1469,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "employees" }; defs["EmploymentBasis"] = { "title" : "", @@ -1644,7 +1644,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "leave_applications" }; defs["LeaveBalance"] = { "title" : "", @@ -1778,7 +1778,7 @@ } }, "description" : "The leave type lines", - "x-isObjectArray" : true + "x-objectArrayKey" : "employee" }; defs["LeavePeriod"] = { "title" : "", @@ -2027,7 +2027,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "pay_items" }; defs["PayOutType"] = { "title" : "", @@ -2162,7 +2162,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "pay_runs" }; defs["PayTemplate"] = { "title" : "", @@ -2272,7 +2272,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "payroll_calendars" }; defs["Payslip"] = { "title" : "", @@ -2560,7 +2560,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "payslips" }; defs["RateType"] = { "title" : "", @@ -2611,7 +2611,7 @@ } }, "description" : "The reimbursement type lines", - "x-isObjectArray" : true + "x-objectArrayKey" : "reimbursement_lines" }; defs["ReimbursementType"] = { "title" : "", @@ -2865,7 +2865,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "super_fund_products" }; defs["SuperFundType"] = { "title" : "", @@ -2885,7 +2885,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "super_funds" }; defs["SuperLine"] = { "title" : "", @@ -3307,7 +3307,7 @@ } }, "description" : "", - "x-isObjectArray" : true + "x-objectArrayKey" : "timesheets" }; defs["ValidationError"] = { "title" : "", diff --git a/docs/v1/payroll-nz/index.html b/docs/v1/payroll-nz/index.html index 7ffcb585..b61b62c4 100644 --- a/docs/v1/payroll-nz/index.html +++ b/docs/v1/payroll-nz/index.html @@ -1507,6 +1507,18 @@ "type" : "string", "description" : "Employee's job title", "example" : "General Manager" + }, + "engagementType" : { + "type" : "string", + "description" : "Engagement type of the employee", + "example" : "Permanent" + }, + "fixedTermEndDate" : { + "type" : "string", + "description" : "End date for an employee with a fixed-term engagement type", + "format" : "date", + "example" : "2020-01-19", + "x-is-date" : true } }, "description" : "" @@ -1690,6 +1702,18 @@ "format" : "double", "example" : 10.5, "x-is-money" : true + }, + "SickLeaveScheduleOfAccrual" : { + "type" : "string", + "description" : "Set Schedule of Accrual Type for Sick Leave", + "example" : "OnAnniversaryDate" + }, + "SickLeaveAnniversaryDate" : { + "type" : "string", + "description" : "If Sick Leave Schedule of Accrual is \"OnAnniversaryDate\", this is the date when entitled to Sick Leave", + "format" : "date", + "example" : "2020-01-19", + "x-is-date" : true } }, "description" : "" @@ -1767,6 +1791,13 @@ "description" : "Specific to Annual Leave. Annual leave balance in dollars", "format" : "double", "x-is-money" : true + }, + "scheduleOfAccrualDate" : { + "type" : "string", + "description" : "The date when an employee becomes entitled to their accrual.", + "format" : "date", + "example" : "2020-01-19", + "x-is-date" : true } }, "description" : "" @@ -2285,6 +2316,96 @@ } }, "description" : "" +}; + defs["EmployeeWorkingPattern"] = { + "title" : "", + "required" : [ "effectiveFrom", "payeeWorkingPatternID" ], + "type" : "object", + "properties" : { + "payeeWorkingPatternID" : { + "type" : "string", + "description" : "The Xero identifier for for Employee working pattern", + "format" : "uuid" + }, + "effectiveFrom" : { + "type" : "string", + "description" : "The effective date of the corresponding salary and wages", + "format" : "date", + "x-is-date" : true + } + }, + "description" : "" +}; + defs["EmployeeWorkingPatternWithWorkingWeeks"] = { + "title" : "", + "required" : [ "effectiveFrom", "payeeWorkingPatternID" ], + "type" : "object", + "properties" : { + "payeeWorkingPatternID" : { + "type" : "string", + "description" : "The Xero identifier for for Employee working pattern", + "format" : "uuid" + }, + "effectiveFrom" : { + "type" : "string", + "description" : "The effective date of the corresponding salary and wages", + "format" : "date", + "x-is-date" : true + }, + "workingWeeks" : { + "$ref" : "#/components/schemas/WorkingWeeks" + } + }, + "description" : "" +}; + defs["EmployeeWorkingPatternWithWorkingWeeksObject"] = { + "title" : "", + "type" : "object", + "properties" : { + "pagination" : { + "$ref" : "#/components/schemas/Pagination" + }, + "problem" : { + "$ref" : "#/components/schemas/Problem" + }, + "payeeWorkingPattern" : { + "$ref" : "#/components/schemas/EmployeeWorkingPatternWithWorkingWeeks" + } + }, + "description" : "" +}; + defs["EmployeeWorkingPatternWithWorkingWeeksRequest"] = { + "title" : "", + "required" : [ "effectiveFrom", "workingWeeks" ], + "type" : "object", + "properties" : { + "effectiveFrom" : { + "type" : "string", + "description" : "The effective date of the corresponding salary and wages", + "format" : "date", + "x-is-date" : true + }, + "workingWeeks" : { + "$ref" : "#/components/schemas/WorkingWeeks" + } + }, + "description" : "" +}; + defs["EmployeeWorkingPatternsObject"] = { + "title" : "", + "type" : "object", + "properties" : { + "pagination" : { + "$ref" : "#/components/schemas/Pagination" + }, + "problem" : { + "$ref" : "#/components/schemas/Problem" + }, + "payeeWorkingPatterns" : { + "$ref" : "#/components/schemas/EmployeeWorkingPatterns" + } + }, + "description" : "" }; defs["Employees"] = { "title" : "", @@ -2307,7 +2428,7 @@ }; defs["Employment"] = { "title" : "", - "required" : [ "PayrollCalendarID", "StartDate" ], + "required" : [ "EngagementType", "PayrollCalendarID", "StartDate" ], "type" : "object", "properties" : { "payrollCalendarID" : { @@ -2325,6 +2446,18 @@ "description" : "Start date of the employment (YYYY-MM-DD)", "format" : "date", "x-is-date" : true + }, + "engagementType" : { + "type" : "string", + "description" : "Engagement type of the employee", + "example" : "Permanent" + }, + "fixedTermEndDate" : { + "type" : "string", + "description" : "End date for an employee with a fixed-term engagement type", + "format" : "date", + "example" : "2020-01-19", + "x-is-date" : true } }, "description" : "" @@ -3234,6 +3367,11 @@ "type" : "string", "description" : "The type of the payment of the corresponding salary and wages", "enum" : [ "Salary", "Hourly" ] + }, + "workPatternType" : { + "type" : "string", + "description" : "The type of the Working Pattern of the corresponding salary and wages", + "enum" : [ "DaysAndHours", "RegularWeek" ] } }, "description" : "" @@ -3760,6 +3898,56 @@ }, "description" : "" }; + defs["WorkingWeek"] = { + "title" : "", + "required" : [ "friday", "monday", "saturday", "sunday", "thursday", "tuesday", "wednesday" ], + "type" : "object", + "properties" : { + "monday" : { + "type" : "number", + "description" : "The number of hours worked on a Monday", + "format" : "double", + "x-is-money" : true + }, + "tuesday" : { + "type" : "number", + "description" : "The number of hours worked on a Tuesday", + "format" : "double", + "x-is-money" : true + }, + "wednesday" : { + "type" : "number", + "description" : "The number of hours worked on a Wednesday", + "format" : "double", + "x-is-money" : true + }, + "thursday" : { + "type" : "number", + "description" : "The number of hours worked on a Thursday", + "format" : "double", + "x-is-money" : true + }, + "friday" : { + "type" : "number", + "description" : "The number of hours worked on a Friday", + "format" : "double", + "x-is-money" : true + }, + "saturday" : { + "type" : "number", + "description" : "The number of hours worked on a Saturday", + "format" : "double", + "x-is-money" : true + }, + "sunday" : { + "type" : "number", + "description" : "The number of hours worked on a Sunday", + "format" : "double", + "x-is-money" : true + } + }, + "description" : "" +}; var errs = {}; @@ -3878,6 +4066,9 @@
  • createEmployeeSalaryAndWage
  • +
  • + createEmployeeWorkingPattern +
  • createEmployment
  • @@ -3914,6 +4105,9 @@
  • deleteEmployeeSalaryAndWage
  • +
  • + deleteEmployeeWorkingPattern +
  • deleteTimesheet
  • @@ -3965,6 +4159,12 @@
  • getEmployeeTax
  • +
  • + getEmployeeWorkingPattern +
  • +
  • + getEmployeeWorkingPatterns +
  • getEmployees
  • @@ -4688,7 +4888,7 @@

    createEmployeeEarningsTemplate


    -
    /Employees/{EmployeeID}/PayTemplates/earnings
    +
    /Employees/{EmployeeID}/PayTemplates/Earnings

    Usage and SDK Samples

    @@ -4915,7 +5115,9 @@

    Usage and SDK Samples

    employee_leave = EmployeeLeave( leave_type_id = "00000000-0000-0000-0000-000000000000", start_date = start_date, - end_date = end_date) + end_date = end_date, + number_of_units = number_of_units, + number_of_units_taken = number_of_units_taken) try: api_response = api_instance.create_employee_leave(xero_tenant_id, employee_id, employeeLeave, idempotency_key) @@ -5068,7 +5270,7 @@

    createEmployeeLeaveSetup


    -
    /Employees/{EmployeeID}/leaveSetup
    +
    /Employees/{EmployeeID}/LeaveSetup

    Usage and SDK Samples

    @@ -5104,7 +5306,12 @@

    Usage and SDK Samples

    annual_leave_opening_balance = 25.89, sick_leave_hours_to_accrue_annually = 100.0, sick_leave_maximum_hours_to_accrue = 200.0, - sick_leave_opening_balance = 10.5) + sick_leave_opening_balance = 10.5, + sick_leave_to_accrue_annually = 100.0, + sick_leave_maximum_to_accrue = 200.0, + sick_leave_schedule_of_accrual = "", + sick_leave_anniversary_date = , + annual_leave_anniversary_date = ) try: api_response = api_instance.create_employee_leave_setup(xero_tenant_id, employee_id, employeeLeaveSetup, idempotency_key) @@ -5235,7 +5442,7 @@

    Parameters

    "schema" : { "$ref" : "#/components/schemas/EmployeeLeaveSetup" }, - "example" : "{ \"holidayPayOpeningBalance\": 10, \"annualLeaveOpeningBalance\": 100, \"sickLeaveHoursToAccrueAnnually\": 20, \"sickLeaveOpeningBalance\": 10 }" + "example" : "{ \"holidayPayOpeningBalance\": 10, \"annualLeaveOpeningBalance\": 100, \"sickLeaveHoursToAccrueAnnually\": 20, \"sickLeaveToAccrueAnnually\": 20, \"sickLeaveOpeningBalance\": 10, \"sickLeaveScheduleOfAccrual\": \"OnAnniversaryDate\", \"sickLeaveAnniversaryDate\": \"2023-12-31\", \"annualLeaveAnniversaryDate\": \"2023-12-31\" }" } }, "required" : true @@ -5290,7 +5497,8 @@

    Usage and SDK Samples

    employee_leave_type = EmployeeLeaveType( leave_type_id = "00000000-0000-0000-0000-000000000000", schedule_of_accrual = schedule_of_accrual::PERCENTAGEOFGROSSEARNINGS, - opening_balance = 5.25) + opening_balance = 5.25, + schedule_of_accrual_date = ) try: api_response = api_instance.create_employee_leave_type(xero_tenant_id, employee_id, employeeLeaveType, idempotency_key) @@ -5421,7 +5629,7 @@

    Parameters

    "schema" : { "$ref" : "#/components/schemas/EmployeeLeaveType" }, - "example" : "{ \"leaveTypeID\": \"35da97ae-05b9-427f-9a98-69157ba42cec\", \"scheduleOfAccrual\": \"AnnuallyAfter6Months\", \"hoursAccruedAnnually\": 10, \"maximumToAccrue\": 80, \"openingBalance\": 100, \"rateAccruedHourly\": 3.5 }" + "example" : "{ \"leaveTypeID\": \"35da97ae-05b9-427f-9a98-69157ba42cec\", \"scheduleOfAccrual\": \"AnnuallyAfter6Months\", \"hoursAccruedAnnually\": 10, \"unitsAccruedAnnually\": 10, \"typeOfUnitsToAccrue\": \"Hours\", \"openingBalanceTypeOfUnits\": \"Hours\" \"maximumToAccrue\": 80, \"openingBalance\": 100, \"rateAccruedHourly\": 3.5 }" } }, "required" : true @@ -5443,7 +5651,7 @@

    createEmployeeOpeningBalances


    -
    /Employees/{EmployeeID}/openingBalances
    +
    /Employees/{EmployeeID}/OpeningBalances

    Usage and SDK Samples

    @@ -6000,11 +6208,11 @@

    Parameters


    -
    -
    +
    +
    -

    createEmployment

    -

    Creates an employment detail for a specific employee

    +

    createEmployeeWorkingPattern

    +

    Creates an employee working pattern

    @@ -6012,17 +6220,17 @@

    createEmployment


    -
    /Employees/{EmployeeID}/Employment
    +
    /Employees/{EmployeeID}/Working-Patterns

    Usage and SDK Samples

    -
    +
    # configure api_client for use with xero-python sdk client
     api_client = ApiClient(
         Configuration(
    @@ -6036,22 +6244,27 @@ 

    Usage and SDK Samples

    api_client.set_oauth2_token("YOUR_ACCESS_TOKEN") -def accounting_create_employment(): +def accounting_create_employee_working_pattern(): api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xeroTenantId_example' employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' idempotency_key = 'KEY_VALUE' - start_date = dateutil.parser.parse('2020-10-28T00:00:00Z') - - employment = Employment( - payroll_calendar_id = "00000000-0000-0000-0000-000000000000", - start_date = start_date) + effective_from = dateutil.parser.parse('2020-10-28T00:00:00Z') + + workingWeek = WorkingWeek( + monday = 8, + tuesday = 8, + wednesday = 8, + thursday = 8, + friday = 8, + saturday = 0, + sunday = 0) try: - api_response = api_instance.create_employment(xero_tenant_id, employee_id, employment, idempotency_key) + api_response = api_instance.create_employee_working_pattern(xero_tenant_id, employee_id, employeeWorkingPatternWithWorkingWeeksRequest, idempotency_key) print(api_response) except AccountingBadRequestException as e: - print("Exception when calling PayrollNzApi->createEmployment: %s\n" % e)
    + print("Exception when calling PayrollNzApi->createEmployeeWorkingPattern: %s\n" % e)

    Scopes

    @@ -6074,7 +6287,7 @@

    Parameters

    -
    +
    @@ -6107,7 +6320,7 @@

    Parameters

    -
    +
    @@ -6130,7 +6343,7 @@

    Parameters

    -
    +
    @@ -6154,12 +6367,12 @@

    Parameters

    Description - employment * + employeeWorkingPatternWithWorkingWeeksRequest *
    - Employment + EmployeeWorkingPatternWithWorkingWeeksRequest
    @@ -6174,9 +6387,9 @@

    Parameters

    "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/Employment" + "$ref" : "#/components/schemas/EmployeeWorkingPatternWithWorkingWeeksRequest" }, - "example" : "{ \"payrollCalendarID\": \"9aa56064-990f-4ad3-a189-d966d8f6a030\", \"startDate\": \"2020-09-02\" }" + "example" : "{ \"effectiveFrom\": \"2020-01-01T00:00:00\", \"workingWeeks\": [ { \"monday\": 0.0, \"tuesday\": 3.0000, \"wednesday\": 0.0, \"thursday\": 0.0, \"friday\": 0.0, \"saturday\": 0.0, \"sunday\": 0.0 } ] }" } }, "required" : true @@ -6186,11 +6399,11 @@

    Parameters


    -
    -
    +
    +
    -

    createLeaveType

    -

    Creates a new leave type

    +

    createEmployment

    +

    Creates an employment detail for a specific employee

    @@ -6198,17 +6411,17 @@

    createLeaveType


    -
    /LeaveTypes
    +
    /Employees/{EmployeeID}/Employment

    Usage and SDK Samples

    -
    +
    # configure api_client for use with xero-python sdk client
     api_client = ApiClient(
         Configuration(
    @@ -6222,33 +6435,69 @@ 

    Usage and SDK Samples

    api_client.set_oauth2_token("YOUR_ACCESS_TOKEN") -def accounting_create_leave_type(): +def accounting_create_employment(): api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xeroTenantId_example' + employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' idempotency_key = 'KEY_VALUE' + start_date = dateutil.parser.parse('2020-10-28T00:00:00Z') - leave_type = LeaveType( - name = "LeaveType", - is_paid_leave = true, - show_on_payslip = true) + employment = Employment( + payroll_calendar_id = "00000000-0000-0000-0000-000000000000", + start_date = start_date, + engagement_type = "", + fixed_term_end_date = ) try: - api_response = api_instance.create_leave_type(xero_tenant_id, leaveType, idempotency_key) + api_response = api_instance.create_employment(xero_tenant_id, employee_id, employment, idempotency_key) print(api_response) except AccountingBadRequestException as e: - print("Exception when calling PayrollNzApi->createLeaveType: %s\n" % e)
    + print("Exception when calling PayrollNzApi->createEmployment: %s\n" % e)

    Scopes

    - - + +
    payroll.settingsGrant read-write access to payroll settingspayroll.employeesGrant read-write access to payroll employees

    Parameters

    +
    Path parameters
    + + + + + + + + + +
    NameDescription
    EmployeeID* + + +
    +
    +
    + + UUID + + + (uuid) + + +
    +Employee id for single object +
    +
    +
    + Required +
    +
    +
    +
    Header parameters
    @@ -6259,7 +6508,7 @@

    Parameters

    - + - + + + + + - - - -
    -
    +
    @@ -6282,7 +6531,7 @@

    Parameters

    -
    +
    @@ -6306,12 +6555,12 @@

    Parameters

    Description
    leaveType *employment *
    - LeaveType + Employment
    @@ -6326,9 +6575,9 @@

    Parameters

    "content" : { "application/json" : { "schema" : { - "$ref" : "#/components/schemas/LeaveType" + "$ref" : "#/components/schemas/Employment" }, - "example" : "{ \"name\": \"My wqwhhiktun Leave\", \"isPaidLeave\": false, \"showOnPayslip\": true }" + "example" : "{ \"payrollCalendarID\": \"9aa56064-990f-4ad3-a189-d966d8f6a030\", \"startDate\": \"2020-09-02\", \"engagementType\": \"FixedTerm\", \"fixedTermEndDate\": \"2026-01-01\" }" } }, "required" : true @@ -6338,11 +6587,11 @@

    Parameters


    -
    -
    +
    +
    -

    createMultipleEmployeeEarningsTemplate

    -

    Creates multiple employee earnings template records for a specific employee

    +

    createLeaveType

    +

    Creates a new leave type

    @@ -6350,17 +6599,17 @@

    createMultipleEmployeeEarningsTemplate


    -
    /Employees/{EmployeeID}/paytemplateearnings
    +
    /LeaveTypes

    Usage and SDK Samples

    -
    +
    # configure api_client for use with xero-python sdk client
     api_client = ApiClient(
         Configuration(
    @@ -6374,18 +6623,170 @@ 

    Usage and SDK Samples

    api_client.set_oauth2_token("YOUR_ACCESS_TOKEN") -def accounting_create_multiple_employee_earnings_template(): +def accounting_create_leave_type(): api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xeroTenantId_example' - employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' idempotency_key = 'KEY_VALUE' - earnings_template = EarningsTemplate( - pay_template_earning_id = "00000000-0000-0000-0000-000000000000", - rate_per_unit = 14.25, - number_of_units = 35.5, - fixed_amount = 50, - earnings_rate_id = "00000000-0000-0000-0000-000000000000", + leave_type = LeaveType( + name = "LeaveType", + is_paid_leave = true, + show_on_payslip = true) + + try: + api_response = api_instance.create_leave_type(xero_tenant_id, leaveType, idempotency_key) + print(api_response) + except AccountingBadRequestException as e: + print("Exception when calling PayrollNzApi->createLeaveType: %s\n" % e)
    +
    +
    +

    Scopes

    + + + + + + + +
    payroll.settingsGrant read-write access to payroll settings
    +

    Parameters

    +
    Header parameters
    + + + + + + + + + + + + + +
    NameDescription
    Xero-Tenant-Id* + + +
    +
    +
    + + String + + +
    +Xero identifier for Tenant +
    +
    +
    + Required +
    +
    +
    +
    Idempotency-Key + + +
    +
    +
    + + String + + +
    +This allows you to safely retry requests without the risk of duplicate processing. 128 character max. +
    +
    +
    +
    +
    +
    Body parameters
    + + + + + + + +
    NameDescription
    leaveType * +
    +
    + + LeaveType + +
    + +
    +
    +
    + Required +
    +
    + +
    +
    +
    +
    +
    +
    +
    +

    createMultipleEmployeeEarningsTemplate

    +

    Creates multiple employee earnings template records for a specific employee

    +
    +
    +
    +

    +

    +

    +
    +
    /Employees/{EmployeeID}/PayTemplateEarnings
    +

    +

    Usage and SDK Samples

    +

    + +
    + +
    +
    # configure api_client for use with xero-python sdk client
    +api_client = ApiClient(
    +    Configuration(
    +        debug=false,
    +        oauth2_token=OAuth2Token(
    +            client_id="YOUR_CLIENT_ID", client_secret="YOUR_CLIENT_SECRET"
    +        ),
    +    ),
    +    pool_threads=1,
    +)
    +
    +api_client.set_oauth2_token("YOUR_ACCESS_TOKEN")
    +
    +def accounting_create_multiple_employee_earnings_template():
    +    api_instance = PayrollNzApi(api_client)
    +    xero_tenant_id = 'xeroTenantId_example'
    +    employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c'
    +    idempotency_key = 'KEY_VALUE'
    +
    +    earnings_template = EarningsTemplate(
    +        pay_template_earning_id = "00000000-0000-0000-0000-000000000000",
    +        rate_per_unit = 14.25,
    +        number_of_units = 35.5,
    +        fixed_amount = 50,
    +        earnings_rate_id = "00000000-0000-0000-0000-000000000000",
             name = "Overtime Hours")
         
         earnings_templates = []    
    @@ -7499,7 +7900,7 @@ 

    deleteEmployeeEarningsTemplate


    -
    /Employees/{EmployeeID}/PayTemplates/earnings/{PayTemplateEarningID}
    +
    /Employees/{EmployeeID}/PayTemplates/Earnings/{PayTemplateEarningID}

    Usage and SDK Samples

    @@ -7940,11 +8341,11 @@

    Parameters


    -
    -
    +
    +
    -

    deleteTimesheet

    -

    Deletes a timesheet

    +

    deleteEmployeeWorkingPattern

    +

    deletes employee's working patterns

    @@ -7952,17 +8353,17 @@

    deleteTimesheet


    -
    /Timesheets/{TimesheetID}
    +
    /Employees/{EmployeeID}/Working-Patterns/{EmployeeWorkingPatternID}

    Usage and SDK Samples

    -
    +
    # configure api_client for use with xero-python sdk client
     api_client = ApiClient(
         Configuration(
    @@ -7976,24 +8377,25 @@ 

    Usage and SDK Samples

    api_client.set_oauth2_token("YOUR_ACCESS_TOKEN") -def accounting_delete_timesheet(): +def accounting_delete_employee_working_pattern(): api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xeroTenantId_example' - timesheet_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' + employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' + employee_working_pattern_id = '4ff1e5cc-9835-40d5-bb18-09f3b118db9c' try: - api_response = api_instance.delete_timesheet(xero_tenant_id, timesheet_id) + api_response = api_instance.delete_employee_working_pattern(xero_tenant_id, employee_id, employee_working_pattern_id) print(api_response) except AccountingBadRequestException as e: - print("Exception when calling PayrollNzApi->deleteTimesheet: %s\n" % e)
    + print("Exception when calling PayrollNzApi->deleteEmployeeWorkingPattern: %s\n" % e)

    Scopes

    - - + +
    payroll.timesheetsGrant read-write access to payroll timesheetspayroll.employeesGrant read-write access to payroll employees
    @@ -8004,11 +8406,11 @@

    Parameters

    Name Description
    TimesheetID*
    EmployeeID* -
    +
    @@ -8019,7 +8421,33 @@

    Parameters

    -Identifier for the timesheet +Employee id for single object +
    +
    +
    + Required +
    +
    +
    +
    EmployeeWorkingPatternID* + + +
    +
    +
    + + UUID + + + (uuid) + + +
    +Employee working pattern id for single object
    @@ -8041,7 +8469,7 @@

    Parameters

    -
    +
    @@ -8064,11 +8492,11 @@

    Parameters


    -
    -
    +
    +
    -

    deleteTimesheetLine

    -

    Deletes a timesheet line for a specific timesheet

    +

    deleteTimesheet

    +

    Deletes a timesheet

    @@ -8076,17 +8504,17 @@

    deleteTimesheetLine


    -
    /Timesheets/{TimesheetID}/Lines/{TimesheetLineID}
    +
    /Timesheets/{TimesheetID}

    Usage and SDK Samples

    -
    +
    # configure api_client for use with xero-python sdk client
     api_client = ApiClient(
         Configuration(
    @@ -8100,17 +8528,16 @@ 

    Usage and SDK Samples

    api_client.set_oauth2_token("YOUR_ACCESS_TOKEN") -def accounting_delete_timesheet_line(): +def accounting_delete_timesheet(): api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xeroTenantId_example' timesheet_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' - timesheet_line_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' try: - api_response = api_instance.delete_timesheet_line(xero_tenant_id, timesheet_id, timesheet_line_id) + api_response = api_instance.delete_timesheet(xero_tenant_id, timesheet_id) print(api_response) except AccountingBadRequestException as e: - print("Exception when calling PayrollNzApi->deleteTimesheetLine: %s\n" % e)
    + print("Exception when calling PayrollNzApi->deleteTimesheet: %s\n" % e)

    Scopes

    @@ -8133,7 +8560,7 @@

    Parameters

    -
    +
    @@ -8153,32 +8580,6 @@

    Parameters

    TimesheetLineID* - - -
    -
    -
    - - UUID - - - (uuid) - - -
    -Identifier for the timesheet line -
    -
    -
    - Required -
    -
    -
    -
    @@ -8192,7 +8593,7 @@

    Parameters

    -
    +
    @@ -8215,8 +8616,159 @@

    Parameters


    -
    -
    +
    +
    +
    +

    deleteTimesheetLine

    +

    Deletes a timesheet line for a specific timesheet

    +
    +
    +
    +

    +

    +

    +
    +
    /Timesheets/{TimesheetID}/Lines/{TimesheetLineID}
    +

    +

    Usage and SDK Samples

    +

    + +
    + +
    +
    # configure api_client for use with xero-python sdk client
    +api_client = ApiClient(
    +    Configuration(
    +        debug=false,
    +        oauth2_token=OAuth2Token(
    +            client_id="YOUR_CLIENT_ID", client_secret="YOUR_CLIENT_SECRET"
    +        ),
    +    ),
    +    pool_threads=1,
    +)
    +
    +api_client.set_oauth2_token("YOUR_ACCESS_TOKEN")
    +
    +def accounting_delete_timesheet_line():
    +    api_instance = PayrollNzApi(api_client)
    +    xero_tenant_id = 'xeroTenantId_example'
    +    timesheet_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d'
    +    timesheet_line_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d'
    +    
    +    try:
    +        api_response = api_instance.delete_timesheet_line(xero_tenant_id, timesheet_id, timesheet_line_id)
    +        print(api_response)
    +    except AccountingBadRequestException as e:
    +        print("Exception when calling PayrollNzApi->deleteTimesheetLine: %s\n" % e)
    +
    +
    +

    Scopes

    + + + + + + + +
    payroll.timesheetsGrant read-write access to payroll timesheets
    +

    Parameters

    +
    Path parameters
    + + + + + + + + + + + + + +
    NameDescription
    TimesheetID* + + +
    +
    +
    + + UUID + + + (uuid) + + +
    +Identifier for the timesheet +
    +
    +
    + Required +
    +
    +
    +
    TimesheetLineID* + + +
    +
    +
    + + UUID + + + (uuid) + + +
    +Identifier for the timesheet line +
    +
    +
    + Required +
    +
    +
    +
    +
    Header parameters
    + + + + + + + + + +
    NameDescription
    Xero-Tenant-Id* + + +
    +
    +
    + + String + + +
    +Xero identifier for Tenant +
    +
    +
    + Required +
    +
    +
    +
    +
    +
    +
    +
    +

    getDeduction

    Retrieves a single deduction by using a unique deduction ID

    @@ -9429,7 +9981,7 @@

    getEmployeeOpeningBalances


    -
    /Employees/{EmployeeID}/openingBalances
    +
    /Employees/{EmployeeID}/OpeningBalances

    Usage and SDK Samples

    @@ -10239,6 +10791,291 @@

    Parameters

    + + + +
    +
    +
    +
    +
    +
    +

    getEmployeeWorkingPattern

    +

    Retrieves employee's working patterns

    +
    +
    +
    +

    +

    +

    +
    +
    /Employees/{EmployeeID}/Working-Patterns/{EmployeeWorkingPatternID}
    +

    +

    Usage and SDK Samples

    +

    + +
    + +
    +
    # configure api_client for use with xero-python sdk client
    +api_client = ApiClient(
    +    Configuration(
    +        debug=false,
    +        oauth2_token=OAuth2Token(
    +            client_id="YOUR_CLIENT_ID", client_secret="YOUR_CLIENT_SECRET"
    +        ),
    +    ),
    +    pool_threads=1,
    +)
    +
    +api_client.set_oauth2_token("YOUR_ACCESS_TOKEN")
    +
    +def accounting_get_employee_working_pattern():
    +    api_instance = PayrollNzApi(api_client)
    +    xero_tenant_id = 'xeroTenantId_example'
    +    employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c'
    +    employee_working_pattern_id = '4ff1e5cc-9835-40d5-bb18-09f3b118db9c'
    +    
    +    try:
    +        api_response = api_instance.get_employee_working_pattern(xero_tenant_id, employee_id, employee_working_pattern_id)
    +        print(api_response)
    +    except AccountingBadRequestException as e:
    +        print("Exception when calling PayrollNzApi->getEmployeeWorkingPattern: %s\n" % e)
    +
    +
    +

    Scopes

    + + + + + + + + + + + + +
    payroll.employeesGrant read-write access to payroll employees
    payroll.employees.readGrant read-only access to payroll employees
    +

    Parameters

    +
    Path parameters
    + + + + + + + + + + + + + +
    NameDescription
    EmployeeID* + + +
    +
    +
    + + UUID + + + (uuid) + + +
    +Employee id for single object +
    +
    +
    + Required +
    +
    +
    +
    EmployeeWorkingPatternID* + + +
    +
    +
    + + UUID + + + (uuid) + + +
    +Employee working pattern id for single object +
    +
    +
    + Required +
    +
    +
    +
    +
    Header parameters
    + + + + + + + + + +
    NameDescription
    Xero-Tenant-Id* + + +
    +
    +
    + + String + + +
    +Xero identifier for Tenant +
    +
    +
    + Required +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +

    getEmployeeWorkingPatterns

    +

    Retrieves employee's working patterns

    +
    +
    +
    +

    +

    +

    +
    +
    /Employees/{EmployeeID}/Working-Patterns
    +

    +

    Usage and SDK Samples

    +

    + +
    + +
    +
    # configure api_client for use with xero-python sdk client
    +api_client = ApiClient(
    +    Configuration(
    +        debug=false,
    +        oauth2_token=OAuth2Token(
    +            client_id="YOUR_CLIENT_ID", client_secret="YOUR_CLIENT_SECRET"
    +        ),
    +    ),
    +    pool_threads=1,
    +)
    +
    +api_client.set_oauth2_token("YOUR_ACCESS_TOKEN")
    +
    +def accounting_get_employee_working_patterns():
    +    api_instance = PayrollNzApi(api_client)
    +    xero_tenant_id = 'xeroTenantId_example'
    +    employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c'
    +    
    +    try:
    +        api_response = api_instance.get_employee_working_patterns(xero_tenant_id, employee_id)
    +        print(api_response)
    +    except AccountingBadRequestException as e:
    +        print("Exception when calling PayrollNzApi->getEmployeeWorkingPatterns: %s\n" % e)
    +
    +
    +

    Scopes

    + + + + + + + + + + + + +
    payroll.employeesGrant read-write access to payroll employees
    payroll.employees.readGrant read-only access to payroll employees
    +

    Parameters

    +
    Path parameters
    + + + + + + + + + +
    NameDescription
    EmployeeID* + + +
    +
    +
    + + UUID + + + (uuid) + + +
    +Employee id for single object +
    +
    +
    + Required +
    +
    +
    +
    +
    Header parameters
    + + + + + + +
    NameDescription
    Xero-Tenant-Id* + + +
    +
    +
    + + String + + +
    +Xero identifier for Tenant +
    +
    +
    + Required +
    +
    +
    +
    @@ -13111,7 +13948,7 @@

    updateEmployeeEarningsTemplate


    -
    /Employees/{EmployeeID}/PayTemplates/earnings/{PayTemplateEarningID}
    +
    /Employees/{EmployeeID}/PayTemplates/Earnings/{PayTemplateEarningID}

    Usage and SDK Samples

    diff --git a/xero_python/accounting/api/accounting_api.py b/xero_python/accounting/api/accounting_api.py index 328e0e1e..beb3cf05 100644 --- a/xero_python/accounting/api/accounting_api.py +++ b/xero_python/accounting/api/accounting_api.py @@ -10,7 +10,7 @@ """ """ - OpenAPI spec version: 6.0.0 + OpenAPI spec version: 6.0.1 """ import importlib diff --git a/xero_python/accounting/docs/BankTransactions.md b/xero_python/accounting/docs/BankTransactions.md index eec412ff..c24be2e1 100644 --- a/xero_python/accounting/docs/BankTransactions.md +++ b/xero_python/accounting/docs/BankTransactions.md @@ -4,6 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **pagination** | [**Pagination**](Pagination.md) | | [optional] +**warnings** | [**list[ValidationError]**](ValidationError.md) | Displays array of warning messages from the API | [optional] **bank_transactions** | [**list[BankTransaction]**](BankTransaction.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/xero_python/accounting/docs/Contacts.md b/xero_python/accounting/docs/Contacts.md index 91b0558c..e9d7da7c 100644 --- a/xero_python/accounting/docs/Contacts.md +++ b/xero_python/accounting/docs/Contacts.md @@ -4,6 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **pagination** | [**Pagination**](Pagination.md) | | [optional] +**warnings** | [**list[ValidationError]**](ValidationError.md) | Displays array of warning messages from the API | [optional] **contacts** | [**list[Contact]**](Contact.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/xero_python/accounting/docs/CreditNotes.md b/xero_python/accounting/docs/CreditNotes.md index 807355de..69cd8f2b 100644 --- a/xero_python/accounting/docs/CreditNotes.md +++ b/xero_python/accounting/docs/CreditNotes.md @@ -4,6 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **pagination** | [**Pagination**](Pagination.md) | | [optional] +**warnings** | [**list[ValidationError]**](ValidationError.md) | Displays array of warning messages from the API | [optional] **credit_notes** | [**list[CreditNote]**](CreditNote.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/xero_python/accounting/docs/Invoices.md b/xero_python/accounting/docs/Invoices.md index 5ea83682..3b56eb42 100644 --- a/xero_python/accounting/docs/Invoices.md +++ b/xero_python/accounting/docs/Invoices.md @@ -4,6 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **pagination** | [**Pagination**](Pagination.md) | | [optional] +**warnings** | [**list[ValidationError]**](ValidationError.md) | Displays array of warning messages from the API | [optional] **invoices** | [**list[Invoice]**](Invoice.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/xero_python/accounting/docs/Journals.md b/xero_python/accounting/docs/Journals.md index bf3c0631..4b94daa2 100644 --- a/xero_python/accounting/docs/Journals.md +++ b/xero_python/accounting/docs/Journals.md @@ -3,6 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**warnings** | [**list[ValidationError]**](ValidationError.md) | Displays array of warning messages from the API | [optional] **journals** | [**list[Journal]**](Journal.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/xero_python/accounting/docs/ManualJournals.md b/xero_python/accounting/docs/ManualJournals.md index a7f1b662..1072787d 100644 --- a/xero_python/accounting/docs/ManualJournals.md +++ b/xero_python/accounting/docs/ManualJournals.md @@ -4,6 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **pagination** | [**Pagination**](Pagination.md) | | [optional] +**warnings** | [**list[ValidationError]**](ValidationError.md) | Displays array of warning messages from the API | [optional] **manual_journals** | [**list[ManualJournal]**](ManualJournal.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/xero_python/accounting/docs/Overpayments.md b/xero_python/accounting/docs/Overpayments.md index b82f9269..85042a86 100644 --- a/xero_python/accounting/docs/Overpayments.md +++ b/xero_python/accounting/docs/Overpayments.md @@ -4,6 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **pagination** | [**Pagination**](Pagination.md) | | [optional] +**warnings** | [**list[ValidationError]**](ValidationError.md) | Displays array of warning messages from the API | [optional] **overpayments** | [**list[Overpayment]**](Overpayment.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/xero_python/accounting/docs/Payments.md b/xero_python/accounting/docs/Payments.md index 441071f8..768a9ea6 100644 --- a/xero_python/accounting/docs/Payments.md +++ b/xero_python/accounting/docs/Payments.md @@ -4,6 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **pagination** | [**Pagination**](Pagination.md) | | [optional] +**warnings** | [**list[ValidationError]**](ValidationError.md) | Displays array of warning messages from the API | [optional] **payments** | [**list[Payment]**](Payment.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/xero_python/accounting/docs/Prepayments.md b/xero_python/accounting/docs/Prepayments.md index 619a1f28..f30ec4b7 100644 --- a/xero_python/accounting/docs/Prepayments.md +++ b/xero_python/accounting/docs/Prepayments.md @@ -4,6 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **pagination** | [**Pagination**](Pagination.md) | | [optional] +**warnings** | [**list[ValidationError]**](ValidationError.md) | Displays array of warning messages from the API | [optional] **prepayments** | [**list[Prepayment]**](Prepayment.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/xero_python/accounting/docs/PurchaseOrders.md b/xero_python/accounting/docs/PurchaseOrders.md index 9b0d6e3a..a8568046 100644 --- a/xero_python/accounting/docs/PurchaseOrders.md +++ b/xero_python/accounting/docs/PurchaseOrders.md @@ -4,6 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **pagination** | [**Pagination**](Pagination.md) | | [optional] +**warnings** | [**list[ValidationError]**](ValidationError.md) | Displays array of warning messages from the API | [optional] **purchase_orders** | [**list[PurchaseOrder]**](PurchaseOrder.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/xero_python/accounting/models/bank_transactions.py b/xero_python/accounting/models/bank_transactions.py index 7fbabde4..81f7e787 100644 --- a/xero_python/accounting/models/bank_transactions.py +++ b/xero_python/accounting/models/bank_transactions.py @@ -31,23 +31,30 @@ class BankTransactions(BaseModel): """ openapi_types = { "pagination": "Pagination", + "warnings": "list[ValidationError]", "bank_transactions": "list[BankTransaction]", } attribute_map = { "pagination": "pagination", + "warnings": "Warnings", "bank_transactions": "BankTransactions", } - def __init__(self, pagination=None, bank_transactions=None): # noqa: E501 + def __init__( + self, pagination=None, warnings=None, bank_transactions=None + ): # noqa: E501 """BankTransactions - a model defined in OpenAPI""" # noqa: E501 self._pagination = None + self._warnings = None self._bank_transactions = None self.discriminator = None if pagination is not None: self.pagination = pagination + if warnings is not None: + self.warnings = warnings if bank_transactions is not None: self.bank_transactions = bank_transactions @@ -72,6 +79,29 @@ def pagination(self, pagination): self._pagination = pagination + @property + def warnings(self): + """Gets the warnings of this BankTransactions. # noqa: E501 + + Displays array of warning messages from the API # noqa: E501 + + :return: The warnings of this BankTransactions. # noqa: E501 + :rtype: list[ValidationError] + """ + return self._warnings + + @warnings.setter + def warnings(self, warnings): + """Sets the warnings of this BankTransactions. + + Displays array of warning messages from the API # noqa: E501 + + :param warnings: The warnings of this BankTransactions. # noqa: E501 + :type: list[ValidationError] + """ + + self._warnings = warnings + @property def bank_transactions(self): """Gets the bank_transactions of this BankTransactions. # noqa: E501 diff --git a/xero_python/accounting/models/contacts.py b/xero_python/accounting/models/contacts.py index 6376b4a1..afe9e404 100644 --- a/xero_python/accounting/models/contacts.py +++ b/xero_python/accounting/models/contacts.py @@ -29,19 +29,30 @@ class Contacts(BaseModel): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"pagination": "Pagination", "contacts": "list[Contact]"} - - attribute_map = {"pagination": "pagination", "contacts": "Contacts"} - - def __init__(self, pagination=None, contacts=None): # noqa: E501 + openapi_types = { + "pagination": "Pagination", + "warnings": "list[ValidationError]", + "contacts": "list[Contact]", + } + + attribute_map = { + "pagination": "pagination", + "warnings": "Warnings", + "contacts": "Contacts", + } + + def __init__(self, pagination=None, warnings=None, contacts=None): # noqa: E501 """Contacts - a model defined in OpenAPI""" # noqa: E501 self._pagination = None + self._warnings = None self._contacts = None self.discriminator = None if pagination is not None: self.pagination = pagination + if warnings is not None: + self.warnings = warnings if contacts is not None: self.contacts = contacts @@ -66,6 +77,29 @@ def pagination(self, pagination): self._pagination = pagination + @property + def warnings(self): + """Gets the warnings of this Contacts. # noqa: E501 + + Displays array of warning messages from the API # noqa: E501 + + :return: The warnings of this Contacts. # noqa: E501 + :rtype: list[ValidationError] + """ + return self._warnings + + @warnings.setter + def warnings(self, warnings): + """Sets the warnings of this Contacts. + + Displays array of warning messages from the API # noqa: E501 + + :param warnings: The warnings of this Contacts. # noqa: E501 + :type: list[ValidationError] + """ + + self._warnings = warnings + @property def contacts(self): """Gets the contacts of this Contacts. # noqa: E501 diff --git a/xero_python/accounting/models/credit_notes.py b/xero_python/accounting/models/credit_notes.py index cdb40a1a..64c45687 100644 --- a/xero_python/accounting/models/credit_notes.py +++ b/xero_python/accounting/models/credit_notes.py @@ -29,19 +29,30 @@ class CreditNotes(BaseModel): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"pagination": "Pagination", "credit_notes": "list[CreditNote]"} - - attribute_map = {"pagination": "pagination", "credit_notes": "CreditNotes"} - - def __init__(self, pagination=None, credit_notes=None): # noqa: E501 + openapi_types = { + "pagination": "Pagination", + "warnings": "list[ValidationError]", + "credit_notes": "list[CreditNote]", + } + + attribute_map = { + "pagination": "pagination", + "warnings": "Warnings", + "credit_notes": "CreditNotes", + } + + def __init__(self, pagination=None, warnings=None, credit_notes=None): # noqa: E501 """CreditNotes - a model defined in OpenAPI""" # noqa: E501 self._pagination = None + self._warnings = None self._credit_notes = None self.discriminator = None if pagination is not None: self.pagination = pagination + if warnings is not None: + self.warnings = warnings if credit_notes is not None: self.credit_notes = credit_notes @@ -66,6 +77,29 @@ def pagination(self, pagination): self._pagination = pagination + @property + def warnings(self): + """Gets the warnings of this CreditNotes. # noqa: E501 + + Displays array of warning messages from the API # noqa: E501 + + :return: The warnings of this CreditNotes. # noqa: E501 + :rtype: list[ValidationError] + """ + return self._warnings + + @warnings.setter + def warnings(self, warnings): + """Sets the warnings of this CreditNotes. + + Displays array of warning messages from the API # noqa: E501 + + :param warnings: The warnings of this CreditNotes. # noqa: E501 + :type: list[ValidationError] + """ + + self._warnings = warnings + @property def credit_notes(self): """Gets the credit_notes of this CreditNotes. # noqa: E501 diff --git a/xero_python/accounting/models/invoices.py b/xero_python/accounting/models/invoices.py index 3068856a..90b7b99d 100644 --- a/xero_python/accounting/models/invoices.py +++ b/xero_python/accounting/models/invoices.py @@ -29,19 +29,30 @@ class Invoices(BaseModel): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"pagination": "Pagination", "invoices": "list[Invoice]"} - - attribute_map = {"pagination": "pagination", "invoices": "Invoices"} - - def __init__(self, pagination=None, invoices=None): # noqa: E501 + openapi_types = { + "pagination": "Pagination", + "warnings": "list[ValidationError]", + "invoices": "list[Invoice]", + } + + attribute_map = { + "pagination": "pagination", + "warnings": "Warnings", + "invoices": "Invoices", + } + + def __init__(self, pagination=None, warnings=None, invoices=None): # noqa: E501 """Invoices - a model defined in OpenAPI""" # noqa: E501 self._pagination = None + self._warnings = None self._invoices = None self.discriminator = None if pagination is not None: self.pagination = pagination + if warnings is not None: + self.warnings = warnings if invoices is not None: self.invoices = invoices @@ -66,6 +77,29 @@ def pagination(self, pagination): self._pagination = pagination + @property + def warnings(self): + """Gets the warnings of this Invoices. # noqa: E501 + + Displays array of warning messages from the API # noqa: E501 + + :return: The warnings of this Invoices. # noqa: E501 + :rtype: list[ValidationError] + """ + return self._warnings + + @warnings.setter + def warnings(self, warnings): + """Sets the warnings of this Invoices. + + Displays array of warning messages from the API # noqa: E501 + + :param warnings: The warnings of this Invoices. # noqa: E501 + :type: list[ValidationError] + """ + + self._warnings = warnings + @property def invoices(self): """Gets the invoices of this Invoices. # noqa: E501 diff --git a/xero_python/accounting/models/journals.py b/xero_python/accounting/models/journals.py index ef4524e8..68e8fea5 100644 --- a/xero_python/accounting/models/journals.py +++ b/xero_python/accounting/models/journals.py @@ -29,19 +29,45 @@ class Journals(BaseModel): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"journals": "list[Journal]"} + openapi_types = {"warnings": "list[ValidationError]", "journals": "list[Journal]"} - attribute_map = {"journals": "Journals"} + attribute_map = {"warnings": "Warnings", "journals": "Journals"} - def __init__(self, journals=None): # noqa: E501 + def __init__(self, warnings=None, journals=None): # noqa: E501 """Journals - a model defined in OpenAPI""" # noqa: E501 + self._warnings = None self._journals = None self.discriminator = None + if warnings is not None: + self.warnings = warnings if journals is not None: self.journals = journals + @property + def warnings(self): + """Gets the warnings of this Journals. # noqa: E501 + + Displays array of warning messages from the API # noqa: E501 + + :return: The warnings of this Journals. # noqa: E501 + :rtype: list[ValidationError] + """ + return self._warnings + + @warnings.setter + def warnings(self, warnings): + """Sets the warnings of this Journals. + + Displays array of warning messages from the API # noqa: E501 + + :param warnings: The warnings of this Journals. # noqa: E501 + :type: list[ValidationError] + """ + + self._warnings = warnings + @property def journals(self): """Gets the journals of this Journals. # noqa: E501 diff --git a/xero_python/accounting/models/manual_journals.py b/xero_python/accounting/models/manual_journals.py index da54f06b..b4c2c66e 100644 --- a/xero_python/accounting/models/manual_journals.py +++ b/xero_python/accounting/models/manual_journals.py @@ -31,20 +31,30 @@ class ManualJournals(BaseModel): """ openapi_types = { "pagination": "Pagination", + "warnings": "list[ValidationError]", "manual_journals": "list[ManualJournal]", } - attribute_map = {"pagination": "pagination", "manual_journals": "ManualJournals"} + attribute_map = { + "pagination": "pagination", + "warnings": "Warnings", + "manual_journals": "ManualJournals", + } - def __init__(self, pagination=None, manual_journals=None): # noqa: E501 + def __init__( + self, pagination=None, warnings=None, manual_journals=None + ): # noqa: E501 """ManualJournals - a model defined in OpenAPI""" # noqa: E501 self._pagination = None + self._warnings = None self._manual_journals = None self.discriminator = None if pagination is not None: self.pagination = pagination + if warnings is not None: + self.warnings = warnings if manual_journals is not None: self.manual_journals = manual_journals @@ -69,6 +79,29 @@ def pagination(self, pagination): self._pagination = pagination + @property + def warnings(self): + """Gets the warnings of this ManualJournals. # noqa: E501 + + Displays array of warning messages from the API # noqa: E501 + + :return: The warnings of this ManualJournals. # noqa: E501 + :rtype: list[ValidationError] + """ + return self._warnings + + @warnings.setter + def warnings(self, warnings): + """Sets the warnings of this ManualJournals. + + Displays array of warning messages from the API # noqa: E501 + + :param warnings: The warnings of this ManualJournals. # noqa: E501 + :type: list[ValidationError] + """ + + self._warnings = warnings + @property def manual_journals(self): """Gets the manual_journals of this ManualJournals. # noqa: E501 diff --git a/xero_python/accounting/models/overpayments.py b/xero_python/accounting/models/overpayments.py index 0d16524e..bc80ac4e 100644 --- a/xero_python/accounting/models/overpayments.py +++ b/xero_python/accounting/models/overpayments.py @@ -29,19 +29,30 @@ class Overpayments(BaseModel): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"pagination": "Pagination", "overpayments": "list[Overpayment]"} - - attribute_map = {"pagination": "pagination", "overpayments": "Overpayments"} - - def __init__(self, pagination=None, overpayments=None): # noqa: E501 + openapi_types = { + "pagination": "Pagination", + "warnings": "list[ValidationError]", + "overpayments": "list[Overpayment]", + } + + attribute_map = { + "pagination": "pagination", + "warnings": "Warnings", + "overpayments": "Overpayments", + } + + def __init__(self, pagination=None, warnings=None, overpayments=None): # noqa: E501 """Overpayments - a model defined in OpenAPI""" # noqa: E501 self._pagination = None + self._warnings = None self._overpayments = None self.discriminator = None if pagination is not None: self.pagination = pagination + if warnings is not None: + self.warnings = warnings if overpayments is not None: self.overpayments = overpayments @@ -66,6 +77,29 @@ def pagination(self, pagination): self._pagination = pagination + @property + def warnings(self): + """Gets the warnings of this Overpayments. # noqa: E501 + + Displays array of warning messages from the API # noqa: E501 + + :return: The warnings of this Overpayments. # noqa: E501 + :rtype: list[ValidationError] + """ + return self._warnings + + @warnings.setter + def warnings(self, warnings): + """Sets the warnings of this Overpayments. + + Displays array of warning messages from the API # noqa: E501 + + :param warnings: The warnings of this Overpayments. # noqa: E501 + :type: list[ValidationError] + """ + + self._warnings = warnings + @property def overpayments(self): """Gets the overpayments of this Overpayments. # noqa: E501 diff --git a/xero_python/accounting/models/payments.py b/xero_python/accounting/models/payments.py index 4e72a42b..83643062 100644 --- a/xero_python/accounting/models/payments.py +++ b/xero_python/accounting/models/payments.py @@ -29,19 +29,30 @@ class Payments(BaseModel): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"pagination": "Pagination", "payments": "list[Payment]"} - - attribute_map = {"pagination": "pagination", "payments": "Payments"} - - def __init__(self, pagination=None, payments=None): # noqa: E501 + openapi_types = { + "pagination": "Pagination", + "warnings": "list[ValidationError]", + "payments": "list[Payment]", + } + + attribute_map = { + "pagination": "pagination", + "warnings": "Warnings", + "payments": "Payments", + } + + def __init__(self, pagination=None, warnings=None, payments=None): # noqa: E501 """Payments - a model defined in OpenAPI""" # noqa: E501 self._pagination = None + self._warnings = None self._payments = None self.discriminator = None if pagination is not None: self.pagination = pagination + if warnings is not None: + self.warnings = warnings if payments is not None: self.payments = payments @@ -66,6 +77,29 @@ def pagination(self, pagination): self._pagination = pagination + @property + def warnings(self): + """Gets the warnings of this Payments. # noqa: E501 + + Displays array of warning messages from the API # noqa: E501 + + :return: The warnings of this Payments. # noqa: E501 + :rtype: list[ValidationError] + """ + return self._warnings + + @warnings.setter + def warnings(self, warnings): + """Sets the warnings of this Payments. + + Displays array of warning messages from the API # noqa: E501 + + :param warnings: The warnings of this Payments. # noqa: E501 + :type: list[ValidationError] + """ + + self._warnings = warnings + @property def payments(self): """Gets the payments of this Payments. # noqa: E501 diff --git a/xero_python/accounting/models/prepayments.py b/xero_python/accounting/models/prepayments.py index 4cae4cb3..54e57108 100644 --- a/xero_python/accounting/models/prepayments.py +++ b/xero_python/accounting/models/prepayments.py @@ -29,19 +29,30 @@ class Prepayments(BaseModel): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"pagination": "Pagination", "prepayments": "list[Prepayment]"} - - attribute_map = {"pagination": "pagination", "prepayments": "Prepayments"} - - def __init__(self, pagination=None, prepayments=None): # noqa: E501 + openapi_types = { + "pagination": "Pagination", + "warnings": "list[ValidationError]", + "prepayments": "list[Prepayment]", + } + + attribute_map = { + "pagination": "pagination", + "warnings": "Warnings", + "prepayments": "Prepayments", + } + + def __init__(self, pagination=None, warnings=None, prepayments=None): # noqa: E501 """Prepayments - a model defined in OpenAPI""" # noqa: E501 self._pagination = None + self._warnings = None self._prepayments = None self.discriminator = None if pagination is not None: self.pagination = pagination + if warnings is not None: + self.warnings = warnings if prepayments is not None: self.prepayments = prepayments @@ -66,6 +77,29 @@ def pagination(self, pagination): self._pagination = pagination + @property + def warnings(self): + """Gets the warnings of this Prepayments. # noqa: E501 + + Displays array of warning messages from the API # noqa: E501 + + :return: The warnings of this Prepayments. # noqa: E501 + :rtype: list[ValidationError] + """ + return self._warnings + + @warnings.setter + def warnings(self, warnings): + """Sets the warnings of this Prepayments. + + Displays array of warning messages from the API # noqa: E501 + + :param warnings: The warnings of this Prepayments. # noqa: E501 + :type: list[ValidationError] + """ + + self._warnings = warnings + @property def prepayments(self): """Gets the prepayments of this Prepayments. # noqa: E501 diff --git a/xero_python/accounting/models/purchase_orders.py b/xero_python/accounting/models/purchase_orders.py index 8ad019d8..aa617dbe 100644 --- a/xero_python/accounting/models/purchase_orders.py +++ b/xero_python/accounting/models/purchase_orders.py @@ -31,20 +31,30 @@ class PurchaseOrders(BaseModel): """ openapi_types = { "pagination": "Pagination", + "warnings": "list[ValidationError]", "purchase_orders": "list[PurchaseOrder]", } - attribute_map = {"pagination": "pagination", "purchase_orders": "PurchaseOrders"} + attribute_map = { + "pagination": "pagination", + "warnings": "Warnings", + "purchase_orders": "PurchaseOrders", + } - def __init__(self, pagination=None, purchase_orders=None): # noqa: E501 + def __init__( + self, pagination=None, warnings=None, purchase_orders=None + ): # noqa: E501 """PurchaseOrders - a model defined in OpenAPI""" # noqa: E501 self._pagination = None + self._warnings = None self._purchase_orders = None self.discriminator = None if pagination is not None: self.pagination = pagination + if warnings is not None: + self.warnings = warnings if purchase_orders is not None: self.purchase_orders = purchase_orders @@ -69,6 +79,29 @@ def pagination(self, pagination): self._pagination = pagination + @property + def warnings(self): + """Gets the warnings of this PurchaseOrders. # noqa: E501 + + Displays array of warning messages from the API # noqa: E501 + + :return: The warnings of this PurchaseOrders. # noqa: E501 + :rtype: list[ValidationError] + """ + return self._warnings + + @warnings.setter + def warnings(self, warnings): + """Sets the warnings of this PurchaseOrders. + + Displays array of warning messages from the API # noqa: E501 + + :param warnings: The warnings of this PurchaseOrders. # noqa: E501 + :type: list[ValidationError] + """ + + self._warnings = warnings + @property def purchase_orders(self): """Gets the purchase_orders of this PurchaseOrders. # noqa: E501 diff --git a/xero_python/appstore/api/app_store_api.py b/xero_python/appstore/api/app_store_api.py index 9972706f..20048e06 100644 --- a/xero_python/appstore/api/app_store_api.py +++ b/xero_python/appstore/api/app_store_api.py @@ -10,7 +10,7 @@ """ """ - OpenAPI spec version: 6.0.0 + OpenAPI spec version: 6.0.1 """ import importlib diff --git a/xero_python/assets/api/asset_api.py b/xero_python/assets/api/asset_api.py index a8eaa7c3..c1b35688 100644 --- a/xero_python/assets/api/asset_api.py +++ b/xero_python/assets/api/asset_api.py @@ -10,7 +10,7 @@ """ """ - OpenAPI spec version: 6.0.0 + OpenAPI spec version: 6.0.1 """ import importlib diff --git a/xero_python/docs/README.md b/xero_python/docs/README.md index dac17611..4f1f8849 100644 --- a/xero_python/docs/README.md +++ b/xero_python/docs/README.md @@ -3,7 +3,7 @@ These endpoints are related to managing authentication tokens and identity for X The `xero_python` package is automatically generated by the [XeroAPI SDK 2.0 Codegen](https://github.com/xero-github/xeroapi-sdk-codegen) project: -- API version: 6.0.0 +- API version: 6.0.1 - Package version: 6.0.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit [https://developer.xero.com](https://developer.xero.com) diff --git a/xero_python/file/api/files_api.py b/xero_python/file/api/files_api.py index 871e8e2d..5b4f3fdf 100644 --- a/xero_python/file/api/files_api.py +++ b/xero_python/file/api/files_api.py @@ -10,7 +10,7 @@ """ """ - OpenAPI spec version: 6.0.0 + OpenAPI spec version: 6.0.1 """ import importlib diff --git a/xero_python/finance/api/finance_api.py b/xero_python/finance/api/finance_api.py index e319e7ff..4312a685 100644 --- a/xero_python/finance/api/finance_api.py +++ b/xero_python/finance/api/finance_api.py @@ -10,7 +10,7 @@ """ """ - OpenAPI spec version: 6.0.0 + OpenAPI spec version: 6.0.1 """ import importlib diff --git a/xero_python/identity/api/identity_api.py b/xero_python/identity/api/identity_api.py index d1abaef7..61b89713 100644 --- a/xero_python/identity/api/identity_api.py +++ b/xero_python/identity/api/identity_api.py @@ -10,7 +10,7 @@ """ """ - OpenAPI spec version: 6.0.0 + OpenAPI spec version: 6.0.1 """ import importlib diff --git a/xero_python/payrollau/api/payroll_au_api.py b/xero_python/payrollau/api/payroll_au_api.py index edf9a37b..de6326ef 100644 --- a/xero_python/payrollau/api/payroll_au_api.py +++ b/xero_python/payrollau/api/payroll_au_api.py @@ -10,7 +10,7 @@ """ """ - OpenAPI spec version: 6.0.0 + OpenAPI spec version: 6.0.1 """ import importlib diff --git a/xero_python/payrollnz/__init__.py b/xero_python/payrollnz/__init__.py index 1aa00d0c..f510df98 100644 --- a/xero_python/payrollnz/__init__.py +++ b/xero_python/payrollnz/__init__.py @@ -87,6 +87,19 @@ ) from xero_python.payrollnz.models.employee_tax import EmployeeTax from xero_python.payrollnz.models.employee_tax_object import EmployeeTaxObject +from xero_python.payrollnz.models.employee_working_pattern import EmployeeWorkingPattern +from xero_python.payrollnz.models.employee_working_pattern_with_working_weeks import ( + EmployeeWorkingPatternWithWorkingWeeks, +) +from xero_python.payrollnz.models.employee_working_pattern_with_working_weeks_object import ( + EmployeeWorkingPatternWithWorkingWeeksObject, +) +from xero_python.payrollnz.models.employee_working_pattern_with_working_weeks_request import ( + EmployeeWorkingPatternWithWorkingWeeksRequest, +) +from xero_python.payrollnz.models.employee_working_patterns_object import ( + EmployeeWorkingPatternsObject, +) from xero_python.payrollnz.models.employees import Employees from xero_python.payrollnz.models.employment import Employment from xero_python.payrollnz.models.employment_object import EmploymentObject @@ -144,3 +157,4 @@ from xero_python.payrollnz.models.timesheets import Timesheets from xero_python.payrollnz.models.tracking_categories import TrackingCategories from xero_python.payrollnz.models.tracking_category import TrackingCategory +from xero_python.payrollnz.models.working_week import WorkingWeek diff --git a/xero_python/payrollnz/api/payroll_nz_api.py b/xero_python/payrollnz/api/payroll_nz_api.py index e32496ad..9d547e43 100644 --- a/xero_python/payrollnz/api/payroll_nz_api.py +++ b/xero_python/payrollnz/api/payroll_nz_api.py @@ -10,7 +10,7 @@ """ """ - OpenAPI spec version: 6.0.0 + OpenAPI spec version: 6.0.1 """ import importlib @@ -460,7 +460,7 @@ def create_employee_earnings_template( # Authentication setting auth_settings = ["OAuth2"] - url = self.get_resource_url("/Employees/{EmployeeID}/PayTemplates/earnings") + url = self.get_resource_url("/Employees/{EmployeeID}/PayTemplates/Earnings") try: return self.api_client.call_api( @@ -650,7 +650,7 @@ def create_employee_leave_setup( # Authentication setting auth_settings = ["OAuth2"] - url = self.get_resource_url("/Employees/{EmployeeID}/leaveSetup") + url = self.get_resource_url("/Employees/{EmployeeID}/LeaveSetup") try: return self.api_client.call_api( @@ -838,7 +838,7 @@ def create_employee_opening_balances( # Authentication setting auth_settings = ["OAuth2"] - url = self.get_resource_url("/Employees/{EmployeeID}/openingBalances") + url = self.get_resource_url("/Employees/{EmployeeID}/OpeningBalances") try: return self.api_client.call_api( @@ -1055,6 +1055,102 @@ def create_employee_salary_and_wage( error, self, "create_employee_salary_and_wage" ) + def create_employee_working_pattern( + self, + xero_tenant_id, + employee_id, + employee_working_pattern_with_working_weeks_request, + idempotency_key=empty, + _return_http_data_only=True, + _preload_content=True, + _request_timeout=None, + ): + """Creates an employee working pattern # noqa: E501 + OAuth2 scope: payroll.employees + :param str xero_tenant_id: Xero identifier for Tenant (required) + :param str employee_id: Employee id for single object (required) + :param EmployeeWorkingPatternWithWorkingWeeksRequest employee_working_pattern_with_working_weeks_request: (required) + :param str idempotency_key: This allows you to safely retry requests without the risk of duplicate processing. 128 character max. + :param bool _return_http_data_only: return received data only + :param bool _preload_content: load received data in models + :param bool _request_timeout: maximum wait time for response + :return: EmployeeWorkingPatternWithWorkingWeeks + """ + + # verify the required parameter 'xero_tenant_id' is set + if xero_tenant_id is None: + raise ValueError( + "Missing the required parameter `xero_tenant_id` " + "when calling `create_employee_working_pattern`" + ) + # verify the required parameter 'employee_id' is set + if employee_id is None: + raise ValueError( + "Missing the required parameter `employee_id` " + "when calling `create_employee_working_pattern`" + ) + # verify the required parameter 'employee_working_pattern_with_working_weeks_request' is set + if employee_working_pattern_with_working_weeks_request is None: + raise ValueError( + "Missing the required parameter `employee_working_pattern_with_working_weeks_request` " + "when calling `create_employee_working_pattern`" + ) + + collection_formats = {} + path_params = { + "EmployeeID": employee_id, + } + + query_params = [] + + header_params = { + "Xero-Tenant-Id": xero_tenant_id, + } + + if idempotency_key is not empty: + header_params["Idempotency-Key"] = idempotency_key + + local_var_files = {} + form_params = [] + + body_params = employee_working_pattern_with_working_weeks_request + # HTTP header `Accept` + header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # HTTP header `Content-Type` + header_params["Content-Type"] = self.api_client.select_header_content_type( + ["application/json"] + ) + + # Authentication setting + auth_settings = ["OAuth2"] + url = self.get_resource_url("/Employees/{EmployeeID}/Working-Patterns") + + try: + return self.api_client.call_api( + url, + "POST", + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type="EmployeeWorkingPatternWithWorkingWeeks", + response_model_finder=self.get_model_finder(), + auth_settings=auth_settings, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + except exceptions.HTTPStatusException as error: + raise translate_status_exception( + error, self, "create_employee_working_pattern" + ) + def create_employment( self, xero_tenant_id, @@ -1304,7 +1400,7 @@ def create_multiple_employee_earnings_template( # Authentication setting auth_settings = ["OAuth2"] - url = self.get_resource_url("/Employees/{EmployeeID}/paytemplateearnings") + url = self.get_resource_url("/Employees/{EmployeeID}/PayTemplateEarnings") try: return self.api_client.call_api( @@ -1906,7 +2002,7 @@ def delete_employee_earnings_template( # Authentication setting auth_settings = ["OAuth2"] url = self.get_resource_url( - "/Employees/{EmployeeID}/PayTemplates/earnings/{PayTemplateEarningID}" + "/Employees/{EmployeeID}/PayTemplates/Earnings/{PayTemplateEarningID}" ) try: @@ -2106,6 +2202,95 @@ def delete_employee_salary_and_wage( error, self, "delete_employee_salary_and_wage" ) + def delete_employee_working_pattern( + self, + xero_tenant_id, + employee_id, + employee_working_pattern_id, + _return_http_data_only=True, + _preload_content=True, + _request_timeout=None, + ): + """deletes employee's working patterns # noqa: E501 + OAuth2 scope: payroll.employees + :param str xero_tenant_id: Xero identifier for Tenant (required) + :param str employee_id: Employee id for single object (required) + :param str employee_working_pattern_id: Employee working pattern id for single object (required) + :param bool _return_http_data_only: return received data only + :param bool _preload_content: load received data in models + :param bool _request_timeout: maximum wait time for response + :return: EmployeeLeaveObject + """ + + # verify the required parameter 'xero_tenant_id' is set + if xero_tenant_id is None: + raise ValueError( + "Missing the required parameter `xero_tenant_id` " + "when calling `delete_employee_working_pattern`" + ) + # verify the required parameter 'employee_id' is set + if employee_id is None: + raise ValueError( + "Missing the required parameter `employee_id` " + "when calling `delete_employee_working_pattern`" + ) + # verify the required parameter 'employee_working_pattern_id' is set + if employee_working_pattern_id is None: + raise ValueError( + "Missing the required parameter `employee_working_pattern_id` " + "when calling `delete_employee_working_pattern`" + ) + + collection_formats = {} + path_params = { + "EmployeeID": employee_id, + "EmployeeWorkingPatternID": employee_working_pattern_id, + } + + query_params = [] + + header_params = { + "Xero-Tenant-Id": xero_tenant_id, + } + + local_var_files = {} + form_params = [] + + body_params = None + # HTTP header `Accept` + header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # Authentication setting + auth_settings = ["OAuth2"] + url = self.get_resource_url( + "/Employees/{EmployeeID}/Working-Patterns/{EmployeeWorkingPatternID}" + ) + + try: + return self.api_client.call_api( + url, + "DELETE", + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type="EmployeeLeaveObject", + response_model_finder=self.get_model_finder(), + auth_settings=auth_settings, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + except exceptions.HTTPStatusException as error: + raise translate_status_exception( + error, self, "delete_employee_working_pattern" + ) + def delete_timesheet( self, xero_tenant_id, @@ -3004,7 +3189,7 @@ def get_employee_opening_balances( # Authentication setting auth_settings = ["OAuth2"] - url = self.get_resource_url("/Employees/{EmployeeID}/openingBalances") + url = self.get_resource_url("/Employees/{EmployeeID}/OpeningBalances") try: return self.api_client.call_api( @@ -3429,6 +3614,173 @@ def get_employee_tax( except exceptions.HTTPStatusException as error: raise translate_status_exception(error, self, "get_employee_tax") + def get_employee_working_pattern( + self, + xero_tenant_id, + employee_id, + employee_working_pattern_id, + _return_http_data_only=True, + _preload_content=True, + _request_timeout=None, + ): + """Retrieves employee's working patterns # noqa: E501 + OAuth2 scope: payroll.employees, payroll.employees.read + :param str xero_tenant_id: Xero identifier for Tenant (required) + :param str employee_id: Employee id for single object (required) + :param str employee_working_pattern_id: Employee working pattern id for single object (required) + :param bool _return_http_data_only: return received data only + :param bool _preload_content: load received data in models + :param bool _request_timeout: maximum wait time for response + :return: EmployeeWorkingPatternWithWorkingWeeksObject + """ + + # verify the required parameter 'xero_tenant_id' is set + if xero_tenant_id is None: + raise ValueError( + "Missing the required parameter `xero_tenant_id` " + "when calling `get_employee_working_pattern`" + ) + # verify the required parameter 'employee_id' is set + if employee_id is None: + raise ValueError( + "Missing the required parameter `employee_id` " + "when calling `get_employee_working_pattern`" + ) + # verify the required parameter 'employee_working_pattern_id' is set + if employee_working_pattern_id is None: + raise ValueError( + "Missing the required parameter `employee_working_pattern_id` " + "when calling `get_employee_working_pattern`" + ) + + collection_formats = {} + path_params = { + "EmployeeID": employee_id, + "EmployeeWorkingPatternID": employee_working_pattern_id, + } + + query_params = [] + + header_params = { + "Xero-Tenant-Id": xero_tenant_id, + } + + local_var_files = {} + form_params = [] + + body_params = None + # HTTP header `Accept` + header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # Authentication setting + auth_settings = ["OAuth2"] + url = self.get_resource_url( + "/Employees/{EmployeeID}/Working-Patterns/{EmployeeWorkingPatternID}" + ) + + try: + return self.api_client.call_api( + url, + "GET", + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type="EmployeeWorkingPatternWithWorkingWeeksObject", + response_model_finder=self.get_model_finder(), + auth_settings=auth_settings, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + except exceptions.HTTPStatusException as error: + raise translate_status_exception( + error, self, "get_employee_working_pattern" + ) + + def get_employee_working_patterns( + self, + xero_tenant_id, + employee_id, + _return_http_data_only=True, + _preload_content=True, + _request_timeout=None, + ): + """Retrieves employee's working patterns # noqa: E501 + OAuth2 scope: payroll.employees, payroll.employees.read + :param str xero_tenant_id: Xero identifier for Tenant (required) + :param str employee_id: Employee id for single object (required) + :param bool _return_http_data_only: return received data only + :param bool _preload_content: load received data in models + :param bool _request_timeout: maximum wait time for response + :return: EmployeeWorkingPatternsObject + """ + + # verify the required parameter 'xero_tenant_id' is set + if xero_tenant_id is None: + raise ValueError( + "Missing the required parameter `xero_tenant_id` " + "when calling `get_employee_working_patterns`" + ) + # verify the required parameter 'employee_id' is set + if employee_id is None: + raise ValueError( + "Missing the required parameter `employee_id` " + "when calling `get_employee_working_patterns`" + ) + + collection_formats = {} + path_params = { + "EmployeeID": employee_id, + } + + query_params = [] + + header_params = { + "Xero-Tenant-Id": xero_tenant_id, + } + + local_var_files = {} + form_params = [] + + body_params = None + # HTTP header `Accept` + header_params["Accept"] = self.api_client.select_header_accept( + ["application/json"] + ) + + # Authentication setting + auth_settings = ["OAuth2"] + url = self.get_resource_url("/Employees/{EmployeeID}/Working-Patterns") + + try: + return self.api_client.call_api( + url, + "GET", + path_params, + query_params, + header_params, + body=body_params, + post_params=form_params, + files=local_var_files, + response_type="EmployeeWorkingPatternsObject", + response_model_finder=self.get_model_finder(), + auth_settings=auth_settings, + _return_http_data_only=_return_http_data_only, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + collection_formats=collection_formats, + ) + except exceptions.HTTPStatusException as error: + raise translate_status_exception( + error, self, "get_employee_working_patterns" + ) + def get_employees( self, xero_tenant_id, @@ -5114,7 +5466,7 @@ def update_employee_earnings_template( # Authentication setting auth_settings = ["OAuth2"] url = self.get_resource_url( - "/Employees/{EmployeeID}/PayTemplates/earnings/{PayTemplateEarningID}" + "/Employees/{EmployeeID}/PayTemplates/Earnings/{PayTemplateEarningID}" ) try: diff --git a/xero_python/payrollnz/docs/Employee.md b/xero_python/payrollnz/docs/Employee.md index ba075ac4..4b458d5f 100644 --- a/xero_python/payrollnz/docs/Employee.md +++ b/xero_python/payrollnz/docs/Employee.md @@ -18,6 +18,8 @@ Name | Type | Description | Notes **updated_date_utc** | **datetime** | UTC timestamp of last update to the employee | [optional] **created_date_utc** | **datetime** | UTC timestamp when the employee was created in Xero | [optional] **job_title** | **str** | Employee's job title | [optional] +**engagement_type** | **str** | Engagement type of the employee | [optional] +**fixed_term_end_date** | **date** | End date for an employee with a fixed-term engagement type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/xero_python/payrollnz/docs/EmployeeLeaveSetup.md b/xero_python/payrollnz/docs/EmployeeLeaveSetup.md index b9bf6d82..d53341a0 100644 --- a/xero_python/payrollnz/docs/EmployeeLeaveSetup.md +++ b/xero_python/payrollnz/docs/EmployeeLeaveSetup.md @@ -10,6 +10,8 @@ Name | Type | Description | Notes **sick_leave_hours_to_accrue_annually** | **float** | Number of hours accrued annually for sick leave. Multiply the number of days they're entitled to by the hours worked per day | [optional] **sick_leave_maximum_hours_to_accrue** | **float** | Maximum number of hours accrued annually for sick leave. Multiply the maximum days they can accrue by the hours worked per day | [optional] **sick_leave_opening_balance** | **float** | Initial sick leave balance. This will be positive unless they've taken sick leave in advance | [optional] +**sick_leave_schedule_of_accrual** | **str** | Set Schedule of Accrual Type for Sick Leave | [optional] +**sick_leave_anniversary_date** | **date** | If Sick Leave Schedule of Accrual is \"OnAnniversaryDate\", this is the date when entitled to Sick Leave | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/xero_python/payrollnz/docs/EmployeeLeaveType.md b/xero_python/payrollnz/docs/EmployeeLeaveType.md index eca4056f..01d7289b 100644 --- a/xero_python/payrollnz/docs/EmployeeLeaveType.md +++ b/xero_python/payrollnz/docs/EmployeeLeaveType.md @@ -13,6 +13,7 @@ Name | Type | Description | Notes **include_holiday_pay_every_pay** | **bool** | Specific to Holiday pay. Flag determining if pay for leave type is added on each pay run. | [optional] **show_annual_leave_in_advance** | **bool** | Specific to Annual Leave. Flag to include leave available to take in advance in the balance in the payslip | [optional] **annual_leave_total_amount_paid** | **float** | Specific to Annual Leave. Annual leave balance in dollars | [optional] +**schedule_of_accrual_date** | **date** | The date when an employee becomes entitled to their accrual. | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/xero_python/payrollnz/docs/EmployeeWorkingPattern.md b/xero_python/payrollnz/docs/EmployeeWorkingPattern.md new file mode 100644 index 00000000..c38617ef --- /dev/null +++ b/xero_python/payrollnz/docs/EmployeeWorkingPattern.md @@ -0,0 +1,11 @@ +# EmployeeWorkingPattern + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**payee_working_pattern_id** | **str** | The Xero identifier for for Employee working pattern | +**effective_from** | **date** | The effective date of the corresponding salary and wages | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/xero_python/payrollnz/docs/EmployeeWorkingPatternWithWorkingWeeks.md b/xero_python/payrollnz/docs/EmployeeWorkingPatternWithWorkingWeeks.md new file mode 100644 index 00000000..2ae49f5f --- /dev/null +++ b/xero_python/payrollnz/docs/EmployeeWorkingPatternWithWorkingWeeks.md @@ -0,0 +1,12 @@ +# EmployeeWorkingPatternWithWorkingWeeks + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**payee_working_pattern_id** | **str** | The Xero identifier for for Employee working pattern | +**effective_from** | **date** | The effective date of the corresponding salary and wages | +**working_weeks** | [**list[WorkingWeek]**](WorkingWeek.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/xero_python/payrollnz/docs/EmployeeWorkingPatternWithWorkingWeeksObject.md b/xero_python/payrollnz/docs/EmployeeWorkingPatternWithWorkingWeeksObject.md new file mode 100644 index 00000000..b00027b6 --- /dev/null +++ b/xero_python/payrollnz/docs/EmployeeWorkingPatternWithWorkingWeeksObject.md @@ -0,0 +1,12 @@ +# EmployeeWorkingPatternWithWorkingWeeksObject + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pagination** | [**Pagination**](Pagination.md) | | [optional] +**problem** | [**Problem**](Problem.md) | | [optional] +**payee_working_pattern** | [**EmployeeWorkingPatternWithWorkingWeeks**](EmployeeWorkingPatternWithWorkingWeeks.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/xero_python/payrollnz/docs/EmployeeWorkingPatternWithWorkingWeeksRequest.md b/xero_python/payrollnz/docs/EmployeeWorkingPatternWithWorkingWeeksRequest.md new file mode 100644 index 00000000..37d63bb3 --- /dev/null +++ b/xero_python/payrollnz/docs/EmployeeWorkingPatternWithWorkingWeeksRequest.md @@ -0,0 +1,11 @@ +# EmployeeWorkingPatternWithWorkingWeeksRequest + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**effective_from** | **date** | The effective date of the corresponding salary and wages | +**working_weeks** | [**list[WorkingWeek]**](WorkingWeek.md) | | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/xero_python/payrollnz/docs/EmployeeWorkingPatternsObject.md b/xero_python/payrollnz/docs/EmployeeWorkingPatternsObject.md new file mode 100644 index 00000000..a1f10fa9 --- /dev/null +++ b/xero_python/payrollnz/docs/EmployeeWorkingPatternsObject.md @@ -0,0 +1,12 @@ +# EmployeeWorkingPatternsObject + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**pagination** | [**Pagination**](Pagination.md) | | [optional] +**problem** | [**Problem**](Problem.md) | | [optional] +**payee_working_patterns** | [**list[EmployeeWorkingPattern]**](EmployeeWorkingPattern.md) | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/xero_python/payrollnz/docs/Employment.md b/xero_python/payrollnz/docs/Employment.md index 70b6e694..1cbcb869 100644 --- a/xero_python/payrollnz/docs/Employment.md +++ b/xero_python/payrollnz/docs/Employment.md @@ -6,6 +6,8 @@ Name | Type | Description | Notes **payroll_calendar_id** | **str** | Xero unique identifier for the payroll calendar of the employee | [optional] **pay_run_calendar_id** | **str** | Xero unique identifier for the payrun calendar for the employee (Deprecated in version 1.1.6) | [optional] **start_date** | **date** | Start date of the employment (YYYY-MM-DD) | [optional] +**engagement_type** | **str** | Engagement type of the employee | [optional] +**fixed_term_end_date** | **date** | End date for an employee with a fixed-term engagement type | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/xero_python/payrollnz/docs/PayrollNZApi.md b/xero_python/payrollnz/docs/PayrollNZApi.md index 82c3c2e2..f0f47485 100644 --- a/xero_python/payrollnz/docs/PayrollNZApi.md +++ b/xero_python/payrollnz/docs/PayrollNZApi.md @@ -8,25 +8,27 @@ Method | HTTP request | Description [**create_deduction**](PayrollNzApi.md#create_deduction) | **POST** /Deductions | Creates a new deduction for a specific employee [**create_earnings_rate**](PayrollNzApi.md#create_earnings_rate) | **POST** /EarningsRates | Creates a new earnings rate [**create_employee**](PayrollNzApi.md#create_employee) | **POST** /Employees | Creates an employees -[**create_employee_earnings_template**](PayrollNzApi.md#create_employee_earnings_template) | **POST** /Employees/{EmployeeID}/PayTemplates/earnings | Creates earnings template records for an employee +[**create_employee_earnings_template**](PayrollNzApi.md#create_employee_earnings_template) | **POST** /Employees/{EmployeeID}/PayTemplates/Earnings | Creates earnings template records for an employee [**create_employee_leave**](PayrollNzApi.md#create_employee_leave) | **POST** /Employees/{EmployeeID}/Leave | Creates leave records for a specific employee -[**create_employee_leave_setup**](PayrollNzApi.md#create_employee_leave_setup) | **POST** /Employees/{EmployeeID}/leaveSetup | Creates a leave set-up for a specific employee. This is required before viewing, configuring and requesting leave for an employee +[**create_employee_leave_setup**](PayrollNzApi.md#create_employee_leave_setup) | **POST** /Employees/{EmployeeID}/LeaveSetup | Creates a leave set-up for a specific employee. This is required before viewing, configuring and requesting leave for an employee [**create_employee_leave_type**](PayrollNzApi.md#create_employee_leave_type) | **POST** /Employees/{EmployeeID}/LeaveTypes | Creates leave type records for a specific employee -[**create_employee_opening_balances**](PayrollNzApi.md#create_employee_opening_balances) | **POST** /Employees/{EmployeeID}/openingBalances | Creates opening balances for a specific employee +[**create_employee_opening_balances**](PayrollNzApi.md#create_employee_opening_balances) | **POST** /Employees/{EmployeeID}/OpeningBalances | Creates opening balances for a specific employee [**create_employee_payment_method**](PayrollNzApi.md#create_employee_payment_method) | **POST** /Employees/{EmployeeID}/PaymentMethods | Creates a payment method for an employee [**create_employee_salary_and_wage**](PayrollNzApi.md#create_employee_salary_and_wage) | **POST** /Employees/{EmployeeID}/SalaryAndWages | Creates an employee salary and wage record +[**create_employee_working_pattern**](PayrollNzApi.md#create_employee_working_pattern) | **POST** /Employees/{EmployeeID}/Working-Patterns | Creates an employee working pattern [**create_employment**](PayrollNzApi.md#create_employment) | **POST** /Employees/{EmployeeID}/Employment | Creates an employment detail for a specific employee [**create_leave_type**](PayrollNzApi.md#create_leave_type) | **POST** /LeaveTypes | Creates a new leave type -[**create_multiple_employee_earnings_template**](PayrollNzApi.md#create_multiple_employee_earnings_template) | **POST** /Employees/{EmployeeID}/paytemplateearnings | Creates multiple employee earnings template records for a specific employee +[**create_multiple_employee_earnings_template**](PayrollNzApi.md#create_multiple_employee_earnings_template) | **POST** /Employees/{EmployeeID}/PayTemplateEarnings | Creates multiple employee earnings template records for a specific employee [**create_pay_run**](PayrollNzApi.md#create_pay_run) | **POST** /PayRuns | Creates a pay run [**create_pay_run_calendar**](PayrollNzApi.md#create_pay_run_calendar) | **POST** /PayRunCalendars | Creates a new payrun calendar [**create_reimbursement**](PayrollNzApi.md#create_reimbursement) | **POST** /Reimbursements | Creates a new reimbursement [**create_superannuation**](PayrollNzApi.md#create_superannuation) | **POST** /Superannuations | Creates a new superannuation [**create_timesheet**](PayrollNzApi.md#create_timesheet) | **POST** /Timesheets | Creates a new timesheet [**create_timesheet_line**](PayrollNzApi.md#create_timesheet_line) | **POST** /Timesheets/{TimesheetID}/Lines | Create a new timesheet line for a specific time sheet -[**delete_employee_earnings_template**](PayrollNzApi.md#delete_employee_earnings_template) | **DELETE** /Employees/{EmployeeID}/PayTemplates/earnings/{PayTemplateEarningID} | Deletes an employee's earnings template record +[**delete_employee_earnings_template**](PayrollNzApi.md#delete_employee_earnings_template) | **DELETE** /Employees/{EmployeeID}/PayTemplates/Earnings/{PayTemplateEarningID} | Deletes an employee's earnings template record [**delete_employee_leave**](PayrollNzApi.md#delete_employee_leave) | **DELETE** /Employees/{EmployeeID}/Leave/{LeaveID} | Deletes a leave record for a specific employee [**delete_employee_salary_and_wage**](PayrollNzApi.md#delete_employee_salary_and_wage) | **DELETE** /Employees/{EmployeeID}/SalaryAndWages/{SalaryAndWagesID} | Deletes an employee's salary and wages record +[**delete_employee_working_pattern**](PayrollNzApi.md#delete_employee_working_pattern) | **DELETE** /Employees/{EmployeeID}/Working-Patterns/{EmployeeWorkingPatternID} | deletes employee's working patterns [**delete_timesheet**](PayrollNzApi.md#delete_timesheet) | **DELETE** /Timesheets/{TimesheetID} | Deletes a timesheet [**delete_timesheet_line**](PayrollNzApi.md#delete_timesheet_line) | **DELETE** /Timesheets/{TimesheetID}/Lines/{TimesheetLineID} | Deletes a timesheet line for a specific timesheet [**get_deduction**](PayrollNzApi.md#get_deduction) | **GET** /Deductions/{deductionId} | Retrieves a single deduction by using a unique deduction ID @@ -38,12 +40,14 @@ Method | HTTP request | Description [**get_employee_leave_periods**](PayrollNzApi.md#get_employee_leave_periods) | **GET** /Employees/{EmployeeID}/LeavePeriods | Retrieves leave periods for a specific employee [**get_employee_leave_types**](PayrollNzApi.md#get_employee_leave_types) | **GET** /Employees/{EmployeeID}/LeaveTypes | Retrieves leave types for a specific employee [**get_employee_leaves**](PayrollNzApi.md#get_employee_leaves) | **GET** /Employees/{EmployeeID}/Leave | Retrieves leave records for a specific employee -[**get_employee_opening_balances**](PayrollNzApi.md#get_employee_opening_balances) | **GET** /Employees/{EmployeeID}/openingBalances | Retrieves the opening balance for a specific employee +[**get_employee_opening_balances**](PayrollNzApi.md#get_employee_opening_balances) | **GET** /Employees/{EmployeeID}/OpeningBalances | Retrieves the opening balance for a specific employee [**get_employee_pay_templates**](PayrollNzApi.md#get_employee_pay_templates) | **GET** /Employees/{EmployeeID}/PayTemplates | Retrieves pay templates for a specific employee [**get_employee_payment_method**](PayrollNzApi.md#get_employee_payment_method) | **GET** /Employees/{EmployeeID}/PaymentMethods | Retrieves available payment methods for a specific employee [**get_employee_salary_and_wage**](PayrollNzApi.md#get_employee_salary_and_wage) | **GET** /Employees/{EmployeeID}/SalaryAndWages/{SalaryAndWagesID} | Retrieves an employee's salary and wages record by using a unique salary and wage ID [**get_employee_salary_and_wages**](PayrollNzApi.md#get_employee_salary_and_wages) | **GET** /Employees/{EmployeeID}/SalaryAndWages | Retrieves an employee's salary and wages [**get_employee_tax**](PayrollNzApi.md#get_employee_tax) | **GET** /Employees/{EmployeeID}/Tax | Retrieves tax records for a specific employee +[**get_employee_working_pattern**](PayrollNzApi.md#get_employee_working_pattern) | **GET** /Employees/{EmployeeID}/Working-Patterns/{EmployeeWorkingPatternID} | Retrieves employee's working patterns +[**get_employee_working_patterns**](PayrollNzApi.md#get_employee_working_patterns) | **GET** /Employees/{EmployeeID}/Working-Patterns | Retrieves employee's working patterns [**get_employees**](PayrollNzApi.md#get_employees) | **GET** /Employees | Retrieves employees [**get_leave_type**](PayrollNzApi.md#get_leave_type) | **GET** /LeaveTypes/{LeaveTypeID} | Retrieves a specific leave type by using a unique leave type ID [**get_leave_types**](PayrollNzApi.md#get_leave_types) | **GET** /LeaveTypes | Retrieves leave types @@ -65,7 +69,7 @@ Method | HTTP request | Description [**get_tracking_categories**](PayrollNzApi.md#get_tracking_categories) | **GET** /Settings/TrackingCategories | Retrieves tracking categories [**revert_timesheet**](PayrollNzApi.md#revert_timesheet) | **POST** /Timesheets/{TimesheetID}/RevertToDraft | Reverts a timesheet to draft [**update_employee**](PayrollNzApi.md#update_employee) | **PUT** /Employees/{EmployeeID} | Updates an existing employee -[**update_employee_earnings_template**](PayrollNzApi.md#update_employee_earnings_template) | **PUT** /Employees/{EmployeeID}/PayTemplates/earnings/{PayTemplateEarningID} | Updates an earnings template records for an employee +[**update_employee_earnings_template**](PayrollNzApi.md#update_employee_earnings_template) | **PUT** /Employees/{EmployeeID}/PayTemplates/Earnings/{PayTemplateEarningID} | Updates an earnings template records for an employee [**update_employee_leave**](PayrollNzApi.md#update_employee_leave) | **PUT** /Employees/{EmployeeID}/Leave/{LeaveID} | Updates leave records for a specific employee [**update_employee_salary_and_wage**](PayrollNzApi.md#update_employee_salary_and_wage) | **PUT** /Employees/{EmployeeID}/SalaryAndWages/{SalaryAndWagesID} | Updates an employee's salary and wages record [**update_employee_tax**](PayrollNzApi.md#update_employee_tax) | **POST** /Employees/{EmployeeID}/Tax | Updates the tax records for a specific employee @@ -501,7 +505,7 @@ api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # str | Employee id for single object -employee_leave_setup = { "holidayPayOpeningBalance": 10, "annualLeaveOpeningBalance": 100, "sickLeaveHoursToAccrueAnnually": 20, "sickLeaveOpeningBalance": 10 } # EmployeeLeaveSetup | +employee_leave_setup = { "holidayPayOpeningBalance": 10, "annualLeaveOpeningBalance": 100, "sickLeaveHoursToAccrueAnnually": 20, "sickLeaveToAccrueAnnually": 20, "sickLeaveOpeningBalance": 10, "sickLeaveScheduleOfAccrual": "OnAnniversaryDate", "sickLeaveAnniversaryDate": "2023-12-31", "annualLeaveAnniversaryDate": "2023-12-31" } # EmployeeLeaveSetup | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates a leave set-up for a specific employee. This is required before viewing, configuring and requesting leave for an employee @@ -568,7 +572,7 @@ api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # str | Employee id for single object -employee_leave_type = { "leaveTypeID": "35da97ae-05b9-427f-9a98-69157ba42cec", "scheduleOfAccrual": "AnnuallyAfter6Months", "hoursAccruedAnnually": 10, "maximumToAccrue": 80, "openingBalance": 100, "rateAccruedHourly": 3.5 } # EmployeeLeaveType | +employee_leave_type = { "leaveTypeID": "35da97ae-05b9-427f-9a98-69157ba42cec", "scheduleOfAccrual": "AnnuallyAfter6Months", "hoursAccruedAnnually": 10, "unitsAccruedAnnually": 10, "typeOfUnitsToAccrue": "Hours", "openingBalanceTypeOfUnits": "Hours" "maximumToAccrue": 80, "openingBalance": 100, "rateAccruedHourly": 3.5 } # EmployeeLeaveType | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates leave type records for a specific employee @@ -803,6 +807,73 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **create_employee_working_pattern** +> EmployeeWorkingPatternWithWorkingWeeks create_employee_working_pattern(xero_tenant_id, employee_id, employee_working_pattern_with_working_weeks_request, idempotency_key=idempotency_key) + +Creates an employee working pattern + +### Example + +* OAuth Authentication (OAuth2): +```python +from xero_python.api_client import Configuration, ApiClient +from xero_python.api_client.oauth2 import OAuth2Token +from xero_python.exceptions import ApiException +from xero_python.payrollnz import PayrollNzApi +from pprint import pprint + +# Configure OAuth2 access token for authorization: OAuth2 +# simplified version, `xero_oauth2_token` represents permanent global token storage +xero_oauth2_token = {} # set to valid xero oauth2 token dictionary +# create client configuration with client id and client secret for automatic token refresh +api_config = Configuration(oauth2_token=OAuth2Token( + client_id="YOUR_API_CLIENT_ID", client_secret="YOUR_API_CLIENT_SECRET" +)) +# configure xero-python sdk client +api_client = ApiClient( + api_config, + oauth2_token_saver=lambda x: xero_oauth2_token.update(x), + oauth2_token_getter=lambda : xero_oauth2_token +) +# create an instance of the API class +api_instance = PayrollNzApi(api_client) + +xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant +employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # str | Employee id for single object +employee_working_pattern_with_working_weeks_request = { "effectiveFrom": "2020-01-01T00:00:00", "workingWeeks": [ { "monday": 0.0, "tuesday": 3.0000, "wednesday": 0.0, "thursday": 0.0, "friday": 0.0, "saturday": 0.0, "sunday": 0.0 } ] } # EmployeeWorkingPatternWithWorkingWeeksRequest | +idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) +try: + # Creates an employee working pattern + api_response = api_instance.create_employee_working_pattern(xero_tenant_id, employee_id, employee_working_pattern_with_working_weeks_request, idempotency_key=idempotency_key) + pprint(api_response) +except ApiException as e: + print("Exception when calling PayrollNzApi->create_employee_working_pattern: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **xero_tenant_id** | **str**| Xero identifier for Tenant | + **employee_id** | [**str**](.md)| Employee id for single object | + **employee_working_pattern_with_working_weeks_request** | [**EmployeeWorkingPatternWithWorkingWeeksRequest**](EmployeeWorkingPatternWithWorkingWeeksRequest.md)| | + **idempotency_key** | **str**| This allows you to safely retry requests without the risk of duplicate processing. 128 character max. | [optional] + +### Return type + +[**EmployeeWorkingPatternWithWorkingWeeks**](EmployeeWorkingPatternWithWorkingWeeks.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **create_employment** > EmploymentObject create_employment(xero_tenant_id, employee_id, employment, idempotency_key=idempotency_key) @@ -836,7 +907,7 @@ api_instance = PayrollNzApi(api_client) xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # str | Employee id for single object -employment = { "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "startDate": "2020-09-02" } # Employment | +employment = { "payrollCalendarID": "9aa56064-990f-4ad3-a189-d966d8f6a030", "startDate": "2020-09-02", "engagementType": "FixedTerm", "fixedTermEndDate": "2026-01-01" } # Employment | idempotency_key = 'KEY_VALUE' # str | This allows you to safely retry requests without the risk of duplicate processing. 128 character max. (optional) try: # Creates an employment detail for a specific employee @@ -1589,6 +1660,71 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **delete_employee_working_pattern** +> EmployeeLeaveObject delete_employee_working_pattern(xero_tenant_id, employee_id, employee_working_pattern_id) + +deletes employee's working patterns + +### Example + +* OAuth Authentication (OAuth2): +```python +from xero_python.api_client import Configuration, ApiClient +from xero_python.api_client.oauth2 import OAuth2Token +from xero_python.exceptions import ApiException +from xero_python.payrollnz import PayrollNzApi +from pprint import pprint + +# Configure OAuth2 access token for authorization: OAuth2 +# simplified version, `xero_oauth2_token` represents permanent global token storage +xero_oauth2_token = {} # set to valid xero oauth2 token dictionary +# create client configuration with client id and client secret for automatic token refresh +api_config = Configuration(oauth2_token=OAuth2Token( + client_id="YOUR_API_CLIENT_ID", client_secret="YOUR_API_CLIENT_SECRET" +)) +# configure xero-python sdk client +api_client = ApiClient( + api_config, + oauth2_token_saver=lambda x: xero_oauth2_token.update(x), + oauth2_token_getter=lambda : xero_oauth2_token +) +# create an instance of the API class +api_instance = PayrollNzApi(api_client) + +xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant +employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # str | Employee id for single object +employee_working_pattern_id = '4ff1e5cc-9835-40d5-bb18-09f3b118db9c' # str | Employee working pattern id for single object +try: + # deletes employee's working patterns + api_response = api_instance.delete_employee_working_pattern(xero_tenant_id, employee_id, employee_working_pattern_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling PayrollNzApi->delete_employee_working_pattern: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **xero_tenant_id** | **str**| Xero identifier for Tenant | + **employee_id** | [**str**](.md)| Employee id for single object | + **employee_working_pattern_id** | [**str**](.md)| Employee working pattern id for single object | + +### Return type + +[**EmployeeLeaveObject**](EmployeeLeaveObject.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **delete_timesheet** > TimesheetLine delete_timesheet(xero_tenant_id, timesheet_id) @@ -2670,6 +2806,134 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **get_employee_working_pattern** +> EmployeeWorkingPatternWithWorkingWeeksObject get_employee_working_pattern(xero_tenant_id, employee_id, employee_working_pattern_id) + +Retrieves employee's working patterns + +### Example + +* OAuth Authentication (OAuth2): +```python +from xero_python.api_client import Configuration, ApiClient +from xero_python.api_client.oauth2 import OAuth2Token +from xero_python.exceptions import ApiException +from xero_python.payrollnz import PayrollNzApi +from pprint import pprint + +# Configure OAuth2 access token for authorization: OAuth2 +# simplified version, `xero_oauth2_token` represents permanent global token storage +xero_oauth2_token = {} # set to valid xero oauth2 token dictionary +# create client configuration with client id and client secret for automatic token refresh +api_config = Configuration(oauth2_token=OAuth2Token( + client_id="YOUR_API_CLIENT_ID", client_secret="YOUR_API_CLIENT_SECRET" +)) +# configure xero-python sdk client +api_client = ApiClient( + api_config, + oauth2_token_saver=lambda x: xero_oauth2_token.update(x), + oauth2_token_getter=lambda : xero_oauth2_token +) +# create an instance of the API class +api_instance = PayrollNzApi(api_client) + +xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant +employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # str | Employee id for single object +employee_working_pattern_id = '4ff1e5cc-9835-40d5-bb18-09f3b118db9c' # str | Employee working pattern id for single object +try: + # Retrieves employee's working patterns + api_response = api_instance.get_employee_working_pattern(xero_tenant_id, employee_id, employee_working_pattern_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling PayrollNzApi->get_employee_working_pattern: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **xero_tenant_id** | **str**| Xero identifier for Tenant | + **employee_id** | [**str**](.md)| Employee id for single object | + **employee_working_pattern_id** | [**str**](.md)| Employee working pattern id for single object | + +### Return type + +[**EmployeeWorkingPatternWithWorkingWeeksObject**](EmployeeWorkingPatternWithWorkingWeeksObject.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_employee_working_patterns** +> EmployeeWorkingPatternsObject get_employee_working_patterns(xero_tenant_id, employee_id) + +Retrieves employee's working patterns + +### Example + +* OAuth Authentication (OAuth2): +```python +from xero_python.api_client import Configuration, ApiClient +from xero_python.api_client.oauth2 import OAuth2Token +from xero_python.exceptions import ApiException +from xero_python.payrollnz import PayrollNzApi +from pprint import pprint + +# Configure OAuth2 access token for authorization: OAuth2 +# simplified version, `xero_oauth2_token` represents permanent global token storage +xero_oauth2_token = {} # set to valid xero oauth2 token dictionary +# create client configuration with client id and client secret for automatic token refresh +api_config = Configuration(oauth2_token=OAuth2Token( + client_id="YOUR_API_CLIENT_ID", client_secret="YOUR_API_CLIENT_SECRET" +)) +# configure xero-python sdk client +api_client = ApiClient( + api_config, + oauth2_token_saver=lambda x: xero_oauth2_token.update(x), + oauth2_token_getter=lambda : xero_oauth2_token +) +# create an instance of the API class +api_instance = PayrollNzApi(api_client) + +xero_tenant_id = 'xero_tenant_id_example' # str | Xero identifier for Tenant +employee_id = '4ff1e5cc-9835-40d5-bb18-09fdb118db9c' # str | Employee id for single object +try: + # Retrieves employee's working patterns + api_response = api_instance.get_employee_working_patterns(xero_tenant_id, employee_id) + pprint(api_response) +except ApiException as e: + print("Exception when calling PayrollNzApi->get_employee_working_patterns: %s\n" % e) +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **xero_tenant_id** | **str**| Xero identifier for Tenant | + **employee_id** | [**str**](.md)| Employee id for single object | + +### Return type + +[**EmployeeWorkingPatternsObject**](EmployeeWorkingPatternsObject.md) + +### Authorization + +[OAuth2](../README.md#OAuth2) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **get_employees** > Employees get_employees(xero_tenant_id, filter=filter, page=page) diff --git a/xero_python/payrollnz/docs/SalaryAndWage.md b/xero_python/payrollnz/docs/SalaryAndWage.md index fa4cd16a..65ab101c 100644 --- a/xero_python/payrollnz/docs/SalaryAndWage.md +++ b/xero_python/payrollnz/docs/SalaryAndWage.md @@ -13,6 +13,7 @@ Name | Type | Description | Notes **annual_salary** | **float** | The annual salary | **status** | **str** | The current status of the corresponding salary and wages | **payment_type** | **str** | The type of the payment of the corresponding salary and wages | +**work_pattern_type** | **str** | The type of the Working Pattern of the corresponding salary and wages | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/xero_python/payrollnz/docs/WorkingWeek.md b/xero_python/payrollnz/docs/WorkingWeek.md new file mode 100644 index 00000000..58ad2b2a --- /dev/null +++ b/xero_python/payrollnz/docs/WorkingWeek.md @@ -0,0 +1,16 @@ +# WorkingWeek + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**monday** | **float** | The number of hours worked on a Monday | +**tuesday** | **float** | The number of hours worked on a Tuesday | +**wednesday** | **float** | The number of hours worked on a Wednesday | +**thursday** | **float** | The number of hours worked on a Thursday | +**friday** | **float** | The number of hours worked on a Friday | +**saturday** | **float** | The number of hours worked on a Saturday | +**sunday** | **float** | The number of hours worked on a Sunday | + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/xero_python/payrollnz/models/__init__.py b/xero_python/payrollnz/models/__init__.py index dc995d81..d2798463 100644 --- a/xero_python/payrollnz/models/__init__.py +++ b/xero_python/payrollnz/models/__init__.py @@ -82,6 +82,19 @@ ) from xero_python.payrollnz.models.employee_tax import EmployeeTax from xero_python.payrollnz.models.employee_tax_object import EmployeeTaxObject +from xero_python.payrollnz.models.employee_working_pattern import EmployeeWorkingPattern +from xero_python.payrollnz.models.employee_working_pattern_with_working_weeks import ( + EmployeeWorkingPatternWithWorkingWeeks, +) +from xero_python.payrollnz.models.employee_working_pattern_with_working_weeks_object import ( + EmployeeWorkingPatternWithWorkingWeeksObject, +) +from xero_python.payrollnz.models.employee_working_pattern_with_working_weeks_request import ( + EmployeeWorkingPatternWithWorkingWeeksRequest, +) +from xero_python.payrollnz.models.employee_working_patterns_object import ( + EmployeeWorkingPatternsObject, +) from xero_python.payrollnz.models.employees import Employees from xero_python.payrollnz.models.employment import Employment from xero_python.payrollnz.models.employment_object import EmploymentObject @@ -139,3 +152,4 @@ from xero_python.payrollnz.models.timesheets import Timesheets from xero_python.payrollnz.models.tracking_categories import TrackingCategories from xero_python.payrollnz.models.tracking_category import TrackingCategory +from xero_python.payrollnz.models.working_week import WorkingWeek diff --git a/xero_python/payrollnz/models/employee.py b/xero_python/payrollnz/models/employee.py index e96d7895..2d507fb3 100644 --- a/xero_python/payrollnz/models/employee.py +++ b/xero_python/payrollnz/models/employee.py @@ -45,6 +45,8 @@ class Employee(BaseModel): "updated_date_utc": "datetime", "created_date_utc": "datetime", "job_title": "str", + "engagement_type": "str", + "fixed_term_end_date": "date", } attribute_map = { @@ -63,6 +65,8 @@ class Employee(BaseModel): "updated_date_utc": "updatedDateUTC", "created_date_utc": "createdDateUTC", "job_title": "jobTitle", + "engagement_type": "engagementType", + "fixed_term_end_date": "fixedTermEndDate", } def __init__( @@ -82,6 +86,8 @@ def __init__( updated_date_utc=None, created_date_utc=None, job_title=None, + engagement_type=None, + fixed_term_end_date=None, ): # noqa: E501 """Employee - a model defined in OpenAPI""" # noqa: E501 @@ -100,6 +106,8 @@ def __init__( self._updated_date_utc = None self._created_date_utc = None self._job_title = None + self._engagement_type = None + self._fixed_term_end_date = None self.discriminator = None if employee_id is not None: @@ -132,6 +140,10 @@ def __init__( self.created_date_utc = created_date_utc if job_title is not None: self.job_title = job_title + if engagement_type is not None: + self.engagement_type = engagement_type + if fixed_term_end_date is not None: + self.fixed_term_end_date = fixed_term_end_date @property def employee_id(self): @@ -484,3 +496,49 @@ def job_title(self, job_title): """ self._job_title = job_title + + @property + def engagement_type(self): + """Gets the engagement_type of this Employee. # noqa: E501 + + Engagement type of the employee # noqa: E501 + + :return: The engagement_type of this Employee. # noqa: E501 + :rtype: str + """ + return self._engagement_type + + @engagement_type.setter + def engagement_type(self, engagement_type): + """Sets the engagement_type of this Employee. + + Engagement type of the employee # noqa: E501 + + :param engagement_type: The engagement_type of this Employee. # noqa: E501 + :type: str + """ + + self._engagement_type = engagement_type + + @property + def fixed_term_end_date(self): + """Gets the fixed_term_end_date of this Employee. # noqa: E501 + + End date for an employee with a fixed-term engagement type # noqa: E501 + + :return: The fixed_term_end_date of this Employee. # noqa: E501 + :rtype: date + """ + return self._fixed_term_end_date + + @fixed_term_end_date.setter + def fixed_term_end_date(self, fixed_term_end_date): + """Sets the fixed_term_end_date of this Employee. + + End date for an employee with a fixed-term engagement type # noqa: E501 + + :param fixed_term_end_date: The fixed_term_end_date of this Employee. # noqa: E501 + :type: date + """ + + self._fixed_term_end_date = fixed_term_end_date diff --git a/xero_python/payrollnz/models/employee_leave_setup.py b/xero_python/payrollnz/models/employee_leave_setup.py index 2a63a0bd..1e197d54 100644 --- a/xero_python/payrollnz/models/employee_leave_setup.py +++ b/xero_python/payrollnz/models/employee_leave_setup.py @@ -37,6 +37,8 @@ class EmployeeLeaveSetup(BaseModel): "sick_leave_hours_to_accrue_annually": "float", "sick_leave_maximum_hours_to_accrue": "float", "sick_leave_opening_balance": "float", + "sick_leave_schedule_of_accrual": "str", + "sick_leave_anniversary_date": "date", } attribute_map = { @@ -47,6 +49,8 @@ class EmployeeLeaveSetup(BaseModel): "sick_leave_hours_to_accrue_annually": "sickLeaveHoursToAccrueAnnually", "sick_leave_maximum_hours_to_accrue": "sickLeaveMaximumHoursToAccrue", "sick_leave_opening_balance": "sickLeaveOpeningBalance", + "sick_leave_schedule_of_accrual": "SickLeaveScheduleOfAccrual", + "sick_leave_anniversary_date": "SickLeaveAnniversaryDate", } def __init__( @@ -58,6 +62,8 @@ def __init__( sick_leave_hours_to_accrue_annually=None, sick_leave_maximum_hours_to_accrue=None, sick_leave_opening_balance=None, + sick_leave_schedule_of_accrual=None, + sick_leave_anniversary_date=None, ): # noqa: E501 """EmployeeLeaveSetup - a model defined in OpenAPI""" # noqa: E501 @@ -68,6 +74,8 @@ def __init__( self._sick_leave_hours_to_accrue_annually = None self._sick_leave_maximum_hours_to_accrue = None self._sick_leave_opening_balance = None + self._sick_leave_schedule_of_accrual = None + self._sick_leave_anniversary_date = None self.discriminator = None if include_holiday_pay is not None: @@ -88,6 +96,10 @@ def __init__( self.sick_leave_maximum_hours_to_accrue = sick_leave_maximum_hours_to_accrue if sick_leave_opening_balance is not None: self.sick_leave_opening_balance = sick_leave_opening_balance + if sick_leave_schedule_of_accrual is not None: + self.sick_leave_schedule_of_accrual = sick_leave_schedule_of_accrual + if sick_leave_anniversary_date is not None: + self.sick_leave_anniversary_date = sick_leave_anniversary_date @property def include_holiday_pay(self): @@ -253,3 +265,49 @@ def sick_leave_opening_balance(self, sick_leave_opening_balance): """ self._sick_leave_opening_balance = sick_leave_opening_balance + + @property + def sick_leave_schedule_of_accrual(self): + """Gets the sick_leave_schedule_of_accrual of this EmployeeLeaveSetup. # noqa: E501 + + Set Schedule of Accrual Type for Sick Leave # noqa: E501 + + :return: The sick_leave_schedule_of_accrual of this EmployeeLeaveSetup. # noqa: E501 + :rtype: str + """ + return self._sick_leave_schedule_of_accrual + + @sick_leave_schedule_of_accrual.setter + def sick_leave_schedule_of_accrual(self, sick_leave_schedule_of_accrual): + """Sets the sick_leave_schedule_of_accrual of this EmployeeLeaveSetup. + + Set Schedule of Accrual Type for Sick Leave # noqa: E501 + + :param sick_leave_schedule_of_accrual: The sick_leave_schedule_of_accrual of this EmployeeLeaveSetup. # noqa: E501 + :type: str + """ + + self._sick_leave_schedule_of_accrual = sick_leave_schedule_of_accrual + + @property + def sick_leave_anniversary_date(self): + """Gets the sick_leave_anniversary_date of this EmployeeLeaveSetup. # noqa: E501 + + If Sick Leave Schedule of Accrual is \"OnAnniversaryDate\", this is the date when entitled to Sick Leave # noqa: E501 + + :return: The sick_leave_anniversary_date of this EmployeeLeaveSetup. # noqa: E501 + :rtype: date + """ + return self._sick_leave_anniversary_date + + @sick_leave_anniversary_date.setter + def sick_leave_anniversary_date(self, sick_leave_anniversary_date): + """Sets the sick_leave_anniversary_date of this EmployeeLeaveSetup. + + If Sick Leave Schedule of Accrual is \"OnAnniversaryDate\", this is the date when entitled to Sick Leave # noqa: E501 + + :param sick_leave_anniversary_date: The sick_leave_anniversary_date of this EmployeeLeaveSetup. # noqa: E501 + :type: date + """ + + self._sick_leave_anniversary_date = sick_leave_anniversary_date diff --git a/xero_python/payrollnz/models/employee_leave_type.py b/xero_python/payrollnz/models/employee_leave_type.py index 0a5814e7..5ccf7b9d 100644 --- a/xero_python/payrollnz/models/employee_leave_type.py +++ b/xero_python/payrollnz/models/employee_leave_type.py @@ -40,6 +40,7 @@ class EmployeeLeaveType(BaseModel): "include_holiday_pay_every_pay": "bool", "show_annual_leave_in_advance": "bool", "annual_leave_total_amount_paid": "float", + "schedule_of_accrual_date": "date", } attribute_map = { @@ -53,6 +54,7 @@ class EmployeeLeaveType(BaseModel): "include_holiday_pay_every_pay": "includeHolidayPayEveryPay", "show_annual_leave_in_advance": "showAnnualLeaveInAdvance", "annual_leave_total_amount_paid": "annualLeaveTotalAmountPaid", + "schedule_of_accrual_date": "scheduleOfAccrualDate", } def __init__( @@ -67,6 +69,7 @@ def __init__( include_holiday_pay_every_pay=None, show_annual_leave_in_advance=None, annual_leave_total_amount_paid=None, + schedule_of_accrual_date=None, ): # noqa: E501 """EmployeeLeaveType - a model defined in OpenAPI""" # noqa: E501 @@ -80,6 +83,7 @@ def __init__( self._include_holiday_pay_every_pay = None self._show_annual_leave_in_advance = None self._annual_leave_total_amount_paid = None + self._schedule_of_accrual_date = None self.discriminator = None if leave_type_id is not None: @@ -102,6 +106,8 @@ def __init__( self.show_annual_leave_in_advance = show_annual_leave_in_advance if annual_leave_total_amount_paid is not None: self.annual_leave_total_amount_paid = annual_leave_total_amount_paid + if schedule_of_accrual_date is not None: + self.schedule_of_accrual_date = schedule_of_accrual_date @property def leave_type_id(self): @@ -347,3 +353,26 @@ def annual_leave_total_amount_paid(self, annual_leave_total_amount_paid): """ self._annual_leave_total_amount_paid = annual_leave_total_amount_paid + + @property + def schedule_of_accrual_date(self): + """Gets the schedule_of_accrual_date of this EmployeeLeaveType. # noqa: E501 + + The date when an employee becomes entitled to their accrual. # noqa: E501 + + :return: The schedule_of_accrual_date of this EmployeeLeaveType. # noqa: E501 + :rtype: date + """ + return self._schedule_of_accrual_date + + @schedule_of_accrual_date.setter + def schedule_of_accrual_date(self, schedule_of_accrual_date): + """Sets the schedule_of_accrual_date of this EmployeeLeaveType. + + The date when an employee becomes entitled to their accrual. # noqa: E501 + + :param schedule_of_accrual_date: The schedule_of_accrual_date of this EmployeeLeaveType. # noqa: E501 + :type: date + """ + + self._schedule_of_accrual_date = schedule_of_accrual_date diff --git a/xero_python/payrollnz/models/employee_working_pattern.py b/xero_python/payrollnz/models/employee_working_pattern.py new file mode 100644 index 00000000..90b742a4 --- /dev/null +++ b/xero_python/payrollnz/models/employee_working_pattern.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Xero Payroll NZ + + This is the Xero Payroll API for orgs in the NZ region. # noqa: E501 + + Contact: api@xero.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 + +from xero_python.models import BaseModel + + +class EmployeeWorkingPattern(BaseModel): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = {"payee_working_pattern_id": "str", "effective_from": "date"} + + attribute_map = { + "payee_working_pattern_id": "payeeWorkingPatternID", + "effective_from": "effectiveFrom", + } + + def __init__( + self, payee_working_pattern_id=None, effective_from=None + ): # noqa: E501 + """EmployeeWorkingPattern - a model defined in OpenAPI""" # noqa: E501 + + self._payee_working_pattern_id = None + self._effective_from = None + self.discriminator = None + + self.payee_working_pattern_id = payee_working_pattern_id + self.effective_from = effective_from + + @property + def payee_working_pattern_id(self): + """Gets the payee_working_pattern_id of this EmployeeWorkingPattern. # noqa: E501 + + The Xero identifier for for Employee working pattern # noqa: E501 + + :return: The payee_working_pattern_id of this EmployeeWorkingPattern. # noqa: E501 + :rtype: str + """ + return self._payee_working_pattern_id + + @payee_working_pattern_id.setter + def payee_working_pattern_id(self, payee_working_pattern_id): + """Sets the payee_working_pattern_id of this EmployeeWorkingPattern. + + The Xero identifier for for Employee working pattern # noqa: E501 + + :param payee_working_pattern_id: The payee_working_pattern_id of this EmployeeWorkingPattern. # noqa: E501 + :type: str + """ + if payee_working_pattern_id is None: + raise ValueError( + "Invalid value for `payee_working_pattern_id`, must not be `None`" + ) # noqa: E501 + + self._payee_working_pattern_id = payee_working_pattern_id + + @property + def effective_from(self): + """Gets the effective_from of this EmployeeWorkingPattern. # noqa: E501 + + The effective date of the corresponding salary and wages # noqa: E501 + + :return: The effective_from of this EmployeeWorkingPattern. # noqa: E501 + :rtype: date + """ + return self._effective_from + + @effective_from.setter + def effective_from(self, effective_from): + """Sets the effective_from of this EmployeeWorkingPattern. + + The effective date of the corresponding salary and wages # noqa: E501 + + :param effective_from: The effective_from of this EmployeeWorkingPattern. # noqa: E501 + :type: date + """ + if effective_from is None: + raise ValueError( + "Invalid value for `effective_from`, must not be `None`" + ) # noqa: E501 + + self._effective_from = effective_from diff --git a/xero_python/payrollnz/models/employee_working_pattern_with_working_weeks.py b/xero_python/payrollnz/models/employee_working_pattern_with_working_weeks.py new file mode 100644 index 00000000..c673c69f --- /dev/null +++ b/xero_python/payrollnz/models/employee_working_pattern_with_working_weeks.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" + Xero Payroll NZ + + This is the Xero Payroll API for orgs in the NZ region. # noqa: E501 + + Contact: api@xero.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 + +from xero_python.models import BaseModel + + +class EmployeeWorkingPatternWithWorkingWeeks(BaseModel): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + "payee_working_pattern_id": "str", + "effective_from": "date", + "working_weeks": "list[WorkingWeek]", + } + + attribute_map = { + "payee_working_pattern_id": "payeeWorkingPatternID", + "effective_from": "effectiveFrom", + "working_weeks": "workingWeeks", + } + + def __init__( + self, payee_working_pattern_id=None, effective_from=None, working_weeks=None + ): # noqa: E501 + """EmployeeWorkingPatternWithWorkingWeeks - a model defined in OpenAPI""" # noqa: E501 + + self._payee_working_pattern_id = None + self._effective_from = None + self._working_weeks = None + self.discriminator = None + + self.payee_working_pattern_id = payee_working_pattern_id + self.effective_from = effective_from + if working_weeks is not None: + self.working_weeks = working_weeks + + @property + def payee_working_pattern_id(self): + """Gets the payee_working_pattern_id of this EmployeeWorkingPatternWithWorkingWeeks. # noqa: E501 + + The Xero identifier for for Employee working pattern # noqa: E501 + + :return: The payee_working_pattern_id of this EmployeeWorkingPatternWithWorkingWeeks. # noqa: E501 + :rtype: str + """ + return self._payee_working_pattern_id + + @payee_working_pattern_id.setter + def payee_working_pattern_id(self, payee_working_pattern_id): + """Sets the payee_working_pattern_id of this EmployeeWorkingPatternWithWorkingWeeks. + + The Xero identifier for for Employee working pattern # noqa: E501 + + :param payee_working_pattern_id: The payee_working_pattern_id of this EmployeeWorkingPatternWithWorkingWeeks. # noqa: E501 + :type: str + """ + if payee_working_pattern_id is None: + raise ValueError( + "Invalid value for `payee_working_pattern_id`, must not be `None`" + ) # noqa: E501 + + self._payee_working_pattern_id = payee_working_pattern_id + + @property + def effective_from(self): + """Gets the effective_from of this EmployeeWorkingPatternWithWorkingWeeks. # noqa: E501 + + The effective date of the corresponding salary and wages # noqa: E501 + + :return: The effective_from of this EmployeeWorkingPatternWithWorkingWeeks. # noqa: E501 + :rtype: date + """ + return self._effective_from + + @effective_from.setter + def effective_from(self, effective_from): + """Sets the effective_from of this EmployeeWorkingPatternWithWorkingWeeks. + + The effective date of the corresponding salary and wages # noqa: E501 + + :param effective_from: The effective_from of this EmployeeWorkingPatternWithWorkingWeeks. # noqa: E501 + :type: date + """ + if effective_from is None: + raise ValueError( + "Invalid value for `effective_from`, must not be `None`" + ) # noqa: E501 + + self._effective_from = effective_from + + @property + def working_weeks(self): + """Gets the working_weeks of this EmployeeWorkingPatternWithWorkingWeeks. # noqa: E501 + + + :return: The working_weeks of this EmployeeWorkingPatternWithWorkingWeeks. # noqa: E501 + :rtype: list[WorkingWeek] + """ + return self._working_weeks + + @working_weeks.setter + def working_weeks(self, working_weeks): + """Sets the working_weeks of this EmployeeWorkingPatternWithWorkingWeeks. + + + :param working_weeks: The working_weeks of this EmployeeWorkingPatternWithWorkingWeeks. # noqa: E501 + :type: list[WorkingWeek] + """ + + self._working_weeks = working_weeks diff --git a/xero_python/payrollnz/models/employee_working_pattern_with_working_weeks_object.py b/xero_python/payrollnz/models/employee_working_pattern_with_working_weeks_object.py new file mode 100644 index 00000000..4982c6df --- /dev/null +++ b/xero_python/payrollnz/models/employee_working_pattern_with_working_weeks_object.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + Xero Payroll NZ + + This is the Xero Payroll API for orgs in the NZ region. # noqa: E501 + + Contact: api@xero.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 + +from xero_python.models import BaseModel + + +class EmployeeWorkingPatternWithWorkingWeeksObject(BaseModel): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + "pagination": "Pagination", + "problem": "Problem", + "payee_working_pattern": "EmployeeWorkingPatternWithWorkingWeeks", + } + + attribute_map = { + "pagination": "pagination", + "problem": "problem", + "payee_working_pattern": "payeeWorkingPattern", + } + + def __init__( + self, pagination=None, problem=None, payee_working_pattern=None + ): # noqa: E501 + """EmployeeWorkingPatternWithWorkingWeeksObject - a model defined in OpenAPI""" # noqa: E501 + + self._pagination = None + self._problem = None + self._payee_working_pattern = None + self.discriminator = None + + if pagination is not None: + self.pagination = pagination + if problem is not None: + self.problem = problem + if payee_working_pattern is not None: + self.payee_working_pattern = payee_working_pattern + + @property + def pagination(self): + """Gets the pagination of this EmployeeWorkingPatternWithWorkingWeeksObject. # noqa: E501 + + + :return: The pagination of this EmployeeWorkingPatternWithWorkingWeeksObject. # noqa: E501 + :rtype: Pagination + """ + return self._pagination + + @pagination.setter + def pagination(self, pagination): + """Sets the pagination of this EmployeeWorkingPatternWithWorkingWeeksObject. + + + :param pagination: The pagination of this EmployeeWorkingPatternWithWorkingWeeksObject. # noqa: E501 + :type: Pagination + """ + + self._pagination = pagination + + @property + def problem(self): + """Gets the problem of this EmployeeWorkingPatternWithWorkingWeeksObject. # noqa: E501 + + + :return: The problem of this EmployeeWorkingPatternWithWorkingWeeksObject. # noqa: E501 + :rtype: Problem + """ + return self._problem + + @problem.setter + def problem(self, problem): + """Sets the problem of this EmployeeWorkingPatternWithWorkingWeeksObject. + + + :param problem: The problem of this EmployeeWorkingPatternWithWorkingWeeksObject. # noqa: E501 + :type: Problem + """ + + self._problem = problem + + @property + def payee_working_pattern(self): + """Gets the payee_working_pattern of this EmployeeWorkingPatternWithWorkingWeeksObject. # noqa: E501 + + + :return: The payee_working_pattern of this EmployeeWorkingPatternWithWorkingWeeksObject. # noqa: E501 + :rtype: EmployeeWorkingPatternWithWorkingWeeks + """ + return self._payee_working_pattern + + @payee_working_pattern.setter + def payee_working_pattern(self, payee_working_pattern): + """Sets the payee_working_pattern of this EmployeeWorkingPatternWithWorkingWeeksObject. + + + :param payee_working_pattern: The payee_working_pattern of this EmployeeWorkingPatternWithWorkingWeeksObject. # noqa: E501 + :type: EmployeeWorkingPatternWithWorkingWeeks + """ + + self._payee_working_pattern = payee_working_pattern diff --git a/xero_python/payrollnz/models/employee_working_pattern_with_working_weeks_request.py b/xero_python/payrollnz/models/employee_working_pattern_with_working_weeks_request.py new file mode 100644 index 00000000..c58be009 --- /dev/null +++ b/xero_python/payrollnz/models/employee_working_pattern_with_working_weeks_request.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Xero Payroll NZ + + This is the Xero Payroll API for orgs in the NZ region. # noqa: E501 + + Contact: api@xero.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 + +from xero_python.models import BaseModel + + +class EmployeeWorkingPatternWithWorkingWeeksRequest(BaseModel): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = {"effective_from": "date", "working_weeks": "list[WorkingWeek]"} + + attribute_map = {"effective_from": "effectiveFrom", "working_weeks": "workingWeeks"} + + def __init__(self, effective_from=None, working_weeks=None): # noqa: E501 + """EmployeeWorkingPatternWithWorkingWeeksRequest - a model defined in OpenAPI""" # noqa: E501 + + self._effective_from = None + self._working_weeks = None + self.discriminator = None + + self.effective_from = effective_from + self.working_weeks = working_weeks + + @property + def effective_from(self): + """Gets the effective_from of this EmployeeWorkingPatternWithWorkingWeeksRequest. # noqa: E501 + + The effective date of the corresponding salary and wages # noqa: E501 + + :return: The effective_from of this EmployeeWorkingPatternWithWorkingWeeksRequest. # noqa: E501 + :rtype: date + """ + return self._effective_from + + @effective_from.setter + def effective_from(self, effective_from): + """Sets the effective_from of this EmployeeWorkingPatternWithWorkingWeeksRequest. + + The effective date of the corresponding salary and wages # noqa: E501 + + :param effective_from: The effective_from of this EmployeeWorkingPatternWithWorkingWeeksRequest. # noqa: E501 + :type: date + """ + if effective_from is None: + raise ValueError( + "Invalid value for `effective_from`, must not be `None`" + ) # noqa: E501 + + self._effective_from = effective_from + + @property + def working_weeks(self): + """Gets the working_weeks of this EmployeeWorkingPatternWithWorkingWeeksRequest. # noqa: E501 + + + :return: The working_weeks of this EmployeeWorkingPatternWithWorkingWeeksRequest. # noqa: E501 + :rtype: list[WorkingWeek] + """ + return self._working_weeks + + @working_weeks.setter + def working_weeks(self, working_weeks): + """Sets the working_weeks of this EmployeeWorkingPatternWithWorkingWeeksRequest. + + + :param working_weeks: The working_weeks of this EmployeeWorkingPatternWithWorkingWeeksRequest. # noqa: E501 + :type: list[WorkingWeek] + """ + if working_weeks is None: + raise ValueError( + "Invalid value for `working_weeks`, must not be `None`" + ) # noqa: E501 + + self._working_weeks = working_weeks diff --git a/xero_python/payrollnz/models/employee_working_patterns_object.py b/xero_python/payrollnz/models/employee_working_patterns_object.py new file mode 100644 index 00000000..9a3281ad --- /dev/null +++ b/xero_python/payrollnz/models/employee_working_patterns_object.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + Xero Payroll NZ + + This is the Xero Payroll API for orgs in the NZ region. # noqa: E501 + + Contact: api@xero.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 + +from xero_python.models import BaseModel + + +class EmployeeWorkingPatternsObject(BaseModel): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + "pagination": "Pagination", + "problem": "Problem", + "payee_working_patterns": "list[EmployeeWorkingPattern]", + } + + attribute_map = { + "pagination": "pagination", + "problem": "problem", + "payee_working_patterns": "payeeWorkingPatterns", + } + + def __init__( + self, pagination=None, problem=None, payee_working_patterns=None + ): # noqa: E501 + """EmployeeWorkingPatternsObject - a model defined in OpenAPI""" # noqa: E501 + + self._pagination = None + self._problem = None + self._payee_working_patterns = None + self.discriminator = None + + if pagination is not None: + self.pagination = pagination + if problem is not None: + self.problem = problem + if payee_working_patterns is not None: + self.payee_working_patterns = payee_working_patterns + + @property + def pagination(self): + """Gets the pagination of this EmployeeWorkingPatternsObject. # noqa: E501 + + + :return: The pagination of this EmployeeWorkingPatternsObject. # noqa: E501 + :rtype: Pagination + """ + return self._pagination + + @pagination.setter + def pagination(self, pagination): + """Sets the pagination of this EmployeeWorkingPatternsObject. + + + :param pagination: The pagination of this EmployeeWorkingPatternsObject. # noqa: E501 + :type: Pagination + """ + + self._pagination = pagination + + @property + def problem(self): + """Gets the problem of this EmployeeWorkingPatternsObject. # noqa: E501 + + + :return: The problem of this EmployeeWorkingPatternsObject. # noqa: E501 + :rtype: Problem + """ + return self._problem + + @problem.setter + def problem(self, problem): + """Sets the problem of this EmployeeWorkingPatternsObject. + + + :param problem: The problem of this EmployeeWorkingPatternsObject. # noqa: E501 + :type: Problem + """ + + self._problem = problem + + @property + def payee_working_patterns(self): + """Gets the payee_working_patterns of this EmployeeWorkingPatternsObject. # noqa: E501 + + + :return: The payee_working_patterns of this EmployeeWorkingPatternsObject. # noqa: E501 + :rtype: list[EmployeeWorkingPattern] + """ + return self._payee_working_patterns + + @payee_working_patterns.setter + def payee_working_patterns(self, payee_working_patterns): + """Sets the payee_working_patterns of this EmployeeWorkingPatternsObject. + + + :param payee_working_patterns: The payee_working_patterns of this EmployeeWorkingPatternsObject. # noqa: E501 + :type: list[EmployeeWorkingPattern] + """ + + self._payee_working_patterns = payee_working_patterns diff --git a/xero_python/payrollnz/models/employment.py b/xero_python/payrollnz/models/employment.py index da83247b..d520d46e 100644 --- a/xero_python/payrollnz/models/employment.py +++ b/xero_python/payrollnz/models/employment.py @@ -33,22 +33,33 @@ class Employment(BaseModel): "payroll_calendar_id": "str", "pay_run_calendar_id": "str", "start_date": "date", + "engagement_type": "str", + "fixed_term_end_date": "date", } attribute_map = { "payroll_calendar_id": "payrollCalendarID", "pay_run_calendar_id": "payRunCalendarID", "start_date": "startDate", + "engagement_type": "engagementType", + "fixed_term_end_date": "fixedTermEndDate", } def __init__( - self, payroll_calendar_id=None, pay_run_calendar_id=None, start_date=None + self, + payroll_calendar_id=None, + pay_run_calendar_id=None, + start_date=None, + engagement_type=None, + fixed_term_end_date=None, ): # noqa: E501 """Employment - a model defined in OpenAPI""" # noqa: E501 self._payroll_calendar_id = None self._pay_run_calendar_id = None self._start_date = None + self._engagement_type = None + self._fixed_term_end_date = None self.discriminator = None if payroll_calendar_id is not None: @@ -57,6 +68,10 @@ def __init__( self.pay_run_calendar_id = pay_run_calendar_id if start_date is not None: self.start_date = start_date + if engagement_type is not None: + self.engagement_type = engagement_type + if fixed_term_end_date is not None: + self.fixed_term_end_date = fixed_term_end_date @property def payroll_calendar_id(self): @@ -126,3 +141,49 @@ def start_date(self, start_date): """ self._start_date = start_date + + @property + def engagement_type(self): + """Gets the engagement_type of this Employment. # noqa: E501 + + Engagement type of the employee # noqa: E501 + + :return: The engagement_type of this Employment. # noqa: E501 + :rtype: str + """ + return self._engagement_type + + @engagement_type.setter + def engagement_type(self, engagement_type): + """Sets the engagement_type of this Employment. + + Engagement type of the employee # noqa: E501 + + :param engagement_type: The engagement_type of this Employment. # noqa: E501 + :type: str + """ + + self._engagement_type = engagement_type + + @property + def fixed_term_end_date(self): + """Gets the fixed_term_end_date of this Employment. # noqa: E501 + + End date for an employee with a fixed-term engagement type # noqa: E501 + + :return: The fixed_term_end_date of this Employment. # noqa: E501 + :rtype: date + """ + return self._fixed_term_end_date + + @fixed_term_end_date.setter + def fixed_term_end_date(self, fixed_term_end_date): + """Sets the fixed_term_end_date of this Employment. + + End date for an employee with a fixed-term engagement type # noqa: E501 + + :param fixed_term_end_date: The fixed_term_end_date of this Employment. # noqa: E501 + :type: date + """ + + self._fixed_term_end_date = fixed_term_end_date diff --git a/xero_python/payrollnz/models/salary_and_wage.py b/xero_python/payrollnz/models/salary_and_wage.py index 8034e143..5259d1c1 100644 --- a/xero_python/payrollnz/models/salary_and_wage.py +++ b/xero_python/payrollnz/models/salary_and_wage.py @@ -40,6 +40,7 @@ class SalaryAndWage(BaseModel): "annual_salary": "float", "status": "str", "payment_type": "str", + "work_pattern_type": "str", } attribute_map = { @@ -53,6 +54,7 @@ class SalaryAndWage(BaseModel): "annual_salary": "annualSalary", "status": "status", "payment_type": "paymentType", + "work_pattern_type": "workPatternType", } def __init__( @@ -67,6 +69,7 @@ def __init__( annual_salary=None, status=None, payment_type=None, + work_pattern_type=None, ): # noqa: E501 """SalaryAndWage - a model defined in OpenAPI""" # noqa: E501 @@ -80,6 +83,7 @@ def __init__( self._annual_salary = None self._status = None self._payment_type = None + self._work_pattern_type = None self.discriminator = None if salary_and_wages_id is not None: @@ -95,6 +99,8 @@ def __init__( self.annual_salary = annual_salary self.status = status self.payment_type = payment_type + if work_pattern_type is not None: + self.work_pattern_type = work_pattern_type @property def salary_and_wages_id(self): @@ -371,3 +377,35 @@ def payment_type(self, payment_type): ) self._payment_type = payment_type + + @property + def work_pattern_type(self): + """Gets the work_pattern_type of this SalaryAndWage. # noqa: E501 + + The type of the Working Pattern of the corresponding salary and wages # noqa: E501 + + :return: The work_pattern_type of this SalaryAndWage. # noqa: E501 + :rtype: str + """ + return self._work_pattern_type + + @work_pattern_type.setter + def work_pattern_type(self, work_pattern_type): + """Sets the work_pattern_type of this SalaryAndWage. + + The type of the Working Pattern of the corresponding salary and wages # noqa: E501 + + :param work_pattern_type: The work_pattern_type of this SalaryAndWage. # noqa: E501 + :type: str + """ + allowed_values = ["DaysAndHours", "RegularWeek", "None"] # noqa: E501 + + if work_pattern_type: + if work_pattern_type not in allowed_values: + raise ValueError( + "Invalid value for `work_pattern_type` ({0}), must be one of {1}".format( # noqa: E501 + work_pattern_type, allowed_values + ) + ) + + self._work_pattern_type = work_pattern_type diff --git a/xero_python/payrollnz/models/working_week.py b/xero_python/payrollnz/models/working_week.py new file mode 100644 index 00000000..bc047e1e --- /dev/null +++ b/xero_python/payrollnz/models/working_week.py @@ -0,0 +1,268 @@ +# coding: utf-8 + +""" + Xero Payroll NZ + + This is the Xero Payroll API for orgs in the NZ region. # noqa: E501 + + Contact: api@xero.com + Generated by: https://openapi-generator.tech +""" + + +import re # noqa: F401 + +from xero_python.models import BaseModel + + +class WorkingWeek(BaseModel): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + """ + Attributes: + openapi_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + openapi_types = { + "monday": "float", + "tuesday": "float", + "wednesday": "float", + "thursday": "float", + "friday": "float", + "saturday": "float", + "sunday": "float", + } + + attribute_map = { + "monday": "monday", + "tuesday": "tuesday", + "wednesday": "wednesday", + "thursday": "thursday", + "friday": "friday", + "saturday": "saturday", + "sunday": "sunday", + } + + def __init__( + self, + monday=None, + tuesday=None, + wednesday=None, + thursday=None, + friday=None, + saturday=None, + sunday=None, + ): # noqa: E501 + """WorkingWeek - a model defined in OpenAPI""" # noqa: E501 + + self._monday = None + self._tuesday = None + self._wednesday = None + self._thursday = None + self._friday = None + self._saturday = None + self._sunday = None + self.discriminator = None + + self.monday = monday + self.tuesday = tuesday + self.wednesday = wednesday + self.thursday = thursday + self.friday = friday + self.saturday = saturday + self.sunday = sunday + + @property + def monday(self): + """Gets the monday of this WorkingWeek. # noqa: E501 + + The number of hours worked on a Monday # noqa: E501 + + :return: The monday of this WorkingWeek. # noqa: E501 + :rtype: float + """ + return self._monday + + @monday.setter + def monday(self, monday): + """Sets the monday of this WorkingWeek. + + The number of hours worked on a Monday # noqa: E501 + + :param monday: The monday of this WorkingWeek. # noqa: E501 + :type: float + """ + if monday is None: + raise ValueError( + "Invalid value for `monday`, must not be `None`" + ) # noqa: E501 + + self._monday = monday + + @property + def tuesday(self): + """Gets the tuesday of this WorkingWeek. # noqa: E501 + + The number of hours worked on a Tuesday # noqa: E501 + + :return: The tuesday of this WorkingWeek. # noqa: E501 + :rtype: float + """ + return self._tuesday + + @tuesday.setter + def tuesday(self, tuesday): + """Sets the tuesday of this WorkingWeek. + + The number of hours worked on a Tuesday # noqa: E501 + + :param tuesday: The tuesday of this WorkingWeek. # noqa: E501 + :type: float + """ + if tuesday is None: + raise ValueError( + "Invalid value for `tuesday`, must not be `None`" + ) # noqa: E501 + + self._tuesday = tuesday + + @property + def wednesday(self): + """Gets the wednesday of this WorkingWeek. # noqa: E501 + + The number of hours worked on a Wednesday # noqa: E501 + + :return: The wednesday of this WorkingWeek. # noqa: E501 + :rtype: float + """ + return self._wednesday + + @wednesday.setter + def wednesday(self, wednesday): + """Sets the wednesday of this WorkingWeek. + + The number of hours worked on a Wednesday # noqa: E501 + + :param wednesday: The wednesday of this WorkingWeek. # noqa: E501 + :type: float + """ + if wednesday is None: + raise ValueError( + "Invalid value for `wednesday`, must not be `None`" + ) # noqa: E501 + + self._wednesday = wednesday + + @property + def thursday(self): + """Gets the thursday of this WorkingWeek. # noqa: E501 + + The number of hours worked on a Thursday # noqa: E501 + + :return: The thursday of this WorkingWeek. # noqa: E501 + :rtype: float + """ + return self._thursday + + @thursday.setter + def thursday(self, thursday): + """Sets the thursday of this WorkingWeek. + + The number of hours worked on a Thursday # noqa: E501 + + :param thursday: The thursday of this WorkingWeek. # noqa: E501 + :type: float + """ + if thursday is None: + raise ValueError( + "Invalid value for `thursday`, must not be `None`" + ) # noqa: E501 + + self._thursday = thursday + + @property + def friday(self): + """Gets the friday of this WorkingWeek. # noqa: E501 + + The number of hours worked on a Friday # noqa: E501 + + :return: The friday of this WorkingWeek. # noqa: E501 + :rtype: float + """ + return self._friday + + @friday.setter + def friday(self, friday): + """Sets the friday of this WorkingWeek. + + The number of hours worked on a Friday # noqa: E501 + + :param friday: The friday of this WorkingWeek. # noqa: E501 + :type: float + """ + if friday is None: + raise ValueError( + "Invalid value for `friday`, must not be `None`" + ) # noqa: E501 + + self._friday = friday + + @property + def saturday(self): + """Gets the saturday of this WorkingWeek. # noqa: E501 + + The number of hours worked on a Saturday # noqa: E501 + + :return: The saturday of this WorkingWeek. # noqa: E501 + :rtype: float + """ + return self._saturday + + @saturday.setter + def saturday(self, saturday): + """Sets the saturday of this WorkingWeek. + + The number of hours worked on a Saturday # noqa: E501 + + :param saturday: The saturday of this WorkingWeek. # noqa: E501 + :type: float + """ + if saturday is None: + raise ValueError( + "Invalid value for `saturday`, must not be `None`" + ) # noqa: E501 + + self._saturday = saturday + + @property + def sunday(self): + """Gets the sunday of this WorkingWeek. # noqa: E501 + + The number of hours worked on a Sunday # noqa: E501 + + :return: The sunday of this WorkingWeek. # noqa: E501 + :rtype: float + """ + return self._sunday + + @sunday.setter + def sunday(self, sunday): + """Sets the sunday of this WorkingWeek. + + The number of hours worked on a Sunday # noqa: E501 + + :param sunday: The sunday of this WorkingWeek. # noqa: E501 + :type: float + """ + if sunday is None: + raise ValueError( + "Invalid value for `sunday`, must not be `None`" + ) # noqa: E501 + + self._sunday = sunday diff --git a/xero_python/payrolluk/api/payroll_uk_api.py b/xero_python/payrolluk/api/payroll_uk_api.py index 9cee8e90..d689d230 100644 --- a/xero_python/payrolluk/api/payroll_uk_api.py +++ b/xero_python/payrolluk/api/payroll_uk_api.py @@ -10,7 +10,7 @@ """ """ - OpenAPI spec version: 6.0.0 + OpenAPI spec version: 6.0.1 """ import importlib diff --git a/xero_python/project/api/project_api.py b/xero_python/project/api/project_api.py index b9d03183..e83edf2e 100644 --- a/xero_python/project/api/project_api.py +++ b/xero_python/project/api/project_api.py @@ -10,7 +10,7 @@ """ """ - OpenAPI spec version: 6.0.0 + OpenAPI spec version: 6.0.1 """ import importlib From 66f318940edd3055ab6ae40151a22fd42b82da78 Mon Sep 17 00:00:00 2001 From: sangeet-joy_xero Date: Tue, 30 Jul 2024 11:41:52 +0530 Subject: [PATCH 2/5] schema issue changes --- xero_python/payrollnz/api/payroll_nz_api.py | 4 ++-- xero_python/payrollnz/docs/PayrollNZApi.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/xero_python/payrollnz/api/payroll_nz_api.py b/xero_python/payrollnz/api/payroll_nz_api.py index 9d547e43..93fe8328 100644 --- a/xero_python/payrollnz/api/payroll_nz_api.py +++ b/xero_python/payrollnz/api/payroll_nz_api.py @@ -1074,7 +1074,7 @@ def create_employee_working_pattern( :param bool _return_http_data_only: return received data only :param bool _preload_content: load received data in models :param bool _request_timeout: maximum wait time for response - :return: EmployeeWorkingPatternWithWorkingWeeks + :return: EmployeeWorkingPatternWithWorkingWeeksObject """ # verify the required parameter 'xero_tenant_id' is set @@ -1138,7 +1138,7 @@ def create_employee_working_pattern( body=body_params, post_params=form_params, files=local_var_files, - response_type="EmployeeWorkingPatternWithWorkingWeeks", + response_type="EmployeeWorkingPatternWithWorkingWeeksObject", response_model_finder=self.get_model_finder(), auth_settings=auth_settings, _return_http_data_only=_return_http_data_only, diff --git a/xero_python/payrollnz/docs/PayrollNZApi.md b/xero_python/payrollnz/docs/PayrollNZApi.md index f0f47485..1c205d76 100644 --- a/xero_python/payrollnz/docs/PayrollNZApi.md +++ b/xero_python/payrollnz/docs/PayrollNZApi.md @@ -808,7 +808,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **create_employee_working_pattern** -> EmployeeWorkingPatternWithWorkingWeeks create_employee_working_pattern(xero_tenant_id, employee_id, employee_working_pattern_with_working_weeks_request, idempotency_key=idempotency_key) +> EmployeeWorkingPatternWithWorkingWeeksObject create_employee_working_pattern(xero_tenant_id, employee_id, employee_working_pattern_with_working_weeks_request, idempotency_key=idempotency_key) Creates an employee working pattern @@ -861,7 +861,7 @@ Name | Type | Description | Notes ### Return type -[**EmployeeWorkingPatternWithWorkingWeeks**](EmployeeWorkingPatternWithWorkingWeeks.md) +[**EmployeeWorkingPatternWithWorkingWeeksObject**](EmployeeWorkingPatternWithWorkingWeeksObject.md) ### Authorization From b3be9fff763f0b6a883cf6a99821d0b9d30e1ad0 Mon Sep 17 00:00:00 2001 From: sangeet-joy_xero Date: Sun, 4 Aug 2024 19:01:57 +0530 Subject: [PATCH 3/5] updated the minor version --- docs/v1/accounting/index.html | 2 +- docs/v1/appstore/index.html | 2 +- docs/v1/assets/index.html | 2 +- docs/v1/files/index.html | 2 +- docs/v1/finance/index.html | 2 +- docs/v1/payroll-au/index.html | 2 +- docs/v1/payroll-nz/index.html | 2 +- docs/v1/payroll-uk/index.html | 2 +- docs/v1/projects/index.html | 2 +- xero_python/docs/README.md | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/v1/accounting/index.html b/docs/v1/accounting/index.html index aeeeea08..c0128a39 100644 --- a/docs/v1/accounting/index.html +++ b/docs/v1/accounting/index.html @@ -6216,7 +6216,7 @@