ultracart_api 4.0.37.rc → 4.0.38.rc
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -4
- data/docs/AutoOrderItem.md +4 -0
- data/docs/ConversationAgentAuth.md +28 -0
- data/docs/ConversationAgentAuthResponse.md +10 -12
- data/docs/ConversationApi.md +4 -4
- data/docs/ConversationResponse.md +26 -0
- data/docs/ConversationStartResponse.md +2 -4
- data/docs/EmailCommseqPostcard.md +1 -1
- data/lib/ultracart_api/api/conversation_api.rb +3 -3
- data/lib/ultracart_api/models/auto_order_item.rb +21 -1
- data/lib/ultracart_api/models/conversation_agent_auth.rb +266 -0
- data/lib/ultracart_api/models/conversation_agent_auth_response.rb +32 -42
- data/lib/ultracart_api/models/conversation_response.rb +256 -0
- data/lib/ultracart_api/models/conversation_start_response.rb +7 -16
- data/lib/ultracart_api/models/email_commseq_postcard.rb +1 -1
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +2 -0
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f66d20704c5bb1cc75610371df8890543da872135b00e872ae000d6a1c932a4
|
4
|
+
data.tar.gz: 730a9a5582042d832feebac3e619a6352d328b0c5d7d88aedcf4f2dfc01ad4ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 12969f6465f641fa8c24186a103eae395317cd0e46c7b0dcb248163cbb8dcfc8e09fbf6dde4a1744f7eb03e21383e1290622e8ddbf748eb3a3dad2b21fae79d2
|
7
|
+
data.tar.gz: e8cadff3f645622c757ce6e43cab002b32c23f22a5c8692f28f59d56aa5315eb7b1e0e3c65a2c989724408f4777e0b2b001bdf63a52eec5f43f8c575596e69ad
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ UltraCart REST API Version 2
|
|
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.0.
|
10
|
+
- Package version: 4.0.38.rc
|
11
11
|
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
12
12
|
For more information, please visit [http://www.ultracart.com](http://www.ultracart.com)
|
13
13
|
|
@@ -24,16 +24,16 @@ gem build ultracart_api.gemspec
|
|
24
24
|
Then either install the gem locally:
|
25
25
|
|
26
26
|
```shell
|
27
|
-
gem install ./ultracart_api-4.0.
|
27
|
+
gem install ./ultracart_api-4.0.38.rc.gem
|
28
28
|
```
|
29
29
|
|
30
|
-
(for development, run `gem install --dev ./ultracart_api-4.0.
|
30
|
+
(for development, run `gem install --dev ./ultracart_api-4.0.38.rc.gem` to install the development dependencies)
|
31
31
|
|
32
32
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
33
33
|
|
34
34
|
Finally add this to the Gemfile:
|
35
35
|
|
36
|
-
gem 'ultracart_api', '~> 4.0.
|
36
|
+
gem 'ultracart_api', '~> 4.0.38.rc'
|
37
37
|
|
38
38
|
### Install from Git
|
39
39
|
|
@@ -562,10 +562,12 @@ Class | Method | HTTP request | Description
|
|
562
562
|
- [UltracartClient::CheckoutStateProvinceResponse](docs/CheckoutStateProvinceResponse.md)
|
563
563
|
- [UltracartClient::CityStateZip](docs/CityStateZip.md)
|
564
564
|
- [UltracartClient::Conversation](docs/Conversation.md)
|
565
|
+
- [UltracartClient::ConversationAgentAuth](docs/ConversationAgentAuth.md)
|
565
566
|
- [UltracartClient::ConversationAgentAuthResponse](docs/ConversationAgentAuthResponse.md)
|
566
567
|
- [UltracartClient::ConversationMessage](docs/ConversationMessage.md)
|
567
568
|
- [UltracartClient::ConversationMessageTransportStatus](docs/ConversationMessageTransportStatus.md)
|
568
569
|
- [UltracartClient::ConversationParticipant](docs/ConversationParticipant.md)
|
570
|
+
- [UltracartClient::ConversationResponse](docs/ConversationResponse.md)
|
569
571
|
- [UltracartClient::ConversationStartRequest](docs/ConversationStartRequest.md)
|
570
572
|
- [UltracartClient::ConversationStartResponse](docs/ConversationStartResponse.md)
|
571
573
|
- [UltracartClient::ConversationSummary](docs/ConversationSummary.md)
|
@@ -1160,6 +1162,7 @@ Not every change is committed to every SDK.
|
|
1160
1162
|
|
1161
1163
|
| Version | Date | Comments |
|
1162
1164
|
| --: | :-: | --- |
|
1165
|
+
| 4.0.38-RC | 07/21/2022 | conversation bugfix for poor response objects |
|
1163
1166
|
| 4.0.37-RC | 07/20/2022 | conversation participant name added |
|
1164
1167
|
| 4.0.36-RC | 07/18/2022 | twilio dev |
|
1165
1168
|
| 4.0.35-RC | 07/14/2022 | Add channel storefront_oid to the customer activity record |
|
data/docs/AutoOrderItem.md
CHANGED
@@ -11,6 +11,7 @@
|
|
11
11
|
| **arbitrary_unit_cost** | **Float** | Arbitrary unit cost that rebills of this item should occur at | [optional] |
|
12
12
|
| **arbitrary_unit_cost_remaining_orders** | **Integer** | The number of rebills to give the arbitrary unit cost on before reverting to normal pricing. | [optional] |
|
13
13
|
| **auto_order_item_oid** | **Integer** | Primary key of AutoOrderItem | [optional] |
|
14
|
+
| **first_order_dts** | **String** | Date/time of the first order of this item. Null if item added to auto order and has not been rebilled yet. | [optional] |
|
14
15
|
| **frequency** | **String** | Frequency of the rebill if not a fixed schedule | [optional] |
|
15
16
|
| **future_schedules** | [**Array<AutoOrderItemFutureSchedule>**](AutoOrderItemFutureSchedule.md) | The future rebill schedule for this item up to the next ten rebills | [optional] |
|
16
17
|
| **last_order_dts** | **String** | Date/time of the last order of this item | [optional] |
|
@@ -22,6 +23,7 @@
|
|
22
23
|
| **options** | [**Array<AutoOrderItemOption>**](AutoOrderItemOption.md) | Options associated with this item | [optional] |
|
23
24
|
| **original_item_id** | **String** | The original item id purchased. This item controls scheduling. If you wish to modify a schedule, for example, from monthly to yearly, change this item from your monthly item to your yearly item, and then change the next_shipment_dts to your desired date. | [optional] |
|
24
25
|
| **original_quantity** | **Float** | The original quantity purchased | [optional] |
|
26
|
+
| **paused** | **Boolean** | True if paused. This field is an object instead of a primitive for backwards compatibility. | [optional] |
|
25
27
|
| **paypal_payer_id** | **String** | The PayPal Payer ID tied to this item | [optional] |
|
26
28
|
| **paypal_recurring_payment_profile_id** | **String** | The PayPal Profile ID tied to this item | [optional] |
|
27
29
|
| **preshipment_notice_sent** | **Boolean** | True if the preshipment notice associated with the next rebill has been sent | [optional] |
|
@@ -42,6 +44,7 @@ instance = UltracartClient::AutoOrderItem.new(
|
|
42
44
|
arbitrary_unit_cost: null,
|
43
45
|
arbitrary_unit_cost_remaining_orders: null,
|
44
46
|
auto_order_item_oid: null,
|
47
|
+
first_order_dts: null,
|
45
48
|
frequency: null,
|
46
49
|
future_schedules: null,
|
47
50
|
last_order_dts: null,
|
@@ -53,6 +56,7 @@ instance = UltracartClient::AutoOrderItem.new(
|
|
53
56
|
options: null,
|
54
57
|
original_item_id: null,
|
55
58
|
original_quantity: null,
|
59
|
+
paused: null,
|
56
60
|
paypal_payer_id: null,
|
57
61
|
paypal_recurring_payment_profile_id: null,
|
58
62
|
preshipment_notice_sent: null,
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# UltracartClient::ConversationAgentAuth
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **conversation_participant_arn** | **String** | | [optional] |
|
8
|
+
| **conversation_participant_name** | **String** | | [optional] |
|
9
|
+
| **jwt** | **String** | | [optional] |
|
10
|
+
| **merchant_id** | **String** | | [optional] |
|
11
|
+
| **twilio_phone_numbers** | **Array<String>** | | [optional] |
|
12
|
+
| **websocket_url** | **String** | | [optional] |
|
13
|
+
|
14
|
+
## Example
|
15
|
+
|
16
|
+
```ruby
|
17
|
+
require 'ultracart_api'
|
18
|
+
|
19
|
+
instance = UltracartClient::ConversationAgentAuth.new(
|
20
|
+
conversation_participant_arn: null,
|
21
|
+
conversation_participant_name: null,
|
22
|
+
jwt: null,
|
23
|
+
merchant_id: null,
|
24
|
+
twilio_phone_numbers: null,
|
25
|
+
websocket_url: null
|
26
|
+
)
|
27
|
+
```
|
28
|
+
|
@@ -4,12 +4,11 @@
|
|
4
4
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **
|
8
|
-
| **
|
9
|
-
| **
|
10
|
-
| **
|
11
|
-
| **
|
12
|
-
| **websocket_url** | **String** | | [optional] |
|
7
|
+
| **agent_auth** | [**ConversationAgentAuth**](ConversationAgentAuth.md) | | [optional] |
|
8
|
+
| **error** | [**Error**](Error.md) | | [optional] |
|
9
|
+
| **metadata** | [**ResponseMetadata**](ResponseMetadata.md) | | [optional] |
|
10
|
+
| **success** | **Boolean** | Indicates if API call was successful | [optional] |
|
11
|
+
| **warning** | [**Warning**](Warning.md) | | [optional] |
|
13
12
|
|
14
13
|
## Example
|
15
14
|
|
@@ -17,12 +16,11 @@
|
|
17
16
|
require 'ultracart_api'
|
18
17
|
|
19
18
|
instance = UltracartClient::ConversationAgentAuthResponse.new(
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
websocket_url: null
|
19
|
+
agent_auth: null,
|
20
|
+
error: null,
|
21
|
+
metadata: null,
|
22
|
+
success: null,
|
23
|
+
warning: null
|
26
24
|
)
|
27
25
|
```
|
28
26
|
|
data/docs/ConversationApi.md
CHANGED
@@ -83,7 +83,7 @@ This endpoint does not need any parameter.
|
|
83
83
|
|
84
84
|
## get_conversation
|
85
85
|
|
86
|
-
> <
|
86
|
+
> <ConversationResponse> get_conversation(conversation_uuid)
|
87
87
|
|
88
88
|
Retrieve a conversation
|
89
89
|
|
@@ -118,7 +118,7 @@ end
|
|
118
118
|
|
119
119
|
This returns an Array which contains the response data, status code and headers.
|
120
120
|
|
121
|
-
> <Array(<
|
121
|
+
> <Array(<ConversationResponse>, Integer, Hash)> get_conversation_with_http_info(conversation_uuid)
|
122
122
|
|
123
123
|
```ruby
|
124
124
|
begin
|
@@ -126,7 +126,7 @@ begin
|
|
126
126
|
data, status_code, headers = api_instance.get_conversation_with_http_info(conversation_uuid)
|
127
127
|
p status_code # => 2xx
|
128
128
|
p headers # => { ... }
|
129
|
-
p data # => <
|
129
|
+
p data # => <ConversationResponse>
|
130
130
|
rescue UltracartClient::ApiError => e
|
131
131
|
puts "Error when calling ConversationApi->get_conversation_with_http_info: #{e}"
|
132
132
|
end
|
@@ -140,7 +140,7 @@ end
|
|
140
140
|
|
141
141
|
### Return type
|
142
142
|
|
143
|
-
[**
|
143
|
+
[**ConversationResponse**](ConversationResponse.md)
|
144
144
|
|
145
145
|
### Authorization
|
146
146
|
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# UltracartClient::ConversationResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **conversation** | [**Conversation**](Conversation.md) | | [optional] |
|
8
|
+
| **error** | [**Error**](Error.md) | | [optional] |
|
9
|
+
| **metadata** | [**ResponseMetadata**](ResponseMetadata.md) | | [optional] |
|
10
|
+
| **success** | **Boolean** | Indicates if API call was successful | [optional] |
|
11
|
+
| **warning** | [**Warning**](Warning.md) | | [optional] |
|
12
|
+
|
13
|
+
## Example
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
require 'ultracart_api'
|
17
|
+
|
18
|
+
instance = UltracartClient::ConversationResponse.new(
|
19
|
+
conversation: null,
|
20
|
+
error: null,
|
21
|
+
metadata: null,
|
22
|
+
success: null,
|
23
|
+
warning: null
|
24
|
+
)
|
25
|
+
```
|
26
|
+
|
@@ -4,8 +4,7 @@
|
|
4
4
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
|
-
| **
|
8
|
-
| **conversation_uuid** | **String** | | [optional] |
|
7
|
+
| **conversation** | [**Conversation**](Conversation.md) | | [optional] |
|
9
8
|
|
10
9
|
## Example
|
11
10
|
|
@@ -13,8 +12,7 @@
|
|
13
12
|
require 'ultracart_api'
|
14
13
|
|
15
14
|
instance = UltracartClient::ConversationStartResponse.new(
|
16
|
-
|
17
|
-
conversation_uuid: null
|
15
|
+
conversation: null
|
18
16
|
)
|
19
17
|
```
|
20
18
|
|
@@ -14,7 +14,7 @@
|
|
14
14
|
| **postcard_container_cjson_last_modified_dts** | **String** | Timestamp the last time the container was modified. | [optional] |
|
15
15
|
| **postcard_front_container_cjson** | **String** | Postcard front container cjson | [optional] |
|
16
16
|
| **postcard_front_container_uuid** | **String** | Postcard front container uuid | [optional] |
|
17
|
-
| **screenshot_back_url** | **String** | URL to screenshot of the
|
17
|
+
| **screenshot_back_url** | **String** | URL to screenshot of the front of the postcard | [optional] |
|
18
18
|
| **screenshot_front_url** | **String** | URL to screenshot of the front of the postcard | [optional] |
|
19
19
|
| **storefront_oid** | **Integer** | Storefront oid | [optional] |
|
20
20
|
|
@@ -94,7 +94,7 @@ module UltracartClient
|
|
94
94
|
# Retrieve a conversation including the participants and messages
|
95
95
|
# @param conversation_uuid [String]
|
96
96
|
# @param [Hash] opts the optional parameters
|
97
|
-
# @return [
|
97
|
+
# @return [ConversationResponse]
|
98
98
|
def get_conversation(conversation_uuid, opts = {})
|
99
99
|
data, _status_code, _headers = get_conversation_with_http_info(conversation_uuid, opts)
|
100
100
|
data
|
@@ -104,7 +104,7 @@ module UltracartClient
|
|
104
104
|
# Retrieve a conversation including the participants and messages
|
105
105
|
# @param conversation_uuid [String]
|
106
106
|
# @param [Hash] opts the optional parameters
|
107
|
-
# @return [Array<(
|
107
|
+
# @return [Array<(ConversationResponse, Integer, Hash)>] ConversationResponse data, response status code and response headers
|
108
108
|
def get_conversation_with_http_info(conversation_uuid, opts = {})
|
109
109
|
if @api_client.config.debugging
|
110
110
|
@api_client.config.logger.debug 'Calling API: ConversationApi.get_conversation ...'
|
@@ -132,7 +132,7 @@ module UltracartClient
|
|
132
132
|
post_body = opts[:debug_body]
|
133
133
|
|
134
134
|
# return_type
|
135
|
-
return_type = opts[:debug_return_type] || '
|
135
|
+
return_type = opts[:debug_return_type] || 'ConversationResponse'
|
136
136
|
|
137
137
|
# auth_names
|
138
138
|
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
@@ -36,6 +36,9 @@ module UltracartClient
|
|
36
36
|
# Primary key of AutoOrderItem
|
37
37
|
attr_accessor :auto_order_item_oid
|
38
38
|
|
39
|
+
# Date/time of the first order of this item. Null if item added to auto order and has not been rebilled yet.
|
40
|
+
attr_accessor :first_order_dts
|
41
|
+
|
39
42
|
# Frequency of the rebill if not a fixed schedule
|
40
43
|
attr_accessor :frequency
|
41
44
|
|
@@ -69,6 +72,9 @@ module UltracartClient
|
|
69
72
|
# The original quantity purchased
|
70
73
|
attr_accessor :original_quantity
|
71
74
|
|
75
|
+
# True if paused. This field is an object instead of a primitive for backwards compatibility.
|
76
|
+
attr_accessor :paused
|
77
|
+
|
72
78
|
# The PayPal Payer ID tied to this item
|
73
79
|
attr_accessor :paypal_payer_id
|
74
80
|
|
@@ -118,6 +124,7 @@ module UltracartClient
|
|
118
124
|
:'arbitrary_unit_cost' => :'arbitrary_unit_cost',
|
119
125
|
:'arbitrary_unit_cost_remaining_orders' => :'arbitrary_unit_cost_remaining_orders',
|
120
126
|
:'auto_order_item_oid' => :'auto_order_item_oid',
|
127
|
+
:'first_order_dts' => :'first_order_dts',
|
121
128
|
:'frequency' => :'frequency',
|
122
129
|
:'future_schedules' => :'future_schedules',
|
123
130
|
:'last_order_dts' => :'last_order_dts',
|
@@ -129,6 +136,7 @@ module UltracartClient
|
|
129
136
|
:'options' => :'options',
|
130
137
|
:'original_item_id' => :'original_item_id',
|
131
138
|
:'original_quantity' => :'original_quantity',
|
139
|
+
:'paused' => :'paused',
|
132
140
|
:'paypal_payer_id' => :'paypal_payer_id',
|
133
141
|
:'paypal_recurring_payment_profile_id' => :'paypal_recurring_payment_profile_id',
|
134
142
|
:'preshipment_notice_sent' => :'preshipment_notice_sent',
|
@@ -153,6 +161,7 @@ module UltracartClient
|
|
153
161
|
:'arbitrary_unit_cost' => :'Float',
|
154
162
|
:'arbitrary_unit_cost_remaining_orders' => :'Integer',
|
155
163
|
:'auto_order_item_oid' => :'Integer',
|
164
|
+
:'first_order_dts' => :'String',
|
156
165
|
:'frequency' => :'String',
|
157
166
|
:'future_schedules' => :'Array<AutoOrderItemFutureSchedule>',
|
158
167
|
:'last_order_dts' => :'String',
|
@@ -164,6 +173,7 @@ module UltracartClient
|
|
164
173
|
:'options' => :'Array<AutoOrderItemOption>',
|
165
174
|
:'original_item_id' => :'String',
|
166
175
|
:'original_quantity' => :'Float',
|
176
|
+
:'paused' => :'Boolean',
|
167
177
|
:'paypal_payer_id' => :'String',
|
168
178
|
:'paypal_recurring_payment_profile_id' => :'String',
|
169
179
|
:'preshipment_notice_sent' => :'Boolean',
|
@@ -222,6 +232,10 @@ module UltracartClient
|
|
222
232
|
self.auto_order_item_oid = attributes[:'auto_order_item_oid']
|
223
233
|
end
|
224
234
|
|
235
|
+
if attributes.key?(:'first_order_dts')
|
236
|
+
self.first_order_dts = attributes[:'first_order_dts']
|
237
|
+
end
|
238
|
+
|
225
239
|
if attributes.key?(:'frequency')
|
226
240
|
self.frequency = attributes[:'frequency']
|
227
241
|
end
|
@@ -270,6 +284,10 @@ module UltracartClient
|
|
270
284
|
self.original_quantity = attributes[:'original_quantity']
|
271
285
|
end
|
272
286
|
|
287
|
+
if attributes.key?(:'paused')
|
288
|
+
self.paused = attributes[:'paused']
|
289
|
+
end
|
290
|
+
|
273
291
|
if attributes.key?(:'paypal_payer_id')
|
274
292
|
self.paypal_payer_id = attributes[:'paypal_payer_id']
|
275
293
|
end
|
@@ -332,6 +350,7 @@ module UltracartClient
|
|
332
350
|
arbitrary_unit_cost == o.arbitrary_unit_cost &&
|
333
351
|
arbitrary_unit_cost_remaining_orders == o.arbitrary_unit_cost_remaining_orders &&
|
334
352
|
auto_order_item_oid == o.auto_order_item_oid &&
|
353
|
+
first_order_dts == o.first_order_dts &&
|
335
354
|
frequency == o.frequency &&
|
336
355
|
future_schedules == o.future_schedules &&
|
337
356
|
last_order_dts == o.last_order_dts &&
|
@@ -343,6 +362,7 @@ module UltracartClient
|
|
343
362
|
options == o.options &&
|
344
363
|
original_item_id == o.original_item_id &&
|
345
364
|
original_quantity == o.original_quantity &&
|
365
|
+
paused == o.paused &&
|
346
366
|
paypal_payer_id == o.paypal_payer_id &&
|
347
367
|
paypal_recurring_payment_profile_id == o.paypal_recurring_payment_profile_id &&
|
348
368
|
preshipment_notice_sent == o.preshipment_notice_sent &&
|
@@ -360,7 +380,7 @@ module UltracartClient
|
|
360
380
|
# Calculates hash code according to all attributes.
|
361
381
|
# @return [Integer] Hash code
|
362
382
|
def hash
|
363
|
-
[arbitrary_item_id, arbitrary_percentage_discount, arbitrary_quantity, arbitrary_schedule_days, arbitrary_unit_cost, arbitrary_unit_cost_remaining_orders, auto_order_item_oid, frequency, future_schedules, last_order_dts, life_time_value, next_preshipment_notice_dts, next_shipment_dts, no_order_after_dts, number_of_rebills, options, original_item_id, original_quantity, paypal_payer_id, paypal_recurring_payment_profile_id, preshipment_notice_sent, rebill_value, remaining_repeat_count, simple_schedule].hash
|
383
|
+
[arbitrary_item_id, arbitrary_percentage_discount, arbitrary_quantity, arbitrary_schedule_days, arbitrary_unit_cost, arbitrary_unit_cost_remaining_orders, auto_order_item_oid, first_order_dts, frequency, future_schedules, last_order_dts, life_time_value, next_preshipment_notice_dts, next_shipment_dts, no_order_after_dts, number_of_rebills, options, original_item_id, original_quantity, paused, paypal_payer_id, paypal_recurring_payment_profile_id, preshipment_notice_sent, rebill_value, remaining_repeat_count, simple_schedule].hash
|
364
384
|
end
|
365
385
|
|
366
386
|
# Builds the object from hash
|
@@ -0,0 +1,266 @@
|
|
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 ConversationAgentAuth
|
18
|
+
attr_accessor :conversation_participant_arn
|
19
|
+
|
20
|
+
attr_accessor :conversation_participant_name
|
21
|
+
|
22
|
+
attr_accessor :jwt
|
23
|
+
|
24
|
+
attr_accessor :merchant_id
|
25
|
+
|
26
|
+
attr_accessor :twilio_phone_numbers
|
27
|
+
|
28
|
+
attr_accessor :websocket_url
|
29
|
+
|
30
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
31
|
+
def self.attribute_map
|
32
|
+
{
|
33
|
+
:'conversation_participant_arn' => :'conversation_participant_arn',
|
34
|
+
:'conversation_participant_name' => :'conversation_participant_name',
|
35
|
+
:'jwt' => :'jwt',
|
36
|
+
:'merchant_id' => :'merchant_id',
|
37
|
+
:'twilio_phone_numbers' => :'twilio_phone_numbers',
|
38
|
+
:'websocket_url' => :'websocket_url'
|
39
|
+
}
|
40
|
+
end
|
41
|
+
|
42
|
+
# Returns all the JSON keys this model knows about
|
43
|
+
def self.acceptable_attributes
|
44
|
+
attribute_map.values
|
45
|
+
end
|
46
|
+
|
47
|
+
# Attribute type mapping.
|
48
|
+
def self.openapi_types
|
49
|
+
{
|
50
|
+
:'conversation_participant_arn' => :'String',
|
51
|
+
:'conversation_participant_name' => :'String',
|
52
|
+
:'jwt' => :'String',
|
53
|
+
:'merchant_id' => :'String',
|
54
|
+
:'twilio_phone_numbers' => :'Array<String>',
|
55
|
+
:'websocket_url' => :'String'
|
56
|
+
}
|
57
|
+
end
|
58
|
+
|
59
|
+
# List of attributes with nullable: true
|
60
|
+
def self.openapi_nullable
|
61
|
+
Set.new([
|
62
|
+
])
|
63
|
+
end
|
64
|
+
|
65
|
+
# Initializes the object
|
66
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
67
|
+
def initialize(attributes = {})
|
68
|
+
if (!attributes.is_a?(Hash))
|
69
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ConversationAgentAuth` initialize method"
|
70
|
+
end
|
71
|
+
|
72
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
73
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
74
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
75
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::ConversationAgentAuth`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
76
|
+
end
|
77
|
+
h[k.to_sym] = v
|
78
|
+
}
|
79
|
+
|
80
|
+
if attributes.key?(:'conversation_participant_arn')
|
81
|
+
self.conversation_participant_arn = attributes[:'conversation_participant_arn']
|
82
|
+
end
|
83
|
+
|
84
|
+
if attributes.key?(:'conversation_participant_name')
|
85
|
+
self.conversation_participant_name = attributes[:'conversation_participant_name']
|
86
|
+
end
|
87
|
+
|
88
|
+
if attributes.key?(:'jwt')
|
89
|
+
self.jwt = attributes[:'jwt']
|
90
|
+
end
|
91
|
+
|
92
|
+
if attributes.key?(:'merchant_id')
|
93
|
+
self.merchant_id = attributes[:'merchant_id']
|
94
|
+
end
|
95
|
+
|
96
|
+
if attributes.key?(:'twilio_phone_numbers')
|
97
|
+
if (value = attributes[:'twilio_phone_numbers']).is_a?(Array)
|
98
|
+
self.twilio_phone_numbers = value
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
if attributes.key?(:'websocket_url')
|
103
|
+
self.websocket_url = attributes[:'websocket_url']
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
107
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
108
|
+
# @return Array for valid properties with the reasons
|
109
|
+
def list_invalid_properties
|
110
|
+
invalid_properties = Array.new
|
111
|
+
invalid_properties
|
112
|
+
end
|
113
|
+
|
114
|
+
# Check to see if the all the properties in the model are valid
|
115
|
+
# @return true if the model is valid
|
116
|
+
def valid?
|
117
|
+
true
|
118
|
+
end
|
119
|
+
|
120
|
+
# Checks equality by comparing each attribute.
|
121
|
+
# @param [Object] Object to be compared
|
122
|
+
def ==(o)
|
123
|
+
return true if self.equal?(o)
|
124
|
+
self.class == o.class &&
|
125
|
+
conversation_participant_arn == o.conversation_participant_arn &&
|
126
|
+
conversation_participant_name == o.conversation_participant_name &&
|
127
|
+
jwt == o.jwt &&
|
128
|
+
merchant_id == o.merchant_id &&
|
129
|
+
twilio_phone_numbers == o.twilio_phone_numbers &&
|
130
|
+
websocket_url == o.websocket_url
|
131
|
+
end
|
132
|
+
|
133
|
+
# @see the `==` method
|
134
|
+
# @param [Object] Object to be compared
|
135
|
+
def eql?(o)
|
136
|
+
self == o
|
137
|
+
end
|
138
|
+
|
139
|
+
# Calculates hash code according to all attributes.
|
140
|
+
# @return [Integer] Hash code
|
141
|
+
def hash
|
142
|
+
[conversation_participant_arn, conversation_participant_name, jwt, merchant_id, twilio_phone_numbers, websocket_url].hash
|
143
|
+
end
|
144
|
+
|
145
|
+
# Builds the object from hash
|
146
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
147
|
+
# @return [Object] Returns the model itself
|
148
|
+
def self.build_from_hash(attributes)
|
149
|
+
new.build_from_hash(attributes)
|
150
|
+
end
|
151
|
+
|
152
|
+
# Builds the object from hash
|
153
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
154
|
+
# @return [Object] Returns the model itself
|
155
|
+
def build_from_hash(attributes)
|
156
|
+
return nil unless attributes.is_a?(Hash)
|
157
|
+
attributes = attributes.transform_keys(&:to_sym)
|
158
|
+
self.class.openapi_types.each_pair do |key, type|
|
159
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
160
|
+
self.send("#{key}=", nil)
|
161
|
+
elsif type =~ /\AArray<(.*)>/i
|
162
|
+
# check to ensure the input is an array given that the attribute
|
163
|
+
# is documented as an array but the input is not
|
164
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
165
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
166
|
+
end
|
167
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
168
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
169
|
+
end
|
170
|
+
end
|
171
|
+
|
172
|
+
self
|
173
|
+
end
|
174
|
+
|
175
|
+
# Deserializes the data based on type
|
176
|
+
# @param string type Data type
|
177
|
+
# @param string value Value to be deserialized
|
178
|
+
# @return [Object] Deserialized data
|
179
|
+
def _deserialize(type, value)
|
180
|
+
case type.to_sym
|
181
|
+
when :Time
|
182
|
+
Time.parse(value)
|
183
|
+
when :Date
|
184
|
+
Date.parse(value)
|
185
|
+
when :String
|
186
|
+
value.to_s
|
187
|
+
when :Integer
|
188
|
+
value.to_i
|
189
|
+
when :Float
|
190
|
+
value.to_f
|
191
|
+
when :Boolean
|
192
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
193
|
+
true
|
194
|
+
else
|
195
|
+
false
|
196
|
+
end
|
197
|
+
when :Object
|
198
|
+
# generic object (usually a Hash), return directly
|
199
|
+
value
|
200
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
201
|
+
inner_type = Regexp.last_match[:inner_type]
|
202
|
+
value.map { |v| _deserialize(inner_type, v) }
|
203
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
204
|
+
k_type = Regexp.last_match[:k_type]
|
205
|
+
v_type = Regexp.last_match[:v_type]
|
206
|
+
{}.tap do |hash|
|
207
|
+
value.each do |k, v|
|
208
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
209
|
+
end
|
210
|
+
end
|
211
|
+
else # model
|
212
|
+
# models (e.g. Pet) or oneOf
|
213
|
+
klass = UltracartClient.const_get(type)
|
214
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
215
|
+
end
|
216
|
+
end
|
217
|
+
|
218
|
+
# Returns the string representation of the object
|
219
|
+
# @return [String] String presentation of the object
|
220
|
+
def to_s
|
221
|
+
to_hash.to_s
|
222
|
+
end
|
223
|
+
|
224
|
+
# to_body is an alias to to_hash (backward compatibility)
|
225
|
+
# @return [Hash] Returns the object in the form of hash
|
226
|
+
def to_body
|
227
|
+
to_hash
|
228
|
+
end
|
229
|
+
|
230
|
+
# Returns the object in the form of hash
|
231
|
+
# @return [Hash] Returns the object in the form of hash
|
232
|
+
def to_hash
|
233
|
+
hash = {}
|
234
|
+
self.class.attribute_map.each_pair do |attr, param|
|
235
|
+
value = self.send(attr)
|
236
|
+
if value.nil?
|
237
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
238
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
239
|
+
end
|
240
|
+
|
241
|
+
hash[param] = _to_hash(value)
|
242
|
+
end
|
243
|
+
hash
|
244
|
+
end
|
245
|
+
|
246
|
+
# Outputs non-array value in the form of hash
|
247
|
+
# For object, use to_hash. Otherwise, just return the value
|
248
|
+
# @param [Object] value Any valid value
|
249
|
+
# @return [Hash] Returns the value in the form of hash
|
250
|
+
def _to_hash(value)
|
251
|
+
if value.is_a?(Array)
|
252
|
+
value.compact.map { |v| _to_hash(v) }
|
253
|
+
elsif value.is_a?(Hash)
|
254
|
+
{}.tap do |hash|
|
255
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
256
|
+
end
|
257
|
+
elsif value.respond_to? :to_hash
|
258
|
+
value.to_hash
|
259
|
+
else
|
260
|
+
value
|
261
|
+
end
|
262
|
+
end
|
263
|
+
|
264
|
+
end
|
265
|
+
|
266
|
+
end
|
@@ -15,27 +15,25 @@ require 'time'
|
|
15
15
|
|
16
16
|
module UltracartClient
|
17
17
|
class ConversationAgentAuthResponse
|
18
|
-
attr_accessor :
|
18
|
+
attr_accessor :agent_auth
|
19
19
|
|
20
|
-
attr_accessor :
|
20
|
+
attr_accessor :error
|
21
21
|
|
22
|
-
attr_accessor :
|
22
|
+
attr_accessor :metadata
|
23
23
|
|
24
|
-
|
24
|
+
# Indicates if API call was successful
|
25
|
+
attr_accessor :success
|
25
26
|
|
26
|
-
attr_accessor :
|
27
|
-
|
28
|
-
attr_accessor :websocket_url
|
27
|
+
attr_accessor :warning
|
29
28
|
|
30
29
|
# Attribute mapping from ruby-style variable name to JSON key.
|
31
30
|
def self.attribute_map
|
32
31
|
{
|
33
|
-
:'
|
34
|
-
:'
|
35
|
-
:'
|
36
|
-
:'
|
37
|
-
:'
|
38
|
-
:'websocket_url' => :'websocket_url'
|
32
|
+
:'agent_auth' => :'agent_auth',
|
33
|
+
:'error' => :'error',
|
34
|
+
:'metadata' => :'metadata',
|
35
|
+
:'success' => :'success',
|
36
|
+
:'warning' => :'warning'
|
39
37
|
}
|
40
38
|
end
|
41
39
|
|
@@ -47,12 +45,11 @@ module UltracartClient
|
|
47
45
|
# Attribute type mapping.
|
48
46
|
def self.openapi_types
|
49
47
|
{
|
50
|
-
:'
|
51
|
-
:'
|
52
|
-
:'
|
53
|
-
:'
|
54
|
-
:'
|
55
|
-
:'websocket_url' => :'String'
|
48
|
+
:'agent_auth' => :'ConversationAgentAuth',
|
49
|
+
:'error' => :'Error',
|
50
|
+
:'metadata' => :'ResponseMetadata',
|
51
|
+
:'success' => :'Boolean',
|
52
|
+
:'warning' => :'Warning'
|
56
53
|
}
|
57
54
|
end
|
58
55
|
|
@@ -77,30 +74,24 @@ module UltracartClient
|
|
77
74
|
h[k.to_sym] = v
|
78
75
|
}
|
79
76
|
|
80
|
-
if attributes.key?(:'
|
81
|
-
self.
|
82
|
-
end
|
83
|
-
|
84
|
-
if attributes.key?(:'conversation_participant_name')
|
85
|
-
self.conversation_participant_name = attributes[:'conversation_participant_name']
|
77
|
+
if attributes.key?(:'agent_auth')
|
78
|
+
self.agent_auth = attributes[:'agent_auth']
|
86
79
|
end
|
87
80
|
|
88
|
-
if attributes.key?(:'
|
89
|
-
self.
|
81
|
+
if attributes.key?(:'error')
|
82
|
+
self.error = attributes[:'error']
|
90
83
|
end
|
91
84
|
|
92
|
-
if attributes.key?(:'
|
93
|
-
self.
|
85
|
+
if attributes.key?(:'metadata')
|
86
|
+
self.metadata = attributes[:'metadata']
|
94
87
|
end
|
95
88
|
|
96
|
-
if attributes.key?(:'
|
97
|
-
|
98
|
-
self.twilio_phone_numbers = value
|
99
|
-
end
|
89
|
+
if attributes.key?(:'success')
|
90
|
+
self.success = attributes[:'success']
|
100
91
|
end
|
101
92
|
|
102
|
-
if attributes.key?(:'
|
103
|
-
self.
|
93
|
+
if attributes.key?(:'warning')
|
94
|
+
self.warning = attributes[:'warning']
|
104
95
|
end
|
105
96
|
end
|
106
97
|
|
@@ -122,12 +113,11 @@ module UltracartClient
|
|
122
113
|
def ==(o)
|
123
114
|
return true if self.equal?(o)
|
124
115
|
self.class == o.class &&
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
websocket_url == o.websocket_url
|
116
|
+
agent_auth == o.agent_auth &&
|
117
|
+
error == o.error &&
|
118
|
+
metadata == o.metadata &&
|
119
|
+
success == o.success &&
|
120
|
+
warning == o.warning
|
131
121
|
end
|
132
122
|
|
133
123
|
# @see the `==` method
|
@@ -139,7 +129,7 @@ module UltracartClient
|
|
139
129
|
# Calculates hash code according to all attributes.
|
140
130
|
# @return [Integer] Hash code
|
141
131
|
def hash
|
142
|
-
[
|
132
|
+
[agent_auth, error, metadata, success, warning].hash
|
143
133
|
end
|
144
134
|
|
145
135
|
# Builds the object from hash
|
@@ -0,0 +1,256 @@
|
|
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 ConversationResponse
|
18
|
+
attr_accessor :conversation
|
19
|
+
|
20
|
+
attr_accessor :error
|
21
|
+
|
22
|
+
attr_accessor :metadata
|
23
|
+
|
24
|
+
# Indicates if API call was successful
|
25
|
+
attr_accessor :success
|
26
|
+
|
27
|
+
attr_accessor :warning
|
28
|
+
|
29
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
30
|
+
def self.attribute_map
|
31
|
+
{
|
32
|
+
:'conversation' => :'conversation',
|
33
|
+
:'error' => :'error',
|
34
|
+
:'metadata' => :'metadata',
|
35
|
+
:'success' => :'success',
|
36
|
+
:'warning' => :'warning'
|
37
|
+
}
|
38
|
+
end
|
39
|
+
|
40
|
+
# Returns all the JSON keys this model knows about
|
41
|
+
def self.acceptable_attributes
|
42
|
+
attribute_map.values
|
43
|
+
end
|
44
|
+
|
45
|
+
# Attribute type mapping.
|
46
|
+
def self.openapi_types
|
47
|
+
{
|
48
|
+
:'conversation' => :'Conversation',
|
49
|
+
:'error' => :'Error',
|
50
|
+
:'metadata' => :'ResponseMetadata',
|
51
|
+
:'success' => :'Boolean',
|
52
|
+
:'warning' => :'Warning'
|
53
|
+
}
|
54
|
+
end
|
55
|
+
|
56
|
+
# List of attributes with nullable: true
|
57
|
+
def self.openapi_nullable
|
58
|
+
Set.new([
|
59
|
+
])
|
60
|
+
end
|
61
|
+
|
62
|
+
# Initializes the object
|
63
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
64
|
+
def initialize(attributes = {})
|
65
|
+
if (!attributes.is_a?(Hash))
|
66
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ConversationResponse` initialize method"
|
67
|
+
end
|
68
|
+
|
69
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
70
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
71
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
72
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::ConversationResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
73
|
+
end
|
74
|
+
h[k.to_sym] = v
|
75
|
+
}
|
76
|
+
|
77
|
+
if attributes.key?(:'conversation')
|
78
|
+
self.conversation = attributes[:'conversation']
|
79
|
+
end
|
80
|
+
|
81
|
+
if attributes.key?(:'error')
|
82
|
+
self.error = attributes[:'error']
|
83
|
+
end
|
84
|
+
|
85
|
+
if attributes.key?(:'metadata')
|
86
|
+
self.metadata = attributes[:'metadata']
|
87
|
+
end
|
88
|
+
|
89
|
+
if attributes.key?(:'success')
|
90
|
+
self.success = attributes[:'success']
|
91
|
+
end
|
92
|
+
|
93
|
+
if attributes.key?(:'warning')
|
94
|
+
self.warning = attributes[:'warning']
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
99
|
+
# @return Array for valid properties with the reasons
|
100
|
+
def list_invalid_properties
|
101
|
+
invalid_properties = Array.new
|
102
|
+
invalid_properties
|
103
|
+
end
|
104
|
+
|
105
|
+
# Check to see if the all the properties in the model are valid
|
106
|
+
# @return true if the model is valid
|
107
|
+
def valid?
|
108
|
+
true
|
109
|
+
end
|
110
|
+
|
111
|
+
# Checks equality by comparing each attribute.
|
112
|
+
# @param [Object] Object to be compared
|
113
|
+
def ==(o)
|
114
|
+
return true if self.equal?(o)
|
115
|
+
self.class == o.class &&
|
116
|
+
conversation == o.conversation &&
|
117
|
+
error == o.error &&
|
118
|
+
metadata == o.metadata &&
|
119
|
+
success == o.success &&
|
120
|
+
warning == o.warning
|
121
|
+
end
|
122
|
+
|
123
|
+
# @see the `==` method
|
124
|
+
# @param [Object] Object to be compared
|
125
|
+
def eql?(o)
|
126
|
+
self == o
|
127
|
+
end
|
128
|
+
|
129
|
+
# Calculates hash code according to all attributes.
|
130
|
+
# @return [Integer] Hash code
|
131
|
+
def hash
|
132
|
+
[conversation, error, metadata, success, warning].hash
|
133
|
+
end
|
134
|
+
|
135
|
+
# Builds the object from hash
|
136
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
137
|
+
# @return [Object] Returns the model itself
|
138
|
+
def self.build_from_hash(attributes)
|
139
|
+
new.build_from_hash(attributes)
|
140
|
+
end
|
141
|
+
|
142
|
+
# Builds the object from hash
|
143
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
144
|
+
# @return [Object] Returns the model itself
|
145
|
+
def build_from_hash(attributes)
|
146
|
+
return nil unless attributes.is_a?(Hash)
|
147
|
+
attributes = attributes.transform_keys(&:to_sym)
|
148
|
+
self.class.openapi_types.each_pair do |key, type|
|
149
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
150
|
+
self.send("#{key}=", nil)
|
151
|
+
elsif type =~ /\AArray<(.*)>/i
|
152
|
+
# check to ensure the input is an array given that the attribute
|
153
|
+
# is documented as an array but the input is not
|
154
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
155
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
156
|
+
end
|
157
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
158
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
159
|
+
end
|
160
|
+
end
|
161
|
+
|
162
|
+
self
|
163
|
+
end
|
164
|
+
|
165
|
+
# Deserializes the data based on type
|
166
|
+
# @param string type Data type
|
167
|
+
# @param string value Value to be deserialized
|
168
|
+
# @return [Object] Deserialized data
|
169
|
+
def _deserialize(type, value)
|
170
|
+
case type.to_sym
|
171
|
+
when :Time
|
172
|
+
Time.parse(value)
|
173
|
+
when :Date
|
174
|
+
Date.parse(value)
|
175
|
+
when :String
|
176
|
+
value.to_s
|
177
|
+
when :Integer
|
178
|
+
value.to_i
|
179
|
+
when :Float
|
180
|
+
value.to_f
|
181
|
+
when :Boolean
|
182
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
183
|
+
true
|
184
|
+
else
|
185
|
+
false
|
186
|
+
end
|
187
|
+
when :Object
|
188
|
+
# generic object (usually a Hash), return directly
|
189
|
+
value
|
190
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
191
|
+
inner_type = Regexp.last_match[:inner_type]
|
192
|
+
value.map { |v| _deserialize(inner_type, v) }
|
193
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
194
|
+
k_type = Regexp.last_match[:k_type]
|
195
|
+
v_type = Regexp.last_match[:v_type]
|
196
|
+
{}.tap do |hash|
|
197
|
+
value.each do |k, v|
|
198
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
199
|
+
end
|
200
|
+
end
|
201
|
+
else # model
|
202
|
+
# models (e.g. Pet) or oneOf
|
203
|
+
klass = UltracartClient.const_get(type)
|
204
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
205
|
+
end
|
206
|
+
end
|
207
|
+
|
208
|
+
# Returns the string representation of the object
|
209
|
+
# @return [String] String presentation of the object
|
210
|
+
def to_s
|
211
|
+
to_hash.to_s
|
212
|
+
end
|
213
|
+
|
214
|
+
# to_body is an alias to to_hash (backward compatibility)
|
215
|
+
# @return [Hash] Returns the object in the form of hash
|
216
|
+
def to_body
|
217
|
+
to_hash
|
218
|
+
end
|
219
|
+
|
220
|
+
# Returns the object in the form of hash
|
221
|
+
# @return [Hash] Returns the object in the form of hash
|
222
|
+
def to_hash
|
223
|
+
hash = {}
|
224
|
+
self.class.attribute_map.each_pair do |attr, param|
|
225
|
+
value = self.send(attr)
|
226
|
+
if value.nil?
|
227
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
228
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
229
|
+
end
|
230
|
+
|
231
|
+
hash[param] = _to_hash(value)
|
232
|
+
end
|
233
|
+
hash
|
234
|
+
end
|
235
|
+
|
236
|
+
# Outputs non-array value in the form of hash
|
237
|
+
# For object, use to_hash. Otherwise, just return the value
|
238
|
+
# @param [Object] value Any valid value
|
239
|
+
# @return [Hash] Returns the value in the form of hash
|
240
|
+
def _to_hash(value)
|
241
|
+
if value.is_a?(Array)
|
242
|
+
value.compact.map { |v| _to_hash(v) }
|
243
|
+
elsif value.is_a?(Hash)
|
244
|
+
{}.tap do |hash|
|
245
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
246
|
+
end
|
247
|
+
elsif value.respond_to? :to_hash
|
248
|
+
value.to_hash
|
249
|
+
else
|
250
|
+
value
|
251
|
+
end
|
252
|
+
end
|
253
|
+
|
254
|
+
end
|
255
|
+
|
256
|
+
end
|
@@ -15,15 +15,12 @@ require 'time'
|
|
15
15
|
|
16
16
|
module UltracartClient
|
17
17
|
class ConversationStartResponse
|
18
|
-
attr_accessor :
|
19
|
-
|
20
|
-
attr_accessor :conversation_uuid
|
18
|
+
attr_accessor :conversation
|
21
19
|
|
22
20
|
# Attribute mapping from ruby-style variable name to JSON key.
|
23
21
|
def self.attribute_map
|
24
22
|
{
|
25
|
-
:'
|
26
|
-
:'conversation_uuid' => :'conversation_uuid'
|
23
|
+
:'conversation' => :'conversation'
|
27
24
|
}
|
28
25
|
end
|
29
26
|
|
@@ -35,8 +32,7 @@ module UltracartClient
|
|
35
32
|
# Attribute type mapping.
|
36
33
|
def self.openapi_types
|
37
34
|
{
|
38
|
-
:'
|
39
|
-
:'conversation_uuid' => :'String'
|
35
|
+
:'conversation' => :'Conversation'
|
40
36
|
}
|
41
37
|
end
|
42
38
|
|
@@ -61,12 +57,8 @@ module UltracartClient
|
|
61
57
|
h[k.to_sym] = v
|
62
58
|
}
|
63
59
|
|
64
|
-
if attributes.key?(:'
|
65
|
-
self.
|
66
|
-
end
|
67
|
-
|
68
|
-
if attributes.key?(:'conversation_uuid')
|
69
|
-
self.conversation_uuid = attributes[:'conversation_uuid']
|
60
|
+
if attributes.key?(:'conversation')
|
61
|
+
self.conversation = attributes[:'conversation']
|
70
62
|
end
|
71
63
|
end
|
72
64
|
|
@@ -88,8 +80,7 @@ module UltracartClient
|
|
88
80
|
def ==(o)
|
89
81
|
return true if self.equal?(o)
|
90
82
|
self.class == o.class &&
|
91
|
-
|
92
|
-
conversation_uuid == o.conversation_uuid
|
83
|
+
conversation == o.conversation
|
93
84
|
end
|
94
85
|
|
95
86
|
# @see the `==` method
|
@@ -101,7 +92,7 @@ module UltracartClient
|
|
101
92
|
# Calculates hash code according to all attributes.
|
102
93
|
# @return [Integer] Hash code
|
103
94
|
def hash
|
104
|
-
[
|
95
|
+
[conversation].hash
|
105
96
|
end
|
106
97
|
|
107
98
|
# Builds the object from hash
|
@@ -45,7 +45,7 @@ module UltracartClient
|
|
45
45
|
# Postcard front container uuid
|
46
46
|
attr_accessor :postcard_front_container_uuid
|
47
47
|
|
48
|
-
# URL to screenshot of the
|
48
|
+
# URL to screenshot of the front of the postcard
|
49
49
|
attr_accessor :screenshot_back_url
|
50
50
|
|
51
51
|
# URL to screenshot of the front of the postcard
|
data/lib/ultracart_api.rb
CHANGED
@@ -134,10 +134,12 @@ require 'ultracart_api/models/checkout_setup_browser_key_response'
|
|
134
134
|
require 'ultracart_api/models/checkout_state_province_response'
|
135
135
|
require 'ultracart_api/models/city_state_zip'
|
136
136
|
require 'ultracart_api/models/conversation'
|
137
|
+
require 'ultracart_api/models/conversation_agent_auth'
|
137
138
|
require 'ultracart_api/models/conversation_agent_auth_response'
|
138
139
|
require 'ultracart_api/models/conversation_message'
|
139
140
|
require 'ultracart_api/models/conversation_message_transport_status'
|
140
141
|
require 'ultracart_api/models/conversation_participant'
|
142
|
+
require 'ultracart_api/models/conversation_response'
|
141
143
|
require 'ultracart_api/models/conversation_start_request'
|
142
144
|
require 'ultracart_api/models/conversation_start_response'
|
143
145
|
require 'ultracart_api/models/conversation_summary'
|
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.0.
|
4
|
+
version: 4.0.38.rc
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- UltraCart
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-07-
|
11
|
+
date: 2022-07-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -183,11 +183,13 @@ files:
|
|
183
183
|
- docs/CheckoutStateProvinceResponse.md
|
184
184
|
- docs/CityStateZip.md
|
185
185
|
- docs/Conversation.md
|
186
|
+
- docs/ConversationAgentAuth.md
|
186
187
|
- docs/ConversationAgentAuthResponse.md
|
187
188
|
- docs/ConversationApi.md
|
188
189
|
- docs/ConversationMessage.md
|
189
190
|
- docs/ConversationMessageTransportStatus.md
|
190
191
|
- docs/ConversationParticipant.md
|
192
|
+
- docs/ConversationResponse.md
|
191
193
|
- docs/ConversationStartRequest.md
|
192
194
|
- docs/ConversationStartResponse.md
|
193
195
|
- docs/ConversationSummary.md
|
@@ -863,10 +865,12 @@ files:
|
|
863
865
|
- lib/ultracart_api/models/checkout_state_province_response.rb
|
864
866
|
- lib/ultracart_api/models/city_state_zip.rb
|
865
867
|
- lib/ultracart_api/models/conversation.rb
|
868
|
+
- lib/ultracart_api/models/conversation_agent_auth.rb
|
866
869
|
- lib/ultracart_api/models/conversation_agent_auth_response.rb
|
867
870
|
- lib/ultracart_api/models/conversation_message.rb
|
868
871
|
- lib/ultracart_api/models/conversation_message_transport_status.rb
|
869
872
|
- lib/ultracart_api/models/conversation_participant.rb
|
873
|
+
- lib/ultracart_api/models/conversation_response.rb
|
870
874
|
- lib/ultracart_api/models/conversation_start_request.rb
|
871
875
|
- lib/ultracart_api/models/conversation_start_response.rb
|
872
876
|
- lib/ultracart_api/models/conversation_summary.rb
|