ultracart_api 3.10.30 → 3.10.31

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1dc93521a0a056bf7a1d02b2ed41c94b855d229aaf1600f015e0457c129b615f
4
- data.tar.gz: 18da6c0842fb94d6bcf4ee246f7d1189e0d0b33a517afd6db652e643a90d8528
3
+ metadata.gz: 8f4b73bbdb426927217bc2d54c77ec8fcfb8f2a33eee74c90ace3a09d47f34d0
4
+ data.tar.gz: 87440c867859a01b3969357a542b52374c030152420bebf3e1eb02c812caad97
5
5
  SHA512:
6
- metadata.gz: 3acca69d44ad1edcc5659323bd9bc76edb6b97cfa0d74f41a5ea7328e605b5c91ec6a33ee60529cc931e74c159442c6b0cae515b433965d80b96bde652d251cf
7
- data.tar.gz: ccbf74dc34a2823b6add1637b171a4b33e1b4b38b4b00fabe83e11e9f0cfcfc1e622e2e74e214015d28391a6615bba307434aab3b4afef454326c622d0cba929
6
+ metadata.gz: 245edab535627643634cb6f8c584026b77f4113152e1fc13b7914776a695732560492b94245d3c1e3579454fc7956d11e02e757f9922784bb3b0d38ffdbfe6f0
7
+ data.tar.gz: 7475cafdcdbb264e351e54ff0d946487452a45434a6c7df61e33d4d34b6fcb8e38fd437611678ecfbe7006dc27aa6973bd293511d1c67c64313a6e668b659860
data/README.md CHANGED
@@ -7,7 +7,7 @@ UltraCart REST API Version 2
7
7
  This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
8
8
 
9
9
  - API version: 2.0.0
10
- - Package version: 3.10.30
10
+ - Package version: 3.10.31
11
11
  - Build package: io.swagger.codegen.languages.RubyClientCodegen
