xero-ruby 17.0.0 → 18.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e32f8374264e3c569b5516a07e7b0333372a0b66be4b8b85ee1c048f7ebc3279
4
- data.tar.gz: 5a1f658681e28ff7fd54e76b098a211e463181a4e79fab1e1a9723d311e461cb
3
+ metadata.gz: 2cb39dbc972ca5508624395e934bca1e3a2787f4db64c929150c5d86dc826989
4
+ data.tar.gz: 0f44c4bdb90dac311e0f3087f018f075e69e49a8801dbd4f1ff5cadd75e9785b
5
5
  SHA512:
6
- metadata.gz: 045e16d9d499d8be07a004ee944ca85fd1161f4dd8d73727a00b74673d8875a0568a6ff0cdeae73ddee7c684fafc58cdb4b375c01f3fa503ea5a228fb238d39a
7
- data.tar.gz: b558f2795e55d1d9b0a6792e2c5d44aa0102a4d8e5fa65d39731861a029492513490bfa964e0194f601400296d41fca7f14f1b37a35d7dcbd02acabb223a7a94
6
+ metadata.gz: 6794b0e46855facf01e2f8cfb2b7617498b3b2531da4c7f3ef72b858d5621defdf38c56758160618a8bd90c3d051a8bf81cf27aeba5796a1aa0c51ebb053b691
7
+ data.tar.gz: b35179daa7d6a49ad0208d77f43fdf9618d5261b95c7ea02e3ea1366f26683e397cc6004dcb42c712eb56100d2adaa693597fda13b648b2101cb566cf474d4b7
@@ -2178,6 +2178,7 @@ module XeroRuby
2178
2178
  # @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors (default to false)
2179
2179
  # @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
2180
2180
  # @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
2181
+ # @option opts [Boolean] :allow_backorders Allows an invoice to be created even when one or more line items contain tracked inventory where the invoice quantity would cause the available quantity to go negative
2181
2182
  # @return [Invoices]
2182
2183
  def create_invoices(xero_tenant_id, invoices, opts = {})
2183
2184
  data, _status_code, _headers = create_invoices_with_http_info(xero_tenant_id, invoices, opts)
@@ -2191,6 +2192,7 @@ module XeroRuby
2191
2192
  # @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors
2192
2193
  # @option opts [Integer] :unitdp e.g. unitdp=4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
2193
2194
  # @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
2195
+ # @option opts [Boolean] :allow_backorders Allows an invoice to be created even when one or more line items contain tracked inventory where the invoice quantity would cause the available quantity to go negative
2194
2196
  # @return [Array<(Invoices, Integer, Hash)>] Invoices data, response status code and response headers
2195
2197
  def create_invoices_with_http_info(xero_tenant_id, invoices, options = {})
2196
2198
  opts = options.dup
@@ -2215,6 +2217,7 @@ module XeroRuby
2215
2217
  query_params = opts[:query_params] || {}
2216
2218
  query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil?
2217
2219
  query_params[:'unitdp'] = opts[:'unitdp'] if !opts[:'unitdp'].nil?
2220
+ query_params[:'allowBackorders'] = opts[:'allow_backorders'] if !opts[:'allow_backorders'].nil?
2218
2221
 
2219
2222
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
2220
2223
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
@@ -4814,6 +4817,175 @@ module XeroRuby
4814
4817
  return data, status_code, headers
4815
4818
  end
4816
4819
 
