Skip to content

Commit

Permalink
Merge pull request #57 from XeroAPI/advanced_filtering_sorting
Browse files Browse the repository at this point in the history
Advanced filtering sorting
  • Loading branch information
SerKnight authored Aug 21, 2020
2 parents 6bb2b80 + a61e3a9 commit ba533e8
Show file tree
Hide file tree
Showing 156 changed files with 1,737 additions and 286 deletions.
291 changes: 169 additions & 122 deletions README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/accounting/Attachment.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Name | Type | Description | Notes
**file_name** | **String** | Name of the file | [optional]
**url** | **String** | URL to the file on xero.com | [optional]
**mime_type** | **String** | Type of file | [optional]
**content_length** | **Float** | Length of the file content | [optional]
**content_length** | **Integer** | Length of the file content | [optional]
**include_online** | **Boolean** | Include the file with the online invoice | [optional]

## Code Sample
Expand Down
2 changes: 1 addition & 1 deletion lib/xero-ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
The version of the OpenAPI document: 2.2.11
The version of the OpenAPI document: 2.2.12
Contact: [email protected]
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 4.3.1
Expand Down
1,292 changes: 1,291 additions & 1 deletion lib/xero-ruby/api/accounting_api.rb

Large diffs are not rendered by default.

38 changes: 37 additions & 1 deletion lib/xero-ruby/api/asset_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#This is the Xero Assets API
The version of the OpenAPI document: 2.2.11
The version of the OpenAPI document: 2.2.12
Contact: [email protected]
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 4.3.1
Expand Down Expand Up @@ -51,8 +51,14 @@ def create_asset_with_http_info(xero_tenant_id, asset, opts = {})
# resource path
local_var_path = '/Assets'

# camelize keys of incoming `where` opts
opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil?
# query parameters
query_params = opts[:query_params] || {}

# 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?
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

# header parameters
header_params = opts[:header_params] || {}
Expand Down Expand Up @@ -118,8 +124,14 @@ def create_asset_type_with_http_info(xero_tenant_id, opts = {})
# resource path
local_var_path = '/AssetTypes'

# camelize keys of incoming `where` opts
opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil?
# query parameters
query_params = opts[:query_params] || {}

# 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?
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

# header parameters
header_params = opts[:header_params] || {}
Expand Down Expand Up @@ -189,8 +201,14 @@ def get_asset_by_id_with_http_info(xero_tenant_id, id, opts = {})
# resource path
local_var_path = '/Assets/{id}'.sub('{' + 'id' + '}', id.to_s)

# camelize keys of incoming `where` opts
opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil?
# query parameters
query_params = opts[:query_params] || {}

# 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?
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

# header parameters
header_params = opts[:header_params] || {}
Expand Down Expand Up @@ -252,8 +270,14 @@ def get_asset_settings_with_http_info(xero_tenant_id, opts = {})
# resource path
local_var_path = '/Settings'

# camelize keys of incoming `where` opts
opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil?
# query parameters
query_params = opts[:query_params] || {}

# 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?
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

# header parameters
header_params = opts[:header_params] || {}
Expand Down Expand Up @@ -315,8 +339,14 @@ def get_asset_types_with_http_info(xero_tenant_id, opts = {})
# resource path
local_var_path = '/AssetTypes'

# camelize keys of incoming `where` opts
opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil?
# query parameters
query_params = opts[:query_params] || {}

# 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?
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

# header parameters
header_params = opts[:header_params] || {}
Expand Down Expand Up @@ -406,6 +436,8 @@ def get_assets_with_http_info(xero_tenant_id, status, opts = {})
# resource path
local_var_path = '/Assets'

# camelize keys of incoming `where` opts
opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil?
# query parameters
query_params = opts[:query_params] || {}
query_params[:'status'] = status
Expand All @@ -414,6 +446,10 @@ def get_assets_with_http_info(xero_tenant_id, status, opts = {})
query_params[:'orderBy'] = opts[:'order_by'] if !opts[:'order_by'].nil?
query_params[:'sortDirection'] = opts[:'sort_direction'] if !opts[:'sort_direction'].nil?
query_params[:'filterBy'] = opts[:'filter_by'] if !opts[:'filter_by'].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?
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

