ultracart_api 4.1.209 → 4.1.210

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e0c962b8931e0142a262e884bb6d133b3d99a87b303518b9dae0ca640a41819b
4
- data.tar.gz: 2ae7fa35c9b3393aa512a70866239cc71481b84a86f28a5d4ef470be04cb349f
3
+ metadata.gz: e01b5f98446f4cd7a17870cd2492a7909f7e890cee3d71e968937e3ea161e861
4
+ data.tar.gz: 4845b8436645b593f800f84e32313d14384e619d1d58c4dd0cddd066d2102648
5
5
  SHA512:
6
- metadata.gz: c93fcf30f8484e75e27bfb3598ff5f92ef16618710fd5b94a6d653b3c73afc57b156d640dd197d5c9aeda21b0a14efb62bf16c892a3e4b9ec5bdaf0148e41f20
7
- data.tar.gz: 6daf4f903bf2d574f2250efba9aefd9b5b866c0af8d4dd69789e9b80a5a709be7563247d4be5e4d075c4f82357f801e6ea336c4538c5958fefa6f28bb33e24a0
6
+ metadata.gz: 8eae36df126bd5b1af621ae04b4db5243b507394ba0dc2d47a8f6c900b71a40a4a0c03fc66fa57839384b5da16e6f5bd0d20d9a0876ab16ff6cc12c7f4dac357
7
+ data.tar.gz: 9600f18f9314f9fcc61264cafdb0ccf00748f099d08c376a5148d5cc02cd927e0628eb565969dc3ba5f756f49f474866b2d19da8c1eb4e25aba4a8e075d3f035
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.209
10
+ - Package version: 4.1.210
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.209'
19
+ gem 'ultracart_api', '4.1.210'
20
20
  ```
21
21
 
22
22
  install:
@@ -651,6 +651,7 @@ Class | Method | HTTP request | Description
651
651
  *UltracartClient::SfvbApi* | [**resolve_sfvb_template**](docs/SfvbApi.md#resolve_sfvb_template) | **GET** /sfvb/storefronts/{storefront_oid}/templates/resolve | Resolve a template name to the file a page renders
652
652
  *UltracartClient::SfvbApi* | [**revert_sfvb_container**](docs/SfvbApi.md#revert_sfvb_container) | **POST** /sfvb/storefronts/{storefront_oid}/containers/{owner_type}/{owner_object_id}/revert | Revert a container stored outside the file system
653
653
  *UltracartClient::SfvbApi* | [**revert_sfvb_file**](docs/SfvbApi.md#revert_sfvb_file) | **POST** /sfvb/storefronts/{storefront_oid}/files/revert | Revert a storefront file to an earlier version
654
+ *UltracartClient::SfvbApi* | [**review_sfvb_email**](docs/SfvbApi.md#review_sfvb_email) | **POST** /sfvb/storefronts/{storefront_oid}/emails/{email_uuid}/review | Request a content review of a flow or campaign email
654
655
  *UltracartClient::SfvbApi* | [**revoke_sfvb_secret_request**](docs/SfvbApi.md#revoke_sfvb_secret_request) | **POST** /sfvb/secrets/{request_id}/revoke | Revoke a fulfilled request's unused handles
655
656
  *UltracartClient::SfvbApi* | [**search_sfvb_files**](docs/SfvbApi.md#search_sfvb_files) | **POST** /sfvb/storefronts/{storefront_oid}/files/search | Search storefront files
656
657
  *UltracartClient::SfvbApi* | [**search_sfvb_library**](docs/SfvbApi.md#search_sfvb_library) | **GET** /sfvb/storefronts/{storefront_oid}/library | Search the element library
@@ -1945,6 +1946,7 @@ Class | Method | HTTP request | Description
1945
1946
  - [UltracartClient::SfvbEmail](docs/SfvbEmail.md)
1946
1947
  - [UltracartClient::SfvbEmailRenderRequest](docs/SfvbEmailRenderRequest.md)
1947
1948
  - [UltracartClient::SfvbEmailRenderResponse](docs/SfvbEmailRenderResponse.md)
1949
+ - [UltracartClient::SfvbEmailReviewRequest](docs/SfvbEmailReviewRequest.md)
1948
1950
  - [UltracartClient::SfvbEmailUpdateRequest](docs/SfvbEmailUpdateRequest.md)
1949
1951
  - [UltracartClient::SfvbErrorDetail](docs/SfvbErrorDetail.md)
1950
1952
  - [UltracartClient::SfvbEvent](docs/SfvbEvent.md)
@@ -2321,6 +2323,7 @@ Not every change is committed to every SDK.
2321
2323
 
2322
2324
  | Version | Date | Comments |
2323
2325
  | --: | :-: | --- |
2326
+ | 4.1.210 | 10/27/2026 | sfvb internal testing |
2324
2327
  | 4.1.209 | 10/27/2026 | sfvb internal testing |
2325
2328
  | 4.1.208 | 10/26/2026 | sfvb internal testing |
2326
2329
  | 4.1.207 | 10/16/2026 | sfvb internal testing |
data/docs/SfvbApi.md CHANGED
@@ -179,6 +179,7 @@ All URIs are relative to *https://secure.ultracart.com/rest/v2*
179
179
  | [**resolve_sfvb_template**](SfvbApi.md#resolve_sfvb_template) | **GET** /sfvb/storefronts/{storefront_oid}/templates/resolve | Resolve a template name to the file a page renders |
180
180
  | [**revert_sfvb_container**](SfvbApi.md#revert_sfvb_container) | **POST** /sfvb/storefronts/{storefront_oid}/containers/{owner_type}/{owner_object_id}/revert | Revert a container stored outside the file system |
181
181
  | [**revert_sfvb_file**](SfvbApi.md#revert_sfvb_file) | **POST** /sfvb/storefronts/{storefront_oid}/files/revert | Revert a storefront file to an earlier version |
182
+ | [**review_sfvb_email**](SfvbApi.md#review_sfvb_email) | **POST** /sfvb/storefronts/{storefront_oid}/emails/{email_uuid}/review | Request a content review of a flow or campaign email |
182
183
  | [**revoke_sfvb_secret_request**](SfvbApi.md#revoke_sfvb_secret_request) | **POST** /sfvb/secrets/{request_id}/revoke | Revoke a fulfilled request's unused handles |
183
184
  | [**search_sfvb_files**](SfvbApi.md#search_sfvb_files) | **POST** /sfvb/storefronts/{storefront_oid}/files/search | Search storefront files |
184
185
  | [**search_sfvb_library**](SfvbApi.md#search_sfvb_library) | **GET** /sfvb/storefronts/{storefront_oid}/library | Search the element library |
@@ -9760,6 +9761,61 @@ end
9760
9761
  - **Accept**: application/json
9761
9762
 
9762
9763
 
9764
+ ## review_sfvb_email
9765
+
9766
+ > <SfvbEmail> review_sfvb_email(storefront_oid, email_uuid, email_review_request)
9767
+
9768
+ Request a content review of a flow or campaign email
9769
+
9770
+ Starts a review the way the admin's Request Review does. One test copy of the email goes to the signed-in user, and to no one else, and the review runs in the background, so read the email again for pending_review and then the ruling. Refused with sfvb.review_not_needed when it doesn't need review, is already waiting for one, or was rejected and not changed since. An email in a flow triggered by an order or an auto order needs order_id, a test order. Needs a signed-in user, not an API key alone.
9771
+
9772
+
9773
+ ### Examples
9774
+
9775
+
9776
+ (No example for this operation).
9777
+
9778
+
9779
+ #### Using the review_sfvb_email_with_http_info variant
9780
+
9781
+ This returns an Array which contains the response data, status code and headers.
9782
+
9783
+ > <Array(<SfvbEmail>, Integer, Hash)> review_sfvb_email_with_http_info(storefront_oid, email_uuid, email_review_request)
9784
+
9785
+ ```ruby
9786
+ begin
9787
+ # Request a content review of a flow or campaign email
9788
+ data, status_code, headers = api_instance.review_sfvb_email_with_http_info(storefront_oid, email_uuid, email_review_request)
9789
+ p status_code # => 2xx
9790
+ p headers # => { ... }
9791
+ p data # => <SfvbEmail>
9792
+ rescue UltracartClient::ApiError => e
9793
+ puts "Error when calling SfvbApi->review_sfvb_email_with_http_info: #{e}"
9794
+ end
9795
+ ```
9796
+
9797
+ ### Parameters
9798
+
9799
+ | Name | Type | Description | Notes |
9800
+ | ---- | ---- | ----------- | ----- |
9801
+ | **storefront_oid** | **Integer** | | |
9802
+ | **email_uuid** | **String** | | |
9803
+ | **email_review_request** | [**SfvbEmailReviewRequest**](SfvbEmailReviewRequest.md) | The test order, for an email in an order-triggered flow | |
9804
+
9805
+ ### Return type
9806
+
9807
+ [**SfvbEmail**](SfvbEmail.md)
9808
+
9809
+ ### Authorization
9810
+
9811
+ [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
9812
+
9813
+ ### HTTP request headers
9814
+
9815
+ - **Content-Type**: application/json
9816
+ - **Accept**: application/json
9817
+
9818
+
9763
9819
  ## revoke_sfvb_secret_request
9764
9820
 
9765
9821
  > <SfvbSecretRequest> revoke_sfvb_secret_request(request_id)
data/docs/SfvbEmail.md CHANGED
@@ -8,6 +8,7 @@
8
8
  | **email_uuid** | **String** | The email uuid. The same uuid the email container (owner type email) and the email render take. | [optional] |
9
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
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
+ | **notes** | **Array&lt;String&gt;** | What a write did beyond the fields asked for, such as a step label it could not refresh. Only on a write. | [optional] |
11
12
  | **pending_review** | **Boolean** | True while a change waits for review. An edit puts it back to needing review. | [optional] |
12
13
  | **preview_text** | **String** | The preview text an inbox shows after the subject. | [optional] |
13
14
  | **rejected** | **Boolean** | True when review rejected the email. An edit puts it back to needing review. | [optional] |
@@ -27,6 +28,7 @@ instance = UltracartClient::SfvbEmail.new(
27
28
  email_uuid: null,
28
29
  hash_sha256: null,
29
30
  live: null,
31
+ notes: null,
30
32
  pending_review: null,
31
33
  preview_text: null,
32
34
  rejected: null,
@@ -0,0 +1,18 @@
1
+ # UltracartClient::SfvbEmailReviewRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **order_id** | **String** | A test order id. Required for an email in a flow triggered by an order or an auto order, and refused otherwise. | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'ultracart_api'
13
+
14
+ instance = UltracartClient::SfvbEmailReviewRequest.new(
15
+ order_id: null
16
+ )
17
+ ```
18
+
@@ -12883,6 +12883,87 @@ module UltracartClient
12883
12883
  return data, status_code, headers