4820
+ # Deletes a specific bank transfer
4821
+ # @param xero_tenant_id [String] Xero identifier for Tenant
4822
+ # @param bank_transfer_id [String] Xero generated unique identifier for a bank transfer
4823
+ # @param bank_transfer_delete_by_url_param [BankTransferDeleteByUrlParam]
4824
+ # @param [Hash] opts the optional parameters
4825
+ # @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
4826
+ # @return [BankTransfers]
4827
+ def delete_bank_transfer(xero_tenant_id, bank_transfer_id, bank_transfer_delete_by_url_param, opts = {})
4828
+ data, _status_code, _headers = delete_bank_transfer_with_http_info(xero_tenant_id, bank_transfer_id, bank_transfer_delete_by_url_param, opts)
4829
+ data
4830
+ end
4831
+
4832
+ # Deletes a specific bank transfer
4833
+ # @param xero_tenant_id [String] Xero identifier for Tenant
4834
+ # @param bank_transfer_id [String] Xero generated unique identifier for a bank transfer
4835
+ # @param bank_transfer_delete_by_url_param [BankTransferDeleteByUrlParam]
4836
+ # @param [Hash] opts the optional parameters
4837
+ # @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
4838
+ # @return [Array<(BankTransfers, Integer, Hash)>] BankTransfers data, response status code and response headers
4839
+ def delete_bank_transfer_with_http_info(xero_tenant_id, bank_transfer_id, bank_transfer_delete_by_url_param, options = {})
4840
+ opts = options.dup
4841
+ if @api_client.config.debugging
4842
+ @api_client.config.logger.debug 'Calling API: AccountingApi.delete_bank_transfer ...'
4843
+ end
4844
+ # verify the required parameter 'xero_tenant_id' is set
4845
+ if @api_client.config.client_side_validation && xero_tenant_id.nil?
4846
+ fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.delete_bank_transfer"
4847
+ end
4848
+ # verify the required parameter 'bank_transfer_id' is set
4849
+ if @api_client.config.client_side_validation && bank_transfer_id.nil?
4850
+ fail ArgumentError, "Missing the required parameter 'bank_transfer_id' when calling AccountingApi.delete_bank_transfer"
4851
+ end
4852
+ # verify the required parameter 'bank_transfer_delete_by_url_param' is set
4853
+ if @api_client.config.client_side_validation && bank_transfer_delete_by_url_param.nil?
4854
+ fail ArgumentError, "Missing the required parameter 'bank_transfer_delete_by_url_param' when calling AccountingApi.delete_bank_transfer"
4855
+ end
4856
+ # resource path
4857
+ local_var_path = '/BankTransfers/{BankTransferID}'.sub('{' + 'BankTransferID' + '}', bank_transfer_id.to_s)
4858
+
4859
+ # camelize keys of incoming `where` opts
4860
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
4861
+
4862
+ # query parameters
4863
+ query_params = opts[:query_params] || {}
4864
+
4865
+ # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
4866
+ query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
4867
+ query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
4868
+
4869
+ # header parameters
4870
+ header_params = opts[:header_params] || {}
4871
+ # HTTP header 'Accept' (if needed)
4872
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
4873
+ # HTTP header 'Content-Type'
4874
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
4875
+ header_params[:'xero-tenant-id'] = xero_tenant_id
4876
+ header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
4877
+
4878
+ # form parameters
4879
+ form_params = opts[:form_params] || {}
4880
+
4881
+ # http body (model)
4882
+ post_body = opts[:body] || @api_client.object_to_http_body(bank_transfer_delete_by_url_param)
4883
+
4884
+ # return_type
4885
+ return_type = opts[:return_type] || 'BankTransfers'
4886
+
4887
+ # auth_names
4888
+ auth_names = opts[:auth_names] || ['OAuth2']
4889
+
4890
+ new_options = opts.merge(
4891
+ :header_params => header_params,
4892
+ :query_params => query_params,
4893
+ :form_params => form_params,
4894
+ :body => post_body,
4895
+ :auth_names => auth_names,
4896
+ :return_type => return_type
4897
+ )
4898
+
4899
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, "AccountingApi", new_options)
4900
+ if @api_client.config.debugging
4901
+ @api_client.config.logger.debug "API called: AccountingApi#delete_bank_transfer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
4902
+ end
4903
+ return data, status_code, headers
4904
+ end
4905
+
4906
+ # Deletes one or more bank transfers
4907
+ # @param xero_tenant_id [String] Xero identifier for Tenant
4908
+ # @param bank_transfers_delete [BankTransfersDelete] BankTransfers with array of BankTransfer objects in request body
4909
+ # @param [Hash] opts the optional parameters
4910
+ # @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors (default to false)
4911
+ # @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
4912
+ # @return [BankTransfers]
4913
+ def delete_bank_transfers(xero_tenant_id, bank_transfers_delete, opts = {})
4914
+ data, _status_code, _headers = delete_bank_transfers_with_http_info(xero_tenant_id, bank_transfers_delete, opts)
4915
+ data
4916
+ end
4917
+
4918
+ # Deletes one or more bank transfers
4919
+ # @param xero_tenant_id [String] Xero identifier for Tenant
4920
+ # @param bank_transfers_delete [BankTransfersDelete] BankTransfers with array of BankTransfer objects in request body
4921
+ # @param [Hash] opts the optional parameters
4922
+ # @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors
4923
+ # @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
4924
+ # @return [Array<(BankTransfers, Integer, Hash)>] BankTransfers data, response status code and response headers
4925
+ def delete_bank_transfers_with_http_info(xero_tenant_id, bank_transfers_delete, options = {})
4926
+ opts = options.dup
4927
+ if @api_client.config.debugging
4928
+ @api_client.config.logger.debug 'Calling API: AccountingApi.delete_bank_transfers ...'
4929
+ end
4930
+ # verify the required parameter 'xero_tenant_id' is set
4931
+ if @api_client.config.client_side_validation && xero_tenant_id.nil?
4932
+ fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.delete_bank_transfers"
4933
+ end
4934
+ # verify the required parameter 'bank_transfers_delete' is set
4935
+ if @api_client.config.client_side_validation && bank_transfers_delete.nil?
4936
+ fail ArgumentError, "Missing the required parameter 'bank_transfers_delete' when calling AccountingApi.delete_bank_transfers"
4937
+ end
4938
+ # resource path
4939
+ local_var_path = '/BankTransfers'
4940
+
4941
+ # camelize keys of incoming `where` opts
4942
+ opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
4943
+
4944
+ # query parameters
4945
+ query_params = opts[:query_params] || {}
4946
+ query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil?
4947
+
4948
+ # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
4949
+ query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
4950
+ query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
4951
+
4952
+ # header parameters
4953
+ header_params = opts[:header_params] || {}
4954
+ # HTTP header 'Accept' (if needed)
4955
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
4956
+ # HTTP header 'Content-Type'
4957
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
4958
+ header_params[:'xero-tenant-id'] = xero_tenant_id
4959
+ header_params[:'Idempotency-Key'] = opts[:'idempotency_key'] if !opts[:'idempotency_key'].nil?
4960
+
4961
+ # form parameters
4962
+ form_params = opts[:form_params] || {}
4963
+
4964
+ # http body (model)
4965
+ post_body = opts[:body] || @api_client.object_to_http_body(bank_transfers_delete)
4966
+
4967
+ # return_type
4968
+ return_type = opts[:return_type] || 'BankTransfers'
4969
+
4970
+ # auth_names
4971
+ auth_names = opts[:auth_names] || ['OAuth2']
4972
+
4973
+ new_options = opts.merge(
4974
+ :header_params => header_params,
4975
+ :query_params => query_params,
4976
+ :form_params => form_params,
4977
+ :body => post_body,
4978
+ :auth_names => auth_names,
4979
+ :return_type => return_type
4980
+ )
4981
+
4982
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, "AccountingApi", new_options)
4983
+ if @api_client.config.debugging
4984
+ @api_client.config.logger.debug "API called: AccountingApi#delete_bank_transfers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
4985
+ end
4986
+ return data, status_code, headers
4987
+ end
4988
+
4817
4989
  # Updates a specific batch payment for invoices and credit notes
