Class: FattureInCloud_Ruby_Sdk::InfoApi

Inherits:
Object
  • Object
show all
Defined in:
lib/fattureincloud_ruby_sdk/api/info_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ InfoApi

Returns a new instance of InfoApi.



19
20
21
# File 'lib/fattureincloud_ruby_sdk/api/info_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/fattureincloud_ruby_sdk/api/info_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#list_archive_categories(company_id, opts = {}) ⇒ ListArchiveCategoriesResponse

List Archive Categories Lists the archive categories.

Parameters:

  • company_id (Integer)

    The ID of the company.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



27
28
29
30
# File 'lib/fattureincloud_ruby_sdk/api/info_api.rb', line 27

def list_archive_categories(company_id, opts = {})
  data, _status_code, _headers = list_archive_categories_with_http_info(company_id, opts)
  data
end

#list_archive_categories_with_http_info(company_id, opts = {}) ⇒ Array<(ListArchiveCategoriesResponse, Integer, Hash)>

List Archive Categories Lists the archive categories.

Parameters:

  • company_id (Integer)

    The ID of the company.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# File 'lib/fattureincloud_ruby_sdk/api/info_api.rb', line 37

def list_archive_categories_with_http_info(company_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InfoApi.list_archive_categories ...'
  end
  # verify the required parameter 'company_id' is set
  if @api_client.config.client_side_validation && company_id.nil?
    fail ArgumentError, "Missing the required parameter 'company_id' when calling InfoApi.list_archive_categories"
  end
  # resource path
  local_var_path = '/c/{company_id}/info/archive_categories'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ListArchiveCategoriesResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['OAuth2AuthenticationCodeFlow']

  new_options = opts.merge(
    :operation => :"InfoApi.list_archive_categories",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InfoApi#list_archive_categories\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_cities(opts = {}) ⇒ ListCitiesResponse

List Cities Lists the Italian cities.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :postal_code (String)

    Postal code for filtering.

  • :city (String)

    City for filtering (ignored if postal_code is passed).

Returns:



91
92
93
94
# File 'lib/fattureincloud_ruby_sdk/api/info_api.rb', line 91

def list_cities(opts = {})
  data, _status_code, _headers = list_cities_with_http_info(opts)
  data
end

#list_cities_with_http_info(opts = {}) ⇒ Array<(ListCitiesResponse, Integer, Hash)>

List Cities Lists the Italian cities.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :postal_code (String)

    Postal code for filtering.

  • :city (String)

    City for filtering (ignored if postal_code is passed).

Returns:

  • (Array<(ListCitiesResponse, Integer, Hash)>)

    ListCitiesResponse data, response status code and response headers



102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
# File 'lib/fattureincloud_ruby_sdk/api/info_api.rb', line 102

def list_cities_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InfoApi.list_cities ...'
  end
  # resource path
  local_var_path = '/info/cities'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'postal_code'] = opts[:'postal_code'] if !opts[:'postal_code'].nil?
  query_params[:'city'] = opts[:'city'] if !opts[:'city'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ListCitiesResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['OAuth2AuthenticationCodeFlow']

  new_options = opts.merge(
    :operation => :"InfoApi.list_cities",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InfoApi#list_cities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_cost_centers(company_id, opts = {}) ⇒ ListCostCentersResponse

List Cost Centers Lists the cost centers.

Parameters:

  • company_id (Integer)

    The ID of the company.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



153
154
155
156
# File 'lib/fattureincloud_ruby_sdk/api/info_api.rb', line 153

def list_cost_centers(company_id, opts = {})
  data, _status_code, _headers = list_cost_centers_with_http_info(company_id, opts)
  data
end

#list_cost_centers_with_http_info(company_id, opts = {}) ⇒ Array<(ListCostCentersResponse, Integer, Hash)>

List Cost Centers Lists the cost centers.

Parameters:

  • company_id (Integer)

    The ID of the company.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ListCostCentersResponse, Integer, Hash)>)

    ListCostCentersResponse data, response status code and response headers



163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
# File 'lib/fattureincloud_ruby_sdk/api/info_api.rb', line 163

def list_cost_centers_with_http_info(company_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InfoApi.list_cost_centers ...'
  end
  # verify the required parameter 'company_id' is set
  if @api_client.config.client_side_validation && company_id.nil?
    fail ArgumentError, "Missing the required parameter 'company_id' when calling InfoApi.list_cost_centers"
  end
  # resource path
  local_var_path = '/c/{company_id}/info/cost_centers'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ListCostCentersResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['OAuth2AuthenticationCodeFlow']

  new_options = opts.merge(
    :operation => :"InfoApi.list_cost_centers",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InfoApi#list_cost_centers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_countries(opts = {}) ⇒ ListCountriesResponse

List Countries Lists the supported countries.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



215
216
217
218
# File 'lib/fattureincloud_ruby_sdk/api/info_api.rb', line 215

def list_countries(opts = {})
  data, _status_code, _headers = list_countries_with_http_info(opts)
  data
end

#list_countries_with_http_info(opts = {}) ⇒ Array<(ListCountriesResponse, Integer, Hash)>

List Countries Lists the supported countries.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ListCountriesResponse, Integer, Hash)>)

    ListCountriesResponse data, response status code and response headers



224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
# File 'lib/fattureincloud_ruby_sdk/api/info_api.rb', line 224

def list_countries_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InfoApi.list_countries ...'
  end
  # resource path
  local_var_path = '/info/countries'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ListCountriesResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['OAuth2AuthenticationCodeFlow']

  new_options = opts.merge(
    :operation => :"InfoApi.list_countries",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InfoApi#list_countries\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_currencies(opts = {}) ⇒ ListCurrenciesResponse

List Currencies Lists the supported currencies.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



272
273
274
275
# File 'lib/fattureincloud_ruby_sdk/api/info_api.rb', line 272

def list_currencies(opts = {})
  data, _status_code, _headers = list_currencies_with_http_info(opts)
  data
end

#list_currencies_with_http_info(opts = {}) ⇒ Array<(ListCurrenciesResponse, Integer, Hash)>

List Currencies Lists the supported currencies.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ListCurrenciesResponse, Integer, Hash)>)

    ListCurrenciesResponse data, response status code and response headers



