class CloudmersiveBarcodeApiClient::GenerateBarcodeApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/cloudmersive-barcode-api-client/api/generate_barcode_api.rb, line 19
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

generate_barcode_ean13(value, opts = {}) click to toggle source

Generate a EAN-13 code barcode as PNG file Validates and generate a EAN-13 barcode as a PNG file, a type of 1D barcode @param value Barcode value to generate from @param [Hash] opts the optional parameters @return [String]

# File lib/cloudmersive-barcode-api-client/api/generate_barcode_api.rb, line 27
def generate_barcode_ean13(value, opts = {})
  data, _status_code, _headers = generate_barcode_ean13_with_http_info(value, opts)
  data
end
generate_barcode_ean13_with_http_info(value, opts = {}) click to toggle source

Generate a EAN-13 code barcode as PNG file Validates and generate a EAN-13 barcode as a PNG file, a type of 1D barcode @param value Barcode value to generate from @param [Hash] opts the optional parameters @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers

# File lib/cloudmersive-barcode-api-client/api/generate_barcode_api.rb, line 37
def generate_barcode_ean13_with_http_info(value, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GenerateBarcodeApi.generate_barcode_ean13 ...'
  end
  # verify the required parameter 'value' is set
  if @api_client.config.client_side_validation && value.nil?
    fail ArgumentError, "Missing the required parameter 'value' when calling GenerateBarcodeApi.generate_barcode_ean13"
  end
  # resource path
  local_var_path = '/barcode/generate/ean-13'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(value)
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GenerateBarcodeApi#generate_barcode_ean13\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
generate_barcode_ean8(value, opts = {}) click to toggle source

Generate a EAN-8 code barcode as PNG file Validates and generate a EAN-8 barcode as a PNG file, a type of 1D barcode @param value Barcode value to generate from @param [Hash] opts the optional parameters @return [String]

# File lib/cloudmersive-barcode-api-client/api/generate_barcode_api.rb, line 81
def generate_barcode_ean8(value, opts = {})
  data, _status_code, _headers = generate_barcode_ean8_with_http_info(value, opts)
  data
end
generate_barcode_ean8_with_http_info(value, opts = {}) click to toggle source

Generate a EAN-8 code barcode as PNG file Validates and generate a EAN-8 barcode as a PNG file, a type of 1D barcode @param value Barcode value to generate from @param [Hash] opts the optional parameters @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers

# File lib/cloudmersive-barcode-api-client/api/generate_barcode_api.rb, line 91
def generate_barcode_ean8_with_http_info(value, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GenerateBarcodeApi.generate_barcode_ean8 ...'
  end
  # verify the required parameter 'value' is set
  if @api_client.config.client_side_validation && value.nil?
    fail ArgumentError, "Missing the required parameter 'value' when calling GenerateBarcodeApi.generate_barcode_ean8"
  end
  # resource path
  local_var_path = '/barcode/generate/ean-8'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(value)
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GenerateBarcodeApi#generate_barcode_ean8\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
generate_barcode_qr_code(value, opts = {}) click to toggle source

Generate a QR code barcode as PNG file Generate a QR code barcode as a PNG file, a type of 2D barcode which can encode free-form text information @param value QR code text to convert into the QR code barcode @param [Hash] opts the optional parameters @return [String]

# File lib/cloudmersive-barcode-api-client/api/generate_barcode_api.rb, line 135
def generate_barcode_qr_code(value, opts = {})
  data, _status_code, _headers = generate_barcode_qr_code_with_http_info(value, opts)
  data
end
generate_barcode_qr_code_with_http_info(value, opts = {}) click to toggle source

Generate a QR code barcode as PNG file Generate a QR code barcode as a PNG file, a type of 2D barcode which can encode free-form text information @param value QR code text to convert into the QR code barcode @param [Hash] opts the optional parameters @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers

# File lib/cloudmersive-barcode-api-client/api/generate_barcode_api.rb, line 145
def generate_barcode_qr_code_with_http_info(value, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GenerateBarcodeApi.generate_barcode_qr_code ...'
  end
  # verify the required parameter 'value' is set
  if @api_client.config.client_side_validation && value.nil?
    fail ArgumentError, "Missing the required parameter 'value' when calling GenerateBarcodeApi.generate_barcode_qr_code"
  end
  # resource path
  local_var_path = '/barcode/generate/qrcode'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(value)
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GenerateBarcodeApi#generate_barcode_qr_code\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
generate_barcode_upca(value, opts = {}) click to toggle source

Generate a UPC-A code barcode as PNG file Validate and generate a UPC-A barcode as a PNG file, a type of 1D barcode @param value UPC-A barcode value to generate from @param [Hash] opts the optional parameters @return [String]

# File lib/cloudmersive-barcode-api-client/api/generate_barcode_api.rb, line 189
def generate_barcode_upca(value, opts = {})
  data, _status_code, _headers = generate_barcode_upca_with_http_info(value, opts)
  data
end
generate_barcode_upca_with_http_info(value, opts = {}) click to toggle source

Generate a UPC-A code barcode as PNG file Validate and generate a UPC-A barcode as a PNG file, a type of 1D barcode @param value UPC-A barcode value to generate from @param [Hash] opts the optional parameters @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers

# File lib/cloudmersive-barcode-api-client/api/generate_barcode_api.rb, line 199
def generate_barcode_upca_with_http_info(value, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GenerateBarcodeApi.generate_barcode_upca ...'
  end
  # verify the required parameter 'value' is set
  if @api_client.config.client_side_validation && value.nil?
    fail ArgumentError, "Missing the required parameter 'value' when calling GenerateBarcodeApi.generate_barcode_upca"
  end
  # resource path
  local_var_path = '/barcode/generate/upc-a'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(value)
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GenerateBarcodeApi#generate_barcode_upca\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
generate_barcode_upce(value, opts = {}) click to toggle source

Generate a UPC-E code barcode as PNG file Validates and generate a UPC-E barcode as a PNG file, a type of 1D barcode @param value UPC-E barcode value to generate from @param [Hash] opts the optional parameters @return [String]

# File lib/cloudmersive-barcode-api-client/api/generate_barcode_api.rb, line 243
def generate_barcode_upce(value, opts = {})
  data, _status_code, _headers = generate_barcode_upce_with_http_info(value, opts)
  data
end
generate_barcode_upce_with_http_info(value, opts = {}) click to toggle source

Generate a UPC-E code barcode as PNG file Validates and generate a UPC-E barcode as a PNG file, a type of 1D barcode @param value UPC-E barcode value to generate from @param [Hash] opts the optional parameters @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers

# File lib/cloudmersive-barcode-api-client/api/generate_barcode_api.rb, line 253
def generate_barcode_upce_with_http_info(value, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: GenerateBarcodeApi.generate_barcode_upce ...'
  end
  # verify the required parameter 'value' is set
  if @api_client.config.client_side_validation && value.nil?
    fail ArgumentError, "Missing the required parameter 'value' when calling GenerateBarcodeApi.generate_barcode_upce"
  end
  # resource path
  local_var_path = '/barcode/generate/upc-e'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json', 'application/xml', 'text/xml', 'application/x-www-form-urlencoded'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(value)
  auth_names = ['Apikey']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'String')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: GenerateBarcodeApi#generate_barcode_upce\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end