4818
4990
  # @param xero_tenant_id [String] Xero identifier for Tenant
4819
4991
  # @param batch_payment_delete [BatchPaymentDelete]
@@ -6597,6 +6769,7 @@ module XeroRuby
6597
6769
  # @option opts [Integer] :page Up to 100 bank transactions will be returned in a single API call with line items details
6598
6770
  # @option opts [Integer] :unitdp e.g. unitdp&#x3D;4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
6599
6771
  # @option opts [Integer] :page_size Number of records to retrieve per page
6772
+ # @option opts [Array<String>] :references Filter by a comma-separated list of References
6600
6773
  # @return [BankTransactions]
6601
6774
  def get_bank_transactions(xero_tenant_id, opts = {})
6602
6775
  data, _status_code, _headers = get_bank_transactions_with_http_info(xero_tenant_id, opts)
@@ -6612,6 +6785,7 @@ module XeroRuby
6612
6785
  # @option opts [Integer] :page Up to 100 bank transactions will be returned in a single API call with line items details
6613
6786
  # @option opts [Integer] :unitdp e.g. unitdp&#x3D;4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
6614
6787
  # @option opts [Integer] :page_size Number of records to retrieve per page
6788
+ # @option opts [Array<String>] :references Filter by a comma-separated list of References
6615
6789
  # @return [Array<(BankTransactions, Integer, Hash)>] BankTransactions data, response status code and response headers
