Skip to content

Commit ad68a78

Browse files
authored
Merge pull request #216 from XeroAPI/sid-development
Build from OpenAPI spec 2.10.3
2 parents 1fa7e9a + 2587f8d commit ad68a78

File tree

18 files changed

+3526
-2547
lines changed

18 files changed

+3526
-2547
lines changed

docs/accounting/Model/BatchPayment.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Name | Type | Description | Notes
1919
**total_amount** | **string** | The total of the payments that make up the batch (read-only) | [optional]
2020
**updated_date_utc** | **string** | UTC timestamp of last update to the payment | [optional]
2121
**is_reconciled** | **string** | Booelan that tells you if the batch payment has been reconciled (read-only) | [optional]
22+
**validation_errors** | [**\XeroAPI\XeroPHP\Models\Accounting\ValidationError[]**](ValidationError.md) | Displays array of validation error messages from the API | [optional]
2223

2324
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
2425

docs/file/Api/FilesApi.md

Lines changed: 69 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ Method | HTTP request | Description
1919
[**getInbox**](FilesApi.md#getInbox) | **GET** /Inbox | Retrieves inbox folder
2020
[**updateFile**](FilesApi.md#updateFile) | **PUT** /Files/{FileId} | Update a file
2121
[**updateFolder**](FilesApi.md#updateFolder) | **PUT** /Folders/{FolderId} | Updates an existing folder
22-
[**uploadFile**](FilesApi.md#uploadFile) | **POST** /Files | Uploads a File
22+
[**uploadFile**](FilesApi.md#uploadFile) | **POST** /Files | Uploads a File to the inbox
23+
[**uploadFileToFolder**](FilesApi.md#uploadFileToFolder) | **POST** /Files/{FolderId} | Uploads a File to a specific folder
2324

2425

2526
# **createFileAssociation**
@@ -851,9 +852,9 @@ Name | Type | Description | Notes
851852
[[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)
852853

853854
# **uploadFile**
854-
> \XeroAPI\XeroPHP\Models\File\FileObject uploadFile($xero_tenant_id, $folder_id, $body, $name, $filename, $mime_type)
855+
> \XeroAPI\XeroPHP\Models\File\FileObject uploadFile($xero_tenant_id, $body, $name, $filename, $mime_type)
855856
856-
Uploads a File
857+
Uploads a File to the inbox
857858

858859
### Example
859860
```php
@@ -870,14 +871,13 @@ $apiInstance = new XeroAPI\XeroPHP\Api\FilesApi(
870871
$config
871872
);
872873
$xero_tenant_id = YOUR_XERO_TENANT_ID; // string | Xero identifier for Tenant
873-
$folder_id = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // string | pass an optional folder id to save file to specific folder
874874
$body = 'body_example'; // string |
875875
$name = 'name_example'; // string | exact name of the file you are uploading
876876
$filename = 'filename_example'; // string |
877877
$mime_type = 'mime_type_example'; // string |
878878

879879
try {
880-
$result = $apiInstance->uploadFile($xero_tenant_id, $folder_id, $body, $name, $filename, $mime_type);
880+
$result = $apiInstance->uploadFile($xero_tenant_id, $body, $name, $filename, $mime_type);
881881
print_r($result);
882882
} catch (Exception $e) {
883883
echo 'Exception when calling FilesApi->uploadFile: ', $e->getMessage(), PHP_EOL;
@@ -890,10 +890,70 @@ try {
890890
Name | Type | Description | Notes
891891
------------- | ------------- | ------------- | -------------
892892
**xero_tenant_id** | **string**| Xero identifier for Tenant |
893-
**folder_id** | [**string**](../Model/.md)| pass an optional folder id to save file to specific folder | [optional]
894-
**body** | **string**| | [optional]
895-
**name** | **string**| exact name of the file you are uploading | [optional]
896-
**filename** | **string**| | [optional]
893+
**body** | **string**| |
894+
**name** | **string**| exact name of the file you are uploading |
895+
**filename** | **string**| |
896+
**mime_type** | **string**| | [optional]
897+
898+
### Return type
899+
900+
[**\XeroAPI\XeroPHP\Models\File\FileObject**](../Model/FileObject.md)
901+
902+
### Authorization
903+
904+
[OAuth2](../../README.md#OAuth2)
905+
906+
### HTTP request headers
907+
908+
- **Content-Type**: multipart/form-data
909+
- **Accept**: application/json
910+
911+
[[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)
912+
913+
# **uploadFileToFolder**
914+
> \XeroAPI\XeroPHP\Models\File\FileObject uploadFileToFolder($xero_tenant_id, $folder_id, $body, $name, $filename, $mime_type)
915+
916+
Uploads a File to a specific folder
917+
918+
### Example
919+
```php
920+
<?php
921+
require_once(__DIR__ . '/vendor/autoload.php');
922+
923+
// Configure OAuth2 access token for authorization: OAuth2
924+
$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
925+
926+
$apiInstance = new XeroAPI\XeroPHP\Api\FilesApi(
927+
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
928+
// This is optional, `GuzzleHttp\Client` will be used as default.
929+
new GuzzleHttp\Client(),
930+
$config
931+
);
932+
$xero_tenant_id = YOUR_XERO_TENANT_ID; // string | Xero identifier for Tenant
933+
$folder_id = 4ff1e5cc-9835-40d5-bb18-09fdb118db9c; // string | pass required folder id to save file to specific folder
934+
$body = 'body_example'; // string |
935+
$name = 'name_example'; // string | exact name of the file you are uploading
936+
$filename = 'filename_example'; // string |
937+
$mime_type = 'mime_type_example'; // string |
938+
939+
try {
940+
$result = $apiInstance->uploadFileToFolder($xero_tenant_id, $folder_id, $body, $name, $filename, $mime_type);
941+
print_r($result);
942+
} catch (Exception $e) {
943+
echo 'Exception when calling FilesApi->uploadFileToFolder: ', $e->getMessage(), PHP_EOL;
944+
}
945+
?>
946+
```
947+
948+
### Parameters
949+
950+
Name | Type | Description | Notes
951+
------------- | ------------- | ------------- | -------------
952+
**xero_tenant_id** | **string**| Xero identifier for Tenant |
953+
**folder_id** | [**string**](../Model/.md)| pass required folder id to save file to specific folder |
954+
**body** | **string**| |
955+
**name** | **string**| exact name of the file you are uploading |
956+
**filename** | **string**| |
897957
**mime_type** | **string**| | [optional]
898958

899959
### Return type

docs/file/Model/UploadObject.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# UploadObject
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**body** | **string** | |
7+
**name** | **string** | exact name of the file you are uploading |
8+
**filename** | **string** | |
9+
**mime_type** | **string** | | [optional]
10+
11+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
12+
13+

docs/payrolluk/Api/PayrollUkApi.md

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2553,7 +2553,7 @@ Name | Type | Description | Notes
25532553
[[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)
25542554

25552555
# **getEmployees**
2556-
> \XeroAPI\XeroPHP\Models\PayrollUk\Employees getEmployees($xero_tenant_id, $first_name, $last_name, $page)
2556+
> \XeroAPI\XeroPHP\Models\PayrollUk\Employees getEmployees($xero_tenant_id, $filter, $page)
25572557
25582558
Retrieves employees
25592559

@@ -2572,12 +2572,11 @@ $apiInstance = new XeroAPI\XeroPHP\Api\PayrollUkApi(
25722572
$config
25732573
);
25742574
$xero_tenant_id = 'xero_tenant_id_example'; // string | Xero identifier for Tenant
2575-
$first_name = John; // string | Filter by first name
2576-
$last_name = Johnson; // string | Filter by last name
2575+
$filter = firstName==John,lastName==Smith; // string | Filter by first name and/or lastname
25772576
$page = 56; // int | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
25782577

25792578
try {
2580-
$result = $apiInstance->getEmployees($xero_tenant_id, $first_name, $last_name, $page);
2579+
$result = $apiInstance->getEmployees($xero_tenant_id, $filter, $page);
25812580
print_r($result);
25822581
} catch (Exception $e) {
25832582
echo 'Exception when calling PayrollUkApi->getEmployees: ', $e->getMessage(), PHP_EOL;
@@ -2590,8 +2589,7 @@ try {
25902589
Name | Type | Description | Notes
25912590
------------- | ------------- | ------------- | -------------
25922591
**xero_tenant_id** | **string**| Xero identifier for Tenant |
2593-
**first_name** | **string**| Filter by first name | [optional]
2594-
**last_name** | **string**| Filter by last name | [optional]
2592+
**filter** | **string**| Filter by first name and/or lastname | [optional]
25952593
**page** | **int**| Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. | [optional]
25962594

25972595
### Return type
@@ -3305,7 +3303,7 @@ Name | Type | Description | Notes
33053303
[[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)
33063304

33073305
# **getTimesheets**
3308-
> \XeroAPI\XeroPHP\Models\PayrollUk\Timesheets getTimesheets($xero_tenant_id, $page, $employee_id, $payroll_calendar_id)
3306+
> \XeroAPI\XeroPHP\Models\PayrollUk\Timesheets getTimesheets($xero_tenant_id, $page, $filter)
33093307
33103308
Retrieves timesheets
33113309

@@ -3325,11 +3323,10 @@ $apiInstance = new XeroAPI\XeroPHP\Api\PayrollUkApi(
33253323
);
33263324
$xero_tenant_id = 'xero_tenant_id_example'; // string | Xero identifier for Tenant
33273325
$page = 56; // int | Page number which specifies the set of records to retrieve. By default the number of the records per set is 100.
3328-
$employee_id = 'employee_id_example'; // string | By default get Timesheets will return the timesheets for all employees in an organization. You can add GET https://…/timesheets?filter=employeeId=={EmployeeID} to get only the timesheets of a particular employee.
3329-
$payroll_calendar_id = 'payroll_calendar_id_example'; // string | By default get Timesheets will return all the timesheets for an organization. You can add GET https://…/timesheets?filter=payrollCalendarId=={PayrollCalendarID} to filter the timesheets by payroll calendar id
3326+
$filter = employeeId==00000000-0000-0000-0000-000000000000,payrollCalendarId==00000000-0000-0000-0000-000000000000; // string | Filter by first name and/or lastname
33303327

33313328
try {
3332-
$result = $apiInstance->getTimesheets($xero_tenant_id, $page, $employee_id, $payroll_calendar_id);
3329+
$result = $apiInstance->getTimesheets($xero_tenant_id, $page, $filter);
33333330
print_r($result);
33343331
} catch (Exception $e) {
33353332
echo 'Exception when calling PayrollUkApi->getTimesheets: ', $e->getMessage(), PHP_EOL;
@@ -3343,8 +3340,7 @@ Name | Type | Description | Notes
33433340
------------- | ------------- | ------------- | -------------
33443341
**xero_tenant_id** | **string**| Xero identifier for Tenant |
33453342
**page** | **int**| Page number which specifies the set of records to retrieve. By default the number of the records per set is 100. | [optional]
3346-
**employee_id** | [**string**](../Model/.md)| By default get Timesheets will return the timesheets for all employees in an organization. You can add GET https://…/timesheets?filter&#x3D;employeeId&#x3D;&#x3D;{EmployeeID} to get only the timesheets of a particular employee. | [optional]
3347-
**payroll_calendar_id** | [**string**](../Model/.md)| By default get Timesheets will return all the timesheets for an organization. You can add GET https://…/timesheets?filter&#x3D;payrollCalendarId&#x3D;&#x3D;{PayrollCalendarID} to filter the timesheets by payroll calendar id | [optional]
3343+
**filter** | **string**| Filter by first name and/or lastname | [optional]
33483344

33493345
### Return type
33503346

0 commit comments

Comments
 (0)