281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
# File 'lib/fattureincloud_ruby_sdk/api/info_api.rb', line 281

def list_currencies_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InfoApi.list_currencies ...'
  end
  # resource path
  local_var_path = '/info/currencies'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ListCurrenciesResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['OAuth2AuthenticationCodeFlow']

  new_options = opts.merge(
    :operation => :"InfoApi.list_currencies",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InfoApi#list_currencies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_delivery_notes_default_causals(opts = {}) ⇒ ListDeliveryNotesDefaultCausalsResponse

List Delivery Notes Default Causals Lists the delivery note default causals.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



329
330
331
332
# File 'lib/fattureincloud_ruby_sdk/api/info_api.rb', line 329

def list_delivery_notes_default_causals(opts = {})
  data, _status_code, _headers = list_delivery_notes_default_causals_with_http_info(opts)
  data
end

#list_delivery_notes_default_causals_with_http_info(opts = {}) ⇒ Array<(ListDeliveryNotesDefaultCausalsResponse, Integer, Hash)>

List Delivery Notes Default Causals Lists the delivery note default causals.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
# File 'lib/fattureincloud_ruby_sdk/api/info_api.rb', line 338

def list_delivery_notes_default_causals_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InfoApi.list_delivery_notes_default_causals ...'
  end
  # resource path
  local_var_path = '/info/dn_causals'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ListDeliveryNotesDefaultCausalsResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['OAuth2AuthenticationCodeFlow']

  new_options = opts.merge(
    :operation => :"InfoApi.list_delivery_notes_default_causals",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InfoApi#list_delivery_notes_default_causals\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_languages(opts = {}) ⇒ ListLanguagesResponse

List Languages Lists the supported languages.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



386
387
388
389
# File 'lib/fattureincloud_ruby_sdk/api/info_api.rb', line 386

def list_languages(opts = {})
  data, _status_code, _headers = list_languages_with_http_info(opts)
  data
end

#list_languages_with_http_info(opts = {}) ⇒ Array<(ListLanguagesResponse, Integer, Hash)>

List Languages Lists the supported languages.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ListLanguagesResponse, Integer, Hash)>)

    ListLanguagesResponse data, response status code and response headers



395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
# File 'lib/fattureincloud_ruby_sdk/api/info_api.rb', line 395

