Skip to content

Commit

Permalink
Merge pull request #110 from XeroAPI/sid-development
Browse files Browse the repository at this point in the history
Updates for 2.1.0 and 2.1.1 plus req lowered to 5.6
  • Loading branch information
SidneyAllen authored May 1, 2020
2 parents d6f2c14 + 0e6a442 commit 07e32f9
Show file tree
Hide file tree
Showing 243 changed files with 1,568 additions and 541 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}
],
"require": {
"php": ">=7.2.1",
"php": ">=5.6",
"ext-curl": "*",
"ext-json": "*",
"ext-mbstring": "*",
Expand Down
70 changes: 62 additions & 8 deletions docs/accounting/Api/AccountingApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ Method | HTTP request | Description
[**getPaymentServices**](AccountingApi.md#getPaymentServices) | **GET** /PaymentServices | Allows you to retrieve payment services
[**getPayments**](AccountingApi.md#getPayments) | **GET** /Payments | Allows you to retrieve payments for invoices and credit notes
[**getPrepayment**](AccountingApi.md#getPrepayment) | **GET** /Prepayments/{PrepaymentID} | Allows you to retrieve a specified prepayments
[**getPrepaymentAsPdf**](AccountingApi.md#getPrepaymentAsPdf) | **GET** /Prepayments/{PrepaymentID}/pdf | Allows you to retrieve prepayments as PDF files
[**getPrepaymentHistory**](AccountingApi.md#getPrepaymentHistory) | **GET** /Prepayments/{PrepaymentID}/History | Allows you to retrieve a history records of an Prepayment
[**getPrepayments**](AccountingApi.md#getPrepayments) | **GET** /Prepayments | Allows you to retrieve prepayments
[**getPurchaseOrder**](AccountingApi.md#getPurchaseOrder) | **GET** /PurchaseOrders/{PurchaseOrderID} | Allows you to retrieve a specified purchase orders
Expand Down Expand Up @@ -1160,7 +1161,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)

# **createCreditNoteAttachmentByFileName**
> \XeroAPI\XeroPHP\Models\Accounting\Attachments createCreditNoteAttachmentByFileName($xero_tenant_id, $credit_note_id, $file_name, $include_online, $body)
> \XeroAPI\XeroPHP\Models\Accounting\Attachments createCreditNoteAttachmentByFileName($xero_tenant_id, $credit_note_id, $file_name, $body, $include_online)
Allows you to create Attachments on CreditNote by file name

Expand All @@ -1181,11 +1182,11 @@ $apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
$xero_tenant_id = YOUR_XERO_TENANT_ID; // string | Xero identifier for Tenant
$credit_note_id = 00000000-0000-0000-000-000000000000; // string | Unique identifier for a Credit Note
$file_name = xero-dev.jpg; // string | Name of the file you are attaching to Credit Note
$include_online = True; // bool | Set an attachment to be included with the invoice when viewed online (through Xero)
$body = 'body_example'; // string | Byte array of file in body of request
$include_online = true; // bool | Allows an attachment to be seen by the end customer within their online invoice

try {
$result = $apiInstance->createCreditNoteAttachmentByFileName($xero_tenant_id, $credit_note_id, $file_name, $include_online, $body);
$result = $apiInstance->createCreditNoteAttachmentByFileName($xero_tenant_id, $credit_note_id, $file_name, $body, $include_online);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AccountingApi->createCreditNoteAttachmentByFileName: ', $e->getMessage(), PHP_EOL;
Expand All @@ -1200,8 +1201,8 @@ Name | Type | Description | Notes
**xero_tenant_id** | **string**| Xero identifier for Tenant |
**credit_note_id** | [**string**](../Model/.md)| Unique identifier for a Credit Note |
**file_name** | **string**| Name of the file you are attaching to Credit Note |
**include_online** | **bool**| Set an attachment to be included with the invoice when viewed online (through Xero) |
**body** | **string**| Byte array of file in body of request |
**include_online** | **bool**| Allows an attachment to be seen by the end customer within their online invoice | [optional] [default to false]

### Return type

Expand Down Expand Up @@ -1547,7 +1548,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)

# **createInvoiceAttachmentByFileName**
> \XeroAPI\XeroPHP\Models\Accounting\Attachments createInvoiceAttachmentByFileName($xero_tenant_id, $invoice_id, $file_name, $include_online, $body)
> \XeroAPI\XeroPHP\Models\Accounting\Attachments createInvoiceAttachmentByFileName($xero_tenant_id, $invoice_id, $file_name, $body, $include_online)
Allows you to create an Attachment on invoices or purchase bills by it's filename

Expand All @@ -1568,11 +1569,11 @@ $apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
$xero_tenant_id = YOUR_XERO_TENANT_ID; // string | Xero identifier for Tenant
$invoice_id = 00000000-0000-0000-000-000000000000; // string | Unique identifier for an Invoice
$file_name = xero-dev.jpg; // string | Name of the file you are attaching
$include_online = True; // bool | Set an attachment to be included with the invoice when viewed online (through Xero)
$body = 'body_example'; // string | Byte array of file in body of request
$include_online = true; // bool | Allows an attachment to be seen by the end customer within their online invoice

try {
$result = $apiInstance->createInvoiceAttachmentByFileName($xero_tenant_id, $invoice_id, $file_name, $include_online, $body);
$result = $apiInstance->createInvoiceAttachmentByFileName($xero_tenant_id, $invoice_id, $file_name, $body, $include_online);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AccountingApi->createInvoiceAttachmentByFileName: ', $e->getMessage(), PHP_EOL;
Expand All @@ -1587,8 +1588,8 @@ Name | Type | Description | Notes
**xero_tenant_id** | **string**| Xero identifier for Tenant |
**invoice_id** | [**string**](../Model/.md)| Unique identifier for an Invoice |
**file_name** | **string**| Name of the file you are attaching |
**include_online** | **bool**| Set an attachment to be included with the invoice when viewed online (through Xero) |
**body** | **string**| Byte array of file in body of request |
**include_online** | **bool**| Allows an attachment to be seen by the end customer within their online invoice | [optional] [default to false]

### Return type

Expand Down Expand Up @@ -7768,6 +7769,59 @@ 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)

# **getPrepaymentAsPdf**
> \SplFileObject getPrepaymentAsPdf($xero_tenant_id, $prepayment_id)
Allows you to retrieve prepayments as PDF files

### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: OAuth2
$config = XeroAPI\XeroPHP\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$apiInstance = new XeroAPI\XeroPHP\Api\AccountingApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$xero_tenant_id = YOUR_XERO_TENANT_ID; // string | Xero identifier for Tenant
$prepayment_id = 00000000-0000-0000-000-000000000000; // string | Unique identifier for a PrePayment

try {
$result = $apiInstance->getPrepaymentAsPdf($xero_tenant_id, $prepayment_id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AccountingApi->getPrepaymentAsPdf: ', $e->getMessage(), PHP_EOL;
}
?>
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**xero_tenant_id** | **string**| Xero identifier for Tenant |
**prepayment_id** | [**string**](../Model/.md)| Unique identifier for a PrePayment |

### Return type

[**\SplFileObject**](../Model/\SplFileObject.md)

### Authorization

[OAuth2](../../README.md#OAuth2)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/pdf

[[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)

# **getPrepaymentHistory**
> \XeroAPI\XeroPHP\Models\Accounting\HistoryRecords getPrepaymentHistory($xero_tenant_id, $prepayment_id)
Expand Down
1 change: 1 addition & 0 deletions docs/asset/Model/Asset.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**asset_id** | **string** | The Xero-generated Id for the asset | [optional]
**asset_name** | **string** | The name of the asset |
**asset_type_id** | **string** | The Xero-generated Id for the asset type | [optional]
**asset_number** | **string** | Must be unique. | [optional]
**purchase_date** | [**\DateTime**](\DateTime.md) | The date the asset was purchased YYYY-MM-DD | [optional]
**purchase_price** | **float** | The purchase price of the asset | [optional]
Expand Down
9 changes: 9 additions & 0 deletions docs/payrollau/Model/AllowanceType.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# AllowanceType

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------

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


1 change: 1 addition & 0 deletions docs/payrollau/Model/EarningsRate.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Name | Type | Description | Notes
**employment_termination_payment_type** | [**\XeroAPI\XeroPHP\Models\PayrollAu\EmploymentTerminationPaymentType**](EmploymentTerminationPaymentType.md) | | [optional]
**updated_date_utc** | **string** | Last modified timestamp | [optional]
**current_record** | **bool** | Is the current record | [optional]
**allowance_type** | [**\XeroAPI\XeroPHP\Models\PayrollAu\AllowanceType**](AllowanceType.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)

Expand Down
2 changes: 1 addition & 1 deletion lib/AccountingObjectSerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* OpenAPI spec version: 2.0.9
* OpenAPI spec version: 2.1.1
* Contact: api@xero.com
* Generated by: https://openapi-generator.tech
* OpenAPI Generator version: 4.0.0
Expand Down
Loading

0 comments on commit 07e32f9

Please sign in to comment.