6616
6790
  def get_bank_transactions_with_http_info(xero_tenant_id, options = {})
6617
6791
  opts = options.dup
@@ -6635,6 +6809,7 @@ module XeroRuby
6635
6809
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
6636
6810
  query_params[:'unitdp'] = opts[:'unitdp'] if !opts[:'unitdp'].nil?
6637
6811
  query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
6812
+ query_params[:'References'] = @api_client.build_collection_param(opts[:'references'], :csv) if !opts[:'references'].nil?
6638
6813
 
6639
6814
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
6640
6815
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
@@ -7157,6 +7332,7 @@ module XeroRuby
7157
7332
  # @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
7158
7333
  # @option opts [String] :where Filter by an any element
7159
7334
  # @option opts [String] :order Order by an any element
7335
+ # @option opts [Boolean] :include_deleted e.g. includeDeleted&#x3D;true - Bank transfers with a status of DELETED will be included in the response
7160
7336
  # @return [BankTransfers]
7161
7337
  def get_bank_transfers(xero_tenant_id, opts = {})
7162
7338
  data, _status_code, _headers = get_bank_transfers_with_http_info(xero_tenant_id, opts)
@@ -7169,6 +7345,7 @@ module XeroRuby
7169
7345
  # @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
7170
7346
  # @option opts [String] :where Filter by an any element
7171
7347
  # @option opts [String] :order Order by an any element
7348
+ # @option opts [Boolean] :include_deleted e.g. includeDeleted&#x3D;true - Bank transfers with a status of DELETED will be included in the response
7172
7349
  # @return [Array<(BankTransfers, Integer, Hash)>] BankTransfers data, response status code and response headers
7173
7350
  def get_bank_transfers_with_http_info(xero_tenant_id, options = {})
7174
7351
  opts = options.dup
@@ -7189,6 +7366,7 @@ module XeroRuby
7189
7366
  query_params = opts[:query_params] || {}
7190
7367
  query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil?
7191
7368
  query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
7369
+ query_params[:'includeDeleted'] = opts[:'include_deleted'] if !opts[:'include_deleted'].nil?
7192
7370
 
7193
7371
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
7194
7372
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
@@ -12256,10 +12434,11 @@ module XeroRuby
12256
12434
  # @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
12257
12435
  # @option opts [String] :where Filter by an any element
12258
12436
  # @option opts [String] :order Order by an any element
12259
- # @option opts [Integer] :page e.g. page&#x3D;1 – Up to 100 prepayments will be returned in a single API call with line items shown for each overpayment
12437
+ # @option opts [Integer] :page e.g. page&#x3D;1 – Up to 100 prepayments will be returned in a single API call with line items shown for each prepayment
12260
12438
  # @option opts [Integer] :unitdp e.g. unitdp&#x3D;4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
