ultracart_api 4.1.74 → 4.1.77

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '048bade7fa9ab06961ade9e258cb951517885d69a10c17bb16afd5da671f5f8e'
4
- data.tar.gz: 2ceeac92a4b38fd71ea6184c324bf67a85697bf4b8fa438eba08c72c73c952d0
3
+ metadata.gz: b7ed4def4059749d557efdd0c5c5dd90a7eb112e5250f75bedcd58a6651b248f
4
+ data.tar.gz: 7413b440e4ea11c3a12e60c441c46e95c6a557ee8e90b7071c629eca07b9f503
5
5
  SHA512:
6
- metadata.gz: a8be31cc04399ffb7792f0b217d404e0112bd5bdb3c82ea28315bbc4077c6246328a032687765b591d20e69c2f15926f0de600a75cac5ce91606e3625ea841fd
7
- data.tar.gz: ac811d895523f9de813b4e3a77a8696e5f2dbc1d90ff9ba6a11d550884c54b61c765d07d6dbbadc76562fb5ba7b210f71c0d2e5d711485ad9b291c161ee36f1c
6
+ metadata.gz: e9214ab58181126f9f28f426d9d4b9f12dcc0c125dda7d24e1d55f6cf1d4637928cef4f1db2133123e021e2a0c027e98fec82441864a8a6a94136ded097f6494
7
+ data.tar.gz: 94ece6c1560a2159c9801a8e34e72e37abebefa5c6e5b1116bb8592ba1d3b457b356b2c3d04e9540c7d562663ed9586005a04fec0d3332f5265d84a1f7fc2649
data/README.md CHANGED
@@ -7,7 +7,7 @@ Note: Every method has a sample for every language. See https://github.com/Ultr
7
7
  This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
8
8
 
9
9
  - API version: 2.0.0
10
- - Package version: 4.1.74
10
+ - Package version: 4.1.77
11
11
  - Build package: org.openapitools.codegen.languages.RubyClientCodegen
