lib/smooch-api/api/app_api.rb in smooch-api-1.1.0 vs lib/smooch-api/api/app_api.rb in smooch-api-1.2.0
- old
+ new
@@ -1,13 +1,14 @@
=begin
#Smooch
#The Smooch API is a unified interface for powering messaging in your customer experiences across every channel. Our API speeds access to new markets, reduces time to ship, eliminates complexity, and helps you build the best experiences for your customers. For more information, visit our [official documentation](https://docs.smooch.io).
-OpenAPI spec version: 1.1
+OpenAPI spec version: 1.2
Generated by: https://github.com/swagger-api/swagger-codegen.git
+Swagger Codegen version: 2.2.3-SNAPSHOT
=end
require "uri"
@@ -37,11 +38,13 @@
def create_app_with_http_info(app_create_body, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug "Calling API: AppApi.create_app ..."
end
# verify the required parameter 'app_create_body' is set
- fail ArgumentError, "Missing the required parameter 'app_create_body' when calling AppApi.create_app" if app_create_body.nil?
+ if @api_client.config.client_side_validation && app_create_body.nil?
+ fail ArgumentError, "Missing the required parameter 'app_create_body' when calling AppApi.create_app"
+ end
# resource path
local_var_path = "/apps"
# query parameters
query_params = {}
@@ -92,13 +95,17 @@
def create_secret_key_with_http_info(app_id, secret_key_create_body, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug "Calling API: AppApi.create_secret_key ..."
end
# verify the required parameter 'app_id' is set
- fail ArgumentError, "Missing the required parameter 'app_id' when calling AppApi.create_secret_key" if app_id.nil?
+ if @api_client.config.client_side_validation && app_id.nil?
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling AppApi.create_secret_key"
+ end
# verify the required parameter 'secret_key_create_body' is set
- fail ArgumentError, "Missing the required parameter 'secret_key_create_body' when calling AppApi.create_secret_key" if secret_key_create_body.nil?
+ if @api_client.config.client_side_validation && secret_key_create_body.nil?
+ fail ArgumentError, "Missing the required parameter 'secret_key_create_body' when calling AppApi.create_secret_key"
+ end
# resource path
local_var_path = "/apps/{appId}/keys".sub('{' + 'appId' + '}', app_id.to_s)
# query parameters
query_params = {}
@@ -147,11 +154,13 @@
def delete_app_with_http_info(app_id, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug "Calling API: AppApi.delete_app ..."
end
# verify the required parameter 'app_id' is set
- fail ArgumentError, "Missing the required parameter 'app_id' when calling AppApi.delete_app" if app_id.nil?
+ if @api_client.config.client_side_validation && app_id.nil?
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling AppApi.delete_app"
+ end
# resource path
local_var_path = "/apps/{appId}".sub('{' + 'appId' + '}', app_id.to_s)
# query parameters
query_params = {}
@@ -201,13 +210,17 @@
def delete_secret_key_with_http_info(app_id, key_id, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug "Calling API: AppApi.delete_secret_key ..."
end
# verify the required parameter 'app_id' is set
- fail ArgumentError, "Missing the required parameter 'app_id' when calling AppApi.delete_secret_key" if app_id.nil?
+ if @api_client.config.client_side_validation && app_id.nil?
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling AppApi.delete_secret_key"
+ end
# verify the required parameter 'key_id' is set
- fail ArgumentError, "Missing the required parameter 'key_id' when calling AppApi.delete_secret_key" if key_id.nil?
+ if @api_client.config.client_side_validation && key_id.nil?
+ fail ArgumentError, "Missing the required parameter 'key_id' when calling AppApi.delete_secret_key"
+ end
# resource path
local_var_path = "/apps/{appId}/keys/{keyId}".sub('{' + 'appId' + '}', app_id.to_s).sub('{' + 'keyId' + '}', key_id.to_s)
# query parameters
query_params = {}
@@ -255,11 +268,13 @@
def get_app_with_http_info(app_id, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug "Calling API: AppApi.get_app ..."
end
# verify the required parameter 'app_id' is set
- fail ArgumentError, "Missing the required parameter 'app_id' when calling AppApi.get_app" if app_id.nil?
+ if @api_client.config.client_side_validation && app_id.nil?
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling AppApi.get_app"
+ end
# resource path
local_var_path = "/apps/{appId}".sub('{' + 'appId' + '}', app_id.to_s)
# query parameters
query_params = {}
@@ -310,13 +325,17 @@
def get_app_jwt_with_http_info(app_id, key_id, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug "Calling API: AppApi.get_app_jwt ..."
end
# verify the required parameter 'app_id' is set
- fail ArgumentError, "Missing the required parameter 'app_id' when calling AppApi.get_app_jwt" if app_id.nil?
+ if @api_client.config.client_side_validation && app_id.nil?
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling AppApi.get_app_jwt"
+ end
# verify the required parameter 'key_id' is set
- fail ArgumentError, "Missing the required parameter 'key_id' when calling AppApi.get_app_jwt" if key_id.nil?
+ if @api_client.config.client_side_validation && key_id.nil?
+ fail ArgumentError, "Missing the required parameter 'key_id' when calling AppApi.get_app_jwt"
+ end
# resource path
local_var_path = "/apps/{appId}/keys/{keyId}/jwt".sub('{' + 'appId' + '}', app_id.to_s).sub('{' + 'keyId' + '}', key_id.to_s)
# query parameters
query_params = {}
@@ -367,13 +386,17 @@
def get_secret_key_with_http_info(app_id, key_id, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug "Calling API: AppApi.get_secret_key ..."
end
# verify the required parameter 'app_id' is set
- fail ArgumentError, "Missing the required parameter 'app_id' when calling AppApi.get_secret_key" if app_id.nil?
+ if @api_client.config.client_side_validation && app_id.nil?
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling AppApi.get_secret_key"
+ end
# verify the required parameter 'key_id' is set
- fail ArgumentError, "Missing the required parameter 'key_id' when calling AppApi.get_secret_key" if key_id.nil?
+ if @api_client.config.client_side_validation && key_id.nil?
+ fail ArgumentError, "Missing the required parameter 'key_id' when calling AppApi.get_secret_key"
+ end
# resource path
local_var_path = "/apps/{appId}/keys/{keyId}".sub('{' + 'appId' + '}', app_id.to_s).sub('{' + 'keyId' + '}', key_id.to_s)
# query parameters
query_params = {}
@@ -405,12 +428,12 @@
end
#
# List all apps configured.
# @param [Hash] opts the optional parameters
- # @option opts [Integer] :limit The number of records to return.
- # @option opts [Integer] :offset The number of initial records to skip before picking records to return.
+ # @option opts [Integer] :limit The number of records to return. (default to 0)
+ # @option opts [Integer] :offset The number of initial records to skip before picking records to return. (default to 0)
# @return [ListAppsResponse]
def list_apps(opts = {})
data, _status_code, _headers = list_apps_with_http_info(opts)
return data
end
@@ -477,10 +500,12 @@
def list_secret_keys_with_http_info(app_id, opts = {})
if @api_client.config.debugging
@api_client.config.logger.debug "Calling API: AppApi.list_secret_keys ..."
end
# verify the required parameter 'app_id' is set
- fail ArgumentError, "Missing the required parameter 'app_id' when calling AppApi.list_secret_keys" if app_id.nil?
+ if @api_client.config.client_side_validation && app_id.nil?
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling AppApi.list_secret_keys"
+ end
# resource path
local_var_path = "/apps/{appId}/keys".sub('{' + 'appId' + '}', app_id.to_s)
# query parameters
query_params = {}