12261
12439
  # @option opts [Integer] :page_size Number of records to retrieve per page
12262
12440
  # @option opts [Array<String>] :invoice_numbers Filter by a comma-separated list of InvoiceNumbers
12441
+ # @option opts [Array<String>] :references Filter by a comma-separated list of References
12263
12442
  # @return [Prepayments]
12264
12443
  def get_prepayments(xero_tenant_id, opts = {})
12265
12444
  data, _status_code, _headers = get_prepayments_with_http_info(xero_tenant_id, opts)
@@ -12272,10 +12451,11 @@ module XeroRuby
12272
12451
  # @option opts [DateTime] :if_modified_since Only records created or modified since this timestamp will be returned
12273
12452
  # @option opts [String] :where Filter by an any element
12274
12453
  # @option opts [String] :order Order by an any element
12275
- # @option opts [Integer] :page e.g. page&#x3D;1 – Up to 100 prepayments will be returned in a single API call with line items shown for each overpayment
12454
+ # @option opts [Integer] :page e.g. page&#x3D;1 – Up to 100 prepayments will be returned in a single API call with line items shown for each prepayment
12276
12455
  # @option opts [Integer] :unitdp e.g. unitdp&#x3D;4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
12277
12456
  # @option opts [Integer] :page_size Number of records to retrieve per page
12278
12457
  # @option opts [Array<String>] :invoice_numbers Filter by a comma-separated list of InvoiceNumbers
12458
+ # @option opts [Array<String>] :references Filter by a comma-separated list of References
12279
12459
  # @return [Array<(Prepayments, Integer, Hash)>] Prepayments data, response status code and response headers
12280
12460
  def get_prepayments_with_http_info(xero_tenant_id, options = {})
12281
12461
  opts = options.dup
@@ -12300,6 +12480,7 @@ module XeroRuby
12300
12480
  query_params[:'unitdp'] = opts[:'unitdp'] if !opts[:'unitdp'].nil?
12301
12481
  query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
12302
12482
  query_params[:'InvoiceNumbers'] = @api_client.build_collection_param(opts[:'invoice_numbers'], :csv) if !opts[:'invoice_numbers'].nil?
12483
+ query_params[:'References'] = @api_client.build_collection_param(opts[:'references'], :csv) if !opts[:'references'].nil?
12303
12484
 
12304
12485
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
12305
12486
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
@@ -16925,6 +17106,7 @@ module XeroRuby
16925
17106
  # @param [Hash] opts the optional parameters
16926
17107
  # @option opts [Integer] :unitdp e.g. unitdp&#x3D;4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
16927
17108
  # @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
17109
+ # @option opts [Boolean] :allow_backorders Allows an invoice to be created even when one or more line items contain tracked inventory where the invoice quantity would cause the available quantity to go negative
16928
17110
  # @return [Invoices]
16929
17111
  def update_invoice(xero_tenant_id, invoice_id, invoices, opts = {})
16930
17112
  data, _status_code, _headers = update_invoice_with_http_info(xero_tenant_id, invoice_id, invoices, opts)
@@ -16938,6 +17120,7 @@ module XeroRuby
16938
17120
  # @param [Hash] opts the optional parameters
16939
17121
  # @option opts [Integer] :unitdp e.g. unitdp&#x3D;4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
16940
17122
  # @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
17123
+ # @option opts [Boolean] :allow_backorders Allows an invoice to be created even when one or more line items contain tracked inventory where the invoice quantity would cause the available quantity to go negative
16941
17124
  # @return [Array<(Invoices, Integer, Hash)>] Invoices data, response status code and response headers
16942
17125
  def update_invoice_with_http_info(xero_tenant_id, invoice_id, invoices, options = {})
16943
17126
  opts = options.dup
@@ -16965,6 +17148,7 @@ module XeroRuby
16965
17148
  # query parameters
16966
17149
  query_params = opts[:query_params] || {}
16967
17150
  query_params[:'unitdp'] = opts[:'unitdp'] if !opts[:'unitdp'].nil?
