Class: WindcaveRest::SessionsApi
- Defined in:
- lib/windcave_rest/api/sessions_api.rb
Instance Attribute Summary
Attributes inherited from BaseApi
Instance Method Summary collapse
-
#sessions_create(opts = {}) ⇒ Session
Create a Session Creates a Windcave Session.
-
#sessions_create_with_http_info(opts = {}) ⇒ Array<(Session, Fixnum, Hash)>
Create a session Creates a Windcave Session.
-
#sessions_get(id, opts = {}) ⇒ Session
Retrieve a Session Retrieves a previously created Session by id.
-
#sessions_get_with_http_info(id, opts = {}) ⇒ Array<(Session, Fixnum, Hash)>
Retrieve a Session Retrieves a previously created Session by id.
Methods inherited from BaseApi
Constructor Details
This class inherits a constructor from WindcaveRest::BaseApi
Instance Method Details
#sessions_create(opts = {}) ⇒ Session
Create a Session Creates a Windcave Session. During the Session process a customer can apply for credit decisioning in real-time. This means the Session needs to represent a good picture of known customer details along with order information and the Session entity represents this as a resource. For more information on how to Session with Windcave see the px5.docs.apiary.io/#reference/0/transactions/create-session guide.
8 9 10 11 |
# File 'lib/windcave_rest/api/sessions_api.rb', line 8 def sessions_create(opts = {}) data, _status_code, _headers = sessions_create_with_http_info(opts) return data end |
#sessions_create_with_http_info(opts = {}) ⇒ Array<(Session, Fixnum, Hash)>
Create a session Creates a Windcave Session. During the Session process a customer can apply for credit decisioning in real-time. This means the Session needs to represent a good picture of known customer details along with order information and the Session entity represents this as a resource. For more information on how to Session with Windcave see the #model:Z2QcrzRGHACY8wM6G guide.
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/windcave_rest/api/sessions_api.rb', line 18 def sessions_create_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SessionsApi.sessions_create ..." end # resource path local_var_path = "/sessions" # 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(opts[:'body']) auth_names = ['Authorization'] 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 => 'Session') if @api_client.config.debugging @api_client.config.logger.debug "API called: SessionsApi#sessions_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#sessions_get(id, opts = {}) ⇒ Session
Retrieve a Session Retrieves a previously created Session by id.
59 60 61 62 |
# File 'lib/windcave_rest/api/sessions_api.rb', line 59 def sessions_get(id, opts = {}) data, _status_code, _headers = sessions_get_with_http_info(id, opts) return data end |
#sessions_get_with_http_info(id, opts = {}) ⇒ Array<(Session, Fixnum, Hash)>
Retrieve a Session Retrieves a previously created Session by id.
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/windcave_rest/api/sessions_api.rb', line 69 def sessions_get_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: sessionsApi.sessions_get ..." end # verify the required parameter 'id' is set fail ArgumentError, "Missing the required parameter 'id' when calling sessionsApi.sessions_get" if id.nil? # resource path local_var_path = "/sessions/#{id}" # 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 = nil auth_names = ['Authorization'] 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 => 'Session') if @api_client.config.debugging @api_client.config.logger.debug "API called: sessionsApi#sessions_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |