Skip to content

Commit 77a3523

Browse files
GabirRenCopilot
andcommitted
fix: rename list_templates to list_default_templates in API and documentation
Co-authored-by: Copilot <copilot@github.com>
1 parent 504a021 commit 77a3523

4 files changed

Lines changed: 25 additions & 25 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ Class | Method | HTTP request | Description
164164
*FattureInCloud_Ruby_Sdk::SettingsApi* | [**get_tax_profile**](docs/SettingsApi.md#get_tax_profile) | **GET** /c/{company_id}/settings/tax_profile | Get Tax Profile
165165
*FattureInCloud_Ruby_Sdk::SettingsApi* | [**get_template**](docs/SettingsApi.md#get_template) | **GET** /c/{company_id}/settings/templates/{template_id} | Get Template
166166
*FattureInCloud_Ruby_Sdk::SettingsApi* | [**get_vat_type**](docs/SettingsApi.md#get_vat_type) | **GET** /c/{company_id}/settings/vat_types/{vat_type_id} | Get Vat Type
167-
*FattureInCloud_Ruby_Sdk::SettingsApi* | [**list_templates**](docs/SettingsApi.md#list_templates) | **GET** /c/{company_id}/settings/templates | List Templates
167+
*FattureInCloud_Ruby_Sdk::SettingsApi* | [**list_default_templates**](docs/SettingsApi.md#list_default_templates) | **GET** /c/{company_id}/settings/templates | List Templates
168168
*FattureInCloud_Ruby_Sdk::SettingsApi* | [**modify_payment_account**](docs/SettingsApi.md#modify_payment_account) | **PUT** /c/{company_id}/settings/payment_accounts/{payment_account_id} | Modify Payment Account
169169
*FattureInCloud_Ruby_Sdk::SettingsApi* | [**modify_payment_method**](docs/SettingsApi.md#modify_payment_method) | **PUT** /c/{company_id}/settings/payment_methods/{payment_method_id} | Modify Payment Method
170170
*FattureInCloud_Ruby_Sdk::SettingsApi* | [**modify_vat_type**](docs/SettingsApi.md#modify_vat_type) | **PUT** /c/{company_id}/settings/vat_types/{vat_type_id} | Modify Vat Type

docs/SettingsApi.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ All URIs are relative to *https://api-v2.fattureincloud.it*
1515
| [**get_tax_profile**](SettingsApi.md#get_tax_profile) | **GET** /c/{company_id}/settings/tax_profile | Get Tax Profile |
1616
| [**get_template**](SettingsApi.md#get_template) | **GET** /c/{company_id}/settings/templates/{template_id} | Get Template |
1717
| [**get_vat_type**](SettingsApi.md#get_vat_type) | **GET** /c/{company_id}/settings/vat_types/{vat_type_id} | Get Vat Type |
18-
| [**list_templates**](SettingsApi.md#list_templates) | **GET** /c/{company_id}/settings/templates | List Templates |
18+
| [**list_default_templates**](SettingsApi.md#list_default_templates) | **GET** /c/{company_id}/settings/templates | List Templates |
1919
| [**modify_payment_account**](SettingsApi.md#modify_payment_account) | **PUT** /c/{company_id}/settings/payment_accounts/{payment_account_id} | Modify Payment Account |
2020
| [**modify_payment_method**](SettingsApi.md#modify_payment_method) | **PUT** /c/{company_id}/settings/payment_methods/{payment_method_id} | Modify Payment Method |
2121
| [**modify_vat_type**](SettingsApi.md#modify_vat_type) | **PUT** /c/{company_id}/settings/vat_types/{vat_type_id} | Modify Vat Type |
@@ -821,9 +821,9 @@ end
821821
- **Accept**: application/json
822822

823823

824-
## list_templates
824+
## list_default_templates
825825

826-
> <ListTemplatesResponse> list_templates(company_id, opts)
826+
> <ListTemplatesResponse> list_default_templates(company_id, opts)
827827
828828
List Templates
829829

@@ -849,28 +849,28 @@ opts = {
849849

850850
begin
851851
# List Templates
852-
result = api_instance.list_templates(company_id, opts)
852+
result = api_instance.list_default_templates(company_id, opts)
853853
p result
854854
rescue FattureInCloud_Ruby_Sdk::ApiError => e
855-
puts "Error when calling SettingsApi->list_templates: #{e}"
855+
puts "Error when calling SettingsApi->list_default_templates: #{e}"
856856
end
857857
```
858858

859-
#### Using the list_templates_with_http_info variant
859+
#### Using the list_default_templates_with_http_info variant
860860

861861
This returns an Array which contains the response data, status code and headers.
862862

863-
> <Array(<ListTemplatesResponse>, Integer, Hash)> list_templates_with_http_info(company_id, opts)
863+
> <Array(<ListTemplatesResponse>, Integer, Hash)> list_default_templates_with_http_info(company_id, opts)
864864
865865
```ruby
866866
begin
867867
# List Templates
868-
data, status_code, headers = api_instance.list_templates_with_http_info(company_id, opts)
868+
data, status_code, headers = api_instance.list_default_templates_with_http_info(company_id, opts)
869869
p status_code # => 2xx
870870
p headers # => { ... }
871871
p data # => <ListTemplatesResponse>
872872
rescue FattureInCloud_Ruby_Sdk::ApiError => e
873-
puts "Error when calling SettingsApi->list_templates_with_http_info: #{e}"
873+
puts "Error when calling SettingsApi->list_default_templates_with_http_info: #{e}"
874874
end
875875
```
876876

lib/fattureincloud_ruby_sdk/api/settings_api.rb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -805,32 +805,32 @@ def get_vat_type_with_http_info(company_id, vat_type_id, opts = {})
805805
return data, status_code, headers
806806
end
807807

808-
# List Templates
808+
# List Default Templates
809809
# Gets all the standard and private templates.
810810
# @param company_id [Integer] The ID of the company.
811811
# @param [Hash] opts the optional parameters
812812
# @option opts [String] :fields List of comma-separated fields.
813813
# @option opts [String] :fieldset Name of the fieldset.
814814
# @return [ListTemplatesResponse]
815-
def list_templates(company_id, opts = {})
816-
data, _status_code, _headers = list_templates_with_http_info(company_id, opts)
815+
def list_default_templates(company_id, opts = {})
816+
data, _status_code, _headers = list_default_templates_with_http_info(company_id, opts)
817817
data
818818
end
819819

820-
# List Templates
820+
# List Default Templates
821821
# Gets all the standard and private templates.
822822
# @param company_id [Integer] The ID of the company.
823823
# @param [Hash] opts the optional parameters
824824
# @option opts [String] :fields List of comma-separated fields.
825825
# @option opts [String] :fieldset Name of the fieldset.
826826
# @return [Array<(ListTemplatesResponse, Integer, Hash)>] ListTemplatesResponse data, response status code and response headers
827-
def list_templates_with_http_info(company_id, opts = {})
827+
def list_default_templates_with_http_info(company_id, opts = {})
828828
if @api_client.config.debugging
829-
@api_client.config.logger.debug 'Calling API: SettingsApi.list_templates ...'
829+
@api_client.config.logger.debug 'Calling API: SettingsApi.list_default_templates ...'
830830
end
831831
# verify the required parameter 'company_id' is set
832832
if @api_client.config.client_side_validation && company_id.nil?
833-
fail ArgumentError, "Missing the required parameter 'company_id' when calling SettingsApi.list_templates"
833+
fail ArgumentError, "Missing the required parameter 'company_id' when calling SettingsApi.list_default_templates"
834834
end
835835
allowable_values = ["basic", "detailed", "fic_view"]
836836
if @api_client.config.client_side_validation && opts[:'fieldset'] && !allowable_values.include?(opts[:'fieldset'])
@@ -862,7 +862,7 @@ def list_templates_with_http_info(company_id, opts = {})
862862
auth_names = opts[:debug_auth_names] || ['OAuth2AuthenticationCodeFlow']
863863

864864
new_options = opts.merge(
865-
:operation => :"SettingsApi.list_templates",
865+
:operation => :"SettingsApi.list_default_templates",
866866
:header_params => header_params,
867867
:query_params => query_params,
868868
:form_params => form_params,
@@ -873,7 +873,7 @@ def list_templates_with_http_info(company_id, opts = {})
873873

874874
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
875875
if @api_client.config.debugging
876-
@api_client.config.logger.debug "API called: SettingsApi#list_templates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
876+
@api_client.config.logger.debug "API called: SettingsApi#list_default_templates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
877877
end
878878
return data, status_code, headers
879879
end

spec/api/info_api_spec.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
allow(@api_instance).to receive(:list_revenue_centers) { @list_revenue_centers_response_obj }
6262

6363
@list_templates_response_obj = { "data": [{ "id": 10, "name": "New Standard S1" }, { "id": 106, "name": "Minimalist" }] }
64-
allow(@api_instance).to receive(:list_templates) { @list_templates_response_obj }
64+
allow(@api_instance).to receive(:list_default_templates) { @list_templates_response_obj }
6565

6666
@list_units_of_measure_response_obj = { "data": ["pezzi", "kg", "litri", "ore", "giorni", "km", "mesi"] }
6767
allow(@api_instance).to receive(:list_units_of_measure) { @list_units_of_measure_response_obj }
@@ -304,16 +304,16 @@
304304
end
305305
end
306306

307-
# unit tests for list_templates
308-
# List Templates
309-
# Lists the available templates.
307+
# unit tests for list_default_templates
308+
# List Default Templates
309+
# Lists the available default templates.
310310
# @param [Hash] opts the optional parameters
311311
# @option opts [String] :type Type of the templates.
312312
# @option opts [Boolean] :by_type [Only if type&#x3D;all] If true, splits the list in objects, grouping templates by type.
313313
# @return [ListTemplatesResponse]
314-
describe 'list_templates test' do
314+
describe 'list_default_templates test' do
315315
it 'should work' do
316-
response = @api_instance.list_templates(2)
316+
response = @api_instance.list_default_templates(2)
317317
response_obj = JSON.parse(response.to_json, object_class: OpenStruct)
318318
expected_json = @list_templates_response_obj.to_json
319319
actual_json = response.to_json

0 commit comments

Comments
 (0)