ultracart_api 4.0.32.rc → 4.0.33.rc

Sign up to get free protection for your applications and to get access to all the features.
data/docs/SsoApi.md CHANGED
@@ -23,18 +23,15 @@ This is the equivalent of logging out of the single sign on session
23
23
  ```ruby
24
24
  require 'time'
25
25
  require 'ultracart_api'
26
- # setup authorization
27
- UltracartClient.configure do |config|
28
- # Configure OAuth2 access token for authorization: ultraCartOauth
29
- config.access_token = 'YOUR ACCESS TOKEN'
30
-
31
- # Configure API key authorization: ultraCartSimpleApiKey
32
- config.api_key['ultraCartSimpleApiKey'] = 'YOUR API KEY'
33
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
34
- # config.api_key_prefix['ultraCartSimpleApiKey'] = 'Bearer'
35
- end
26
+ require 'json'
27
+ require 'yaml'
28
+ require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
29
+
30
+ # This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
31
+ # As such, this might not be the best way to use this object.
32
+ # Please see https://github.com/UltraCart/sdk_samples for working examples.
36
33
 
37
- api_instance = UltracartClient::SsoApi.new
34
+ api = UltracartClient::SsoApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
38
35
 
39
36
  begin
40
37
  # Get single sign on session user
@@ -94,18 +91,15 @@ Starts the process of authorizing a single sign on session.
94
91
  ```ruby
95
92
  require 'time'
96
93
  require 'ultracart_api'
97
- # setup authorization
98
- UltracartClient.configure do |config|
99
- # Configure OAuth2 access token for authorization: ultraCartOauth
100
- config.access_token = 'YOUR ACCESS TOKEN'
101
-
102
- # Configure API key authorization: ultraCartSimpleApiKey
103
- config.api_key['ultraCartSimpleApiKey'] = 'YOUR API KEY'
104
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
105
- # config.api_key_prefix['ultraCartSimpleApiKey'] = 'Bearer'
106
- end
94
+ require 'json'
95
+ require 'yaml'
96
+ require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
97
+
98
+ # This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
99
+ # As such, this might not be the best way to use this object.
100
+ # Please see https://github.com/UltraCart/sdk_samples for working examples.
107
101
 
108
- api_instance = UltracartClient::SsoApi.new
102
+ api = UltracartClient::SsoApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
109
103
  authorization_request = UltracartClient::SingleSignOnAuthorizeRequest.new # SingleSignOnAuthorizeRequest | Authorization request
110
104
 
111
105
  begin
@@ -168,18 +162,15 @@ This is the equivalent of logging out of the single sign on session
168
162
  ```ruby
169
163
  require 'time'
170
164
  require 'ultracart_api'
171
- # setup authorization
172
- UltracartClient.configure do |config|
173
- # Configure OAuth2 access token for authorization: ultraCartOauth
174
- config.access_token = 'YOUR ACCESS TOKEN'
175
-
176
- # Configure API key authorization: ultraCartSimpleApiKey
177
- config.api_key['ultraCartSimpleApiKey'] = 'YOUR API KEY'
178
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
179
- # config.api_key_prefix['ultraCartSimpleApiKey'] = 'Bearer'
180
- end
165
+ require 'json'
166
+ require 'yaml'
167
+ require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
168
+
169
+ # This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
170
+ # As such, this might not be the best way to use this object.
171
+ # Please see https://github.com/UltraCart/sdk_samples for working examples.
181
172
 
182
- api_instance = UltracartClient::SsoApi.new
173
+ api = UltracartClient::SsoApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
183
174
 
184
175
  begin
185
176
  # Revoke single sign on session
@@ -238,18 +229,15 @@ Called by your application after receiving the code back on the redirect URI to
238
229
  ```ruby
239
230
  require 'time'
240
231
  require 'ultracart_api'
241
- # setup authorization
242
- UltracartClient.configure do |config|
243
- # Configure OAuth2 access token for authorization: ultraCartOauth
244
- config.access_token = 'YOUR ACCESS TOKEN'
245
-
246
- # Configure API key authorization: ultraCartSimpleApiKey
247
- config.api_key['ultraCartSimpleApiKey'] = 'YOUR API KEY'
248
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
249
- # config.api_key_prefix['ultraCartSimpleApiKey'] = 'Bearer'
250
- end
232
+ require 'json'
233
+ require 'yaml'
234
+ require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
235
+
236
+ # This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
237
+ # As such, this might not be the best way to use this object.
238
+ # Please see https://github.com/UltraCart/sdk_samples for working examples.
251
239
 
252
- api_instance = UltracartClient::SsoApi.new
240
+ api = UltracartClient::SsoApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
253
241
  token_request = UltracartClient::SingleSignOnTokenRequest.new # SingleSignOnTokenRequest | Token request
254
242
 
255
243
  begin