12884
12884
  end
12885
12885
 
12886
+ # Request a content review of a flow or campaign email
12887
+ # Starts a review the way the admin's Request Review does. One test copy of the email goes to the signed-in user, and to no one else, and the review runs in the background, so read the email again for pending_review and then the ruling. Refused with sfvb.review_not_needed when it doesn't need review, is already waiting for one, or was rejected and not changed since. An email in a flow triggered by an order or an auto order needs order_id, a test order. Needs a signed-in user, not an API key alone.
12888
+ # @param storefront_oid [Integer]
12889
+ # @param email_uuid [String]
12890
+ # @param email_review_request [SfvbEmailReviewRequest] The test order, for an email in an order-triggered flow
12891
+ # @param [Hash] opts the optional parameters
12892
+ # @return [SfvbEmail]
12893
+ def review_sfvb_email(storefront_oid, email_uuid, email_review_request, opts = {})
12894
+ data, _status_code, _headers = review_sfvb_email_with_http_info(storefront_oid, email_uuid, email_review_request, opts)
12895
+ data
12896
+ end
12897
+
12898
+ # Request a content review of a flow or campaign email
12899
+ # Starts a review the way the admin&#39;s Request Review does. One test copy of the email goes to the signed-in user, and to no one else, and the review runs in the background, so read the email again for pending_review and then the ruling. Refused with sfvb.review_not_needed when it doesn&#39;t need review, is already waiting for one, or was rejected and not changed since. An email in a flow triggered by an order or an auto order needs order_id, a test order. Needs a signed-in user, not an API key alone.
12900
+ # @param storefront_oid [Integer]
12901
+ # @param email_uuid [String]
12902
+ # @param email_review_request [SfvbEmailReviewRequest] The test order, for an email in an order-triggered flow
12903
+ # @param [Hash] opts the optional parameters
12904
+ # @return [Array<(SfvbEmail, Integer, Hash)>] SfvbEmail data, response status code and response headers
12905
+ def review_sfvb_email_with_http_info(storefront_oid, email_uuid, email_review_request, opts = {})
12906
+ if @api_client.config.debugging
12907
+ @api_client.config.logger.debug 'Calling API: SfvbApi.review_sfvb_email ...'
12908
+ end
12909
+ # verify the required parameter 'storefront_oid' is set
12910
+ if @api_client.config.client_side_validation && storefront_oid.nil?
12911
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.review_sfvb_email"
12912
+ end
12913
+ # verify the required parameter 'email_uuid' is set
12914
+ if @api_client.config.client_side_validation && email_uuid.nil?
12915
+ fail ArgumentError, "Missing the required parameter 'email_uuid' when calling SfvbApi.review_sfvb_email"
12916
+ end
12917
+ # verify the required parameter 'email_review_request' is set
12918
+ if @api_client.config.client_side_validation && email_review_request.nil?
12919
+ fail ArgumentError, "Missing the required parameter 'email_review_request' when calling SfvbApi.review_sfvb_email"
12920
+ end
12921
+ # resource path
12922
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/emails/{email_uuid}/review'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'email_uuid' + '}', CGI.escape(email_uuid.to_s))
12923
+
12924
+ # query parameters
12925
+ query_params = opts[:query_params] || {}
12926
+
12927
+ # header parameters
12928
+ header_params = opts[:header_params] || {}
12929
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
12930
+ # HTTP header 'Accept' (if needed)
12931
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
12932
+ # HTTP header 'Content-Type'
12933
+ content_type = @api_client.select_header_content_type(['application/json'])
12934
+ if !content_type.nil?
12935
+ header_params['Content-Type'] = content_type
12936
+ end
12937
+
12938
+ # form parameters
12939
+ form_params = opts[:form_params] || {}
12940
+
12941
+ # http body (model)
12942
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(email_review_request)
12943
+
12944
+ # return_type
12945
+ return_type = opts[:debug_return_type] || 'SfvbEmail'
12946
+
12947
+ # auth_names
12948
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
12949
+
12950
+ new_options = opts.merge(
12951
+ :operation => :"SfvbApi.review_sfvb_email",
12952
+ :header_params => header_params,
12953
+ :query_params => query_params,
12954
+ :form_params => form_params,
12955
+ :body => post_body,
12956
+ :auth_names => auth_names,
12957
+ :return_type => return_type
12958
+ )
12959
+
12960
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
12961
+ if @api_client.config.debugging
12962
+ @api_client.config.logger.debug "API called: SfvbApi#review_sfvb_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
12963
+ end
12964
+ return data, status_code, headers
12965
+ end
12966
+
12886
12967
  # Revoke a fulfilled request's unused handles