12
12
  - For more information, please visit [http://www.ultracart.com/api/](http://www.ultracart.com/api/)
13
13
 
@@ -16,7 +16,7 @@ This SDK is automatically generated by the [OpenAPI Generator](https://openapi-g
16
16
  gemfile:
17
17
 
18
18
  ```shell
19
- gem 'ultracart_api', '4.1.74'
19
+ gem 'ultracart_api', '4.1.77'
20
20
  ```
21
21
 
22
22
  install:
@@ -262,6 +262,10 @@ Class | Method | HTTP request | Description
262
262
  *UltracartClient::ConversationApi* | [**update_user_pbx_audio**](docs/ConversationApi.md#update_user_pbx_audio) | **PUT** /conversation/pbx/audio/user/{conversationPbxAudioUuid} | Update user pbx audio
263
263
  *UltracartClient::ConversationApi* | [**update_virtual_agent_budget**](docs/ConversationApi.md#update_virtual_agent_budget) | **PUT** /conversation/virtualagent/budget | Update virtual agent budget
264
264
  *UltracartClient::ConversationApi* | [**update_virtual_agent_capabilities**](docs/ConversationApi.md#update_virtual_agent_capabilities) | **PUT** /conversation/virtualagent/capabilities | Update virtual agent capabilities
265
+ *UltracartClient::ConversationEmbedApi* | [**embed_oauth_device_authorize**](docs/ConversationEmbedApi.md#embed_oauth_device_authorize) | **POST** /conversation_embed/oauth/device/authorize | Initiate a device authorization flow for an embed widget.
266
+ *UltracartClient::ConversationEmbedApi* | [**embed_oauth_revoke**](docs/ConversationEmbedApi.md#embed_oauth_revoke) | **POST** /conversation_embed/oauth/device/revoke | Revoke an embed widget access or refresh token.
267
+ *UltracartClient::ConversationEmbedApi* | [**embed_oauth_token**](docs/ConversationEmbedApi.md#embed_oauth_token) | **POST** /conversation_embed/oauth/device/token | Exchange a device_code or refresh_token for an access token (embed widget).
268
+ *UltracartClient::ConversationEmbedApi* | [**get_embed_pbx_auth**](docs/ConversationEmbedApi.md#get_embed_pbx_auth) | **PUT** /conversation_embed/pbx-auth | Get PBX authorization for the embedded softphone widget.
265
269
  *UltracartClient::CouponApi* | [**delete_coupon**](docs/CouponApi.md#delete_coupon) | **DELETE** /coupon/coupons/{coupon_oid} | Delete a coupon
266
270
  *UltracartClient::CouponApi* | [**delete_coupons_by_code**](docs/CouponApi.md#delete_coupons_by_code) | **DELETE** /coupon/coupons/by_code | Deletes multiple coupons
267
271
  *UltracartClient::CouponApi* | [**delete_coupons_by_oid**](docs/CouponApi.md#delete_coupons_by_oid) | **DELETE** /coupon/coupons/by_oid | Deletes multiple coupons
@@ -815,6 +819,7 @@ Class | Method | HTTP request | Description
815
819
  - [UltracartClient::ConversationDepartmentMembersResponse](docs/ConversationDepartmentMembersResponse.md)
816
820
  - [UltracartClient::ConversationDepartmentResponse](docs/ConversationDepartmentResponse.md)
817
821
  - [UltracartClient::ConversationDepartmentsResponse](docs/ConversationDepartmentsResponse.md)
822
+ - [UltracartClient::ConversationEmbedPbxAuthResponse](docs/ConversationEmbedPbxAuthResponse.md)
818
823
  - [UltracartClient::ConversationEngagement](docs/ConversationEngagement.md)
819
824
  - [UltracartClient::ConversationEngagementEquation](docs/ConversationEngagementEquation.md)
820
825
  - [UltracartClient::ConversationEngagementEquationFunction](docs/ConversationEngagementEquationFunction.md)
@@ -1692,6 +1697,9 @@ Not every change is committed to every SDK.
1692
1697
 
1693
1698
  | Version | Date | Comments |
1694
1699
  | --: | :-: | --- |
1700
+ | 4.1.77 | 04/17/2026 | conversation - embed oauth methods |
1701
+ | 4.1.76 | 04/17/2026 | conversation - embed oauth methods |
1702
+ | 4.1.75 | 04/17/2026 | conversation - embed oauth methods |
1695
1703
  | 4.1.74 | 04/15/2026 | auto order - new method cancelAutoOrderItemByReferenceOrderId |
1696
1704
  | 4.1.73 | 04/13/2026 | conversation pbx - queue configuration for ai summary and call record zoho desk |
1697
1705
  | 4.1.72 | 04/11/2026 | conversation pbx - voicemail notification channels |
@@ -0,0 +1,226 @@
1
+ # UltracartClient::ConversationEmbedApi
2
+
3
+ All URIs are relative to *https://secure.ultracart.com/rest/v2*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**embed_oauth_device_authorize**](ConversationEmbedApi.md#embed_oauth_device_authorize) | **POST** /conversation_embed/oauth/device/authorize | Initiate a device authorization flow for an embed widget. |
8
+ | [**embed_oauth_revoke**](ConversationEmbedApi.md#embed_oauth_revoke) | **POST** /conversation_embed/oauth/device/revoke | Revoke an embed widget access or refresh token. |
9
+ | [**embed_oauth_token**](ConversationEmbedApi.md#embed_oauth_token) | **POST** /conversation_embed/oauth/device/token | Exchange a device_code or refresh_token for an access token (embed widget). |
10
+ | [**get_embed_pbx_auth**](ConversationEmbedApi.md#get_embed_pbx_auth) | **PUT** /conversation_embed/pbx-auth | Get PBX authorization for the embedded softphone widget. |
11
+
12
+
13
+ ## embed_oauth_device_authorize
14
+
15
+ > embed_oauth_device_authorize(client_id, scope)
16
+
17
+ Initiate a device authorization flow for an embed widget.
18
+
19
+ RFC 8628 device authorization. Only the embed widget's client_id and the crm_embed scope are accepted.
20
+
21
+
22
+ ### Examples
23
+
24
+
25
+ (No example for this operation).
26
+
27
+
28
+ #### Using the embed_oauth_device_authorize_with_http_info variant
29
+
30
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
31
+
32
+ > <Array(nil, Integer, Hash)> embed_oauth_device_authorize_with_http_info(client_id, scope)
33
+
34
+ ```ruby
35
+ begin
36
+ # Initiate a device authorization flow for an embed widget.
37
+ data, status_code, headers = api_instance.embed_oauth_device_authorize_with_http_info(client_id, scope)
38
+ p status_code # => 2xx
39
+ p headers # => { ... }
40
+ p data # => nil
41
+ rescue UltracartClient::ApiError => e
42
+ puts "Error when calling ConversationEmbedApi->embed_oauth_device_authorize_with_http_info: #{e}"
43
+ end
44
+ ```
45
+
46
+ ### Parameters
47
+
48
+ | Name | Type | Description | Notes |
49
+ | ---- | ---- | ----------- | ----- |
50
+ | **client_id** | **String** | The embed widget OAuth client_id. | |
51
+ | **scope** | **String** | The application-level scope (must be &#39;crm_embed&#39;). | |
52
+
53
+ ### Return type
54
+
55
+ nil (empty response body)
56
+
57
+ ### Authorization
58
+
59
+ [ultraCartBrowserApiKey](../README.md#ultraCartBrowserApiKey), [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
60
+
61
+ ### HTTP request headers
62
+
63
+ - **Content-Type**: application/x-www-form-urlencoded
64
+ - **Accept**: application/json
65
+
66
+
67
+ ## embed_oauth_revoke
68
+
69
+ > embed_oauth_revoke(client_id, token)
70
+
71
+ Revoke an embed widget access or refresh token.
72
+
73
+ RFC 7009 style — the token itself is proof of possession. Accepts either an access token or a refresh token in the 'token' parameter.
74
+
75
+
76
+ ### Examples
77
+
78
+
79
+ (No example for this operation).
80
+
81
+
82
+ #### Using the embed_oauth_revoke_with_http_info variant
83
+
84
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
85
+
86
+ > <Array(nil, Integer, Hash)> embed_oauth_revoke_with_http_info(client_id, token)
87
+
88
+ ```ruby
89
+ begin
90
+ # Revoke an embed widget access or refresh token.
91
+ data, status_code, headers = api_instance.embed_oauth_revoke_with_http_info(client_id, token)
92
+ p status_code # => 2xx
93
+ p headers # => { ... }
94
+ p data # => nil
95
+ rescue UltracartClient::ApiError => e
96
+ puts "Error when calling ConversationEmbedApi->embed_oauth_revoke_with_http_info: #{e}"
97
+ end
98
+ ```
99
+
100
+ ### Parameters
101
+
102
+ | Name | Type | Description | Notes |
103
+ | ---- | ---- | ----------- | ----- |
104
+ | **client_id** | **String** | The embed widget OAuth client_id. | |
105
+ | **token** | **String** | The token to revoke (access token or refresh token). | |
106
+
107
+ ### Return type
108
+
109
+ nil (empty response body)
110
+
111
+ ### Authorization
112
+
113
+ [ultraCartBrowserApiKey](../README.md#ultraCartBrowserApiKey), [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
114
+
115
+ ### HTTP request headers
116
+
117
+ - **Content-Type**: application/x-www-form-urlencoded
118
+ - **Accept**: application/json
119
+
120
+
121
+ ## embed_oauth_token
122
+
123
+ > embed_oauth_token(client_id, grant_type, opts)
124
+
125
+ Exchange a device_code or refresh_token for an access token (embed widget).
126
+
127
+ Accepts grant_type=urn:ietf:params:oauth:grant-type:device_code or grant_type=refresh_token. Other grant types are rejected. Access tokens issued here expire in 60 minutes.
128
+
129
+
130
+ ### Examples
131
+
132
+
133
+ (No example for this operation).
134
+
135
+
136
+ #### Using the embed_oauth_token_with_http_info variant
137
+
138
+ This returns an Array which contains the response data (`nil` in this case), status code and headers.
139
+
140
+ > <Array(nil, Integer, Hash)> embed_oauth_token_with_http_info(client_id, grant_type, opts)
141
+
142
+ ```ruby
143
+ begin
144
+ # Exchange a device_code or refresh_token for an access token (embed widget).
145
+ data, status_code, headers = api_instance.embed_oauth_token_with_http_info(client_id, grant_type, opts)
146
+ p status_code # => 2xx
147
+ p headers # => { ... }
148
+ p data # => nil
149
+ rescue UltracartClient::ApiError => e
150
+ puts "Error when calling ConversationEmbedApi->embed_oauth_token_with_http_info: #{e}"
151
+ end
152
+ ```
153
+
154
+ ### Parameters
155
+
156
+ | Name | Type | Description | Notes |
157
+ | ---- | ---- | ----------- | ----- |
158
+ | **client_id** | **String** | The embed widget OAuth client_id. | |
159
+ | **grant_type** | **String** | Grant type. | |
160
+ | **device_code** | **String** | The device code received from /oauth/device/authorize (required for device_code grant). | [optional] |
161
+ | **refresh_token** | **String** | The refresh token (required for refresh_token grant). | [optional] |
162
+
163
+ ### Return type
164
+
165
+ nil (empty response body)
166
+
167
+ ### Authorization
168
+
169
+ [ultraCartBrowserApiKey](../README.md#ultraCartBrowserApiKey), [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
170
+
171
+ ### HTTP request headers
172
+
173
+ - **Content-Type**: application/x-www-form-urlencoded
174
+ - **Accept**: application/json
175
+
176
+
177
+ ## get_embed_pbx_auth
178
+
179
+ > <ConversationEmbedPbxAuthResponse> get_embed_pbx_auth
180
+
181
+ Get PBX authorization for the embedded softphone widget.
182
+
183
+ Returns a narrow subset of agent auth fields — only what the softphone widget needs to connect to the PBX relay. Twilio tokens, conversation JWTs, and chat/customer permissions are intentionally excluded.
184
+
185
+
186
+ ### Examples
187
+
188
+
189
+ (No example for this operation).
190
+
191
+
192
+ #### Using the get_embed_pbx_auth_with_http_info variant
193
+
194
+ This returns an Array which contains the response data, status code and headers.
195
+
196
+ > <Array(<ConversationEmbedPbxAuthResponse>, Integer, Hash)> get_embed_pbx_auth_with_http_info
197
+
198
+ ```ruby
199
+ begin
200
+ # Get PBX authorization for the embedded softphone widget.
201
+ data, status_code, headers = api_instance.get_embed_pbx_auth_with_http_info
202
+ p status_code # => 2xx
203
+ p headers # => { ... }
204
+ p data # => <ConversationEmbedPbxAuthResponse>
205
+ rescue UltracartClient::ApiError => e
206
+ puts "Error when calling ConversationEmbedApi->get_embed_pbx_auth_with_http_info: #{e}"
207
+ end
208
+ ```
209
+
210
+ ### Parameters
211
+
212
+ This endpoint does not need any parameter.
213
+
214
+ ### Return type
215
+
216
+ [**ConversationEmbedPbxAuthResponse**](ConversationEmbedPbxAuthResponse.md)
217
+
218
+ ### Authorization
219
+
220
+ [ultraCartOauth](../README.md#ultraCartOauth)
221
+
222
+ ### HTTP request headers
223
+
224
+ - **Content-Type**: Not defined
225
+ - **Accept**: application/json
226
+
@@ -0,0 +1,28 @@
1
+ # UltracartClient::ConversationEmbedPbxAuthResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **merchant_id** | **String** | Merchant identifier the agent belongs to. | [optional] |
8
+ | **pbx_admin** | **Boolean** | True if this agent has PBX admin privileges. | [optional] |
9
+ | **pbx_jwt** | **String** | JWT used by the softphone widget to authenticate to the PBX WebSocket relay. | [optional] |
10
+ | **pbx_supervisor** | **Boolean** | True if this agent has PBX supervisor privileges. | [optional] |
11
+ | **pbx_user** | **Boolean** | True if this agent has baseline PBX access. | [optional] |
12
+ | **pbx_voice_identity** | **String** | Voice identity string identifying this agent to the PBX (e.g., client:user_123). | [optional] |
13
+
14
+ ## Example
15
+
16
+ ```ruby
17
+ require 'ultracart_api'
18
+
19
+ instance = UltracartClient::ConversationEmbedPbxAuthResponse.new(
20
+ merchant_id: null,
21
+ pbx_admin: null,
22
+ pbx_jwt: null,
23
+ pbx_supervisor: null,
24
+ pbx_user: null,
25
+ pbx_voice_identity: null
26
+ )
27
+ ```
28
+
@@ -0,0 +1,330 @@
1
+ =begin
2
+ #UltraCart Rest API V2
3
+
4
+ #UltraCart REST API Version 2
5
+
6
+ The version of the OpenAPI document: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.0.1-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module UltracartClient
16
+ class ConversationEmbedApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+
23
+ def self.new_using_api_key(simple_key, verify_ssl = true, debugging = false)
24
+ api_config = Configuration.new
25
+ api_config.api_key_prefix['x-ultracart-simple-key'] = simple_key
26
+ api_config.api_version = '2017-03-01'
27
+ api_config.verify_ssl = verify_ssl
28
+
29
+ api_client = ApiClient.new(api_config)
30
+ api_client.config.debugging = debugging
31
+
32
+ UltracartClient::ConversationEmbedApi.new(api_client)
33
+ end
34
+
35
+ # Initiate a device authorization flow for an embed widget.
36
+ # RFC 8628 device authorization. Only the embed widget's client_id and the crm_embed scope are accepted.
37
+ # @param client_id [String] The embed widget OAuth client_id.
38
+ # @param scope [String] The application-level scope (must be &#39;crm_embed&#39;).
39
+ # @param [Hash] opts the optional parameters
40
+ # @return [nil]
41
+ def embed_oauth_device_authorize(client_id, scope, opts = {})
42
+ embed_oauth_device_authorize_with_http_info(client_id, scope, opts)
43
+ nil
44
+ end
45
+
46
+ # Initiate a device authorization flow for an embed widget.
47
+ # RFC 8628 device authorization. Only the embed widget&#39;s client_id and the crm_embed scope are accepted.
48
+ # @param client_id [String] The embed widget OAuth client_id.
49
+ # @param scope [String] The application-level scope (must be &#39;crm_embed&#39;).
50
+ # @param [Hash] opts the optional parameters
51
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
52
+ def embed_oauth_device_authorize_with_http_info(client_id, scope, opts = {})
53
+ if @api_client.config.debugging
54
+ @api_client.config.logger.debug 'Calling API: ConversationEmbedApi.embed_oauth_device_authorize ...'
55
+ end
56
+ # verify the required parameter 'client_id' is set
57
+ if @api_client.config.client_side_validation && client_id.nil?
58
+ fail ArgumentError, "Missing the required parameter 'client_id' when calling ConversationEmbedApi.embed_oauth_device_authorize"
59
+ end
60
+ # verify the required parameter 'scope' is set
61
+ if @api_client.config.client_side_validation && scope.nil?
62
+ fail ArgumentError, "Missing the required parameter 'scope' when calling ConversationEmbedApi.embed_oauth_device_authorize"
63
+ end
64
+ # resource path
65
+ local_var_path = '/conversation_embed/oauth/device/authorize'
66
+
67
+ # query parameters
68
+ query_params = opts[:query_params] || {}
69
+
70
+ # header parameters
71
+ header_params = opts[:header_params] || {}
72
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
73
+ # HTTP header 'Accept' (if needed)
74
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
75
+ # HTTP header 'Content-Type'
76
+ content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
77
+ if !content_type.nil?
78
+ header_params['Content-Type'] = content_type
79
+ end
80
+
81
+ # form parameters
82
+ form_params = opts[:form_params] || {}
83
+ form_params['client_id'] = client_id
84
+ form_params['scope'] = scope
85
+
86
+ # http body (model)
87
+ post_body = opts[:debug_body]
88
+
89
+ # return_type
90
+ return_type = opts[:debug_return_type]
91
+
92
+ # auth_names
93
+ auth_names = opts[:debug_auth_names] || ['ultraCartBrowserApiKey', 'ultraCartOauth', 'ultraCartSimpleApiKey']
94
+
95
+ new_options = opts.merge(
96
+ :operation => :"ConversationEmbedApi.embed_oauth_device_authorize",
97
+ :header_params => header_params,
98
+ :query_params => query_params,
99
+ :form_params => form_params,
100
+ :body => post_body,
101
+ :auth_names => auth_names,
102
+ :return_type => return_type
103
+ )
104
+
105
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
106
+ if @api_client.config.debugging
107
+ @api_client.config.logger.debug "API called: ConversationEmbedApi#embed_oauth_device_authorize\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
108
+ end
109
+ return data, status_code, headers
110
+ end
111
+
112
+ # Revoke an embed widget access or refresh token.
113
+ # RFC 7009 style — the token itself is proof of possession. Accepts either an access token or a refresh token in the 'token' parameter.
114
+ # @param client_id [String] The embed widget OAuth client_id.
115
+ # @param token [String] The token to revoke (access token or refresh token).
116
+ # @param [Hash] opts the optional parameters
117
+ # @return [nil]
118
+ def embed_oauth_revoke(client_id, token, opts = {})
119
+ embed_oauth_revoke_with_http_info(client_id, token, opts)
120
+ nil
121
+ end
122
+
123
+ # Revoke an embed widget access or refresh token.
124
+ # RFC 7009 style — the token itself is proof of possession. Accepts either an access token or a refresh token in the &#39;token&#39; parameter.
125
+ # @param client_id [String] The embed widget OAuth client_id.
126
+ # @param token [String] The token to revoke (access token or refresh token).
127
+ # @param [Hash] opts the optional parameters
128
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
129
+ def embed_oauth_revoke_with_http_info(client_id, token, opts = {})
130
+ if @api_client.config.debugging
131
+ @api_client.config.logger.debug 'Calling API: ConversationEmbedApi.embed_oauth_revoke ...'
132
+ end
133
+ # verify the required parameter 'client_id' is set
134
+ if @api_client.config.client_side_validation && client_id.nil?
135
+ fail ArgumentError, "Missing the required parameter 'client_id' when calling ConversationEmbedApi.embed_oauth_revoke"
136
+ end
137
+ # verify the required parameter 'token' is set
138
+ if @api_client.config.client_side_validation && token.nil?
139
+ fail ArgumentError, "Missing the required parameter 'token' when calling ConversationEmbedApi.embed_oauth_revoke"
140
+ end
141
+ # resource path
142
+ local_var_path = '/conversation_embed/oauth/device/revoke'
143
+
144
+ # query parameters
145
+ query_params = opts[:query_params] || {}
146
+
147
+ # header parameters
148
+ header_params = opts[:header_params] || {}
149
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
150
+ # HTTP header 'Accept' (if needed)
151
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
152
+ # HTTP header 'Content-Type'
153
+ content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
154
+ if !content_type.nil?
155
+ header_params['Content-Type'] = content_type
156
+ end
157
+
158
+ # form parameters
159
+ form_params = opts[:form_params] || {}
160
+ form_params['client_id'] = client_id
161
+ form_params['token'] = token
162
+
163
+ # http body (model)
164
+ post_body = opts[:debug_body]
165
+
166
+ # return_type
167
+ return_type = opts[:debug_return_type]
168
+
169
+ # auth_names
170
+ auth_names = opts[:debug_auth_names] || ['ultraCartBrowserApiKey', 'ultraCartOauth', 'ultraCartSimpleApiKey']
171
+
172
+ new_options = opts.merge(
173
+ :operation => :"ConversationEmbedApi.embed_oauth_revoke",
174
+ :header_params => header_params,
175
+ :query_params => query_params,
176
+ :form_params => form_params,
177
+ :body => post_body,
178
+ :auth_names => auth_names,
179
+ :return_type => return_type
180
+ )
181
+
182
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
183
+ if @api_client.config.debugging
184
+ @api_client.config.logger.debug "API called: ConversationEmbedApi#embed_oauth_revoke\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
185
+ end
186
+ return data, status_code, headers
187
+ end
188
+
189
+ # Exchange a device_code or refresh_token for an access token (embed widget).
190
+ # Accepts grant_type=urn:ietf:params:oauth:grant-type:device_code or grant_type=refresh_token. Other grant types are rejected. Access tokens issued here expire in 60 minutes.
191
+ # @param client_id [String] The embed widget OAuth client_id.
192
+ # @param grant_type [String] Grant type.
193
+ # @param [Hash] opts the optional parameters
194
+ # @option opts [String] :device_code The device code received from /oauth/device/authorize (required for device_code grant).
195
+ # @option opts [String] :refresh_token The refresh token (required for refresh_token grant).
196
+ # @return [nil]
197
+ def embed_oauth_token(client_id, grant_type, opts = {})
198
+ embed_oauth_token_with_http_info(client_id, grant_type, opts)
199
+ nil
200
+ end
201
+
202
+ # Exchange a device_code or refresh_token for an access token (embed widget).
203
+ # Accepts grant_type&#x3D;urn:ietf:params:oauth:grant-type:device_code or grant_type&#x3D;refresh_token. Other grant types are rejected. Access tokens issued here expire in 60 minutes.
204
+ # @param client_id [String] The embed widget OAuth client_id.
205
+ # @param grant_type [String] Grant type.
206
+ # @param [Hash] opts the optional parameters
207
+ # @option opts [String] :device_code The device code received from /oauth/device/authorize (required for device_code grant).
208
+ # @option opts [String] :refresh_token The refresh token (required for refresh_token grant).
209
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
210
+ def embed_oauth_token_with_http_info(client_id, grant_type, opts = {})
211
+ if @api_client.config.debugging
212
+ @api_client.config.logger.debug 'Calling API: ConversationEmbedApi.embed_oauth_token ...'
213
+ end
214
+ # verify the required parameter 'client_id' is set
215
+ if @api_client.config.client_side_validation && client_id.nil?
216
+ fail ArgumentError, "Missing the required parameter 'client_id' when calling ConversationEmbedApi.embed_oauth_token"
217
+ end
218
+ # verify the required parameter 'grant_type' is set
219
+ if @api_client.config.client_side_validation && grant_type.nil?
220
+ fail ArgumentError, "Missing the required parameter 'grant_type' when calling ConversationEmbedApi.embed_oauth_token"
221
+ end
222
+ # resource path
223
+ local_var_path = '/conversation_embed/oauth/device/token'
224
+
225
+ # query parameters
226
+ query_params = opts[:query_params] || {}
227
+
228
+ # header parameters
229
+ header_params = opts[:header_params] || {}
230
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
231
+ # HTTP header 'Accept' (if needed)
232
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
233
+ # HTTP header 'Content-Type'
234
+ content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
235
+ if !content_type.nil?
236
+ header_params['Content-Type'] = content_type
237
+ end
238
+
239
+ # form parameters
240
+ form_params = opts[:form_params] || {}
241
+ form_params['client_id'] = client_id
242
+ form_params['grant_type'] = grant_type
243
+ form_params['device_code'] = opts[:'device_code'] if !opts[:'device_code'].nil?
244
+ form_params['refresh_token'] = opts[:'refresh_token'] if !opts[:'refresh_token'].nil?
245
+
246
+ # http body (model)
247
+ post_body = opts[:debug_body]
248
+
249
+ # return_type
250
+ return_type = opts[:debug_return_type]
251
+
252
+ # auth_names
253
+ auth_names = opts[:debug_auth_names] || ['ultraCartBrowserApiKey', 'ultraCartOauth', 'ultraCartSimpleApiKey']
254
+
255
+ new_options = opts.merge(
256
+ :operation => :"ConversationEmbedApi.embed_oauth_token",
257
+ :header_params => header_params,
258
+ :query_params => query_params,
259
+ :form_params => form_params,
260
+ :body => post_body,
261
+ :auth_names => auth_names,
262
+ :return_type => return_type
263
+ )
264
+
265
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
266
+ if @api_client.config.debugging
267
+ @api_client.config.logger.debug "API called: ConversationEmbedApi#embed_oauth_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
268
+ end
269
+ return data, status_code, headers
270
+ end
271
+
272
+ # Get PBX authorization for the embedded softphone widget.
273
+ # Returns a narrow subset of agent auth fields — only what the softphone widget needs to connect to the PBX relay. Twilio tokens, conversation JWTs, and chat/customer permissions are intentionally excluded.
274
+ # @param [Hash] opts the optional parameters
275
+ # @return [ConversationEmbedPbxAuthResponse]
276
+ def get_embed_pbx_auth(opts = {})
277
+ data, _status_code, _headers = get_embed_pbx_auth_with_http_info(opts)
278
+ data
279
+ end
280
+
281
+ # Get PBX authorization for the embedded softphone widget.
282
+ # Returns a narrow subset of agent auth fields — only what the softphone widget needs to connect to the PBX relay. Twilio tokens, conversation JWTs, and chat/customer permissions are intentionally excluded.
283
+ # @param [Hash] opts the optional parameters
284
+ # @return [Array<(ConversationEmbedPbxAuthResponse, Integer, Hash)>] ConversationEmbedPbxAuthResponse data, response status code and response headers
285
+ def get_embed_pbx_auth_with_http_info(opts = {})
286
+ if @api_client.config.debugging
287
+ @api_client.config.logger.debug 'Calling API: ConversationEmbedApi.get_embed_pbx_auth ...'
288
+ end
289
+ # resource path
290
+ local_var_path = '/conversation_embed/pbx-auth'
291
+
292
+ # query parameters
293
+ query_params = opts[:query_params] || {}
294
+
295
+ # header parameters
296
+ header_params = opts[:header_params] || {}
297
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
298
+ # HTTP header 'Accept' (if needed)
299
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
300
+
301
+ # form parameters
302
+ form_params = opts[:form_params] || {}
303
+
304
+ # http body (model)
305
+ post_body = opts[:debug_body]
306
+
307
+ # return_type
308
+ return_type = opts[:debug_return_type] || 'ConversationEmbedPbxAuthResponse'
309
+
310
+ # auth_names
311
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth']
312
+
313
+ new_options = opts.merge(
314
+ :operation => :"ConversationEmbedApi.get_embed_pbx_auth",
315
+ :header_params => header_params,
316
+ :query_params => query_params,
317
+ :form_params => form_params,
318
+ :body => post_body,
319
+ :auth_names => auth_names,
320
+ :return_type => return_type
321
+ )
322
+
323
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
324
+ if @api_client.config.debugging
325
+ @api_client.config.logger.debug "API called: ConversationEmbedApi#get_embed_pbx_auth\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
326
+ end
327
+ return data, status_code, headers
328
+ end
329
+ end
330
+ end
@@ -0,0 +1,270 @@
1
+ =begin
2
+ #UltraCart Rest API V2
3
+
4
+ #UltraCart REST API Version 2
5
+
6
+ The version of the OpenAPI document: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.0.1-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module UltracartClient
17
+ class ConversationEmbedPbxAuthResponse
18
+ # Merchant identifier the agent belongs to.
19
+ attr_accessor :merchant_id
20
+
21
+ # True if this agent has PBX admin privileges.
22
+ attr_accessor :pbx_admin
23
+
24
+ # JWT used by the softphone widget to authenticate to the PBX WebSocket relay.
25
+ attr_accessor :pbx_jwt
26
+
27
+ # True if this agent has PBX supervisor privileges.
28
+ attr_accessor :pbx_supervisor
29
+
30
+ # True if this agent has baseline PBX access.
31
+ attr_accessor :pbx_user
32
+
33
+ # Voice identity string identifying this agent to the PBX (e.g., client:user_123).
34
+ attr_accessor :pbx_voice_identity
35
+
36
+ # Attribute mapping from ruby-style variable name to JSON key.
37
+ def self.attribute_map
38
+ {
39
+ :'merchant_id' => :'merchant_id',
40
+ :'pbx_admin' => :'pbx_admin',
41
+ :'pbx_jwt' => :'pbx_jwt',
42
+ :'pbx_supervisor' => :'pbx_supervisor',
43
+ :'pbx_user' => :'pbx_user',
44
+ :'pbx_voice_identity' => :'pbx_voice_identity'
45
+ }
46
+ end
47
+
48
+ # Returns all the JSON keys this model knows about
49
+ def self.acceptable_attributes
50
+ attribute_map.values
51
+ end
52
+
53
+ # Attribute type mapping.
54
+ def self.openapi_types
55
+ {
56
+ :'merchant_id' => :'String',
57
+ :'pbx_admin' => :'Boolean',
58
+ :'pbx_jwt' => :'String',
59
+ :'pbx_supervisor' => :'Boolean',
60
+ :'pbx_user' => :'Boolean',
61
+ :'pbx_voice_identity' => :'String'
62
+ }
63
+ end
64
+
65
+ # List of attributes with nullable: true
66
+ def self.openapi_nullable
67
+ Set.new([
68
+ ])
69
+ end
70
+
71
+ # Initializes the object
72
+ # @param [Hash] attributes Model attributes in the form of hash
73
+ def initialize(attributes = {})
74
+ if (!attributes.is_a?(Hash))
75
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ConversationEmbedPbxAuthResponse` initialize method"
76
+ end
77
+
78
+ # check to see if the attribute exists and convert string to symbol for hash key
79
+ attributes = attributes.each_with_object({}) { |(k, v), h|
80
+ if (!self.class.attribute_map.key?(k.to_sym))
81
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::ConversationEmbedPbxAuthResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
82
+ end
83
+ h[k.to_sym] = v
84
+ }
85
+
86
+ if attributes.key?(:'merchant_id')
87
+ self.merchant_id = attributes[:'merchant_id']
88
+ end
89
+
90
+ if attributes.key?(:'pbx_admin')
91
+ self.pbx_admin = attributes[:'pbx_admin']
92
+ end
93
+
94
+ if attributes.key?(:'pbx_jwt')
95
+ self.pbx_jwt = attributes[:'pbx_jwt']
96
+ end
97
+
98
+ if attributes.key?(:'pbx_supervisor')
99
+ self.pbx_supervisor = attributes[:'pbx_supervisor']
100
+ end
101
+
102
+ if attributes.key?(:'pbx_user')
103
+ self.pbx_user = attributes[:'pbx_user']
104
+ end
105
+
106
+ if attributes.key?(:'pbx_voice_identity')
107
+ self.pbx_voice_identity = attributes[:'pbx_voice_identity']
108
+ end
109
+ end
110
+
111
+ # Show invalid properties with the reasons. Usually used together with valid?
112
+ # @return Array for valid properties with the reasons
113
+ def list_invalid_properties
114
+ invalid_properties = Array.new
115
+ invalid_properties
116
+ end
117
+
118
+ # Check to see if the all the properties in the model are valid
119
+ # @return true if the model is valid
120
+ def valid?
121
+ true
122
+ end
123
+
124
+ # Checks equality by comparing each attribute.
125
+ # @param [Object] Object to be compared
126
+ def ==(o)
127
+ return true if self.equal?(o)
128
+ self.class == o.class &&
129
+ merchant_id == o.merchant_id &&
130
+ pbx_admin == o.pbx_admin &&
131
+ pbx_jwt == o.pbx_jwt &&
132
+ pbx_supervisor == o.pbx_supervisor &&
133
+ pbx_user == o.pbx_user &&
134
+ pbx_voice_identity == o.pbx_voice_identity
135
+ end
136
+
137
+ # @see the `==` method
138
+ # @param [Object] Object to be compared
139
+ def eql?(o)
140
+ self == o
141
+ end
142
+
143
+ # Calculates hash code according to all attributes.
144
+ # @return [Integer] Hash code
145
+ def hash
146
+ [merchant_id, pbx_admin, pbx_jwt, pbx_supervisor, pbx_user, pbx_voice_identity].hash
147
+ end
148
+
149
+ # Builds the object from hash
150
+ # @param [Hash] attributes Model attributes in the form of hash
151
+ # @return [Object] Returns the model itself
152
+ def self.build_from_hash(attributes)
153
+ new.build_from_hash(attributes)
154
+ end
155
+
156
+ # Builds the object from hash
157
+ # @param [Hash] attributes Model attributes in the form of hash
158
+ # @return [Object] Returns the model itself
159
+ def build_from_hash(attributes)
160
+ return nil unless attributes.is_a?(Hash)
161
+ attributes = attributes.transform_keys(&:to_sym)
162
+ self.class.openapi_types.each_pair do |key, type|
163
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
164
+ self.send("#{key}=", nil)
165
+ elsif type =~ /\AArray<(.*)>/i
166
+ # check to ensure the input is an array given that the attribute
167
+ # is documented as an array but the input is not
168
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
169
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
170
+ end
171
+ elsif !attributes[self.class.attribute_map[key]].nil?
172
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
173
+ end
174
+ end
175
+
176
+ self
177
+ end
178
+
179
+ # Deserializes the data based on type
180
+ # @param string type Data type
181
+ # @param string value Value to be deserialized
182
+ # @return [Object] Deserialized data
183
+ def _deserialize(type, value)
184
+ case type.to_sym
185
+ when :Time
186
+ Time.parse(value)
187
+ when :Date
188
+ Date.parse(value)
189
+ when :String
190
+ value.to_s
191
+ when :Integer
192
+ value.to_i
193
+ when :Float
194
+ value.to_f
195
+ when :Boolean
196
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
197
+ true
198
+ else
199
+ false
200
+ end
201
+ when :Object
202
+ # generic object (usually a Hash), return directly
203
+ value
204
+ when /\AArray<(?<inner_type>.+)>\z/
205
+ inner_type = Regexp.last_match[:inner_type]
206
+ value.map { |v| _deserialize(inner_type, v) }
207
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
208
+ k_type = Regexp.last_match[:k_type]
209
+ v_type = Regexp.last_match[:v_type]
210
+ {}.tap do |hash|
211
+ value.each do |k, v|
212
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
213
+ end
214
+ end
215
+ else # model
216
+ # models (e.g. Pet) or oneOf
217
+ klass = UltracartClient.const_get(type)
218
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
219
+ end
220
+ end
221
+
222
+ # Returns the string representation of the object
223
+ # @return [String] String presentation of the object
224
+ def to_s
225
+ to_hash.to_s
226
+ end
227
+
228
+ # to_body is an alias to to_hash (backward compatibility)
229
+ # @return [Hash] Returns the object in the form of hash
230
+ def to_body
231
+ to_hash
232
+ end
233
+
234
+ # Returns the object in the form of hash
235
+ # @return [Hash] Returns the object in the form of hash
236
+ def to_hash
237
+ hash = {}
238
+ self.class.attribute_map.each_pair do |attr, param|
239
+ value = self.send(attr)
240
+ if value.nil?
241
+ is_nullable = self.class.openapi_nullable.include?(attr)
242
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
243
+ end
244
+
245
+ hash[param] = _to_hash(value)
246
+ end
247
+ hash
248
+ end
249
+
250
+ # Outputs non-array value in the form of hash
251
+ # For object, use to_hash. Otherwise, just return the value
252
+ # @param [Object] value Any valid value
253
+ # @return [Hash] Returns the value in the form of hash
254
+ def _to_hash(value)
255
+ if value.is_a?(Array)
256
+ value.compact.map { |v| _to_hash(v) }
257
+ elsif value.is_a?(Hash)
258
+ {}.tap do |hash|
259
+ value.each { |k, v| hash[k] = _to_hash(v) }
260
+ end
261
+ elsif value.respond_to? :to_hash
262
+ value.to_hash
263
+ else
264
+ value
265
+ end
266
+ end
267
+
268
+ end
269
+
270
+ end
@@ -11,5 +11,5 @@ OpenAPI Generator version: 6.0.1-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '4.1.74'
14
+ VERSION = '4.1.77'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -168,6 +168,7 @@ require 'ultracart_api/models/conversation_department_member'
168
168
  require 'ultracart_api/models/conversation_department_members_response'
169
169
  require 'ultracart_api/models/conversation_department_response'
170
170
  require 'ultracart_api/models/conversation_departments_response'
171
+ require 'ultracart_api/models/conversation_embed_pbx_auth_response'
171
172
  require 'ultracart_api/models/conversation_engagement'
172
173
  require 'ultracart_api/models/conversation_engagement_equation'
173
174
  require 'ultracart_api/models/conversation_engagement_equation_function'
@@ -977,6 +978,7 @@ require 'ultracart_api/api/auto_order_api'
977
978
  require 'ultracart_api/api/channel_partner_api'
978
979
  require 'ultracart_api/api/checkout_api'
979
980
  require 'ultracart_api/api/conversation_api'
981
+ require 'ultracart_api/api/conversation_embed_api'
980
982
  require 'ultracart_api/api/coupon_api'
981
983
  require 'ultracart_api/api/customer_api'
982
984
  require 'ultracart_api/api/datawarehouse_api'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ultracart_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.74
4
+ version: 4.1.77
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-04-15 00:00:00.000000000 Z
11
+ date: 2026-04-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -217,6 +217,8 @@ files:
217
217
  - docs/ConversationDepartmentMembersResponse.md
218
218
  - docs/ConversationDepartmentResponse.md
219
219
  - docs/ConversationDepartmentsResponse.md
220
+ - docs/ConversationEmbedApi.md
221
+ - docs/ConversationEmbedPbxAuthResponse.md
220
222
  - docs/ConversationEngagement.md
221
223
  - docs/ConversationEngagementEquation.md
222
224
  - docs/ConversationEngagementEquationFunction.md
@@ -1041,6 +1043,7 @@ files:
1041
1043
  - lib/ultracart_api/api/channel_partner_api.rb
1042
1044
  - lib/ultracart_api/api/checkout_api.rb
1043
1045
  - lib/ultracart_api/api/conversation_api.rb
1046
+ - lib/ultracart_api/api/conversation_embed_api.rb
1044
1047
  - lib/ultracart_api/api/coupon_api.rb
1045
1048
  - lib/ultracart_api/api/customer_api.rb
1046
1049
  - lib/ultracart_api/api/datawarehouse_api.rb
@@ -1210,6 +1213,7 @@ files:
1210
1213
  - lib/ultracart_api/models/conversation_department_members_response.rb
1211
1214
  - lib/ultracart_api/models/conversation_department_response.rb
1212
1215
  - lib/ultracart_api/models/conversation_departments_response.rb
1216
+ - lib/ultracart_api/models/conversation_embed_pbx_auth_response.rb
1213
1217
  - lib/ultracart_api/models/conversation_engagement.rb
1214
1218
  - lib/ultracart_api/models/conversation_engagement_equation.rb
1215
1219
  - lib/ultracart_api/models/conversation_engagement_equation_function.rb