ultracart_api 4.0.74.rc → 4.0.75.rc
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +8 -4
- data/docs/EmailCommseqSequenceTestRequest.md +2 -0
- data/docs/EmailCommseqSmsSendTestRequest.md +22 -0
- data/docs/EmailCommseqSmsSendTestResponse.md +28 -0
- data/docs/StorefrontApi.md +76 -0
- data/lib/ultracart_api/api/storefront_api.rb +85 -0
- 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 +237 -0
- data/lib/ultracart_api/models/email_commseq_sms_send_test_response.rb +267 -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: 10e10948b6c862fae6c17b535806025061c34fed43ad171584754d27f25d40f7
|
|
4
|
+
data.tar.gz: 84fef9b6d0c391d2c2253e9ceb8288ddc93e0d9ab6e7a29cb06200c88196f6c3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1b056fd60486c53e66fbeddfc4b36c3e7b78b78f754674da43921d092b2aa7c864df628f4c0ceda4ad09099dd51dff9107f598eb4542aa1e0c353aacf733bbeb
|
|
7
|
+
data.tar.gz: 5765316a45908f00ce5491e0e71885a4b7b03691f928cf4f9ca48d0d3598d39a2f4e0f4702a7c609405e5e0bcf007cce85c8821f3dcefabf03ee51b0717772e6
|
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.75.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.75.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.75.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.75.rc'
|
|
37
37
|
|
|
38
38
|
### Install from Git
|
|
39
39
|
|
|
@@ -385,6 +385,7 @@ Class | Method | HTTP request | Description
|
|
|
385
385
|
*UltracartClient::StorefrontApi* | [**search_shared_items**](docs/StorefrontApi.md#search_shared_items) | **POST** /storefront/code_library/search_shared | Retrieve library items
|
|
386
386
|
*UltracartClient::StorefrontApi* | [**send_email_test**](docs/StorefrontApi.md#send_email_test) | **POST** /storefront/{storefront_oid}/email/emails/{commseq_email_uuid}/test | Send email test
|
|
387
387
|
*UltracartClient::StorefrontApi* | [**send_postcard_test**](docs/StorefrontApi.md#send_postcard_test) | **POST** /storefront/{storefront_oid}/email/postcards/{commseq_postcard_uuid}/test | Send postcard test
|
|
388
|
+
*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
|
|
388
389
|
*UltracartClient::StorefrontApi* | [**send_webhook_test**](docs/StorefrontApi.md#send_webhook_test) | **POST** /storefront/{storefront_oid}/email/webhooks/test | Send webhook test
|
|
389
390
|
*UltracartClient::StorefrontApi* | [**sequence_test**](docs/StorefrontApi.md#sequence_test) | **POST** /storefront/{storefront_oid}/email/commseqs/{commseq_uuid}/test | Sequence test
|
|
390
391
|
*UltracartClient::StorefrontApi* | [**start_email_campaign**](docs/StorefrontApi.md#start_email_campaign) | **PUT** /storefront/{storefront_oid}/email/campaigns/{email_campaign_uuid}/start | Start email campaign
|
|
@@ -733,6 +734,8 @@ Class | Method | HTTP request | Description
|
|
|
733
734
|
- [UltracartClient::EmailCommseqResponse](docs/EmailCommseqResponse.md)
|
|
734
735
|
- [UltracartClient::EmailCommseqSequenceTestRequest](docs/EmailCommseqSequenceTestRequest.md)
|
|
735
736
|
- [UltracartClient::EmailCommseqSequenceTestResponse](docs/EmailCommseqSequenceTestResponse.md)
|
|
737
|
+
- [UltracartClient::EmailCommseqSmsSendTestRequest](docs/EmailCommseqSmsSendTestRequest.md)
|
|
738
|
+
- [UltracartClient::EmailCommseqSmsSendTestResponse](docs/EmailCommseqSmsSendTestResponse.md)
|
|
736
739
|
- [UltracartClient::EmailCommseqStat](docs/EmailCommseqStat.md)
|
|
737
740
|
- [UltracartClient::EmailCommseqStatResponse](docs/EmailCommseqStatResponse.md)
|
|
738
741
|
- [UltracartClient::EmailCommseqStep](docs/EmailCommseqStep.md)
|
|
@@ -1218,6 +1221,7 @@ Not every change is committed to every SDK.
|
|
|
1218
1221
|
|
|
1219
1222
|
| Version | Date | Comments |
|
|
1220
1223
|
| --: | :-: | --- |
|
|
1224
|
+
| 4.0.75-RC | 10/26/2022 | esp - methods for sms testing |
|
|
1221
1225
|
| 4.0.74-RC | 10/17/2022 | conversations - add last_interactive_message_dts |
|
|
1222
1226
|
| 4.0.73-RC | 10/07/2022 | bug fix for digital items response |
|
|
1223
1227
|
| 4.0.72-RC | 10/05/2022 | storefront rest file cdn icon urls |
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
| **order_id** | **String** | | [optional] |
|
|
16
16
|
| **please_review** | **Boolean** | | [optional] |
|
|
17
17
|
| **postal_code** | **String** | | [optional] |
|
|
18
|
+
| **send_to_cellphone_e164** | **String** | | [optional] |
|
|
18
19
|
| **send_to_email** | **String** | | [optional] |
|
|
19
20
|
| **send_to_logged_in_user** | **Boolean** | | [optional] |
|
|
20
21
|
| **state** | **String** | | [optional] |
|
|
@@ -36,6 +37,7 @@ instance = UltracartClient::EmailCommseqSequenceTestRequest.new(
|
|
|
36
37
|
order_id: null,
|
|
37
38
|
please_review: null,
|
|
38
39
|
postal_code: null,
|
|
40
|
+
send_to_cellphone_e164: null,
|
|
39
41
|
send_to_email: null,
|
|
40
42
|
send_to_logged_in_user: null,
|
|
41
43
|
state: null
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# UltracartClient::EmailCommseqSmsSendTestRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **esp_commseq_step_uuid** | **String** | | [optional] |
|
|
8
|
+
| **esp_commseq_uuid** | **String** | | [optional] |
|
|
9
|
+
| **send_to_cellphone_e164** | **String** | | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'ultracart_api'
|
|
15
|
+
|
|
16
|
+
instance = UltracartClient::EmailCommseqSmsSendTestRequest.new(
|
|
17
|
+
esp_commseq_step_uuid: null,
|
|
18
|
+
esp_commseq_uuid: null,
|
|
19
|
+
send_to_cellphone_e164: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# UltracartClient::EmailCommseqSmsSendTestResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **body** | **String** | | [optional] |
|
|
8
|
+
| **error** | [**Error**](Error.md) | | [optional] |
|
|
9
|
+
| **media_urls** | **Array<String>** | | [optional] |
|
|
10
|
+
| **metadata** | [**ResponseMetadata**](ResponseMetadata.md) | | [optional] |
|
|
11
|
+
| **success** | **Boolean** | Indicates if API call was successful | [optional] |
|
|
12
|
+
| **warning** | [**Warning**](Warning.md) | | [optional] |
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```ruby
|
|
17
|
+
require 'ultracart_api'
|
|
18
|
+
|
|
19
|
+
instance = UltracartClient::EmailCommseqSmsSendTestResponse.new(
|
|
20
|
+
body: null,
|
|
21
|
+
error: null,
|
|
22
|
+
media_urls: null,
|
|
23
|
+
metadata: null,
|
|
24
|
+
success: null,
|
|
25
|
+
warning: null
|
|
26
|
+
)
|
|
27
|
+
```
|
|
28
|
+
|
data/docs/StorefrontApi.md
CHANGED
|
@@ -145,6 +145,7 @@ All URIs are relative to *https://secure.ultracart.com/rest/v2*
|
|
|
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 |
|
|
@@ -10284,6 +10285,81 @@ end
|
|
|
10284
10285
|
- **Accept**: application/json
|
|
10285
10286
|
|
|
10286
10287
|
|
|
10288
|
+
## send_sms_test
|
|
10289
|
+
|
|
10290
|
+
> <EmailCommseqSmsSendTestResponse> send_sms_test(storefront_oid, commseq_uuid, commseq_step_uuid, email_commseq_sms_test_request)
|
|
10291
|
+
|
|
10292
|
+
Send SMS test
|
|
10293
|
+
|
|
10294
|
+
### Examples
|
|
10295
|
+
|
|
10296
|
+
```ruby
|
|
10297
|
+
require 'time'
|
|
10298
|
+
require 'ultracart_api'
|
|
10299
|
+
require 'json'
|
|
10300
|
+
require 'yaml'
|
|
10301
|
+
require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
|
|
10302
|
+
|
|
10303
|
+
# This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
|
|
10304
|
+
# As such, this might not be the best way to use this object.
|
|
10305
|
+
# Please see https://github.com/UltraCart/sdk_samples for working examples.
|
|
10306
|
+
|
|
10307
|
+
api = UltracartClient::StorefrontApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
|
|
10308
|
+
storefront_oid = 56 # Integer |
|
|
10309
|
+
commseq_uuid = 'commseq_uuid_example' # String |
|
|
10310
|
+
commseq_step_uuid = 'commseq_step_uuid_example' # String |
|
|
10311
|
+
email_commseq_sms_test_request = UltracartClient::EmailCommseqSmsSendTestRequest.new # EmailCommseqSmsSendTestRequest | Email commseq sms test request
|
|
10312
|
+
|
|
10313
|
+
begin
|
|
10314
|
+
# Send SMS test
|
|
10315
|
+
result = api_instance.send_sms_test(storefront_oid, commseq_uuid, commseq_step_uuid, email_commseq_sms_test_request)
|
|
10316
|
+
p result
|
|
10317
|
+
rescue UltracartClient::ApiError => e
|
|
10318
|
+
puts "Error when calling StorefrontApi->send_sms_test: #{e}"
|
|
10319
|
+
end
|
|
10320
|
+
```
|
|
10321
|
+
|
|
10322
|
+
#### Using the send_sms_test_with_http_info variant
|
|
10323
|
+
|
|
10324
|
+
This returns an Array which contains the response data, status code and headers.
|
|
10325
|
+
|
|
10326
|
+
> <Array(<EmailCommseqSmsSendTestResponse>, Integer, Hash)> send_sms_test_with_http_info(storefront_oid, commseq_uuid, commseq_step_uuid, email_commseq_sms_test_request)
|
|
10327
|
+
|
|
10328
|
+
```ruby
|
|
10329
|
+
begin
|
|
10330
|
+
# Send SMS test
|
|
10331
|
+
data, status_code, headers = api_instance.send_sms_test_with_http_info(storefront_oid, commseq_uuid, commseq_step_uuid, email_commseq_sms_test_request)
|
|
10332
|
+
p status_code # => 2xx
|
|
10333
|
+
p headers # => { ... }
|
|
10334
|
+
p data # => <EmailCommseqSmsSendTestResponse>
|
|
10335
|
+
rescue UltracartClient::ApiError => e
|
|
10336
|
+
puts "Error when calling StorefrontApi->send_sms_test_with_http_info: #{e}"
|
|
10337
|
+
end
|
|
10338
|
+
```
|
|
10339
|
+
|
|
10340
|
+
### Parameters
|
|
10341
|
+
|
|
10342
|
+
| Name | Type | Description | Notes |
|
|
10343
|
+
| ---- | ---- | ----------- | ----- |
|
|
10344
|
+
| **storefront_oid** | **Integer** | | |
|
|
10345
|
+
| **commseq_uuid** | **String** | | |
|
|
10346
|
+
| **commseq_step_uuid** | **String** | | |
|
|
10347
|
+
| **email_commseq_sms_test_request** | [**EmailCommseqSmsSendTestRequest**](EmailCommseqSmsSendTestRequest.md) | Email commseq sms test request | |
|
|
10348
|
+
|
|
10349
|
+
### Return type
|
|
10350
|
+
|
|
10351
|
+
[**EmailCommseqSmsSendTestResponse**](EmailCommseqSmsSendTestResponse.md)
|
|
10352
|
+
|
|
10353
|
+
### Authorization
|
|
10354
|
+
|
|
10355
|
+
[ultraCartBrowserApiKey](../README.md#ultraCartBrowserApiKey), [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
|
10356
|
+
|
|
10357
|
+
### HTTP request headers
|
|
10358
|
+
|
|
10359
|
+
- **Content-Type**: application/json
|
|
10360
|
+
- **Accept**: application/json
|
|
10361
|
+
|
|
10362
|
+
|
|
10287
10363
|
## send_webhook_test
|
|
10288
10364
|
|
|
10289
10365
|
> <EmailCommseqWebhookSendTestResponse> send_webhook_test(storefront_oid, email_commseq_webhook_test_request)
|
|
@@ -9738,6 +9738,91 @@ module UltracartClient
|
|
|
9738
9738
|
return data, status_code, headers
|
|
9739
9739
|
end
|
|
9740
9740
|
|
|
9741
|
+
# Send SMS test
|
|
9742
|
+
# @param storefront_oid [Integer]
|
|
9743
|
+
# @param commseq_uuid [String]
|
|
9744
|
+
# @param commseq_step_uuid [String]
|
|
9745
|
+
# @param email_commseq_sms_test_request [EmailCommseqSmsSendTestRequest] Email commseq sms test request
|
|
9746
|
+
# @param [Hash] opts the optional parameters
|
|
9747
|
+
# @return [EmailCommseqSmsSendTestResponse]
|
|
9748
|
+
def send_sms_test(storefront_oid, commseq_uuid, commseq_step_uuid, email_commseq_sms_test_request, opts = {})
|
|
9749
|
+
data, _status_code, _headers = send_sms_test_with_http_info(storefront_oid, commseq_uuid, commseq_step_uuid, email_commseq_sms_test_request, opts)
|
|
9750
|
+
data
|
|
9751
|
+
end
|
|
9752
|
+
|
|
9753
|
+
# Send SMS test
|
|
9754
|
+
# @param storefront_oid [Integer]
|
|
9755
|
+
# @param commseq_uuid [String]
|
|
9756
|
+
# @param commseq_step_uuid [String]
|
|
9757
|
+
# @param email_commseq_sms_test_request [EmailCommseqSmsSendTestRequest] Email commseq sms test request
|
|
9758
|
+
# @param [Hash] opts the optional parameters
|
|
9759
|
+
# @return [Array<(EmailCommseqSmsSendTestResponse, Integer, Hash)>] EmailCommseqSmsSendTestResponse data, response status code and response headers
|
|
9760
|
+
def send_sms_test_with_http_info(storefront_oid, commseq_uuid, commseq_step_uuid, email_commseq_sms_test_request, opts = {})
|
|
9761
|
+
if @api_client.config.debugging
|
|
9762
|
+
@api_client.config.logger.debug 'Calling API: StorefrontApi.send_sms_test ...'
|
|
9763
|
+
end
|
|
9764
|
+
# verify the required parameter 'storefront_oid' is set
|
|
9765
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
9766
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling StorefrontApi.send_sms_test"
|
|
9767
|
+
end
|
|
9768
|
+
# verify the required parameter 'commseq_uuid' is set
|
|
9769
|
+
if @api_client.config.client_side_validation && commseq_uuid.nil?
|
|
9770
|
+
fail ArgumentError, "Missing the required parameter 'commseq_uuid' when calling StorefrontApi.send_sms_test"
|
|
9771
|
+
end
|
|
9772
|
+
# verify the required parameter 'commseq_step_uuid' is set
|
|
9773
|
+
if @api_client.config.client_side_validation && commseq_step_uuid.nil?
|
|
9774
|
+
fail ArgumentError, "Missing the required parameter 'commseq_step_uuid' when calling StorefrontApi.send_sms_test"
|
|
9775
|
+
end
|
|
9776
|
+
# verify the required parameter 'email_commseq_sms_test_request' is set
|
|
9777
|
+
if @api_client.config.client_side_validation && email_commseq_sms_test_request.nil?
|
|
9778
|
+
fail ArgumentError, "Missing the required parameter 'email_commseq_sms_test_request' when calling StorefrontApi.send_sms_test"
|
|
9779
|
+
end
|
|
9780
|
+
# resource path
|
|
9781
|
+
local_var_path = '/storefront/{storefront_oid}/email/sms/{commseq_uuid}/{commseq_step_uuid}/test'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'commseq_uuid' + '}', CGI.escape(commseq_uuid.to_s)).sub('{' + 'commseq_step_uuid' + '}', CGI.escape(commseq_step_uuid.to_s))
|
|
9782
|
+
|
|
9783
|
+
# query parameters
|
|
9784
|
+
query_params = opts[:query_params] || {}
|
|
9785
|
+
|
|
9786
|
+
# header parameters
|
|
9787
|
+
header_params = opts[:header_params] || {}
|
|
9788
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
9789
|
+
# HTTP header 'Accept' (if needed)
|
|
9790
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
9791
|
+
# HTTP header 'Content-Type'
|
|
9792
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
9793
|
+
if !content_type.nil?
|
|
9794
|
+
header_params['Content-Type'] = content_type
|
|
9795
|
+
end
|
|
9796
|
+
|
|
9797
|
+
# form parameters
|
|
9798
|
+
form_params = opts[:form_params] || {}
|
|
9799
|
+
|
|
9800
|
+
# http body (model)
|
|
9801
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(email_commseq_sms_test_request)
|
|
9802
|
+
|
|
9803
|
+
# return_type
|
|
9804
|
+
return_type = opts[:debug_return_type] || 'EmailCommseqSmsSendTestResponse'
|
|
9805
|
+
|
|
9806
|
+
# auth_names
|
|
9807
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartBrowserApiKey', 'ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
9808
|
+
|
|
9809
|
+
new_options = opts.merge(
|
|
9810
|
+
:operation => :"StorefrontApi.send_sms_test",
|
|
9811
|
+
:header_params => header_params,
|
|
9812
|
+
:query_params => query_params,
|
|
9813
|
+
:form_params => form_params,
|
|
9814
|
+
:body => post_body,
|
|
9815
|
+
:auth_names => auth_names,
|
|
9816
|
+
:return_type => return_type
|
|
9817
|
+
)
|
|
9818
|
+
|
|
9819
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
9820
|
+
if @api_client.config.debugging
|
|
9821
|
+
@api_client.config.logger.debug "API called: StorefrontApi#send_sms_test\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
9822
|
+
end
|
|
9823
|
+
return data, status_code, headers
|
|
9824
|
+
end
|
|
9825
|
+
|
|
9741
9826
|
# Send webhook test
|
|
9742
9827
|
# @param storefront_oid [Integer]
|
|
9743
9828
|
# @param email_commseq_webhook_test_request [EmailCommseqWebhookSendTestRequest] Email commseq webhook test request
|
|
@@ -37,6 +37,8 @@ module UltracartClient
|
|
|
37
37
|
|
|
38
38
|
attr_accessor :postal_code
|
|
39
39
|
|
|
40
|
+
attr_accessor :send_to_cellphone_e164
|
|
41
|
+
|
|
40
42
|
attr_accessor :send_to_email
|
|
41
43
|
|
|
42
44
|
attr_accessor :send_to_logged_in_user
|
|
@@ -57,6 +59,7 @@ module UltracartClient
|
|
|
57
59
|
:'order_id' => :'order_id',
|
|
58
60
|
:'please_review' => :'please_review',
|
|
59
61
|
:'postal_code' => :'postal_code',
|
|
62
|
+
:'send_to_cellphone_e164' => :'send_to_cellphone_e164',
|
|
60
63
|
:'send_to_email' => :'send_to_email',
|
|
61
64
|
:'send_to_logged_in_user' => :'send_to_logged_in_user',
|
|
62
65
|
:'state' => :'state'
|
|
@@ -82,6 +85,7 @@ module UltracartClient
|
|
|
82
85
|
:'order_id' => :'String',
|
|
83
86
|
:'please_review' => :'Boolean',
|
|
84
87
|
:'postal_code' => :'String',
|
|
88
|
+
:'send_to_cellphone_e164' => :'String',
|
|
85
89
|
:'send_to_email' => :'String',
|
|
86
90
|
:'send_to_logged_in_user' => :'Boolean',
|
|
87
91
|
:'state' => :'String'
|
|
@@ -155,6 +159,10 @@ module UltracartClient
|
|
|
155
159
|
self.postal_code = attributes[:'postal_code']
|
|
156
160
|
end
|
|
157
161
|
|
|
162
|
+
if attributes.key?(:'send_to_cellphone_e164')
|
|
163
|
+
self.send_to_cellphone_e164 = attributes[:'send_to_cellphone_e164']
|
|
164
|
+
end
|
|
165
|
+
|
|
158
166
|
if attributes.key?(:'send_to_email')
|
|
159
167
|
self.send_to_email = attributes[:'send_to_email']
|
|
160
168
|
end
|
|
@@ -197,6 +205,7 @@ module UltracartClient
|
|
|
197
205
|
order_id == o.order_id &&
|
|
198
206
|
please_review == o.please_review &&
|
|
199
207
|
postal_code == o.postal_code &&
|
|
208
|
+
send_to_cellphone_e164 == o.send_to_cellphone_e164 &&
|
|
200
209
|
send_to_email == o.send_to_email &&
|
|
201
210
|
send_to_logged_in_user == o.send_to_logged_in_user &&
|
|
202
211
|
state == o.state
|
|
@@ -211,7 +220,7 @@ module UltracartClient
|
|
|
211
220
|
# Calculates hash code according to all attributes.
|
|
212
221
|
# @return [Integer] Hash code
|
|
213
222
|
def hash
|
|
214
|
-
[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
|
|
223
|
+
[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
|
|
215
224
|
end
|
|
216
225
|
|
|
217
226
|
# Builds the object from hash
|
|
@@ -0,0 +1,237 @@
|
|
|
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 EmailCommseqSmsSendTestRequest
|
|
18
|
+
attr_accessor :esp_commseq_step_uuid
|
|
19
|
+
|
|
20
|
+
attr_accessor :esp_commseq_uuid
|
|
21
|
+
|
|
22
|
+
attr_accessor :send_to_cellphone_e164
|
|
23
|
+
|
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
+
def self.attribute_map
|
|
26
|
+
{
|
|
27
|
+
:'esp_commseq_step_uuid' => :'esp_commseq_step_uuid',
|
|
28
|
+
:'esp_commseq_uuid' => :'esp_commseq_uuid',
|
|
29
|
+
:'send_to_cellphone_e164' => :'send_to_cellphone_e164'
|
|
30
|
+
}
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Returns all the JSON keys this model knows about
|
|
34
|
+
def self.acceptable_attributes
|
|
35
|
+
attribute_map.values
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Attribute type mapping.
|
|
39
|
+
def self.openapi_types
|
|
40
|
+
{
|
|
41
|
+
:'esp_commseq_step_uuid' => :'String',
|
|
42
|
+
:'esp_commseq_uuid' => :'String',
|
|
43
|
+
:'send_to_cellphone_e164' => :'String'
|
|
44
|
+
}
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# List of attributes with nullable: true
|
|
48
|
+
def self.openapi_nullable
|
|
49
|
+
Set.new([
|
|
50
|
+
])
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Initializes the object
|
|
54
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
55
|
+
def initialize(attributes = {})
|
|
56
|
+
if (!attributes.is_a?(Hash))
|
|
57
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::EmailCommseqSmsSendTestRequest` initialize method"
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
61
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
62
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
63
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::EmailCommseqSmsSendTestRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
64
|
+
end
|
|
65
|
+
h[k.to_sym] = v
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
if attributes.key?(:'esp_commseq_step_uuid')
|
|
69
|
+
self.esp_commseq_step_uuid = attributes[:'esp_commseq_step_uuid']
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
if attributes.key?(:'esp_commseq_uuid')
|
|
73
|
+
self.esp_commseq_uuid = attributes[:'esp_commseq_uuid']
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
if attributes.key?(:'send_to_cellphone_e164')
|
|
77
|
+
self.send_to_cellphone_e164 = attributes[:'send_to_cellphone_e164']
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
82
|
+
# @return Array for valid properties with the reasons
|
|
83
|
+
def list_invalid_properties
|
|
84
|
+
invalid_properties = Array.new
|
|
85
|
+
invalid_properties
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Check to see if the all the properties in the model are valid
|
|
89
|
+
# @return true if the model is valid
|
|
90
|
+
def valid?
|
|
91
|
+
true
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Checks equality by comparing each attribute.
|
|
95
|
+
# @param [Object] Object to be compared
|
|
96
|
+
def ==(o)
|
|
97
|
+
return true if self.equal?(o)
|
|
98
|
+
self.class == o.class &&
|
|
99
|
+
esp_commseq_step_uuid == o.esp_commseq_step_uuid &&
|
|
100
|
+
esp_commseq_uuid == o.esp_commseq_uuid &&
|
|
101
|
+
send_to_cellphone_e164 == o.send_to_cellphone_e164
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# @see the `==` method
|
|
105
|
+
# @param [Object] Object to be compared
|
|
106
|
+
def eql?(o)
|
|
107
|
+
self == o
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Calculates hash code according to all attributes.
|
|
111
|
+
# @return [Integer] Hash code
|
|
112
|
+
def hash
|
|
113
|
+
[esp_commseq_step_uuid, esp_commseq_uuid, send_to_cellphone_e164].hash
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# Builds the object from hash
|
|
117
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
118
|
+
# @return [Object] Returns the model itself
|
|
119
|
+
def self.build_from_hash(attributes)
|
|
120
|
+
new.build_from_hash(attributes)
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# Builds the object from hash
|
|
124
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
125
|
+
# @return [Object] Returns the model itself
|
|
126
|
+
def build_from_hash(attributes)
|
|
127
|
+
return nil unless attributes.is_a?(Hash)
|
|
128
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
129
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
130
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
131
|
+
self.send("#{key}=", nil)
|
|
132
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
133
|
+
# check to ensure the input is an array given that the attribute
|
|
134
|
+
# is documented as an array but the input is not
|
|
135
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
136
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
137
|
+
end
|
|
138
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
139
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
140
|
+
end
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
self
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Deserializes the data based on type
|
|
147
|
+
# @param string type Data type
|
|
148
|
+
# @param string value Value to be deserialized
|
|
149
|
+
# @return [Object] Deserialized data
|
|
150
|
+
def _deserialize(type, value)
|
|
151
|
+
case type.to_sym
|
|
152
|
+
when :Time
|
|
153
|
+
Time.parse(value)
|
|
154
|
+
when :Date
|
|
155
|
+
Date.parse(value)
|
|
156
|
+
when :String
|
|
157
|
+
value.to_s
|
|
158
|
+
when :Integer
|
|
159
|
+
value.to_i
|
|
160
|
+
when :Float
|
|
161
|
+
value.to_f
|
|
162
|
+
when :Boolean
|
|
163
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
164
|
+
true
|
|
165
|
+
else
|
|
166
|
+
false
|
|
167
|
+
end
|
|
168
|
+
when :Object
|
|
169
|
+
# generic object (usually a Hash), return directly
|
|
170
|
+
value
|
|
171
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
172
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
173
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
174
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
175
|
+
k_type = Regexp.last_match[:k_type]
|
|
176
|
+
v_type = Regexp.last_match[:v_type]
|
|
177
|
+
{}.tap do |hash|
|
|
178
|
+
value.each do |k, v|
|
|
179
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
180
|
+
end
|
|
181
|
+
end
|
|
182
|
+
else # model
|
|
183
|
+
# models (e.g. Pet) or oneOf
|
|
184
|
+
klass = UltracartClient.const_get(type)
|
|
185
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.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
|
+
if value.nil?
|
|
208
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
209
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
hash[param] = _to_hash(value)
|
|
213
|
+
end
|
|
214
|
+
hash
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
# Outputs non-array value in the form of hash
|
|
218
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
219
|
+
# @param [Object] value Any valid value
|
|
220
|
+
# @return [Hash] Returns the value in the form of hash
|
|
221
|
+
def _to_hash(value)
|
|
222
|
+
if value.is_a?(Array)
|
|
223
|
+
value.compact.map { |v| _to_hash(v) }
|
|
224
|
+
elsif value.is_a?(Hash)
|
|
225
|
+
{}.tap do |hash|
|
|
226
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
227
|
+
end
|
|
228
|
+
elsif value.respond_to? :to_hash
|
|
229
|
+
value.to_hash
|
|
230
|
+
else
|
|
231
|
+
value
|
|
232
|
+
end
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
end
|
|
@@ -0,0 +1,267 @@
|
|
|
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 EmailCommseqSmsSendTestResponse
|
|
18
|
+
attr_accessor :body
|
|
19
|
+
|
|
20
|
+
attr_accessor :error
|
|
21
|
+
|
|
22
|
+
attr_accessor :media_urls
|
|
23
|
+
|
|
24
|
+
attr_accessor :metadata
|
|
25
|
+
|
|
26
|
+
# Indicates if API call was successful
|
|
27
|
+
attr_accessor :success
|
|
28
|
+
|
|
29
|
+
attr_accessor :warning
|
|
30
|
+
|
|
31
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
32
|
+
def self.attribute_map
|
|
33
|
+
{
|
|
34
|
+
:'body' => :'body',
|
|
35
|
+
:'error' => :'error',
|
|
36
|
+
:'media_urls' => :'media_urls',
|
|
37
|
+
:'metadata' => :'metadata',
|
|
38
|
+
:'success' => :'success',
|
|
39
|
+
:'warning' => :'warning'
|
|
40
|
+
}
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Returns all the JSON keys this model knows about
|
|
44
|
+
def self.acceptable_attributes
|
|
45
|
+
attribute_map.values
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Attribute type mapping.
|
|
49
|
+
def self.openapi_types
|
|
50
|
+
{
|
|
51
|
+
:'body' => :'String',
|
|
52
|
+
:'error' => :'Error',
|
|
53
|
+
:'media_urls' => :'Array<String>',
|
|
54
|
+
:'metadata' => :'ResponseMetadata',
|
|
55
|
+
:'success' => :'Boolean',
|
|
56
|
+
:'warning' => :'Warning'
|
|
57
|
+
}
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# List of attributes with nullable: true
|
|
61
|
+
def self.openapi_nullable
|
|
62
|
+
Set.new([
|
|
63
|
+
])
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Initializes the object
|
|
67
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
68
|
+
def initialize(attributes = {})
|
|
69
|
+
if (!attributes.is_a?(Hash))
|
|
70
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::EmailCommseqSmsSendTestResponse` initialize method"
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
74
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
75
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
76
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::EmailCommseqSmsSendTestResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
77
|
+
end
|
|
78
|
+
h[k.to_sym] = v
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if attributes.key?(:'body')
|
|
82
|
+
self.body = attributes[:'body']
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
if attributes.key?(:'error')
|
|
86
|
+
self.error = attributes[:'error']
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
if attributes.key?(:'media_urls')
|
|
90
|
+
if (value = attributes[:'media_urls']).is_a?(Array)
|
|
91
|
+
self.media_urls = value
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
if attributes.key?(:'metadata')
|
|
96
|
+
self.metadata = attributes[:'metadata']
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
if attributes.key?(:'success')
|
|
100
|
+
self.success = attributes[:'success']
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
if attributes.key?(:'warning')
|
|
104
|
+
self.warning = attributes[:'warning']
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
109
|
+
# @return Array for valid properties with the reasons
|
|
110
|
+
def list_invalid_properties
|
|
111
|
+
invalid_properties = Array.new
|
|
112
|
+
invalid_properties
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Check to see if the all the properties in the model are valid
|
|
116
|
+
# @return true if the model is valid
|
|
117
|
+
def valid?
|
|
118
|
+
true
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# Checks equality by comparing each attribute.
|
|
122
|
+
# @param [Object] Object to be compared
|
|
123
|
+
def ==(o)
|
|
124
|
+
return true if self.equal?(o)
|
|
125
|
+
self.class == o.class &&
|
|
126
|
+
body == o.body &&
|
|
127
|
+
error == o.error &&
|
|
128
|
+
media_urls == o.media_urls &&
|
|
129
|
+
metadata == o.metadata &&
|
|
130
|
+
success == o.success &&
|
|
131
|
+
warning == o.warning
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# @see the `==` method
|
|
135
|
+
# @param [Object] Object to be compared
|
|
136
|
+
def eql?(o)
|
|
137
|
+
self == o
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# Calculates hash code according to all attributes.
|
|
141
|
+
# @return [Integer] Hash code
|
|
142
|
+
def hash
|
|
143
|
+
[body, error, media_urls, metadata, success, warning].hash
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Builds the object from hash
|
|
147
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
148
|
+
# @return [Object] Returns the model itself
|
|
149
|
+
def self.build_from_hash(attributes)
|
|
150
|
+
new.build_from_hash(attributes)
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
# Builds the object from hash
|
|
154
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
155
|
+
# @return [Object] Returns the model itself
|
|
156
|
+
def build_from_hash(attributes)
|
|
157
|
+
return nil unless attributes.is_a?(Hash)
|
|
158
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
159
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
160
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
161
|
+
self.send("#{key}=", nil)
|
|
162
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
163
|
+
# check to ensure the input is an array given that the attribute
|
|
164
|
+
# is documented as an array but the input is not
|
|
165
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
166
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
167
|
+
end
|
|
168
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
169
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
170
|
+
end
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
self
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
# Deserializes the data based on type
|
|
177
|
+
# @param string type Data type
|
|
178
|
+
# @param string value Value to be deserialized
|
|
179
|
+
# @return [Object] Deserialized data
|
|
180
|
+
def _deserialize(type, value)
|
|
181
|
+
case type.to_sym
|
|
182
|
+
when :Time
|
|
183
|
+
Time.parse(value)
|
|
184
|
+
when :Date
|
|
185
|
+
Date.parse(value)
|
|
186
|
+
when :String
|
|
187
|
+
value.to_s
|
|
188
|
+
when :Integer
|
|
189
|
+
value.to_i
|
|
190
|
+
when :Float
|
|
191
|
+
value.to_f
|
|
192
|
+
when :Boolean
|
|
193
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
194
|
+
true
|
|
195
|
+
else
|
|
196
|
+
false
|
|
197
|
+
end
|
|
198
|
+
when :Object
|
|
199
|
+
# generic object (usually a Hash), return directly
|
|
200
|
+
value
|
|
201
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
202
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
203
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
204
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
205
|
+
k_type = Regexp.last_match[:k_type]
|
|
206
|
+
v_type = Regexp.last_match[:v_type]
|
|
207
|
+
{}.tap do |hash|
|
|
208
|
+
value.each do |k, v|
|
|
209
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
210
|
+
end
|
|
211
|
+
end
|
|
212
|
+
else # model
|
|
213
|
+
# models (e.g. Pet) or oneOf
|
|
214
|
+
klass = UltracartClient.const_get(type)
|
|
215
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
216
|
+
end
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
# Returns the string representation of the object
|
|
220
|
+
# @return [String] String presentation of the object
|
|
221
|
+
def to_s
|
|
222
|
+
to_hash.to_s
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
226
|
+
# @return [Hash] Returns the object in the form of hash
|
|
227
|
+
def to_body
|
|
228
|
+
to_hash
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
# Returns the object in the form of hash
|
|
232
|
+
# @return [Hash] Returns the object in the form of hash
|
|
233
|
+
def to_hash
|
|
234
|
+
hash = {}
|
|
235
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
236
|
+
value = self.send(attr)
|
|
237
|
+
if value.nil?
|
|
238
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
239
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
hash[param] = _to_hash(value)
|
|
243
|
+
end
|
|
244
|
+
hash
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
# Outputs non-array value in the form of hash
|
|
248
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
249
|
+
# @param [Object] value Any valid value
|
|
250
|
+
# @return [Hash] Returns the value in the form of hash
|
|
251
|
+
def _to_hash(value)
|
|
252
|
+
if value.is_a?(Array)
|
|
253
|
+
value.compact.map { |v| _to_hash(v) }
|
|
254
|
+
elsif value.is_a?(Hash)
|
|
255
|
+
{}.tap do |hash|
|
|
256
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
257
|
+
end
|
|
258
|
+
elsif value.respond_to? :to_hash
|
|
259
|
+
value.to_hash
|
|
260
|
+
else
|
|
261
|
+
value
|
|
262
|
+
end
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
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: 4.0.
|
|
4
|
+
version: 4.0.75.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-10-
|
|
11
|
+
date: 2022-10-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: typhoeus
|
|
@@ -336,6 +336,8 @@ files:
|
|
|
336
336
|
- docs/EmailCommseqResponse.md
|
|
337
337
|
- docs/EmailCommseqSequenceTestRequest.md
|
|
338
338
|
- docs/EmailCommseqSequenceTestResponse.md
|
|
339
|
+
- docs/EmailCommseqSmsSendTestRequest.md
|
|
340
|
+
- docs/EmailCommseqSmsSendTestResponse.md
|
|
339
341
|
- docs/EmailCommseqStat.md
|
|
340
342
|
- docs/EmailCommseqStatResponse.md
|
|
341
343
|
- docs/EmailCommseqStep.md
|
|
@@ -1050,6 +1052,8 @@ files:
|
|
|
1050
1052
|
- lib/ultracart_api/models/email_commseq_response.rb
|
|
1051
1053
|
- lib/ultracart_api/models/email_commseq_sequence_test_request.rb
|
|
1052
1054
|
- lib/ultracart_api/models/email_commseq_sequence_test_response.rb
|
|
1055
|
+
- lib/ultracart_api/models/email_commseq_sms_send_test_request.rb
|
|
1056
|
+
- lib/ultracart_api/models/email_commseq_sms_send_test_response.rb
|
|
1053
1057
|
- lib/ultracart_api/models/email_commseq_stat.rb
|
|
1054
1058
|
- lib/ultracart_api/models/email_commseq_stat_response.rb
|
|
1055
1059
|
- lib/ultracart_api/models/email_commseq_step.rb
|