def list_languages_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InfoApi.list_languages ...'
  end
  # resource path
  local_var_path = '/info/languages'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ListLanguagesResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['OAuth2AuthenticationCodeFlow']

  new_options = opts.merge(
    :operation => :"InfoApi.list_languages",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InfoApi#list_languages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_payment_accounts(company_id, opts = {}) ⇒ ListPaymentAccountsResponse

List Payment Accounts Lists the available payment accounts.

Parameters:

  • company_id (Integer)

    The ID of the company.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (String)

    List of comma-separated fields.

  • :fieldset (String)

    Name of the fieldset.

  • :sort (String)

    List of comma-separated fields for result sorting (minus for desc sorting).

Returns:



447
448
449
450
# File 'lib/fattureincloud_ruby_sdk/api/info_api.rb', line 447

def list_payment_accounts(company_id, opts = {})
  data, _status_code, _headers = list_payment_accounts_with_http_info(company_id, opts)
  data
end

#list_payment_accounts_with_http_info(company_id, opts = {}) ⇒ Array<(ListPaymentAccountsResponse, Integer, Hash)>

List Payment Accounts Lists the available payment accounts.

Parameters:

  • company_id (Integer)

    The ID of the company.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (String)

    List of comma-separated fields.

  • :fieldset (String)

    Name of the fieldset.

  • :sort (String)

    List of comma-separated fields for result sorting (minus for desc sorting).

Returns:

  • (Array<(ListPaymentAccountsResponse, Integer, Hash)>)

    ListPaymentAccountsResponse data, response status code and response headers



460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
# File 'lib/fattureincloud_ruby_sdk/api/info_api.rb', line 460

def list_payment_accounts_with_http_info(company_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InfoApi.list_payment_accounts ...'
  end
  # verify the required parameter 'company_id' is set
  if @api_client.config.client_side_validation && company_id.nil?
    fail ArgumentError, "Missing the required parameter 'company_id' when calling InfoApi.list_payment_accounts"
  end
  allowable_values = ["basic", "detailed"]
  if @api_client.config.client_side_validation && opts[:'fieldset'] && !allowable_values.include?(opts[:'fieldset'])
    fail ArgumentError, "invalid value for \"fieldset\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/c/{company_id}/info/payment_accounts'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
  query_params[:'fieldset'] = opts[:'fieldset'] if !opts[:'fieldset'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ListPaymentAccountsResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['OAuth2AuthenticationCodeFlow']

  new_options = opts.merge(
    :operation => :"InfoApi.list_payment_accounts",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InfoApi#list_payment_accounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_payment_methods(company_id, opts = {}) ⇒ ListPaymentMethodsResponse

List Payment Methods Lists the available payment methods.

Parameters:

  • company_id (Integer)

    The ID of the company.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (String)

    List of comma-separated fields.

  • :fieldset (String)

    Name of the fieldset.

  • :sort (String)

    List of comma-separated fields for result sorting (minus for desc sorting).

Returns:



523
524
525
526
# File 'lib/fattureincloud_ruby_sdk/api/info_api.rb', line 523

def list_payment_methods(company_id, opts = {})
  data, _status_code, _headers = list_payment_methods_with_http_info(company_id, opts)
  data
end

#list_payment_methods_with_http_info(company_id, opts = {}) ⇒ Array<(ListPaymentMethodsResponse, Integer, Hash)>

List Payment Methods Lists the available payment methods.

Parameters:

  • company_id (Integer)

    The ID of the company.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (String)

    List of comma-separated fields.

  • :fieldset (String)

    Name of the fieldset.

  • :sort (String)

    List of comma-separated fields for result sorting (minus for desc sorting).

Returns:

  • (Array<(ListPaymentMethodsResponse, Integer, Hash)>)

    ListPaymentMethodsResponse data, response status code and response headers



536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
# File 'lib/fattureincloud_ruby_sdk/api/info_api.rb', line 536

def list_payment_methods_with_http_info(company_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InfoApi.list_payment_methods ...'
  end
  # verify the required parameter 'company_id' is set
  if @api_client.config.client_side_validation && company_id.nil?
    fail ArgumentError, "Missing the required parameter 'company_id' when calling InfoApi.list_payment_methods"
  end
  allowable_values = ["basic", "detailed"]
  if @api_client.config.client_side_validation && opts[:'fieldset'] && !allowable_values.include?(opts[:'fieldset'])
    fail ArgumentError, "invalid value for \"fieldset\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/c/{company_id}/info/payment_methods'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
  query_params[:'fieldset'] = opts[:'fieldset'] if !opts[:'fieldset'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ListPaymentMethodsResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['OAuth2AuthenticationCodeFlow']

  new_options = opts.merge(
    :operation => :"InfoApi.list_payment_methods",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InfoApi#list_payment_methods\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_product_categories(company_id, context, opts = {}) ⇒ ListProductCategoriesResponse

List Product Categories Lists the product categories.

Parameters:

  • company_id (Integer)

    The ID of the company.

  • context (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



597
598
599
600
# File 'lib/fattureincloud_ruby_sdk/api/info_api.rb', line 597

def list_product_categories(company_id, context, opts = {})
  data, _status_code, _headers = list_product_categories_with_http_info(company_id, context, opts)
  data
end

#list_product_categories_with_http_info(company_id, context, opts = {}) ⇒ Array<(ListProductCategoriesResponse, Integer, Hash)>

List Product Categories Lists the product categories.

Parameters:

  • company_id (Integer)

    The ID of the company.

  • context (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
# File 'lib/fattureincloud_ruby_sdk/api/info_api.rb', line 608

def list_product_categories_with_http_info(company_id, context, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InfoApi.list_product_categories ...'
  end
  # verify the required parameter 'company_id' is set
  if @api_client.config.client_side_validation && company_id.nil?
    fail ArgumentError, "Missing the required parameter 'company_id' when calling InfoApi.list_product_categories"
  end
  # verify the required parameter 'context' is set
  if @api_client.config.client_side_validation && context.nil?
    fail ArgumentError, "Missing the required parameter 'context' when calling InfoApi.list_product_categories"
  end
  # verify enum value
  allowable_values = ["products", "issued_documents", "received_documents"]
  if @api_client.config.client_side_validation && !allowable_values.include?(context)
    fail ArgumentError, "invalid value for \"context\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/c/{company_id}/info/product_categories'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'context'] = context

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ListProductCategoriesResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['OAuth2AuthenticationCodeFlow']

  new_options = opts.merge(
    :operation => :"InfoApi.list_product_categories",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InfoApi#list_product_categories\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_received_document_categories(company_id, opts = {}) ⇒ ListReceivedDocumentCategoriesResponse

List Received Document Categories Lists the received document categories.

Parameters:

  • company_id (Integer)

    The ID of the company.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



671
672
673
674
# File 'lib/fattureincloud_ruby_sdk/api/info_api.rb', line 671

def list_received_document_categories(company_id, opts = {})
  data, _status_code, _headers = list_received_document_categories_with_http_info(company_id, opts)
  data
end

#list_received_document_categories_with_http_info(company_id, opts = {}) ⇒ Array<(ListReceivedDocumentCategoriesResponse, Integer, Hash)>

List Received Document Categories Lists the received document categories.

Parameters:

  • company_id (Integer)

    The ID of the company.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
# File 'lib/fattureincloud_ruby_sdk/api/info_api.rb', line 681

def list_received_document_categories_with_http_info(company_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InfoApi.list_received_document_categories ...'
  end
  # verify the required parameter 'company_id' is set
  if @api_client.config.client_side_validation && company_id.nil?
    fail ArgumentError, "Missing the required parameter 'company_id' when calling InfoApi.list_received_document_categories"
  end
  # resource path
  local_var_path = '/c/{company_id}/info/received_document_categories'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ListReceivedDocumentCategoriesResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['OAuth2AuthenticationCodeFlow']

  new_options = opts.merge(
    :operation => :"InfoApi.list_received_document_categories",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InfoApi#list_received_document_categories\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_revenue_centers(company_id, opts = {}) ⇒ ListRevenueCentersResponse

List Revenue Centers Lists the revenue centers.

Parameters:

  • company_id (Integer)

    The ID of the company.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



734
735
736
737
# File 'lib/fattureincloud_ruby_sdk/api/info_api.rb', line 734

def list_revenue_centers(company_id, opts = {})
  data, _status_code, _headers = list_revenue_centers_with_http_info(company_id, opts)
  data
end

#list_revenue_centers_with_http_info(company_id, opts = {}) ⇒ Array<(ListRevenueCentersResponse, Integer, Hash)>

List Revenue Centers Lists the revenue centers.

Parameters:

  • company_id (Integer)

    The ID of the company.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ListRevenueCentersResponse, Integer, Hash)>)

    ListRevenueCentersResponse data, response status code and response headers



744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
# File 'lib/fattureincloud_ruby_sdk/api/info_api.rb', line 744

def list_revenue_centers_with_http_info(company_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InfoApi.list_revenue_centers ...'
  end
  # verify the required parameter 'company_id' is set
  if @api_client.config.client_side_validation && company_id.nil?
    fail ArgumentError, "Missing the required parameter 'company_id' when calling InfoApi.list_revenue_centers"
  end
  # resource path
  local_var_path = '/c/{company_id}/info/revenue_centers'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ListRevenueCentersResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['OAuth2AuthenticationCodeFlow']

  new_options = opts.merge(
    :operation => :"InfoApi.list_revenue_centers",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InfoApi#list_revenue_centers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_templates(opts = {}) ⇒ ListTemplatesResponse

List Templates Lists the available templates.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :type (String)

    Type of the templates. (default to ‘all’)

  • :by_type (Boolean)
    Only if type&#x3D;all

    If true, splits the list in objects, grouping templates by type. (default to false)

Returns:



798
799
800
801
# File 'lib/fattureincloud_ruby_sdk/api/info_api.rb', line 798

def list_templates(opts = {})
  data, _status_code, _headers = list_templates_with_http_info(opts)
  data
end

#list_templates_with_http_info(opts = {}) ⇒ Array<(ListTemplatesResponse, Integer, Hash)>

List Templates Lists the available templates.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :type (String)

    Type of the templates.

  • :by_type (Boolean)
    Only if type&#x3D;all

    If true, splits the list in objects, grouping templates by type.

Returns:

  • (Array<(ListTemplatesResponse, Integer, Hash)>)

    ListTemplatesResponse data, response status code and response headers



809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
# File 'lib/fattureincloud_ruby_sdk/api/info_api.rb', line 809

def list_templates_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InfoApi.list_templates ...'
  end
  allowable_values = ["all", "standard", "delivery_note", "accompanying_invoice"]
  if @api_client.config.client_side_validation && opts[:'type'] && !allowable_values.include?(opts[:'type'])
    fail ArgumentError, "invalid value for \"type\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/info/templates'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
  query_params[:'by_type'] = opts[:'by_type'] if !opts[:'by_type'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ListTemplatesResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['OAuth2AuthenticationCodeFlow']

  new_options = opts.merge(
    :operation => :"InfoApi.list_templates",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InfoApi#list_templates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_units_of_measure(opts = {}) ⇒ ListUnitsOfMeasureResponse

List Units of Measure Lists the units of measure.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



863
864
865
866
# File 'lib/fattureincloud_ruby_sdk/api/info_api.rb', line 863

def list_units_of_measure(opts = {})
  data, _status_code, _headers = list_units_of_measure_with_http_info(opts)
  data
end

#list_units_of_measure_with_http_info(opts = {}) ⇒ Array<(ListUnitsOfMeasureResponse, Integer, Hash)>

List Units of Measure Lists the units of measure.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ListUnitsOfMeasureResponse, Integer, Hash)>)

    ListUnitsOfMeasureResponse data, response status code and response headers



872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
# File 'lib/fattureincloud_ruby_sdk/api/info_api.rb', line 872

def list_units_of_measure_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InfoApi.list_units_of_measure ...'
  end
  # resource path
  local_var_path = '/info/measures'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ListUnitsOfMeasureResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['OAuth2AuthenticationCodeFlow']

  new_options = opts.merge(
    :operation => :"InfoApi.list_units_of_measure",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InfoApi#list_units_of_measure\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_vat_types(company_id, opts = {}) ⇒ ListVatTypesResponse

List Vat Types Lists the available vat types.

Parameters:

  • company_id (Integer)

    The ID of the company.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fieldset (String)

    Name of the fieldset.

Returns:



922
923
924
925
# File 'lib/fattureincloud_ruby_sdk/api/info_api.rb', line 922

def list_vat_types(company_id, opts = {})
  data, _status_code, _headers = list_vat_types_with_http_info(company_id, opts)
  data
end

#list_vat_types_with_http_info(company_id, opts = {}) ⇒ Array<(ListVatTypesResponse, Integer, Hash)>

List Vat Types Lists the available vat types.

Parameters:

  • company_id (Integer)

    The ID of the company.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fieldset (String)

    Name of the fieldset.

Returns:

  • (Array<(ListVatTypesResponse, Integer, Hash)>)

    ListVatTypesResponse data, response status code and response headers



933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
# File 'lib/fattureincloud_ruby_sdk/api/info_api.rb', line 933

def list_vat_types_with_http_info(company_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: InfoApi.list_vat_types ...'
  end
  # verify the required parameter 'company_id' is set
  if @api_client.config.client_side_validation && company_id.nil?
    fail ArgumentError, "Missing the required parameter 'company_id' when calling InfoApi.list_vat_types"
  end
  allowable_values = ["basic", "detailed"]
  if @api_client.config.client_side_validation && opts[:'fieldset'] && !allowable_values.include?(opts[:'fieldset'])
    fail ArgumentError, "invalid value for \"fieldset\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/c/{company_id}/info/vat_types'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'fieldset'] = opts[:'fieldset'] if !opts[:'fieldset'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ListVatTypesResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['OAuth2AuthenticationCodeFlow']

  new_options = opts.merge(
    :operation => :"InfoApi.list_vat_types",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: InfoApi#list_vat_types\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end