17151
+ query_params[:'allowBackorders'] = opts[:'allow_backorders'] if !opts[:'allow_backorders'].nil?
16968
17152
 
16969
17153
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
16970
17154
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
@@ -17714,6 +17898,7 @@ module XeroRuby
17714
17898
  # @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors (default to false)
17715
17899
  # @option opts [Integer] :unitdp e.g. unitdp&#x3D;4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
17716
17900
  # @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
17901
+ # @option opts [Boolean] :allow_backorders Allows an invoice to be created even when one or more line items contain tracked inventory where the invoice quantity would cause the available quantity to go negative
17717
17902
  # @return [Invoices]
17718
17903
  def update_or_create_invoices(xero_tenant_id, invoices, opts = {})
17719
17904
  data, _status_code, _headers = update_or_create_invoices_with_http_info(xero_tenant_id, invoices, opts)
@@ -17727,6 +17912,7 @@ module XeroRuby
17727
17912
  # @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors
17728
17913
  # @option opts [Integer] :unitdp e.g. unitdp&#x3D;4 – (Unit Decimal Places) You can opt in to use four decimal places for unit amounts
17729
17914
  # @option opts [String] :idempotency_key This allows you to safely retry requests without the risk of duplicate processing. 128 character max.
17915
+ # @option opts [Boolean] :allow_backorders Allows an invoice to be created even when one or more line items contain tracked inventory where the invoice quantity would cause the available quantity to go negative
17730
17916
  # @return [Array<(Invoices, Integer, Hash)>] Invoices data, response status code and response headers
17731
17917
  def update_or_create_invoices_with_http_info(xero_tenant_id, invoices, options = {})
17732
17918
  opts = options.dup
@@ -17751,6 +17937,7 @@ module XeroRuby
17751
17937
  query_params = opts[:query_params] || {}
17752
17938
  query_params[:'summarizeErrors'] = opts[:'summarize_errors'] if !opts[:'summarize_errors'].nil?
17753
17939
  query_params[:'unitdp'] = opts[:'unitdp'] if !opts[:'unitdp'].nil?
17940
+ query_params[:'allowBackorders'] = opts[:'allow_backorders'] if !opts[:'allow_backorders'].nil?
17754
17941
 
17755
17942
  # XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
17756
17943
  query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
@@ -55,9 +55,42 @@ module XeroRuby::Accounting
55
55
  # UTC timestamp of creation date of bank transfer
56
56
  attr_accessor :created_date_utc
57
57
 
58
+ # AUTHORISED or DELETED (read-only). New bank transfers will have a status of AUTHORISED.
59
+ attr_accessor :status
60
+ AUTHORISED ||= "AUTHORISED".freeze
61
+ DELETED ||= "DELETED".freeze
62
+
63
+ # Optional Tracking Category for the source account – see Tracking. A bank transfer can have a maximum of 2 tracking categories per account.
64
+ attr_accessor :from_tracking
65
+
66
+ # Optional Tracking Category for the destination account – see Tracking. A bank transfer can have a maximum of 2 tracking categories per account.
67
+ attr_accessor :to_tracking
68
+
58
69
  # Displays array of validation error messages from the API
59
70
  attr_accessor :validation_errors
60
71
 
72
+ class EnumAttributeValidator
73
+ attr_reader :datatype
74
+ attr_reader :allowable_values
75
+
76
+ def initialize(datatype, allowable_values)
77
+ @allowable_values = allowable_values.map do |value|
78
+ case datatype.to_s
79
+ when /Integer/i
80
+ value.to_i
81
+ when /Float/i
82
+ value.to_f
83
+ else
84
+ value
85
+ end
86
+ end
87
+ end
88
+
89
+ def valid?(value)
90
+ !value || allowable_values.include?(value)
91
+ end
92
+ end
93
+
61
94
  # Attribute mapping from ruby-style variable name to JSON key.
62
95
  def self.attribute_map
