lib/fattureincloud_ruby_sdk/api/settings_api.rb
# Modify Vat Type
# Modifies the specified vat type.
# @param company_id [Integer] The ID of the company.
# @param vat_type_id [Integer] The Referred Vat Type Id.
# @param [Hash] opts the optional parameters
# @option opts [ModifyVatTypeRequest] :modify_vat_type_request 
# @return [Array<(ModifyVatTypeResponse, Integer, Hash)>] ModifyVatTypeResponse data, response status code and response headers
Modify Vat Type
Modifies the specified vat type.
Modify Vat Type Modifies the specified vat type .
def modify_vat_type_with_http_info(company_id, vat_type_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: SettingsApi.modify_vat_type ...'
      end
      if @api_client.config.client_side_validation && company_id.nil?
        fail ArgumentError, "Missing the required parameter 'company_id' when calling SettingsApi.modify_vat_type"
      end
      if @api_client.config.client_side_validation && vat_type_id.nil?
        fail ArgumentError, "Missing the required parameter 'vat_type_id' when calling SettingsApi.modify_vat_type"
      end
      local_var_path = '/c/{company_id}/settings/vat_types/{vat_type_id}'.sub('{' + 'company_id' + '}', CGI.escape(company_id.to_s)).sub('{' + 'vat_type_id' + '}', CGI.escape(vat_type_id.to_s))
      query_params = opts[:query_params] || {}
      header_params = opts[:header_params] || {}
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      content_type = @api_client.select_header_content_type(['application/json'])
      if !content_type.nil?
        header_params['Content-Type'] = content_type
      end
      form_params = opts[:form_params] || {}
      post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'modify_vat_type_request'])
      return_type = opts[:debug_return_type] || 'ModifyVatTypeResponse'
      auth_names = opts[:debug_auth_names] || ['OAuth2AuthenticationCodeFlow']
      new_options = opts.merge(
        :operation => :"SettingsApi.modify_vat_type",
        :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(:PUT, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: SettingsApi#modify_vat_type\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
def modify_vat_type_with_http_info ( company_id , vat_type_id , opts = { } ) if @api_client . config . debugging @api_client . config . logger . debug 'Calling API: SettingsApi.modify_vat_type ...' end if @api_client . config . client_side_validation && company_id . nil? fail ArgumentError , "Missing the required parameter 'company_id' when calling SettingsApi.modify_vat_type" end if @api_client . config . client_side_validation && vat_type_id . nil? fail ArgumentError , "Missing the required parameter 'vat_type_id' when calling SettingsApi.modify_vat_type" end local_var_path = '/c/{company_id}/settings/vat_types/{vat_type_id}' . sub ( '{' + 'company_id' + '}' , CGI . escape ( company_id . to_s ) ) . sub ( '{' + 'vat_type_id' + '}' , CGI . escape ( vat_type_id . to_s ) ) query_params = opts [ :query_params ] || { } header_params = opts [ :header_params ] || { } header_params [ 'Accept' ] = @api_client . select_header_accept ( [ 'application/json' ] ) content_type = @api_client . select_header_content_type ( [ 'application/json' ] ) if ! content_type . nil? header_params [ 'Content-Type' ] = content_type end form_params = opts [ :form_params ] || { } post_body = opts [ :debug_body ] || @api_client . object_to_http_body ( opts [ :' modify_vat_type_request ' ] ) return_type = opts [ :debug_return_type ] || 'ModifyVatTypeResponse' auth_names = opts [ :debug_auth_names ] || [ 'OAuth2AuthenticationCodeFlow' ] new_options = opts . merge ( :operation => :" SettingsApi.modify_vat_type " , :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 ( :PUT , local_var_path , new_options ) if @api_client . config . debugging @api_client . config . logger . debug "API called: SettingsApi#modify_vat_type\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data , status_code , headers end
Modify Vat Type
Modifies the specified vat type.
Modify Vat Type Modifies the specified vat type .
# verify the required parameter 'company_id' is set # verify the required parameter 'vat_type_id' is set # resource path # query parameters # header parameters # HTTP header 'Accept' (if needed) # HTTP header 'Content-Type' # form parameters # http body (model) # return_type # auth_names
ModifyVatTypeResponse data, response status code and response headers
ModifyVatTypeResponse data response status code and response headers
Array<(ModifyVatTypeResponse, Integer, Hash)>
company_id
The ID of the company.
The ID of the company .
vat_type_id
The Referred Vat Type Id.
The Referred Vat Type Id .
opts
None
opts the optional parameters
opts the optional parameters