=begin
#Hydrogen Integration API

#The Hydrogen Integration API

OpenAPI spec version: 1.3.1
Contact: info@hydrogenplatform.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
Swagger Codegen version: 2.4.21

=end

require 'uri'

module IntegrationApi
  class SMSApi
    attr_accessor :api_client

    def initialize(api_client = ApiClient.default)
      @api_client = api_client
    end
    # Fetch details for corresponding sms_id
    # Fetch details for corresponding sms_id
    # @param sms_id sms_id
    # @param [Hash] opts the optional parameters
    # @return [SMS]
    def get_sms_status(sms_id, opts = {})
      data, _status_code, _headers = get_sms_status_with_http_info(sms_id, opts)
      data
    end

    # Fetch details for corresponding sms_id
    # Fetch details for corresponding sms_id
    # @param sms_id sms_id
    # @param [Hash] opts the optional parameters
    # @return [Array<(SMS, Fixnum, Hash)>] SMS data, response status code and response headers
    def get_sms_status_with_http_info(sms_id, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: SMSApi.get_sms_status ...'
      end
      # verify the required parameter 'sms_id' is set
      if @api_client.config.client_side_validation && sms_id.nil?
        fail ArgumentError, "Missing the required parameter 'sms_id' when calling SMSApi.get_sms_status"
      end
      # resource path
      local_var_path = '/sms/status/{sms_id}'.sub('{' + 'sms_id' + '}', sms_id.to_s)

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['*/*'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = nil
      auth_names = ['oauth2']
      data, status_code, headers = @api_client.call_api(:GET, local_var_path,
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => 'SMS')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: SMSApi#get_sms_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
    # Send SMS to recipient
    # Send SMS to recipient
    # @param sms_vo smsVO
    # @param [Hash] opts the optional parameters
    # @return [SMSResponseVO]
    def send_sms(sms_vo, opts = {})
      data, _status_code, _headers = send_sms_with_http_info(sms_vo, opts)
      data
    end

    # Send SMS to recipient
    # Send SMS to recipient
    # @param sms_vo smsVO
    # @param [Hash] opts the optional parameters
    # @return [Array<(SMSResponseVO, Fixnum, Hash)>] SMSResponseVO data, response status code and response headers
    def send_sms_with_http_info(sms_vo, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: SMSApi.send_sms ...'
      end
      # verify the required parameter 'sms_vo' is set
      if @api_client.config.client_side_validation && sms_vo.nil?
        fail ArgumentError, "Missing the required parameter 'sms_vo' when calling SMSApi.send_sms"
      end
      # resource path
      local_var_path = '/sms'

      # query parameters
      query_params = {}

      # header parameters
      header_params = {}
      # HTTP header 'Accept' (if needed)
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      # HTTP header 'Content-Type'
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

      # form parameters
      form_params = {}

      # http body (model)
      post_body = @api_client.object_to_http_body(sms_vo)
      auth_names = ['oauth2']
      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 => 'SMSResponseVO')
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: SMSApi#send_sms\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
  end
end
