class Wallee::WebAppService

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/wallee-ruby-sdk/api/web_app_service_api.rb, line 24
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

check_installation(space_id, opts = {}) click to toggle source

Check Installation This operation returns true when the app is installed in given space. The web app is implied by the client ID resp. user ID that is been used to invoke this operation. @param space_id This parameter identifies the space which should be checked if the web app is installed. @param [Hash] opts the optional parameters @return [BOOLEAN]

# File lib/wallee-ruby-sdk/api/web_app_service_api.rb, line 33
def check_installation(space_id, opts = {})
  data, _status_code, _headers = check_installation_with_http_info(space_id, opts)
  return data
end
check_installation_with_http_info(space_id, opts = {}) click to toggle source

Check Installation This operation returns true when the app is installed in given space. The web app is implied by the client ID resp. user ID that is been used to invoke this operation. @param space_id This parameter identifies the space which should be checked if the web app is installed. @param [Hash] opts the optional parameters @return [Array<(BOOLEAN, Fixnum, Hash)>] BOOLEAN data, response status code and response headers

# File lib/wallee-ruby-sdk/api/web_app_service_api.rb, line 43
def check_installation_with_http_info(space_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: WebAppService.check_installation ..."
  end
  # verify the required parameter 'space_id' is set
  fail ArgumentError, "Missing the required parameter 'space_id' when calling WebAppService.check_installation" if space_id.nil?
  # resource path
  local_var_path = "/web-app/check-installation".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'spaceId'] = space_id

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json;charset=utf-8']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = []
  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 => 'BOOLEAN')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebAppService#check_installation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
confirm(request, opts = {}) click to toggle source

Confirm This operation confirms the app installation. This method has to be invoked after the user returns to the web app. The request of the user will contain the code as a request parameter. The web app is implied by the client ID resp. user ID that is been used to invoke this operation. @param request @param [Hash] opts the optional parameters @return [WebAppConfirmationResponse]

# File lib/wallee-ruby-sdk/api/web_app_service_api.rb, line 91
def confirm(request, opts = {})
  data, _status_code, _headers = confirm_with_http_info(request, opts)
  return data
end
confirm_with_http_info(request, opts = {}) click to toggle source

Confirm This operation confirms the app installation. This method has to be invoked after the user returns to the web app. The request of the user will contain the code as a request parameter. The web app is implied by the client ID resp. user ID that is been used to invoke this operation. @param request @param [Hash] opts the optional parameters @return [Array<(WebAppConfirmationResponse, Fixnum, Hash)>] WebAppConfirmationResponse data, response status code and response headers

# File lib/wallee-ruby-sdk/api/web_app_service_api.rb, line 101
def confirm_with_http_info(request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: WebAppService.confirm ..."
  end
  # verify the required parameter 'request' is set
  fail ArgumentError, "Missing the required parameter 'request' when calling WebAppService.confirm" if request.nil?
  # resource path
  local_var_path = "/web-app/confirm".sub('{format}','json')

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/json;charset=utf-8']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(request)
  auth_names = []
  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 => 'WebAppConfirmationResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WebAppService#confirm\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
uninstall(space_id, opts = {}) click to toggle source

Uninstall This operation uninstalls the web app from the provided space. The web app is implied by the client ID resp. user ID that is been used to invoke this operation. @param space_id This parameter identifies the space within which the web app should be uninstalled. @param [Hash] opts the optional parameters @return [nil]

# File lib/wallee-ruby-sdk/api/web_app_service_api.rb, line 148
def uninstall(space_id, opts = {})
  uninstall_with_http_info(space_id, opts)
  return nil
end
uninstall_with_http_info(space_id, opts = {}) click to toggle source

Uninstall This operation uninstalls the web app from the provided space. The web app is implied by the client ID resp. user ID that is been used to invoke this operation. @param space_id This parameter identifies the space within which the web app should be uninstalled. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# File lib/wallee-ruby-sdk/api/web_app_service_api.rb, line 158
def uninstall_with_http_info(space_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: WebAppService.uninstall ..."
  end
  # verify the required parameter 'space_id' is set
  fail ArgumentError, "Missing the required parameter 'space_id' when calling WebAppService.uninstall" if space_id.nil?
  # resource path
  local_var_path = "/web-app/uninstall".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'spaceId'] = space_id

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = []
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = []
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

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