docs/SsoApi.md in ultracart_api-4.0.32.rc vs docs/SsoApi.md in ultracart_api-4.0.33.rc

- old
+ new

@@ -21,22 +21,19 @@ ### Examples ```ruby require 'time' require 'ultracart_api' -# setup authorization -UltracartClient.configure do |config| - # Configure OAuth2 access token for authorization: ultraCartOauth - config.access_token = 'YOUR ACCESS TOKEN' +require 'json' +require 'yaml' +require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb - # Configure API key authorization: ultraCartSimpleApiKey - config.api_key['ultraCartSimpleApiKey'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - # config.api_key_prefix['ultraCartSimpleApiKey'] = 'Bearer' -end +# This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators. +# As such, this might not be the best way to use this object. +# Please see https://github.com/UltraCart/sdk_samples for working examples. -api_instance = UltracartClient::SsoApi.new +api = UltracartClient::SsoApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE) begin # Get single sign on session user result = api_instance.get_sso_session_user p result @@ -92,22 +89,19 @@ ### Examples ```ruby require 'time' require 'ultracart_api' -# setup authorization -UltracartClient.configure do |config| - # Configure OAuth2 access token for authorization: ultraCartOauth - config.access_token = 'YOUR ACCESS TOKEN' +require 'json' +require 'yaml' +require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb - # Configure API key authorization: ultraCartSimpleApiKey - config.api_key['ultraCartSimpleApiKey'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - # config.api_key_prefix['ultraCartSimpleApiKey'] = 'Bearer' -end +# This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators. +# As such, this might not be the best way to use this object. +# Please see https://github.com/UltraCart/sdk_samples for working examples. -api_instance = UltracartClient::SsoApi.new +api = UltracartClient::SsoApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE) authorization_request = UltracartClient::SingleSignOnAuthorizeRequest.new # SingleSignOnAuthorizeRequest | Authorization request begin # Authorize a single sign on session result = api_instance.sso_authorize(authorization_request) @@ -166,22 +160,19 @@ ### Examples ```ruby require 'time' require 'ultracart_api' -# setup authorization -UltracartClient.configure do |config| - # Configure OAuth2 access token for authorization: ultraCartOauth - config.access_token = 'YOUR ACCESS TOKEN' +require 'json' +require 'yaml' +require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb - # Configure API key authorization: ultraCartSimpleApiKey - config.api_key['ultraCartSimpleApiKey'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - # config.api_key_prefix['ultraCartSimpleApiKey'] = 'Bearer' -end +# This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators. +# As such, this might not be the best way to use this object. +# Please see https://github.com/UltraCart/sdk_samples for working examples. -api_instance = UltracartClient::SsoApi.new +api = UltracartClient::SsoApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE) begin # Revoke single sign on session api_instance.sso_session_revoke rescue UltracartClient::ApiError => e @@ -236,21 +227,18 @@ ### Examples ```ruby require 'time' require 'ultracart_api' -# setup authorization -UltracartClient.configure do |config| - # Configure OAuth2 access token for authorization: ultraCartOauth - config.access_token = 'YOUR ACCESS TOKEN' +require 'json' +require 'yaml' +require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb - # Configure API key authorization: ultraCartSimpleApiKey - config.api_key['ultraCartSimpleApiKey'] = 'YOUR API KEY' - # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil) - # config.api_key_prefix['ultraCartSimpleApiKey'] = 'Bearer' -end +# This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators. +# As such, this might not be the best way to use this object. +# Please see https://github.com/UltraCart/sdk_samples for working examples. -api_instance = UltracartClient::SsoApi.new +api = UltracartClient::SsoApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE) token_request = UltracartClient::SingleSignOnTokenRequest.new # SingleSignOnTokenRequest | Token request begin # Exchange a single sign on code for a simple key token result = api_instance.sso_token(token_request)