diff --git a/README.md b/README.md
index 074b1e15..d443aeb8 100644
--- a/README.md
+++ b/README.md
@@ -46,7 +46,7 @@ Sample apps can get you started quickly with simple auth flows to advanced usage
| --- | --- | --- |
| [`xero-ruby-oauth2-starter`](https://github.com/XeroAPI/Xero-ruby-oauth2-starter) | A Sinatra application showing the basic getting started code to work with the sdk |
| [`xero-ruby-oauth2-app`](https://github.com/XeroAPI/Xero-ruby-oauth2-app) | Complete rails app with +95% of api set examples, complex filters, pagination, and user/token management in postgres |
-| [`xero-ruby-custom-connections-starter`](https://github.com/XeroAPI/xero-ruby-custom-connections-starter) | A getting started Sinatra app showing Custom Connections - a Xero [premium option](https://developer.xero.com/documentation/guides/oauth2/custom-connections) for building M2M integrations to a single org |
+| [`xero-ruby-custom-connections-starter`](https://github.com/XeroAPI/xero-ruby-custom-connections-starter) | A getting started Sinatra app showing Custom Connections - a Xero [premium option](https://developer.xero.com/documentation/oauth2/custom-connections) for building M2M integrations to a single org |
| [`xero-ruby-sso-form`](https://github.com/XeroAPI/xero-ruby-sso-form) | A basic Sinatra app showing how to implement SSU to Lead |
diff --git a/docs/accounting/AccountingApi.md b/docs/accounting/AccountingApi.md
index c51bd7c2..228ef4d2 100644
--- a/docs/accounting/AccountingApi.md
+++ b/docs/accounting/AccountingApi.md
@@ -5795,7 +5795,7 @@ Name | Type | Description | Notes
## get_bank_transactions
-> BankTransactions get_bank_transactions(xero_tenant_id, opts)
+> GetBankTransactionsResponse get_bank_transactions(xero_tenant_id, opts)
Retrieves any spent or received money transactions
@@ -5834,7 +5834,9 @@ opts = {
page: 1, # Integer | Up to 100 bank transactions will be returned in a single API call with line items details
- unitdp: 4 # Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
+ unitdp: 4, # Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
+
+ page_size: 100 # Integer | Number of records to retrieve per page
}
begin
@@ -5857,10 +5859,11 @@ Name | Type | Description | Notes
**order** | **String**| Order by an any element | [optional]
**page** | **Integer**| Up to 100 bank transactions will be returned in a single API call with line items details | [optional]
**unitdp** | **Integer**| e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts | [optional]
+ **page_size** | **Integer**| Number of records to retrieve per page | [optional]
### Return type
-[**BankTransactions**](BankTransactions.md)
+[**GetBankTransactionsResponse**](GetBankTransactionsResponse.md)
### Authorization
@@ -7465,7 +7468,7 @@ Name | Type | Description | Notes
## get_contacts
-> Contacts get_contacts(xero_tenant_id, opts)
+> GetContactsResponse get_contacts(xero_tenant_id, opts)
Retrieves all contacts in a Xero organisation
@@ -7510,7 +7513,9 @@ opts = {
summary_only: false, # Boolean | Use summaryOnly=true in GET Contacts and Invoices endpoint to retrieve a smaller version of the response object. This returns only lightweight fields, excluding computation-heavy fields from the response, making the API calls quick and efficient.
- search_term: 'Joe Bloggs' # String | Search parameter that performs a case-insensitive text search across the Name, FirstName, LastName, ContactNumber and EmailAddress fields.
+ search_term: 'Joe Bloggs', # String | Search parameter that performs a case-insensitive text search across the Name, FirstName, LastName, ContactNumber and EmailAddress fields.
+
+ page_size: 100 # Integer | Number of records to retrieve per page
}
begin
@@ -7536,10 +7541,11 @@ Name | Type | Description | Notes
**include_archived** | **Boolean**| e.g. includeArchived=true - Contacts with a status of ARCHIVED will be included in the response | [optional]
**summary_only** | **Boolean**| Use summaryOnly=true in GET Contacts and Invoices endpoint to retrieve a smaller version of the response object. This returns only lightweight fields, excluding computation-heavy fields from the response, making the API calls quick and efficient. | [optional] [default to false]
**search_term** | **String**| Search parameter that performs a case-insensitive text search across the Name, FirstName, LastName, ContactNumber and EmailAddress fields. | [optional]
+ **page_size** | **Integer**| Number of records to retrieve per page | [optional]
### Return type
-[**Contacts**](Contacts.md)
+[**GetContactsResponse**](GetContactsResponse.md)
### Authorization
@@ -7950,7 +7956,7 @@ Name | Type | Description | Notes
## get_credit_notes
-> CreditNotes get_credit_notes(xero_tenant_id, opts)
+> GetCreditNotesResponse get_credit_notes(xero_tenant_id, opts)
Retrieves any credit notes
@@ -7989,7 +7995,9 @@ opts = {
page: 1, # Integer | e.g. page=1 – Up to 100 credit notes will be returned in a single API call with line items shown for each credit note
- unitdp: 4 # Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
+ unitdp: 4, # Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
+
+ page_size: 100 # Integer | Number of records to retrieve per page
}
begin
@@ -8012,10 +8020,11 @@ Name | Type | Description | Notes
**order** | **String**| Order by an any element | [optional]
**page** | **Integer**| e.g. page=1 – Up to 100 credit notes will be returned in a single API call with line items shown for each credit note | [optional]
**unitdp** | **Integer**| e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts | [optional]
+ **page_size** | **Integer**| Number of records to retrieve per page | [optional]
### Return type
-[**CreditNotes**](CreditNotes.md)
+[**GetCreditNotesResponse**](GetCreditNotesResponse.md)
### Authorization
@@ -8896,7 +8905,7 @@ Name | Type | Description | Notes
## get_invoices
-> Invoices get_invoices(xero_tenant_id, opts)
+> GetInvoicesResponse get_invoices(xero_tenant_id, opts)
Retrieves sales invoices or purchase bills
@@ -8949,7 +8958,9 @@ opts = {
unitdp: 4, # Integer | e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
- summary_only: false # Boolean | Use summaryOnly=true in GET Contacts and Invoices endpoint to retrieve a smaller version of the response object. This returns only lightweight fields, excluding computation-heavy fields from the response, making the API calls quick and efficient.
+ summary_only: false, # Boolean | Use summaryOnly=true in GET Contacts and Invoices endpoint to retrieve a smaller version of the response object. This returns only lightweight fields, excluding computation-heavy fields from the response, making the API calls quick and efficient.
+
+ page_size: 100 # Integer | Number of records to retrieve per page
}
begin
@@ -8979,10 +8990,11 @@ Name | Type | Description | Notes
**created_by_my_app** | **Boolean**| When set to true you'll only retrieve Invoices created by your app | [optional]
**unitdp** | **Integer**| e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts | [optional]
**summary_only** | **Boolean**| Use summaryOnly=true in GET Contacts and Invoices endpoint to retrieve a smaller version of the response object. This returns only lightweight fields, excluding computation-heavy fields from the response, making the API calls quick and efficient. | [optional] [default to false]
+ **page_size** | **Integer**| Number of records to retrieve per page | [optional]
### Return type
-[**Invoices**](Invoices.md)
+[**GetInvoicesResponse**](GetInvoicesResponse.md)
### Authorization
@@ -9816,7 +9828,7 @@ Name | Type | Description | Notes
## get_manual_journals
-> ManualJournals get_manual_journals(xero_tenant_id, opts)
+> GetManualJournalsResponse get_manual_journals(xero_tenant_id, opts)
Retrieves manual journals
@@ -9853,7 +9865,9 @@ opts = {
order: 'Date ASC', # String | Order by an any element
- page: 1 # Integer | e.g. page=1 – Up to 100 manual journals will be returned in a single API call with line items shown for each overpayment
+ page: 1, # Integer | e.g. page=1 – Up to 100 manual journals will be returned in a single API call with line items shown for each overpayment
+
+ page_size: 100 # Integer | Number of records to retrieve per page
}
begin
@@ -9875,10 +9889,11 @@ Name | Type | Description | Notes
**where** | **String**| Filter by an any element | [optional]
**order** | **String**| Order by an any element | [optional]
**page** | **Integer**| e.g. page=1 – Up to 100 manual journals will be returned in a single API call with line items shown for each overpayment | [optional]
+ **page_size** | **Integer**| Number of records to retrieve per page | [optional]
### Return type
-[**ManualJournals**](ManualJournals.md)
+[**GetManualJournalsResponse**](GetManualJournalsResponse.md)
### Authorization
@@ -10336,7 +10351,7 @@ Name | Type | Description | Notes
## get_overpayments
-> Overpayments get_overpayments(xero_tenant_id, opts)
+> GetOverpaymentsResponse get_overpayments(xero_tenant_id, opts)
Retrieves overpayments
@@ -10401,7 +10416,7 @@ Name | Type | Description | Notes
### Return type
-[**Overpayments**](Overpayments.md)
+[**GetOverpaymentsResponse**](GetOverpaymentsResponse.md)
### Authorization
@@ -10605,7 +10620,7 @@ Name | Type | Description | Notes
## get_payments
-> Payments get_payments(xero_tenant_id, opts)
+> GetPaymentsResponse get_payments(xero_tenant_id, opts)
Retrieves payments for invoices and credit notes
@@ -10642,7 +10657,9 @@ opts = {
order: 'Amount ASC', # String | Order by an any element
- page: 1 # Integer | Up to 100 payments will be returned in a single API call
+ page: 1, # Integer | Up to 100 payments will be returned in a single API call
+
+ page_size: 100 # Integer | Number of records to retrieve per page
}
begin
@@ -10664,10 +10681,11 @@ Name | Type | Description | Notes
**where** | **String**| Filter by an any element | [optional]
**order** | **String**| Order by an any element | [optional]
**page** | **Integer**| Up to 100 payments will be returned in a single API call | [optional]
+ **page_size** | **Integer**| Number of records to retrieve per page | [optional]
### Return type
-[**Payments**](Payments.md)
+[**GetPaymentsResponse**](GetPaymentsResponse.md)
### Authorization
@@ -10809,7 +10827,7 @@ Name | Type | Description | Notes
## get_prepayments
-> Prepayments get_prepayments(xero_tenant_id, opts)
+> GetPrepaymentsResponse get_prepayments(xero_tenant_id, opts)
Retrieves prepayments
@@ -10874,7 +10892,7 @@ Name | Type | Description | Notes
### Return type
-[**Prepayments**](Prepayments.md)
+[**GetPrepaymentsResponse**](GetPrepaymentsResponse.md)
### Authorization
@@ -11344,7 +11362,7 @@ Name | Type | Description | Notes
## get_purchase_orders
-> PurchaseOrders get_purchase_orders(xero_tenant_id, opts)
+> GetPurchaseOrdersResponse get_purchase_orders(xero_tenant_id, opts)
Retrieves purchase orders
@@ -11385,7 +11403,9 @@ opts = {
order: 'PurchaseOrderNumber ASC', # String | Order by an any element
- page: 1 # Integer | To specify a page, append the page parameter to the URL e.g. ?page=1. If there are 100 records in the response you will need to check if there is any more data by fetching the next page e.g ?page=2 and continuing this process until no more results are returned.
+ page: 1, # Integer | To specify a page, append the page parameter to the URL e.g. ?page=1. If there are 100 records in the response you will need to check if there is any more data by fetching the next page e.g ?page=2 and continuing this process until no more results are returned.
+
+ page_size: 100 # Integer | Number of records to retrieve per page
}
begin
@@ -11409,10 +11429,11 @@ Name | Type | Description | Notes
**date_to** | **String**| Filter by purchase order date (e.g. GET https://.../PurchaseOrders?DateFrom=2015-12-01&DateTo=2015-12-31 | [optional]
**order** | **String**| Order by an any element | [optional]
**page** | **Integer**| To specify a page, append the page parameter to the URL e.g. ?page=1. If there are 100 records in the response you will need to check if there is any more data by fetching the next page e.g ?page=2 and continuing this process until no more results are returned. | [optional]
+ **page_size** | **Integer**| Number of records to retrieve per page | [optional]
### Return type
-[**PurchaseOrders**](PurchaseOrders.md)
+[**GetPurchaseOrdersResponse**](GetPurchaseOrdersResponse.md)
### Authorization
diff --git a/docs/accounting/GetBankTransactionsResponse.md b/docs/accounting/GetBankTransactionsResponse.md
new file mode 100644
index 00000000..9985f457
--- /dev/null
+++ b/docs/accounting/GetBankTransactionsResponse.md
@@ -0,0 +1,27 @@
+# XeroRuby::Accounting::GetBankTransactionsResponse
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **String** | | [optional]
+**status** | **String** | | [optional]
+**provider_name** | **String** | | [optional]
+**date_time_utc** | **String** | | [optional]
+**page_info** | [**PageInfo**](PageInfo.md) | | [optional]
+**bank_transactions** | [**Array<BankTransaction>**](BankTransaction.md) | | [optional]
+
+## Code Sample
+
+```ruby
+require 'XeroRuby::Accounting'
+
+instance = XeroRuby::Accounting::GetBankTransactionsResponse.new(id: null,
+ status: null,
+ provider_name: null,
+ date_time_utc: null,
+ page_info: null,
+ bank_transactions: null)
+```
+
+
diff --git a/docs/accounting/GetContactsResponse.md b/docs/accounting/GetContactsResponse.md
new file mode 100644
index 00000000..2756d909
--- /dev/null
+++ b/docs/accounting/GetContactsResponse.md
@@ -0,0 +1,27 @@
+# XeroRuby::Accounting::GetContactsResponse
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **String** | | [optional]
+**status** | **String** | | [optional]
+**provider_name** | **String** | | [optional]
+**date_time_utc** | **String** | | [optional]
+**page_info** | [**PageInfo**](PageInfo.md) | | [optional]
+**contacts** | [**Array<Contact>**](Contact.md) | | [optional]
+
+## Code Sample
+
+```ruby
+require 'XeroRuby::Accounting'
+
+instance = XeroRuby::Accounting::GetContactsResponse.new(id: null,
+ status: null,
+ provider_name: null,
+ date_time_utc: null,
+ page_info: null,
+ contacts: null)
+```
+
+
diff --git a/docs/accounting/GetCreditNotesResponse.md b/docs/accounting/GetCreditNotesResponse.md
new file mode 100644
index 00000000..944a57aa
--- /dev/null
+++ b/docs/accounting/GetCreditNotesResponse.md
@@ -0,0 +1,27 @@
+# XeroRuby::Accounting::GetCreditNotesResponse
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **String** | | [optional]
+**status** | **String** | | [optional]
+**provider_name** | **String** | | [optional]
+**date_time_utc** | **String** | | [optional]
+**page_info** | [**PageInfo**](PageInfo.md) | | [optional]
+**credit_notes** | [**Array<CreditNote>**](CreditNote.md) | | [optional]
+
+## Code Sample
+
+```ruby
+require 'XeroRuby::Accounting'
+
+instance = XeroRuby::Accounting::GetCreditNotesResponse.new(id: null,
+ status: null,
+ provider_name: null,
+ date_time_utc: null,
+ page_info: null,
+ credit_notes: null)
+```
+
+
diff --git a/docs/accounting/GetInvoicesResponse.md b/docs/accounting/GetInvoicesResponse.md
new file mode 100644
index 00000000..850c7954
--- /dev/null
+++ b/docs/accounting/GetInvoicesResponse.md
@@ -0,0 +1,27 @@
+# XeroRuby::Accounting::GetInvoicesResponse
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **String** | | [optional]
+**status** | **String** | | [optional]
+**provider_name** | **String** | | [optional]
+**date_time_utc** | **String** | | [optional]
+**page_info** | [**PageInfo**](PageInfo.md) | | [optional]
+**invoices** | [**Array<Invoice>**](Invoice.md) | | [optional]
+
+## Code Sample
+
+```ruby
+require 'XeroRuby::Accounting'
+
+instance = XeroRuby::Accounting::GetInvoicesResponse.new(id: null,
+ status: null,
+ provider_name: null,
+ date_time_utc: null,
+ page_info: null,
+ invoices: null)
+```
+
+
diff --git a/docs/accounting/GetManualJournalsResponse.md b/docs/accounting/GetManualJournalsResponse.md
new file mode 100644
index 00000000..fec599a3
--- /dev/null
+++ b/docs/accounting/GetManualJournalsResponse.md
@@ -0,0 +1,27 @@
+# XeroRuby::Accounting::GetManualJournalsResponse
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **String** | | [optional]
+**status** | **String** | | [optional]
+**provider_name** | **String** | | [optional]
+**date_time_utc** | **String** | | [optional]
+**page_info** | [**PageInfo**](PageInfo.md) | | [optional]
+**manual_journals** | [**Array<ManualJournal>**](ManualJournal.md) | | [optional]
+
+## Code Sample
+
+```ruby
+require 'XeroRuby::Accounting'
+
+instance = XeroRuby::Accounting::GetManualJournalsResponse.new(id: null,
+ status: null,
+ provider_name: null,
+ date_time_utc: null,
+ page_info: null,
+ manual_journals: null)
+```
+
+
diff --git a/docs/accounting/GetOverpaymentsResponse.md b/docs/accounting/GetOverpaymentsResponse.md
new file mode 100644
index 00000000..be1ae285
--- /dev/null
+++ b/docs/accounting/GetOverpaymentsResponse.md
@@ -0,0 +1,27 @@
+# XeroRuby::Accounting::GetOverpaymentsResponse
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **String** | | [optional]
+**status** | **String** | | [optional]
+**provider_name** | **String** | | [optional]
+**date_time_utc** | **String** | | [optional]
+**page_info** | [**PageInfo**](PageInfo.md) | | [optional]
+**overpayments** | [**Array<Overpayment>**](Overpayment.md) | | [optional]
+
+## Code Sample
+
+```ruby
+require 'XeroRuby::Accounting'
+
+instance = XeroRuby::Accounting::GetOverpaymentsResponse.new(id: null,
+ status: null,
+ provider_name: null,
+ date_time_utc: null,
+ page_info: null,
+ overpayments: null)
+```
+
+
diff --git a/docs/accounting/GetPaymentsResponse.md b/docs/accounting/GetPaymentsResponse.md
new file mode 100644
index 00000000..66d92ce7
--- /dev/null
+++ b/docs/accounting/GetPaymentsResponse.md
@@ -0,0 +1,27 @@
+# XeroRuby::Accounting::GetPaymentsResponse
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **String** | | [optional]
+**status** | **String** | | [optional]
+**provider_name** | **String** | | [optional]
+**date_time_utc** | **String** | | [optional]
+**page_info** | [**PageInfo**](PageInfo.md) | | [optional]
+**payments** | [**Array<Payment>**](Payment.md) | | [optional]
+
+## Code Sample
+
+```ruby
+require 'XeroRuby::Accounting'
+
+instance = XeroRuby::Accounting::GetPaymentsResponse.new(id: null,
+ status: null,
+ provider_name: null,
+ date_time_utc: null,
+ page_info: null,
+ payments: null)
+```
+
+
diff --git a/docs/accounting/GetPrepaymentsResponse.md b/docs/accounting/GetPrepaymentsResponse.md
new file mode 100644
index 00000000..1fa92e8c
--- /dev/null
+++ b/docs/accounting/GetPrepaymentsResponse.md
@@ -0,0 +1,27 @@
+# XeroRuby::Accounting::GetPrepaymentsResponse
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **String** | | [optional]
+**status** | **String** | | [optional]
+**provider_name** | **String** | | [optional]
+**date_time_utc** | **String** | | [optional]
+**page_info** | [**PageInfo**](PageInfo.md) | | [optional]
+**prepayments** | [**Array<Prepayment>**](Prepayment.md) | | [optional]
+
+## Code Sample
+
+```ruby
+require 'XeroRuby::Accounting'
+
+instance = XeroRuby::Accounting::GetPrepaymentsResponse.new(id: null,
+ status: null,
+ provider_name: null,
+ date_time_utc: null,
+ page_info: null,
+ prepayments: null)
+```
+
+
diff --git a/docs/accounting/GetPurchaseOrdersResponse.md b/docs/accounting/GetPurchaseOrdersResponse.md
new file mode 100644
index 00000000..638d57b6
--- /dev/null
+++ b/docs/accounting/GetPurchaseOrdersResponse.md
@@ -0,0 +1,27 @@
+# XeroRuby::Accounting::GetPurchaseOrdersResponse
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **String** | | [optional]
+**status** | **String** | | [optional]
+**provider_name** | **String** | | [optional]
+**date_time_utc** | **String** | | [optional]
+**page_info** | [**PageInfo**](PageInfo.md) | | [optional]
+**purchase_orders** | [**Array<PurchaseOrder>**](PurchaseOrder.md) | | [optional]
+
+## Code Sample
+
+```ruby
+require 'XeroRuby::Accounting'
+
+instance = XeroRuby::Accounting::GetPurchaseOrdersResponse.new(id: null,
+ status: null,
+ provider_name: null,
+ date_time_utc: null,
+ page_info: null,
+ purchase_orders: null)
+```
+
+
diff --git a/docs/accounting/PageInfo.md b/docs/accounting/PageInfo.md
new file mode 100644
index 00000000..501deb21
--- /dev/null
+++ b/docs/accounting/PageInfo.md
@@ -0,0 +1,23 @@
+# XeroRuby::Accounting::PageInfo
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**page** | **Integer** | | [optional]
+**page_size** | **Integer** | | [optional]
+**total_pages** | **Integer** | | [optional]
+**total_rows** | **Integer** | | [optional]
+
+## Code Sample
+
+```ruby
+require 'XeroRuby::Accounting'
+
+instance = XeroRuby::Accounting::PageInfo.new(page: null,
+ page_size: null,
+ total_pages: null,
+ total_rows: null)
+```
+
+
diff --git a/docs/accounting/index.html b/docs/accounting/index.html
index 8402476e..9cf9f0db 100644
--- a/docs/accounting/index.html
+++ b/docs/accounting/index.html
@@ -2859,6 +2859,267 @@
"externalDocs" : {
"url" : "http://developer.xero.com/documentation/api/organisation/"
}
+};
+ defs["GetBankTransactionsResponse"] = {
+ "title" : "",
+ "type" : "object",
+ "properties" : {
+ "Id" : {
+ "type" : "string"
+ },
+ "Status" : {
+ "type" : "string"
+ },
+ "ProviderName" : {
+ "type" : "string"
+ },
+ "DateTimeUTC" : {
+ "type" : "string"
+ },
+ "PageInfo" : {
+ "$ref" : "#/components/schemas/PageInfo"
+ },
+ "BankTransactions" : {
+ "minItems" : 1,
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/BankTransaction"
+ }
+ }
+ },
+ "description" : ""
+};
+ defs["GetContactsResponse"] = {
+ "title" : "",
+ "type" : "object",
+ "properties" : {
+ "Id" : {
+ "type" : "string"
+ },
+ "Status" : {
+ "type" : "string"
+ },
+ "ProviderName" : {
+ "type" : "string"
+ },
+ "DateTimeUTC" : {
+ "type" : "string"
+ },
+ "PageInfo" : {
+ "$ref" : "#/components/schemas/PageInfo"
+ },
+ "Contacts" : {
+ "minItems" : 1,
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/Contact"
+ }
+ }
+ },
+ "description" : ""
+};
+ defs["GetCreditNotesResponse"] = {
+ "title" : "",
+ "type" : "object",
+ "properties" : {
+ "Id" : {
+ "type" : "string"
+ },
+ "Status" : {
+ "type" : "string"
+ },
+ "ProviderName" : {
+ "type" : "string"
+ },
+ "DateTimeUTC" : {
+ "type" : "string"
+ },
+ "PageInfo" : {
+ "$ref" : "#/components/schemas/PageInfo"
+ },
+ "CreditNotes" : {
+ "minItems" : 1,
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/CreditNote"
+ }
+ }
+ },
+ "description" : ""
+};
+ defs["GetInvoicesResponse"] = {
+ "title" : "",
+ "type" : "object",
+ "properties" : {
+ "Id" : {
+ "type" : "string"
+ },
+ "Status" : {
+ "type" : "string"
+ },
+ "ProviderName" : {
+ "type" : "string"
+ },
+ "DateTimeUTC" : {
+ "type" : "string"
+ },
+ "PageInfo" : {
+ "$ref" : "#/components/schemas/PageInfo"
+ },
+ "Invoices" : {
+ "minItems" : 1,
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/Invoice"
+ }
+ }
+ },
+ "description" : ""
+};
+ defs["GetManualJournalsResponse"] = {
+ "title" : "",
+ "type" : "object",
+ "properties" : {
+ "Id" : {
+ "type" : "string"
+ },
+ "Status" : {
+ "type" : "string"
+ },
+ "ProviderName" : {
+ "type" : "string"
+ },
+ "DateTimeUTC" : {
+ "type" : "string"
+ },
+ "PageInfo" : {
+ "$ref" : "#/components/schemas/PageInfo"
+ },
+ "ManualJournals" : {
+ "minItems" : 1,
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/ManualJournal"
+ }
+ }
+ },
+ "description" : ""
+};
+ defs["GetOverpaymentsResponse"] = {
+ "title" : "",
+ "type" : "object",
+ "properties" : {
+ "Id" : {
+ "type" : "string"
+ },
+ "Status" : {
+ "type" : "string"
+ },
+ "ProviderName" : {
+ "type" : "string"
+ },
+ "DateTimeUTC" : {
+ "type" : "string"
+ },
+ "PageInfo" : {
+ "$ref" : "#/components/schemas/PageInfo"
+ },
+ "Overpayments" : {
+ "minItems" : 1,
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/Overpayment"
+ }
+ }
+ },
+ "description" : ""
+};
+ defs["GetPaymentsResponse"] = {
+ "title" : "",
+ "type" : "object",
+ "properties" : {
+ "Id" : {
+ "type" : "string"
+ },
+ "Status" : {
+ "type" : "string"
+ },
+ "ProviderName" : {
+ "type" : "string"
+ },
+ "DateTimeUTC" : {
+ "type" : "string"
+ },
+ "PageInfo" : {
+ "$ref" : "#/components/schemas/PageInfo"
+ },
+ "Payments" : {
+ "minItems" : 1,
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/Payment"
+ }
+ }
+ },
+ "description" : ""
+};
+ defs["GetPrepaymentsResponse"] = {
+ "title" : "",
+ "type" : "object",
+ "properties" : {
+ "Id" : {
+ "type" : "string"
+ },
+ "Status" : {
+ "type" : "string"
+ },
+ "ProviderName" : {
+ "type" : "string"
+ },
+ "DateTimeUTC" : {
+ "type" : "string"
+ },
+ "PageInfo" : {
+ "$ref" : "#/components/schemas/PageInfo"
+ },
+ "Prepayments" : {
+ "minItems" : 1,
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/Prepayment"
+ }
+ }
+ },
+ "description" : ""
+};
+ defs["GetPurchaseOrdersResponse"] = {
+ "title" : "",
+ "type" : "object",
+ "properties" : {
+ "Id" : {
+ "type" : "string"
+ },
+ "Status" : {
+ "type" : "string"
+ },
+ "ProviderName" : {
+ "type" : "string"
+ },
+ "DateTimeUTC" : {
+ "type" : "string"
+ },
+ "PageInfo" : {
+ "$ref" : "#/components/schemas/PageInfo"
+ },
+ "PurchaseOrders" : {
+ "minItems" : 1,
+ "type" : "array",
+ "items" : {
+ "$ref" : "#/components/schemas/PurchaseOrder"
+ }
+ }
+ },
+ "description" : ""
};
defs["HistoryRecord"] = {
"title" : "",
@@ -4247,6 +4508,25 @@
},
"description" : "",
"x-isObjectArray" : true
+};
+ defs["PageInfo"] = {
+ "title" : "",
+ "type" : "object",
+ "properties" : {
+ "Page" : {
+ "type" : "integer"
+ },
+ "PageSize" : {
+ "type" : "integer"
+ },
+ "TotalPages" : {
+ "type" : "integer"
+ },
+ "TotalRows" : {
+ "type" : "integer"
+ }
+ },
+ "description" : "Pagination information"
};
defs["Payment"] = {
"title" : "",
@@ -6100,7 +6380,7 @@
-
+
createAccount
@@ -20356,9 +20636,10 @@ Usage and SDK Samples
order = 'Type ASC'
page = 1
unitdp = 4
+pageSize = 100
begin
- response = xero_client.accounting_api.get_bank_transactions(xero_tenant_id, if_modified_since, where, order, page, unitdp)
+ response = xero_client.accounting_api.get_bank_transactions(xero_tenant_id, if_modified_since, where, order, page, unitdp, pageSize)
return response
rescue XeroRuby::ApiError => e
puts "Exception when calling get_bank_transactions: #{e}"
@@ -20518,6 +20799,26 @@ Parameters
+
+
+ pageSize
+
+
+
+
+
+
+
+ Integer
+
+
+
+Number of records to retrieve per page
+
+
+
+
+
@@ -23729,9 +24030,10 @@ Usage and SDK Samples
include_archived = true
summary_only = true
search_term = 'Joe Bloggs'
+pageSize = 100
begin
- response = xero_client.accounting_api.get_contacts(xero_tenant_id, if_modified_since, where, order, ids, page, include_archived, summary_only, search_term)
+ response = xero_client.accounting_api.get_contacts(xero_tenant_id, if_modified_since, where, order, ids, page, include_archived, summary_only, search_term, pageSize)
return response
rescue XeroRuby::ApiError => e
puts "Exception when calling get_contacts: #{e}"
@@ -23954,6 +24256,26 @@ Parameters
+
+
+ pageSize
+
+
+
+
+
+
+
+ Integer
+
+
+
+Number of records to retrieve per page
+
+
+
+
+
@@ -24826,9 +25148,10 @@ Usage and SDK Samples
order = 'CreditNoteNumber ASC'
page = 1
unitdp = 4
+pageSize = 100
begin
- response = xero_client.accounting_api.get_credit_notes(xero_tenant_id, if_modified_since, where, order, page, unitdp)
+ response = xero_client.accounting_api.get_credit_notes(xero_tenant_id, if_modified_since, where, order, page, unitdp, pageSize)
return response
rescue XeroRuby::ApiError => e
puts "Exception when calling get_credit_notes: #{e}"
@@ -24988,6 +25311,26 @@ Parameters
+
+
+ pageSize
+
+
+
+
+
+
+
+ Integer
+
+
+
+Number of records to retrieve per page
+
+
+
+
+
@@ -26752,9 +27095,10 @@ Usage and SDK Samples
created_by_my_app = false
unitdp = 4
summary_only = true
+pageSize = 100
begin
- response = xero_client.accounting_api.get_invoices(xero_tenant_id, if_modified_since, where, order, ids, invoice_numbers, contact_ids, statuses, page, include_archived, created_by_my_app, unitdp, summary_only)
+ response = xero_client.accounting_api.get_invoices(xero_tenant_id, if_modified_since, where, order, ids, invoice_numbers, contact_ids, statuses, page, include_archived, created_by_my_app, unitdp, summary_only, pageSize)
return response
rescue XeroRuby::ApiError => e
puts "Exception when calling get_invoices: #{e}"
@@ -27060,6 +27404,26 @@ Parameters
+
+
+ pageSize
+
+
+
+
+
+
+
+ Integer
+
+
+
+Number of records to retrieve per page
+
+
+
+
+
@@ -28831,9 +29195,10 @@ Usage and SDK Samples
where = 'Status==#{XeroRuby::Accounting::ManualJournal::DRAFT}'
order = 'Date ASC'
page = 1
+pageSize = 100
begin
- response = xero_client.accounting_api.get_manual_journals(xero_tenant_id, if_modified_since, where, order, page)
+ response = xero_client.accounting_api.get_manual_journals(xero_tenant_id, if_modified_since, where, order, page, pageSize)
return response
rescue XeroRuby::ApiError => e
puts "Exception when calling get_manual_journals: #{e}"
@@ -28973,6 +29338,26 @@ Parameters
+
+
+ pageSize
+
+
+
+
+
+
+
+ Integer
+
+
+
+Number of records to retrieve per page
+
+
+
+
+
@@ -30281,9 +30666,10 @@ Usage and SDK Samples
where = 'Status==#{XeroRuby::Accounting::Payment::AUTHORISED}'
order = 'Amount ASC'
page = 1
+pageSize = 100
begin
- response = xero_client.accounting_api.get_payments(xero_tenant_id, if_modified_since, where, order, page)
+ response = xero_client.accounting_api.get_payments(xero_tenant_id, if_modified_since, where, order, page, pageSize)
return response
rescue XeroRuby::ApiError => e
puts "Exception when calling get_payments: #{e}"
@@ -30423,6 +30809,26 @@ Parameters
+
+
+ pageSize
+
+
+
+
+
+
+
+ Integer
+
+
+
+Number of records to retrieve per page
+
+
+
+
+
@@ -31818,9 +32224,10 @@ Usage and SDK Samples
date_to = '2019-12-31'
order = 'PurchaseOrderNumber ASC'
page = 1
+pageSize = 100
begin
- response = xero_client.accounting_api.get_purchase_orders(xero_tenant_id, if_modified_since, status, date_from, date_to, order, page)
+ response = xero_client.accounting_api.get_purchase_orders(xero_tenant_id, if_modified_since, status, date_from, date_to, order, page, pageSize)
return response
rescue XeroRuby::ApiError => e
puts "Exception when calling get_purchase_orders: #{e}"
@@ -32000,6 +32407,26 @@ Parameters
+
+
+ pageSize
+
+
+
+
+
+
+
+ Integer
+
+
+
+Number of records to retrieve per page
+
+
+
+
+
diff --git a/docs/app_store/index.html b/docs/app_store/index.html
index 44de8137..e3decbf4 100644
--- a/docs/app_store/index.html
+++ b/docs/app_store/index.html
@@ -1241,7 +1241,7 @@
-
+
getSubscription
diff --git a/docs/assets/index.html b/docs/assets/index.html
index a552565a..59b7e0f0 100644
--- a/docs/assets/index.html
+++ b/docs/assets/index.html
@@ -1392,7 +1392,7 @@
-
+
createAsset
diff --git a/docs/files/index.html b/docs/files/index.html
index 77326e6b..ee513c95 100644
--- a/docs/files/index.html
+++ b/docs/files/index.html
@@ -1170,7 +1170,7 @@
-
+
createFileAssociation
diff --git a/docs/finance/DataSourceResponse.md b/docs/finance/DataSourceResponse.md
index f9341498..b2f56e30 100644
--- a/docs/finance/DataSourceResponse.md
+++ b/docs/finance/DataSourceResponse.md
@@ -4,21 +4,21 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**direct_bank_feed** | **BigDecimal** | Sum of the amounts of all statement lines where the source of the data was a direct bank feed in to Xero. This gives an indication on the certainty of correctness of the data. | [optional]
-**indirect_bank_feed** | **BigDecimal** | Sum of the amounts of all statement lines where the source of the data was a indirect bank feed to Xero (usually via Yodlee). This gives an indication on the certainty of correctness of the data. | [optional]
-**file_upload** | **BigDecimal** | Sum of the amounts of all statement lines where the source of the data was a CSV file upload in to Xero. This gives an indication on the certainty of correctness of the data. | [optional]
-**manual** | **BigDecimal** | Sum of the amounts of all statement lines where the source of the data was manually keyed in to Xero. This gives an indication on the certainty of correctness of the data. | [optional]
-**direct_bank_feed_pos** | **BigDecimal** | Sum of the amounts of all statement lines where the source of the data was a direct bank feed in to Xero. This gives an indication on the certainty of correctness of the data. Only positive transactions are included. | [optional]
-**indirect_bank_feed_pos** | **BigDecimal** | Sum of the amounts of all statement lines where the source of the data was a indirect bank feed to Xero (usually via Yodlee). This gives an indication on the certainty of correctness of the data. Only positive transactions are included. | [optional]
-**file_upload_pos** | **BigDecimal** | Sum of the amounts of all statement lines where the source of the data was a CSV file upload in to Xero. This gives an indication on the certainty of correctness of the data. Only positive transactions are included. | [optional]
-**manual_pos** | **BigDecimal** | Sum of the amounts of all statement lines where the source of the data was manually keyed in to Xero. This gives an indication on the certainty of correctness of the data. Only positive transactions are included. | [optional]
-**direct_bank_feed_neg** | **BigDecimal** | Sum of the amounts of all statement lines where the source of the data was a direct bank feed in to Xero. This gives an indication on the certainty of correctness of the data. Only negative transactions are included. | [optional]
-**indirect_bank_feed_neg** | **BigDecimal** | Sum of the amounts of all statement lines where the source of the data was a indirect bank feed to Xero (usually via Yodlee). This gives an indication on the certainty of correctness of the data. Only negative transactions are included. | [optional]
-**file_upload_neg** | **BigDecimal** | Sum of the amounts of all statement lines where the source of the data was a CSV file upload in to Xero. This gives an indication on the certainty of correctness of the data. Only negative transactions are included. | [optional]
-**manual_neg** | **BigDecimal** | Sum of the amounts of all statement lines where the source of the data was manually keyed in to Xero. This gives an indication on the certainty of correctness of the data. Only negative transactions are included. | [optional]
-**other_pos** | **BigDecimal** | Sum of the amounts of all statement lines where the source of the data was any other category. This gives an indication on the certainty of correctness of the data. Only positive transactions are included. | [optional]
-**other_neg** | **BigDecimal** | Sum of the amounts of all statement lines where the source of the data was any other category. This gives an indication on the certainty of correctness of the data. Only negative transactions are included. | [optional]
-**other** | **BigDecimal** | Sum of the amounts of all statement lines where the source of the data was any other category. This gives an indication on the certainty of correctness of the data. | [optional]
+**direct_bank_feed** | **BigDecimal** | Sum of the amounts of all statement lines where the source of the data was a direct bank feed in to Xero via an API integration. This could be from a bank or aggregator. This gives an indication on the certainty of correctness of the data. | [optional]
+**indirect_bank_feed** | **BigDecimal** | No longer in use. | [optional]
+**file_upload** | **BigDecimal** | Sum of the amounts of all statement lines where the source of the data was a file manually uploaded in to Xero. This gives an indication on the certainty of correctness of the data. | [optional]
+**manual** | **BigDecimal** | Sum of the amounts of all statement lines where the source of the data was manually input in to Xero. This gives an indication on the certainty of correctness of the data. | [optional]
+**direct_bank_feed_pos** | **BigDecimal** | Sum of the amounts of all statement lines where the source of the data was a direct bank feed in to Xero via an API integration. This could be from a bank or aggregator. This gives an indication on the certainty of correctness of the data. Only positive transactions are included. | [optional]
+**indirect_bank_feed_pos** | **BigDecimal** | No longer in use. | [optional]
+**file_upload_pos** | **BigDecimal** | Sum of the amounts of all statement lines where the source of the data was a file manually uploaded in to Xero. This gives an indication on the certainty of correctness of the data. Only positive transactions are included. | [optional]
+**manual_pos** | **BigDecimal** | Sum of the amounts of all statement lines where the source of the data was manually input in to Xero. This gives an indication on the certainty of correctness of the data. Only positive transactions are included. | [optional]
+**direct_bank_feed_neg** | **BigDecimal** | Sum of the amounts of all statement lines where the source of the data was a direct bank feed in to Xero via an API integration. This could be from a bank or aggregator. This gives an indication on the certainty of correctness of the data. Only negative transactions are included. | [optional]
+**indirect_bank_feed_neg** | **BigDecimal** | No longer in use. | [optional]
+**file_upload_neg** | **BigDecimal** | Sum of the amounts of all statement lines where the source of the data was a file manually uploaded in to Xero. This gives an indication on the certainty of correctness of the data. Only negative transactions are included. | [optional]
+**manual_neg** | **BigDecimal** | Sum of the amounts of all statement lines where the source of the data was manually input in to Xero. This gives an indication on the certainty of correctness of the data. Only negative transactions are included. | [optional]
+**other_pos** | **BigDecimal** | Sum of the amounts of all statement lines where the source of the data was unknown. This gives an indication on the certainty of correctness of the data. Only positive transactions are included. | [optional]
+**other_neg** | **BigDecimal** | Sum of the amounts of all statement lines where the source of the data was unknown. This gives an indication on the certainty of correctness of the data. Only negative transactions are included. | [optional]
+**other** | **BigDecimal** | Sum of the amounts of all statement lines where the source of the data was unknown. This gives an indication on the certainty of correctness of the data. | [optional]
## Code Sample
diff --git a/docs/finance/index.html b/docs/finance/index.html
index 41357a67..d5f3e4a1 100644
--- a/docs/finance/index.html
+++ b/docs/finance/index.html
@@ -1529,91 +1529,94 @@
"properties" : {
"directBankFeed" : {
"type" : "number",
- "description" : "Sum of the amounts of all statement lines where the source of the data was a direct bank feed in to Xero. This gives an indication on the certainty of correctness of the data.",
+ "description" : "Sum of the amounts of all statement lines where the source of the data was a direct bank feed in to Xero via an API integration. This could be from a bank or aggregator. This gives an indication on the certainty of correctness of the data.",
"format" : "double",
"x-is-money" : true
},
"indirectBankFeed" : {
"type" : "number",
- "description" : "Sum of the amounts of all statement lines where the source of the data was a indirect bank feed to Xero (usually via Yodlee). This gives an indication on the certainty of correctness of the data.",
+ "description" : "No longer in use.",
"format" : "double",
+ "deprecated" : true,
"x-is-money" : true
},
"fileUpload" : {
"type" : "number",
- "description" : "Sum of the amounts of all statement lines where the source of the data was a CSV file upload in to Xero. This gives an indication on the certainty of correctness of the data.",
+ "description" : "Sum of the amounts of all statement lines where the source of the data was a file manually uploaded in to Xero. This gives an indication on the certainty of correctness of the data.",
"format" : "double",
"x-is-money" : true
},
"manual" : {
"type" : "number",
- "description" : "Sum of the amounts of all statement lines where the source of the data was manually keyed in to Xero. This gives an indication on the certainty of correctness of the data.",
+ "description" : "Sum of the amounts of all statement lines where the source of the data was manually input in to Xero. This gives an indication on the certainty of correctness of the data.",
"format" : "double",
"x-is-money" : true
},
"directBankFeedPos" : {
"type" : "number",
- "description" : "Sum of the amounts of all statement lines where the source of the data was a direct bank feed in to Xero. This gives an indication on the certainty of correctness of the data. Only positive transactions are included.",
+ "description" : "Sum of the amounts of all statement lines where the source of the data was a direct bank feed in to Xero via an API integration. This could be from a bank or aggregator. This gives an indication on the certainty of correctness of the data. Only positive transactions are included.",
"format" : "double",
"x-is-money" : true
},
"indirectBankFeedPos" : {
"type" : "number",
- "description" : "Sum of the amounts of all statement lines where the source of the data was a indirect bank feed to Xero (usually via Yodlee). This gives an indication on the certainty of correctness of the data. Only positive transactions are included.",
+ "description" : "No longer in use.",
"format" : "double",
+ "deprecated" : true,
"x-is-money" : true
},
"fileUploadPos" : {
"type" : "number",
- "description" : "Sum of the amounts of all statement lines where the source of the data was a CSV file upload in to Xero. This gives an indication on the certainty of correctness of the data. Only positive transactions are included.",
+ "description" : "Sum of the amounts of all statement lines where the source of the data was a file manually uploaded in to Xero. This gives an indication on the certainty of correctness of the data. Only positive transactions are included.",
"format" : "double",
"x-is-money" : true
},
"manualPos" : {
"type" : "number",
- "description" : "Sum of the amounts of all statement lines where the source of the data was manually keyed in to Xero. This gives an indication on the certainty of correctness of the data. Only positive transactions are included.",
+ "description" : "Sum of the amounts of all statement lines where the source of the data was manually input in to Xero. This gives an indication on the certainty of correctness of the data. Only positive transactions are included.",
"format" : "double",
"x-is-money" : true
},
"directBankFeedNeg" : {
"type" : "number",
- "description" : "Sum of the amounts of all statement lines where the source of the data was a direct bank feed in to Xero. This gives an indication on the certainty of correctness of the data. Only negative transactions are included.",
+ "description" : "Sum of the amounts of all statement lines where the source of the data was a direct bank feed in to Xero via an API integration. This could be from a bank or aggregator. This gives an indication on the certainty of correctness of the data. Only negative transactions are included.",
"format" : "double",
"x-is-money" : true
},
"indirectBankFeedNeg" : {
"type" : "number",
- "description" : "Sum of the amounts of all statement lines where the source of the data was a indirect bank feed to Xero (usually via Yodlee). This gives an indication on the certainty of correctness of the data. Only negative transactions are included.",
+ "description" : "No longer in use.",
"format" : "double",
+ "deprecated" : true,
"x-is-money" : true
},
"fileUploadNeg" : {
"type" : "number",
- "description" : "Sum of the amounts of all statement lines where the source of the data was a CSV file upload in to Xero. This gives an indication on the certainty of correctness of the data. Only negative transactions are included.",
+ "description" : "Sum of the amounts of all statement lines where the source of the data was a file manually uploaded in to Xero. This gives an indication on the certainty of correctness of the data. Only negative transactions are included.",
"format" : "double",
"x-is-money" : true
},
"manualNeg" : {
"type" : "number",
- "description" : "Sum of the amounts of all statement lines where the source of the data was manually keyed in to Xero. This gives an indication on the certainty of correctness of the data. Only negative transactions are included.",
+ "description" : "Sum of the amounts of all statement lines where the source of the data was manually input in to Xero. This gives an indication on the certainty of correctness of the data. Only negative transactions are included.",
"format" : "double",
"x-is-money" : true
},
"otherPos" : {
"type" : "number",
- "description" : "Sum of the amounts of all statement lines where the source of the data was any other category. This gives an indication on the certainty of correctness of the data. Only positive transactions are included.",
+ "description" : "Sum of the amounts of all statement lines where the source of the data was unknown. This gives an indication on the certainty of correctness of the data. Only positive transactions are included.",
"format" : "double",
"x-is-money" : true
},
"otherNeg" : {
"type" : "number",
- "description" : "Sum of the amounts of all statement lines where the source of the data was any other category. This gives an indication on the certainty of correctness of the data. Only negative transactions are included.",
+ "description" : "Sum of the amounts of all statement lines where the source of the data was unknown. This gives an indication on the certainty of correctness of the data. Only negative transactions are included.",
"format" : "double",
"x-is-money" : true
},
"other" : {
"type" : "number",
- "description" : "Sum of the amounts of all statement lines where the source of the data was any other category. This gives an indication on the certainty of correctness of the data.",
+ "description" : "Sum of the amounts of all statement lines where the source of the data was unknown. This gives an indication on the certainty of correctness of the data.",
"format" : "double",
"x-is-money" : true
}
@@ -2734,7 +2737,7 @@
-
+
getAccountingActivityAccountUsage
diff --git a/docs/payroll_au/index.html b/docs/payroll_au/index.html
index a211302e..3f7c2eba 100644
--- a/docs/payroll_au/index.html
+++ b/docs/payroll_au/index.html
@@ -3412,7 +3412,7 @@
-
+
approveLeaveApplication
diff --git a/docs/payroll_nz/index.html b/docs/payroll_nz/index.html
index 6c847724..bad179af 100644
--- a/docs/payroll_nz/index.html
+++ b/docs/payroll_nz/index.html
@@ -3843,7 +3843,7 @@
-
+
approveTimesheet
diff --git a/docs/payroll_uk/index.html b/docs/payroll_uk/index.html
index f6ee1617..43d7fa74 100644
--- a/docs/payroll_uk/index.html
+++ b/docs/payroll_uk/index.html
@@ -3510,7 +3510,7 @@
-
+
approveTimesheet
diff --git a/docs/projects/index.html b/docs/projects/index.html
index 2c3dc881..d150f13a 100644
--- a/docs/projects/index.html
+++ b/docs/projects/index.html
@@ -1462,7 +1462,7 @@
-
+
createProject
diff --git a/lib/xero-ruby.rb b/lib/xero-ruby.rb
index 1139d08a..b83cb3d3 100644
--- a/lib/xero-ruby.rb
+++ b/lib/xero-ruby.rb
@@ -453,6 +453,15 @@
require 'xero-ruby/models/accounting/expense_claim'
require 'xero-ruby/models/accounting/expense_claims'
require 'xero-ruby/models/accounting/external_link'
+require 'xero-ruby/models/accounting/get_bank_transactions_response'
+require 'xero-ruby/models/accounting/get_contacts_response'
+require 'xero-ruby/models/accounting/get_credit_notes_response'
+require 'xero-ruby/models/accounting/get_invoices_response'
+require 'xero-ruby/models/accounting/get_manual_journals_response'
+require 'xero-ruby/models/accounting/get_overpayments_response'
+require 'xero-ruby/models/accounting/get_payments_response'
+require 'xero-ruby/models/accounting/get_prepayments_response'
+require 'xero-ruby/models/accounting/get_purchase_orders_response'
require 'xero-ruby/models/accounting/history_record'
require 'xero-ruby/models/accounting/history_records'
require 'xero-ruby/models/accounting/import_summary'
@@ -483,6 +492,7 @@
require 'xero-ruby/models/accounting/organisations'
require 'xero-ruby/models/accounting/overpayment'
require 'xero-ruby/models/accounting/overpayments'
+require 'xero-ruby/models/accounting/page_info'
require 'xero-ruby/models/accounting/payment'
require 'xero-ruby/models/accounting/payment_delete'
require 'xero-ruby/models/accounting/payment_service'
diff --git a/lib/xero-ruby/api/accounting_api.rb b/lib/xero-ruby/api/accounting_api.rb
index 7c4a44d6..55266700 100644
--- a/lib/xero-ruby/api/accounting_api.rb
+++ b/lib/xero-ruby/api/accounting_api.rb
@@ -6679,7 +6679,8 @@ def get_bank_transaction_attachments_with_http_info(xero_tenant_id, bank_transac
# @option opts [String] :order Order by an any element
# @option opts [Integer] :page Up to 100 bank transactions will be returned in a single API call with line items details
# @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
- # @return [BankTransactions]
+ # @option opts [Integer] :page_size Number of records to retrieve per page
+ # @return [GetBankTransactionsResponse]
def get_bank_transactions(xero_tenant_id, opts = {})
data, _status_code, _headers = get_bank_transactions_with_http_info(xero_tenant_id, opts)
data
@@ -6693,7 +6694,8 @@ def get_bank_transactions(xero_tenant_id, opts = {})
# @option opts [String] :order Order by an any element
# @option opts [Integer] :page Up to 100 bank transactions will be returned in a single API call with line items details
# @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
- # @return [Array<(BankTransactions, Integer, Hash)>] BankTransactions data, response status code and response headers
+ # @option opts [Integer] :page_size Number of records to retrieve per page
+ # @return [Array<(GetBankTransactionsResponse, Integer, Hash)>] GetBankTransactionsResponse data, response status code and response headers
def get_bank_transactions_with_http_info(xero_tenant_id, options = {})
opts = options.dup
if @api_client.config.debugging
@@ -6715,6 +6717,7 @@ def get_bank_transactions_with_http_info(xero_tenant_id, options = {})
query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
query_params[:'unitdp'] = opts[:'unitdp'] if !opts[:'unitdp'].nil?
+ query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
@@ -6734,7 +6737,7 @@ def get_bank_transactions_with_http_info(xero_tenant_id, options = {})
post_body = opts[:body]
# return_type
- return_type = opts[:return_type] || 'BankTransactions'
+ return_type = opts[:return_type] || 'GetBankTransactionsResponse'
# auth_names
auth_names = opts[:auth_names] || ['OAuth2']
@@ -8627,7 +8630,8 @@ def get_contact_history_with_http_info(xero_tenant_id, contact_id, options = {})
# @option opts [Boolean] :include_archived e.g. includeArchived=true - Contacts with a status of ARCHIVED will be included in the response
# @option opts [Boolean] :summary_only Use summaryOnly=true in GET Contacts and Invoices endpoint to retrieve a smaller version of the response object. This returns only lightweight fields, excluding computation-heavy fields from the response, making the API calls quick and efficient. (default to false)
# @option opts [String] :search_term Search parameter that performs a case-insensitive text search across the Name, FirstName, LastName, ContactNumber and EmailAddress fields.
- # @return [Contacts]
+ # @option opts [Integer] :page_size Number of records to retrieve per page
+ # @return [GetContactsResponse]
def get_contacts(xero_tenant_id, opts = {})
data, _status_code, _headers = get_contacts_with_http_info(xero_tenant_id, opts)
data
@@ -8644,7 +8648,8 @@ def get_contacts(xero_tenant_id, opts = {})
# @option opts [Boolean] :include_archived e.g. includeArchived=true - Contacts with a status of ARCHIVED will be included in the response
# @option opts [Boolean] :summary_only Use summaryOnly=true in GET Contacts and Invoices endpoint to retrieve a smaller version of the response object. This returns only lightweight fields, excluding computation-heavy fields from the response, making the API calls quick and efficient.
# @option opts [String] :search_term Search parameter that performs a case-insensitive text search across the Name, FirstName, LastName, ContactNumber and EmailAddress fields.
- # @return [Array<(Contacts, Integer, Hash)>] Contacts data, response status code and response headers
+ # @option opts [Integer] :page_size Number of records to retrieve per page
+ # @return [Array<(GetContactsResponse, Integer, Hash)>] GetContactsResponse data, response status code and response headers
def get_contacts_with_http_info(xero_tenant_id, options = {})
opts = options.dup
if @api_client.config.debugging
@@ -8669,6 +8674,7 @@ def get_contacts_with_http_info(xero_tenant_id, options = {})
query_params[:'includeArchived'] = opts[:'include_archived'] if !opts[:'include_archived'].nil?
query_params[:'summaryOnly'] = opts[:'summary_only'] if !opts[:'summary_only'].nil?
query_params[:'searchTerm'] = opts[:'search_term'] if !opts[:'search_term'].nil?
+ query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
@@ -8688,7 +8694,7 @@ def get_contacts_with_http_info(xero_tenant_id, options = {})
post_body = opts[:body]
# return_type
- return_type = opts[:return_type] || 'Contacts'
+ return_type = opts[:return_type] || 'GetContactsResponse'
# auth_names
auth_names = opts[:auth_names] || ['OAuth2']
@@ -9196,7 +9202,8 @@ def get_credit_note_history_with_http_info(xero_tenant_id, credit_note_id, optio
# @option opts [String] :order Order by an any element
# @option opts [Integer] :page e.g. page=1 – Up to 100 credit notes will be returned in a single API call with line items shown for each credit note
# @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
- # @return [CreditNotes]
+ # @option opts [Integer] :page_size Number of records to retrieve per page
+ # @return [GetCreditNotesResponse]
def get_credit_notes(xero_tenant_id, opts = {})
data, _status_code, _headers = get_credit_notes_with_http_info(xero_tenant_id, opts)
data
@@ -9210,7 +9217,8 @@ def get_credit_notes(xero_tenant_id, opts = {})
# @option opts [String] :order Order by an any element
# @option opts [Integer] :page e.g. page=1 – Up to 100 credit notes will be returned in a single API call with line items shown for each credit note
# @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
- # @return [Array<(CreditNotes, Integer, Hash)>] CreditNotes data, response status code and response headers
+ # @option opts [Integer] :page_size Number of records to retrieve per page
+ # @return [Array<(GetCreditNotesResponse, Integer, Hash)>] GetCreditNotesResponse data, response status code and response headers
def get_credit_notes_with_http_info(xero_tenant_id, options = {})
opts = options.dup
if @api_client.config.debugging
@@ -9232,6 +9240,7 @@ def get_credit_notes_with_http_info(xero_tenant_id, options = {})
query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
query_params[:'unitdp'] = opts[:'unitdp'] if !opts[:'unitdp'].nil?
+ query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
@@ -9251,7 +9260,7 @@ def get_credit_notes_with_http_info(xero_tenant_id, options = {})
post_body = opts[:body]
# return_type
- return_type = opts[:return_type] || 'CreditNotes'
+ return_type = opts[:return_type] || 'GetCreditNotesResponse'
# auth_names
auth_names = opts[:auth_names] || ['OAuth2']
@@ -10291,7 +10300,8 @@ def get_invoice_reminders_with_http_info(xero_tenant_id, options = {})
# @option opts [Boolean] :created_by_my_app When set to true you'll only retrieve Invoices created by your app
# @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
# @option opts [Boolean] :summary_only Use summaryOnly=true in GET Contacts and Invoices endpoint to retrieve a smaller version of the response object. This returns only lightweight fields, excluding computation-heavy fields from the response, making the API calls quick and efficient. (default to false)
- # @return [Invoices]
+ # @option opts [Integer] :page_size Number of records to retrieve per page
+ # @return [GetInvoicesResponse]
def get_invoices(xero_tenant_id, opts = {})
data, _status_code, _headers = get_invoices_with_http_info(xero_tenant_id, opts)
data
@@ -10312,7 +10322,8 @@ def get_invoices(xero_tenant_id, opts = {})
# @option opts [Boolean] :created_by_my_app When set to true you'll only retrieve Invoices created by your app
# @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
# @option opts [Boolean] :summary_only Use summaryOnly=true in GET Contacts and Invoices endpoint to retrieve a smaller version of the response object. This returns only lightweight fields, excluding computation-heavy fields from the response, making the API calls quick and efficient.
- # @return [Array<(Invoices, Integer, Hash)>] Invoices data, response status code and response headers
+ # @option opts [Integer] :page_size Number of records to retrieve per page
+ # @return [Array<(GetInvoicesResponse, Integer, Hash)>] GetInvoicesResponse data, response status code and response headers
def get_invoices_with_http_info(xero_tenant_id, options = {})
opts = options.dup
if @api_client.config.debugging
@@ -10341,6 +10352,7 @@ def get_invoices_with_http_info(xero_tenant_id, options = {})
query_params[:'createdByMyApp'] = opts[:'created_by_my_app'] if !opts[:'created_by_my_app'].nil?
query_params[:'unitdp'] = opts[:'unitdp'] if !opts[:'unitdp'].nil?
query_params[:'summaryOnly'] = opts[:'summary_only'] if !opts[:'summary_only'].nil?
+ query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
@@ -10360,7 +10372,7 @@ def get_invoices_with_http_info(xero_tenant_id, options = {})
post_body = opts[:body]
# return_type
- return_type = opts[:return_type] || 'Invoices'
+ return_type = opts[:return_type] || 'GetInvoicesResponse'
# auth_names
auth_names = opts[:auth_names] || ['OAuth2']
@@ -11338,7 +11350,8 @@ def get_manual_journal_attachments_with_http_info(xero_tenant_id, manual_journal
# @option opts [String] :where Filter by an any element
# @option opts [String] :order Order by an any element
# @option opts [Integer] :page e.g. page=1 – Up to 100 manual journals will be returned in a single API call with line items shown for each overpayment
- # @return [ManualJournals]
+ # @option opts [Integer] :page_size Number of records to retrieve per page
+ # @return [GetManualJournalsResponse]
def get_manual_journals(xero_tenant_id, opts = {})
data, _status_code, _headers = get_manual_journals_with_http_info(xero_tenant_id, opts)
data
@@ -11351,7 +11364,8 @@ def get_manual_journals(xero_tenant_id, opts = {})
# @option opts [String] :where Filter by an any element
# @option opts [String] :order Order by an any element
# @option opts [Integer] :page e.g. page=1 – Up to 100 manual journals will be returned in a single API call with line items shown for each overpayment
- # @return [Array<(ManualJournals, Integer, Hash)>] ManualJournals data, response status code and response headers
+ # @option opts [Integer] :page_size Number of records to retrieve per page
+ # @return [Array<(GetManualJournalsResponse, Integer, Hash)>] GetManualJournalsResponse data, response status code and response headers
def get_manual_journals_with_http_info(xero_tenant_id, options = {})
opts = options.dup
if @api_client.config.debugging
@@ -11372,6 +11386,7 @@ def get_manual_journals_with_http_info(xero_tenant_id, options = {})
query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil?
query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
+ query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
@@ -11391,7 +11406,7 @@ def get_manual_journals_with_http_info(xero_tenant_id, options = {})
post_body = opts[:body]
# return_type
- return_type = opts[:return_type] || 'ManualJournals'
+ return_type = opts[:return_type] || 'GetManualJournalsResponse'
# auth_names
auth_names = opts[:auth_names] || ['OAuth2']
@@ -11933,7 +11948,7 @@ def get_overpayment_history_with_http_info(xero_tenant_id, overpayment_id, optio
# @option opts [String] :order Order by an any element
# @option opts [Integer] :page e.g. page=1 – Up to 100 overpayments will be returned in a single API call with line items shown for each overpayment
# @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
- # @return [Overpayments]
+ # @return [GetOverpaymentsResponse]
def get_overpayments(xero_tenant_id, opts = {})
data, _status_code, _headers = get_overpayments_with_http_info(xero_tenant_id, opts)
data
@@ -11947,7 +11962,7 @@ def get_overpayments(xero_tenant_id, opts = {})
# @option opts [String] :order Order by an any element
# @option opts [Integer] :page e.g. page=1 – Up to 100 overpayments will be returned in a single API call with line items shown for each overpayment
# @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
- # @return [Array<(Overpayments, Integer, Hash)>] Overpayments data, response status code and response headers
+ # @return [Array<(GetOverpaymentsResponse, Integer, Hash)>] GetOverpaymentsResponse data, response status code and response headers
def get_overpayments_with_http_info(xero_tenant_id, options = {})
opts = options.dup
if @api_client.config.debugging
@@ -11988,7 +12003,7 @@ def get_overpayments_with_http_info(xero_tenant_id, options = {})
post_body = opts[:body]
# return_type
- return_type = opts[:return_type] || 'Overpayments'
+ return_type = opts[:return_type] || 'GetOverpaymentsResponse'
# auth_names
auth_names = opts[:auth_names] || ['OAuth2']
@@ -12235,7 +12250,8 @@ def get_payment_services_with_http_info(xero_tenant_id, options = {})
# @option opts [String] :where Filter by an any element
# @option opts [String] :order Order by an any element
# @option opts [Integer] :page Up to 100 payments will be returned in a single API call
- # @return [Payments]
+ # @option opts [Integer] :page_size Number of records to retrieve per page
+ # @return [GetPaymentsResponse]
def get_payments(xero_tenant_id, opts = {})
data, _status_code, _headers = get_payments_with_http_info(xero_tenant_id, opts)
data
@@ -12248,7 +12264,8 @@ def get_payments(xero_tenant_id, opts = {})
# @option opts [String] :where Filter by an any element
# @option opts [String] :order Order by an any element
# @option opts [Integer] :page Up to 100 payments will be returned in a single API call
- # @return [Array<(Payments, Integer, Hash)>] Payments data, response status code and response headers
+ # @option opts [Integer] :page_size Number of records to retrieve per page
+ # @return [Array<(GetPaymentsResponse, Integer, Hash)>] GetPaymentsResponse data, response status code and response headers
def get_payments_with_http_info(xero_tenant_id, options = {})
opts = options.dup
if @api_client.config.debugging
@@ -12269,6 +12286,7 @@ def get_payments_with_http_info(xero_tenant_id, options = {})
query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil?
query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
+ query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
@@ -12288,7 +12306,7 @@ def get_payments_with_http_info(xero_tenant_id, options = {})
post_body = opts[:body]
# return_type
- return_type = opts[:return_type] || 'Payments'
+ return_type = opts[:return_type] || 'GetPaymentsResponse'
# auth_names
auth_names = opts[:auth_names] || ['OAuth2']
@@ -12467,7 +12485,7 @@ def get_prepayment_history_with_http_info(xero_tenant_id, prepayment_id, options
# @option opts [String] :order Order by an any element
# @option opts [Integer] :page e.g. page=1 – Up to 100 prepayments will be returned in a single API call with line items shown for each overpayment
# @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
- # @return [Prepayments]
+ # @return [GetPrepaymentsResponse]
def get_prepayments(xero_tenant_id, opts = {})
data, _status_code, _headers = get_prepayments_with_http_info(xero_tenant_id, opts)
data
@@ -12481,7 +12499,7 @@ def get_prepayments(xero_tenant_id, opts = {})
# @option opts [String] :order Order by an any element
# @option opts [Integer] :page e.g. page=1 – Up to 100 prepayments will be returned in a single API call with line items shown for each overpayment
# @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
- # @return [Array<(Prepayments, Integer, Hash)>] Prepayments data, response status code and response headers
+ # @return [Array<(GetPrepaymentsResponse, Integer, Hash)>] GetPrepaymentsResponse data, response status code and response headers
def get_prepayments_with_http_info(xero_tenant_id, options = {})
opts = options.dup
if @api_client.config.debugging
@@ -12522,7 +12540,7 @@ def get_prepayments_with_http_info(xero_tenant_id, options = {})
post_body = opts[:body]
# return_type
- return_type = opts[:return_type] || 'Prepayments'
+ return_type = opts[:return_type] || 'GetPrepaymentsResponse'
# auth_names
auth_names = opts[:auth_names] || ['OAuth2']
@@ -13103,7 +13121,8 @@ def get_purchase_order_history_with_http_info(xero_tenant_id, purchase_order_id,
# @option opts [String] :date_to Filter by purchase order date (e.g. GET https://.../PurchaseOrders?DateFrom=2015-12-01&DateTo=2015-12-31
# @option opts [String] :order Order by an any element
# @option opts [Integer] :page To specify a page, append the page parameter to the URL e.g. ?page=1. If there are 100 records in the response you will need to check if there is any more data by fetching the next page e.g ?page=2 and continuing this process until no more results are returned.
- # @return [PurchaseOrders]
+ # @option opts [Integer] :page_size Number of records to retrieve per page
+ # @return [GetPurchaseOrdersResponse]
def get_purchase_orders(xero_tenant_id, opts = {})
data, _status_code, _headers = get_purchase_orders_with_http_info(xero_tenant_id, opts)
data
@@ -13118,7 +13137,8 @@ def get_purchase_orders(xero_tenant_id, opts = {})
# @option opts [String] :date_to Filter by purchase order date (e.g. GET https://.../PurchaseOrders?DateFrom=2015-12-01&DateTo=2015-12-31
# @option opts [String] :order Order by an any element
# @option opts [Integer] :page To specify a page, append the page parameter to the URL e.g. ?page=1. If there are 100 records in the response you will need to check if there is any more data by fetching the next page e.g ?page=2 and continuing this process until no more results are returned.
- # @return [Array<(PurchaseOrders, Integer, Hash)>] PurchaseOrders data, response status code and response headers
+ # @option opts [Integer] :page_size Number of records to retrieve per page
+ # @return [Array<(GetPurchaseOrdersResponse, Integer, Hash)>] GetPurchaseOrdersResponse data, response status code and response headers
def get_purchase_orders_with_http_info(xero_tenant_id, options = {})
opts = options.dup
if @api_client.config.debugging
@@ -13145,6 +13165,7 @@ def get_purchase_orders_with_http_info(xero_tenant_id, options = {})
query_params[:'DateTo'] = opts[:'date_to'] if !opts[:'date_to'].nil?
query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
+ query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
@@ -13164,7 +13185,7 @@ def get_purchase_orders_with_http_info(xero_tenant_id, options = {})
post_body = opts[:body]
# return_type
- return_type = opts[:return_type] || 'PurchaseOrders'
+ return_type = opts[:return_type] || 'GetPurchaseOrdersResponse'
# auth_names
auth_names = opts[:auth_names] || ['OAuth2']
diff --git a/lib/xero-ruby/models/accounting/get_bank_transactions_response.rb b/lib/xero-ruby/models/accounting/get_bank_transactions_response.rb
new file mode 100644
index 00000000..bd907c70
--- /dev/null
+++ b/lib/xero-ruby/models/accounting/get_bank_transactions_response.rb
@@ -0,0 +1,274 @@
+=begin
+#Xero Accounting API
+
+#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+
+Contact: api@xero.com
+Generated by: https://openapi-generator.tech
+OpenAPI Generator version: 4.3.1
+
+=end
+
+require 'time'
+require 'date'
+
+module XeroRuby::Accounting
+ require 'bigdecimal'
+
+ class GetBankTransactionsResponse
+
+ attr_accessor :id
+
+
+ attr_accessor :status
+
+
+ attr_accessor :provider_name
+
+
+ attr_accessor :date_time_utc
+
+
+ attr_accessor :page_info
+
+
+ attr_accessor :bank_transactions
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ def self.attribute_map
+ {
+ :'id' => :'Id',
+ :'status' => :'Status',
+ :'provider_name' => :'ProviderName',
+ :'date_time_utc' => :'DateTimeUTC',
+ :'page_info' => :'PageInfo',
+ :'bank_transactions' => :'BankTransactions'
+ }
+ end
+
+ # Attribute type mapping.
+ def self.openapi_types
+ {
+ :'id' => :'String',
+ :'status' => :'String',
+ :'provider_name' => :'String',
+ :'date_time_utc' => :'String',
+ :'page_info' => :'PageInfo',
+ :'bank_transactions' => :'Array'
+ }
+ end
+
+ # Initializes the object
+ # @param [Hash] attributes Model attributes in the form of hash
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `XeroRuby::Accounting::GetBankTransactionsResponse` initialize method"
+ end
+
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ fail ArgumentError, "`#{k}` is not a valid attribute in `XeroRuby::Accounting::GetBankTransactionsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
+ end
+ h[k.to_sym] = v
+ }
+
+ if attributes.key?(:'id')
+ self.id = attributes[:'id']
+ end
+
+ if attributes.key?(:'status')
+ self.status = attributes[:'status']
+ end
+
+ if attributes.key?(:'provider_name')
+ self.provider_name = attributes[:'provider_name']
+ end
+
+ if attributes.key?(:'date_time_utc')
+ self.date_time_utc = attributes[:'date_time_utc']
+ end
+
+ if attributes.key?(:'page_info')
+ self.page_info = attributes[:'page_info']
+ end
+
+ if attributes.key?(:'bank_transactions')
+ if (value = attributes[:'bank_transactions']).is_a?(Array)
+ self.bank_transactions = value
+ end
+ end
+ end
+
+ # Show invalid properties with the reasons. Usually used together with valid?
+ # @return Array for valid properties with the reasons
+ def list_invalid_properties
+ invalid_properties = Array.new
+ invalid_properties
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ def valid?
+ true
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param [Object] Object to be compared
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ id == o.id &&
+ status == o.status &&
+ provider_name == o.provider_name &&
+ date_time_utc == o.date_time_utc &&
+ page_info == o.page_info &&
+ bank_transactions == o.bank_transactions
+ end
+
+ # @see the `==` method
+ # @param [Object] Object to be compared
+ def eql?(o)
+ self == o
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ def hash
+ [id, status, provider_name, date_time_utc, page_info, bank_transactions].hash
+ end
+
+ # Builds the object from hash
+ # @param [Hash] attributes Model attributes in the form of hash
+ # @return [Object] Returns the model itself
+ def self.build_from_hash(attributes)
+ new.build_from_hash(attributes)
+ end
+
+ # Builds the object from hash
+ # @param [Hash] attributes Model attributes in the form of hash
+ # @return [Object] Returns the model itself
+ def build_from_hash(attributes)
+ return nil unless attributes.is_a?(Hash)
+ self.class.openapi_types.each_pair do |key, type|
+ if type =~ /\AArray<(.*)>/i
+ # check to ensure the input is an array given that the attribute
+ # is documented as an array but the input is not
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
+ end
+ elsif !attributes[self.class.attribute_map[key]].nil?
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
+ end
+
+ self
+ end
+
+ # Deserializes the data based on type
+ # @param string type Data type
+ # @param string value Value to be deserialized
+ # @return [Object] Deserialized data
+ def _deserialize(type, value)
+ case type.to_sym
+ when :DateTime
+ DateTime.parse(parse_date(value))
+ when :Date
+ Date.parse(parse_date(value))
+ when :String
+ value.to_s
+ when :Integer
+ value.to_i
+ when :Float
+ value.to_f
+ when :BigDecimal
+ BigDecimal(value.to_s)
+ when :Boolean
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
+ true
+ else
+ false
+ end
+ when :Object
+ # generic object (usually a Hash), return directly
+ value
+ when /\AArray<(?.+)>\z/
+ inner_type = Regexp.last_match[:inner_type]
+ value.map { |v| _deserialize(inner_type, v) }
+ when /\AHash<(?.+?), (?.+)>\z/
+ k_type = Regexp.last_match[:k_type]
+ v_type = Regexp.last_match[:v_type]
+ {}.tap do |hash|
+ value.each do |k, v|
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
+ end
+ end
+ else # model
+ XeroRuby::Accounting.const_get(type).build_from_hash(value)
+ end
+ end
+
+ # Returns the string representation of the object
+ # @return [String] String presentation of the object
+ def to_s
+ to_hash.to_s
+ end
+
+ # to_body is an alias to to_hash (backward compatibility)
+ # @return [Hash] Returns the object in the form of hash
+ def to_body
+ to_hash
+ end
+
+ # Returns the object in the form of hash
+ # @return [Hash] Returns the object in the form of hash
+ def to_hash(downcase: false)
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ next if value.nil?
+ key = downcase ? attr : param
+ hash[key] = _to_hash(value, downcase: downcase)
+ end
+ hash
+ end
+
+ # Returns the object in the form of hash with snake_case
+ def to_attributes
+ to_hash(downcase: true)
+ end
+
+ # Outputs non-array value in the form of hash
+ # For object, use to_hash. Otherwise, just return the value
+ # @param [Object] value Any valid value
+ # @return [Hash] Returns the value in the form of hash
+ def _to_hash(value, downcase: false)
+ if value.is_a?(Array)
+ value.map do |v|
+ v.to_hash(downcase: downcase)
+ end
+ elsif value.is_a?(Hash)
+ {}.tap do |hash|
+ value.map { |k, v| hash[k] = _to_hash(v, downcase: downcase) }
+ end
+ elsif value.respond_to? :to_hash
+ value.to_hash(downcase: downcase)
+ else
+ value
+ end
+ end
+
+ def parse_date(datestring)
+ if datestring.include?('Date')
+ date_pattern = /\/Date\((-?\d+)(\+\d+)?\)\//
+ original, date, timezone = *date_pattern.match(datestring)
+ date = (date.to_i / 1000)
+ Time.at(date).utc.strftime('%Y-%m-%dT%H:%M:%S%z').to_s
+ elsif /(\d\d\d\d)-(\d\d)/.match(datestring) # handles dates w/out Days: YYYY-MM*-DD
+ Time.parse(datestring + '-01').strftime('%Y-%m-%dT%H:%M:%S').to_s
+ else # handle date 'types' for small subset of payroll API's
+ Time.parse(datestring).strftime('%Y-%m-%dT%H:%M:%S').to_s
+ end
+ end
+ end
+end
diff --git a/lib/xero-ruby/models/accounting/get_contacts_response.rb b/lib/xero-ruby/models/accounting/get_contacts_response.rb
new file mode 100644
index 00000000..c235b5ef
--- /dev/null
+++ b/lib/xero-ruby/models/accounting/get_contacts_response.rb
@@ -0,0 +1,274 @@
+=begin
+#Xero Accounting API
+
+#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+
+Contact: api@xero.com
+Generated by: https://openapi-generator.tech
+OpenAPI Generator version: 4.3.1
+
+=end
+
+require 'time'
+require 'date'
+
+module XeroRuby::Accounting
+ require 'bigdecimal'
+
+ class GetContactsResponse
+
+ attr_accessor :id
+
+
+ attr_accessor :status
+
+
+ attr_accessor :provider_name
+
+
+ attr_accessor :date_time_utc
+
+
+ attr_accessor :page_info
+
+
+ attr_accessor :contacts
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ def self.attribute_map
+ {
+ :'id' => :'Id',
+ :'status' => :'Status',
+ :'provider_name' => :'ProviderName',
+ :'date_time_utc' => :'DateTimeUTC',
+ :'page_info' => :'PageInfo',
+ :'contacts' => :'Contacts'
+ }
+ end
+
+ # Attribute type mapping.
+ def self.openapi_types
+ {
+ :'id' => :'String',
+ :'status' => :'String',
+ :'provider_name' => :'String',
+ :'date_time_utc' => :'String',
+ :'page_info' => :'PageInfo',
+ :'contacts' => :'Array'
+ }
+ end
+
+ # Initializes the object
+ # @param [Hash] attributes Model attributes in the form of hash
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `XeroRuby::Accounting::GetContactsResponse` initialize method"
+ end
+
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ fail ArgumentError, "`#{k}` is not a valid attribute in `XeroRuby::Accounting::GetContactsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
+ end
+ h[k.to_sym] = v
+ }
+
+ if attributes.key?(:'id')
+ self.id = attributes[:'id']
+ end
+
+ if attributes.key?(:'status')
+ self.status = attributes[:'status']
+ end
+
+ if attributes.key?(:'provider_name')
+ self.provider_name = attributes[:'provider_name']
+ end
+
+ if attributes.key?(:'date_time_utc')
+ self.date_time_utc = attributes[:'date_time_utc']
+ end
+
+ if attributes.key?(:'page_info')
+ self.page_info = attributes[:'page_info']
+ end
+
+ if attributes.key?(:'contacts')
+ if (value = attributes[:'contacts']).is_a?(Array)
+ self.contacts = value
+ end
+ end
+ end
+
+ # Show invalid properties with the reasons. Usually used together with valid?
+ # @return Array for valid properties with the reasons
+ def list_invalid_properties
+ invalid_properties = Array.new
+ invalid_properties
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ def valid?
+ true
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param [Object] Object to be compared
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ id == o.id &&
+ status == o.status &&
+ provider_name == o.provider_name &&
+ date_time_utc == o.date_time_utc &&
+ page_info == o.page_info &&
+ contacts == o.contacts
+ end
+
+ # @see the `==` method
+ # @param [Object] Object to be compared
+ def eql?(o)
+ self == o
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ def hash
+ [id, status, provider_name, date_time_utc, page_info, contacts].hash
+ end
+
+ # Builds the object from hash
+ # @param [Hash] attributes Model attributes in the form of hash
+ # @return [Object] Returns the model itself
+ def self.build_from_hash(attributes)
+ new.build_from_hash(attributes)
+ end
+
+ # Builds the object from hash
+ # @param [Hash] attributes Model attributes in the form of hash
+ # @return [Object] Returns the model itself
+ def build_from_hash(attributes)
+ return nil unless attributes.is_a?(Hash)
+ self.class.openapi_types.each_pair do |key, type|
+ if type =~ /\AArray<(.*)>/i
+ # check to ensure the input is an array given that the attribute
+ # is documented as an array but the input is not
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
+ end
+ elsif !attributes[self.class.attribute_map[key]].nil?
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
+ end
+
+ self
+ end
+
+ # Deserializes the data based on type
+ # @param string type Data type
+ # @param string value Value to be deserialized
+ # @return [Object] Deserialized data
+ def _deserialize(type, value)
+ case type.to_sym
+ when :DateTime
+ DateTime.parse(parse_date(value))
+ when :Date
+ Date.parse(parse_date(value))
+ when :String
+ value.to_s
+ when :Integer
+ value.to_i
+ when :Float
+ value.to_f
+ when :BigDecimal
+ BigDecimal(value.to_s)
+ when :Boolean
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
+ true
+ else
+ false
+ end
+ when :Object
+ # generic object (usually a Hash), return directly
+ value
+ when /\AArray<(?.+)>\z/
+ inner_type = Regexp.last_match[:inner_type]
+ value.map { |v| _deserialize(inner_type, v) }
+ when /\AHash<(?.+?), (?.+)>\z/
+ k_type = Regexp.last_match[:k_type]
+ v_type = Regexp.last_match[:v_type]
+ {}.tap do |hash|
+ value.each do |k, v|
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
+ end
+ end
+ else # model
+ XeroRuby::Accounting.const_get(type).build_from_hash(value)
+ end
+ end
+
+ # Returns the string representation of the object
+ # @return [String] String presentation of the object
+ def to_s
+ to_hash.to_s
+ end
+
+ # to_body is an alias to to_hash (backward compatibility)
+ # @return [Hash] Returns the object in the form of hash
+ def to_body
+ to_hash
+ end
+
+ # Returns the object in the form of hash
+ # @return [Hash] Returns the object in the form of hash
+ def to_hash(downcase: false)
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ next if value.nil?
+ key = downcase ? attr : param
+ hash[key] = _to_hash(value, downcase: downcase)
+ end
+ hash
+ end
+
+ # Returns the object in the form of hash with snake_case
+ def to_attributes
+ to_hash(downcase: true)
+ end
+
+ # Outputs non-array value in the form of hash
+ # For object, use to_hash. Otherwise, just return the value
+ # @param [Object] value Any valid value
+ # @return [Hash] Returns the value in the form of hash
+ def _to_hash(value, downcase: false)
+ if value.is_a?(Array)
+ value.map do |v|
+ v.to_hash(downcase: downcase)
+ end
+ elsif value.is_a?(Hash)
+ {}.tap do |hash|
+ value.map { |k, v| hash[k] = _to_hash(v, downcase: downcase) }
+ end
+ elsif value.respond_to? :to_hash
+ value.to_hash(downcase: downcase)
+ else
+ value
+ end
+ end
+
+ def parse_date(datestring)
+ if datestring.include?('Date')
+ date_pattern = /\/Date\((-?\d+)(\+\d+)?\)\//
+ original, date, timezone = *date_pattern.match(datestring)
+ date = (date.to_i / 1000)
+ Time.at(date).utc.strftime('%Y-%m-%dT%H:%M:%S%z').to_s
+ elsif /(\d\d\d\d)-(\d\d)/.match(datestring) # handles dates w/out Days: YYYY-MM*-DD
+ Time.parse(datestring + '-01').strftime('%Y-%m-%dT%H:%M:%S').to_s
+ else # handle date 'types' for small subset of payroll API's
+ Time.parse(datestring).strftime('%Y-%m-%dT%H:%M:%S').to_s
+ end
+ end
+ end
+end
diff --git a/lib/xero-ruby/models/accounting/get_credit_notes_response.rb b/lib/xero-ruby/models/accounting/get_credit_notes_response.rb
new file mode 100644
index 00000000..9fc01917
--- /dev/null
+++ b/lib/xero-ruby/models/accounting/get_credit_notes_response.rb
@@ -0,0 +1,274 @@
+=begin
+#Xero Accounting API
+
+#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+
+Contact: api@xero.com
+Generated by: https://openapi-generator.tech
+OpenAPI Generator version: 4.3.1
+
+=end
+
+require 'time'
+require 'date'
+
+module XeroRuby::Accounting
+ require 'bigdecimal'
+
+ class GetCreditNotesResponse
+
+ attr_accessor :id
+
+
+ attr_accessor :status
+
+
+ attr_accessor :provider_name
+
+
+ attr_accessor :date_time_utc
+
+
+ attr_accessor :page_info
+
+
+ attr_accessor :credit_notes
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ def self.attribute_map
+ {
+ :'id' => :'Id',
+ :'status' => :'Status',
+ :'provider_name' => :'ProviderName',
+ :'date_time_utc' => :'DateTimeUTC',
+ :'page_info' => :'PageInfo',
+ :'credit_notes' => :'CreditNotes'
+ }
+ end
+
+ # Attribute type mapping.
+ def self.openapi_types
+ {
+ :'id' => :'String',
+ :'status' => :'String',
+ :'provider_name' => :'String',
+ :'date_time_utc' => :'String',
+ :'page_info' => :'PageInfo',
+ :'credit_notes' => :'Array'
+ }
+ end
+
+ # Initializes the object
+ # @param [Hash] attributes Model attributes in the form of hash
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `XeroRuby::Accounting::GetCreditNotesResponse` initialize method"
+ end
+
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ fail ArgumentError, "`#{k}` is not a valid attribute in `XeroRuby::Accounting::GetCreditNotesResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
+ end
+ h[k.to_sym] = v
+ }
+
+ if attributes.key?(:'id')
+ self.id = attributes[:'id']
+ end
+
+ if attributes.key?(:'status')
+ self.status = attributes[:'status']
+ end
+
+ if attributes.key?(:'provider_name')
+ self.provider_name = attributes[:'provider_name']
+ end
+
+ if attributes.key?(:'date_time_utc')
+ self.date_time_utc = attributes[:'date_time_utc']
+ end
+
+ if attributes.key?(:'page_info')
+ self.page_info = attributes[:'page_info']
+ end
+
+ if attributes.key?(:'credit_notes')
+ if (value = attributes[:'credit_notes']).is_a?(Array)
+ self.credit_notes = value
+ end
+ end
+ end
+
+ # Show invalid properties with the reasons. Usually used together with valid?
+ # @return Array for valid properties with the reasons
+ def list_invalid_properties
+ invalid_properties = Array.new
+ invalid_properties
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ def valid?
+ true
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param [Object] Object to be compared
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ id == o.id &&
+ status == o.status &&
+ provider_name == o.provider_name &&
+ date_time_utc == o.date_time_utc &&
+ page_info == o.page_info &&
+ credit_notes == o.credit_notes
+ end
+
+ # @see the `==` method
+ # @param [Object] Object to be compared
+ def eql?(o)
+ self == o
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ def hash
+ [id, status, provider_name, date_time_utc, page_info, credit_notes].hash
+ end
+
+ # Builds the object from hash
+ # @param [Hash] attributes Model attributes in the form of hash
+ # @return [Object] Returns the model itself
+ def self.build_from_hash(attributes)
+ new.build_from_hash(attributes)
+ end
+
+ # Builds the object from hash
+ # @param [Hash] attributes Model attributes in the form of hash
+ # @return [Object] Returns the model itself
+ def build_from_hash(attributes)
+ return nil unless attributes.is_a?(Hash)
+ self.class.openapi_types.each_pair do |key, type|
+ if type =~ /\AArray<(.*)>/i
+ # check to ensure the input is an array given that the attribute
+ # is documented as an array but the input is not
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
+ end
+ elsif !attributes[self.class.attribute_map[key]].nil?
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
+ end
+
+ self
+ end
+
+ # Deserializes the data based on type
+ # @param string type Data type
+ # @param string value Value to be deserialized
+ # @return [Object] Deserialized data
+ def _deserialize(type, value)
+ case type.to_sym
+ when :DateTime
+ DateTime.parse(parse_date(value))
+ when :Date
+ Date.parse(parse_date(value))
+ when :String
+ value.to_s
+ when :Integer
+ value.to_i
+ when :Float
+ value.to_f
+ when :BigDecimal
+ BigDecimal(value.to_s)
+ when :Boolean
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
+ true
+ else
+ false
+ end
+ when :Object
+ # generic object (usually a Hash), return directly
+ value
+ when /\AArray<(?.+)>\z/
+ inner_type = Regexp.last_match[:inner_type]
+ value.map { |v| _deserialize(inner_type, v) }
+ when /\AHash<(?.+?), (?.+)>\z/
+ k_type = Regexp.last_match[:k_type]
+ v_type = Regexp.last_match[:v_type]
+ {}.tap do |hash|
+ value.each do |k, v|
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
+ end
+ end
+ else # model
+ XeroRuby::Accounting.const_get(type).build_from_hash(value)
+ end
+ end
+
+ # Returns the string representation of the object
+ # @return [String] String presentation of the object
+ def to_s
+ to_hash.to_s
+ end
+
+ # to_body is an alias to to_hash (backward compatibility)
+ # @return [Hash] Returns the object in the form of hash
+ def to_body
+ to_hash
+ end
+
+ # Returns the object in the form of hash
+ # @return [Hash] Returns the object in the form of hash
+ def to_hash(downcase: false)
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ next if value.nil?
+ key = downcase ? attr : param
+ hash[key] = _to_hash(value, downcase: downcase)
+ end
+ hash
+ end
+
+ # Returns the object in the form of hash with snake_case
+ def to_attributes
+ to_hash(downcase: true)
+ end
+
+ # Outputs non-array value in the form of hash
+ # For object, use to_hash. Otherwise, just return the value
+ # @param [Object] value Any valid value
+ # @return [Hash] Returns the value in the form of hash
+ def _to_hash(value, downcase: false)
+ if value.is_a?(Array)
+ value.map do |v|
+ v.to_hash(downcase: downcase)
+ end
+ elsif value.is_a?(Hash)
+ {}.tap do |hash|
+ value.map { |k, v| hash[k] = _to_hash(v, downcase: downcase) }
+ end
+ elsif value.respond_to? :to_hash
+ value.to_hash(downcase: downcase)
+ else
+ value
+ end
+ end
+
+ def parse_date(datestring)
+ if datestring.include?('Date')
+ date_pattern = /\/Date\((-?\d+)(\+\d+)?\)\//
+ original, date, timezone = *date_pattern.match(datestring)
+ date = (date.to_i / 1000)
+ Time.at(date).utc.strftime('%Y-%m-%dT%H:%M:%S%z').to_s
+ elsif /(\d\d\d\d)-(\d\d)/.match(datestring) # handles dates w/out Days: YYYY-MM*-DD
+ Time.parse(datestring + '-01').strftime('%Y-%m-%dT%H:%M:%S').to_s
+ else # handle date 'types' for small subset of payroll API's
+ Time.parse(datestring).strftime('%Y-%m-%dT%H:%M:%S').to_s
+ end
+ end
+ end
+end
diff --git a/lib/xero-ruby/models/accounting/get_invoices_response.rb b/lib/xero-ruby/models/accounting/get_invoices_response.rb
new file mode 100644
index 00000000..ff6afaa6
--- /dev/null
+++ b/lib/xero-ruby/models/accounting/get_invoices_response.rb
@@ -0,0 +1,274 @@
+=begin
+#Xero Accounting API
+
+#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+
+Contact: api@xero.com
+Generated by: https://openapi-generator.tech
+OpenAPI Generator version: 4.3.1
+
+=end
+
+require 'time'
+require 'date'
+
+module XeroRuby::Accounting
+ require 'bigdecimal'
+
+ class GetInvoicesResponse
+
+ attr_accessor :id
+
+
+ attr_accessor :status
+
+
+ attr_accessor :provider_name
+
+
+ attr_accessor :date_time_utc
+
+
+ attr_accessor :page_info
+
+
+ attr_accessor :invoices
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ def self.attribute_map
+ {
+ :'id' => :'Id',
+ :'status' => :'Status',
+ :'provider_name' => :'ProviderName',
+ :'date_time_utc' => :'DateTimeUTC',
+ :'page_info' => :'PageInfo',
+ :'invoices' => :'Invoices'
+ }
+ end
+
+ # Attribute type mapping.
+ def self.openapi_types
+ {
+ :'id' => :'String',
+ :'status' => :'String',
+ :'provider_name' => :'String',
+ :'date_time_utc' => :'String',
+ :'page_info' => :'PageInfo',
+ :'invoices' => :'Array'
+ }
+ end
+
+ # Initializes the object
+ # @param [Hash] attributes Model attributes in the form of hash
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `XeroRuby::Accounting::GetInvoicesResponse` initialize method"
+ end
+
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ fail ArgumentError, "`#{k}` is not a valid attribute in `XeroRuby::Accounting::GetInvoicesResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
+ end
+ h[k.to_sym] = v
+ }
+
+ if attributes.key?(:'id')
+ self.id = attributes[:'id']
+ end
+
+ if attributes.key?(:'status')
+ self.status = attributes[:'status']
+ end
+
+ if attributes.key?(:'provider_name')
+ self.provider_name = attributes[:'provider_name']
+ end
+
+ if attributes.key?(:'date_time_utc')
+ self.date_time_utc = attributes[:'date_time_utc']
+ end
+
+ if attributes.key?(:'page_info')
+ self.page_info = attributes[:'page_info']
+ end
+
+ if attributes.key?(:'invoices')
+ if (value = attributes[:'invoices']).is_a?(Array)
+ self.invoices = value
+ end
+ end
+ end
+
+ # Show invalid properties with the reasons. Usually used together with valid?
+ # @return Array for valid properties with the reasons
+ def list_invalid_properties
+ invalid_properties = Array.new
+ invalid_properties
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ def valid?
+ true
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param [Object] Object to be compared
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ id == o.id &&
+ status == o.status &&
+ provider_name == o.provider_name &&
+ date_time_utc == o.date_time_utc &&
+ page_info == o.page_info &&
+ invoices == o.invoices
+ end
+
+ # @see the `==` method
+ # @param [Object] Object to be compared
+ def eql?(o)
+ self == o
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ def hash
+ [id, status, provider_name, date_time_utc, page_info, invoices].hash
+ end
+
+ # Builds the object from hash
+ # @param [Hash] attributes Model attributes in the form of hash
+ # @return [Object] Returns the model itself
+ def self.build_from_hash(attributes)
+ new.build_from_hash(attributes)
+ end
+
+ # Builds the object from hash
+ # @param [Hash] attributes Model attributes in the form of hash
+ # @return [Object] Returns the model itself
+ def build_from_hash(attributes)
+ return nil unless attributes.is_a?(Hash)
+ self.class.openapi_types.each_pair do |key, type|
+ if type =~ /\AArray<(.*)>/i
+ # check to ensure the input is an array given that the attribute
+ # is documented as an array but the input is not
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
+ end
+ elsif !attributes[self.class.attribute_map[key]].nil?
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
+ end
+
+ self
+ end
+
+ # Deserializes the data based on type
+ # @param string type Data type
+ # @param string value Value to be deserialized
+ # @return [Object] Deserialized data
+ def _deserialize(type, value)
+ case type.to_sym
+ when :DateTime
+ DateTime.parse(parse_date(value))
+ when :Date
+ Date.parse(parse_date(value))
+ when :String
+ value.to_s
+ when :Integer
+ value.to_i
+ when :Float
+ value.to_f
+ when :BigDecimal
+ BigDecimal(value.to_s)
+ when :Boolean
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
+ true
+ else
+ false
+ end
+ when :Object
+ # generic object (usually a Hash), return directly
+ value
+ when /\AArray<(?.+)>\z/
+ inner_type = Regexp.last_match[:inner_type]
+ value.map { |v| _deserialize(inner_type, v) }
+ when /\AHash<(?.+?), (?.+)>\z/
+ k_type = Regexp.last_match[:k_type]
+ v_type = Regexp.last_match[:v_type]
+ {}.tap do |hash|
+ value.each do |k, v|
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
+ end
+ end
+ else # model
+ XeroRuby::Accounting.const_get(type).build_from_hash(value)
+ end
+ end
+
+ # Returns the string representation of the object
+ # @return [String] String presentation of the object
+ def to_s
+ to_hash.to_s
+ end
+
+ # to_body is an alias to to_hash (backward compatibility)
+ # @return [Hash] Returns the object in the form of hash
+ def to_body
+ to_hash
+ end
+
+ # Returns the object in the form of hash
+ # @return [Hash] Returns the object in the form of hash
+ def to_hash(downcase: false)
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ next if value.nil?
+ key = downcase ? attr : param
+ hash[key] = _to_hash(value, downcase: downcase)
+ end
+ hash
+ end
+
+ # Returns the object in the form of hash with snake_case
+ def to_attributes
+ to_hash(downcase: true)
+ end
+
+ # Outputs non-array value in the form of hash
+ # For object, use to_hash. Otherwise, just return the value
+ # @param [Object] value Any valid value
+ # @return [Hash] Returns the value in the form of hash
+ def _to_hash(value, downcase: false)
+ if value.is_a?(Array)
+ value.map do |v|
+ v.to_hash(downcase: downcase)
+ end
+ elsif value.is_a?(Hash)
+ {}.tap do |hash|
+ value.map { |k, v| hash[k] = _to_hash(v, downcase: downcase) }
+ end
+ elsif value.respond_to? :to_hash
+ value.to_hash(downcase: downcase)
+ else
+ value
+ end
+ end
+
+ def parse_date(datestring)
+ if datestring.include?('Date')
+ date_pattern = /\/Date\((-?\d+)(\+\d+)?\)\//
+ original, date, timezone = *date_pattern.match(datestring)
+ date = (date.to_i / 1000)
+ Time.at(date).utc.strftime('%Y-%m-%dT%H:%M:%S%z').to_s
+ elsif /(\d\d\d\d)-(\d\d)/.match(datestring) # handles dates w/out Days: YYYY-MM*-DD
+ Time.parse(datestring + '-01').strftime('%Y-%m-%dT%H:%M:%S').to_s
+ else # handle date 'types' for small subset of payroll API's
+ Time.parse(datestring).strftime('%Y-%m-%dT%H:%M:%S').to_s
+ end
+ end
+ end
+end
diff --git a/lib/xero-ruby/models/accounting/get_manual_journals_response.rb b/lib/xero-ruby/models/accounting/get_manual_journals_response.rb
new file mode 100644
index 00000000..1497a19f
--- /dev/null
+++ b/lib/xero-ruby/models/accounting/get_manual_journals_response.rb
@@ -0,0 +1,274 @@
+=begin
+#Xero Accounting API
+
+#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+
+Contact: api@xero.com
+Generated by: https://openapi-generator.tech
+OpenAPI Generator version: 4.3.1
+
+=end
+
+require 'time'
+require 'date'
+
+module XeroRuby::Accounting
+ require 'bigdecimal'
+
+ class GetManualJournalsResponse
+
+ attr_accessor :id
+
+
+ attr_accessor :status
+
+
+ attr_accessor :provider_name
+
+
+ attr_accessor :date_time_utc
+
+
+ attr_accessor :page_info
+
+
+ attr_accessor :manual_journals
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ def self.attribute_map
+ {
+ :'id' => :'Id',
+ :'status' => :'Status',
+ :'provider_name' => :'ProviderName',
+ :'date_time_utc' => :'DateTimeUTC',
+ :'page_info' => :'PageInfo',
+ :'manual_journals' => :'ManualJournals'
+ }
+ end
+
+ # Attribute type mapping.
+ def self.openapi_types
+ {
+ :'id' => :'String',
+ :'status' => :'String',
+ :'provider_name' => :'String',
+ :'date_time_utc' => :'String',
+ :'page_info' => :'PageInfo',
+ :'manual_journals' => :'Array'
+ }
+ end
+
+ # Initializes the object
+ # @param [Hash] attributes Model attributes in the form of hash
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `XeroRuby::Accounting::GetManualJournalsResponse` initialize method"
+ end
+
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ fail ArgumentError, "`#{k}` is not a valid attribute in `XeroRuby::Accounting::GetManualJournalsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
+ end
+ h[k.to_sym] = v
+ }
+
+ if attributes.key?(:'id')
+ self.id = attributes[:'id']
+ end
+
+ if attributes.key?(:'status')
+ self.status = attributes[:'status']
+ end
+
+ if attributes.key?(:'provider_name')
+ self.provider_name = attributes[:'provider_name']
+ end
+
+ if attributes.key?(:'date_time_utc')
+ self.date_time_utc = attributes[:'date_time_utc']
+ end
+
+ if attributes.key?(:'page_info')
+ self.page_info = attributes[:'page_info']
+ end
+
+ if attributes.key?(:'manual_journals')
+ if (value = attributes[:'manual_journals']).is_a?(Array)
+ self.manual_journals = value
+ end
+ end
+ end
+
+ # Show invalid properties with the reasons. Usually used together with valid?
+ # @return Array for valid properties with the reasons
+ def list_invalid_properties
+ invalid_properties = Array.new
+ invalid_properties
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ def valid?
+ true
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param [Object] Object to be compared
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ id == o.id &&
+ status == o.status &&
+ provider_name == o.provider_name &&
+ date_time_utc == o.date_time_utc &&
+ page_info == o.page_info &&
+ manual_journals == o.manual_journals
+ end
+
+ # @see the `==` method
+ # @param [Object] Object to be compared
+ def eql?(o)
+ self == o
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ def hash
+ [id, status, provider_name, date_time_utc, page_info, manual_journals].hash
+ end
+
+ # Builds the object from hash
+ # @param [Hash] attributes Model attributes in the form of hash
+ # @return [Object] Returns the model itself
+ def self.build_from_hash(attributes)
+ new.build_from_hash(attributes)
+ end
+
+ # Builds the object from hash
+ # @param [Hash] attributes Model attributes in the form of hash
+ # @return [Object] Returns the model itself
+ def build_from_hash(attributes)
+ return nil unless attributes.is_a?(Hash)
+ self.class.openapi_types.each_pair do |key, type|
+ if type =~ /\AArray<(.*)>/i
+ # check to ensure the input is an array given that the attribute
+ # is documented as an array but the input is not
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
+ end
+ elsif !attributes[self.class.attribute_map[key]].nil?
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
+ end
+
+ self
+ end
+
+ # Deserializes the data based on type
+ # @param string type Data type
+ # @param string value Value to be deserialized
+ # @return [Object] Deserialized data
+ def _deserialize(type, value)
+ case type.to_sym
+ when :DateTime
+ DateTime.parse(parse_date(value))
+ when :Date
+ Date.parse(parse_date(value))
+ when :String
+ value.to_s
+ when :Integer
+ value.to_i
+ when :Float
+ value.to_f
+ when :BigDecimal
+ BigDecimal(value.to_s)
+ when :Boolean
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
+ true
+ else
+ false
+ end
+ when :Object
+ # generic object (usually a Hash), return directly
+ value
+ when /\AArray<(?.+)>\z/
+ inner_type = Regexp.last_match[:inner_type]
+ value.map { |v| _deserialize(inner_type, v) }
+ when /\AHash<(?.+?), (?.+)>\z/
+ k_type = Regexp.last_match[:k_type]
+ v_type = Regexp.last_match[:v_type]
+ {}.tap do |hash|
+ value.each do |k, v|
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
+ end
+ end
+ else # model
+ XeroRuby::Accounting.const_get(type).build_from_hash(value)
+ end
+ end
+
+ # Returns the string representation of the object
+ # @return [String] String presentation of the object
+ def to_s
+ to_hash.to_s
+ end
+
+ # to_body is an alias to to_hash (backward compatibility)
+ # @return [Hash] Returns the object in the form of hash
+ def to_body
+ to_hash
+ end
+
+ # Returns the object in the form of hash
+ # @return [Hash] Returns the object in the form of hash
+ def to_hash(downcase: false)
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ next if value.nil?
+ key = downcase ? attr : param
+ hash[key] = _to_hash(value, downcase: downcase)
+ end
+ hash
+ end
+
+ # Returns the object in the form of hash with snake_case
+ def to_attributes
+ to_hash(downcase: true)
+ end
+
+ # Outputs non-array value in the form of hash
+ # For object, use to_hash. Otherwise, just return the value
+ # @param [Object] value Any valid value
+ # @return [Hash] Returns the value in the form of hash
+ def _to_hash(value, downcase: false)
+ if value.is_a?(Array)
+ value.map do |v|
+ v.to_hash(downcase: downcase)
+ end
+ elsif value.is_a?(Hash)
+ {}.tap do |hash|
+ value.map { |k, v| hash[k] = _to_hash(v, downcase: downcase) }
+ end
+ elsif value.respond_to? :to_hash
+ value.to_hash(downcase: downcase)
+ else
+ value
+ end
+ end
+
+ def parse_date(datestring)
+ if datestring.include?('Date')
+ date_pattern = /\/Date\((-?\d+)(\+\d+)?\)\//
+ original, date, timezone = *date_pattern.match(datestring)
+ date = (date.to_i / 1000)
+ Time.at(date).utc.strftime('%Y-%m-%dT%H:%M:%S%z').to_s
+ elsif /(\d\d\d\d)-(\d\d)/.match(datestring) # handles dates w/out Days: YYYY-MM*-DD
+ Time.parse(datestring + '-01').strftime('%Y-%m-%dT%H:%M:%S').to_s
+ else # handle date 'types' for small subset of payroll API's
+ Time.parse(datestring).strftime('%Y-%m-%dT%H:%M:%S').to_s
+ end
+ end
+ end
+end
diff --git a/lib/xero-ruby/models/accounting/get_overpayments_response.rb b/lib/xero-ruby/models/accounting/get_overpayments_response.rb
new file mode 100644
index 00000000..2dfc4c72
--- /dev/null
+++ b/lib/xero-ruby/models/accounting/get_overpayments_response.rb
@@ -0,0 +1,274 @@
+=begin
+#Xero Accounting API
+
+#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+
+Contact: api@xero.com
+Generated by: https://openapi-generator.tech
+OpenAPI Generator version: 4.3.1
+
+=end
+
+require 'time'
+require 'date'
+
+module XeroRuby::Accounting
+ require 'bigdecimal'
+
+ class GetOverpaymentsResponse
+
+ attr_accessor :id
+
+
+ attr_accessor :status
+
+
+ attr_accessor :provider_name
+
+
+ attr_accessor :date_time_utc
+
+
+ attr_accessor :page_info
+
+
+ attr_accessor :overpayments
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ def self.attribute_map
+ {
+ :'id' => :'Id',
+ :'status' => :'Status',
+ :'provider_name' => :'ProviderName',
+ :'date_time_utc' => :'DateTimeUTC',
+ :'page_info' => :'PageInfo',
+ :'overpayments' => :'Overpayments'
+ }
+ end
+
+ # Attribute type mapping.
+ def self.openapi_types
+ {
+ :'id' => :'String',
+ :'status' => :'String',
+ :'provider_name' => :'String',
+ :'date_time_utc' => :'String',
+ :'page_info' => :'PageInfo',
+ :'overpayments' => :'Array'
+ }
+ end
+
+ # Initializes the object
+ # @param [Hash] attributes Model attributes in the form of hash
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `XeroRuby::Accounting::GetOverpaymentsResponse` initialize method"
+ end
+
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ fail ArgumentError, "`#{k}` is not a valid attribute in `XeroRuby::Accounting::GetOverpaymentsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
+ end
+ h[k.to_sym] = v
+ }
+
+ if attributes.key?(:'id')
+ self.id = attributes[:'id']
+ end
+
+ if attributes.key?(:'status')
+ self.status = attributes[:'status']
+ end
+
+ if attributes.key?(:'provider_name')
+ self.provider_name = attributes[:'provider_name']
+ end
+
+ if attributes.key?(:'date_time_utc')
+ self.date_time_utc = attributes[:'date_time_utc']
+ end
+
+ if attributes.key?(:'page_info')
+ self.page_info = attributes[:'page_info']
+ end
+
+ if attributes.key?(:'overpayments')
+ if (value = attributes[:'overpayments']).is_a?(Array)
+ self.overpayments = value
+ end
+ end
+ end
+
+ # Show invalid properties with the reasons. Usually used together with valid?
+ # @return Array for valid properties with the reasons
+ def list_invalid_properties
+ invalid_properties = Array.new
+ invalid_properties
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ def valid?
+ true
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param [Object] Object to be compared
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ id == o.id &&
+ status == o.status &&
+ provider_name == o.provider_name &&
+ date_time_utc == o.date_time_utc &&
+ page_info == o.page_info &&
+ overpayments == o.overpayments
+ end
+
+ # @see the `==` method
+ # @param [Object] Object to be compared
+ def eql?(o)
+ self == o
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ def hash
+ [id, status, provider_name, date_time_utc, page_info, overpayments].hash
+ end
+
+ # Builds the object from hash
+ # @param [Hash] attributes Model attributes in the form of hash
+ # @return [Object] Returns the model itself
+ def self.build_from_hash(attributes)
+ new.build_from_hash(attributes)
+ end
+
+ # Builds the object from hash
+ # @param [Hash] attributes Model attributes in the form of hash
+ # @return [Object] Returns the model itself
+ def build_from_hash(attributes)
+ return nil unless attributes.is_a?(Hash)
+ self.class.openapi_types.each_pair do |key, type|
+ if type =~ /\AArray<(.*)>/i
+ # check to ensure the input is an array given that the attribute
+ # is documented as an array but the input is not
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
+ end
+ elsif !attributes[self.class.attribute_map[key]].nil?
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
+ end
+
+ self
+ end
+
+ # Deserializes the data based on type
+ # @param string type Data type
+ # @param string value Value to be deserialized
+ # @return [Object] Deserialized data
+ def _deserialize(type, value)
+ case type.to_sym
+ when :DateTime
+ DateTime.parse(parse_date(value))
+ when :Date
+ Date.parse(parse_date(value))
+ when :String
+ value.to_s
+ when :Integer
+ value.to_i
+ when :Float
+ value.to_f
+ when :BigDecimal
+ BigDecimal(value.to_s)
+ when :Boolean
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
+ true
+ else
+ false
+ end
+ when :Object
+ # generic object (usually a Hash), return directly
+ value
+ when /\AArray<(?.+)>\z/
+ inner_type = Regexp.last_match[:inner_type]
+ value.map { |v| _deserialize(inner_type, v) }
+ when /\AHash<(?.+?), (?.+)>\z/
+ k_type = Regexp.last_match[:k_type]
+ v_type = Regexp.last_match[:v_type]
+ {}.tap do |hash|
+ value.each do |k, v|
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
+ end
+ end
+ else # model
+ XeroRuby::Accounting.const_get(type).build_from_hash(value)
+ end
+ end
+
+ # Returns the string representation of the object
+ # @return [String] String presentation of the object
+ def to_s
+ to_hash.to_s
+ end
+
+ # to_body is an alias to to_hash (backward compatibility)
+ # @return [Hash] Returns the object in the form of hash
+ def to_body
+ to_hash
+ end
+
+ # Returns the object in the form of hash
+ # @return [Hash] Returns the object in the form of hash
+ def to_hash(downcase: false)
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ next if value.nil?
+ key = downcase ? attr : param
+ hash[key] = _to_hash(value, downcase: downcase)
+ end
+ hash
+ end
+
+ # Returns the object in the form of hash with snake_case
+ def to_attributes
+ to_hash(downcase: true)
+ end
+
+ # Outputs non-array value in the form of hash
+ # For object, use to_hash. Otherwise, just return the value
+ # @param [Object] value Any valid value
+ # @return [Hash] Returns the value in the form of hash
+ def _to_hash(value, downcase: false)
+ if value.is_a?(Array)
+ value.map do |v|
+ v.to_hash(downcase: downcase)
+ end
+ elsif value.is_a?(Hash)
+ {}.tap do |hash|
+ value.map { |k, v| hash[k] = _to_hash(v, downcase: downcase) }
+ end
+ elsif value.respond_to? :to_hash
+ value.to_hash(downcase: downcase)
+ else
+ value
+ end
+ end
+
+ def parse_date(datestring)
+ if datestring.include?('Date')
+ date_pattern = /\/Date\((-?\d+)(\+\d+)?\)\//
+ original, date, timezone = *date_pattern.match(datestring)
+ date = (date.to_i / 1000)
+ Time.at(date).utc.strftime('%Y-%m-%dT%H:%M:%S%z').to_s
+ elsif /(\d\d\d\d)-(\d\d)/.match(datestring) # handles dates w/out Days: YYYY-MM*-DD
+ Time.parse(datestring + '-01').strftime('%Y-%m-%dT%H:%M:%S').to_s
+ else # handle date 'types' for small subset of payroll API's
+ Time.parse(datestring).strftime('%Y-%m-%dT%H:%M:%S').to_s
+ end
+ end
+ end
+end
diff --git a/lib/xero-ruby/models/accounting/get_payments_response.rb b/lib/xero-ruby/models/accounting/get_payments_response.rb
new file mode 100644
index 00000000..49d6968b
--- /dev/null
+++ b/lib/xero-ruby/models/accounting/get_payments_response.rb
@@ -0,0 +1,274 @@
+=begin
+#Xero Accounting API
+
+#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+
+Contact: api@xero.com
+Generated by: https://openapi-generator.tech
+OpenAPI Generator version: 4.3.1
+
+=end
+
+require 'time'
+require 'date'
+
+module XeroRuby::Accounting
+ require 'bigdecimal'
+
+ class GetPaymentsResponse
+
+ attr_accessor :id
+
+
+ attr_accessor :status
+
+
+ attr_accessor :provider_name
+
+
+ attr_accessor :date_time_utc
+
+
+ attr_accessor :page_info
+
+
+ attr_accessor :payments
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ def self.attribute_map
+ {
+ :'id' => :'Id',
+ :'status' => :'Status',
+ :'provider_name' => :'ProviderName',
+ :'date_time_utc' => :'DateTimeUTC',
+ :'page_info' => :'PageInfo',
+ :'payments' => :'Payments'
+ }
+ end
+
+ # Attribute type mapping.
+ def self.openapi_types
+ {
+ :'id' => :'String',
+ :'status' => :'String',
+ :'provider_name' => :'String',
+ :'date_time_utc' => :'String',
+ :'page_info' => :'PageInfo',
+ :'payments' => :'Array'
+ }
+ end
+
+ # Initializes the object
+ # @param [Hash] attributes Model attributes in the form of hash
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `XeroRuby::Accounting::GetPaymentsResponse` initialize method"
+ end
+
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ fail ArgumentError, "`#{k}` is not a valid attribute in `XeroRuby::Accounting::GetPaymentsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
+ end
+ h[k.to_sym] = v
+ }
+
+ if attributes.key?(:'id')
+ self.id = attributes[:'id']
+ end
+
+ if attributes.key?(:'status')
+ self.status = attributes[:'status']
+ end
+
+ if attributes.key?(:'provider_name')
+ self.provider_name = attributes[:'provider_name']
+ end
+
+ if attributes.key?(:'date_time_utc')
+ self.date_time_utc = attributes[:'date_time_utc']
+ end
+
+ if attributes.key?(:'page_info')
+ self.page_info = attributes[:'page_info']
+ end
+
+ if attributes.key?(:'payments')
+ if (value = attributes[:'payments']).is_a?(Array)
+ self.payments = value
+ end
+ end
+ end
+
+ # Show invalid properties with the reasons. Usually used together with valid?
+ # @return Array for valid properties with the reasons
+ def list_invalid_properties
+ invalid_properties = Array.new
+ invalid_properties
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ def valid?
+ true
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param [Object] Object to be compared
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ id == o.id &&
+ status == o.status &&
+ provider_name == o.provider_name &&
+ date_time_utc == o.date_time_utc &&
+ page_info == o.page_info &&
+ payments == o.payments
+ end
+
+ # @see the `==` method
+ # @param [Object] Object to be compared
+ def eql?(o)
+ self == o
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ def hash
+ [id, status, provider_name, date_time_utc, page_info, payments].hash
+ end
+
+ # Builds the object from hash
+ # @param [Hash] attributes Model attributes in the form of hash
+ # @return [Object] Returns the model itself
+ def self.build_from_hash(attributes)
+ new.build_from_hash(attributes)
+ end
+
+ # Builds the object from hash
+ # @param [Hash] attributes Model attributes in the form of hash
+ # @return [Object] Returns the model itself
+ def build_from_hash(attributes)
+ return nil unless attributes.is_a?(Hash)
+ self.class.openapi_types.each_pair do |key, type|
+ if type =~ /\AArray<(.*)>/i
+ # check to ensure the input is an array given that the attribute
+ # is documented as an array but the input is not
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
+ end
+ elsif !attributes[self.class.attribute_map[key]].nil?
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
+ end
+
+ self
+ end
+
+ # Deserializes the data based on type
+ # @param string type Data type
+ # @param string value Value to be deserialized
+ # @return [Object] Deserialized data
+ def _deserialize(type, value)
+ case type.to_sym
+ when :DateTime
+ DateTime.parse(parse_date(value))
+ when :Date
+ Date.parse(parse_date(value))
+ when :String
+ value.to_s
+ when :Integer
+ value.to_i
+ when :Float
+ value.to_f
+ when :BigDecimal
+ BigDecimal(value.to_s)
+ when :Boolean
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
+ true
+ else
+ false
+ end
+ when :Object
+ # generic object (usually a Hash), return directly
+ value
+ when /\AArray<(?.+)>\z/
+ inner_type = Regexp.last_match[:inner_type]
+ value.map { |v| _deserialize(inner_type, v) }
+ when /\AHash<(?.+?), (?.+)>\z/
+ k_type = Regexp.last_match[:k_type]
+ v_type = Regexp.last_match[:v_type]
+ {}.tap do |hash|
+ value.each do |k, v|
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
+ end
+ end
+ else # model
+ XeroRuby::Accounting.const_get(type).build_from_hash(value)
+ end
+ end
+
+ # Returns the string representation of the object
+ # @return [String] String presentation of the object
+ def to_s
+ to_hash.to_s
+ end
+
+ # to_body is an alias to to_hash (backward compatibility)
+ # @return [Hash] Returns the object in the form of hash
+ def to_body
+ to_hash
+ end
+
+ # Returns the object in the form of hash
+ # @return [Hash] Returns the object in the form of hash
+ def to_hash(downcase: false)
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ next if value.nil?
+ key = downcase ? attr : param
+ hash[key] = _to_hash(value, downcase: downcase)
+ end
+ hash
+ end
+
+ # Returns the object in the form of hash with snake_case
+ def to_attributes
+ to_hash(downcase: true)
+ end
+
+ # Outputs non-array value in the form of hash
+ # For object, use to_hash. Otherwise, just return the value
+ # @param [Object] value Any valid value
+ # @return [Hash] Returns the value in the form of hash
+ def _to_hash(value, downcase: false)
+ if value.is_a?(Array)
+ value.map do |v|
+ v.to_hash(downcase: downcase)
+ end
+ elsif value.is_a?(Hash)
+ {}.tap do |hash|
+ value.map { |k, v| hash[k] = _to_hash(v, downcase: downcase) }
+ end
+ elsif value.respond_to? :to_hash
+ value.to_hash(downcase: downcase)
+ else
+ value
+ end
+ end
+
+ def parse_date(datestring)
+ if datestring.include?('Date')
+ date_pattern = /\/Date\((-?\d+)(\+\d+)?\)\//
+ original, date, timezone = *date_pattern.match(datestring)
+ date = (date.to_i / 1000)
+ Time.at(date).utc.strftime('%Y-%m-%dT%H:%M:%S%z').to_s
+ elsif /(\d\d\d\d)-(\d\d)/.match(datestring) # handles dates w/out Days: YYYY-MM*-DD
+ Time.parse(datestring + '-01').strftime('%Y-%m-%dT%H:%M:%S').to_s
+ else # handle date 'types' for small subset of payroll API's
+ Time.parse(datestring).strftime('%Y-%m-%dT%H:%M:%S').to_s
+ end
+ end
+ end
+end
diff --git a/lib/xero-ruby/models/accounting/get_prepayments_response.rb b/lib/xero-ruby/models/accounting/get_prepayments_response.rb
new file mode 100644
index 00000000..5e9f80af
--- /dev/null
+++ b/lib/xero-ruby/models/accounting/get_prepayments_response.rb
@@ -0,0 +1,274 @@
+=begin
+#Xero Accounting API
+
+#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+
+Contact: api@xero.com
+Generated by: https://openapi-generator.tech
+OpenAPI Generator version: 4.3.1
+
+=end
+
+require 'time'
+require 'date'
+
+module XeroRuby::Accounting
+ require 'bigdecimal'
+
+ class GetPrepaymentsResponse
+
+ attr_accessor :id
+
+
+ attr_accessor :status
+
+
+ attr_accessor :provider_name
+
+
+ attr_accessor :date_time_utc
+
+
+ attr_accessor :page_info
+
+
+ attr_accessor :prepayments
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ def self.attribute_map
+ {
+ :'id' => :'Id',
+ :'status' => :'Status',
+ :'provider_name' => :'ProviderName',
+ :'date_time_utc' => :'DateTimeUTC',
+ :'page_info' => :'PageInfo',
+ :'prepayments' => :'Prepayments'
+ }
+ end
+
+ # Attribute type mapping.
+ def self.openapi_types
+ {
+ :'id' => :'String',
+ :'status' => :'String',
+ :'provider_name' => :'String',
+ :'date_time_utc' => :'String',
+ :'page_info' => :'PageInfo',
+ :'prepayments' => :'Array'
+ }
+ end
+
+ # Initializes the object
+ # @param [Hash] attributes Model attributes in the form of hash
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `XeroRuby::Accounting::GetPrepaymentsResponse` initialize method"
+ end
+
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ fail ArgumentError, "`#{k}` is not a valid attribute in `XeroRuby::Accounting::GetPrepaymentsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
+ end
+ h[k.to_sym] = v
+ }
+
+ if attributes.key?(:'id')
+ self.id = attributes[:'id']
+ end
+
+ if attributes.key?(:'status')
+ self.status = attributes[:'status']
+ end
+
+ if attributes.key?(:'provider_name')
+ self.provider_name = attributes[:'provider_name']
+ end
+
+ if attributes.key?(:'date_time_utc')
+ self.date_time_utc = attributes[:'date_time_utc']
+ end
+
+ if attributes.key?(:'page_info')
+ self.page_info = attributes[:'page_info']
+ end
+
+ if attributes.key?(:'prepayments')
+ if (value = attributes[:'prepayments']).is_a?(Array)
+ self.prepayments = value
+ end
+ end
+ end
+
+ # Show invalid properties with the reasons. Usually used together with valid?
+ # @return Array for valid properties with the reasons
+ def list_invalid_properties
+ invalid_properties = Array.new
+ invalid_properties
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ def valid?
+ true
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param [Object] Object to be compared
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ id == o.id &&
+ status == o.status &&
+ provider_name == o.provider_name &&
+ date_time_utc == o.date_time_utc &&
+ page_info == o.page_info &&
+ prepayments == o.prepayments
+ end
+
+ # @see the `==` method
+ # @param [Object] Object to be compared
+ def eql?(o)
+ self == o
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ def hash
+ [id, status, provider_name, date_time_utc, page_info, prepayments].hash
+ end
+
+ # Builds the object from hash
+ # @param [Hash] attributes Model attributes in the form of hash
+ # @return [Object] Returns the model itself
+ def self.build_from_hash(attributes)
+ new.build_from_hash(attributes)
+ end
+
+ # Builds the object from hash
+ # @param [Hash] attributes Model attributes in the form of hash
+ # @return [Object] Returns the model itself
+ def build_from_hash(attributes)
+ return nil unless attributes.is_a?(Hash)
+ self.class.openapi_types.each_pair do |key, type|
+ if type =~ /\AArray<(.*)>/i
+ # check to ensure the input is an array given that the attribute
+ # is documented as an array but the input is not
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
+ end
+ elsif !attributes[self.class.attribute_map[key]].nil?
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
+ end
+
+ self
+ end
+
+ # Deserializes the data based on type
+ # @param string type Data type
+ # @param string value Value to be deserialized
+ # @return [Object] Deserialized data
+ def _deserialize(type, value)
+ case type.to_sym
+ when :DateTime
+ DateTime.parse(parse_date(value))
+ when :Date
+ Date.parse(parse_date(value))
+ when :String
+ value.to_s
+ when :Integer
+ value.to_i
+ when :Float
+ value.to_f
+ when :BigDecimal
+ BigDecimal(value.to_s)
+ when :Boolean
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
+ true
+ else
+ false
+ end
+ when :Object
+ # generic object (usually a Hash), return directly
+ value
+ when /\AArray<(?.+)>\z/
+ inner_type = Regexp.last_match[:inner_type]
+ value.map { |v| _deserialize(inner_type, v) }
+ when /\AHash<(?.+?), (?.+)>\z/
+ k_type = Regexp.last_match[:k_type]
+ v_type = Regexp.last_match[:v_type]
+ {}.tap do |hash|
+ value.each do |k, v|
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
+ end
+ end
+ else # model
+ XeroRuby::Accounting.const_get(type).build_from_hash(value)
+ end
+ end
+
+ # Returns the string representation of the object
+ # @return [String] String presentation of the object
+ def to_s
+ to_hash.to_s
+ end
+
+ # to_body is an alias to to_hash (backward compatibility)
+ # @return [Hash] Returns the object in the form of hash
+ def to_body
+ to_hash
+ end
+
+ # Returns the object in the form of hash
+ # @return [Hash] Returns the object in the form of hash
+ def to_hash(downcase: false)
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ next if value.nil?
+ key = downcase ? attr : param
+ hash[key] = _to_hash(value, downcase: downcase)
+ end
+ hash
+ end
+
+ # Returns the object in the form of hash with snake_case
+ def to_attributes
+ to_hash(downcase: true)
+ end
+
+ # Outputs non-array value in the form of hash
+ # For object, use to_hash. Otherwise, just return the value
+ # @param [Object] value Any valid value
+ # @return [Hash] Returns the value in the form of hash
+ def _to_hash(value, downcase: false)
+ if value.is_a?(Array)
+ value.map do |v|
+ v.to_hash(downcase: downcase)
+ end
+ elsif value.is_a?(Hash)
+ {}.tap do |hash|
+ value.map { |k, v| hash[k] = _to_hash(v, downcase: downcase) }
+ end
+ elsif value.respond_to? :to_hash
+ value.to_hash(downcase: downcase)
+ else
+ value
+ end
+ end
+
+ def parse_date(datestring)
+ if datestring.include?('Date')
+ date_pattern = /\/Date\((-?\d+)(\+\d+)?\)\//
+ original, date, timezone = *date_pattern.match(datestring)
+ date = (date.to_i / 1000)
+ Time.at(date).utc.strftime('%Y-%m-%dT%H:%M:%S%z').to_s
+ elsif /(\d\d\d\d)-(\d\d)/.match(datestring) # handles dates w/out Days: YYYY-MM*-DD
+ Time.parse(datestring + '-01').strftime('%Y-%m-%dT%H:%M:%S').to_s
+ else # handle date 'types' for small subset of payroll API's
+ Time.parse(datestring).strftime('%Y-%m-%dT%H:%M:%S').to_s
+ end
+ end
+ end
+end
diff --git a/lib/xero-ruby/models/accounting/get_purchase_orders_response.rb b/lib/xero-ruby/models/accounting/get_purchase_orders_response.rb
new file mode 100644
index 00000000..4d9240ff
--- /dev/null
+++ b/lib/xero-ruby/models/accounting/get_purchase_orders_response.rb
@@ -0,0 +1,274 @@
+=begin
+#Xero Accounting API
+
+#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+
+Contact: api@xero.com
+Generated by: https://openapi-generator.tech
+OpenAPI Generator version: 4.3.1
+
+=end
+
+require 'time'
+require 'date'
+
+module XeroRuby::Accounting
+ require 'bigdecimal'
+
+ class GetPurchaseOrdersResponse
+
+ attr_accessor :id
+
+
+ attr_accessor :status
+
+
+ attr_accessor :provider_name
+
+
+ attr_accessor :date_time_utc
+
+
+ attr_accessor :page_info
+
+
+ attr_accessor :purchase_orders
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ def self.attribute_map
+ {
+ :'id' => :'Id',
+ :'status' => :'Status',
+ :'provider_name' => :'ProviderName',
+ :'date_time_utc' => :'DateTimeUTC',
+ :'page_info' => :'PageInfo',
+ :'purchase_orders' => :'PurchaseOrders'
+ }
+ end
+
+ # Attribute type mapping.
+ def self.openapi_types
+ {
+ :'id' => :'String',
+ :'status' => :'String',
+ :'provider_name' => :'String',
+ :'date_time_utc' => :'String',
+ :'page_info' => :'PageInfo',
+ :'purchase_orders' => :'Array'
+ }
+ end
+
+ # Initializes the object
+ # @param [Hash] attributes Model attributes in the form of hash
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `XeroRuby::Accounting::GetPurchaseOrdersResponse` initialize method"
+ end
+
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ fail ArgumentError, "`#{k}` is not a valid attribute in `XeroRuby::Accounting::GetPurchaseOrdersResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
+ end
+ h[k.to_sym] = v
+ }
+
+ if attributes.key?(:'id')
+ self.id = attributes[:'id']
+ end
+
+ if attributes.key?(:'status')
+ self.status = attributes[:'status']
+ end
+
+ if attributes.key?(:'provider_name')
+ self.provider_name = attributes[:'provider_name']
+ end
+
+ if attributes.key?(:'date_time_utc')
+ self.date_time_utc = attributes[:'date_time_utc']
+ end
+
+ if attributes.key?(:'page_info')
+ self.page_info = attributes[:'page_info']
+ end
+
+ if attributes.key?(:'purchase_orders')
+ if (value = attributes[:'purchase_orders']).is_a?(Array)
+ self.purchase_orders = value
+ end
+ end
+ end
+
+ # Show invalid properties with the reasons. Usually used together with valid?
+ # @return Array for valid properties with the reasons
+ def list_invalid_properties
+ invalid_properties = Array.new
+ invalid_properties
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ def valid?
+ true
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param [Object] Object to be compared
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ id == o.id &&
+ status == o.status &&
+ provider_name == o.provider_name &&
+ date_time_utc == o.date_time_utc &&
+ page_info == o.page_info &&
+ purchase_orders == o.purchase_orders
+ end
+
+ # @see the `==` method
+ # @param [Object] Object to be compared
+ def eql?(o)
+ self == o
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ def hash
+ [id, status, provider_name, date_time_utc, page_info, purchase_orders].hash
+ end
+
+ # Builds the object from hash
+ # @param [Hash] attributes Model attributes in the form of hash
+ # @return [Object] Returns the model itself
+ def self.build_from_hash(attributes)
+ new.build_from_hash(attributes)
+ end
+
+ # Builds the object from hash
+ # @param [Hash] attributes Model attributes in the form of hash
+ # @return [Object] Returns the model itself
+ def build_from_hash(attributes)
+ return nil unless attributes.is_a?(Hash)
+ self.class.openapi_types.each_pair do |key, type|
+ if type =~ /\AArray<(.*)>/i
+ # check to ensure the input is an array given that the attribute
+ # is documented as an array but the input is not
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
+ end
+ elsif !attributes[self.class.attribute_map[key]].nil?
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
+ end
+
+ self
+ end
+
+ # Deserializes the data based on type
+ # @param string type Data type
+ # @param string value Value to be deserialized
+ # @return [Object] Deserialized data
+ def _deserialize(type, value)
+ case type.to_sym
+ when :DateTime
+ DateTime.parse(parse_date(value))
+ when :Date
+ Date.parse(parse_date(value))
+ when :String
+ value.to_s
+ when :Integer
+ value.to_i
+ when :Float
+ value.to_f
+ when :BigDecimal
+ BigDecimal(value.to_s)
+ when :Boolean
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
+ true
+ else
+ false
+ end
+ when :Object
+ # generic object (usually a Hash), return directly
+ value
+ when /\AArray<(?.+)>\z/
+ inner_type = Regexp.last_match[:inner_type]
+ value.map { |v| _deserialize(inner_type, v) }
+ when /\AHash<(?.+?), (?.+)>\z/
+ k_type = Regexp.last_match[:k_type]
+ v_type = Regexp.last_match[:v_type]
+ {}.tap do |hash|
+ value.each do |k, v|
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
+ end
+ end
+ else # model
+ XeroRuby::Accounting.const_get(type).build_from_hash(value)
+ end
+ end
+
+ # Returns the string representation of the object
+ # @return [String] String presentation of the object
+ def to_s
+ to_hash.to_s
+ end
+
+ # to_body is an alias to to_hash (backward compatibility)
+ # @return [Hash] Returns the object in the form of hash
+ def to_body
+ to_hash
+ end
+
+ # Returns the object in the form of hash
+ # @return [Hash] Returns the object in the form of hash
+ def to_hash(downcase: false)
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ next if value.nil?
+ key = downcase ? attr : param
+ hash[key] = _to_hash(value, downcase: downcase)
+ end
+ hash
+ end
+
+ # Returns the object in the form of hash with snake_case
+ def to_attributes
+ to_hash(downcase: true)
+ end
+
+ # Outputs non-array value in the form of hash
+ # For object, use to_hash. Otherwise, just return the value
+ # @param [Object] value Any valid value
+ # @return [Hash] Returns the value in the form of hash
+ def _to_hash(value, downcase: false)
+ if value.is_a?(Array)
+ value.map do |v|
+ v.to_hash(downcase: downcase)
+ end
+ elsif value.is_a?(Hash)
+ {}.tap do |hash|
+ value.map { |k, v| hash[k] = _to_hash(v, downcase: downcase) }
+ end
+ elsif value.respond_to? :to_hash
+ value.to_hash(downcase: downcase)
+ else
+ value
+ end
+ end
+
+ def parse_date(datestring)
+ if datestring.include?('Date')
+ date_pattern = /\/Date\((-?\d+)(\+\d+)?\)\//
+ original, date, timezone = *date_pattern.match(datestring)
+ date = (date.to_i / 1000)
+ Time.at(date).utc.strftime('%Y-%m-%dT%H:%M:%S%z').to_s
+ elsif /(\d\d\d\d)-(\d\d)/.match(datestring) # handles dates w/out Days: YYYY-MM*-DD
+ Time.parse(datestring + '-01').strftime('%Y-%m-%dT%H:%M:%S').to_s
+ else # handle date 'types' for small subset of payroll API's
+ Time.parse(datestring).strftime('%Y-%m-%dT%H:%M:%S').to_s
+ end
+ end
+ end
+end
diff --git a/lib/xero-ruby/models/accounting/page_info.rb b/lib/xero-ruby/models/accounting/page_info.rb
new file mode 100644
index 00000000..e1e753ec
--- /dev/null
+++ b/lib/xero-ruby/models/accounting/page_info.rb
@@ -0,0 +1,253 @@
+=begin
+#Xero Accounting API
+
+#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+
+Contact: api@xero.com
+Generated by: https://openapi-generator.tech
+OpenAPI Generator version: 4.3.1
+
+=end
+
+require 'time'
+require 'date'
+
+module XeroRuby::Accounting
+ # Pagination information
+ require 'bigdecimal'
+
+ class PageInfo
+
+ attr_accessor :page
+
+
+ attr_accessor :page_size
+
+
+ attr_accessor :total_pages
+
+
+ attr_accessor :total_rows
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ def self.attribute_map
+ {
+ :'page' => :'Page',
+ :'page_size' => :'PageSize',
+ :'total_pages' => :'TotalPages',
+ :'total_rows' => :'TotalRows'
+ }
+ end
+
+ # Attribute type mapping.
+ def self.openapi_types
+ {
+ :'page' => :'Integer',
+ :'page_size' => :'Integer',
+ :'total_pages' => :'Integer',
+ :'total_rows' => :'Integer'
+ }
+ end
+
+ # Initializes the object
+ # @param [Hash] attributes Model attributes in the form of hash
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `XeroRuby::Accounting::PageInfo` initialize method"
+ end
+
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ fail ArgumentError, "`#{k}` is not a valid attribute in `XeroRuby::Accounting::PageInfo`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
+ end
+ h[k.to_sym] = v
+ }
+
+ if attributes.key?(:'page')
+ self.page = attributes[:'page']
+ end
+
+ if attributes.key?(:'page_size')
+ self.page_size = attributes[:'page_size']
+ end
+
+ if attributes.key?(:'total_pages')
+ self.total_pages = attributes[:'total_pages']
+ end
+
+ if attributes.key?(:'total_rows')
+ self.total_rows = attributes[:'total_rows']
+ end
+ end
+
+ # Show invalid properties with the reasons. Usually used together with valid?
+ # @return Array for valid properties with the reasons
+ def list_invalid_properties
+ invalid_properties = Array.new
+ invalid_properties
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ def valid?
+ true
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param [Object] Object to be compared
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ page == o.page &&
+ page_size == o.page_size &&
+ total_pages == o.total_pages &&
+ total_rows == o.total_rows
+ end
+
+ # @see the `==` method
+ # @param [Object] Object to be compared
+ def eql?(o)
+ self == o
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ def hash
+ [page, page_size, total_pages, total_rows].hash
+ end
+
+ # Builds the object from hash
+ # @param [Hash] attributes Model attributes in the form of hash
+ # @return [Object] Returns the model itself
+ def self.build_from_hash(attributes)
+ new.build_from_hash(attributes)
+ end
+
+ # Builds the object from hash
+ # @param [Hash] attributes Model attributes in the form of hash
+ # @return [Object] Returns the model itself
+ def build_from_hash(attributes)
+ return nil unless attributes.is_a?(Hash)
+ self.class.openapi_types.each_pair do |key, type|
+ if type =~ /\AArray<(.*)>/i
+ # check to ensure the input is an array given that the attribute
+ # is documented as an array but the input is not
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
+ end
+ elsif !attributes[self.class.attribute_map[key]].nil?
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
+ end
+
+ self
+ end
+
+ # Deserializes the data based on type
+ # @param string type Data type
+ # @param string value Value to be deserialized
+ # @return [Object] Deserialized data
+ def _deserialize(type, value)
+ case type.to_sym
+ when :DateTime
+ DateTime.parse(parse_date(value))
+ when :Date
+ Date.parse(parse_date(value))
+ when :String
+ value.to_s
+ when :Integer
+ value.to_i
+ when :Float
+ value.to_f
+ when :BigDecimal
+ BigDecimal(value.to_s)
+ when :Boolean
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
+ true
+ else
+ false
+ end
+ when :Object
+ # generic object (usually a Hash), return directly
+ value
+ when /\AArray<(?.+)>\z/
+ inner_type = Regexp.last_match[:inner_type]
+ value.map { |v| _deserialize(inner_type, v) }
+ when /\AHash<(?.+?), (?.+)>\z/
+ k_type = Regexp.last_match[:k_type]
+ v_type = Regexp.last_match[:v_type]
+ {}.tap do |hash|
+ value.each do |k, v|
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
+ end
+ end
+ else # model
+ XeroRuby::Accounting.const_get(type).build_from_hash(value)
+ end
+ end
+
+ # Returns the string representation of the object
+ # @return [String] String presentation of the object
+ def to_s
+ to_hash.to_s
+ end
+
+ # to_body is an alias to to_hash (backward compatibility)
+ # @return [Hash] Returns the object in the form of hash
+ def to_body
+ to_hash
+ end
+
+ # Returns the object in the form of hash
+ # @return [Hash] Returns the object in the form of hash
+ def to_hash(downcase: false)
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ next if value.nil?
+ key = downcase ? attr : param
+ hash[key] = _to_hash(value, downcase: downcase)
+ end
+ hash
+ end
+
+ # Returns the object in the form of hash with snake_case
+ def to_attributes
+ to_hash(downcase: true)
+ end
+
+ # Outputs non-array value in the form of hash
+ # For object, use to_hash. Otherwise, just return the value
+ # @param [Object] value Any valid value
+ # @return [Hash] Returns the value in the form of hash
+ def _to_hash(value, downcase: false)
+ if value.is_a?(Array)
+ value.map do |v|
+ v.to_hash(downcase: downcase)
+ end
+ elsif value.is_a?(Hash)
+ {}.tap do |hash|
+ value.map { |k, v| hash[k] = _to_hash(v, downcase: downcase) }
+ end
+ elsif value.respond_to? :to_hash
+ value.to_hash(downcase: downcase)
+ else
+ value
+ end
+ end
+
+ def parse_date(datestring)
+ if datestring.include?('Date')
+ date_pattern = /\/Date\((-?\d+)(\+\d+)?\)\//
+ original, date, timezone = *date_pattern.match(datestring)
+ date = (date.to_i / 1000)
+ Time.at(date).utc.strftime('%Y-%m-%dT%H:%M:%S%z').to_s
+ elsif /(\d\d\d\d)-(\d\d)/.match(datestring) # handles dates w/out Days: YYYY-MM*-DD
+ Time.parse(datestring + '-01').strftime('%Y-%m-%dT%H:%M:%S').to_s
+ else # handle date 'types' for small subset of payroll API's
+ Time.parse(datestring).strftime('%Y-%m-%dT%H:%M:%S').to_s
+ end
+ end
+ end
+end
diff --git a/lib/xero-ruby/models/finance/data_source_response.rb b/lib/xero-ruby/models/finance/data_source_response.rb
index 1dadc392..cbb87141 100644
--- a/lib/xero-ruby/models/finance/data_source_response.rb
+++ b/lib/xero-ruby/models/finance/data_source_response.rb
@@ -16,49 +16,49 @@ module XeroRuby::Finance
require 'bigdecimal'
class DataSourceResponse
- # Sum of the amounts of all statement lines where the source of the data was a direct bank feed in to Xero. This gives an indication on the certainty of correctness of the data.
+ # Sum of the amounts of all statement lines where the source of the data was a direct bank feed in to Xero via an API integration. This could be from a bank or aggregator. This gives an indication on the certainty of correctness of the data.
attr_accessor :direct_bank_feed
- # Sum of the amounts of all statement lines where the source of the data was a indirect bank feed to Xero (usually via Yodlee). This gives an indication on the certainty of correctness of the data.
+ # No longer in use.
attr_accessor :indirect_bank_feed
- # Sum of the amounts of all statement lines where the source of the data was a CSV file upload in to Xero. This gives an indication on the certainty of correctness of the data.
+ # Sum of the amounts of all statement lines where the source of the data was a file manually uploaded in to Xero. This gives an indication on the certainty of correctness of the data.
attr_accessor :file_upload
- # Sum of the amounts of all statement lines where the source of the data was manually keyed in to Xero. This gives an indication on the certainty of correctness of the data.
+ # Sum of the amounts of all statement lines where the source of the data was manually input in to Xero. This gives an indication on the certainty of correctness of the data.
attr_accessor :manual
- # Sum of the amounts of all statement lines where the source of the data was a direct bank feed in to Xero. This gives an indication on the certainty of correctness of the data. Only positive transactions are included.
+ # Sum of the amounts of all statement lines where the source of the data was a direct bank feed in to Xero via an API integration. This could be from a bank or aggregator. This gives an indication on the certainty of correctness of the data. Only positive transactions are included.
attr_accessor :direct_bank_feed_pos
- # Sum of the amounts of all statement lines where the source of the data was a indirect bank feed to Xero (usually via Yodlee). This gives an indication on the certainty of correctness of the data. Only positive transactions are included.
+ # No longer in use.
attr_accessor :indirect_bank_feed_pos
- # Sum of the amounts of all statement lines where the source of the data was a CSV file upload in to Xero. This gives an indication on the certainty of correctness of the data. Only positive transactions are included.
+ # Sum of the amounts of all statement lines where the source of the data was a file manually uploaded in to Xero. This gives an indication on the certainty of correctness of the data. Only positive transactions are included.
attr_accessor :file_upload_pos
- # Sum of the amounts of all statement lines where the source of the data was manually keyed in to Xero. This gives an indication on the certainty of correctness of the data. Only positive transactions are included.
+ # Sum of the amounts of all statement lines where the source of the data was manually input in to Xero. This gives an indication on the certainty of correctness of the data. Only positive transactions are included.
attr_accessor :manual_pos
- # Sum of the amounts of all statement lines where the source of the data was a direct bank feed in to Xero. This gives an indication on the certainty of correctness of the data. Only negative transactions are included.
+ # Sum of the amounts of all statement lines where the source of the data was a direct bank feed in to Xero via an API integration. This could be from a bank or aggregator. This gives an indication on the certainty of correctness of the data. Only negative transactions are included.
attr_accessor :direct_bank_feed_neg
- # Sum of the amounts of all statement lines where the source of the data was a indirect bank feed to Xero (usually via Yodlee). This gives an indication on the certainty of correctness of the data. Only negative transactions are included.
+ # No longer in use.
attr_accessor :indirect_bank_feed_neg
- # Sum of the amounts of all statement lines where the source of the data was a CSV file upload in to Xero. This gives an indication on the certainty of correctness of the data. Only negative transactions are included.
+ # Sum of the amounts of all statement lines where the source of the data was a file manually uploaded in to Xero. This gives an indication on the certainty of correctness of the data. Only negative transactions are included.
attr_accessor :file_upload_neg
- # Sum of the amounts of all statement lines where the source of the data was manually keyed in to Xero. This gives an indication on the certainty of correctness of the data. Only negative transactions are included.
+ # Sum of the amounts of all statement lines where the source of the data was manually input in to Xero. This gives an indication on the certainty of correctness of the data. Only negative transactions are included.
attr_accessor :manual_neg
- # Sum of the amounts of all statement lines where the source of the data was any other category. This gives an indication on the certainty of correctness of the data. Only positive transactions are included.
+ # Sum of the amounts of all statement lines where the source of the data was unknown. This gives an indication on the certainty of correctness of the data. Only positive transactions are included.
attr_accessor :other_pos
- # Sum of the amounts of all statement lines where the source of the data was any other category. This gives an indication on the certainty of correctness of the data. Only negative transactions are included.
+ # Sum of the amounts of all statement lines where the source of the data was unknown. This gives an indication on the certainty of correctness of the data. Only negative transactions are included.
attr_accessor :other_neg
- # Sum of the amounts of all statement lines where the source of the data was any other category. This gives an indication on the certainty of correctness of the data.
+ # Sum of the amounts of all statement lines where the source of the data was unknown. This gives an indication on the certainty of correctness of the data.
attr_accessor :other
# Attribute mapping from ruby-style variable name to JSON key.
diff --git a/lib/xero-ruby/version.rb b/lib/xero-ruby/version.rb
index 8c471b32..d6820593 100644
--- a/lib/xero-ruby/version.rb
+++ b/lib/xero-ruby/version.rb
@@ -7,9 +7,9 @@
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 4.3.1
-The version of the XeroOpenAPI document: 4.0.0
+The version of the XeroOpenAPI document: 5.0.0
=end
module XeroRuby
- VERSION = '7.0.0'
+ VERSION = '8.0.0'
end