ultracart_api 3.10.56 → 3.10.58
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +9 -4
- data/docs/Conversation.md +1 -0
- data/docs/ConversationApi.md +2 -0
- data/docs/ConversationSummary.md +1 -0
- data/docs/EmailCommseqSequenceTestRequest.md +1 -0
- data/docs/EmailCommseqSmsSendTestRequest.md +10 -0
- data/docs/EmailCommseqSmsSendTestResponse.md +13 -0
- data/docs/StorefrontApi.md +58 -0
- data/lib/ultracart_api/api/conversation_api.rb +3 -0
- data/lib/ultracart_api/api/storefront_api.rb +71 -0
- data/lib/ultracart_api/models/conversation.rb +11 -1
- data/lib/ultracart_api/models/conversation_summary.rb +11 -1
- data/lib/ultracart_api/models/email_commseq_sequence_test_request.rb +10 -1
- data/lib/ultracart_api/models/email_commseq_sms_send_test_request.rb +202 -0
- data/lib/ultracart_api/models/email_commseq_sms_send_test_response.rb +232 -0
- 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: 9f97cd704beebbab7f0c63c82d85faa551002aac15919c6f9fc375304bb67974
|
4
|
+
data.tar.gz: 75b7a33bf3a7a235d5a057403b8c83f41934f40b1083315a4d1c8e8abb53aaca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47d6540327e4097b6179fac6061d3b166acbee913768012948e17237a265763ef245520e944657ca65f7d485e119fd6d50f64bb81694d68b0b2b28903083c6d9
|
7
|
+
data.tar.gz: 96d937ad79be4d5ce23a551d0a6cb6ed1340a92c301af975d364a7559ac7293c6bffc65531374716d1917beeb19452d5d8a9f7db8e734129793abb63e80298d9
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ UltraCart REST API Version 2
|
|
7
7
|
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
8
8
|
|
9
9
|
- API version: 2.0.0
|
10
|
-
- Package version: 3.10.
|
10
|
+
- Package version: 3.10.58
|
11
11
|
- Build package: io.swagger.codegen.languages.RubyClientCodegen
|
12
12
|
For more information, please visit [http://www.ultracart.com](http://www.ultracart.com)
|
13
13
|
|
@@ -24,15 +24,15 @@ gem build ultracart_api.gemspec
|
|
24
24
|
Then either install the gem locally:
|
25
25
|
|
26
26
|
```shell
|
27
|
-
gem install ./ultracart_api-3.10.
|
27
|
+
gem install ./ultracart_api-3.10.58.gem
|
28
28
|
```
|
29
|
-
(for development, run `gem install --dev ./ultracart_api-3.10.
|
29
|
+
(for development, run `gem install --dev ./ultracart_api-3.10.58.gem` to install the development dependencies)
|
30
30
|
|
31
31
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
32
32
|
|
33
33
|
Finally add this to the Gemfile:
|
34
34
|
|
35
|
-
gem 'ultracart_api', '~> 3.10.
|
35
|
+
gem 'ultracart_api', '~> 3.10.58'
|
36
36
|
|
37
37
|
### Install from Git
|
38
38
|
|
@@ -379,6 +379,7 @@ Class | Method | HTTP request | Description
|
|
379
379
|
*UltracartClient::StorefrontApi* | [**search_shared_items**](docs/StorefrontApi.md#search_shared_items) | **POST** /storefront/code_library/search_shared | Retrieve library items
|
380
380
|
*UltracartClient::StorefrontApi* | [**send_email_test**](docs/StorefrontApi.md#send_email_test) | **POST** /storefront/{storefront_oid}/email/emails/{commseq_email_uuid}/test | Send email test
|
381
381
|
*UltracartClient::StorefrontApi* | [**send_postcard_test**](docs/StorefrontApi.md#send_postcard_test) | **POST** /storefront/{storefront_oid}/email/postcards/{commseq_postcard_uuid}/test | Send postcard test
|
382
|
+
*UltracartClient::StorefrontApi* | [**send_sms_test**](docs/StorefrontApi.md#send_sms_test) | **POST** /storefront/{storefront_oid}/email/sms/{commseq_uuid}/{commseq_step_uuid}/test | Send SMS test
|
382
383
|
*UltracartClient::StorefrontApi* | [**send_webhook_test**](docs/StorefrontApi.md#send_webhook_test) | **POST** /storefront/{storefront_oid}/email/webhooks/test | Send webhook test
|
383
384
|
*UltracartClient::StorefrontApi* | [**sequence_test**](docs/StorefrontApi.md#sequence_test) | **POST** /storefront/{storefront_oid}/email/commseqs/{commseq_uuid}/test | Sequence test
|
384
385
|
*UltracartClient::StorefrontApi* | [**start_email_campaign**](docs/StorefrontApi.md#start_email_campaign) | **PUT** /storefront/{storefront_oid}/email/campaigns/{email_campaign_uuid}/start | Start email campaign
|
@@ -727,6 +728,8 @@ Class | Method | HTTP request | Description
|
|
727
728
|
- [UltracartClient::EmailCommseqResponse](docs/EmailCommseqResponse.md)
|
728
729
|
- [UltracartClient::EmailCommseqSequenceTestRequest](docs/EmailCommseqSequenceTestRequest.md)
|
729
730
|
- [UltracartClient::EmailCommseqSequenceTestResponse](docs/EmailCommseqSequenceTestResponse.md)
|
731
|
+
- [UltracartClient::EmailCommseqSmsSendTestRequest](docs/EmailCommseqSmsSendTestRequest.md)
|
732
|
+
- [UltracartClient::EmailCommseqSmsSendTestResponse](docs/EmailCommseqSmsSendTestResponse.md)
|
730
733
|
- [UltracartClient::EmailCommseqStat](docs/EmailCommseqStat.md)
|
731
734
|
- [UltracartClient::EmailCommseqStatResponse](docs/EmailCommseqStatResponse.md)
|
732
735
|
- [UltracartClient::EmailCommseqStep](docs/EmailCommseqStep.md)
|
@@ -1209,6 +1212,8 @@ Not every change is committed to every SDK.
|
|
1209
1212
|
|
1210
1213
|
| Version | Date | Comments |
|
1211
1214
|
| --: | :-: | --- |
|
1215
|
+
| 3.10.58 | 10/26/2022 | esp - methods for sms testing |
|
1216
|
+
| 3.10.57 | 10/17/2022 | conversations - add last_interactive_message_dts |
|
1212
1217
|
| 3.10.56 | 10/07/2022 | bug fix for digital items response |
|
1213
1218
|
| 3.10.55 | 10/05/2022 | storefront rest file cdn icon urls |
|
1214
1219
|
| 3.10.54 | 10/04/2022 | bug fix for new storefront file mgr |
|
data/docs/Conversation.md
CHANGED
@@ -9,6 +9,7 @@ Name | Type | Description | Notes
|
|
9
9
|
**last_conversation_message_body** | **String** | | [optional]
|
10
10
|
**last_conversation_participant_arn** | **String** | | [optional]
|
11
11
|
**last_conversation_participant_name** | **String** | | [optional]
|
12
|
+
**last_interactive_message_dts** | **String** | Last interactive message date/time | [optional]
|
12
13
|
**last_message_dts** | **String** | Last message date/time | [optional]
|
13
14
|
**medium** | **String** | The communication medium of the customer. | [optional]
|
14
15
|
**merchant_id** | **String** | | [optional]
|
data/docs/ConversationApi.md
CHANGED
@@ -331,6 +331,7 @@ api_instance = UltracartClient::ConversationApi.new_using_api_key(simple_key, fa
|
|
331
331
|
|
332
332
|
opts = {
|
333
333
|
medium: 'medium_example', # String |
|
334
|
+
before: 'before_example', # String |
|
334
335
|
_limit: 100, # Integer | The maximum number of records to return on this one API call. (Max 200)
|
335
336
|
_offset: 0 # Integer | Pagination of the record set. Offset is a zero based index.
|
336
337
|
}
|
@@ -349,6 +350,7 @@ end
|
|
349
350
|
Name | Type | Description | Notes
|
350
351
|
------------- | ------------- | ------------- | -------------
|
351
352
|
**medium** | **String**| | [optional]
|
353
|
+
**before** | **String**| | [optional]
|
352
354
|
**_limit** | **Integer**| The maximum number of records to return on this one API call. (Max 200) | [optional] [default to 100]
|
353
355
|
**_offset** | **Integer**| Pagination of the record set. Offset is a zero based index. | [optional] [default to 0]
|
354
356
|
|
data/docs/ConversationSummary.md
CHANGED
@@ -9,6 +9,7 @@ Name | Type | Description | Notes
|
|
9
9
|
**last_conversation_message_body** | **String** | | [optional]
|
10
10
|
**last_conversation_participant_arn** | **String** | | [optional]
|
11
11
|
**last_conversation_participant_name** | **String** | | [optional]
|
12
|
+
**last_interactive_message_dts** | **String** | Last interactive message date/time | [optional]
|
12
13
|
**last_message_dts** | **String** | Last message date/time | [optional]
|
13
14
|
**medium** | **String** | The communication medium of the customer. | [optional]
|
14
15
|
**merchant_id** | **String** | | [optional]
|
@@ -14,6 +14,7 @@ Name | Type | Description | Notes
|
|
14
14
|
**order_id** | **String** | | [optional]
|
15
15
|
**please_review** | **BOOLEAN** | | [optional]
|
16
16
|
**postal_code** | **String** | | [optional]
|
17
|
+
**send_to_cellphone_e164** | **String** | | [optional]
|
17
18
|
**send_to_email** | **String** | | [optional]
|
18
19
|
**send_to_logged_in_user** | **BOOLEAN** | | [optional]
|
19
20
|
**state** | **String** | | [optional]
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# UltracartClient::EmailCommseqSmsSendTestRequest
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**esp_commseq_step_uuid** | **String** | | [optional]
|
7
|
+
**esp_commseq_uuid** | **String** | | [optional]
|
8
|
+
**send_to_cellphone_e164** | **String** | | [optional]
|
9
|
+
|
10
|
+
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# UltracartClient::EmailCommseqSmsSendTestResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**body** | **String** | | [optional]
|
7
|
+
**error** | [**Error**](Error.md) | | [optional]
|
8
|
+
**media_urls** | **Array<String>** | | [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
|
+
|
data/docs/StorefrontApi.md
CHANGED
@@ -145,6 +145,7 @@ Method | HTTP request | Description
|
|
145
145
|
[**search_shared_items**](StorefrontApi.md#search_shared_items) | **POST** /storefront/code_library/search_shared | Retrieve library items
|
146
146
|
[**send_email_test**](StorefrontApi.md#send_email_test) | **POST** /storefront/{storefront_oid}/email/emails/{commseq_email_uuid}/test | Send email test
|
147
147
|
[**send_postcard_test**](StorefrontApi.md#send_postcard_test) | **POST** /storefront/{storefront_oid}/email/postcards/{commseq_postcard_uuid}/test | Send postcard test
|
148
|
+
[**send_sms_test**](StorefrontApi.md#send_sms_test) | **POST** /storefront/{storefront_oid}/email/sms/{commseq_uuid}/{commseq_step_uuid}/test | Send SMS test
|
148
149
|
[**send_webhook_test**](StorefrontApi.md#send_webhook_test) | **POST** /storefront/{storefront_oid}/email/webhooks/test | Send webhook test
|
149
150
|
[**sequence_test**](StorefrontApi.md#sequence_test) | **POST** /storefront/{storefront_oid}/email/commseqs/{commseq_uuid}/test | Sequence test
|
150
151
|
[**start_email_campaign**](StorefrontApi.md#start_email_campaign) | **PUT** /storefront/{storefront_oid}/email/campaigns/{email_campaign_uuid}/start | Start email campaign
|
@@ -7412,6 +7413,63 @@ Name | Type | Description | Notes
|
|
7412
7413
|
|
7413
7414
|
|
7414
7415
|
|
7416
|
+
# **send_sms_test**
|
7417
|
+
> EmailCommseqSmsSendTestResponse send_sms_test(storefront_oid, commseq_uuid, commseq_step_uuid, email_commseq_sms_test_request)
|
7418
|
+
|
7419
|
+
Send SMS test
|
7420
|
+
|
7421
|
+
### Example
|
7422
|
+
```ruby
|
7423
|
+
# load the gem
|
7424
|
+
require 'ultracart_api'
|
7425
|
+
|
7426
|
+
# Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
|
7427
|
+
simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
|
7428
|
+
api_instance = UltracartClient::StorefrontApi.new_using_api_key(simple_key, false, false)
|
7429
|
+
|
7430
|
+
|
7431
|
+
storefront_oid = 56 # Integer |
|
7432
|
+
|
7433
|
+
commseq_uuid = 'commseq_uuid_example' # String |
|
7434
|
+
|
7435
|
+
commseq_step_uuid = 'commseq_step_uuid_example' # String |
|
7436
|
+
|
7437
|
+
email_commseq_sms_test_request = UltracartClient::EmailCommseqSmsSendTestRequest.new # EmailCommseqSmsSendTestRequest | Email commseq sms test request
|
7438
|
+
|
7439
|
+
|
7440
|
+
begin
|
7441
|
+
#Send SMS test
|
7442
|
+
result = api_instance.send_sms_test(storefront_oid, commseq_uuid, commseq_step_uuid, email_commseq_sms_test_request)
|
7443
|
+
p result
|
7444
|
+
rescue UltracartClient::ApiError => e
|
7445
|
+
puts "Exception when calling StorefrontApi->send_sms_test: #{e}"
|
7446
|
+
end
|
7447
|
+
```
|
7448
|
+
|
7449
|
+
### Parameters
|
7450
|
+
|
7451
|
+
Name | Type | Description | Notes
|
7452
|
+
------------- | ------------- | ------------- | -------------
|
7453
|
+
**storefront_oid** | **Integer**| |
|
7454
|
+
**commseq_uuid** | **String**| |
|
7455
|
+
**commseq_step_uuid** | **String**| |
|
7456
|
+
**email_commseq_sms_test_request** | [**EmailCommseqSmsSendTestRequest**](EmailCommseqSmsSendTestRequest.md)| Email commseq sms test request |
|
7457
|
+
|
7458
|
+
### Return type
|
7459
|
+
|
7460
|
+
[**EmailCommseqSmsSendTestResponse**](EmailCommseqSmsSendTestResponse.md)
|
7461
|
+
|
7462
|
+
### Authorization
|
7463
|
+
|
7464
|
+
[ultraCartBrowserApiKey](../README.md#ultraCartBrowserApiKey), [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
7465
|
+
|
7466
|
+
### HTTP request headers
|
7467
|
+
|
7468
|
+
- **Content-Type**: application/json
|
7469
|
+
- **Accept**: application/json
|
7470
|
+
|
7471
|
+
|
7472
|
+
|
7415
7473
|
# **send_webhook_test**
|
7416
7474
|
> EmailCommseqWebhookSendTestResponse send_webhook_test(storefront_oid, email_commseq_webhook_test_request)
|
7417
7475
|
|
@@ -359,6 +359,7 @@ module UltracartClient
|
|
359
359
|
# Retrieve a list of conversation summaries that are ordered newest to oldest, include the most recent message and whether its been read.
|
360
360
|
# @param [Hash] opts the optional parameters
|
361
361
|
# @option opts [String] :medium
|
362
|
+
# @option opts [String] :before
|
362
363
|
# @option opts [Integer] :_limit The maximum number of records to return on this one API call. (Max 200) (default to 100)
|
363
364
|
# @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index. (default to 0)
|
364
365
|
# @return [ConversationsResponse]
|
@@ -371,6 +372,7 @@ module UltracartClient
|
|
371
372
|
# Retrieve a list of conversation summaries that are ordered newest to oldest, include the most recent message and whether its been read.
|
372
373
|
# @param [Hash] opts the optional parameters
|
373
374
|
# @option opts [String] :medium
|
375
|
+
# @option opts [String] :before
|
374
376
|
# @option opts [Integer] :_limit The maximum number of records to return on this one API call. (Max 200)
|
375
377
|
# @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index.
|
376
378
|
# @return [Array<(ConversationsResponse, Fixnum, Hash)>] ConversationsResponse data, response status code and response headers
|
@@ -384,6 +386,7 @@ module UltracartClient
|
|
384
386
|
# query parameters
|
385
387
|
query_params = {}
|
386
388
|
query_params[:'medium'] = opts[:'medium'] if !opts[:'medium'].nil?
|
389
|
+
query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
|
387
390
|
query_params[:'_limit'] = opts[:'_limit'] if !opts[:'_limit'].nil?
|
388
391
|
query_params[:'_offset'] = opts[:'_offset'] if !opts[:'_offset'].nil?
|
389
392
|
|
@@ -8265,6 +8265,77 @@ module UltracartClient
|
|
8265
8265
|
end
|
8266
8266
|
return data, status_code, headers
|
8267
8267
|
end
|
8268
|
+
# Send SMS test
|
8269
|
+
# @param storefront_oid
|
8270
|
+
# @param commseq_uuid
|
8271
|
+
# @param commseq_step_uuid
|
8272
|
+
# @param email_commseq_sms_test_request Email commseq sms test request
|
8273
|
+
# @param [Hash] opts the optional parameters
|
8274
|
+
# @return [EmailCommseqSmsSendTestResponse]
|
8275
|
+
def send_sms_test(storefront_oid, commseq_uuid, commseq_step_uuid, email_commseq_sms_test_request, opts = {})
|
8276
|
+
data, _status_code, _headers = send_sms_test_with_http_info(storefront_oid, commseq_uuid, commseq_step_uuid, email_commseq_sms_test_request, opts)
|
8277
|
+
data
|
8278
|
+
end
|
8279
|
+
|
8280
|
+
# Send SMS test
|
8281
|
+
# @param storefront_oid
|
8282
|
+
# @param commseq_uuid
|
8283
|
+
# @param commseq_step_uuid
|
8284
|
+
# @param email_commseq_sms_test_request Email commseq sms test request
|
8285
|
+
# @param [Hash] opts the optional parameters
|
8286
|
+
# @return [Array<(EmailCommseqSmsSendTestResponse, Fixnum, Hash)>] EmailCommseqSmsSendTestResponse data, response status code and response headers
|
8287
|
+
def send_sms_test_with_http_info(storefront_oid, commseq_uuid, commseq_step_uuid, email_commseq_sms_test_request, opts = {})
|
8288
|
+
if @api_client.config.debugging
|
8289
|
+
@api_client.config.logger.debug 'Calling API: StorefrontApi.send_sms_test ...'
|
8290
|
+
end
|
8291
|
+
# verify the required parameter 'storefront_oid' is set
|
8292
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
8293
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling StorefrontApi.send_sms_test"
|
8294
|
+
end
|
8295
|
+
# verify the required parameter 'commseq_uuid' is set
|
8296
|
+
if @api_client.config.client_side_validation && commseq_uuid.nil?
|
8297
|
+
fail ArgumentError, "Missing the required parameter 'commseq_uuid' when calling StorefrontApi.send_sms_test"
|
8298
|
+
end
|
8299
|
+
# verify the required parameter 'commseq_step_uuid' is set
|
8300
|
+
if @api_client.config.client_side_validation && commseq_step_uuid.nil?
|
8301
|
+
fail ArgumentError, "Missing the required parameter 'commseq_step_uuid' when calling StorefrontApi.send_sms_test"
|
8302
|
+
end
|
8303
|
+
# verify the required parameter 'email_commseq_sms_test_request' is set
|
8304
|
+
if @api_client.config.client_side_validation && email_commseq_sms_test_request.nil?
|
8305
|
+
fail ArgumentError, "Missing the required parameter 'email_commseq_sms_test_request' when calling StorefrontApi.send_sms_test"
|
8306
|
+
end
|
8307
|
+
# resource path
|
8308
|
+
local_var_path = '/storefront/{storefront_oid}/email/sms/{commseq_uuid}/{commseq_step_uuid}/test'.sub('{' + 'storefront_oid' + '}', storefront_oid.to_s).sub('{' + 'commseq_uuid' + '}', commseq_uuid.to_s).sub('{' + 'commseq_step_uuid' + '}', commseq_step_uuid.to_s)
|
8309
|
+
|
8310
|
+
# query parameters
|
8311
|
+
query_params = {}
|
8312
|
+
|
8313
|
+
# header parameters
|
8314
|
+
header_params = {}
|
8315
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
8316
|
+
# HTTP header 'Accept' (if needed)
|
8317
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
8318
|
+
# HTTP header 'Content-Type'
|
8319
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
8320
|
+
|
8321
|
+
# form parameters
|
8322
|
+
form_params = {}
|
8323
|
+
|
8324
|
+
# http body (model)
|
8325
|
+
post_body = @api_client.object_to_http_body(email_commseq_sms_test_request)
|
8326
|
+
auth_names = ['ultraCartBrowserApiKey', 'ultraCartOauth', 'ultraCartSimpleApiKey']
|
8327
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
8328
|
+
:header_params => header_params,
|
8329
|
+
:query_params => query_params,
|
8330
|
+
:form_params => form_params,
|
8331
|
+
:body => post_body,
|
8332
|
+
:auth_names => auth_names,
|
8333
|
+
:return_type => 'EmailCommseqSmsSendTestResponse')
|
8334
|
+
if @api_client.config.debugging
|
8335
|
+
@api_client.config.logger.debug "API called: StorefrontApi#send_sms_test\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
8336
|
+
end
|
8337
|
+
return data, status_code, headers
|
8338
|
+
end
|
8268
8339
|
# Send webhook test
|
8269
8340
|
# @param storefront_oid
|
8270
8341
|
# @param email_commseq_webhook_test_request Email commseq webhook test request
|
@@ -26,6 +26,9 @@ module UltracartClient
|
|
26
26
|
|
27
27
|
attr_accessor :last_conversation_participant_name
|
28
28
|
|
29
|
+
# Last interactive message date/time
|
30
|
+
attr_accessor :last_interactive_message_dts
|
31
|
+
|
29
32
|
# Last message date/time
|
30
33
|
attr_accessor :last_message_dts
|
31
34
|
|
@@ -78,6 +81,7 @@ module UltracartClient
|
|
78
81
|
:'last_conversation_message_body' => :'last_conversation_message_body',
|
79
82
|
:'last_conversation_participant_arn' => :'last_conversation_participant_arn',
|
80
83
|
:'last_conversation_participant_name' => :'last_conversation_participant_name',
|
84
|
+
:'last_interactive_message_dts' => :'last_interactive_message_dts',
|
81
85
|
:'last_message_dts' => :'last_message_dts',
|
82
86
|
:'medium' => :'medium',
|
83
87
|
:'merchant_id' => :'merchant_id',
|
@@ -99,6 +103,7 @@ module UltracartClient
|
|
99
103
|
:'last_conversation_message_body' => :'String',
|
100
104
|
:'last_conversation_participant_arn' => :'String',
|
101
105
|
:'last_conversation_participant_name' => :'String',
|
106
|
+
:'last_interactive_message_dts' => :'String',
|
102
107
|
:'last_message_dts' => :'String',
|
103
108
|
:'medium' => :'String',
|
104
109
|
:'merchant_id' => :'String',
|
@@ -143,6 +148,10 @@ module UltracartClient
|
|
143
148
|
self.last_conversation_participant_name = attributes[:'last_conversation_participant_name']
|
144
149
|
end
|
145
150
|
|
151
|
+
if attributes.has_key?(:'last_interactive_message_dts')
|
152
|
+
self.last_interactive_message_dts = attributes[:'last_interactive_message_dts']
|
153
|
+
end
|
154
|
+
|
146
155
|
if attributes.has_key?(:'last_message_dts')
|
147
156
|
self.last_message_dts = attributes[:'last_message_dts']
|
148
157
|
end
|
@@ -220,6 +229,7 @@ module UltracartClient
|
|
220
229
|
last_conversation_message_body == o.last_conversation_message_body &&
|
221
230
|
last_conversation_participant_arn == o.last_conversation_participant_arn &&
|
222
231
|
last_conversation_participant_name == o.last_conversation_participant_name &&
|
232
|
+
last_interactive_message_dts == o.last_interactive_message_dts &&
|
223
233
|
last_message_dts == o.last_message_dts &&
|
224
234
|
medium == o.medium &&
|
225
235
|
merchant_id == o.merchant_id &&
|
@@ -240,7 +250,7 @@ module UltracartClient
|
|
240
250
|
# Calculates hash code according to all attributes.
|
241
251
|
# @return [Fixnum] Hash code
|
242
252
|
def hash
|
243
|
-
[closed, conversation_arn, conversation_uuid, last_conversation_message_body, last_conversation_participant_arn, last_conversation_participant_name, last_message_dts, medium, merchant_id, message_count, messages, participants, start_dts, unread_messages, visible].hash
|
253
|
+
[closed, conversation_arn, conversation_uuid, last_conversation_message_body, last_conversation_participant_arn, last_conversation_participant_name, last_interactive_message_dts, last_message_dts, medium, merchant_id, message_count, messages, participants, start_dts, unread_messages, visible].hash
|
244
254
|
end
|
245
255
|
|
246
256
|
# Builds the object from hash
|
@@ -26,6 +26,9 @@ module UltracartClient
|
|
26
26
|
|
27
27
|
attr_accessor :last_conversation_participant_name
|
28
28
|
|
29
|
+
# Last interactive message date/time
|
30
|
+
attr_accessor :last_interactive_message_dts
|
31
|
+
|
29
32
|
# Last message date/time
|
30
33
|
attr_accessor :last_message_dts
|
31
34
|
|
@@ -76,6 +79,7 @@ module UltracartClient
|
|
76
79
|
:'last_conversation_message_body' => :'last_conversation_message_body',
|
77
80
|
:'last_conversation_participant_arn' => :'last_conversation_participant_arn',
|
78
81
|
:'last_conversation_participant_name' => :'last_conversation_participant_name',
|
82
|
+
:'last_interactive_message_dts' => :'last_interactive_message_dts',
|
79
83
|
:'last_message_dts' => :'last_message_dts',
|
80
84
|
:'medium' => :'medium',
|
81
85
|
:'merchant_id' => :'merchant_id',
|
@@ -96,6 +100,7 @@ module UltracartClient
|
|
96
100
|
:'last_conversation_message_body' => :'String',
|
97
101
|
:'last_conversation_participant_arn' => :'String',
|
98
102
|
:'last_conversation_participant_name' => :'String',
|
103
|
+
:'last_interactive_message_dts' => :'String',
|
99
104
|
:'last_message_dts' => :'String',
|
100
105
|
:'medium' => :'String',
|
101
106
|
:'merchant_id' => :'String',
|
@@ -139,6 +144,10 @@ module UltracartClient
|
|
139
144
|
self.last_conversation_participant_name = attributes[:'last_conversation_participant_name']
|
140
145
|
end
|
141
146
|
|
147
|
+
if attributes.has_key?(:'last_interactive_message_dts')
|
148
|
+
self.last_interactive_message_dts = attributes[:'last_interactive_message_dts']
|
149
|
+
end
|
150
|
+
|
142
151
|
if attributes.has_key?(:'last_message_dts')
|
143
152
|
self.last_message_dts = attributes[:'last_message_dts']
|
144
153
|
end
|
@@ -210,6 +219,7 @@ module UltracartClient
|
|
210
219
|
last_conversation_message_body == o.last_conversation_message_body &&
|
211
220
|
last_conversation_participant_arn == o.last_conversation_participant_arn &&
|
212
221
|
last_conversation_participant_name == o.last_conversation_participant_name &&
|
222
|
+
last_interactive_message_dts == o.last_interactive_message_dts &&
|
213
223
|
last_message_dts == o.last_message_dts &&
|
214
224
|
medium == o.medium &&
|
215
225
|
merchant_id == o.merchant_id &&
|
@@ -229,7 +239,7 @@ module UltracartClient
|
|
229
239
|
# Calculates hash code according to all attributes.
|
230
240
|
# @return [Fixnum] Hash code
|
231
241
|
def hash
|
232
|
-
[closed, conversation_arn, conversation_uuid, last_conversation_message_body, last_conversation_participant_arn, last_conversation_participant_name, last_message_dts, medium, merchant_id, message_count, participants, start_dts, unread_messages, visible].hash
|
242
|
+
[closed, conversation_arn, conversation_uuid, last_conversation_message_body, last_conversation_participant_arn, last_conversation_participant_name, last_interactive_message_dts, last_message_dts, medium, merchant_id, message_count, participants, start_dts, unread_messages, visible].hash
|
233
243
|
end
|
234
244
|
|
235
245
|
# Builds the object from hash
|
@@ -36,6 +36,8 @@ module UltracartClient
|
|
36
36
|
|
37
37
|
attr_accessor :postal_code
|
38
38
|
|
39
|
+
attr_accessor :send_to_cellphone_e164
|
40
|
+
|
39
41
|
attr_accessor :send_to_email
|
40
42
|
|
41
43
|
attr_accessor :send_to_logged_in_user
|
@@ -56,6 +58,7 @@ module UltracartClient
|
|
56
58
|
:'order_id' => :'order_id',
|
57
59
|
:'please_review' => :'please_review',
|
58
60
|
:'postal_code' => :'postal_code',
|
61
|
+
:'send_to_cellphone_e164' => :'send_to_cellphone_e164',
|
59
62
|
:'send_to_email' => :'send_to_email',
|
60
63
|
:'send_to_logged_in_user' => :'send_to_logged_in_user',
|
61
64
|
:'state' => :'state'
|
@@ -76,6 +79,7 @@ module UltracartClient
|
|
76
79
|
:'order_id' => :'String',
|
77
80
|
:'please_review' => :'BOOLEAN',
|
78
81
|
:'postal_code' => :'String',
|
82
|
+
:'send_to_cellphone_e164' => :'String',
|
79
83
|
:'send_to_email' => :'String',
|
80
84
|
:'send_to_logged_in_user' => :'BOOLEAN',
|
81
85
|
:'state' => :'String'
|
@@ -136,6 +140,10 @@ module UltracartClient
|
|
136
140
|
self.postal_code = attributes[:'postal_code']
|
137
141
|
end
|
138
142
|
|
143
|
+
if attributes.has_key?(:'send_to_cellphone_e164')
|
144
|
+
self.send_to_cellphone_e164 = attributes[:'send_to_cellphone_e164']
|
145
|
+
end
|
146
|
+
|
139
147
|
if attributes.has_key?(:'send_to_email')
|
140
148
|
self.send_to_email = attributes[:'send_to_email']
|
141
149
|
end
|
@@ -178,6 +186,7 @@ module UltracartClient
|
|
178
186
|
order_id == o.order_id &&
|
179
187
|
please_review == o.please_review &&
|
180
188
|
postal_code == o.postal_code &&
|
189
|
+
send_to_cellphone_e164 == o.send_to_cellphone_e164 &&
|
181
190
|
send_to_email == o.send_to_email &&
|
182
191
|
send_to_logged_in_user == o.send_to_logged_in_user &&
|
183
192
|
state == o.state
|
@@ -192,7 +201,7 @@ module UltracartClient
|
|
192
201
|
# Calculates hash code according to all attributes.
|
193
202
|
# @return [Fixnum] Hash code
|
194
203
|
def hash
|
195
|
-
[address_1, address_2, cart_id, cart_item_ids, city, esp_commseq_uuid, mail_card, name, order_id, please_review, postal_code, send_to_email, send_to_logged_in_user, state].hash
|
204
|
+
[address_1, address_2, cart_id, cart_item_ids, city, esp_commseq_uuid, mail_card, name, order_id, please_review, postal_code, send_to_cellphone_e164, send_to_email, send_to_logged_in_user, state].hash
|
196
205
|
end
|
197
206
|
|
198
207
|
# Builds the object from hash
|
@@ -0,0 +1,202 @@
|
|
1
|
+
=begin
|
2
|
+
#UltraCart Rest API V2
|
3
|
+
|
4
|
+
#UltraCart REST API Version 2
|
5
|
+
|
6
|
+
OpenAPI spec version: 2.0.0
|
7
|
+
Contact: support@ultracart.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.15-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module UltracartClient
|
16
|
+
class EmailCommseqSmsSendTestRequest
|
17
|
+
attr_accessor :esp_commseq_step_uuid
|
18
|
+
|
19
|
+
attr_accessor :esp_commseq_uuid
|
20
|
+
|
21
|
+
attr_accessor :send_to_cellphone_e164
|
22
|
+
|
23
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
24
|
+
def self.attribute_map
|
25
|
+
{
|
26
|
+
:'esp_commseq_step_uuid' => :'esp_commseq_step_uuid',
|
27
|
+
:'esp_commseq_uuid' => :'esp_commseq_uuid',
|
28
|
+
:'send_to_cellphone_e164' => :'send_to_cellphone_e164'
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
32
|
+
# Attribute type mapping.
|
33
|
+
def self.swagger_types
|
34
|
+
{
|
35
|
+
:'esp_commseq_step_uuid' => :'String',
|
36
|
+
:'esp_commseq_uuid' => :'String',
|
37
|
+
:'send_to_cellphone_e164' => :'String'
|
38
|
+
}
|
39
|
+
end
|
40
|
+
|
41
|
+
# Initializes the object
|
42
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
43
|
+
def initialize(attributes = {})
|
44
|
+
return unless attributes.is_a?(Hash)
|
45
|
+
|
46
|
+
# convert string to symbol for hash key
|
47
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
48
|
+
|
49
|
+
if attributes.has_key?(:'esp_commseq_step_uuid')
|
50
|
+
self.esp_commseq_step_uuid = attributes[:'esp_commseq_step_uuid']
|
51
|
+
end
|
52
|
+
|
53
|
+
if attributes.has_key?(:'esp_commseq_uuid')
|
54
|
+
self.esp_commseq_uuid = attributes[:'esp_commseq_uuid']
|
55
|
+
end
|
56
|
+
|
57
|
+
if attributes.has_key?(:'send_to_cellphone_e164')
|
58
|
+
self.send_to_cellphone_e164 = attributes[:'send_to_cellphone_e164']
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
63
|
+
# @return Array for valid properties with the reasons
|
64
|
+
def list_invalid_properties
|
65
|
+
invalid_properties = Array.new
|
66
|
+
invalid_properties
|
67
|
+
end
|
68
|
+
|
69
|
+
# Check to see if the all the properties in the model are valid
|
70
|
+
# @return true if the model is valid
|
71
|
+
def valid?
|
72
|
+
true
|
73
|
+
end
|
74
|
+
|
75
|
+
# Checks equality by comparing each attribute.
|
76
|
+
# @param [Object] Object to be compared
|
77
|
+
def ==(o)
|
78
|
+
return true if self.equal?(o)
|
79
|
+
self.class == o.class &&
|
80
|
+
esp_commseq_step_uuid == o.esp_commseq_step_uuid &&
|
81
|
+
esp_commseq_uuid == o.esp_commseq_uuid &&
|
82
|
+
send_to_cellphone_e164 == o.send_to_cellphone_e164
|
83
|
+
end
|
84
|
+
|
85
|
+
# @see the `==` method
|
86
|
+
# @param [Object] Object to be compared
|
87
|
+
def eql?(o)
|
88
|
+
self == o
|
89
|
+
end
|
90
|
+
|
91
|
+
# Calculates hash code according to all attributes.
|
92
|
+
# @return [Fixnum] Hash code
|
93
|
+
def hash
|
94
|
+
[esp_commseq_step_uuid, esp_commseq_uuid, send_to_cellphone_e164].hash
|
95
|
+
end
|
96
|
+
|
97
|
+
# Builds the object from hash
|
98
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
99
|
+
# @return [Object] Returns the model itself
|
100
|
+
def build_from_hash(attributes)
|
101
|
+
return nil unless attributes.is_a?(Hash)
|
102
|
+
self.class.swagger_types.each_pair do |key, type|
|
103
|
+
if type =~ /\AArray<(.*)>/i
|
104
|
+
# check to ensure the input is an array given that the attribute
|
105
|
+
# is documented as an array but the input is not
|
106
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
107
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
108
|
+
end
|
109
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
110
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
111
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
112
|
+
end
|
113
|
+
|
114
|
+
self
|
115
|
+
end
|
116
|
+
|
117
|
+
# Deserializes the data based on type
|
118
|
+
# @param string type Data type
|
119
|
+
# @param string value Value to be deserialized
|
120
|
+
# @return [Object] Deserialized data
|
121
|
+
def _deserialize(type, value)
|
122
|
+
case type.to_sym
|
123
|
+
when :DateTime
|
124
|
+
DateTime.parse(value)
|
125
|
+
when :Date
|
126
|
+
Date.parse(value)
|
127
|
+
when :String
|
128
|
+
value.to_s
|
129
|
+
when :Integer
|
130
|
+
value.to_i
|
131
|
+
when :Float
|
132
|
+
value.to_f
|
133
|
+
when :BOOLEAN
|
134
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
135
|
+
true
|
136
|
+
else
|
137
|
+
false
|
138
|
+
end
|
139
|
+
when :Object
|
140
|
+
# generic object (usually a Hash), return directly
|
141
|
+
value
|
142
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
143
|
+
inner_type = Regexp.last_match[:inner_type]
|
144
|
+
value.map { |v| _deserialize(inner_type, v) }
|
145
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
146
|
+
k_type = Regexp.last_match[:k_type]
|
147
|
+
v_type = Regexp.last_match[:v_type]
|
148
|
+
{}.tap do |hash|
|
149
|
+
value.each do |k, v|
|
150
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
151
|
+
end
|
152
|
+
end
|
153
|
+
else # model
|
154
|
+
temp_model = UltracartClient.const_get(type).new
|
155
|
+
temp_model.build_from_hash(value)
|
156
|
+
end
|
157
|
+
end
|
158
|
+
|
159
|
+
# Returns the string representation of the object
|
160
|
+
# @return [String] String presentation of the object
|
161
|
+
def to_s
|
162
|
+
to_hash.to_s
|
163
|
+
end
|
164
|
+
|
165
|
+
# to_body is an alias to to_hash (backward compatibility)
|
166
|
+
# @return [Hash] Returns the object in the form of hash
|
167
|
+
def to_body
|
168
|
+
to_hash
|
169
|
+
end
|
170
|
+
|
171
|
+
# Returns the object in the form of hash
|
172
|
+
# @return [Hash] Returns the object in the form of hash
|
173
|
+
def to_hash
|
174
|
+
hash = {}
|
175
|
+
self.class.attribute_map.each_pair do |attr, param|
|
176
|
+
value = self.send(attr)
|
177
|
+
next if value.nil?
|
178
|
+
hash[param] = _to_hash(value)
|
179
|
+
end
|
180
|
+
hash
|
181
|
+
end
|
182
|
+
|
183
|
+
# Outputs non-array value in the form of hash
|
184
|
+
# For object, use to_hash. Otherwise, just return the value
|
185
|
+
# @param [Object] value Any valid value
|
186
|
+
# @return [Hash] Returns the value in the form of hash
|
187
|
+
def _to_hash(value)
|
188
|
+
if value.is_a?(Array)
|
189
|
+
value.compact.map { |v| _to_hash(v) }
|
190
|
+
elsif value.is_a?(Hash)
|
191
|
+
{}.tap do |hash|
|
192
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
193
|
+
end
|
194
|
+
elsif value.respond_to? :to_hash
|
195
|
+
value.to_hash
|
196
|
+
else
|
197
|
+
value
|
198
|
+
end
|
199
|
+
end
|
200
|
+
|
201
|
+
end
|
202
|
+
end
|
@@ -0,0 +1,232 @@
|
|
1
|
+
=begin
|
2
|
+
#UltraCart Rest API V2
|
3
|
+
|
4
|
+
#UltraCart REST API Version 2
|
5
|
+
|
6
|
+
OpenAPI spec version: 2.0.0
|
7
|
+
Contact: support@ultracart.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.15-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module UltracartClient
|
16
|
+
class EmailCommseqSmsSendTestResponse
|
17
|
+
attr_accessor :body
|
18
|
+
|
19
|
+
attr_accessor :error
|
20
|
+
|
21
|
+
attr_accessor :media_urls
|
22
|
+
|
23
|
+
attr_accessor :metadata
|
24
|
+
|
25
|
+
# Indicates if API call was successful
|
26
|
+
attr_accessor :success
|
27
|
+
|
28
|
+
attr_accessor :warning
|
29
|
+
|
30
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
31
|
+
def self.attribute_map
|
32
|
+
{
|
33
|
+
:'body' => :'body',
|
34
|
+
:'error' => :'error',
|
35
|
+
:'media_urls' => :'media_urls',
|
36
|
+
:'metadata' => :'metadata',
|
37
|
+
:'success' => :'success',
|
38
|
+
:'warning' => :'warning'
|
39
|
+
}
|
40
|
+
end
|
41
|
+
|
42
|
+
# Attribute type mapping.
|
43
|
+
def self.swagger_types
|
44
|
+
{
|
45
|
+
:'body' => :'String',
|
46
|
+
:'error' => :'Error',
|
47
|
+
:'media_urls' => :'Array<String>',
|
48
|
+
:'metadata' => :'ResponseMetadata',
|
49
|
+
:'success' => :'BOOLEAN',
|
50
|
+
:'warning' => :'Warning'
|
51
|
+
}
|
52
|
+
end
|
53
|
+
|
54
|
+
# Initializes the object
|
55
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
56
|
+
def initialize(attributes = {})
|
57
|
+
return unless attributes.is_a?(Hash)
|
58
|
+
|
59
|
+
# convert string to symbol for hash key
|
60
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
61
|
+
|
62
|
+
if attributes.has_key?(:'body')
|
63
|
+
self.body = attributes[:'body']
|
64
|
+
end
|
65
|
+
|
66
|
+
if attributes.has_key?(:'error')
|
67
|
+
self.error = attributes[:'error']
|
68
|
+
end
|
69
|
+
|
70
|
+
if attributes.has_key?(:'media_urls')
|
71
|
+
if (value = attributes[:'media_urls']).is_a?(Array)
|
72
|
+
self.media_urls = value
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
if attributes.has_key?(:'metadata')
|
77
|
+
self.metadata = attributes[:'metadata']
|
78
|
+
end
|
79
|
+
|
80
|
+
if attributes.has_key?(:'success')
|
81
|
+
self.success = attributes[:'success']
|
82
|
+
end
|
83
|
+
|
84
|
+
if attributes.has_key?(:'warning')
|
85
|
+
self.warning = attributes[:'warning']
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
90
|
+
# @return Array for valid properties with the reasons
|
91
|
+
def list_invalid_properties
|
92
|
+
invalid_properties = Array.new
|
93
|
+
invalid_properties
|
94
|
+
end
|
95
|
+
|
96
|
+
# Check to see if the all the properties in the model are valid
|
97
|
+
# @return true if the model is valid
|
98
|
+
def valid?
|
99
|
+
true
|
100
|
+
end
|
101
|
+
|
102
|
+
# Checks equality by comparing each attribute.
|
103
|
+
# @param [Object] Object to be compared
|
104
|
+
def ==(o)
|
105
|
+
return true if self.equal?(o)
|
106
|
+
self.class == o.class &&
|
107
|
+
body == o.body &&
|
108
|
+
error == o.error &&
|
109
|
+
media_urls == o.media_urls &&
|
110
|
+
metadata == o.metadata &&
|
111
|
+
success == o.success &&
|
112
|
+
warning == o.warning
|
113
|
+
end
|
114
|
+
|
115
|
+
# @see the `==` method
|
116
|
+
# @param [Object] Object to be compared
|
117
|
+
def eql?(o)
|
118
|
+
self == o
|
119
|
+
end
|
120
|
+
|
121
|
+
# Calculates hash code according to all attributes.
|
122
|
+
# @return [Fixnum] Hash code
|
123
|
+
def hash
|
124
|
+
[body, error, media_urls, metadata, success, warning].hash
|
125
|
+
end
|
126
|
+
|
127
|
+
# Builds the object from hash
|
128
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
129
|
+
# @return [Object] Returns the model itself
|
130
|
+
def build_from_hash(attributes)
|
131
|
+
return nil unless attributes.is_a?(Hash)
|
132
|
+
self.class.swagger_types.each_pair do |key, type|
|
133
|
+
if type =~ /\AArray<(.*)>/i
|
134
|
+
# check to ensure the input is an array given that the attribute
|
135
|
+
# is documented as an array but the input is not
|
136
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
137
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
138
|
+
end
|
139
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
140
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
141
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
142
|
+
end
|
143
|
+
|
144
|
+
self
|
145
|
+
end
|
146
|
+
|
147
|
+
# Deserializes the data based on type
|
148
|
+
# @param string type Data type
|
149
|
+
# @param string value Value to be deserialized
|
150
|
+
# @return [Object] Deserialized data
|
151
|
+
def _deserialize(type, value)
|
152
|
+
case type.to_sym
|
153
|
+
when :DateTime
|
154
|
+
DateTime.parse(value)
|
155
|
+
when :Date
|
156
|
+
Date.parse(value)
|
157
|
+
when :String
|
158
|
+
value.to_s
|
159
|
+
when :Integer
|
160
|
+
value.to_i
|
161
|
+
when :Float
|
162
|
+
value.to_f
|
163
|
+
when :BOOLEAN
|
164
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
165
|
+
true
|
166
|
+
else
|
167
|
+
false
|
168
|
+
end
|
169
|
+
when :Object
|
170
|
+
# generic object (usually a Hash), return directly
|
171
|
+
value
|
172
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
173
|
+
inner_type = Regexp.last_match[:inner_type]
|
174
|
+
value.map { |v| _deserialize(inner_type, v) }
|
175
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
176
|
+
k_type = Regexp.last_match[:k_type]
|
177
|
+
v_type = Regexp.last_match[:v_type]
|
178
|
+
{}.tap do |hash|
|
179
|
+
value.each do |k, v|
|
180
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
181
|
+
end
|
182
|
+
end
|
183
|
+
else # model
|
184
|
+
temp_model = UltracartClient.const_get(type).new
|
185
|
+
temp_model.build_from_hash(value)
|
186
|
+
end
|
187
|
+
end
|
188
|
+
|
189
|
+
# Returns the string representation of the object
|
190
|
+
# @return [String] String presentation of the object
|
191
|
+
def to_s
|
192
|
+
to_hash.to_s
|
193
|
+
end
|
194
|
+
|
195
|
+
# to_body is an alias to to_hash (backward compatibility)
|
196
|
+
# @return [Hash] Returns the object in the form of hash
|
197
|
+
def to_body
|
198
|
+
to_hash
|
199
|
+
end
|
200
|
+
|
201
|
+
# Returns the object in the form of hash
|
202
|
+
# @return [Hash] Returns the object in the form of hash
|
203
|
+
def to_hash
|
204
|
+
hash = {}
|
205
|
+
self.class.attribute_map.each_pair do |attr, param|
|
206
|
+
value = self.send(attr)
|
207
|
+
next if value.nil?
|
208
|
+
hash[param] = _to_hash(value)
|
209
|
+
end
|
210
|
+
hash
|
211
|
+
end
|
212
|
+
|
213
|
+
# Outputs non-array value in the form of hash
|
214
|
+
# For object, use to_hash. Otherwise, just return the value
|
215
|
+
# @param [Object] value Any valid value
|
216
|
+
# @return [Hash] Returns the value in the form of hash
|
217
|
+
def _to_hash(value)
|
218
|
+
if value.is_a?(Array)
|
219
|
+
value.compact.map { |v| _to_hash(v) }
|
220
|
+
elsif value.is_a?(Hash)
|
221
|
+
{}.tap do |hash|
|
222
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
223
|
+
end
|
224
|
+
elsif value.respond_to? :to_hash
|
225
|
+
value.to_hash
|
226
|
+
else
|
227
|
+
value
|
228
|
+
end
|
229
|
+
end
|
230
|
+
|
231
|
+
end
|
232
|
+
end
|
data/lib/ultracart_api.rb
CHANGED
@@ -284,6 +284,8 @@ require 'ultracart_api/models/email_commseq_postcards_response'
|
|
284
284
|
require 'ultracart_api/models/email_commseq_response'
|
285
285
|
require 'ultracart_api/models/email_commseq_sequence_test_request'
|
286
286
|
require 'ultracart_api/models/email_commseq_sequence_test_response'
|
287
|
+
require 'ultracart_api/models/email_commseq_sms_send_test_request'
|
288
|
+
require 'ultracart_api/models/email_commseq_sms_send_test_response'
|
287
289
|
require 'ultracart_api/models/email_commseq_stat'
|
288
290
|
require 'ultracart_api/models/email_commseq_stat_response'
|
289
291
|
require 'ultracart_api/models/email_commseq_step'
|
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: 3.10.
|
4
|
+
version: 3.10.58
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- UltraCart
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-10-
|
11
|
+
date: 2022-10-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -496,6 +496,8 @@ files:
|
|
496
496
|
- docs/EmailCommseqResponse.md
|
497
497
|
- docs/EmailCommseqSequenceTestRequest.md
|
498
498
|
- docs/EmailCommseqSequenceTestResponse.md
|
499
|
+
- docs/EmailCommseqSmsSendTestRequest.md
|
500
|
+
- docs/EmailCommseqSmsSendTestResponse.md
|
499
501
|
- docs/EmailCommseqStat.md
|
500
502
|
- docs/EmailCommseqStatResponse.md
|
501
503
|
- docs/EmailCommseqStep.md
|
@@ -1210,6 +1212,8 @@ files:
|
|
1210
1212
|
- lib/ultracart_api/models/email_commseq_response.rb
|
1211
1213
|
- lib/ultracart_api/models/email_commseq_sequence_test_request.rb
|
1212
1214
|
- lib/ultracart_api/models/email_commseq_sequence_test_response.rb
|
1215
|
+
- lib/ultracart_api/models/email_commseq_sms_send_test_request.rb
|
1216
|
+
- lib/ultracart_api/models/email_commseq_sms_send_test_response.rb
|
1213
1217
|
- lib/ultracart_api/models/email_commseq_stat.rb
|
1214
1218
|
- lib/ultracart_api/models/email_commseq_stat_response.rb
|
1215
1219
|
- lib/ultracart_api/models/email_commseq_step.rb
|