63
96
  {
@@ -74,6 +107,9 @@ module XeroRuby::Accounting
74
107
  :'reference' => :'Reference',
75
108
  :'has_attachments' => :'HasAttachments',
76
109
  :'created_date_utc' => :'CreatedDateUTC',
110
+ :'status' => :'Status',
111
+ :'from_tracking' => :'FromTracking',
112
+ :'to_tracking' => :'ToTracking',
77
113
  :'validation_errors' => :'ValidationErrors'
78
114
  }
79
115
  end
@@ -94,6 +130,9 @@ module XeroRuby::Accounting
94
130
  :'reference' => :'String',
95
131
  :'has_attachments' => :'Boolean',
96
132
  :'created_date_utc' => :'DateTime',
133
+ :'status' => :'String',
134
+ :'from_tracking' => :'Array<TrackingReference>',
135
+ :'to_tracking' => :'Array<TrackingReference>',
97
136
  :'validation_errors' => :'Array<ValidationError>'
98
137
  }
99
138
  end
@@ -171,6 +210,22 @@ module XeroRuby::Accounting
171
210
  self.created_date_utc = attributes[:'created_date_utc']
172
211
  end
173
212
 
213
+ if attributes.key?(:'status')
214
+ self.status = attributes[:'status']
215
+ end
216
+
217
+ if attributes.key?(:'from_tracking')
218
+ if (value = attributes[:'from_tracking']).is_a?(Array)
219
+ self.from_tracking = value
220
+ end
221
+ end
222
+
223
+ if attributes.key?(:'to_tracking')
224
+ if (value = attributes[:'to_tracking']).is_a?(Array)
225
+ self.to_tracking = value
226
+ end
227
+ end
228
+
174
229
  if attributes.key?(:'validation_errors')
175
230
  if (value = attributes[:'validation_errors']).is_a?(Array)
176
231
  self.validation_errors = value
@@ -203,9 +258,21 @@ module XeroRuby::Accounting
203
258
  return false if @from_bank_account.nil?
204
259
  return false if @to_bank_account.nil?
205
260
  return false if @amount.nil?
261
+ status_validator = EnumAttributeValidator.new('String', ["AUTHORISED", "DELETED"])
262
+ return false unless status_validator.valid?(@status)
206
263
  true
207
264
  end
208
265
 
266
+ # Custom attribute writer method checking allowed values (enum).
267
+ # @param [Object] status Object to be assigned
268
+ def status=(status)
269
+ validator = EnumAttributeValidator.new('String', ["AUTHORISED", "DELETED"])
270
+ unless validator.valid?(status)
271
+ fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
272
+ end
273
+ @status = status
274
+ end
275
+
209
276
  # Checks equality by comparing each attribute.
210
277
  # @param [Object] Object to be compared
211
278
  def ==(o)
@@ -224,6 +291,9 @@ module XeroRuby::Accounting
224
291
  reference == o.reference &&
225
292
  has_attachments == o.has_attachments &&
226
293
  created_date_utc == o.created_date_utc &&
294
+ status == o.status &&
295
+ from_tracking == o.from_tracking &&
296
+ to_tracking == o.to_tracking &&
227
297
  validation_errors == o.validation_errors
228
298
  end
229
299
 
@@ -236,7 +306,7 @@ module XeroRuby::Accounting
236
306
  # Calculates hash code according to all attributes.
237
307
  # @return [Integer] Hash code
238
308
  def hash
239
- [from_bank_account, to_bank_account, amount, date, bank_transfer_id, currency_rate, from_bank_transaction_id, to_bank_transaction_id, from_is_reconciled, to_is_reconciled, reference, has_attachments, created_date_utc, validation_errors].hash
309
+ [from_bank_account, to_bank_account, amount, date, bank_transfer_id, currency_rate, from_bank_transaction_id, to_bank_transaction_id, from_is_reconciled, to_is_reconciled, reference, has_attachments, created_date_utc, status, from_tracking, to_tracking, validation_errors].hash
240
310
  end
241
311
 
242
312
  # Builds the object from hash