# header parameters
header_params = opts[:header_params] || {}
Expand Down
80 changes: 79 additions & 1 deletion lib/xero-ruby/api/project_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#This is the Xero Projects API
The version of the OpenAPI document: 2.2.11
The version of the OpenAPI document: 2.2.12
Contact: [email protected]
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 4.3.1
Expand Down Expand Up @@ -49,8 +49,14 @@ def create_project_with_http_info(xero_tenant_id, project_create_or_update, opts
# resource path
local_var_path = '/projects'

# camelize keys of incoming `where` opts
opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil?
# query parameters
query_params = opts[:query_params] || {}

# 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?
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

# header parameters
header_params = opts[:header_params] || {}
Expand Down Expand Up @@ -126,8 +132,14 @@ def create_time_entry_with_http_info(xero_tenant_id, project_id, time_entry_crea
# resource path
local_var_path = '/projects/{projectId}/time'.sub('{' + 'projectId' + '}', project_id.to_s)

# camelize keys of incoming `where` opts
opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil?
# query parameters
query_params = opts[:query_params] || {}

# 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?
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

# header parameters
header_params = opts[:header_params] || {}
Expand Down Expand Up @@ -203,8 +215,14 @@ def delete_time_entry_with_http_info(xero_tenant_id, project_id, time_entry_id,
# resource path
local_var_path = '/projects/{projectId}/time/{timeEntryId}'.sub('{' + 'projectId' + '}', project_id.to_s).sub('{' + 'timeEntryId' + '}', time_entry_id.to_s)

# camelize keys of incoming `where` opts
opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil?
# query parameters
query_params = opts[:query_params] || {}

# 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?
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

# header parameters
header_params = opts[:header_params] || {}
Expand Down Expand Up @@ -270,8 +288,14 @@ def get_project_with_http_info(xero_tenant_id, project_id, opts = {})
# resource path
local_var_path = '/projects/{projectId}'.sub('{' + 'projectId' + '}', project_id.to_s)

# camelize keys of incoming `where` opts
opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil?
# query parameters
query_params = opts[:query_params] || {}

# 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?
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

# header parameters
header_params = opts[:header_params] || {}
Expand Down Expand Up @@ -345,10 +369,16 @@ def get_project_users_with_http_info(xero_tenant_id, opts = {})
# resource path
local_var_path = '/projectsusers'

# camelize keys of incoming `where` opts
opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil?
# query parameters
query_params = opts[:query_params] || {}
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?
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

# header parameters
header_params = opts[:header_params] || {}
Expand Down Expand Up @@ -428,13 +458,19 @@ def get_projects_with_http_info(xero_tenant_id, opts = {})
# resource path
local_var_path = '/projects'

# camelize keys of incoming `where` opts
opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil?
# query parameters
query_params = opts[:query_params] || {}
query_params[:'projectIds'] = @api_client.build_collection_param(opts[:'project_ids'], :multi) if !opts[:'project_ids'].nil?
query_params[:'contactID'] = opts[:'contact_id'] if !opts[:'contact_id'].nil?
query_params[:'states'] = opts[:'states'] if !opts[:'states'].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?
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

# header parameters
header_params = opts[:header_params] || {}
Expand Down Expand Up @@ -508,8 +544,14 @@ def get_task_with_http_info(xero_tenant_id, project_id, task_id, opts = {})
# resource path
local_var_path = '/projects/{projectId}/tasks/{taskId}'.sub('{' + 'projectId' + '}', project_id.to_s).sub('{' + 'taskId' + '}', task_id.to_s)

# camelize keys of incoming `where` opts
opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil?
# query parameters
query_params = opts[:query_params] || {}

# 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?
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

# header parameters
header_params = opts[:header_params] || {}
Expand Down Expand Up @@ -583,11 +625,17 @@ def get_tasks_with_http_info(xero_tenant_id, project_id, opts = {})
# resource path
local_var_path = '/projects/{projectId}/tasks'.sub('{' + 'projectId' + '}', project_id.to_s)

# camelize keys of incoming `where` opts
opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil?
# query parameters
query_params = opts[:query_params] || {}
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
query_params[:'taskIds'] = opts[:'task_ids'] if !opts[:'task_ids'].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?
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

# header parameters
header_params = opts[:header_params] || {}
Expand Down Expand Up @@ -675,6 +723,8 @@ def get_time_entries_with_http_info(xero_tenant_id, project_id, opts = {})
# resource path
local_var_path = '/projects/{projectId}/time'.sub('{' + 'projectId' + '}', project_id.to_s)

# camelize keys of incoming `where` opts
opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil?
# query parameters
query_params = opts[:query_params] || {}
query_params[:'userId'] = opts[:'user_id'] if !opts[:'user_id'].nil?
Expand All @@ -687,6 +737,10 @@ def get_time_entries_with_http_info(xero_tenant_id, project_id, opts = {})
query_params[:'isChargeable'] = opts[:'is_chargeable'] if !opts[:'is_chargeable'].nil?
query_params[:'dateAfterUtc'] = opts[:'date_after_utc'] if !opts[:'date_after_utc'].nil?
query_params[:'dateBeforeUtc'] = opts[:'date_before_utc'] if !opts[:'date_before_utc'].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?
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

# header parameters
header_params = opts[:header_params] || {}
Expand Down Expand Up @@ -760,8 +814,14 @@ def get_time_entry_with_http_info(xero_tenant_id, project_id, time_entry_id, opt
# resource path
local_var_path = '/projects/{projectId}/time/{timeEntryId}'.sub('{' + 'projectId' + '}', project_id.to_s).sub('{' + 'timeEntryId' + '}', time_entry_id.to_s)

# camelize keys of incoming `where` opts
opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil?
# query parameters
query_params = opts[:query_params] || {}

# 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?
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

# header parameters
header_params = opts[:header_params] || {}
Expand Down Expand Up @@ -835,8 +895,14 @@ def patch_project_with_http_info(xero_tenant_id, project_id, project_patch, opts
# resource path
local_var_path = '/projects/{projectId}'.sub('{' + 'projectId' + '}', project_id.to_s)

# camelize keys of incoming `where` opts
opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil?
# query parameters
query_params = opts[:query_params] || {}

# 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?
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

# header parameters
header_params = opts[:header_params] || {}
Expand Down Expand Up @@ -912,8 +978,14 @@ def update_project_with_http_info(xero_tenant_id, project_id, project_create_or_
# resource path
local_var_path = '/projects/{projectId}'.sub('{' + 'projectId' + '}', project_id.to_s)

# camelize keys of incoming `where` opts
opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil?
# query parameters
query_params = opts[:query_params] || {}

# 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?
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

# header parameters
header_params = opts[:header_params] || {}
Expand Down Expand Up @@ -995,8 +1067,14 @@ def update_time_entry_with_http_info(xero_tenant_id, project_id, time_entry_id,
# resource path
local_var_path = '/projects/{projectId}/time/{timeEntryId}'.sub('{' + 'projectId' + '}', project_id.to_s).sub('{' + 'timeEntryId' + '}', time_entry_id.to_s)

# camelize keys of incoming `where` opts
opts[:'where'] = opts[:'where'].map{|k,v| "#{@api_client.camelize_key(k)}#{v}"}.join(' AND ') if !opts[:'where'].nil?
# query parameters
query_params = opts[:query_params] || {}

# 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?
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?

# header parameters
header_params = opts[:header_params] || {}
Expand Down
Loading

0 comments on commit ba533e8

Please sign in to comment.