12887
12968
  # Every handle of the request that no write has used up stops working at once, and its value is deleted. A handle a write is using right now is left to that write. Use it when the plan changed, or a handle may have leaked.
12888
12969
  # @param request_id [String]
@@ -27,6 +27,9 @@ module UltracartClient
27
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
28
  attr_accessor :live
29
29
 
30
+ # What a write did beyond the fields asked for, such as a step label it could not refresh. Only on a write.
31
+ attr_accessor :notes
32
+
30
33
  # True while a change waits for review. An edit puts it back to needing review.
31
34
  attr_accessor :pending_review
32
35
 
@@ -58,6 +61,7 @@ module UltracartClient
58
61
  :'email_uuid' => :'email_uuid',
59
62
  :'hash_sha256' => :'hash_sha256',
60
63
  :'live' => :'live',
64
+ :'notes' => :'notes',
61
65
  :'pending_review' => :'pending_review',
62
66
  :'preview_text' => :'preview_text',
63
67
  :'rejected' => :'rejected',
@@ -81,6 +85,7 @@ module UltracartClient
81
85
  :'email_uuid' => :'String',
82
86
  :'hash_sha256' => :'String',
83
87
  :'live' => :'Boolean',
88
+ :'notes' => :'Array<String>',
84
89
  :'pending_review' => :'Boolean',
