Method: OpenapiClient::BatchesApi#update_batch_with_http_info
- Defined in:
- lib/openapi_client/api/batches_api.rb
#update_batch_with_http_info(batch_id, opts = {}) ⇒ Array<(String, Integer, Hash)>
Update Batch By Id Update Batch By Id
730 731 732 733 734 735 736 737 738 739 740 741 742 743 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 |
# File 'lib/openapi_client/api/batches_api.rb', line 730 def update_batch_with_http_info(batch_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BatchesApi.update_batch ...' end # verify the required parameter 'batch_id' is set if @api_client.config.client_side_validation && batch_id.nil? fail ArgumentError, "Missing the required parameter 'batch_id' when calling BatchesApi.update_batch" end if @api_client.config.client_side_validation && batch_id.to_s.length > 25 fail ArgumentError, 'invalid value for "batch_id" when calling BatchesApi.update_batch, the character length must be smaller than or equal to 25.' end if @api_client.config.client_side_validation && batch_id.to_s.length < 1 fail ArgumentError, 'invalid value for "batch_id" when calling BatchesApi.update_batch, the character length must be great than or equal to 1.' end pattern = Regexp.new(/^se(-[a-z0-9]+)+$/) if @api_client.config.client_side_validation && batch_id !~ pattern fail ArgumentError, "invalid value for 'batch_id' when calling BatchesApi.update_batch, must conform to the pattern #{pattern}." end # resource path local_var_path = '/v1/batches/{batch_id}'.sub('{' + 'batch_id' + '}', CGI.escape(batch_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(['text/plain', 'application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'String' # auth_names auth_names = opts[:auth_names] || ['api_key'] = opts.merge( :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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BatchesApi#update_batch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |