xero-ruby 7.0.0 → 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/xero-ruby/api/accounting_api.rb +48 -27
- data/lib/xero-ruby/models/accounting/get_bank_transactions_response.rb +274 -0
- data/lib/xero-ruby/models/accounting/get_contacts_response.rb +274 -0
- data/lib/xero-ruby/models/accounting/get_credit_notes_response.rb +274 -0
- data/lib/xero-ruby/models/accounting/get_invoices_response.rb +274 -0
- data/lib/xero-ruby/models/accounting/get_manual_journals_response.rb +274 -0
- data/lib/xero-ruby/models/accounting/get_overpayments_response.rb +274 -0
- data/lib/xero-ruby/models/accounting/get_payments_response.rb +274 -0
- data/lib/xero-ruby/models/accounting/get_prepayments_response.rb +274 -0
- data/lib/xero-ruby/models/accounting/get_purchase_orders_response.rb +274 -0
- data/lib/xero-ruby/models/accounting/page_info.rb +253 -0
- data/lib/xero-ruby/models/finance/data_source_response.rb +15 -15
- data/lib/xero-ruby/version.rb +2 -2
- data/lib/xero-ruby.rb +10 -0
- metadata +12 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f73670db6cf545c751b9801a3deb6d0b48b205710b77a4a0b435261d61159b40
|
4
|
+
data.tar.gz: d2379ae1eb31f5409198c3aef34a055a9a99b3d6eb7f1b55b6579f1ddc21301c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 503a25b87df12794be76f5be259135d916e3e0ad3efb4ef3f9a44fe54f08e6d5107ee6ebf1ea6519f1a03544ae2543a8574c32919f97daf81cdb0635949694a2
|
7
|
+
data.tar.gz: f60849c39e8ef4e912c970f9125d6ac5e6b095f9db1f749ae8a8fbb38fcbe94541b5328a9aee9d06c841c1527ef5d6142f2511d14927cee391834e68774ab024
|
data/README.md
CHANGED
@@ -46,7 +46,7 @@ Sample apps can get you started quickly with simple auth flows to advanced usage
|
|
46
46
|
| --- | --- | --- |
|
47
47
|
| [`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 | <img src="https://i.imgur.com/9H4F98M.png" alt="drawing" width="300"/>
|
48
48
|
| [`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 | <img src="https://i.imgur.com/XsAp9Ww.png" alt="drawing" width="500"/>
|
49
|
-
| [`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/
|
49
|
+
| [`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 | <img src="https://i.imgur.com/YEkScui.png" alt="drawing" width="300"/>
|
50
50
|
| [`xero-ruby-sso-form`](https://github.com/XeroAPI/xero-ruby-sso-form) | A basic Sinatra app showing how to implement SSU to Lead | <img src="https://i.imgur.com/Nf95GVd.png" alt="drawing" width="300"/>
|
51
51
|
|
52
52
|
<hr>
|
@@ -6679,7 +6679,8 @@ module XeroRuby
|
|
6679
6679
|
# @option opts [String] :order Order by an any element
|
6680
6680
|
# @option opts [Integer] :page Up to 100 bank transactions will be returned in a single API call with line items details
|
6681
6681
|
# @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
|
6682
|
-
# @
|
6682
|
+
# @option opts [Integer] :page_size Number of records to retrieve per page
|
6683
|
+
# @return [GetBankTransactionsResponse]
|
6683
6684
|
def get_bank_transactions(xero_tenant_id, opts = {})
|
6684
6685
|
data, _status_code, _headers = get_bank_transactions_with_http_info(xero_tenant_id, opts)
|
6685
6686
|
data
|
@@ -6693,7 +6694,8 @@ module XeroRuby
|
|
6693
6694
|
# @option opts [String] :order Order by an any element
|
6694
6695
|
# @option opts [Integer] :page Up to 100 bank transactions will be returned in a single API call with line items details
|
6695
6696
|
# @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
|
6696
|
-
# @
|
6697
|
+
# @option opts [Integer] :page_size Number of records to retrieve per page
|
6698
|
+
# @return [Array<(GetBankTransactionsResponse, Integer, Hash)>] GetBankTransactionsResponse data, response status code and response headers
|
6697
6699
|
def get_bank_transactions_with_http_info(xero_tenant_id, options = {})
|
6698
6700
|
opts = options.dup
|
6699
6701
|
if @api_client.config.debugging
|
@@ -6715,6 +6717,7 @@ module XeroRuby
|
|
6715
6717
|
query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
|
6716
6718
|
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
6717
6719
|
query_params[:'unitdp'] = opts[:'unitdp'] if !opts[:'unitdp'].nil?
|
6720
|
+
query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
6718
6721
|
|
6719
6722
|
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
6720
6723
|
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
@@ -6734,7 +6737,7 @@ module XeroRuby
|
|
6734
6737
|
post_body = opts[:body]
|
6735
6738
|
|
6736
6739
|
# return_type
|
6737
|
-
return_type = opts[:return_type] || '
|
6740
|
+
return_type = opts[:return_type] || 'GetBankTransactionsResponse'
|
6738
6741
|
|
6739
6742
|
# auth_names
|
6740
6743
|
auth_names = opts[:auth_names] || ['OAuth2']
|
@@ -8627,7 +8630,8 @@ module XeroRuby
|
|
8627
8630
|
# @option opts [Boolean] :include_archived e.g. includeArchived=true - Contacts with a status of ARCHIVED will be included in the response
|
8628
8631
|
# @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)
|
8629
8632
|
# @option opts [String] :search_term Search parameter that performs a case-insensitive text search across the Name, FirstName, LastName, ContactNumber and EmailAddress fields.
|
8630
|
-
# @
|
8633
|
+
# @option opts [Integer] :page_size Number of records to retrieve per page
|
8634
|
+
# @return [GetContactsResponse]
|
8631
8635
|
def get_contacts(xero_tenant_id, opts = {})
|
8632
8636
|
data, _status_code, _headers = get_contacts_with_http_info(xero_tenant_id, opts)
|
8633
8637
|
data
|
@@ -8644,7 +8648,8 @@ module XeroRuby
|
|
8644
8648
|
# @option opts [Boolean] :include_archived e.g. includeArchived=true - Contacts with a status of ARCHIVED will be included in the response
|
8645
8649
|
# @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.
|
8646
8650
|
# @option opts [String] :search_term Search parameter that performs a case-insensitive text search across the Name, FirstName, LastName, ContactNumber and EmailAddress fields.
|
8647
|
-
# @
|
8651
|
+
# @option opts [Integer] :page_size Number of records to retrieve per page
|
8652
|
+
# @return [Array<(GetContactsResponse, Integer, Hash)>] GetContactsResponse data, response status code and response headers
|
8648
8653
|
def get_contacts_with_http_info(xero_tenant_id, options = {})
|
8649
8654
|
opts = options.dup
|
8650
8655
|
if @api_client.config.debugging
|
@@ -8669,6 +8674,7 @@ module XeroRuby
|
|
8669
8674
|
query_params[:'includeArchived'] = opts[:'include_archived'] if !opts[:'include_archived'].nil?
|
8670
8675
|
query_params[:'summaryOnly'] = opts[:'summary_only'] if !opts[:'summary_only'].nil?
|
8671
8676
|
query_params[:'searchTerm'] = opts[:'search_term'] if !opts[:'search_term'].nil?
|
8677
|
+
query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
8672
8678
|
|
8673
8679
|
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
8674
8680
|
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
@@ -8688,7 +8694,7 @@ module XeroRuby
|
|
8688
8694
|
post_body = opts[:body]
|
8689
8695
|
|
8690
8696
|
# return_type
|
8691
|
-
return_type = opts[:return_type] || '
|
8697
|
+
return_type = opts[:return_type] || 'GetContactsResponse'
|
8692
8698
|
|
8693
8699
|
# auth_names
|
8694
8700
|
auth_names = opts[:auth_names] || ['OAuth2']
|
@@ -9196,7 +9202,8 @@ module XeroRuby
|
|
9196
9202
|
# @option opts [String] :order Order by an any element
|
9197
9203
|
# @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
|
9198
9204
|
# @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
|
9199
|
-
# @
|
9205
|
+
# @option opts [Integer] :page_size Number of records to retrieve per page
|
9206
|
+
# @return [GetCreditNotesResponse]
|
9200
9207
|
def get_credit_notes(xero_tenant_id, opts = {})
|
9201
9208
|
data, _status_code, _headers = get_credit_notes_with_http_info(xero_tenant_id, opts)
|
9202
9209
|
data
|
@@ -9210,7 +9217,8 @@ module XeroRuby
|
|
9210
9217
|
# @option opts [String] :order Order by an any element
|
9211
9218
|
# @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
|
9212
9219
|
# @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
|
9213
|
-
# @
|
9220
|
+
# @option opts [Integer] :page_size Number of records to retrieve per page
|
9221
|
+
# @return [Array<(GetCreditNotesResponse, Integer, Hash)>] GetCreditNotesResponse data, response status code and response headers
|
9214
9222
|
def get_credit_notes_with_http_info(xero_tenant_id, options = {})
|
9215
9223
|
opts = options.dup
|
9216
9224
|
if @api_client.config.debugging
|
@@ -9232,6 +9240,7 @@ module XeroRuby
|
|
9232
9240
|
query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
|
9233
9241
|
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
9234
9242
|
query_params[:'unitdp'] = opts[:'unitdp'] if !opts[:'unitdp'].nil?
|
9243
|
+
query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
9235
9244
|
|
9236
9245
|
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
9237
9246
|
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
@@ -9251,7 +9260,7 @@ module XeroRuby
|
|
9251
9260
|
post_body = opts[:body]
|
9252
9261
|
|
9253
9262
|
# return_type
|
9254
|
-
return_type = opts[:return_type] || '
|
9263
|
+
return_type = opts[:return_type] || 'GetCreditNotesResponse'
|
9255
9264
|
|
9256
9265
|
# auth_names
|
9257
9266
|
auth_names = opts[:auth_names] || ['OAuth2']
|
@@ -10291,7 +10300,8 @@ module XeroRuby
|
|
10291
10300
|
# @option opts [Boolean] :created_by_my_app When set to true you'll only retrieve Invoices created by your app
|
10292
10301
|
# @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
|
10293
10302
|
# @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)
|
10294
|
-
# @
|
10303
|
+
# @option opts [Integer] :page_size Number of records to retrieve per page
|
10304
|
+
# @return [GetInvoicesResponse]
|
10295
10305
|
def get_invoices(xero_tenant_id, opts = {})
|
10296
10306
|
data, _status_code, _headers = get_invoices_with_http_info(xero_tenant_id, opts)
|
10297
10307
|
data
|
@@ -10312,7 +10322,8 @@ module XeroRuby
|
|
10312
10322
|
# @option opts [Boolean] :created_by_my_app When set to true you'll only retrieve Invoices created by your app
|
10313
10323
|
# @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
|
10314
10324
|
# @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.
|
10315
|
-
# @
|
10325
|
+
# @option opts [Integer] :page_size Number of records to retrieve per page
|
10326
|
+
# @return [Array<(GetInvoicesResponse, Integer, Hash)>] GetInvoicesResponse data, response status code and response headers
|
10316
10327
|
def get_invoices_with_http_info(xero_tenant_id, options = {})
|
10317
10328
|
opts = options.dup
|
10318
10329
|
if @api_client.config.debugging
|
@@ -10341,6 +10352,7 @@ module XeroRuby
|
|
10341
10352
|
query_params[:'createdByMyApp'] = opts[:'created_by_my_app'] if !opts[:'created_by_my_app'].nil?
|
10342
10353
|
query_params[:'unitdp'] = opts[:'unitdp'] if !opts[:'unitdp'].nil?
|
10343
10354
|
query_params[:'summaryOnly'] = opts[:'summary_only'] if !opts[:'summary_only'].nil?
|
10355
|
+
query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
10344
10356
|
|
10345
10357
|
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
10346
10358
|
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
@@ -10360,7 +10372,7 @@ module XeroRuby
|
|
10360
10372
|
post_body = opts[:body]
|
10361
10373
|
|
10362
10374
|
# return_type
|
10363
|
-
return_type = opts[:return_type] || '
|
10375
|
+
return_type = opts[:return_type] || 'GetInvoicesResponse'
|
10364
10376
|
|
10365
10377
|
# auth_names
|
10366
10378
|
auth_names = opts[:auth_names] || ['OAuth2']
|
@@ -11338,7 +11350,8 @@ module XeroRuby
|
|
11338
11350
|
# @option opts [String] :where Filter by an any element
|
11339
11351
|
# @option opts [String] :order Order by an any element
|
11340
11352
|
# @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
|
11341
|
-
# @
|
11353
|
+
# @option opts [Integer] :page_size Number of records to retrieve per page
|
11354
|
+
# @return [GetManualJournalsResponse]
|
11342
11355
|
def get_manual_journals(xero_tenant_id, opts = {})
|
11343
11356
|
data, _status_code, _headers = get_manual_journals_with_http_info(xero_tenant_id, opts)
|
11344
11357
|
data
|
@@ -11351,7 +11364,8 @@ module XeroRuby
|
|
11351
11364
|
# @option opts [String] :where Filter by an any element
|
11352
11365
|
# @option opts [String] :order Order by an any element
|
11353
11366
|
# @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
|
11354
|
-
# @
|
11367
|
+
# @option opts [Integer] :page_size Number of records to retrieve per page
|
11368
|
+
# @return [Array<(GetManualJournalsResponse, Integer, Hash)>] GetManualJournalsResponse data, response status code and response headers
|
11355
11369
|
def get_manual_journals_with_http_info(xero_tenant_id, options = {})
|
11356
11370
|
opts = options.dup
|
11357
11371
|
if @api_client.config.debugging
|
@@ -11372,6 +11386,7 @@ module XeroRuby
|
|
11372
11386
|
query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil?
|
11373
11387
|
query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
|
11374
11388
|
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
11389
|
+
query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
11375
11390
|
|
11376
11391
|
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
11377
11392
|
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
@@ -11391,7 +11406,7 @@ module XeroRuby
|
|
11391
11406
|
post_body = opts[:body]
|
11392
11407
|
|
11393
11408
|
# return_type
|
11394
|
-
return_type = opts[:return_type] || '
|
11409
|
+
return_type = opts[:return_type] || 'GetManualJournalsResponse'
|
11395
11410
|
|
11396
11411
|
# auth_names
|
11397
11412
|
auth_names = opts[:auth_names] || ['OAuth2']
|
@@ -11933,7 +11948,7 @@ module XeroRuby
|
|
11933
11948
|
# @option opts [String] :order Order by an any element
|
11934
11949
|
# @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
|
11935
11950
|
# @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
|
11936
|
-
# @return [
|
11951
|
+
# @return [GetOverpaymentsResponse]
|
11937
11952
|
def get_overpayments(xero_tenant_id, opts = {})
|
11938
11953
|
data, _status_code, _headers = get_overpayments_with_http_info(xero_tenant_id, opts)
|
11939
11954
|
data
|
@@ -11947,7 +11962,7 @@ module XeroRuby
|
|
11947
11962
|
# @option opts [String] :order Order by an any element
|
11948
11963
|
# @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
|
11949
11964
|
# @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
|
11950
|
-
# @return [Array<(
|
11965
|
+
# @return [Array<(GetOverpaymentsResponse, Integer, Hash)>] GetOverpaymentsResponse data, response status code and response headers
|
11951
11966
|
def get_overpayments_with_http_info(xero_tenant_id, options = {})
|
11952
11967
|
opts = options.dup
|
11953
11968
|
if @api_client.config.debugging
|
@@ -11988,7 +12003,7 @@ module XeroRuby
|
|
11988
12003
|
post_body = opts[:body]
|
11989
12004
|
|
11990
12005
|
# return_type
|
11991
|
-
return_type = opts[:return_type] || '
|
12006
|
+
return_type = opts[:return_type] || 'GetOverpaymentsResponse'
|
11992
12007
|
|
11993
12008
|
# auth_names
|
11994
12009
|
auth_names = opts[:auth_names] || ['OAuth2']
|
@@ -12235,7 +12250,8 @@ module XeroRuby
|
|
12235
12250
|
# @option opts [String] :where Filter by an any element
|
12236
12251
|
# @option opts [String] :order Order by an any element
|
12237
12252
|
# @option opts [Integer] :page Up to 100 payments will be returned in a single API call
|
12238
|
-
# @
|
12253
|
+
# @option opts [Integer] :page_size Number of records to retrieve per page
|
12254
|
+
# @return [GetPaymentsResponse]
|
12239
12255
|
def get_payments(xero_tenant_id, opts = {})
|
12240
12256
|
data, _status_code, _headers = get_payments_with_http_info(xero_tenant_id, opts)
|
12241
12257
|
data
|
@@ -12248,7 +12264,8 @@ module XeroRuby
|
|
12248
12264
|
# @option opts [String] :where Filter by an any element
|
12249
12265
|
# @option opts [String] :order Order by an any element
|
12250
12266
|
# @option opts [Integer] :page Up to 100 payments will be returned in a single API call
|
12251
|
-
# @
|
12267
|
+
# @option opts [Integer] :page_size Number of records to retrieve per page
|
12268
|
+
# @return [Array<(GetPaymentsResponse, Integer, Hash)>] GetPaymentsResponse data, response status code and response headers
|
12252
12269
|
def get_payments_with_http_info(xero_tenant_id, options = {})
|
12253
12270
|
opts = options.dup
|
12254
12271
|
if @api_client.config.debugging
|
@@ -12269,6 +12286,7 @@ module XeroRuby
|
|
12269
12286
|
query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil?
|
12270
12287
|
query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
|
12271
12288
|
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
12289
|
+
query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
12272
12290
|
|
12273
12291
|
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
12274
12292
|
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
@@ -12288,7 +12306,7 @@ module XeroRuby
|
|
12288
12306
|
post_body = opts[:body]
|
12289
12307
|
|
12290
12308
|
# return_type
|
12291
|
-
return_type = opts[:return_type] || '
|
12309
|
+
return_type = opts[:return_type] || 'GetPaymentsResponse'
|
12292
12310
|
|
12293
12311
|
# auth_names
|
12294
12312
|
auth_names = opts[:auth_names] || ['OAuth2']
|
@@ -12467,7 +12485,7 @@ module XeroRuby
|
|
12467
12485
|
# @option opts [String] :order Order by an any element
|
12468
12486
|
# @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
|
12469
12487
|
# @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
|
12470
|
-
# @return [
|
12488
|
+
# @return [GetPrepaymentsResponse]
|
12471
12489
|
def get_prepayments(xero_tenant_id, opts = {})
|
12472
12490
|
data, _status_code, _headers = get_prepayments_with_http_info(xero_tenant_id, opts)
|
12473
12491
|
data
|
@@ -12481,7 +12499,7 @@ module XeroRuby
|
|
12481
12499
|
# @option opts [String] :order Order by an any element
|
12482
12500
|
# @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
|
12483
12501
|
# @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
|
12484
|
-
# @return [Array<(
|
12502
|
+
# @return [Array<(GetPrepaymentsResponse, Integer, Hash)>] GetPrepaymentsResponse data, response status code and response headers
|
12485
12503
|
def get_prepayments_with_http_info(xero_tenant_id, options = {})
|
12486
12504
|
opts = options.dup
|
12487
12505
|
if @api_client.config.debugging
|
@@ -12522,7 +12540,7 @@ module XeroRuby
|
|
12522
12540
|
post_body = opts[:body]
|
12523
12541
|
|
12524
12542
|
# return_type
|
12525
|
-
return_type = opts[:return_type] || '
|
12543
|
+
return_type = opts[:return_type] || 'GetPrepaymentsResponse'
|
12526
12544
|
|
12527
12545
|
# auth_names
|
12528
12546
|
auth_names = opts[:auth_names] || ['OAuth2']
|
@@ -13103,7 +13121,8 @@ module XeroRuby
|
|
13103
13121
|
# @option opts [String] :date_to Filter by purchase order date (e.g. GET https://.../PurchaseOrders?DateFrom=2015-12-01&DateTo=2015-12-31
|
13104
13122
|
# @option opts [String] :order Order by an any element
|
13105
13123
|
# @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.
|
13106
|
-
# @
|
13124
|
+
# @option opts [Integer] :page_size Number of records to retrieve per page
|
13125
|
+
# @return [GetPurchaseOrdersResponse]
|
13107
13126
|
def get_purchase_orders(xero_tenant_id, opts = {})
|
13108
13127
|
data, _status_code, _headers = get_purchase_orders_with_http_info(xero_tenant_id, opts)
|
13109
13128
|
data
|
@@ -13118,7 +13137,8 @@ module XeroRuby
|
|
13118
13137
|
# @option opts [String] :date_to Filter by purchase order date (e.g. GET https://.../PurchaseOrders?DateFrom=2015-12-01&DateTo=2015-12-31
|
13119
13138
|
# @option opts [String] :order Order by an any element
|
13120
13139
|
# @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.
|
13121
|
-
# @
|
13140
|
+
# @option opts [Integer] :page_size Number of records to retrieve per page
|
13141
|
+
# @return [Array<(GetPurchaseOrdersResponse, Integer, Hash)>] GetPurchaseOrdersResponse data, response status code and response headers
|
13122
13142
|
def get_purchase_orders_with_http_info(xero_tenant_id, options = {})
|
13123
13143
|
opts = options.dup
|
13124
13144
|
if @api_client.config.debugging
|
@@ -13145,6 +13165,7 @@ module XeroRuby
|
|
13145
13165
|
query_params[:'DateTo'] = opts[:'date_to'] if !opts[:'date_to'].nil?
|
13146
13166
|
query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
|
13147
13167
|
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
13168
|
+
query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
13148
13169
|
|
13149
13170
|
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
13150
13171
|
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
@@ -13164,7 +13185,7 @@ module XeroRuby
|
|
13164
13185
|
post_body = opts[:body]
|
13165
13186
|
|
13166
13187
|
# return_type
|
13167
|
-
return_type = opts[:return_type] || '
|
13188
|
+
return_type = opts[:return_type] || 'GetPurchaseOrdersResponse'
|
13168
13189
|
|
13169
13190
|
# auth_names
|
13170
13191
|
auth_names = opts[:auth_names] || ['OAuth2']
|
@@ -0,0 +1,274 @@
|
|
1
|
+
=begin
|
2
|
+
#Xero Accounting API
|
3
|
+
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
|
+
|
6
|
+
Contact: api@xero.com
|
7
|
+
Generated by: https://openapi-generator.tech
|
8
|
+
OpenAPI Generator version: 4.3.1
|
9
|
+
|
10
|
+
=end
|
11
|
+
|
12
|
+
require 'time'
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module XeroRuby::Accounting
|
16
|
+
require 'bigdecimal'
|
17
|
+
|
18
|
+
class GetBankTransactionsResponse
|
19
|
+
|
20
|
+
attr_accessor :id
|
21
|
+
|
22
|
+
|
23
|
+
attr_accessor :status
|
24
|
+
|
25
|
+
|
26
|
+
attr_accessor :provider_name
|
27
|
+
|
28
|
+
|
29
|
+
attr_accessor :date_time_utc
|
30
|
+
|
31
|
+
|
32
|
+
attr_accessor :page_info
|
33
|
+
|
34
|
+
|
35
|
+
attr_accessor :bank_transactions
|
36
|
+
|
37
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
38
|
+
def self.attribute_map
|
39
|
+
{
|
40
|
+
:'id' => :'Id',
|
41
|
+
:'status' => :'Status',
|
42
|
+
:'provider_name' => :'ProviderName',
|
43
|
+
:'date_time_utc' => :'DateTimeUTC',
|
44
|
+
:'page_info' => :'PageInfo',
|
45
|
+
:'bank_transactions' => :'BankTransactions'
|
46
|
+
}
|
47
|
+
end
|
48
|
+
|
49
|
+
# Attribute type mapping.
|
50
|
+
def self.openapi_types
|
51
|
+
{
|
52
|
+
:'id' => :'String',
|
53
|
+
:'status' => :'String',
|
54
|
+
:'provider_name' => :'String',
|
55
|
+
:'date_time_utc' => :'String',
|
56
|
+
:'page_info' => :'PageInfo',
|
57
|
+
:'bank_transactions' => :'Array<BankTransaction>'
|
58
|
+
}
|
59
|
+
end
|
60
|
+
|
61
|
+
# Initializes the object
|
62
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
63
|
+
def initialize(attributes = {})
|
64
|
+
if (!attributes.is_a?(Hash))
|
65
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `XeroRuby::Accounting::GetBankTransactionsResponse` initialize method"
|
66
|
+
end
|
67
|
+
|
68
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
69
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
70
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
71
|
+
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
|
72
|
+
end
|
73
|
+
h[k.to_sym] = v
|
74
|
+
}
|
75
|
+
|
76
|
+
if attributes.key?(:'id')
|
77
|
+
self.id = attributes[:'id']
|
78
|
+
end
|
79
|
+
|
80
|
+
if attributes.key?(:'status')
|
81
|
+
self.status = attributes[:'status']
|
82
|
+
end
|
83
|
+
|
84
|
+
if attributes.key?(:'provider_name')
|
85
|
+
self.provider_name = attributes[:'provider_name']
|
86
|
+
end
|
87
|
+
|
88
|
+
if attributes.key?(:'date_time_utc')
|
89
|
+
self.date_time_utc = attributes[:'date_time_utc']
|
90
|
+
end
|
91
|
+
|
92
|
+
if attributes.key?(:'page_info')
|
93
|
+
self.page_info = attributes[:'page_info']
|
94
|
+
end
|
95
|
+
|
96
|
+
if attributes.key?(:'bank_transactions')
|
97
|
+
if (value = attributes[:'bank_transactions']).is_a?(Array)
|
98
|
+
self.bank_transactions = value
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
104
|
+
# @return Array for valid properties with the reasons
|
105
|
+
def list_invalid_properties
|
106
|
+
invalid_properties = Array.new
|
107
|
+
invalid_properties
|
108
|
+
end
|
109
|
+
|
110
|
+
# Check to see if the all the properties in the model are valid
|
111
|
+
# @return true if the model is valid
|
112
|
+
def valid?
|
113
|
+
true
|
114
|
+
end
|
115
|
+
|
116
|
+
# Checks equality by comparing each attribute.
|
117
|
+
# @param [Object] Object to be compared
|
118
|
+
def ==(o)
|
119
|
+
return true if self.equal?(o)
|
120
|
+
self.class == o.class &&
|
121
|
+
id == o.id &&
|
122
|
+
status == o.status &&
|
123
|
+
provider_name == o.provider_name &&
|
124
|
+
date_time_utc == o.date_time_utc &&
|
125
|
+
page_info == o.page_info &&
|
126
|
+
bank_transactions == o.bank_transactions
|
127
|
+
end
|
128
|
+
|
129
|
+
# @see the `==` method
|
130
|
+
# @param [Object] Object to be compared
|
131
|
+
def eql?(o)
|
132
|
+
self == o
|
133
|
+
end
|
134
|
+
|
135
|
+
# Calculates hash code according to all attributes.
|
136
|
+
# @return [Integer] Hash code
|
137
|
+
def hash
|
138
|
+
[id, status, provider_name, date_time_utc, page_info, bank_transactions].hash
|
139
|
+
end
|
140
|
+
|
141
|
+
# Builds the object from hash
|
142
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
143
|
+
# @return [Object] Returns the model itself
|
144
|
+
def self.build_from_hash(attributes)
|
145
|
+
new.build_from_hash(attributes)
|
146
|
+
end
|
147
|
+
|
148
|
+
# Builds the object from hash
|
149
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
150
|
+
# @return [Object] Returns the model itself
|
151
|
+
def build_from_hash(attributes)
|
152
|
+
return nil unless attributes.is_a?(Hash)
|
153
|
+
self.class.openapi_types.each_pair do |key, type|
|
154
|
+
if type =~ /\AArray<(.*)>/i
|
155
|
+
# check to ensure the input is an array given that the attribute
|
156
|
+
# is documented as an array but the input is not
|
157
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
158
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
159
|
+
end
|
160
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
161
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
162
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
163
|
+
end
|
164
|
+
|
165
|
+
self
|
166
|
+
end
|
167
|
+
|
168
|
+
# Deserializes the data based on type
|
169
|
+
# @param string type Data type
|
170
|
+
# @param string value Value to be deserialized
|
171
|
+
# @return [Object] Deserialized data
|
172
|
+
def _deserialize(type, value)
|
173
|
+
case type.to_sym
|
174
|
+
when :DateTime
|
175
|
+
DateTime.parse(parse_date(value))
|
176
|
+
when :Date
|
177
|
+
Date.parse(parse_date(value))
|
178
|
+
when :String
|
179
|
+
value.to_s
|
180
|
+
when :Integer
|
181
|
+
value.to_i
|
182
|
+
when :Float
|
183
|
+
value.to_f
|
184
|
+
when :BigDecimal
|
185
|
+
BigDecimal(value.to_s)
|
186
|
+
when :Boolean
|
187
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
188
|
+
true
|
189
|
+
else
|
190
|
+
false
|
191
|
+
end
|
192
|
+
when :Object
|
193
|
+
# generic object (usually a Hash), return directly
|
194
|
+
value
|
195
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
196
|
+
inner_type = Regexp.last_match[:inner_type]
|
197
|
+
value.map { |v| _deserialize(inner_type, v) }
|
198
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
199
|
+
k_type = Regexp.last_match[:k_type]
|
200
|
+
v_type = Regexp.last_match[:v_type]
|
201
|
+
{}.tap do |hash|
|
202
|
+
value.each do |k, v|
|
203
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
204
|
+
end
|
205
|
+
end
|
206
|
+
else # model
|
207
|
+
XeroRuby::Accounting.const_get(type).build_from_hash(value)
|
208
|
+
end
|
209
|
+
end
|
210
|
+
|
211
|
+
# Returns the string representation of the object
|
212
|
+
# @return [String] String presentation of the object
|
213
|
+
def to_s
|
214
|
+
to_hash.to_s
|
215
|
+
end
|
216
|
+
|
217
|
+
# to_body is an alias to to_hash (backward compatibility)
|
218
|
+
# @return [Hash] Returns the object in the form of hash
|
219
|
+
def to_body
|
220
|
+
to_hash
|
221
|
+
end
|
222
|
+
|
223
|
+
# Returns the object in the form of hash
|
224
|
+
# @return [Hash] Returns the object in the form of hash
|
225
|
+
def to_hash(downcase: false)
|
226
|
+
hash = {}
|
227
|
+
self.class.attribute_map.each_pair do |attr, param|
|
228
|
+
value = self.send(attr)
|
229
|
+
next if value.nil?
|
230
|
+
key = downcase ? attr : param
|
231
|
+
hash[key] = _to_hash(value, downcase: downcase)
|
232
|
+
end
|
233
|
+
hash
|
234
|
+
end
|
235
|
+
|
236
|
+
# Returns the object in the form of hash with snake_case
|
237
|
+
def to_attributes
|
238
|
+
to_hash(downcase: true)
|
239
|
+
end
|
240
|
+
|
241
|
+
# Outputs non-array value in the form of hash
|
242
|
+
# For object, use to_hash. Otherwise, just return the value
|
243
|
+
# @param [Object] value Any valid value
|
244
|
+
# @return [Hash] Returns the value in the form of hash
|
245
|
+
def _to_hash(value, downcase: false)
|
246
|
+
if value.is_a?(Array)
|
247
|
+
value.map do |v|
|
248
|
+
v.to_hash(downcase: downcase)
|
249
|
+
end
|
250
|
+
elsif value.is_a?(Hash)
|
251
|
+
{}.tap do |hash|
|
252
|
+
value.map { |k, v| hash[k] = _to_hash(v, downcase: downcase) }
|
253
|
+
end
|
254
|
+
elsif value.respond_to? :to_hash
|
255
|
+
value.to_hash(downcase: downcase)
|
256
|
+
else
|
257
|
+
value
|
258
|
+
end
|
259
|
+
end
|
260
|
+
|
261
|
+
def parse_date(datestring)
|
262
|
+
if datestring.include?('Date')
|
263
|
+
date_pattern = /\/Date\((-?\d+)(\+\d+)?\)\//
|
264
|
+
original, date, timezone = *date_pattern.match(datestring)
|
265
|
+
date = (date.to_i / 1000)
|
266
|
+
Time.at(date).utc.strftime('%Y-%m-%dT%H:%M:%S%z').to_s
|
267
|
+
elsif /(\d\d\d\d)-(\d\d)/.match(datestring) # handles dates w/out Days: YYYY-MM*-DD
|
268
|
+
Time.parse(datestring + '-01').strftime('%Y-%m-%dT%H:%M:%S').to_s
|
269
|
+
else # handle date 'types' for small subset of payroll API's
|
270
|
+
Time.parse(datestring).strftime('%Y-%m-%dT%H:%M:%S').to_s
|
271
|
+
end
|
272
|
+
end
|
273
|
+
end
|
274
|
+
end
|