85
90
  :'preview_text' => :'String',
86
91
  :'rejected' => :'Boolean',
@@ -129,6 +134,12 @@ module UltracartClient
129
134
  self.live = attributes[:'live']
130
135
  end
131
136
 
137
+ if attributes.key?(:'notes')
138
+ if (value = attributes[:'notes']).is_a?(Array)
139
+ self.notes = value
140
+ end
141
+ end
142
+
132
143
  if attributes.key?(:'pending_review')
133
144
  self.pending_review = attributes[:'pending_review']
134
145
  end
@@ -184,6 +195,7 @@ module UltracartClient
184
195
  email_uuid == o.email_uuid &&
185
196
  hash_sha256 == o.hash_sha256 &&
186
197
  live == o.live &&
198
+ notes == o.notes &&
187
199
  pending_review == o.pending_review &&
188
200
  preview_text == o.preview_text &&
189
201
  rejected == o.rejected &&
@@ -203,7 +215,7 @@ module UltracartClient
203
215
  # Calculates hash code according to all attributes.
204
216
  # @return [Integer] Hash code
205
217
  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
218
+ [container_last_modified_dts, email_uuid, hash_sha256, live, notes, pending_review, preview_text, rejected, requires_review, subject, suspended_for_spam, transactional, version].hash
207
219
  end