12
12
  For more information, please visit [http://www.ultracart.com](http://www.ultracart.com)
13
13
 
@@ -24,15 +24,15 @@ gem build ultracart_api.gemspec
24
24
  Then either install the gem locally:
25
25
 
26
26
  ```shell
27
- gem install ./ultracart_api-3.10.30.gem
27
+ gem install ./ultracart_api-3.10.31.gem
28
28
  ```
29
- (for development, run `gem install --dev ./ultracart_api-3.10.30.gem` to install the development dependencies)
29
+ (for development, run `gem install --dev ./ultracart_api-3.10.31.gem` to install the development dependencies)
30
30
 
31
31
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
32
32
 
33
33
  Finally add this to the Gemfile:
34
34
 
35
- gem 'ultracart_api', '~> 3.10.30'
35
+ gem 'ultracart_api', '~> 3.10.31'
36
36
 
37
37
  ### Install from Git
38
38
 
@@ -364,6 +364,7 @@ Class | Method | HTTP request | Description
364
364
  *UltracartClient::StorefrontApi* | [**send_email_test**](docs/StorefrontApi.md#send_email_test) | **POST** /storefront/{storefront_oid}/email/emails/{commseq_email_uuid}/test | Send email test
365
365
  *UltracartClient::StorefrontApi* | [**send_postcard_test**](docs/StorefrontApi.md#send_postcard_test) | **POST** /storefront/{storefront_oid}/email/postcards/{commseq_postcard_uuid}/test | Send postcard test
366
366
  *UltracartClient::StorefrontApi* | [**send_webhook_test**](docs/StorefrontApi.md#send_webhook_test) | **POST** /storefront/{storefront_oid}/email/webhooks/test | Send webhook test
367
+ *UltracartClient::StorefrontApi* | [**sequence_test**](docs/StorefrontApi.md#sequence_test) | **POST** /storefront/{storefront_oid}/email/commseqs/{commseq_uuid}/test | Sequence test
367
368
  *UltracartClient::StorefrontApi* | [**start_email_campaign**](docs/StorefrontApi.md#start_email_campaign) | **PUT** /storefront/{storefront_oid}/email/campaigns/{email_campaign_uuid}/start | Start email campaign
368
369
  *UltracartClient::StorefrontApi* | [**subscribe_to_email_list**](docs/StorefrontApi.md#subscribe_to_email_list) | **POST** /storefront/{storefront_oid}/email/lists/{email_list_uuid}/subscribe | Subscribe customers to email list
369
370
  *UltracartClient::StorefrontApi* | [**unfavorite_screen_recording**](docs/StorefrontApi.md#unfavorite_screen_recording) | **DELETE** /storefront/{storefront_oid}/screen_recordings/{screen_recording_uuid}/favorite | Remove favorite flag on screen recording
@@ -702,6 +703,8 @@ Class | Method | HTTP request | Description
702
703
  - [UltracartClient::EmailCommseqPostcardsRequest](docs/EmailCommseqPostcardsRequest.md)
703
704
  - [UltracartClient::EmailCommseqPostcardsResponse](docs/EmailCommseqPostcardsResponse.md)
704
705
  - [UltracartClient::EmailCommseqResponse](docs/EmailCommseqResponse.md)
706
+ - [UltracartClient::EmailCommseqSequenceTestRequest](docs/EmailCommseqSequenceTestRequest.md)
707
+ - [UltracartClient::EmailCommseqSequenceTestResponse](docs/EmailCommseqSequenceTestResponse.md)
705
708
  - [UltracartClient::EmailCommseqStat](docs/EmailCommseqStat.md)
706
709
  - [UltracartClient::EmailCommseqStatResponse](docs/EmailCommseqStatResponse.md)
707
710
  - [UltracartClient::EmailCommseqStep](docs/EmailCommseqStep.md)
@@ -1168,6 +1171,7 @@ Not every change is committed to every SDK.
1168
1171
 
1169
1172
  | Version | Date | Comments |
1170
1173
  | --: | :-: | --- |
1174
+ | 3.10.31 | 08/02/2022 | storefront communication sequence test method |
1171
1175
  | 3.10.30 | 08/01/2022 | conversation event refinement |
1172
1176
  | 3.10.29 | 07/29/2022 | conversation development |
1173
1177
  | 3.10.28 | 07/28/2022 | conversation bug fixes |
@@ -0,0 +1,15 @@
1
+ # UltracartClient::EmailCommseqSequenceTestRequest
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **cart_id** | **String** | | [optional]
7
+ **cart_item_ids** | **Array<String>** | | [optional]
8
+ **esp_commseq_uuid** | **String** | | [optional]
9
+ **name** | **String** | | [optional]
10
+ **order_id** | **String** | | [optional]
11
+ **please_review** | **BOOLEAN** | | [optional]
12
+ **send_to_email** | **String** | | [optional]
13
+ **send_to_logged_in_user** | **BOOLEAN** | | [optional]
14
+
15
+
@@ -0,0 +1,11 @@
1
+ # UltracartClient::EmailCommseqSequenceTestResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **error** | [**Error**](Error.md) | | [optional]
7
+ **metadata** | [**ResponseMetadata**](ResponseMetadata.md) | | [optional]
8
+ **success** | **BOOLEAN** | Indicates if API call was successful | [optional]
9
+ **warning** | [**Warning**](Warning.md) | | [optional]
10
+
11
+
@@ -140,6 +140,7 @@ Method | HTTP request | Description
140
140
  [**send_email_test**](StorefrontApi.md#send_email_test) | **POST** /storefront/{storefront_oid}/email/emails/{commseq_email_uuid}/test | Send email test
141
141
  [**send_postcard_test**](StorefrontApi.md#send_postcard_test) | **POST** /storefront/{storefront_oid}/email/postcards/{commseq_postcard_uuid}/test | Send postcard test
142
142
  [**send_webhook_test**](StorefrontApi.md#send_webhook_test) | **POST** /storefront/{storefront_oid}/email/webhooks/test | Send webhook test
143
+ [**sequence_test**](StorefrontApi.md#sequence_test) | **POST** /storefront/{storefront_oid}/email/commseqs/{commseq_uuid}/test | Sequence test
143
144
  [**start_email_campaign**](StorefrontApi.md#start_email_campaign) | **PUT** /storefront/{storefront_oid}/email/campaigns/{email_campaign_uuid}/start | Start email campaign
144
145
  [**subscribe_to_email_list**](StorefrontApi.md#subscribe_to_email_list) | **POST** /storefront/{storefront_oid}/email/lists/{email_list_uuid}/subscribe | Subscribe customers to email list
145
146
  [**unfavorite_screen_recording**](StorefrontApi.md#unfavorite_screen_recording) | **DELETE** /storefront/{storefront_oid}/screen_recordings/{screen_recording_uuid}/favorite | Remove favorite flag on screen recording
@@ -7145,6 +7146,60 @@ Name | Type | Description | Notes
7145
7146
 
7146
7147
 
7147
7148
 
7149
+ # **sequence_test**
7150
+ > EmailCommseqSequenceTestResponse sequence_test(storefront_oid, commseq_uuid, email_commseq_sequence_test_request)
7151
+
7152
+ Sequence test
7153
+
7154
+ ### Example
7155
+ ```ruby
7156
+ # load the gem
7157
+ require 'ultracart_api'
7158
+
7159
+ # Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
7160
+ simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
7161
+ api_instance = UltracartClient::StorefrontApi.new_using_api_key(simple_key, false, false)
7162
+
7163
+
7164
+ storefront_oid = 56 # Integer |
7165
+
7166
+ commseq_uuid = 'commseq_uuid_example' # String |
7167
+
7168
+ email_commseq_sequence_test_request = UltracartClient::EmailCommseqSequenceTestRequest.new # EmailCommseqSequenceTestRequest | Commseq test request
7169
+
7170
+
7171
+ begin
7172
+ #Sequence test
7173
+ result = api_instance.sequence_test(storefront_oid, commseq_uuid, email_commseq_sequence_test_request)
7174
+ p result
7175
+ rescue UltracartClient::ApiError => e
7176
+ puts "Exception when calling StorefrontApi->sequence_test: #{e}"
7177
+ end
7178
+ ```
7179
+
7180
+ ### Parameters
7181
+
7182
+ Name | Type | Description | Notes
7183
+ ------------- | ------------- | ------------- | -------------
7184
+ **storefront_oid** | **Integer**| |
7185
+ **commseq_uuid** | **String**| |
7186
+ **email_commseq_sequence_test_request** | [**EmailCommseqSequenceTestRequest**](EmailCommseqSequenceTestRequest.md)| Commseq test request |
7187
+
7188
+ ### Return type
7189
+
7190
+ [**EmailCommseqSequenceTestResponse**](EmailCommseqSequenceTestResponse.md)
7191
+
7192
+ ### Authorization
7193
+
7194
+ [ultraCartBrowserApiKey](../README.md#ultraCartBrowserApiKey), [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
7195
+
7196
+ ### HTTP request headers
7197
+
7198
+ - **Content-Type**: application/json
7199
+ - **Accept**: application/json
7200
+
7201
+
7202
+
7148
7203
  # **start_email_campaign**
7149
7204
  > BaseResponse start_email_campaign(storefront_oid, email_campaign_uuid)
7150
7205
 
@@ -7979,6 +7979,71 @@ module UltracartClient
7979
7979
  end
7980
7980
  return data, status_code, headers
7981
7981
  end
7982
+ # Sequence test
7983
+ # @param storefront_oid
7984
+ # @param commseq_uuid
7985
+ # @param email_commseq_sequence_test_request Commseq test request
7986
+ # @param [Hash] opts the optional parameters
7987
+ # @return [EmailCommseqSequenceTestResponse]
7988
+ def sequence_test(storefront_oid, commseq_uuid, email_commseq_sequence_test_request, opts = {})
7989
+ data, _status_code, _headers = sequence_test_with_http_info(storefront_oid, commseq_uuid, email_commseq_sequence_test_request, opts)
7990
+ data
7991
+ end
7992
+
7993
+ # Sequence test
7994
+ # @param storefront_oid
7995
+ # @param commseq_uuid
7996
+ # @param email_commseq_sequence_test_request Commseq test request
7997
+ # @param [Hash] opts the optional parameters
7998
+ # @return [Array<(EmailCommseqSequenceTestResponse, Fixnum, Hash)>] EmailCommseqSequenceTestResponse data, response status code and response headers
7999
+ def sequence_test_with_http_info(storefront_oid, commseq_uuid, email_commseq_sequence_test_request, opts = {})
8000
+ if @api_client.config.debugging
8001
+ @api_client.config.logger.debug 'Calling API: StorefrontApi.sequence_test ...'
8002
+ end
8003
+ # verify the required parameter 'storefront_oid' is set
8004
+ if @api_client.config.client_side_validation && storefront_oid.nil?
8005
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling StorefrontApi.sequence_test"
8006
+ end
8007
+ # verify the required parameter 'commseq_uuid' is set
8008
+ if @api_client.config.client_side_validation && commseq_uuid.nil?
8009
+ fail ArgumentError, "Missing the required parameter 'commseq_uuid' when calling StorefrontApi.sequence_test"
8010
+ end
8011
+ # verify the required parameter 'email_commseq_sequence_test_request' is set
8012
+ if @api_client.config.client_side_validation && email_commseq_sequence_test_request.nil?
8013
+ fail ArgumentError, "Missing the required parameter 'email_commseq_sequence_test_request' when calling StorefrontApi.sequence_test"
8014
+ end
8015
+ # resource path
8016
+ local_var_path = '/storefront/{storefront_oid}/email/commseqs/{commseq_uuid}/test'.sub('{' + 'storefront_oid' + '}', storefront_oid.to_s).sub('{' + 'commseq_uuid' + '}', commseq_uuid.to_s)
8017
+
8018
+ # query parameters
8019
+ query_params = {}
8020
+
8021
+ # header parameters
8022
+ header_params = {}
8023
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
8024
+ # HTTP header 'Accept' (if needed)
8025
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
8026
+ # HTTP header 'Content-Type'
8027
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
8028
+
8029
+ # form parameters
8030
+ form_params = {}
8031
+
8032
+ # http body (model)
8033
+ post_body = @api_client.object_to_http_body(email_commseq_sequence_test_request)
8034
+ auth_names = ['ultraCartBrowserApiKey', 'ultraCartOauth', 'ultraCartSimpleApiKey']
8035
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
8036
+ :header_params => header_params,
8037
+ :query_params => query_params,
8038
+ :form_params => form_params,
8039
+ :body => post_body,
8040
+ :auth_names => auth_names,
8041
+ :return_type => 'EmailCommseqSequenceTestResponse')
8042
+ if @api_client.config.debugging
8043
+ @api_client.config.logger.debug "API called: StorefrontApi#sequence_test\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
8044
+ end
8045
+ return data, status_code, headers
8046
+ end
7982
8047
  # Start email campaign
7983
8048
  # @param storefront_oid
7984
8049
  # @param email_campaign_uuid
@@ -0,0 +1,249 @@
1
+ =begin
2
+ #UltraCart Rest API V2
3
+
4
+ #UltraCart REST API Version 2
5
+
6
+ OpenAPI spec version: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.15-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module UltracartClient
16
+ class EmailCommseqSequenceTestRequest
17
+ attr_accessor :cart_id
18
+
19
+ attr_accessor :cart_item_ids
20
+
21
+ attr_accessor :esp_commseq_uuid
22
+
23
+ attr_accessor :name
24
+
25
+ attr_accessor :order_id
26
+
27
+ attr_accessor :please_review
28
+
29
+ attr_accessor :send_to_email
30
+
31
+ attr_accessor :send_to_logged_in_user
32
+
33
+ # Attribute mapping from ruby-style variable name to JSON key.
34
+ def self.attribute_map
35
+ {
36
+ :'cart_id' => :'cart_id',
37
+ :'cart_item_ids' => :'cart_item_ids',
38
+ :'esp_commseq_uuid' => :'esp_commseq_uuid',
39
+ :'name' => :'name',
40
+ :'order_id' => :'order_id',
41
+ :'please_review' => :'please_review',
42
+ :'send_to_email' => :'send_to_email',
43
+ :'send_to_logged_in_user' => :'send_to_logged_in_user'
44
+ }
45
+ end
46
+
47
+ # Attribute type mapping.
48
+ def self.swagger_types
49
+ {
50
+ :'cart_id' => :'String',
51
+ :'cart_item_ids' => :'Array<String>',
52
+ :'esp_commseq_uuid' => :'String',
53
+ :'name' => :'String',
54
+ :'order_id' => :'String',
55
+ :'please_review' => :'BOOLEAN',
56
+ :'send_to_email' => :'String',
57
+ :'send_to_logged_in_user' => :'BOOLEAN'
58
+ }
59
+ end
60
+
61
+ # Initializes the object
62
+ # @param [Hash] attributes Model attributes in the form of hash
63
+ def initialize(attributes = {})
64
+ return unless attributes.is_a?(Hash)
65
+
66
+ # convert string to symbol for hash key
67
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
68
+
69
+ if attributes.has_key?(:'cart_id')
70
+ self.cart_id = attributes[:'cart_id']
71
+ end
72
+
73
+ if attributes.has_key?(:'cart_item_ids')
74
+ if (value = attributes[:'cart_item_ids']).is_a?(Array)
75
+ self.cart_item_ids = value
76
+ end
77
+ end
78
+
79
+ if attributes.has_key?(:'esp_commseq_uuid')
80
+ self.esp_commseq_uuid = attributes[:'esp_commseq_uuid']
81
+ end
82
+
83
+ if attributes.has_key?(:'name')
84
+ self.name = attributes[:'name']
85
+ end
86
+
87
+ if attributes.has_key?(:'order_id')
88
+ self.order_id = attributes[:'order_id']
89
+ end
90
+
91
+ if attributes.has_key?(:'please_review')
92
+ self.please_review = attributes[:'please_review']
93
+ end
94
+
95
+ if attributes.has_key?(:'send_to_email')
96
+ self.send_to_email = attributes[:'send_to_email']
97
+ end
98
+
99
+ if attributes.has_key?(:'send_to_logged_in_user')
100
+ self.send_to_logged_in_user = attributes[:'send_to_logged_in_user']
101
+ end
102
+ end
103
+
104
+ # Show invalid properties with the reasons. Usually used together with valid?
105
+ # @return Array for valid properties with the reasons
106
+ def list_invalid_properties
107
+ invalid_properties = Array.new
108
+ invalid_properties
109
+ end
110
+
111
+ # Check to see if the all the properties in the model are valid
112
+ # @return true if the model is valid
113
+ def valid?
114
+ true
115
+ end
116
+
117
+ # Checks equality by comparing each attribute.
118
+ # @param [Object] Object to be compared
119
+ def ==(o)
120
+ return true if self.equal?(o)
121
+ self.class == o.class &&
122
+ cart_id == o.cart_id &&
123
+ cart_item_ids == o.cart_item_ids &&
124
+ esp_commseq_uuid == o.esp_commseq_uuid &&
125
+ name == o.name &&
126
+ order_id == o.order_id &&
127
+ please_review == o.please_review &&
128
+ send_to_email == o.send_to_email &&
129
+ send_to_logged_in_user == o.send_to_logged_in_user
130
+ end
131
+
132
+ # @see the `==` method
133
+ # @param [Object] Object to be compared
134
+ def eql?(o)
135
+ self == o
136
+ end
137
+
138
+ # Calculates hash code according to all attributes.
139
+ # @return [Fixnum] Hash code
140
+ def hash
141
+ [cart_id, cart_item_ids, esp_commseq_uuid, name, order_id, please_review, send_to_email, send_to_logged_in_user].hash
142
+ end
143
+
144
+ # Builds the object from hash
145
+ # @param [Hash] attributes Model attributes in the form of hash
146
+ # @return [Object] Returns the model itself
147
+ def build_from_hash(attributes)
148
+ return nil unless attributes.is_a?(Hash)
149
+ self.class.swagger_types.each_pair do |key, type|
150
+ if type =~ /\AArray<(.*)>/i
151
+ # check to ensure the input is an array given that the attribute
152
+ # is documented as an array but the input is not
153
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
154
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
155
+ end
156
+ elsif !attributes[self.class.attribute_map[key]].nil?
157
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
158
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
159
+ end
160
+
161
+ self
162
+ end
163
+
164
+ # Deserializes the data based on type
165
+ # @param string type Data type
166
+ # @param string value Value to be deserialized
167
+ # @return [Object] Deserialized data
168
+ def _deserialize(type, value)
169
+ case type.to_sym
170
+ when :DateTime
171
+ DateTime.parse(value)
172
+ when :Date
173
+ Date.parse(value)
174
+ when :String
175
+ value.to_s
176
+ when :Integer
177
+ value.to_i
178
+ when :Float
179
+ value.to_f
180
+ when :BOOLEAN
181
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
182
+ true
183
+ else
184
+ false
185
+ end
186
+ when :Object
187
+ # generic object (usually a Hash), return directly
188
+ value
189
+ when /\AArray<(?<inner_type>.+)>\z/
190
+ inner_type = Regexp.last_match[:inner_type]
191
+ value.map { |v| _deserialize(inner_type, v) }
192
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
193
+ k_type = Regexp.last_match[:k_type]
194
+ v_type = Regexp.last_match[:v_type]
195
+ {}.tap do |hash|
196
+ value.each do |k, v|
197
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
198
+ end
199
+ end
200
+ else # model
201
+ temp_model = UltracartClient.const_get(type).new
202
+ temp_model.build_from_hash(value)
203
+ end
204
+ end
205
+
206
+ # Returns the string representation of the object
207
+ # @return [String] String presentation of the object
208
+ def to_s
209
+ to_hash.to_s
210
+ end
211
+
212
+ # to_body is an alias to to_hash (backward compatibility)
213
+ # @return [Hash] Returns the object in the form of hash
214
+ def to_body
215
+ to_hash
216
+ end
217
+
218
+ # Returns the object in the form of hash
219
+ # @return [Hash] Returns the object in the form of hash
220
+ def to_hash
221
+ hash = {}
222
+ self.class.attribute_map.each_pair do |attr, param|
223
+ value = self.send(attr)
224
+ next if value.nil?
225
+ hash[param] = _to_hash(value)
226
+ end
227
+ hash
228
+ end
229
+
230
+ # Outputs non-array value in the form of hash
231
+ # For object, use to_hash. Otherwise, just return the value
232
+ # @param [Object] value Any valid value
233
+ # @return [Hash] Returns the value in the form of hash
234
+ def _to_hash(value)
235
+ if value.is_a?(Array)
236
+ value.compact.map { |v| _to_hash(v) }
237
+ elsif value.is_a?(Hash)
238
+ {}.tap do |hash|
239
+ value.each { |k, v| hash[k] = _to_hash(v) }
240
+ end
241
+ elsif value.respond_to? :to_hash
242
+ value.to_hash
243
+ else
244
+ value
245
+ end
246
+ end
247
+
248
+ end
249
+ end
@@ -0,0 +1,212 @@
1
+ =begin
2
+ #UltraCart Rest API V2
3
+
4
+ #UltraCart REST API Version 2
5
+
6
+ OpenAPI spec version: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.15-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module UltracartClient
16
+ class EmailCommseqSequenceTestResponse
17
+ attr_accessor :error
18
+
19
+ attr_accessor :metadata
20
+
21
+ # Indicates if API call was successful
22
+ attr_accessor :success
23
+
24
+ attr_accessor :warning
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'error' => :'error',
30
+ :'metadata' => :'metadata',
31
+ :'success' => :'success',
32
+ :'warning' => :'warning'
33
+ }
34
+ end
35
+
36
+ # Attribute type mapping.
37
+ def self.swagger_types
38
+ {
39
+ :'error' => :'Error',
40
+ :'metadata' => :'ResponseMetadata',
41
+ :'success' => :'BOOLEAN',
42
+ :'warning' => :'Warning'
43
+ }
44
+ end
45
+
46
+ # Initializes the object
47
+ # @param [Hash] attributes Model attributes in the form of hash
48
+ def initialize(attributes = {})
49
+ return unless attributes.is_a?(Hash)
50
+
51
+ # convert string to symbol for hash key
52
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
53
+
54
+ if attributes.has_key?(:'error')
55
+ self.error = attributes[:'error']
56
+ end
57
+
58
+ if attributes.has_key?(:'metadata')
59
+ self.metadata = attributes[:'metadata']
60
+ end
61
+
62
+ if attributes.has_key?(:'success')
63
+ self.success = attributes[:'success']
64
+ end
65
+
66
+ if attributes.has_key?(:'warning')
67
+ self.warning = attributes[:'warning']
68
+ end
69
+ end
70
+
71
+ # Show invalid properties with the reasons. Usually used together with valid?
72
+ # @return Array for valid properties with the reasons
73
+ def list_invalid_properties
74
+ invalid_properties = Array.new
75
+ invalid_properties
76
+ end
77
+
78
+ # Check to see if the all the properties in the model are valid
79
+ # @return true if the model is valid
80
+ def valid?
81
+ true
82
+ end
83
+
84
+ # Checks equality by comparing each attribute.
85
+ # @param [Object] Object to be compared
86
+ def ==(o)
87
+ return true if self.equal?(o)
88
+ self.class == o.class &&
89
+ error == o.error &&
90
+ metadata == o.metadata &&
91
+ success == o.success &&
92
+ warning == o.warning
93
+ end
94
+
95
+ # @see the `==` method
96
+ # @param [Object] Object to be compared
97
+ def eql?(o)
98
+ self == o
99
+ end
100
+
101
+ # Calculates hash code according to all attributes.
102
+ # @return [Fixnum] Hash code
103
+ def hash
104
+ [error, metadata, success, warning].hash
105
+ end
106
+
107
+ # Builds the object from hash
108
+ # @param [Hash] attributes Model attributes in the form of hash
109
+ # @return [Object] Returns the model itself
110
+ def build_from_hash(attributes)
111
+ return nil unless attributes.is_a?(Hash)
112
+ self.class.swagger_types.each_pair do |key, type|
113
+ if type =~ /\AArray<(.*)>/i
114
+ # check to ensure the input is an array given that the attribute
115
+ # is documented as an array but the input is not
116
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
117
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
118
+ end
119
+ elsif !attributes[self.class.attribute_map[key]].nil?
120
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
121
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
122
+ end
123
+
124
+ self
125
+ end
126
+
127
+ # Deserializes the data based on type
128
+ # @param string type Data type
129
+ # @param string value Value to be deserialized
130
+ # @return [Object] Deserialized data
131
+ def _deserialize(type, value)
132
+ case type.to_sym
133
+ when :DateTime
134
+ DateTime.parse(value)
135
+ when :Date
136
+ Date.parse(value)
137
+ when :String
138
+ value.to_s
139
+ when :Integer
140
+ value.to_i
141
+ when :Float
142
+ value.to_f
143
+ when :BOOLEAN
144
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
145
+ true
146
+ else
147
+ false
148
+ end
149
+ when :Object
150
+ # generic object (usually a Hash), return directly
151
+ value
152
+ when /\AArray<(?<inner_type>.+)>\z/
153
+ inner_type = Regexp.last_match[:inner_type]
154
+ value.map { |v| _deserialize(inner_type, v) }
155
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
156
+ k_type = Regexp.last_match[:k_type]
157
+ v_type = Regexp.last_match[:v_type]
158
+ {}.tap do |hash|
159
+ value.each do |k, v|
160
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
161
+ end
162
+ end
163
+ else # model
164
+ temp_model = UltracartClient.const_get(type).new
165
+ temp_model.build_from_hash(value)
166
+ end
167
+ end
168
+
169
+ # Returns the string representation of the object
170
+ # @return [String] String presentation of the object
171
+ def to_s
172
+ to_hash.to_s
173
+ end
174
+
175
+ # to_body is an alias to to_hash (backward compatibility)
176
+ # @return [Hash] Returns the object in the form of hash
177
+ def to_body
178
+ to_hash
179
+ end
180
+
181
+ # Returns the object in the form of hash
182
+ # @return [Hash] Returns the object in the form of hash
183
+ def to_hash
184
+ hash = {}
185
+ self.class.attribute_map.each_pair do |attr, param|
186
+ value = self.send(attr)
187
+ next if value.nil?
188
+ hash[param] = _to_hash(value)
189
+ end
190
+ hash
191
+ end
192
+
193
+ # Outputs non-array value in the form of hash
194
+ # For object, use to_hash. Otherwise, just return the value
195
+ # @param [Object] value Any valid value
196
+ # @return [Hash] Returns the value in the form of hash
197
+ def _to_hash(value)
198
+ if value.is_a?(Array)
199
+ value.compact.map { |v| _to_hash(v) }
200
+ elsif value.is_a?(Hash)
201
+ {}.tap do |hash|
202
+ value.each { |k, v| hash[k] = _to_hash(v) }
203
+ end
204
+ elsif value.respond_to? :to_hash
205
+ value.to_hash
206
+ else
207
+ value
208
+ end
209
+ end
210
+
211
+ end
212
+ end
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.4.15-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '3.10.30'
14
+ VERSION = '3.10.31'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -278,6 +278,8 @@ require 'ultracart_api/models/email_commseq_postcard_send_test_response'
278
278
  require 'ultracart_api/models/email_commseq_postcards_request'
279
279
  require 'ultracart_api/models/email_commseq_postcards_response'
280
280
  require 'ultracart_api/models/email_commseq_response'
281
+ require 'ultracart_api/models/email_commseq_sequence_test_request'
282
+ require 'ultracart_api/models/email_commseq_sequence_test_response'
281
283
  require 'ultracart_api/models/email_commseq_stat'
282
284
  require 'ultracart_api/models/email_commseq_stat_response'
283
285
  require 'ultracart_api/models/email_commseq_step'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ultracart_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.10.30
4
+ version: 3.10.31
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-08-01 00:00:00.000000000 Z
11
+ date: 2022-08-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -490,6 +490,8 @@ files:
490
490
  - docs/EmailCommseqPostcardsRequest.md
491
491
  - docs/EmailCommseqPostcardsResponse.md
492
492
  - docs/EmailCommseqResponse.md
493
+ - docs/EmailCommseqSequenceTestRequest.md
494
+ - docs/EmailCommseqSequenceTestResponse.md
493
495
  - docs/EmailCommseqStat.md
494
496
  - docs/EmailCommseqStatResponse.md
495
497
  - docs/EmailCommseqStep.md
@@ -1182,6 +1184,8 @@ files:
1182
1184
  - lib/ultracart_api/models/email_commseq_postcards_request.rb
1183
1185
  - lib/ultracart_api/models/email_commseq_postcards_response.rb
1184
1186
  - lib/ultracart_api/models/email_commseq_response.rb
1187
+ - lib/ultracart_api/models/email_commseq_sequence_test_request.rb
1188
+ - lib/ultracart_api/models/email_commseq_sequence_test_response.rb
1185
1189
  - lib/ultracart_api/models/email_commseq_stat.rb
1186
1190
  - lib/ultracart_api/models/email_commseq_stat_response.rb
1187
1191
  - lib/ultracart_api/models/email_commseq_step.rb