ultracart_api 4.1.207 → 4.1.208
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 +7 -2
- data/docs/SfvbApi.md +112 -0
- data/docs/SfvbEmail.md +40 -0
- data/docs/SfvbEmailUpdateRequest.md +20 -0
- data/lib/ultracart_api/api/sfvb_api.rb +158 -0
- data/lib/ultracart_api/models/item_third_party_email_marketing.rb +2 -2
- data/lib/ultracart_api/models/sfvb_email.rb +330 -0
- data/lib/ultracart_api/models/sfvb_email_update_request.rb +230 -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: 62fd7064999430105ea3b09ae20d62424894503c5c05d5cbc581fc37bf6a1436
|
|
4
|
+
data.tar.gz: 9cd9c6fed78ad9ea47e21e1e4749f0f44ce6b11f04090e3c2e615fe4958c0b95
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '099e55cb7722932b2cfcaa08420ea5ef89679facce8d0c52b3c3532d0297eb866923a830d997589e4b59f22d86b62766ecadcfaa2e33cbc804a18fdfe1064dee'
|
|
7
|
+
data.tar.gz: 45f76315807bc93a073ff2caf262a6508eea9e56629d730726ec514027d75d8557b921f76ba1cd3f9d51275b358daa7397d3915e8a8d00ee8193e0472ed1ff45
|
data/README.md
CHANGED
|
@@ -7,7 +7,7 @@ Note: Every method has a sample for every language. See https://github.com/Ultr
|
|
|
7
7
|
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
|
8
8
|
|
|
9
9
|
- API version: 2.0.0
|
|
10
|
-
- Package version: 4.1.
|
|
10
|
+
- Package version: 4.1.208
|
|
11
11
|
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
|
12
12
|
- For more information, please visit [http://www.ultracart.com/api/](http://www.ultracart.com/api/)
|
|
13
13
|
|
|
@@ -16,7 +16,7 @@ This SDK is automatically generated by the [OpenAPI Generator](https://openapi-g
|
|
|
16
16
|
gemfile:
|
|
17
17
|
|
|
18
18
|
```shell
|
|
19
|
-
gem 'ultracart_api', '4.1.
|
|
19
|
+
gem 'ultracart_api', '4.1.208'
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
install:
|
|
@@ -528,6 +528,7 @@ Class | Method | HTTP request | Description
|
|
|
528
528
|
*UltracartClient::SfvbApi* | [**get_sfvb_container**](docs/SfvbApi.md#get_sfvb_container) | **GET** /sfvb/storefronts/{storefront_oid}/containers/{owner_type}/{owner_object_id} | Read a container stored outside the file system
|
|
529
529
|
*UltracartClient::SfvbApi* | [**get_sfvb_container_version**](docs/SfvbApi.md#get_sfvb_container_version) | **GET** /sfvb/storefronts/{storefront_oid}/container_versions/{container_history_oid} | Read the CJSON stored in one container history entry
|
|
530
530
|
*UltracartClient::SfvbApi* | [**get_sfvb_element**](docs/SfvbApi.md#get_sfvb_element) | **GET** /sfvb/elements/{element_type} | Configuration schema and field card for one element type
|
|
531
|
+
*UltracartClient::SfvbApi* | [**get_sfvb_email**](docs/SfvbApi.md#get_sfvb_email) | **GET** /sfvb/storefronts/{storefront_oid}/emails/{email_uuid} | Get a flow or campaign email's subject and preview text
|
|
531
532
|
*UltracartClient::SfvbApi* | [**get_sfvb_events**](docs/SfvbApi.md#get_sfvb_events) | **GET** /sfvb/events | Replay events
|
|
532
533
|
*UltracartClient::SfvbApi* | [**get_sfvb_events_authorization**](docs/SfvbApi.md#get_sfvb_events_authorization) | **PUT** /sfvb/events/auth | Open the event stream
|
|
533
534
|
*UltracartClient::SfvbApi* | [**get_sfvb_experiment**](docs/SfvbApi.md#get_sfvb_experiment) | **GET** /sfvb/storefronts/{storefront_oid}/experiments/{experiment_oid} | Read one experiment and its statistics
|
|
@@ -656,6 +657,7 @@ Class | Method | HTTP request | Description
|
|
|
656
657
|
*UltracartClient::SfvbApi* | [**update_sfvb_blog_post**](docs/SfvbApi.md#update_sfvb_blog_post) | **PUT** /sfvb/storefronts/{storefront_oid}/blog_posts/{blog_post_oid} | Change a blog post
|
|
657
658
|
*UltracartClient::SfvbApi* | [**update_sfvb_comms_sending_domain**](docs/SfvbApi.md#update_sfvb_comms_sending_domain) | **PUT** /sfvb/comms/sending_domains/{domain} | Update a sending domain
|
|
658
659
|
*UltracartClient::SfvbApi* | [**update_sfvb_comms_twilio_account**](docs/SfvbApi.md#update_sfvb_comms_twilio_account) | **PUT** /sfvb/comms/twilio_account | Update the Twilio account
|
|
660
|
+
*UltracartClient::SfvbApi* | [**update_sfvb_email**](docs/SfvbApi.md#update_sfvb_email) | **PUT** /sfvb/storefronts/{storefront_oid}/emails/{email_uuid} | Change a flow or campaign email's subject or preview text
|
|
659
661
|
*UltracartClient::SfvbApi* | [**update_sfvb_item_attribute_batch**](docs/SfvbApi.md#update_sfvb_item_attribute_batch) | **POST** /sfvb/storefronts/{storefront_oid}/items/attributes/batch | Change attributes across many items in one call
|
|
660
662
|
*UltracartClient::SfvbApi* | [**update_sfvb_library_entry**](docs/SfvbApi.md#update_sfvb_library_entry) | **PUT** /sfvb/storefronts/{storefront_oid}/library/{library_oid} | Update a library entry's draft
|
|
661
663
|
*UltracartClient::SfvbApi* | [**update_sfvb_redirect**](docs/SfvbApi.md#update_sfvb_redirect) | **PUT** /sfvb/storefronts/{storefront_oid}/redirects/{redirect_id} | Change a redirect rule
|
|
@@ -1922,8 +1924,10 @@ Class | Method | HTTP request | Description
|
|
|
1922
1924
|
- [UltracartClient::SfvbElement](docs/SfvbElement.md)
|
|
1923
1925
|
- [UltracartClient::SfvbElementSchemaResponse](docs/SfvbElementSchemaResponse.md)
|
|
1924
1926
|
- [UltracartClient::SfvbElementsResponse](docs/SfvbElementsResponse.md)
|
|
1927
|
+
- [UltracartClient::SfvbEmail](docs/SfvbEmail.md)
|
|
1925
1928
|
- [UltracartClient::SfvbEmailRenderRequest](docs/SfvbEmailRenderRequest.md)
|
|
1926
1929
|
- [UltracartClient::SfvbEmailRenderResponse](docs/SfvbEmailRenderResponse.md)
|
|
1930
|
+
- [UltracartClient::SfvbEmailUpdateRequest](docs/SfvbEmailUpdateRequest.md)
|
|
1927
1931
|
- [UltracartClient::SfvbErrorDetail](docs/SfvbErrorDetail.md)
|
|
1928
1932
|
- [UltracartClient::SfvbEvent](docs/SfvbEvent.md)
|
|
1929
1933
|
- [UltracartClient::SfvbEventsAuthRequest](docs/SfvbEventsAuthRequest.md)
|
|
@@ -2297,6 +2301,7 @@ Not every change is committed to every SDK.
|
|
|
2297
2301
|
|
|
2298
2302
|
| Version | Date | Comments |
|
|
2299
2303
|
| --: | :-: | --- |
|
|
2304
|
+
| 4.1.208 | 10/26/2026 | sfvb internal testing |
|
|
2300
2305
|
| 4.1.207 | 10/16/2026 | sfvb internal testing |
|
|
2301
2306
|
| 4.1.206 | 10/16/2026 | sfvb internal testing |
|
|
2302
2307
|
| 4.1.205 | 10/15/2026 | sfvb internal testing |
|
data/docs/SfvbApi.md
CHANGED
|
@@ -56,6 +56,7 @@ All URIs are relative to *https://secure.ultracart.com/rest/v2*
|
|
|
56
56
|
| [**get_sfvb_container**](SfvbApi.md#get_sfvb_container) | **GET** /sfvb/storefronts/{storefront_oid}/containers/{owner_type}/{owner_object_id} | Read a container stored outside the file system |
|
|
57
57
|
| [**get_sfvb_container_version**](SfvbApi.md#get_sfvb_container_version) | **GET** /sfvb/storefronts/{storefront_oid}/container_versions/{container_history_oid} | Read the CJSON stored in one container history entry |
|
|
58
58
|
| [**get_sfvb_element**](SfvbApi.md#get_sfvb_element) | **GET** /sfvb/elements/{element_type} | Configuration schema and field card for one element type |
|
|
59
|
+
| [**get_sfvb_email**](SfvbApi.md#get_sfvb_email) | **GET** /sfvb/storefronts/{storefront_oid}/emails/{email_uuid} | Get a flow or campaign email's subject and preview text |
|
|
59
60
|
| [**get_sfvb_events**](SfvbApi.md#get_sfvb_events) | **GET** /sfvb/events | Replay events |
|
|
60
61
|
| [**get_sfvb_events_authorization**](SfvbApi.md#get_sfvb_events_authorization) | **PUT** /sfvb/events/auth | Open the event stream |
|
|
61
62
|
| [**get_sfvb_experiment**](SfvbApi.md#get_sfvb_experiment) | **GET** /sfvb/storefronts/{storefront_oid}/experiments/{experiment_oid} | Read one experiment and its statistics |
|
|
@@ -184,6 +185,7 @@ All URIs are relative to *https://secure.ultracart.com/rest/v2*
|
|
|
184
185
|
| [**update_sfvb_blog_post**](SfvbApi.md#update_sfvb_blog_post) | **PUT** /sfvb/storefronts/{storefront_oid}/blog_posts/{blog_post_oid} | Change a blog post |
|
|
185
186
|
| [**update_sfvb_comms_sending_domain**](SfvbApi.md#update_sfvb_comms_sending_domain) | **PUT** /sfvb/comms/sending_domains/{domain} | Update a sending domain |
|
|
186
187
|
| [**update_sfvb_comms_twilio_account**](SfvbApi.md#update_sfvb_comms_twilio_account) | **PUT** /sfvb/comms/twilio_account | Update the Twilio account |
|
|
188
|
+
| [**update_sfvb_email**](SfvbApi.md#update_sfvb_email) | **PUT** /sfvb/storefronts/{storefront_oid}/emails/{email_uuid} | Change a flow or campaign email's subject or preview text |
|
|
187
189
|
| [**update_sfvb_item_attribute_batch**](SfvbApi.md#update_sfvb_item_attribute_batch) | **POST** /sfvb/storefronts/{storefront_oid}/items/attributes/batch | Change attributes across many items in one call |
|
|
188
190
|
| [**update_sfvb_library_entry**](SfvbApi.md#update_sfvb_library_entry) | **PUT** /sfvb/storefronts/{storefront_oid}/library/{library_oid} | Update a library entry's draft |
|
|
189
191
|
| [**update_sfvb_redirect**](SfvbApi.md#update_sfvb_redirect) | **PUT** /sfvb/storefronts/{storefront_oid}/redirects/{redirect_id} | Change a redirect rule |
|
|
@@ -3015,6 +3017,60 @@ end
|
|
|
3015
3017
|
- **Accept**: application/json
|
|
3016
3018
|
|
|
3017
3019
|
|
|
3020
|
+
## get_sfvb_email
|
|
3021
|
+
|
|
3022
|
+
> <SfvbEmail> get_sfvb_email(storefront_oid, email_uuid)
|
|
3023
|
+
|
|
3024
|
+
Get a flow or campaign email's subject and preview text
|
|
3025
|
+
|
|
3026
|
+
The subject, preview text and hash_sha256 to send as If-Match when updating them, with whether the email is live and its review state. The body is the email container (owner type email). Find the uuid in the storefront's campaigns and flows.
|
|
3027
|
+
|
|
3028
|
+
|
|
3029
|
+
### Examples
|
|
3030
|
+
|
|
3031
|
+
|
|
3032
|
+
(No example for this operation).
|
|
3033
|
+
|
|
3034
|
+
|
|
3035
|
+
#### Using the get_sfvb_email_with_http_info variant
|
|
3036
|
+
|
|
3037
|
+
This returns an Array which contains the response data, status code and headers.
|
|
3038
|
+
|
|
3039
|
+
> <Array(<SfvbEmail>, Integer, Hash)> get_sfvb_email_with_http_info(storefront_oid, email_uuid)
|
|
3040
|
+
|
|
3041
|
+
```ruby
|
|
3042
|
+
begin
|
|
3043
|
+
# Get a flow or campaign email's subject and preview text
|
|
3044
|
+
data, status_code, headers = api_instance.get_sfvb_email_with_http_info(storefront_oid, email_uuid)
|
|
3045
|
+
p status_code # => 2xx
|
|
3046
|
+
p headers # => { ... }
|
|
3047
|
+
p data # => <SfvbEmail>
|
|
3048
|
+
rescue UltracartClient::ApiError => e
|
|
3049
|
+
puts "Error when calling SfvbApi->get_sfvb_email_with_http_info: #{e}"
|
|
3050
|
+
end
|
|
3051
|
+
```
|
|
3052
|
+
|
|
3053
|
+
### Parameters
|
|
3054
|
+
|
|
3055
|
+
| Name | Type | Description | Notes |
|
|
3056
|
+
| ---- | ---- | ----------- | ----- |
|
|
3057
|
+
| **storefront_oid** | **Integer** | | |
|
|
3058
|
+
| **email_uuid** | **String** | | |
|
|
3059
|
+
|
|
3060
|
+
### Return type
|
|
3061
|
+
|
|
3062
|
+
[**SfvbEmail**](SfvbEmail.md)
|
|
3063
|
+
|
|
3064
|
+
### Authorization
|
|
3065
|
+
|
|
3066
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
|
3067
|
+
|
|
3068
|
+
### HTTP request headers
|
|
3069
|
+
|
|
3070
|
+
- **Content-Type**: Not defined
|
|
3071
|
+
- **Accept**: application/json
|
|
3072
|
+
|
|
3073
|
+
|
|
3018
3074
|
## get_sfvb_events
|
|
3019
3075
|
|
|
3020
3076
|
> <SfvbEventsResponse> get_sfvb_events(opts)
|
|
@@ -10023,6 +10079,62 @@ end
|
|
|
10023
10079
|
- **Accept**: application/json
|
|
10024
10080
|
|
|
10025
10081
|
|
|
10082
|
+
## update_sfvb_email
|
|
10083
|
+
|
|
10084
|
+
> <SfvbEmail> update_sfvb_email(storefront_oid, email_uuid, if_match, email_update_request)
|
|
10085
|
+
|
|
10086
|
+
Change a flow or campaign email's subject or preview text
|
|
10087
|
+
|
|
10088
|
+
A field left out keeps its value. Each is 5 to 150 characters on one line. Send the hash_sha256 you read as If-Match. An email in a sending flow or campaign needs sfvb_publish, as a body push does. The merchant's content review rule applies, so an email waiting for review or rejected goes back to needing review. An email suspended for spam is refused with sfvb.email_suspended.
|
|
10089
|
+
|
|
10090
|
+
|
|
10091
|
+
### Examples
|
|
10092
|
+
|
|
10093
|
+
|
|
10094
|
+
(No example for this operation).
|
|
10095
|
+
|
|
10096
|
+
|
|
10097
|
+
#### Using the update_sfvb_email_with_http_info variant
|
|
10098
|
+
|
|
10099
|
+
This returns an Array which contains the response data, status code and headers.
|
|
10100
|
+
|
|
10101
|
+
> <Array(<SfvbEmail>, Integer, Hash)> update_sfvb_email_with_http_info(storefront_oid, email_uuid, if_match, email_update_request)
|
|
10102
|
+
|
|
10103
|
+
```ruby
|
|
10104
|
+
begin
|
|
10105
|
+
# Change a flow or campaign email's subject or preview text
|
|
10106
|
+
data, status_code, headers = api_instance.update_sfvb_email_with_http_info(storefront_oid, email_uuid, if_match, email_update_request)
|
|
10107
|
+
p status_code # => 2xx
|
|
10108
|
+
p headers # => { ... }
|
|
10109
|
+
p data # => <SfvbEmail>
|
|
10110
|
+
rescue UltracartClient::ApiError => e
|
|
10111
|
+
puts "Error when calling SfvbApi->update_sfvb_email_with_http_info: #{e}"
|
|
10112
|
+
end
|
|
10113
|
+
```
|
|
10114
|
+
|
|
10115
|
+
### Parameters
|
|
10116
|
+
|
|
10117
|
+
| Name | Type | Description | Notes |
|
|
10118
|
+
| ---- | ---- | ----------- | ----- |
|
|
10119
|
+
| **storefront_oid** | **Integer** | | |
|
|
10120
|
+
| **email_uuid** | **String** | | |
|
|
10121
|
+
| **if_match** | **String** | hash_sha256 from the last read. Required; 428 when absent, 412 when stale. | |
|
|
10122
|
+
| **email_update_request** | [**SfvbEmailUpdateRequest**](SfvbEmailUpdateRequest.md) | The subject or preview text to change | |
|
|
10123
|
+
|
|
10124
|
+
### Return type
|
|
10125
|
+
|
|
10126
|
+
[**SfvbEmail**](SfvbEmail.md)
|
|
10127
|
+
|
|
10128
|
+
### Authorization
|
|
10129
|
+
|
|
10130
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
|
10131
|
+
|
|
10132
|
+
### HTTP request headers
|
|
10133
|
+
|
|
10134
|
+
- **Content-Type**: application/json
|
|
10135
|
+
- **Accept**: application/json
|
|
10136
|
+
|
|
10137
|
+
|
|
10026
10138
|
## update_sfvb_item_attribute_batch
|
|
10027
10139
|
|
|
10028
10140
|
> <SfvbItemAttributeBatchResponse> update_sfvb_item_attribute_batch(storefront_oid, item_attribute_batch_request, opts)
|
data/docs/SfvbEmail.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# UltracartClient::SfvbEmail
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **container_last_modified_dts** | **String** | When the email container was last changed (ISO 8601, UTC). | [optional] |
|
|
8
|
+
| **email_uuid** | **String** | The email uuid. The same uuid the email container (owner type email) and the email render take. | [optional] |
|
|
9
|
+
| **hash_sha256** | **String** | Hash of the subject and preview text. Send it as If-Match when updating. A change to the email body does not change it. | [optional] |
|
|
10
|
+
| **live** | **Boolean** | True when the email is in a flow or campaign that is sending, so a change reaches customers and needs sfvb_publish. An email in neither is reported live. | [optional] |
|
|
11
|
+
| **pending_review** | **Boolean** | True while a change waits for review. An edit puts it back to needing review. | [optional] |
|
|
12
|
+
| **preview_text** | **String** | The preview text an inbox shows after the subject. | [optional] |
|
|
13
|
+
| **rejected** | **Boolean** | True when review rejected the email. An edit puts it back to needing review. | [optional] |
|
|
14
|
+
| **requires_review** | **Boolean** | True when a change to this email must be reviewed before it sends. | [optional] |
|
|
15
|
+
| **subject** | **String** | The subject line. Merge tokens such as firstName are filled in at send. | [optional] |
|
|
16
|
+
| **suspended_for_spam** | **Boolean** | True when UltraCart suspended the email for spam. Edits are refused until the merchant resolves it with UltraCart support. | [optional] |
|
|
17
|
+
| **transactional** | **Boolean** | True for a transactional email, which skips the marketing footer rules. | [optional] |
|
|
18
|
+
| **version** | **Integer** | The email version. Every save adds one. | [optional] |
|
|
19
|
+
|
|
20
|
+
## Example
|
|
21
|
+
|
|
22
|
+
```ruby
|
|
23
|
+
require 'ultracart_api'
|
|
24
|
+
|
|
25
|
+
instance = UltracartClient::SfvbEmail.new(
|
|
26
|
+
container_last_modified_dts: null,
|
|
27
|
+
email_uuid: null,
|
|
28
|
+
hash_sha256: null,
|
|
29
|
+
live: null,
|
|
30
|
+
pending_review: null,
|
|
31
|
+
preview_text: null,
|
|
32
|
+
rejected: null,
|
|
33
|
+
requires_review: null,
|
|
34
|
+
subject: null,
|
|
35
|
+
suspended_for_spam: null,
|
|
36
|
+
transactional: null,
|
|
37
|
+
version: null
|
|
38
|
+
)
|
|
39
|
+
```
|
|
40
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# UltracartClient::SfvbEmailUpdateRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **preview_text** | **String** | The new preview text, 5 to 150 characters on one line. | [optional] |
|
|
8
|
+
| **subject** | **String** | The new subject line, 5 to 150 characters on one line. Merge tokens such as firstName are filled in at send. | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'ultracart_api'
|
|
14
|
+
|
|
15
|
+
instance = UltracartClient::SfvbEmailUpdateRequest.new(
|
|
16
|
+
preview_text: null,
|
|
17
|
+
subject: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -3797,6 +3797,76 @@ module UltracartClient
|
|
|
3797
3797
|
return data, status_code, headers
|
|
3798
3798
|
end
|
|
3799
3799
|
|
|
3800
|
+
# Get a flow or campaign email's subject and preview text
|
|
3801
|
+
# The subject, preview text and hash_sha256 to send as If-Match when updating them, with whether the email is live and its review state. The body is the email container (owner type email). Find the uuid in the storefront's campaigns and flows.
|
|
3802
|
+
# @param storefront_oid [Integer]
|
|
3803
|
+
# @param email_uuid [String]
|
|
3804
|
+
# @param [Hash] opts the optional parameters
|
|
3805
|
+
# @return [SfvbEmail]
|
|
3806
|
+
def get_sfvb_email(storefront_oid, email_uuid, opts = {})
|
|
3807
|
+
data, _status_code, _headers = get_sfvb_email_with_http_info(storefront_oid, email_uuid, opts)
|
|
3808
|
+
data
|
|
3809
|
+
end
|
|
3810
|
+
|
|
3811
|
+
# Get a flow or campaign email's subject and preview text
|
|
3812
|
+
# The subject, preview text and hash_sha256 to send as If-Match when updating them, with whether the email is live and its review state. The body is the email container (owner type email). Find the uuid in the storefront's campaigns and flows.
|
|
3813
|
+
# @param storefront_oid [Integer]
|
|
3814
|
+
# @param email_uuid [String]
|
|
3815
|
+
# @param [Hash] opts the optional parameters
|
|
3816
|
+
# @return [Array<(SfvbEmail, Integer, Hash)>] SfvbEmail data, response status code and response headers
|
|
3817
|
+
def get_sfvb_email_with_http_info(storefront_oid, email_uuid, opts = {})
|
|
3818
|
+
if @api_client.config.debugging
|
|
3819
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_email ...'
|
|
3820
|
+
end
|
|
3821
|
+
# verify the required parameter 'storefront_oid' is set
|
|
3822
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
3823
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.get_sfvb_email"
|
|
3824
|
+
end
|
|
3825
|
+
# verify the required parameter 'email_uuid' is set
|
|
3826
|
+
if @api_client.config.client_side_validation && email_uuid.nil?
|
|
3827
|
+
fail ArgumentError, "Missing the required parameter 'email_uuid' when calling SfvbApi.get_sfvb_email"
|
|
3828
|
+
end
|
|
3829
|
+
# resource path
|
|
3830
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/emails/{email_uuid}'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'email_uuid' + '}', CGI.escape(email_uuid.to_s))
|
|
3831
|
+
|
|
3832
|
+
# query parameters
|
|
3833
|
+
query_params = opts[:query_params] || {}
|
|
3834
|
+
|
|
3835
|
+
# header parameters
|
|
3836
|
+
header_params = opts[:header_params] || {}
|
|
3837
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
3838
|
+
# HTTP header 'Accept' (if needed)
|
|
3839
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
3840
|
+
|
|
3841
|
+
# form parameters
|
|
3842
|
+
form_params = opts[:form_params] || {}
|
|
3843
|
+
|
|
3844
|
+
# http body (model)
|
|
3845
|
+
post_body = opts[:debug_body]
|
|
3846
|
+
|
|
3847
|
+
# return_type
|
|
3848
|
+
return_type = opts[:debug_return_type] || 'SfvbEmail'
|
|
3849
|
+
|
|
3850
|
+
# auth_names
|
|
3851
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
3852
|
+
|
|
3853
|
+
new_options = opts.merge(
|
|
3854
|
+
:operation => :"SfvbApi.get_sfvb_email",
|
|
3855
|
+
:header_params => header_params,
|
|
3856
|
+
:query_params => query_params,
|
|
3857
|
+
:form_params => form_params,
|
|
3858
|
+
:body => post_body,
|
|
3859
|
+
:auth_names => auth_names,
|
|
3860
|
+
:return_type => return_type
|
|
3861
|
+
)
|
|
3862
|
+
|
|
3863
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
3864
|
+
if @api_client.config.debugging
|
|
3865
|
+
@api_client.config.logger.debug "API called: SfvbApi#get_sfvb_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3866
|
+
end
|
|
3867
|
+
return data, status_code, headers
|
|
3868
|
+
end
|
|
3869
|
+
|
|
3800
3870
|
# Replay events
|
|
3801
3871
|
# The signed-in person's events after the cursor, oldest first. Events are kept 72 hours; an older cursor returns resync_required, and then the caller re-lists what it was waiting on. Events about one sign-in's requests, such as approvals, are only returned to that sign-in. limit is 1 to 500, default 100.
|
|
3802
3872
|
# @param [Hash] opts the optional parameters
|
|
@@ -13273,6 +13343,94 @@ module UltracartClient
|
|
|
13273
13343
|
return data, status_code, headers
|
|
13274
13344
|
end
|
|
13275
13345
|
|
|
13346
|
+
# Change a flow or campaign email's subject or preview text
|
|
13347
|
+
# A field left out keeps its value. Each is 5 to 150 characters on one line. Send the hash_sha256 you read as If-Match. An email in a sending flow or campaign needs sfvb_publish, as a body push does. The merchant's content review rule applies, so an email waiting for review or rejected goes back to needing review. An email suspended for spam is refused with sfvb.email_suspended.
|
|
13348
|
+
# @param storefront_oid [Integer]
|
|
13349
|
+
# @param email_uuid [String]
|
|
13350
|
+
# @param if_match [String] hash_sha256 from the last read. Required; 428 when absent, 412 when stale.
|
|
13351
|
+
# @param email_update_request [SfvbEmailUpdateRequest] The subject or preview text to change
|
|
13352
|
+
# @param [Hash] opts the optional parameters
|
|
13353
|
+
# @return [SfvbEmail]
|
|
13354
|
+
def update_sfvb_email(storefront_oid, email_uuid, if_match, email_update_request, opts = {})
|
|
13355
|
+
data, _status_code, _headers = update_sfvb_email_with_http_info(storefront_oid, email_uuid, if_match, email_update_request, opts)
|
|
13356
|
+
data
|
|
13357
|
+
end
|
|
13358
|
+
|
|
13359
|
+
# Change a flow or campaign email's subject or preview text
|
|
13360
|
+
# A field left out keeps its value. Each is 5 to 150 characters on one line. Send the hash_sha256 you read as If-Match. An email in a sending flow or campaign needs sfvb_publish, as a body push does. The merchant's content review rule applies, so an email waiting for review or rejected goes back to needing review. An email suspended for spam is refused with sfvb.email_suspended.
|
|
13361
|
+
# @param storefront_oid [Integer]
|
|
13362
|
+
# @param email_uuid [String]
|
|
13363
|
+
# @param if_match [String] hash_sha256 from the last read. Required; 428 when absent, 412 when stale.
|
|
13364
|
+
# @param email_update_request [SfvbEmailUpdateRequest] The subject or preview text to change
|
|
13365
|
+
# @param [Hash] opts the optional parameters
|
|
13366
|
+
# @return [Array<(SfvbEmail, Integer, Hash)>] SfvbEmail data, response status code and response headers
|
|
13367
|
+
def update_sfvb_email_with_http_info(storefront_oid, email_uuid, if_match, email_update_request, opts = {})
|
|
13368
|
+
if @api_client.config.debugging
|
|
13369
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.update_sfvb_email ...'
|
|
13370
|
+
end
|
|
13371
|
+
# verify the required parameter 'storefront_oid' is set
|
|
13372
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
13373
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.update_sfvb_email"
|
|
13374
|
+
end
|
|
13375
|
+
# verify the required parameter 'email_uuid' is set
|
|
13376
|
+
if @api_client.config.client_side_validation && email_uuid.nil?
|
|
13377
|
+
fail ArgumentError, "Missing the required parameter 'email_uuid' when calling SfvbApi.update_sfvb_email"
|
|
13378
|
+
end
|
|
13379
|
+
# verify the required parameter 'if_match' is set
|
|
13380
|
+
if @api_client.config.client_side_validation && if_match.nil?
|
|
13381
|
+
fail ArgumentError, "Missing the required parameter 'if_match' when calling SfvbApi.update_sfvb_email"
|
|
13382
|
+
end
|
|
13383
|
+
# verify the required parameter 'email_update_request' is set
|
|
13384
|
+
if @api_client.config.client_side_validation && email_update_request.nil?
|
|
13385
|
+
fail ArgumentError, "Missing the required parameter 'email_update_request' when calling SfvbApi.update_sfvb_email"
|
|
13386
|
+
end
|
|
13387
|
+
# resource path
|
|
13388
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/emails/{email_uuid}'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'email_uuid' + '}', CGI.escape(email_uuid.to_s))
|
|
13389
|
+
|
|
13390
|
+
# query parameters
|
|
13391
|
+
query_params = opts[:query_params] || {}
|
|
13392
|
+
|
|
13393
|
+
# header parameters
|
|
13394
|
+
header_params = opts[:header_params] || {}
|
|
13395
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
13396
|
+
# HTTP header 'Accept' (if needed)
|
|
13397
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
13398
|
+
# HTTP header 'Content-Type'
|
|
13399
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
13400
|
+
if !content_type.nil?
|
|
13401
|
+
header_params['Content-Type'] = content_type
|
|
13402
|
+
end
|
|
13403
|
+
header_params[:'If-Match'] = if_match
|
|
13404
|
+
|
|
13405
|
+
# form parameters
|
|
13406
|
+
form_params = opts[:form_params] || {}
|
|
13407
|
+
|
|
13408
|
+
# http body (model)
|
|
13409
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(email_update_request)
|
|
13410
|
+
|
|
13411
|
+
# return_type
|
|
13412
|
+
return_type = opts[:debug_return_type] || 'SfvbEmail'
|
|
13413
|
+
|
|
13414
|
+
# auth_names
|
|
13415
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
13416
|
+
|
|
13417
|
+
new_options = opts.merge(
|
|
13418
|
+
:operation => :"SfvbApi.update_sfvb_email",
|
|
13419
|
+
:header_params => header_params,
|
|
13420
|
+
:query_params => query_params,
|
|
13421
|
+
:form_params => form_params,
|
|
13422
|
+
:body => post_body,
|
|
13423
|
+
:auth_names => auth_names,
|
|
13424
|
+
:return_type => return_type
|
|
13425
|
+
)
|
|
13426
|
+
|
|
13427
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
13428
|
+
if @api_client.config.debugging
|
|
13429
|
+
@api_client.config.logger.debug "API called: SfvbApi#update_sfvb_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
13430
|
+
end
|
|
13431
|
+
return data, status_code, headers
|
|
13432
|
+
end
|
|
13433
|
+
|
|
13276
13434
|
# Change attributes across many items in one call
|
|
13277
13435
|
# Applies exactly the change rows of a dry run, given its plan_hash, each with its merchant_item_oid and current_sha256. Each item is saved once with all of its rows; a row whose value changed since the dry run is skipped as stale and never overwritten, and an item that cannot be saved does not stop the others. Only the named attributes change. Needs sfvb_publish and the approval of the person who signed in the CLI, an approved item.attribute_batch request for exactly these rows in the Approval-Id header.
|
|
13278
13436
|
# @param storefront_oid [Integer]
|
|
@@ -139,7 +139,7 @@ module UltracartClient
|
|
|
139
139
|
# Check to see if the all the properties in the model are valid
|
|
140
140
|
# @return true if the model is valid
|
|
141
141
|
def valid?
|
|
142
|
-
provider_name_validator = EnumAttributeValidator.new('String', ["ActiveCampaign", "AWeber", "Campaign Monitor", "ConstantContact", "Emma", "GetResponse", "iContact", "Klaviyo", "
|
|
142
|
+
provider_name_validator = EnumAttributeValidator.new('String', ["ActiveCampaign", "AWeber", "Campaign Monitor", "ConstantContact", "Emma", "GetResponse", "iContact", "Klaviyo", "MailChimp"])
|
|
143
143
|
return false unless provider_name_validator.valid?(@provider_name)
|
|
144
144
|
true
|
|
145
145
|
end
|
|
@@ -147,7 +147,7 @@ module UltracartClient
|
|
|
147
147
|
# Custom attribute writer method checking allowed values (enum).
|
|
148
148
|
# @param [Object] provider_name Object to be assigned
|
|
149
149
|
def provider_name=(provider_name)
|
|
150
|
-
validator = EnumAttributeValidator.new('String', ["ActiveCampaign", "AWeber", "Campaign Monitor", "ConstantContact", "Emma", "GetResponse", "iContact", "Klaviyo", "
|
|
150
|
+
validator = EnumAttributeValidator.new('String', ["ActiveCampaign", "AWeber", "Campaign Monitor", "ConstantContact", "Emma", "GetResponse", "iContact", "Klaviyo", "MailChimp"])
|
|
151
151
|
unless validator.valid?(provider_name)
|
|
152
152
|
fail ArgumentError, "invalid value for \"provider_name\", must be one of #{validator.allowable_values}."
|
|
153
153
|
end
|
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#UltraCart Rest API V2
|
|
3
|
+
|
|
4
|
+
#UltraCart REST API Version 2
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
|
7
|
+
Contact: support@ultracart.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
OpenAPI Generator version: 6.0.1-SNAPSHOT
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module UltracartClient
|
|
17
|
+
class SfvbEmail
|
|
18
|
+
# When the email container was last changed (ISO 8601, UTC).
|
|
19
|
+
attr_accessor :container_last_modified_dts
|
|
20
|
+
|
|
21
|
+
# The email uuid. The same uuid the email container (owner type email) and the email render take.
|
|
22
|
+
attr_accessor :email_uuid
|
|
23
|
+
|
|
24
|
+
# Hash of the subject and preview text. Send it as If-Match when updating. A change to the email body does not change it.
|
|
25
|
+
attr_accessor :hash_sha256
|
|
26
|
+
|
|
27
|
+
# True when the email is in a flow or campaign that is sending, so a change reaches customers and needs sfvb_publish. An email in neither is reported live.
|
|
28
|
+
attr_accessor :live
|
|
29
|
+
|
|
30
|
+
# True while a change waits for review. An edit puts it back to needing review.
|
|
31
|
+
attr_accessor :pending_review
|
|
32
|
+
|
|
33
|
+
# The preview text an inbox shows after the subject.
|
|
34
|
+
attr_accessor :preview_text
|
|
35
|
+
|
|
36
|
+
# True when review rejected the email. An edit puts it back to needing review.
|
|
37
|
+
attr_accessor :rejected
|
|
38
|
+
|
|
39
|
+
# True when a change to this email must be reviewed before it sends.
|
|
40
|
+
attr_accessor :requires_review
|
|
41
|
+
|
|
42
|
+
# The subject line. Merge tokens such as firstName are filled in at send.
|
|
43
|
+
attr_accessor :subject
|
|
44
|
+
|
|
45
|
+
# True when UltraCart suspended the email for spam. Edits are refused until the merchant resolves it with UltraCart support.
|
|
46
|
+
attr_accessor :suspended_for_spam
|
|
47
|
+
|
|
48
|
+
# True for a transactional email, which skips the marketing footer rules.
|
|
49
|
+
attr_accessor :transactional
|
|
50
|
+
|
|
51
|
+
# The email version. Every save adds one.
|
|
52
|
+
attr_accessor :version
|
|
53
|
+
|
|
54
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
55
|
+
def self.attribute_map
|
|
56
|
+
{
|
|
57
|
+
:'container_last_modified_dts' => :'container_last_modified_dts',
|
|
58
|
+
:'email_uuid' => :'email_uuid',
|
|
59
|
+
:'hash_sha256' => :'hash_sha256',
|
|
60
|
+
:'live' => :'live',
|
|
61
|
+
:'pending_review' => :'pending_review',
|
|
62
|
+
:'preview_text' => :'preview_text',
|
|
63
|
+
:'rejected' => :'rejected',
|
|
64
|
+
:'requires_review' => :'requires_review',
|
|
65
|
+
:'subject' => :'subject',
|
|
66
|
+
:'suspended_for_spam' => :'suspended_for_spam',
|
|
67
|
+
:'transactional' => :'transactional',
|
|
68
|
+
:'version' => :'version'
|
|
69
|
+
}
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# Returns all the JSON keys this model knows about
|
|
73
|
+
def self.acceptable_attributes
|
|
74
|
+
attribute_map.values
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Attribute type mapping.
|
|
78
|
+
def self.openapi_types
|
|
79
|
+
{
|
|
80
|
+
:'container_last_modified_dts' => :'String',
|
|
81
|
+
:'email_uuid' => :'String',
|
|
82
|
+
:'hash_sha256' => :'String',
|
|
83
|
+
:'live' => :'Boolean',
|
|
84
|
+
:'pending_review' => :'Boolean',
|
|
85
|
+
:'preview_text' => :'String',
|
|
86
|
+
:'rejected' => :'Boolean',
|
|
87
|
+
:'requires_review' => :'Boolean',
|
|
88
|
+
:'subject' => :'String',
|
|
89
|
+
:'suspended_for_spam' => :'Boolean',
|
|
90
|
+
:'transactional' => :'Boolean',
|
|
91
|
+
:'version' => :'Integer'
|
|
92
|
+
}
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# List of attributes with nullable: true
|
|
96
|
+
def self.openapi_nullable
|
|
97
|
+
Set.new([
|
|
98
|
+
])
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Initializes the object
|
|
102
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
103
|
+
def initialize(attributes = {})
|
|
104
|
+
if (!attributes.is_a?(Hash))
|
|
105
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbEmail` initialize method"
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
109
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
110
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
111
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbEmail`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
112
|
+
end
|
|
113
|
+
h[k.to_sym] = v
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
if attributes.key?(:'container_last_modified_dts')
|
|
117
|
+
self.container_last_modified_dts = attributes[:'container_last_modified_dts']
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
if attributes.key?(:'email_uuid')
|
|
121
|
+
self.email_uuid = attributes[:'email_uuid']
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
if attributes.key?(:'hash_sha256')
|
|
125
|
+
self.hash_sha256 = attributes[:'hash_sha256']
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
if attributes.key?(:'live')
|
|
129
|
+
self.live = attributes[:'live']
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
if attributes.key?(:'pending_review')
|
|
133
|
+
self.pending_review = attributes[:'pending_review']
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
if attributes.key?(:'preview_text')
|
|
137
|
+
self.preview_text = attributes[:'preview_text']
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
if attributes.key?(:'rejected')
|
|
141
|
+
self.rejected = attributes[:'rejected']
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
if attributes.key?(:'requires_review')
|
|
145
|
+
self.requires_review = attributes[:'requires_review']
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
if attributes.key?(:'subject')
|
|
149
|
+
self.subject = attributes[:'subject']
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
if attributes.key?(:'suspended_for_spam')
|
|
153
|
+
self.suspended_for_spam = attributes[:'suspended_for_spam']
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
if attributes.key?(:'transactional')
|
|
157
|
+
self.transactional = attributes[:'transactional']
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
if attributes.key?(:'version')
|
|
161
|
+
self.version = attributes[:'version']
|
|
162
|
+
end
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
166
|
+
# @return Array for valid properties with the reasons
|
|
167
|
+
def list_invalid_properties
|
|
168
|
+
invalid_properties = Array.new
|
|
169
|
+
invalid_properties
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
# Check to see if the all the properties in the model are valid
|
|
173
|
+
# @return true if the model is valid
|
|
174
|
+
def valid?
|
|
175
|
+
true
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# Checks equality by comparing each attribute.
|
|
179
|
+
# @param [Object] Object to be compared
|
|
180
|
+
def ==(o)
|
|
181
|
+
return true if self.equal?(o)
|
|
182
|
+
self.class == o.class &&
|
|
183
|
+
container_last_modified_dts == o.container_last_modified_dts &&
|
|
184
|
+
email_uuid == o.email_uuid &&
|
|
185
|
+
hash_sha256 == o.hash_sha256 &&
|
|
186
|
+
live == o.live &&
|
|
187
|
+
pending_review == o.pending_review &&
|
|
188
|
+
preview_text == o.preview_text &&
|
|
189
|
+
rejected == o.rejected &&
|
|
190
|
+
requires_review == o.requires_review &&
|
|
191
|
+
subject == o.subject &&
|
|
192
|
+
suspended_for_spam == o.suspended_for_spam &&
|
|
193
|
+
transactional == o.transactional &&
|
|
194
|
+
version == o.version
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
# @see the `==` method
|
|
198
|
+
# @param [Object] Object to be compared
|
|
199
|
+
def eql?(o)
|
|
200
|
+
self == o
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
# Calculates hash code according to all attributes.
|
|
204
|
+
# @return [Integer] Hash code
|
|
205
|
+
def hash
|
|
206
|
+
[container_last_modified_dts, email_uuid, hash_sha256, live, pending_review, preview_text, rejected, requires_review, subject, suspended_for_spam, transactional, version].hash
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
# Builds the object from hash
|
|
210
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
211
|
+
# @return [Object] Returns the model itself
|
|
212
|
+
def self.build_from_hash(attributes)
|
|
213
|
+
new.build_from_hash(attributes)
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
# Builds the object from hash
|
|
217
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
218
|
+
# @return [Object] Returns the model itself
|
|
219
|
+
def build_from_hash(attributes)
|
|
220
|
+
return nil unless attributes.is_a?(Hash)
|
|
221
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
222
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
223
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
224
|
+
self.send("#{key}=", nil)
|
|
225
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
226
|
+
# check to ensure the input is an array given that the attribute
|
|
227
|
+
# is documented as an array but the input is not
|
|
228
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
229
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
230
|
+
end
|
|
231
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
232
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
233
|
+
end
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
self
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
# Deserializes the data based on type
|
|
240
|
+
# @param string type Data type
|
|
241
|
+
# @param string value Value to be deserialized
|
|
242
|
+
# @return [Object] Deserialized data
|
|
243
|
+
def _deserialize(type, value)
|
|
244
|
+
case type.to_sym
|
|
245
|
+
when :Time
|
|
246
|
+
Time.parse(value)
|
|
247
|
+
when :Date
|
|
248
|
+
Date.parse(value)
|
|
249
|
+
when :String
|
|
250
|
+
value.to_s
|
|
251
|
+
when :Integer
|
|
252
|
+
value.to_i
|
|
253
|
+
when :Float
|
|
254
|
+
value.to_f
|
|
255
|
+
when :Boolean
|
|
256
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
257
|
+
true
|
|
258
|
+
else
|
|
259
|
+
false
|
|
260
|
+
end
|
|
261
|
+
when :Object
|
|
262
|
+
# generic object (usually a Hash), return directly
|
|
263
|
+
value
|
|
264
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
265
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
266
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
267
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
268
|
+
k_type = Regexp.last_match[:k_type]
|
|
269
|
+
v_type = Regexp.last_match[:v_type]
|
|
270
|
+
{}.tap do |hash|
|
|
271
|
+
value.each do |k, v|
|
|
272
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
273
|
+
end
|
|
274
|
+
end
|
|
275
|
+
else # model
|
|
276
|
+
# models (e.g. Pet) or oneOf
|
|
277
|
+
klass = UltracartClient.const_get(type)
|
|
278
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
279
|
+
end
|
|
280
|
+
end
|
|
281
|
+
|
|
282
|
+
# Returns the string representation of the object
|
|
283
|
+
# @return [String] String presentation of the object
|
|
284
|
+
def to_s
|
|
285
|
+
to_hash.to_s
|
|
286
|
+
end
|
|
287
|
+
|
|
288
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
289
|
+
# @return [Hash] Returns the object in the form of hash
|
|
290
|
+
def to_body
|
|
291
|
+
to_hash
|
|
292
|
+
end
|
|
293
|
+
|
|
294
|
+
# Returns the object in the form of hash
|
|
295
|
+
# @return [Hash] Returns the object in the form of hash
|
|
296
|
+
def to_hash
|
|
297
|
+
hash = {}
|
|
298
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
299
|
+
value = self.send(attr)
|
|
300
|
+
if value.nil?
|
|
301
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
302
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
303
|
+
end
|
|
304
|
+
|
|
305
|
+
hash[param] = _to_hash(value)
|
|
306
|
+
end
|
|
307
|
+
hash
|
|
308
|
+
end
|
|
309
|
+
|
|
310
|
+
# Outputs non-array value in the form of hash
|
|
311
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
312
|
+
# @param [Object] value Any valid value
|
|
313
|
+
# @return [Hash] Returns the value in the form of hash
|
|
314
|
+
def _to_hash(value)
|
|
315
|
+
if value.is_a?(Array)
|
|
316
|
+
value.compact.map { |v| _to_hash(v) }
|
|
317
|
+
elsif value.is_a?(Hash)
|
|
318
|
+
{}.tap do |hash|
|
|
319
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
320
|
+
end
|
|
321
|
+
elsif value.respond_to? :to_hash
|
|
322
|
+
value.to_hash
|
|
323
|
+
else
|
|
324
|
+
value
|
|
325
|
+
end
|
|
326
|
+
end
|
|
327
|
+
|
|
328
|
+
end
|
|
329
|
+
|
|
330
|
+
end
|
|
@@ -0,0 +1,230 @@
|
|
|
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 SfvbEmailUpdateRequest
|
|
18
|
+
# The new preview text, 5 to 150 characters on one line.
|
|
19
|
+
attr_accessor :preview_text
|
|
20
|
+
|
|
21
|
+
# The new subject line, 5 to 150 characters on one line. Merge tokens such as firstName are filled in at send.
|
|
22
|
+
attr_accessor :subject
|
|
23
|
+
|
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
+
def self.attribute_map
|
|
26
|
+
{
|
|
27
|
+
:'preview_text' => :'preview_text',
|
|
28
|
+
:'subject' => :'subject'
|
|
29
|
+
}
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Returns all the JSON keys this model knows about
|
|
33
|
+
def self.acceptable_attributes
|
|
34
|
+
attribute_map.values
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Attribute type mapping.
|
|
38
|
+
def self.openapi_types
|
|
39
|
+
{
|
|
40
|
+
:'preview_text' => :'String',
|
|
41
|
+
:'subject' => :'String'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# List of attributes with nullable: true
|
|
46
|
+
def self.openapi_nullable
|
|
47
|
+
Set.new([
|
|
48
|
+
])
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Initializes the object
|
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
53
|
+
def initialize(attributes = {})
|
|
54
|
+
if (!attributes.is_a?(Hash))
|
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbEmailUpdateRequest` initialize method"
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
59
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
60
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
61
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbEmailUpdateRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
62
|
+
end
|
|
63
|
+
h[k.to_sym] = v
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if attributes.key?(:'preview_text')
|
|
67
|
+
self.preview_text = attributes[:'preview_text']
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
if attributes.key?(:'subject')
|
|
71
|
+
self.subject = attributes[:'subject']
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
76
|
+
# @return Array for valid properties with the reasons
|
|
77
|
+
def list_invalid_properties
|
|
78
|
+
invalid_properties = Array.new
|
|
79
|
+
invalid_properties
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Check to see if the all the properties in the model are valid
|
|
83
|
+
# @return true if the model is valid
|
|
84
|
+
def valid?
|
|
85
|
+
true
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Checks equality by comparing each attribute.
|
|
89
|
+
# @param [Object] Object to be compared
|
|
90
|
+
def ==(o)
|
|
91
|
+
return true if self.equal?(o)
|
|
92
|
+
self.class == o.class &&
|
|
93
|
+
preview_text == o.preview_text &&
|
|
94
|
+
subject == o.subject
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# @see the `==` method
|
|
98
|
+
# @param [Object] Object to be compared
|
|
99
|
+
def eql?(o)
|
|
100
|
+
self == o
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Calculates hash code according to all attributes.
|
|
104
|
+
# @return [Integer] Hash code
|
|
105
|
+
def hash
|
|
106
|
+
[preview_text, subject].hash
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Builds the object from hash
|
|
110
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
111
|
+
# @return [Object] Returns the model itself
|
|
112
|
+
def self.build_from_hash(attributes)
|
|
113
|
+
new.build_from_hash(attributes)
|
|
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 build_from_hash(attributes)
|
|
120
|
+
return nil unless attributes.is_a?(Hash)
|
|
121
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
122
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
123
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
124
|
+
self.send("#{key}=", nil)
|
|
125
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
126
|
+
# check to ensure the input is an array given that the attribute
|
|
127
|
+
# is documented as an array but the input is not
|
|
128
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
129
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
130
|
+
end
|
|
131
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
132
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
133
|
+
end
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
self
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# Deserializes the data based on type
|
|
140
|
+
# @param string type Data type
|
|
141
|
+
# @param string value Value to be deserialized
|
|
142
|
+
# @return [Object] Deserialized data
|
|
143
|
+
def _deserialize(type, value)
|
|
144
|
+
case type.to_sym
|
|
145
|
+
when :Time
|
|
146
|
+
Time.parse(value)
|
|
147
|
+
when :Date
|
|
148
|
+
Date.parse(value)
|
|
149
|
+
when :String
|
|
150
|
+
value.to_s
|
|
151
|
+
when :Integer
|
|
152
|
+
value.to_i
|
|
153
|
+
when :Float
|
|
154
|
+
value.to_f
|
|
155
|
+
when :Boolean
|
|
156
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
157
|
+
true
|
|
158
|
+
else
|
|
159
|
+
false
|
|
160
|
+
end
|
|
161
|
+
when :Object
|
|
162
|
+
# generic object (usually a Hash), return directly
|
|
163
|
+
value
|
|
164
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
165
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
166
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
167
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
168
|
+
k_type = Regexp.last_match[:k_type]
|
|
169
|
+
v_type = Regexp.last_match[:v_type]
|
|
170
|
+
{}.tap do |hash|
|
|
171
|
+
value.each do |k, v|
|
|
172
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
173
|
+
end
|
|
174
|
+
end
|
|
175
|
+
else # model
|
|
176
|
+
# models (e.g. Pet) or oneOf
|
|
177
|
+
klass = UltracartClient.const_get(type)
|
|
178
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
179
|
+
end
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# Returns the string representation of the object
|
|
183
|
+
# @return [String] String presentation of the object
|
|
184
|
+
def to_s
|
|
185
|
+
to_hash.to_s
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
189
|
+
# @return [Hash] Returns the object in the form of hash
|
|
190
|
+
def to_body
|
|
191
|
+
to_hash
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
# Returns the object in the form of hash
|
|
195
|
+
# @return [Hash] Returns the object in the form of hash
|
|
196
|
+
def to_hash
|
|
197
|
+
hash = {}
|
|
198
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
199
|
+
value = self.send(attr)
|
|
200
|
+
if value.nil?
|
|
201
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
202
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
hash[param] = _to_hash(value)
|
|
206
|
+
end
|
|
207
|
+
hash
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
# Outputs non-array value in the form of hash
|
|
211
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
212
|
+
# @param [Object] value Any valid value
|
|
213
|
+
# @return [Hash] Returns the value in the form of hash
|
|
214
|
+
def _to_hash(value)
|
|
215
|
+
if value.is_a?(Array)
|
|
216
|
+
value.compact.map { |v| _to_hash(v) }
|
|
217
|
+
elsif value.is_a?(Hash)
|
|
218
|
+
{}.tap do |hash|
|
|
219
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
220
|
+
end
|
|
221
|
+
elsif value.respond_to? :to_hash
|
|
222
|
+
value.to_hash
|
|
223
|
+
else
|
|
224
|
+
value
|
|
225
|
+
end
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
end
|
data/lib/ultracart_api.rb
CHANGED
|
@@ -1015,8 +1015,10 @@ require 'ultracart_api/models/sfvb_container_write_request'
|
|
|
1015
1015
|
require 'ultracart_api/models/sfvb_element'
|
|
1016
1016
|
require 'ultracart_api/models/sfvb_element_schema_response'
|
|
1017
1017
|
require 'ultracart_api/models/sfvb_elements_response'
|
|
1018
|
+
require 'ultracart_api/models/sfvb_email'
|
|
1018
1019
|
require 'ultracart_api/models/sfvb_email_render_request'
|
|
1019
1020
|
require 'ultracart_api/models/sfvb_email_render_response'
|
|
1021
|
+
require 'ultracart_api/models/sfvb_email_update_request'
|
|
1020
1022
|
require 'ultracart_api/models/sfvb_error_detail'
|
|
1021
1023
|
require 'ultracart_api/models/sfvb_event'
|
|
1022
1024
|
require 'ultracart_api/models/sfvb_events_auth_request'
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ultracart_api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.1.
|
|
4
|
+
version: 4.1.208
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- UltraCart
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-10-
|
|
11
|
+
date: 2026-10-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: typhoeus
|
|
@@ -1077,8 +1077,10 @@ files:
|
|
|
1077
1077
|
- docs/SfvbElement.md
|
|
1078
1078
|
- docs/SfvbElementSchemaResponse.md
|
|
1079
1079
|
- docs/SfvbElementsResponse.md
|
|
1080
|
+
- docs/SfvbEmail.md
|
|
1080
1081
|
- docs/SfvbEmailRenderRequest.md
|
|
1081
1082
|
- docs/SfvbEmailRenderResponse.md
|
|
1083
|
+
- docs/SfvbEmailUpdateRequest.md
|
|
1082
1084
|
- docs/SfvbErrorDetail.md
|
|
1083
1085
|
- docs/SfvbEvent.md
|
|
1084
1086
|
- docs/SfvbEventsAuthRequest.md
|
|
@@ -2408,8 +2410,10 @@ files:
|
|
|
2408
2410
|
- lib/ultracart_api/models/sfvb_element.rb
|
|
2409
2411
|
- lib/ultracart_api/models/sfvb_element_schema_response.rb
|
|
2410
2412
|
- lib/ultracart_api/models/sfvb_elements_response.rb
|
|
2413
|
+
- lib/ultracart_api/models/sfvb_email.rb
|
|
2411
2414
|
- lib/ultracart_api/models/sfvb_email_render_request.rb
|
|
2412
2415
|
- lib/ultracart_api/models/sfvb_email_render_response.rb
|
|
2416
|
+
- lib/ultracart_api/models/sfvb_email_update_request.rb
|
|
2413
2417
|
- lib/ultracart_api/models/sfvb_error_detail.rb
|
|
2414
2418
|
- lib/ultracart_api/models/sfvb_event.rb
|
|
2415
2419
|
- lib/ultracart_api/models/sfvb_events_auth_request.rb
|