xero-ruby 3.0.0 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/xero-ruby.rb +3 -0
- data/lib/xero-ruby/api/accounting_api.rb +300 -147
- data/lib/xero-ruby/models/accounting/budget.rb +321 -0
- data/lib/xero-ruby/models/accounting/budget_lines.rb +265 -0
- data/lib/xero-ruby/models/accounting/budgets.rb +222 -0
- data/lib/xero-ruby/models/accounting/line_item.rb +11 -1
- data/lib/xero-ruby/models/accounting/report.rb +1 -11
- data/lib/xero-ruby/models/accounting/report_with_row.rb +1 -1
- data/lib/xero-ruby/version.rb +2 -2
- metadata +8 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ffd60e2ce8ccc28aec721bb3fa1e1eb7d33ef427799a591827844643f461a920
|
4
|
+
data.tar.gz: 76450e0771d835e052b18e1b766cc29e4e961f5aa5310b59e636eaef910a7220
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7df939becf48e628528870a3cef4264df6d37c059796ef52a80d20c1450497c324e5042adea2c3db8644000c443436a5e0517add5fd27e53c672fba45cb57366
|
7
|
+
data.tar.gz: 6e151873e866dec1db63ffa24a857438dccc29e65aa126fa43e9d6978a4cb2e563f2e0feca202d88c6431d99403e06377530626d5f00815c001a31ce02072d3a
|
data/lib/xero-ruby.rb
CHANGED
@@ -349,6 +349,9 @@ require 'xero-ruby/models/accounting/batch_payments'
|
|
349
349
|
require 'xero-ruby/models/accounting/bill'
|
350
350
|
require 'xero-ruby/models/accounting/branding_theme'
|
351
351
|
require 'xero-ruby/models/accounting/branding_themes'
|
352
|
+
require 'xero-ruby/models/accounting/budget'
|
353
|
+
require 'xero-ruby/models/accounting/budget_lines'
|
354
|
+
require 'xero-ruby/models/accounting/budgets'
|
352
355
|
require 'xero-ruby/models/accounting/cis_org_setting'
|
353
356
|
require 'xero-ruby/models/accounting/cis_org_settings'
|
354
357
|
require 'xero-ruby/models/accounting/cis_setting'
|
@@ -7018,6 +7018,159 @@ module XeroRuby
|
|
7018
7018
|
return data, status_code, headers
|
7019
7019
|
end
|
7020
7020
|
|
7021
|
+
# Retrieves a specific budgets, which includes budget lines
|
7022
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
7023
|
+
# @param budget_id [String] Unique identifier for Budgets
|
7024
|
+
# @param [Hash] opts the optional parameters
|
7025
|
+
# @return [Budgets]
|
7026
|
+
def get_budget(xero_tenant_id, budget_id, opts = {})
|
7027
|
+
data, _status_code, _headers = get_budget_with_http_info(xero_tenant_id, budget_id, opts)
|
7028
|
+
data
|
7029
|
+
end
|
7030
|
+
|
7031
|
+
# Retrieves a specific budgets, which includes budget lines
|
7032
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
7033
|
+
# @param budget_id [String] Unique identifier for Budgets
|
7034
|
+
# @param [Hash] opts the optional parameters
|
7035
|
+
# @return [Array<(Budgets, Integer, Hash)>] Budgets data, response status code and response headers
|
7036
|
+
def get_budget_with_http_info(xero_tenant_id, budget_id, options = {})
|
7037
|
+
opts = options.dup
|
7038
|
+
if @api_client.config.debugging
|
7039
|
+
@api_client.config.logger.debug 'Calling API: AccountingApi.get_budget ...'
|
7040
|
+
end
|
7041
|
+
# verify the required parameter 'xero_tenant_id' is set
|
7042
|
+
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
7043
|
+
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_budget"
|
7044
|
+
end
|
7045
|
+
# verify the required parameter 'budget_id' is set
|
7046
|
+
if @api_client.config.client_side_validation && budget_id.nil?
|
7047
|
+
fail ArgumentError, "Missing the required parameter 'budget_id' when calling AccountingApi.get_budget"
|
7048
|
+
end
|
7049
|
+
# resource path
|
7050
|
+
local_var_path = '/Budgets/{BudgetID}'.sub('{' + 'BudgetID' + '}', budget_id.to_s)
|
7051
|
+
|
7052
|
+
# camelize keys of incoming `where` opts
|
7053
|
+
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
7054
|
+
|
7055
|
+
# query parameters
|
7056
|
+
query_params = opts[:query_params] || {}
|
7057
|
+
|
7058
|
+
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
7059
|
+
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
7060
|
+
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
7061
|
+
|
7062
|
+
# header parameters
|
7063
|
+
header_params = opts[:header_params] || {}
|
7064
|
+
# HTTP header 'Accept' (if needed)
|
7065
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
7066
|
+
header_params[:'xero-tenant-id'] = xero_tenant_id
|
7067
|
+
|
7068
|
+
# form parameters
|
7069
|
+
form_params = opts[:form_params] || {}
|
7070
|
+
|
7071
|
+
# http body (model)
|
7072
|
+
post_body = opts[:body]
|
7073
|
+
|
7074
|
+
# return_type
|
7075
|
+
return_type = opts[:return_type] || 'Budgets'
|
7076
|
+
|
7077
|
+
# auth_names
|
7078
|
+
auth_names = opts[:auth_names] || ['OAuth2']
|
7079
|
+
|
7080
|
+
new_options = opts.merge(
|
7081
|
+
:header_params => header_params,
|
7082
|
+
:query_params => query_params,
|
7083
|
+
:form_params => form_params,
|
7084
|
+
:body => post_body,
|
7085
|
+
:auth_names => auth_names,
|
7086
|
+
:return_type => return_type
|
7087
|
+
)
|
7088
|
+
|
7089
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options)
|
7090
|
+
if @api_client.config.debugging
|
7091
|
+
@api_client.config.logger.debug "API called: AccountingApi#get_budget\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
7092
|
+
end
|
7093
|
+
return data, status_code, headers
|
7094
|
+
end
|
7095
|
+
|
7096
|
+
# Retrieve a list of budgets
|
7097
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
7098
|
+
# @param [Hash] opts the optional parameters
|
7099
|
+
# @option opts [Array<String>] :i_ds Filter by BudgetID. Allows you to retrieve a specific individual budget.
|
7100
|
+
# @option opts [Date] :date_to Filter by start date
|
7101
|
+
# @option opts [Date] :date_from Filter by end date
|
7102
|
+
# @return [Budgets]
|
7103
|
+
def get_budgets(xero_tenant_id, opts = {})
|
7104
|
+
data, _status_code, _headers = get_budgets_with_http_info(xero_tenant_id, opts)
|
7105
|
+
data
|
7106
|
+
end
|
7107
|
+
|
7108
|
+
# Retrieve a list of budgets
|
7109
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
7110
|
+
# @param [Hash] opts the optional parameters
|
7111
|
+
# @option opts [Array<String>] :i_ds Filter by BudgetID. Allows you to retrieve a specific individual budget.
|
7112
|
+
# @option opts [Date] :date_to Filter by start date
|
7113
|
+
# @option opts [Date] :date_from Filter by end date
|
7114
|
+
# @return [Array<(Budgets, Integer, Hash)>] Budgets data, response status code and response headers
|
7115
|
+
def get_budgets_with_http_info(xero_tenant_id, options = {})
|
7116
|
+
opts = options.dup
|
7117
|
+
if @api_client.config.debugging
|
7118
|
+
@api_client.config.logger.debug 'Calling API: AccountingApi.get_budgets ...'
|
7119
|
+
end
|
7120
|
+
# verify the required parameter 'xero_tenant_id' is set
|
7121
|
+
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
7122
|
+
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_budgets"
|
7123
|
+
end
|
7124
|
+
# resource path
|
7125
|
+
local_var_path = '/Budgets'
|
7126
|
+
|
7127
|
+
# camelize keys of incoming `where` opts
|
7128
|
+
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
7129
|
+
|
7130
|
+
# query parameters
|
7131
|
+
query_params = opts[:query_params] || {}
|
7132
|
+
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'i_ds'], :csv) if !opts[:'i_ds'].nil?
|
7133
|
+
query_params[:'DateTo'] = opts[:'date_to'] if !opts[:'date_to'].nil?
|
7134
|
+
query_params[:'DateFrom'] = opts[:'date_from'] if !opts[:'date_from'].nil?
|
7135
|
+
|
7136
|
+
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
7137
|
+
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
7138
|
+
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
7139
|
+
|
7140
|
+
# header parameters
|
7141
|
+
header_params = opts[:header_params] || {}
|
7142
|
+
# HTTP header 'Accept' (if needed)
|
7143
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
7144
|
+
header_params[:'xero-tenant-id'] = xero_tenant_id
|
7145
|
+
|
7146
|
+
# form parameters
|
7147
|
+
form_params = opts[:form_params] || {}
|
7148
|
+
|
7149
|
+
# http body (model)
|
7150
|
+
post_body = opts[:body]
|
7151
|
+
|
7152
|
+
# return_type
|
7153
|
+
return_type = opts[:return_type] || 'Budgets'
|
7154
|
+
|
7155
|
+
# auth_names
|
7156
|
+
auth_names = opts[:auth_names] || ['OAuth2']
|
7157
|
+
|
7158
|
+
new_options = opts.merge(
|
7159
|
+
:header_params => header_params,
|
7160
|
+
:query_params => query_params,
|
7161
|
+
:form_params => form_params,
|
7162
|
+
:body => post_body,
|
7163
|
+
:auth_names => auth_names,
|
7164
|
+
:return_type => return_type
|
7165
|
+
)
|
7166
|
+
|
7167
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options)
|
7168
|
+
if @api_client.config.debugging
|
7169
|
+
@api_client.config.logger.debug "API called: AccountingApi#get_budgets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
7170
|
+
end
|
7171
|
+
return data, status_code, headers
|
7172
|
+
end
|
7173
|
+
|
7021
7174
|
# Retrieves a specific contacts in a Xero organisation using a unique contact Id
|
7022
7175
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
7023
7176
|
# @param contact_id [String] Unique identifier for a Contact
|
@@ -13916,150 +14069,6 @@ module XeroRuby
|
|
13916
14069
|
return data, status_code, headers
|
13917
14070
|
end
|
13918
14071
|
|
13919
|
-
# Retrieves a specific report for BAS using a unique report Id (only valid for AU orgs)
|
13920
|
-
# @param xero_tenant_id [String] Xero identifier for Tenant
|
13921
|
-
# @param report_id [String] Unique identifier for a Report
|
13922
|
-
# @param [Hash] opts the optional parameters
|
13923
|
-
# @return [ReportWithRows]
|
13924
|
-
def get_report_ba_sor_gst(xero_tenant_id, report_id, opts = {})
|
13925
|
-
data, _status_code, _headers = get_report_ba_sor_gst_with_http_info(xero_tenant_id, report_id, opts)
|
13926
|
-
data
|
13927
|
-
end
|
13928
|
-
|
13929
|
-
# Retrieves a specific report for BAS using a unique report Id (only valid for AU orgs)
|
13930
|
-
# @param xero_tenant_id [String] Xero identifier for Tenant
|
13931
|
-
# @param report_id [String] Unique identifier for a Report
|
13932
|
-
# @param [Hash] opts the optional parameters
|
13933
|
-
# @return [Array<(ReportWithRows, Integer, Hash)>] ReportWithRows data, response status code and response headers
|
13934
|
-
def get_report_ba_sor_gst_with_http_info(xero_tenant_id, report_id, options = {})
|
13935
|
-
opts = options.dup
|
13936
|
-
if @api_client.config.debugging
|
13937
|
-
@api_client.config.logger.debug 'Calling API: AccountingApi.get_report_ba_sor_gst ...'
|
13938
|
-
end
|
13939
|
-
# verify the required parameter 'xero_tenant_id' is set
|
13940
|
-
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
13941
|
-
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_report_ba_sor_gst"
|
13942
|
-
end
|
13943
|
-
# verify the required parameter 'report_id' is set
|
13944
|
-
if @api_client.config.client_side_validation && report_id.nil?
|
13945
|
-
fail ArgumentError, "Missing the required parameter 'report_id' when calling AccountingApi.get_report_ba_sor_gst"
|
13946
|
-
end
|
13947
|
-
# resource path
|
13948
|
-
local_var_path = '/Reports/{ReportID}'.sub('{' + 'ReportID' + '}', report_id.to_s)
|
13949
|
-
|
13950
|
-
# camelize keys of incoming `where` opts
|
13951
|
-
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
13952
|
-
|
13953
|
-
# query parameters
|
13954
|
-
query_params = opts[:query_params] || {}
|
13955
|
-
|
13956
|
-
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
13957
|
-
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
13958
|
-
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
13959
|
-
|
13960
|
-
# header parameters
|
13961
|
-
header_params = opts[:header_params] || {}
|
13962
|
-
# HTTP header 'Accept' (if needed)
|
13963
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
13964
|
-
header_params[:'xero-tenant-id'] = xero_tenant_id
|
13965
|
-
|
13966
|
-
# form parameters
|
13967
|
-
form_params = opts[:form_params] || {}
|
13968
|
-
|
13969
|
-
# http body (model)
|
13970
|
-
post_body = opts[:body]
|
13971
|
-
|
13972
|
-
# return_type
|
13973
|
-
return_type = opts[:return_type] || 'ReportWithRows'
|
13974
|
-
|
13975
|
-
# auth_names
|
13976
|
-
auth_names = opts[:auth_names] || ['OAuth2']
|
13977
|
-
|
13978
|
-
new_options = opts.merge(
|
13979
|
-
:header_params => header_params,
|
13980
|
-
:query_params => query_params,
|
13981
|
-
:form_params => form_params,
|
13982
|
-
:body => post_body,
|
13983
|
-
:auth_names => auth_names,
|
13984
|
-
:return_type => return_type
|
13985
|
-
)
|
13986
|
-
|
13987
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options)
|
13988
|
-
if @api_client.config.debugging
|
13989
|
-
@api_client.config.logger.debug "API called: AccountingApi#get_report_ba_sor_gst\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
13990
|
-
end
|
13991
|
-
return data, status_code, headers
|
13992
|
-
end
|
13993
|
-
|
13994
|
-
# Retrieves report for BAS (only valid for AU orgs)
|
13995
|
-
# @param xero_tenant_id [String] Xero identifier for Tenant
|
13996
|
-
# @param [Hash] opts the optional parameters
|
13997
|
-
# @return [ReportWithRows]
|
13998
|
-
def get_report_ba_sor_gst_list(xero_tenant_id, opts = {})
|
13999
|
-
data, _status_code, _headers = get_report_ba_sor_gst_list_with_http_info(xero_tenant_id, opts)
|
14000
|
-
data
|
14001
|
-
end
|
14002
|
-
|
14003
|
-
# Retrieves report for BAS (only valid for AU orgs)
|
14004
|
-
# @param xero_tenant_id [String] Xero identifier for Tenant
|
14005
|
-
# @param [Hash] opts the optional parameters
|
14006
|
-
# @return [Array<(ReportWithRows, Integer, Hash)>] ReportWithRows data, response status code and response headers
|
14007
|
-
def get_report_ba_sor_gst_list_with_http_info(xero_tenant_id, options = {})
|
14008
|
-
opts = options.dup
|
14009
|
-
if @api_client.config.debugging
|
14010
|
-
@api_client.config.logger.debug 'Calling API: AccountingApi.get_report_ba_sor_gst_list ...'
|
14011
|
-
end
|
14012
|
-
# verify the required parameter 'xero_tenant_id' is set
|
14013
|
-
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
14014
|
-
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_report_ba_sor_gst_list"
|
14015
|
-
end
|
14016
|
-
# resource path
|
14017
|
-
local_var_path = '/Reports'
|
14018
|
-
|
14019
|
-
# camelize keys of incoming `where` opts
|
14020
|
-
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
14021
|
-
|
14022
|
-
# query parameters
|
14023
|
-
query_params = opts[:query_params] || {}
|
14024
|
-
|
14025
|
-
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
14026
|
-
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
14027
|
-
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
14028
|
-
|
14029
|
-
# header parameters
|
14030
|
-
header_params = opts[:header_params] || {}
|
14031
|
-
# HTTP header 'Accept' (if needed)
|
14032
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
14033
|
-
header_params[:'xero-tenant-id'] = xero_tenant_id
|
14034
|
-
|
14035
|
-
# form parameters
|
14036
|
-
form_params = opts[:form_params] || {}
|
14037
|
-
|
14038
|
-
# http body (model)
|
14039
|
-
post_body = opts[:body]
|
14040
|
-
|
14041
|
-
# return_type
|
14042
|
-
return_type = opts[:return_type] || 'ReportWithRows'
|
14043
|
-
|
14044
|
-
# auth_names
|
14045
|
-
auth_names = opts[:auth_names] || ['OAuth2']
|
14046
|
-
|
14047
|
-
new_options = opts.merge(
|
14048
|
-
:header_params => header_params,
|
14049
|
-
:query_params => query_params,
|
14050
|
-
:form_params => form_params,
|
14051
|
-
:body => post_body,
|
14052
|
-
:auth_names => auth_names,
|
14053
|
-
:return_type => return_type
|
14054
|
-
)
|
14055
|
-
|
14056
|
-
data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options)
|
14057
|
-
if @api_client.config.debugging
|
14058
|
-
@api_client.config.logger.debug "API called: AccountingApi#get_report_ba_sor_gst_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
14059
|
-
end
|
14060
|
-
return data, status_code, headers
|
14061
|
-
end
|
14062
|
-
|
14063
14072
|
# Retrieves report for balancesheet
|
14064
14073
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
14065
14074
|
# @param [Hash] opts the optional parameters
|
@@ -14233,7 +14242,7 @@ module XeroRuby
|
|
14233
14242
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
14234
14243
|
# @param [Hash] opts the optional parameters
|
14235
14244
|
# @option opts [Date] :date The date for the Bank Summary report e.g. 2018-03-31
|
14236
|
-
# @option opts [Integer] :
|
14245
|
+
# @option opts [Integer] :periods The number of periods to compare (integer between 1 and 12)
|
14237
14246
|
# @option opts [Integer] :timeframe The period size to compare to (1=month, 3=quarter, 12=year)
|
14238
14247
|
# @return [ReportWithRows]
|
14239
14248
|
def get_report_budget_summary(xero_tenant_id, opts = {})
|
@@ -14245,7 +14254,7 @@ module XeroRuby
|
|
14245
14254
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
14246
14255
|
# @param [Hash] opts the optional parameters
|
14247
14256
|
# @option opts [Date] :date The date for the Bank Summary report e.g. 2018-03-31
|
14248
|
-
# @option opts [Integer] :
|
14257
|
+
# @option opts [Integer] :periods The number of periods to compare (integer between 1 and 12)
|
14249
14258
|
# @option opts [Integer] :timeframe The period size to compare to (1=month, 3=quarter, 12=year)
|
14250
14259
|
# @return [Array<(ReportWithRows, Integer, Hash)>] ReportWithRows data, response status code and response headers
|
14251
14260
|
def get_report_budget_summary_with_http_info(xero_tenant_id, options = {})
|
@@ -14266,7 +14275,7 @@ module XeroRuby
|
|
14266
14275
|
# query parameters
|
14267
14276
|
query_params = opts[:query_params] || {}
|
14268
14277
|
query_params[:'date'] = opts[:'date'] if !opts[:'date'].nil?
|
14269
|
-
query_params[:'
|
14278
|
+
query_params[:'periods'] = opts[:'periods'] if !opts[:'periods'].nil?
|
14270
14279
|
query_params[:'timeframe'] = opts[:'timeframe'] if !opts[:'timeframe'].nil?
|
14271
14280
|
|
14272
14281
|
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
@@ -14379,6 +14388,81 @@ module XeroRuby
|
|
14379
14388
|
return data, status_code, headers
|
14380
14389
|
end
|
14381
14390
|
|
14391
|
+
# Retrieves a specific report using a unique ReportID
|
14392
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
14393
|
+
# @param report_id [String] Unique identifier for a Report
|
14394
|
+
# @param [Hash] opts the optional parameters
|
14395
|
+
# @return [ReportWithRows]
|
14396
|
+
def get_report_from_id(xero_tenant_id, report_id, opts = {})
|
14397
|
+
data, _status_code, _headers = get_report_from_id_with_http_info(xero_tenant_id, report_id, opts)
|
14398
|
+
data
|
14399
|
+
end
|
14400
|
+
|
14401
|
+
# Retrieves a specific report using a unique ReportID
|
14402
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
14403
|
+
# @param report_id [String] Unique identifier for a Report
|
14404
|
+
# @param [Hash] opts the optional parameters
|
14405
|
+
# @return [Array<(ReportWithRows, Integer, Hash)>] ReportWithRows data, response status code and response headers
|
14406
|
+
def get_report_from_id_with_http_info(xero_tenant_id, report_id, options = {})
|
14407
|
+
opts = options.dup
|
14408
|
+
if @api_client.config.debugging
|
14409
|
+
@api_client.config.logger.debug 'Calling API: AccountingApi.get_report_from_id ...'
|
14410
|
+
end
|
14411
|
+
# verify the required parameter 'xero_tenant_id' is set
|
14412
|
+
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
14413
|
+
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_report_from_id"
|
14414
|
+
end
|
14415
|
+
# verify the required parameter 'report_id' is set
|
14416
|
+
if @api_client.config.client_side_validation && report_id.nil?
|
14417
|
+
fail ArgumentError, "Missing the required parameter 'report_id' when calling AccountingApi.get_report_from_id"
|
14418
|
+
end
|
14419
|
+
# resource path
|
14420
|
+
local_var_path = '/Reports/{ReportID}'.sub('{' + 'ReportID' + '}', report_id.to_s)
|
14421
|
+
|
14422
|
+
# camelize keys of incoming `where` opts
|
14423
|
+
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
14424
|
+
|
14425
|
+
# query parameters
|
14426
|
+
query_params = opts[:query_params] || {}
|
14427
|
+
|
14428
|
+
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
14429
|
+
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
14430
|
+
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
14431
|
+
|
14432
|
+
# header parameters
|
14433
|
+
header_params = opts[:header_params] || {}
|
14434
|
+
# HTTP header 'Accept' (if needed)
|
14435
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
14436
|
+
header_params[:'xero-tenant-id'] = xero_tenant_id
|
14437
|
+
|
14438
|
+
# form parameters
|
14439
|
+
form_params = opts[:form_params] || {}
|
14440
|
+
|
14441
|
+
# http body (model)
|
14442
|
+
post_body = opts[:body]
|
14443
|
+
|
14444
|
+
# return_type
|
14445
|
+
return_type = opts[:return_type] || 'ReportWithRows'
|
14446
|
+
|
14447
|
+
# auth_names
|
14448
|
+
auth_names = opts[:auth_names] || ['OAuth2']
|
14449
|
+
|
14450
|
+
new_options = opts.merge(
|
14451
|
+
:header_params => header_params,
|
14452
|
+
:query_params => query_params,
|
14453
|
+
:form_params => form_params,
|
14454
|
+
:body => post_body,
|
14455
|
+
:auth_names => auth_names,
|
14456
|
+
:return_type => return_type
|
14457
|
+
)
|
14458
|
+
|
14459
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options)
|
14460
|
+
if @api_client.config.debugging
|
14461
|
+
@api_client.config.logger.debug "API called: AccountingApi#get_report_from_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
14462
|
+
end
|
14463
|
+
return data, status_code, headers
|
14464
|
+
end
|
14465
|
+
|
14382
14466
|
# Retrieves report for profit and loss
|
14383
14467
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
14384
14468
|
# @param [Hash] opts the optional parameters
|
@@ -14629,6 +14713,75 @@ module XeroRuby
|
|
14629
14713
|
return data, status_code, headers
|
14630
14714
|
end
|
14631
14715
|
|
14716
|
+
# Retrieves a list of the organistaions unique reports that require a uuid to fetch
|
14717
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
14718
|
+
# @param [Hash] opts the optional parameters
|
14719
|
+
# @return [ReportWithRows]
|
14720
|
+
def get_reports_list(xero_tenant_id, opts = {})
|
14721
|
+
data, _status_code, _headers = get_reports_list_with_http_info(xero_tenant_id, opts)
|
14722
|
+
data
|
14723
|
+
end
|
14724
|
+
|
14725
|
+
# Retrieves a list of the organistaions unique reports that require a uuid to fetch
|
14726
|
+
# @param xero_tenant_id [String] Xero identifier for Tenant
|
14727
|
+
# @param [Hash] opts the optional parameters
|
14728
|
+
# @return [Array<(ReportWithRows, Integer, Hash)>] ReportWithRows data, response status code and response headers
|
14729
|
+
def get_reports_list_with_http_info(xero_tenant_id, options = {})
|
14730
|
+
opts = options.dup
|
14731
|
+
if @api_client.config.debugging
|
14732
|
+
@api_client.config.logger.debug 'Calling API: AccountingApi.get_reports_list ...'
|
14733
|
+
end
|
14734
|
+
# verify the required parameter 'xero_tenant_id' is set
|
14735
|
+
if @api_client.config.client_side_validation && xero_tenant_id.nil?
|
14736
|
+
fail ArgumentError, "Missing the required parameter 'xero_tenant_id' when calling AccountingApi.get_reports_list"
|
14737
|
+
end
|
14738
|
+
# resource path
|
14739
|
+
local_var_path = '/Reports'
|
14740
|
+
|
14741
|
+
# camelize keys of incoming `where` opts
|
14742
|
+
opts[:'where'] = @api_client.parameterize_where(opts[:'where']) if !opts[:'where'].nil?
|
14743
|
+
|
14744
|
+
# query parameters
|
14745
|
+
query_params = opts[:query_params] || {}
|
14746
|
+
|
14747
|
+
# XeroAPI's `IDs` convention openapi-generator does not snake_case properly.. manual over-riding `i_ds` malformations:
|
14748
|
+
query_params[:'IDs'] = @api_client.build_collection_param(opts[:'ids'], :csv) if !opts[:'ids'].nil?
|
14749
|
+
query_params[:'ContactIDs'] = @api_client.build_collection_param(opts[:'contact_ids'], :csv) if !opts[:'contact_ids'].nil?
|
14750
|
+
|
14751
|
+
# header parameters
|
14752
|
+
header_params = opts[:header_params] || {}
|
14753
|
+
# HTTP header 'Accept' (if needed)
|
14754
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
14755
|
+
header_params[:'xero-tenant-id'] = xero_tenant_id
|
14756
|
+
|
14757
|
+
# form parameters
|
14758
|
+
form_params = opts[:form_params] || {}
|
14759
|
+
|
14760
|
+
# http body (model)
|
14761
|
+
post_body = opts[:body]
|
14762
|
+
|
14763
|
+
# return_type
|
14764
|
+
return_type = opts[:return_type] || 'ReportWithRows'
|
14765
|
+
|
14766
|
+
# auth_names
|
14767
|
+
auth_names = opts[:auth_names] || ['OAuth2']
|
14768
|
+
|
14769
|
+
new_options = opts.merge(
|
14770
|
+
:header_params => header_params,
|
14771
|
+
:query_params => query_params,
|
14772
|
+
:form_params => form_params,
|
14773
|
+
:body => post_body,
|
14774
|
+
:auth_names => auth_names,
|
14775
|
+
:return_type => return_type
|
14776
|
+
)
|
14777
|
+
|
14778
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, "AccountingApi", new_options)
|
14779
|
+
if @api_client.config.debugging
|
14780
|
+
@api_client.config.logger.debug "API called: AccountingApi#get_reports_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
14781
|
+
end
|
14782
|
+
return data, status_code, headers
|
14783
|
+
end
|
14784
|
+
|
14632
14785
|
# Retrieves tax rates
|
14633
14786
|
# @param xero_tenant_id [String] Xero identifier for Tenant
|
14634
14787
|
# @param [Hash] opts the optional parameters
|