ultracart_api 4.1.67 → 4.1.69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +11 -2
- data/docs/ConversationApi.md +269 -0
- data/docs/OauthApi.md +56 -0
- data/docs/OauthDeviceAuthorizationResponse.md +28 -0
- data/docs/PointOfSaleLocation.md +3 -1
- data/lib/ultracart_api/api/conversation_api.rb +330 -0
- data/lib/ultracart_api/api/oauth_api.rb +80 -0
- data/lib/ultracart_api/models/oauth_device_authorization_response.rb +270 -0
- data/lib/ultracart_api/models/point_of_sale_location.rb +29 -4
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +1 -0
- metadata +4 -2
|
@@ -1138,6 +1138,70 @@ module UltracartClient
|
|
|
1138
1138
|
return data, status_code, headers
|
|
1139
1139
|
end
|
|
1140
1140
|
|
|
1141
|
+
# Delete user pbx audio
|
|
1142
|
+
# Delete a pbx audio file owned by the authenticated user
|
|
1143
|
+
# @param conversation_pbx_audio_uuid [String]
|
|
1144
|
+
# @param [Hash] opts the optional parameters
|
|
1145
|
+
# @return [ConversationPbxAudioResponse]
|
|
1146
|
+
def delete_user_pbx_audio(conversation_pbx_audio_uuid, opts = {})
|
|
1147
|
+
data, _status_code, _headers = delete_user_pbx_audio_with_http_info(conversation_pbx_audio_uuid, opts)
|
|
1148
|
+
data
|
|
1149
|
+
end
|
|
1150
|
+
|
|
1151
|
+
# Delete user pbx audio
|
|
1152
|
+
# Delete a pbx audio file owned by the authenticated user
|
|
1153
|
+
# @param conversation_pbx_audio_uuid [String]
|
|
1154
|
+
# @param [Hash] opts the optional parameters
|
|
1155
|
+
# @return [Array<(ConversationPbxAudioResponse, Integer, Hash)>] ConversationPbxAudioResponse data, response status code and response headers
|
|
1156
|
+
def delete_user_pbx_audio_with_http_info(conversation_pbx_audio_uuid, opts = {})
|
|
1157
|
+
if @api_client.config.debugging
|
|
1158
|
+
@api_client.config.logger.debug 'Calling API: ConversationApi.delete_user_pbx_audio ...'
|
|
1159
|
+
end
|
|
1160
|
+
# verify the required parameter 'conversation_pbx_audio_uuid' is set
|
|
1161
|
+
if @api_client.config.client_side_validation && conversation_pbx_audio_uuid.nil?
|
|
1162
|
+
fail ArgumentError, "Missing the required parameter 'conversation_pbx_audio_uuid' when calling ConversationApi.delete_user_pbx_audio"
|
|
1163
|
+
end
|
|
1164
|
+
# resource path
|
|
1165
|
+
local_var_path = '/conversation/pbx/audio/user/{conversationPbxAudioUuid}'.sub('{' + 'conversationPbxAudioUuid' + '}', CGI.escape(conversation_pbx_audio_uuid.to_s))
|
|
1166
|
+
|
|
1167
|
+
# query parameters
|
|
1168
|
+
query_params = opts[:query_params] || {}
|
|
1169
|
+
|
|
1170
|
+
# header parameters
|
|
1171
|
+
header_params = opts[:header_params] || {}
|
|
1172
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
1173
|
+
# HTTP header 'Accept' (if needed)
|
|
1174
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1175
|
+
|
|
1176
|
+
# form parameters
|
|
1177
|
+
form_params = opts[:form_params] || {}
|
|
1178
|
+
|
|
1179
|
+
# http body (model)
|
|
1180
|
+
post_body = opts[:debug_body]
|
|
1181
|
+
|
|
1182
|
+
# return_type
|
|
1183
|
+
return_type = opts[:debug_return_type] || 'ConversationPbxAudioResponse'
|
|
1184
|
+
|
|
1185
|
+
# auth_names
|
|
1186
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
1187
|
+
|
|
1188
|
+
new_options = opts.merge(
|
|
1189
|
+
:operation => :"ConversationApi.delete_user_pbx_audio",
|
|
1190
|
+
:header_params => header_params,
|
|
1191
|
+
:query_params => query_params,
|
|
1192
|
+
:form_params => form_params,
|
|
1193
|
+
:body => post_body,
|
|
1194
|
+
:auth_names => auth_names,
|
|
1195
|
+
:return_type => return_type
|
|
1196
|
+
)
|
|
1197
|
+
|
|
1198
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
1199
|
+
if @api_client.config.debugging
|
|
1200
|
+
@api_client.config.logger.debug "API called: ConversationApi#delete_user_pbx_audio\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1201
|
+
end
|
|
1202
|
+
return data, status_code, headers
|
|
1203
|
+
end
|
|
1204
|
+
|
|
1141
1205
|
# Agent keep alive
|
|
1142
1206
|
# Called periodically by the conversation API to keep the session alive.
|
|
1143
1207
|
# @param [Hash] opts the optional parameters
|
|
@@ -4705,6 +4769,128 @@ module UltracartClient
|
|
|
4705
4769
|
return data, status_code, headers
|
|
4706
4770
|
end
|
|
4707
4771
|
|
|
4772
|
+
# Get user pbx audio
|
|
4773
|
+
# Retrieve a pbx audio file owned by the authenticated user
|
|
4774
|
+
# @param conversation_pbx_audio_uuid [String]
|
|
4775
|
+
# @param [Hash] opts the optional parameters
|
|
4776
|
+
# @return [ConversationPbxAudioResponse]
|
|
4777
|
+
def get_user_pbx_audio(conversation_pbx_audio_uuid, opts = {})
|
|
4778
|
+
data, _status_code, _headers = get_user_pbx_audio_with_http_info(conversation_pbx_audio_uuid, opts)
|
|
4779
|
+
data
|
|
4780
|
+
end
|
|
4781
|
+
|
|
4782
|
+
# Get user pbx audio
|
|
4783
|
+
# Retrieve a pbx audio file owned by the authenticated user
|
|
4784
|
+
# @param conversation_pbx_audio_uuid [String]
|
|
4785
|
+
# @param [Hash] opts the optional parameters
|
|
4786
|
+
# @return [Array<(ConversationPbxAudioResponse, Integer, Hash)>] ConversationPbxAudioResponse data, response status code and response headers
|
|
4787
|
+
def get_user_pbx_audio_with_http_info(conversation_pbx_audio_uuid, opts = {})
|
|
4788
|
+
if @api_client.config.debugging
|
|
4789
|
+
@api_client.config.logger.debug 'Calling API: ConversationApi.get_user_pbx_audio ...'
|
|
4790
|
+
end
|
|
4791
|
+
# verify the required parameter 'conversation_pbx_audio_uuid' is set
|
|
4792
|
+
if @api_client.config.client_side_validation && conversation_pbx_audio_uuid.nil?
|
|
4793
|
+
fail ArgumentError, "Missing the required parameter 'conversation_pbx_audio_uuid' when calling ConversationApi.get_user_pbx_audio"
|
|
4794
|
+
end
|
|
4795
|
+
# resource path
|
|
4796
|
+
local_var_path = '/conversation/pbx/audio/user/{conversationPbxAudioUuid}'.sub('{' + 'conversationPbxAudioUuid' + '}', CGI.escape(conversation_pbx_audio_uuid.to_s))
|
|
4797
|
+
|
|
4798
|
+
# query parameters
|
|
4799
|
+
query_params = opts[:query_params] || {}
|
|
4800
|
+
|
|
4801
|
+
# header parameters
|
|
4802
|
+
header_params = opts[:header_params] || {}
|
|
4803
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
4804
|
+
# HTTP header 'Accept' (if needed)
|
|
4805
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
4806
|
+
|
|
4807
|
+
# form parameters
|
|
4808
|
+
form_params = opts[:form_params] || {}
|
|
4809
|
+
|
|
4810
|
+
# http body (model)
|
|
4811
|
+
post_body = opts[:debug_body]
|
|
4812
|
+
|
|
4813
|
+
# return_type
|
|
4814
|
+
return_type = opts[:debug_return_type] || 'ConversationPbxAudioResponse'
|
|
4815
|
+
|
|
4816
|
+
# auth_names
|
|
4817
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
4818
|
+
|
|
4819
|
+
new_options = opts.merge(
|
|
4820
|
+
:operation => :"ConversationApi.get_user_pbx_audio",
|
|
4821
|
+
:header_params => header_params,
|
|
4822
|
+
:query_params => query_params,
|
|
4823
|
+
:form_params => form_params,
|
|
4824
|
+
:body => post_body,
|
|
4825
|
+
:auth_names => auth_names,
|
|
4826
|
+
:return_type => return_type
|
|
4827
|
+
)
|
|
4828
|
+
|
|
4829
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
4830
|
+
if @api_client.config.debugging
|
|
4831
|
+
@api_client.config.logger.debug "API called: ConversationApi#get_user_pbx_audio\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
4832
|
+
end
|
|
4833
|
+
return data, status_code, headers
|
|
4834
|
+
end
|
|
4835
|
+
|
|
4836
|
+
# Get user pbx audios
|
|
4837
|
+
# Retrieve pbx audio files owned by the authenticated user
|
|
4838
|
+
# @param [Hash] opts the optional parameters
|
|
4839
|
+
# @return [ConversationPbxAudiosResponse]
|
|
4840
|
+
def get_user_pbx_audios(opts = {})
|
|
4841
|
+
data, _status_code, _headers = get_user_pbx_audios_with_http_info(opts)
|
|
4842
|
+
data
|
|
4843
|
+
end
|
|
4844
|
+
|
|
4845
|
+
# Get user pbx audios
|
|
4846
|
+
# Retrieve pbx audio files owned by the authenticated user
|
|
4847
|
+
# @param [Hash] opts the optional parameters
|
|
4848
|
+
# @return [Array<(ConversationPbxAudiosResponse, Integer, Hash)>] ConversationPbxAudiosResponse data, response status code and response headers
|
|
4849
|
+
def get_user_pbx_audios_with_http_info(opts = {})
|
|
4850
|
+
if @api_client.config.debugging
|
|
4851
|
+
@api_client.config.logger.debug 'Calling API: ConversationApi.get_user_pbx_audios ...'
|
|
4852
|
+
end
|
|
4853
|
+
# resource path
|
|
4854
|
+
local_var_path = '/conversation/pbx/audio/user'
|
|
4855
|
+
|
|
4856
|
+
# query parameters
|
|
4857
|
+
query_params = opts[:query_params] || {}
|
|
4858
|
+
|
|
4859
|
+
# header parameters
|
|
4860
|
+
header_params = opts[:header_params] || {}
|
|
4861
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
4862
|
+
# HTTP header 'Accept' (if needed)
|
|
4863
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
4864
|
+
|
|
4865
|
+
# form parameters
|
|
4866
|
+
form_params = opts[:form_params] || {}
|
|
4867
|
+
|
|
4868
|
+
# http body (model)
|
|
4869
|
+
post_body = opts[:debug_body]
|
|
4870
|
+
|
|
4871
|
+
# return_type
|
|
4872
|
+
return_type = opts[:debug_return_type] || 'ConversationPbxAudiosResponse'
|
|
4873
|
+
|
|
4874
|
+
# auth_names
|
|
4875
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
4876
|
+
|
|
4877
|
+
new_options = opts.merge(
|
|
4878
|
+
:operation => :"ConversationApi.get_user_pbx_audios",
|
|
4879
|
+
:header_params => header_params,
|
|
4880
|
+
:query_params => query_params,
|
|
4881
|
+
:form_params => form_params,
|
|
4882
|
+
:body => post_body,
|
|
4883
|
+
:auth_names => auth_names,
|
|
4884
|
+
:return_type => return_type
|
|
4885
|
+
)
|
|
4886
|
+
|
|
4887
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
4888
|
+
if @api_client.config.debugging
|
|
4889
|
+
@api_client.config.logger.debug "API called: ConversationApi#get_user_pbx_audios\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
4890
|
+
end
|
|
4891
|
+
return data, status_code, headers
|
|
4892
|
+
end
|
|
4893
|
+
|
|
4708
4894
|
# Get virtual agent budget
|
|
4709
4895
|
# Retrieve virtual agent budget
|
|
4710
4896
|
# @param [Hash] opts the optional parameters
|
|
@@ -5799,6 +5985,75 @@ module UltracartClient
|
|
|
5799
5985
|
return data, status_code, headers
|
|
5800
5986
|
end
|
|
5801
5987
|
|
|
5988
|
+
# Insert user pbx audio
|
|
5989
|
+
# Insert a pbx audio file for the authenticated user
|
|
5990
|
+
# @param pbx_audio [ConversationPbxAudio] Pbx Audio
|
|
5991
|
+
# @param [Hash] opts the optional parameters
|
|
5992
|
+
# @return [ConversationPbxAudioResponse]
|
|
5993
|
+
def insert_user_pbx_audio(pbx_audio, opts = {})
|
|
5994
|
+
data, _status_code, _headers = insert_user_pbx_audio_with_http_info(pbx_audio, opts)
|
|
5995
|
+
data
|
|
5996
|
+
end
|
|
5997
|
+
|
|
5998
|
+
# Insert user pbx audio
|
|
5999
|
+
# Insert a pbx audio file for the authenticated user
|
|
6000
|
+
# @param pbx_audio [ConversationPbxAudio] Pbx Audio
|
|
6001
|
+
# @param [Hash] opts the optional parameters
|
|
6002
|
+
# @return [Array<(ConversationPbxAudioResponse, Integer, Hash)>] ConversationPbxAudioResponse data, response status code and response headers
|
|
6003
|
+
def insert_user_pbx_audio_with_http_info(pbx_audio, opts = {})
|
|
6004
|
+
if @api_client.config.debugging
|
|
6005
|
+
@api_client.config.logger.debug 'Calling API: ConversationApi.insert_user_pbx_audio ...'
|
|
6006
|
+
end
|
|
6007
|
+
# verify the required parameter 'pbx_audio' is set
|
|
6008
|
+
if @api_client.config.client_side_validation && pbx_audio.nil?
|
|
6009
|
+
fail ArgumentError, "Missing the required parameter 'pbx_audio' when calling ConversationApi.insert_user_pbx_audio"
|
|
6010
|
+
end
|
|
6011
|
+
# resource path
|
|
6012
|
+
local_var_path = '/conversation/pbx/audio/user'
|
|
6013
|
+
|
|
6014
|
+
# query parameters
|
|
6015
|
+
query_params = opts[:query_params] || {}
|
|
6016
|
+
|
|
6017
|
+
# header parameters
|
|
6018
|
+
header_params = opts[:header_params] || {}
|
|
6019
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
6020
|
+
# HTTP header 'Accept' (if needed)
|
|
6021
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
6022
|
+
# HTTP header 'Content-Type'
|
|
6023
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
6024
|
+
if !content_type.nil?
|
|
6025
|
+
header_params['Content-Type'] = content_type
|
|
6026
|
+
end
|
|
6027
|
+
|
|
6028
|
+
# form parameters
|
|
6029
|
+
form_params = opts[:form_params] || {}
|
|
6030
|
+
|
|
6031
|
+
# http body (model)
|
|
6032
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(pbx_audio)
|
|
6033
|
+
|
|
6034
|
+
# return_type
|
|
6035
|
+
return_type = opts[:debug_return_type] || 'ConversationPbxAudioResponse'
|
|
6036
|
+
|
|
6037
|
+
# auth_names
|
|
6038
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
6039
|
+
|
|
6040
|
+
new_options = opts.merge(
|
|
6041
|
+
:operation => :"ConversationApi.insert_user_pbx_audio",
|
|
6042
|
+
:header_params => header_params,
|
|
6043
|
+
:query_params => query_params,
|
|
6044
|
+
:form_params => form_params,
|
|
6045
|
+
:body => post_body,
|
|
6046
|
+
:auth_names => auth_names,
|
|
6047
|
+
:return_type => return_type
|
|
6048
|
+
)
|
|
6049
|
+
|
|
6050
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
6051
|
+
if @api_client.config.debugging
|
|
6052
|
+
@api_client.config.logger.debug "API called: ConversationApi#insert_user_pbx_audio\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
6053
|
+
end
|
|
6054
|
+
return data, status_code, headers
|
|
6055
|
+
end
|
|
6056
|
+
|
|
5802
6057
|
# Join a conversation
|
|
5803
6058
|
# Join a conversation
|
|
5804
6059
|
# @param conversation_uuid [String]
|
|
@@ -8042,6 +8297,81 @@ module UltracartClient
|
|
|
8042
8297
|
return data, status_code, headers
|
|
8043
8298
|
end
|
|
8044
8299
|
|
|
8300
|
+
# Update user pbx audio
|
|
8301
|
+
# Update a pbx audio file owned by the authenticated user
|
|
8302
|
+
# @param conversation_pbx_audio_uuid [String]
|
|
8303
|
+
# @param pbx_audio [ConversationPbxAudio] Pbx Audio
|
|
8304
|
+
# @param [Hash] opts the optional parameters
|
|
8305
|
+
# @return [ConversationPbxAudioResponse]
|
|
8306
|
+
def update_user_pbx_audio(conversation_pbx_audio_uuid, pbx_audio, opts = {})
|
|
8307
|
+
data, _status_code, _headers = update_user_pbx_audio_with_http_info(conversation_pbx_audio_uuid, pbx_audio, opts)
|
|
8308
|
+
data
|
|
8309
|
+
end
|
|
8310
|
+
|
|
8311
|
+
# Update user pbx audio
|
|
8312
|
+
# Update a pbx audio file owned by the authenticated user
|
|
8313
|
+
# @param conversation_pbx_audio_uuid [String]
|
|
8314
|
+
# @param pbx_audio [ConversationPbxAudio] Pbx Audio
|
|
8315
|
+
# @param [Hash] opts the optional parameters
|
|
8316
|
+
# @return [Array<(ConversationPbxAudioResponse, Integer, Hash)>] ConversationPbxAudioResponse data, response status code and response headers
|
|
8317
|
+
def update_user_pbx_audio_with_http_info(conversation_pbx_audio_uuid, pbx_audio, opts = {})
|
|
8318
|
+
if @api_client.config.debugging
|
|
8319
|
+
@api_client.config.logger.debug 'Calling API: ConversationApi.update_user_pbx_audio ...'
|
|
8320
|
+
end
|
|
8321
|
+
# verify the required parameter 'conversation_pbx_audio_uuid' is set
|
|
8322
|
+
if @api_client.config.client_side_validation && conversation_pbx_audio_uuid.nil?
|
|
8323
|
+
fail ArgumentError, "Missing the required parameter 'conversation_pbx_audio_uuid' when calling ConversationApi.update_user_pbx_audio"
|
|
8324
|
+
end
|
|
8325
|
+
# verify the required parameter 'pbx_audio' is set
|
|
8326
|
+
if @api_client.config.client_side_validation && pbx_audio.nil?
|
|
8327
|
+
fail ArgumentError, "Missing the required parameter 'pbx_audio' when calling ConversationApi.update_user_pbx_audio"
|
|
8328
|
+
end
|
|
8329
|
+
# resource path
|
|
8330
|
+
local_var_path = '/conversation/pbx/audio/user/{conversationPbxAudioUuid}'.sub('{' + 'conversationPbxAudioUuid' + '}', CGI.escape(conversation_pbx_audio_uuid.to_s))
|
|
8331
|
+
|
|
8332
|
+
# query parameters
|
|
8333
|
+
query_params = opts[:query_params] || {}
|
|
8334
|
+
|
|
8335
|
+
# header parameters
|
|
8336
|
+
header_params = opts[:header_params] || {}
|
|
8337
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
8338
|
+
# HTTP header 'Accept' (if needed)
|
|
8339
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
8340
|
+
# HTTP header 'Content-Type'
|
|
8341
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
8342
|
+
if !content_type.nil?
|
|
8343
|
+
header_params['Content-Type'] = content_type
|
|
8344
|
+
end
|
|
8345
|
+
|
|
8346
|
+
# form parameters
|
|
8347
|
+
form_params = opts[:form_params] || {}
|
|
8348
|
+
|
|
8349
|
+
# http body (model)
|
|
8350
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(pbx_audio)
|
|
8351
|
+
|
|
8352
|
+
# return_type
|
|
8353
|
+
return_type = opts[:debug_return_type] || 'ConversationPbxAudioResponse'
|
|
8354
|
+
|
|
8355
|
+
# auth_names
|
|
8356
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
8357
|
+
|
|
8358
|
+
new_options = opts.merge(
|
|
8359
|
+
:operation => :"ConversationApi.update_user_pbx_audio",
|
|
8360
|
+
:header_params => header_params,
|
|
8361
|
+
:query_params => query_params,
|
|
8362
|
+
:form_params => form_params,
|
|
8363
|
+
:body => post_body,
|
|
8364
|
+
:auth_names => auth_names,
|
|
8365
|
+
:return_type => return_type
|
|
8366
|
+
)
|
|
8367
|
+
|
|
8368
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
8369
|
+
if @api_client.config.debugging
|
|
8370
|
+
@api_client.config.logger.debug "API called: ConversationApi#update_user_pbx_audio\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
8371
|
+
end
|
|
8372
|
+
return data, status_code, headers
|
|
8373
|
+
end
|
|
8374
|
+
|
|
8045
8375
|
# Update virtual agent budget
|
|
8046
8376
|
# Update virtual agent budget
|
|
8047
8377
|
# @param virtual_agent_budget [ConversationVirtualAgentBudget] Virtual Agent Budget
|
|
@@ -40,6 +40,7 @@ module UltracartClient
|
|
|
40
40
|
# @option opts [String] :code Authorization code received back from the browser redirect
|
|
41
41
|
# @option opts [String] :redirect_uri The URI that you redirect the browser to start the authorization process
|
|
42
42
|
# @option opts [String] :refresh_token The refresh token received during the original grant_type=authorization_code that can be used to return a new access token
|
|
43
|
+
# @option opts [String] :device_code The device code received from /oauth/device/authorize
|
|
43
44
|
# @return [OauthTokenResponse]
|
|
44
45
|
def oauth_access_token(client_id, grant_type, opts = {})
|
|
45
46
|
data, _status_code, _headers = oauth_access_token_with_http_info(client_id, grant_type, opts)
|
|
@@ -54,6 +55,7 @@ module UltracartClient
|
|
|
54
55
|
# @option opts [String] :code Authorization code received back from the browser redirect
|
|
55
56
|
# @option opts [String] :redirect_uri The URI that you redirect the browser to start the authorization process
|
|
56
57
|
# @option opts [String] :refresh_token The refresh token received during the original grant_type=authorization_code that can be used to return a new access token
|
|
58
|
+
# @option opts [String] :device_code The device code received from /oauth/device/authorize
|
|
57
59
|
# @return [Array<(OauthTokenResponse, Integer, Hash)>] OauthTokenResponse data, response status code and response headers
|
|
58
60
|
def oauth_access_token_with_http_info(client_id, grant_type, opts = {})
|
|
59
61
|
if @api_client.config.debugging
|
|
@@ -91,6 +93,7 @@ module UltracartClient
|
|
|
91
93
|
form_params['code'] = opts[:'code'] if !opts[:'code'].nil?
|
|
92
94
|
form_params['redirect_uri'] = opts[:'redirect_uri'] if !opts[:'redirect_uri'].nil?
|
|
93
95
|
form_params['refresh_token'] = opts[:'refresh_token'] if !opts[:'refresh_token'].nil?
|
|
96
|
+
form_params['device_code'] = opts[:'device_code'] if !opts[:'device_code'].nil?
|
|
94
97
|
|
|
95
98
|
# http body (model)
|
|
96
99
|
post_body = opts[:debug_body]
|
|
@@ -118,6 +121,83 @@ module UltracartClient
|
|
|
118
121
|
return data, status_code, headers
|
|
119
122
|
end
|
|
120
123
|
|
|
124
|
+
# Initiate a device authorization flow.
|
|
125
|
+
# Initiates the device authorization flow by returning a device code and user code. The device displays the user code to the merchant, who visits the verification URI to approve the request. RFC 8628.
|
|
126
|
+
# @param client_id [String] The OAuth application client_id.
|
|
127
|
+
# @param scope [String] The application-level scope (e.g., crm, ultraship).
|
|
128
|
+
# @param [Hash] opts the optional parameters
|
|
129
|
+
# @return [nil]
|
|
130
|
+
def oauth_device_authorize(client_id, scope, opts = {})
|
|
131
|
+
oauth_device_authorize_with_http_info(client_id, scope, opts)
|
|
132
|
+
nil
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# Initiate a device authorization flow.
|
|
136
|
+
# Initiates the device authorization flow by returning a device code and user code. The device displays the user code to the merchant, who visits the verification URI to approve the request. RFC 8628.
|
|
137
|
+
# @param client_id [String] The OAuth application client_id.
|
|
138
|
+
# @param scope [String] The application-level scope (e.g., crm, ultraship).
|
|
139
|
+
# @param [Hash] opts the optional parameters
|
|
140
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
|
141
|
+
def oauth_device_authorize_with_http_info(client_id, scope, opts = {})
|
|
142
|
+
if @api_client.config.debugging
|
|
143
|
+
@api_client.config.logger.debug 'Calling API: OauthApi.oauth_device_authorize ...'
|
|
144
|
+
end
|
|
145
|
+
# verify the required parameter 'client_id' is set
|
|
146
|
+
if @api_client.config.client_side_validation && client_id.nil?
|
|
147
|
+
fail ArgumentError, "Missing the required parameter 'client_id' when calling OauthApi.oauth_device_authorize"
|
|
148
|
+
end
|
|
149
|
+
# verify the required parameter 'scope' is set
|
|
150
|
+
if @api_client.config.client_side_validation && scope.nil?
|
|
151
|
+
fail ArgumentError, "Missing the required parameter 'scope' when calling OauthApi.oauth_device_authorize"
|
|
152
|
+
end
|
|
153
|
+
# resource path
|
|
154
|
+
local_var_path = '/oauth/device/authorize'
|
|
155
|
+
|
|
156
|
+
# query parameters
|
|
157
|
+
query_params = opts[:query_params] || {}
|
|
158
|
+
|
|
159
|
+
# header parameters
|
|
160
|
+
header_params = opts[:header_params] || {}
|
|
161
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
162
|
+
# HTTP header 'Accept' (if needed)
|
|
163
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
164
|
+
# HTTP header 'Content-Type'
|
|
165
|
+
content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
|
|
166
|
+
if !content_type.nil?
|
|
167
|
+
header_params['Content-Type'] = content_type
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# form parameters
|
|
171
|
+
form_params = opts[:form_params] || {}
|
|
172
|
+
form_params['client_id'] = client_id
|
|
173
|
+
form_params['scope'] = scope
|
|
174
|
+
|
|
175
|
+
# http body (model)
|
|
176
|
+
post_body = opts[:debug_body]
|
|
177
|
+
|
|
178
|
+
# return_type
|
|
179
|
+
return_type = opts[:debug_return_type]
|
|
180
|
+
|
|
181
|
+
# auth_names
|
|
182
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartBrowserApiKey', 'ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
183
|
+
|
|
184
|
+
new_options = opts.merge(
|
|
185
|
+
:operation => :"OauthApi.oauth_device_authorize",
|
|
186
|
+
:header_params => header_params,
|
|
187
|
+
:query_params => query_params,
|
|
188
|
+
:form_params => form_params,
|
|
189
|
+
:body => post_body,
|
|
190
|
+
:auth_names => auth_names,
|
|
191
|
+
:return_type => return_type
|
|
192
|
+
)
|
|
193
|
+
|
|
194
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
195
|
+
if @api_client.config.debugging
|
|
196
|
+
@api_client.config.logger.debug "API called: OauthApi#oauth_device_authorize\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
197
|
+
end
|
|
198
|
+
return data, status_code, headers
|
|
199
|
+
end
|
|
200
|
+
|
|
121
201
|
# Revoke this OAuth application.
|
|
122
202
|
# Revokes the OAuth application associated with the specified client_id and token.
|
|
123
203
|
# @param client_id [String] The OAuth application client_id.
|