208
220
 
209
221
  # Builds the object from hash
@@ -0,0 +1,220 @@
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 SfvbEmailReviewRequest
18
+ # A test order id. Required for an email in a flow triggered by an order or an auto order, and refused otherwise.
19
+ attr_accessor :order_id
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'order_id' => :'order_id'
25
+ }
26
+ end
27
+
28
+ # Returns all the JSON keys this model knows about
29
+ def self.acceptable_attributes
30
+ attribute_map.values
31
+ end
32
+
33
+ # Attribute type mapping.
34
+ def self.openapi_types
35
+ {
36
+ :'order_id' => :'String'
37
+ }
38
+ end
39
+
40
+ # List of attributes with nullable: true
41
+ def self.openapi_nullable
42
+ Set.new([
43
+ ])
44
+ end
45
+
46
+ # Initializes the object
47
+ # @param [Hash] attributes Model attributes in the form of hash
48
+ def initialize(attributes = {})
49
+ if (!attributes.is_a?(Hash))
50
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbEmailReviewRequest` initialize method"
51
+ end
52
+
53
+ # check to see if the attribute exists and convert string to symbol for hash key
54
+ attributes = attributes.each_with_object({}) { |(k, v), h|
55
+ if (!self.class.attribute_map.key?(k.to_sym))
56
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbEmailReviewRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
57
+ end
58
+ h[k.to_sym] = v
59
+ }
60
+
61
+ if attributes.key?(:'order_id')
62
+ self.order_id = attributes[:'order_id']
63
+ end
64
+ end
65
+
66
+ # Show invalid properties with the reasons. Usually used together with valid?
67
+ # @return Array for valid properties with the reasons
68
+ def list_invalid_properties
69
+ invalid_properties = Array.new
70
+ invalid_properties
71
+ end
72
+
73
+ # Check to see if the all the properties in the model are valid
74
+ # @return true if the model is valid
75
+ def valid?
76
+ true
77
+ end
78
+
79
+ # Checks equality by comparing each attribute.
80
+ # @param [Object] Object to be compared
81
+ def ==(o)
82
+ return true if self.equal?(o)
83
+ self.class == o.class &&
84
+ order_id == o.order_id
85
+ end
86
+
87
+ # @see the `==` method
88
+ # @param [Object] Object to be compared
89
+ def eql?(o)
90
+ self == o
91
+ end
92
+
93
+ # Calculates hash code according to all attributes.
94
+ # @return [Integer] Hash code
95
+ def hash
96
+ [order_id].hash
97
+ end
98
+
99
+ # Builds the object from hash
100
+ # @param [Hash] attributes Model attributes in the form of hash
101
+ # @return [Object] Returns the model itself
102
+ def self.build_from_hash(attributes)
103
+ new.build_from_hash(attributes)
104
+ end
105
+
106
+ # Builds the object from hash
107
+ # @param [Hash] attributes Model attributes in the form of hash
108
+ # @return [Object] Returns the model itself
109
+ def build_from_hash(attributes)
110
+ return nil unless attributes.is_a?(Hash)
111
+ attributes = attributes.transform_keys(&:to_sym)
112
+ self.class.openapi_types.each_pair do |key, type|
113
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
114
+ self.send("#{key}=", nil)
115
+ elsif type =~ /\AArray<(.*)>/i
116
+ # check to ensure the input is an array given that the attribute
117
+ # is documented as an array but the input is not
118
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
119
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
120
+ end
121
+ elsif !attributes[self.class.attribute_map[key]].nil?
122
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
123
+ end
124
+ end
125
+
126
+ self
127
+ end
128
+
129
+ # Deserializes the data based on type
130
+ # @param string type Data type
131
+ # @param string value Value to be deserialized
132
+ # @return [Object] Deserialized data
133
+ def _deserialize(type, value)
134
+ case type.to_sym
135
+ when :Time
136
+ Time.parse(value)
137
+ when :Date
138
+ Date.parse(value)
139
+ when :String
140
+ value.to_s
141
+ when :Integer
142
+ value.to_i
143
+ when :Float
144
+ value.to_f
145
+ when :Boolean
146
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
147
+ true
148
+ else
149
+ false
150
+ end
151
+ when :Object
152
+ # generic object (usually a Hash), return directly
153
+ value
154
+ when /\AArray<(?<inner_type>.+)>\z/
155
+ inner_type = Regexp.last_match[:inner_type]
156
+ value.map { |v| _deserialize(inner_type, v) }
157
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
158
+ k_type = Regexp.last_match[:k_type]
159
+ v_type = Regexp.last_match[:v_type]
160
+ {}.tap do |hash|
161
+ value.each do |k, v|
162
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
163
+ end
164
+ end
165
+ else # model
166
+ # models (e.g. Pet) or oneOf
167
+ klass = UltracartClient.const_get(type)
168
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
169
+ end
170
+ end
171
+
172
+ # Returns the string representation of the object
173
+ # @return [String] String presentation of the object
174
+ def to_s
175
+ to_hash.to_s
176
+ end
177
+
178
+ # to_body is an alias to to_hash (backward compatibility)
179
+ # @return [Hash] Returns the object in the form of hash
180
+ def to_body
181
+ to_hash
182
+ end
183
+
184
+ # Returns the object in the form of hash
185
+ # @return [Hash] Returns the object in the form of hash
186
+ def to_hash
187
+ hash = {}
188
+ self.class.attribute_map.each_pair do |attr, param|
189
+ value = self.send(attr)
190
+ if value.nil?
191
+ is_nullable = self.class.openapi_nullable.include?(attr)
192
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
193
+ end
194
+
195
+ hash[param] = _to_hash(value)
196
+ end
197
+ hash
198
+ end
199
+
200
+ # Outputs non-array value in the form of hash
201
+ # For object, use to_hash. Otherwise, just return the value
202
+ # @param [Object] value Any valid value
203
+ # @return [Hash] Returns the value in the form of hash
204
+ def _to_hash(value)
205
+ if value.is_a?(Array)
206
+ value.compact.map { |v| _to_hash(v) }
207
+ elsif value.is_a?(Hash)
208
+ {}.tap do |hash|
209
+ value.each { |k, v| hash[k] = _to_hash(v) }
210
+ end
211
+ elsif value.respond_to? :to_hash
212
+ value.to_hash
213
+ else
214
+ value
215
+ end
216
+ end
217
+
218
+ end
219
+
220
+ end
@@ -11,5 +11,5 @@ OpenAPI Generator version: 6.0.1-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '4.1.209'
14
+ VERSION = '4.1.210'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -1025,6 +1025,7 @@ require 'ultracart_api/models/sfvb_elements_response'
1025
1025
  require 'ultracart_api/models/sfvb_email'
1026
1026
  require 'ultracart_api/models/sfvb_email_render_request'
1027
1027
  require 'ultracart_api/models/sfvb_email_render_response'
1028
+ require 'ultracart_api/models/sfvb_email_review_request'
1028
1029
  require 'ultracart_api/models/sfvb_email_update_request'
1029
1030
  require 'ultracart_api/models/sfvb_error_detail'
1030
1031
  require 'ultracart_api/models/sfvb_event'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ultracart_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.209
4
+ version: 4.1.210
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
@@ -1087,6 +1087,7 @@ files:
1087
1087
  - docs/SfvbEmail.md
1088
1088
  - docs/SfvbEmailRenderRequest.md
1089
1089
  - docs/SfvbEmailRenderResponse.md
1090
+ - docs/SfvbEmailReviewRequest.md
1090
1091
  - docs/SfvbEmailUpdateRequest.md
1091
1092
  - docs/SfvbErrorDetail.md
1092
1093
  - docs/SfvbEvent.md
@@ -2429,6 +2430,7 @@ files:
2429
2430
  - lib/ultracart_api/models/sfvb_email.rb
2430
2431
  - lib/ultracart_api/models/sfvb_email_render_request.rb
2431
2432
  - lib/ultracart_api/models/sfvb_email_render_response.rb
2433
+ - lib/ultracart_api/models/sfvb_email_review_request.rb
2432
2434
  - lib/ultracart_api/models/sfvb_email_update_request.rb
2433
2435
  - lib/ultracart_api/models/sfvb_error_detail.rb
2434
2436
  - lib/ultracart_api/models/sfvb_event.rb