ultracart_api 4.0.47.rc → 4.0.48.rc

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: 5b56e3862e653530133f53316374bfe568b508be1397bd342bcb3868d5bd1e2a
4
- data.tar.gz: a1b80bad1c0808acd92f862d5a76d85ce3447ecd56dfb0bbd6a3d3a499889655
3
+ metadata.gz: 0624caccc11ea70dee0391435631912d28584b61e5ceabccb3bacd3c51c80e95
4
+ data.tar.gz: 667e77fd135a7b513df023ba4446a51d6978de89e2298aa5777add6e6529705f
5
5
  SHA512:
6
- metadata.gz: 12c2c978ae72a70c7ac5928d5885b5d932f54884f7c0d6176935f789dac114847c77a201a7f0f8f1f88e290be9e4dac5adc5ffab629779e10680ebc7a9493008
7
- data.tar.gz: 8043d450130625dfe07dc3ee3f33f8e3099d0595c0c17622e7326571cfbfa43a4ebe066978f5d7e972beb205c10fda92eb08e9e8eb5fd4350f8d0d84dca33eec
6
+ metadata.gz: 2d4f11ee1d8df637a993f2911620c4252d6eea21e2e8af10c274bb6fd1e494a4bb43964bd027708b9b19e8a53cbe19d788d1a7a8cd8a73ec221d16f13b45b3f3
7
+ data.tar.gz: bc79bbabe755b6b36bac358bd051ac59c7c308e4755d2e0e291e50fd34f7beb2d89752e668850dca1c09842110175ac548821211e419fd62818f9e767023a412
data/README.md CHANGED
@@ -7,7 +7,7 @@ UltraCart REST API Version 2
7
7
  This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
8
8
 
9
9
  - API version: 2.0.0
10
- - Package version: 4.0.47.rc
10
+ - Package version: 4.0.48.rc
11
11
  - Build package: org.openapitools.codegen.languages.RubyClientCodegen
12
12
  For more information, please visit [http://www.ultracart.com](http://www.ultracart.com)
13
13
 
@@ -24,16 +24,16 @@ gem build ultracart_api.gemspec
24
24
  Then either install the gem locally:
25
25
 
26
26
  ```shell
27
- gem install ./ultracart_api-4.0.47.rc.gem
27
+ gem install ./ultracart_api-4.0.48.rc.gem
28
28
  ```
29
29
 
30
- (for development, run `gem install --dev ./ultracart_api-4.0.47.rc.gem` to install the development dependencies)
30
+ (for development, run `gem install --dev ./ultracart_api-4.0.48.rc.gem` to install the development dependencies)
31
31
 
32
32
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
33
33
 
34
34
  Finally add this to the Gemfile:
35
35
 
36
- gem 'ultracart_api', '~> 4.0.47.rc'
36
+ gem 'ultracart_api', '~> 4.0.48.rc'
37
37
 
38
38
  ### Install from Git
39
39
 
@@ -370,6 +370,7 @@ Class | Method | HTTP request | Description
370
370
  *UltracartClient::StorefrontApi* | [**send_email_test**](docs/StorefrontApi.md#send_email_test) | **POST** /storefront/{storefront_oid}/email/emails/{commseq_email_uuid}/test | Send email test
371
371
  *UltracartClient::StorefrontApi* | [**send_postcard_test**](docs/StorefrontApi.md#send_postcard_test) | **POST** /storefront/{storefront_oid}/email/postcards/{commseq_postcard_uuid}/test | Send postcard test
372
372
  *UltracartClient::StorefrontApi* | [**send_webhook_test**](docs/StorefrontApi.md#send_webhook_test) | **POST** /storefront/{storefront_oid}/email/webhooks/test | Send webhook test
373
+ *UltracartClient::StorefrontApi* | [**sequence_test**](docs/StorefrontApi.md#sequence_test) | **POST** /storefront/{storefront_oid}/email/commseqs/{commseq_uuid}/test | Sequence test
373
374
  *UltracartClient::StorefrontApi* | [**start_email_campaign**](docs/StorefrontApi.md#start_email_campaign) | **PUT** /storefront/{storefront_oid}/email/campaigns/{email_campaign_uuid}/start | Start email campaign
374
375
  *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
375
376
  *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
@@ -707,6 +708,8 @@ Class | Method | HTTP request | Description
707
708
  - [UltracartClient::EmailCommseqPostcardsRequest](docs/EmailCommseqPostcardsRequest.md)
708
709
  - [UltracartClient::EmailCommseqPostcardsResponse](docs/EmailCommseqPostcardsResponse.md)
709
710
  - [UltracartClient::EmailCommseqResponse](docs/EmailCommseqResponse.md)
711
+ - [UltracartClient::EmailCommseqSequenceTestRequest](docs/EmailCommseqSequenceTestRequest.md)
712
+ - [UltracartClient::EmailCommseqSequenceTestResponse](docs/EmailCommseqSequenceTestResponse.md)
710
713
  - [UltracartClient::EmailCommseqStat](docs/EmailCommseqStat.md)
711
714
  - [UltracartClient::EmailCommseqStatResponse](docs/EmailCommseqStatResponse.md)
712
715
  - [UltracartClient::EmailCommseqStep](docs/EmailCommseqStep.md)
@@ -1176,6 +1179,7 @@ Not every change is committed to every SDK.
1176
1179
 
1177
1180
  | Version | Date | Comments |
1178
1181
  | --: | :-: | --- |
1182
+ | 4.0.48-RC | 08/02/2022 | storefront communication sequence test method |
1179
1183
  | 4.0.47-RC | 08/01/2022 | conversation event refinement |
1180
1184
  | 4.0.46-RC | 07/29/2022 | conversation development |
1181
1185
  | 4.0.45-RC | 07/28/2022 | conversation bug fixes |
@@ -0,0 +1,32 @@
1
+ # UltracartClient::EmailCommseqSequenceTestRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **cart_id** | **String** | | [optional] |
8
+ | **cart_item_ids** | **Array<String>** | | [optional] |
9
+ | **esp_commseq_uuid** | **String** | | [optional] |
10
+ | **name** | **String** | | [optional] |
11
+ | **order_id** | **String** | | [optional] |
12
+ | **please_review** | **Boolean** | | [optional] |
13
+ | **send_to_email** | **String** | | [optional] |
14
+ | **send_to_logged_in_user** | **Boolean** | | [optional] |
15
+
16
+ ## Example
17
+
18
+ ```ruby
19
+ require 'ultracart_api'
20
+
21
+ instance = UltracartClient::EmailCommseqSequenceTestRequest.new(
22
+ cart_id: null,
23
+ cart_item_ids: null,
24
+ esp_commseq_uuid: null,
25
+ name: null,
26
+ order_id: null,
27
+ please_review: null,
28
+ send_to_email: null,
29
+ send_to_logged_in_user: null
30
+ )
31
+ ```
32
+
@@ -0,0 +1,24 @@
1
+ # UltracartClient::EmailCommseqSequenceTestResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **error** | [**Error**](Error.md) | | [optional] |
8
+ | **metadata** | [**ResponseMetadata**](ResponseMetadata.md) | | [optional] |
9
+ | **success** | **Boolean** | Indicates if API call was successful | [optional] |
10
+ | **warning** | [**Warning**](Warning.md) | | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'ultracart_api'
16
+
17
+ instance = UltracartClient::EmailCommseqSequenceTestResponse.new(
18
+ error: null,
19
+ metadata: null,
20
+ success: null,
21
+ warning: null
22
+ )
23
+ ```
24
+
@@ -140,6 +140,7 @@ All URIs are relative to *https://secure.ultracart.com/rest/v2*
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 |
@@ -9911,6 +9912,79 @@ end
9911
9912
  - **Accept**: application/json
9912
9913
 
9913
9914
 
9915
+ ## sequence_test
9916
+
9917
+ > <EmailCommseqSequenceTestResponse> sequence_test(storefront_oid, commseq_uuid, email_commseq_sequence_test_request)
9918
+
9919
+ Sequence test
9920
+
9921
+ ### Examples
9922
+
9923
+ ```ruby
9924
+ require 'time'
9925
+ require 'ultracart_api'
9926
+ require 'json'
9927
+ require 'yaml'
9928
+ require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
9929
+
9930
+ # This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
9931
+ # As such, this might not be the best way to use this object.
9932
+ # Please see https://github.com/UltraCart/sdk_samples for working examples.
9933
+
9934
+ api = UltracartClient::StorefrontApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
9935
+ storefront_oid = 56 # Integer |
9936
+ commseq_uuid = 'commseq_uuid_example' # String |
9937
+ email_commseq_sequence_test_request = UltracartClient::EmailCommseqSequenceTestRequest.new # EmailCommseqSequenceTestRequest | Commseq test request
9938
+
9939
+ begin
9940
+ # Sequence test
9941
+ result = api_instance.sequence_test(storefront_oid, commseq_uuid, email_commseq_sequence_test_request)
9942
+ p result
9943
+ rescue UltracartClient::ApiError => e
9944
+ puts "Error when calling StorefrontApi->sequence_test: #{e}"
9945
+ end
9946
+ ```
9947
+
9948
+ #### Using the sequence_test_with_http_info variant
9949
+
9950
+ This returns an Array which contains the response data, status code and headers.
9951
+
9952
+ > <Array(<EmailCommseqSequenceTestResponse>, Integer, Hash)> sequence_test_with_http_info(storefront_oid, commseq_uuid, email_commseq_sequence_test_request)
9953
+
9954
+ ```ruby
9955
+ begin
9956
+ # Sequence test
9957
+ data, status_code, headers = api_instance.sequence_test_with_http_info(storefront_oid, commseq_uuid, email_commseq_sequence_test_request)
9958
+ p status_code # => 2xx
9959
+ p headers # => { ... }
9960
+ p data # => <EmailCommseqSequenceTestResponse>
9961
+ rescue UltracartClient::ApiError => e
9962
+ puts "Error when calling StorefrontApi->sequence_test_with_http_info: #{e}"
9963
+ end
9964
+ ```
9965
+
9966
+ ### Parameters
9967
+
9968
+ | Name | Type | Description | Notes |
9969
+ | ---- | ---- | ----------- | ----- |
9970
+ | **storefront_oid** | **Integer** | | |
9971
+ | **commseq_uuid** | **String** | | |
9972
+ | **email_commseq_sequence_test_request** | [**EmailCommseqSequenceTestRequest**](EmailCommseqSequenceTestRequest.md) | Commseq test request | |
9973
+
9974
+ ### Return type
9975
+
9976
+ [**EmailCommseqSequenceTestResponse**](EmailCommseqSequenceTestResponse.md)
9977
+
9978
+ ### Authorization
9979
+
9980
+ [ultraCartBrowserApiKey](../README.md#ultraCartBrowserApiKey), [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
9981
+
9982
+ ### HTTP request headers
9983
+
9984
+ - **Content-Type**: application/json
9985
+ - **Accept**: application/json
9986
+
9987
+
9914
9988
  ## start_email_campaign
9915
9989
 
9916
9990
  > <BaseResponse> start_email_campaign(storefront_oid, email_campaign_uuid)
@@ -9412,6 +9412,85 @@ module UltracartClient
9412
9412
  return data, status_code, headers
9413
9413
  end
9414
9414
 
9415
+ # Sequence test
9416
+ # @param storefront_oid [Integer]
9417
+ # @param commseq_uuid [String]
9418
+ # @param email_commseq_sequence_test_request [EmailCommseqSequenceTestRequest] Commseq test request
9419
+ # @param [Hash] opts the optional parameters
9420
+ # @return [EmailCommseqSequenceTestResponse]
9421
+ def sequence_test(storefront_oid, commseq_uuid, email_commseq_sequence_test_request, opts = {})
9422
+ data, _status_code, _headers = sequence_test_with_http_info(storefront_oid, commseq_uuid, email_commseq_sequence_test_request, opts)
9423
+ data
9424
+ end
9425
+
9426
+ # Sequence test
9427
+ # @param storefront_oid [Integer]
9428
+ # @param commseq_uuid [String]
9429
+ # @param email_commseq_sequence_test_request [EmailCommseqSequenceTestRequest] Commseq test request
9430
+ # @param [Hash] opts the optional parameters
9431
+ # @return [Array<(EmailCommseqSequenceTestResponse, Integer, Hash)>] EmailCommseqSequenceTestResponse data, response status code and response headers
9432
+ def sequence_test_with_http_info(storefront_oid, commseq_uuid, email_commseq_sequence_test_request, opts = {})
9433
+ if @api_client.config.debugging
9434
+ @api_client.config.logger.debug 'Calling API: StorefrontApi.sequence_test ...'
9435
+ end
9436
+ # verify the required parameter 'storefront_oid' is set
9437
+ if @api_client.config.client_side_validation && storefront_oid.nil?
9438
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling StorefrontApi.sequence_test"
9439
+ end
9440
+ # verify the required parameter 'commseq_uuid' is set
9441
+ if @api_client.config.client_side_validation && commseq_uuid.nil?
9442
+ fail ArgumentError, "Missing the required parameter 'commseq_uuid' when calling StorefrontApi.sequence_test"
9443
+ end
9444
+ # verify the required parameter 'email_commseq_sequence_test_request' is set
9445
+ if @api_client.config.client_side_validation && email_commseq_sequence_test_request.nil?
9446
+ fail ArgumentError, "Missing the required parameter 'email_commseq_sequence_test_request' when calling StorefrontApi.sequence_test"
9447
+ end
9448
+ # resource path
9449
+ local_var_path = '/storefront/{storefront_oid}/email/commseqs/{commseq_uuid}/test'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'commseq_uuid' + '}', CGI.escape(commseq_uuid.to_s))
9450
+
9451
+ # query parameters
9452
+ query_params = opts[:query_params] || {}
9453
+
9454
+ # header parameters
9455
+ header_params = opts[:header_params] || {}
9456
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
9457
+ # HTTP header 'Accept' (if needed)
9458
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
9459
+ # HTTP header 'Content-Type'
9460
+ content_type = @api_client.select_header_content_type(['application/json'])
9461
+ if !content_type.nil?
9462
+ header_params['Content-Type'] = content_type
9463
+ end
9464
+
9465
+ # form parameters
9466
+ form_params = opts[:form_params] || {}
9467
+
9468
+ # http body (model)
9469
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(email_commseq_sequence_test_request)
9470
+
9471
+ # return_type
9472
+ return_type = opts[:debug_return_type] || 'EmailCommseqSequenceTestResponse'
9473
+
9474
+ # auth_names
9475
+ auth_names = opts[:debug_auth_names] || ['ultraCartBrowserApiKey', 'ultraCartOauth', 'ultraCartSimpleApiKey']
9476
+
9477
+ new_options = opts.merge(
9478
+ :operation => :"StorefrontApi.sequence_test",
9479
+ :header_params => header_params,
9480
+ :query_params => query_params,
9481
+ :form_params => form_params,
9482
+ :body => post_body,
9483
+ :auth_names => auth_names,
9484
+ :return_type => return_type
9485
+ )
9486
+
9487
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
9488
+ if @api_client.config.debugging
9489
+ @api_client.config.logger.debug "API called: StorefrontApi#sequence_test\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
9490
+ end
9491
+ return data, status_code, headers
9492
+ end
9493
+
9415
9494
  # Start email campaign
9416
9495
  # @param storefront_oid [Integer]
9417
9496
  # @param email_campaign_uuid [String]
@@ -0,0 +1,284 @@
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 EmailCommseqSequenceTestRequest
18
+ attr_accessor :cart_id
19
+
20
+ attr_accessor :cart_item_ids
21
+
22
+ attr_accessor :esp_commseq_uuid
23
+
24
+ attr_accessor :name
25
+
26
+ attr_accessor :order_id
27
+
28
+ attr_accessor :please_review
29
+
30
+ attr_accessor :send_to_email
31
+
32
+ attr_accessor :send_to_logged_in_user
33
+
34
+ # Attribute mapping from ruby-style variable name to JSON key.
35
+ def self.attribute_map
36
+ {
37
+ :'cart_id' => :'cart_id',
38
+ :'cart_item_ids' => :'cart_item_ids',
39
+ :'esp_commseq_uuid' => :'esp_commseq_uuid',
40
+ :'name' => :'name',
41
+ :'order_id' => :'order_id',
42
+ :'please_review' => :'please_review',
43
+ :'send_to_email' => :'send_to_email',
44
+ :'send_to_logged_in_user' => :'send_to_logged_in_user'
45
+ }
46
+ end
47
+
48
+ # Returns all the JSON keys this model knows about
49
+ def self.acceptable_attributes
50
+ attribute_map.values
51
+ end
52
+
53
+ # Attribute type mapping.
54
+ def self.openapi_types
55
+ {
56
+ :'cart_id' => :'String',
57
+ :'cart_item_ids' => :'Array<String>',
58
+ :'esp_commseq_uuid' => :'String',
59
+ :'name' => :'String',
60
+ :'order_id' => :'String',
61
+ :'please_review' => :'Boolean',
62
+ :'send_to_email' => :'String',
63
+ :'send_to_logged_in_user' => :'Boolean'
64
+ }
65
+ end
66
+
67
+ # List of attributes with nullable: true
68
+ def self.openapi_nullable
69
+ Set.new([
70
+ ])
71
+ end
72
+
73
+ # Initializes the object
74
+ # @param [Hash] attributes Model attributes in the form of hash
75
+ def initialize(attributes = {})
76
+ if (!attributes.is_a?(Hash))
77
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::EmailCommseqSequenceTestRequest` initialize method"
78
+ end
79
+
80
+ # check to see if the attribute exists and convert string to symbol for hash key
81
+ attributes = attributes.each_with_object({}) { |(k, v), h|
82
+ if (!self.class.attribute_map.key?(k.to_sym))
83
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::EmailCommseqSequenceTestRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
84
+ end
85
+ h[k.to_sym] = v
86
+ }
87
+
88
+ if attributes.key?(:'cart_id')
89
+ self.cart_id = attributes[:'cart_id']
90
+ end
91
+
92
+ if attributes.key?(:'cart_item_ids')
93
+ if (value = attributes[:'cart_item_ids']).is_a?(Array)
94
+ self.cart_item_ids = value
95
+ end
96
+ end
97
+
98
+ if attributes.key?(:'esp_commseq_uuid')
99
+ self.esp_commseq_uuid = attributes[:'esp_commseq_uuid']
100
+ end
101
+
102
+ if attributes.key?(:'name')
103
+ self.name = attributes[:'name']
104
+ end
105
+
106
+ if attributes.key?(:'order_id')
107
+ self.order_id = attributes[:'order_id']
108
+ end
109
+
110
+ if attributes.key?(:'please_review')
111
+ self.please_review = attributes[:'please_review']
112
+ end
113
+
114
+ if attributes.key?(:'send_to_email')
115
+ self.send_to_email = attributes[:'send_to_email']
116
+ end
117
+
118
+ if attributes.key?(:'send_to_logged_in_user')
119
+ self.send_to_logged_in_user = attributes[:'send_to_logged_in_user']
120
+ end
121
+ end
122
+
123
+ # Show invalid properties with the reasons. Usually used together with valid?
124
+ # @return Array for valid properties with the reasons
125
+ def list_invalid_properties
126
+ invalid_properties = Array.new
127
+ invalid_properties
128
+ end
129
+
130
+ # Check to see if the all the properties in the model are valid
131
+ # @return true if the model is valid
132
+ def valid?
133
+ true
134
+ end
135
+
136
+ # Checks equality by comparing each attribute.
137
+ # @param [Object] Object to be compared
138
+ def ==(o)
139
+ return true if self.equal?(o)
140
+ self.class == o.class &&
141
+ cart_id == o.cart_id &&
142
+ cart_item_ids == o.cart_item_ids &&
143
+ esp_commseq_uuid == o.esp_commseq_uuid &&
144
+ name == o.name &&
145
+ order_id == o.order_id &&
146
+ please_review == o.please_review &&
147
+ send_to_email == o.send_to_email &&
148
+ send_to_logged_in_user == o.send_to_logged_in_user
149
+ end
150
+
151
+ # @see the `==` method
152
+ # @param [Object] Object to be compared
153
+ def eql?(o)
154
+ self == o
155
+ end
156
+
157
+ # Calculates hash code according to all attributes.
158
+ # @return [Integer] Hash code
159
+ def hash
160
+ [cart_id, cart_item_ids, esp_commseq_uuid, name, order_id, please_review, send_to_email, send_to_logged_in_user].hash
161
+ end
162
+
163
+ # Builds the object from hash
164
+ # @param [Hash] attributes Model attributes in the form of hash
165
+ # @return [Object] Returns the model itself
166
+ def self.build_from_hash(attributes)
167
+ new.build_from_hash(attributes)
168
+ end
169
+
170
+ # Builds the object from hash
171
+ # @param [Hash] attributes Model attributes in the form of hash
172
+ # @return [Object] Returns the model itself
173
+ def build_from_hash(attributes)
174
+ return nil unless attributes.is_a?(Hash)
175
+ attributes = attributes.transform_keys(&:to_sym)
176
+ self.class.openapi_types.each_pair do |key, type|
177
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
178
+ self.send("#{key}=", nil)
179
+ elsif type =~ /\AArray<(.*)>/i
180
+ # check to ensure the input is an array given that the attribute
181
+ # is documented as an array but the input is not
182
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
183
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
184
+ end
185
+ elsif !attributes[self.class.attribute_map[key]].nil?
186
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
187
+ end
188
+ end
189
+
190
+ self
191
+ end
192
+
193
+ # Deserializes the data based on type
194
+ # @param string type Data type
195
+ # @param string value Value to be deserialized
196
+ # @return [Object] Deserialized data
197
+ def _deserialize(type, value)
198
+ case type.to_sym
199
+ when :Time
200
+ Time.parse(value)
201
+ when :Date
202
+ Date.parse(value)
203
+ when :String
204
+ value.to_s
205
+ when :Integer
206
+ value.to_i
207
+ when :Float
208
+ value.to_f
209
+ when :Boolean
210
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
211
+ true
212
+ else
213
+ false
214
+ end
215
+ when :Object
216
+ # generic object (usually a Hash), return directly
217
+ value
218
+ when /\AArray<(?<inner_type>.+)>\z/
219
+ inner_type = Regexp.last_match[:inner_type]
220
+ value.map { |v| _deserialize(inner_type, v) }
221
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
222
+ k_type = Regexp.last_match[:k_type]
223
+ v_type = Regexp.last_match[:v_type]
224
+ {}.tap do |hash|
225
+ value.each do |k, v|
226
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
227
+ end
228
+ end
229
+ else # model
230
+ # models (e.g. Pet) or oneOf
231
+ klass = UltracartClient.const_get(type)
232
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
233
+ end
234
+ end
235
+
236
+ # Returns the string representation of the object
237
+ # @return [String] String presentation of the object
238
+ def to_s
239
+ to_hash.to_s
240
+ end
241
+
242
+ # to_body is an alias to to_hash (backward compatibility)
243
+ # @return [Hash] Returns the object in the form of hash
244
+ def to_body
245
+ to_hash
246
+ end
247
+
248
+ # Returns the object in the form of hash
249
+ # @return [Hash] Returns the object in the form of hash
250
+ def to_hash
251
+ hash = {}
252
+ self.class.attribute_map.each_pair do |attr, param|
253
+ value = self.send(attr)
254
+ if value.nil?
255
+ is_nullable = self.class.openapi_nullable.include?(attr)
256
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
257
+ end
258
+
259
+ hash[param] = _to_hash(value)
260
+ end
261
+ hash
262
+ end
263
+
264
+ # Outputs non-array value in the form of hash
265
+ # For object, use to_hash. Otherwise, just return the value
266
+ # @param [Object] value Any valid value
267
+ # @return [Hash] Returns the value in the form of hash
268
+ def _to_hash(value)
269
+ if value.is_a?(Array)
270
+ value.compact.map { |v| _to_hash(v) }
271
+ elsif value.is_a?(Hash)
272
+ {}.tap do |hash|
273
+ value.each { |k, v| hash[k] = _to_hash(v) }
274
+ end
275
+ elsif value.respond_to? :to_hash
276
+ value.to_hash
277
+ else
278
+ value
279
+ end
280
+ end
281
+
282
+ end
283
+
284
+ end
@@ -0,0 +1,247 @@
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 EmailCommseqSequenceTestResponse
18
+ attr_accessor :error
19
+
20
+ attr_accessor :metadata
21
+
22
+ # Indicates if API call was successful
23
+ attr_accessor :success
24
+
25
+ attr_accessor :warning
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'error' => :'error',
31
+ :'metadata' => :'metadata',
32
+ :'success' => :'success',
33
+ :'warning' => :'warning'
34
+ }
35
+ end
36
+
37
+ # Returns all the JSON keys this model knows about
38
+ def self.acceptable_attributes
39
+ attribute_map.values
40
+ end
41
+
42
+ # Attribute type mapping.
43
+ def self.openapi_types
44
+ {
45
+ :'error' => :'Error',
46
+ :'metadata' => :'ResponseMetadata',
47
+ :'success' => :'Boolean',
48
+ :'warning' => :'Warning'
49
+ }
50
+ end
51
+
52
+ # List of attributes with nullable: true
53
+ def self.openapi_nullable
54
+ Set.new([
55
+ ])
56
+ end
57
+
58
+ # Initializes the object
59
+ # @param [Hash] attributes Model attributes in the form of hash
60
+ def initialize(attributes = {})
61
+ if (!attributes.is_a?(Hash))
62
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::EmailCommseqSequenceTestResponse` initialize method"
63
+ end
64
+
65
+ # check to see if the attribute exists and convert string to symbol for hash key
66
+ attributes = attributes.each_with_object({}) { |(k, v), h|
67
+ if (!self.class.attribute_map.key?(k.to_sym))
68
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::EmailCommseqSequenceTestResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
69
+ end
70
+ h[k.to_sym] = v
71
+ }
72
+
73
+ if attributes.key?(:'error')
74
+ self.error = attributes[:'error']
75
+ end
76
+
77
+ if attributes.key?(:'metadata')
78
+ self.metadata = attributes[:'metadata']
79
+ end
80
+
81
+ if attributes.key?(:'success')
82
+ self.success = attributes[:'success']
83
+ end
84
+
85
+ if attributes.key?(:'warning')
86
+ self.warning = attributes[:'warning']
87
+ end
88
+ end
89
+
90
+ # Show invalid properties with the reasons. Usually used together with valid?
91
+ # @return Array for valid properties with the reasons
92
+ def list_invalid_properties
93
+ invalid_properties = Array.new
94
+ invalid_properties
95
+ end
96
+
97
+ # Check to see if the all the properties in the model are valid
98
+ # @return true if the model is valid
99
+ def valid?
100
+ true
101
+ end
102
+
103
+ # Checks equality by comparing each attribute.
104
+ # @param [Object] Object to be compared
105
+ def ==(o)
106
+ return true if self.equal?(o)
107
+ self.class == o.class &&
108
+ error == o.error &&
109
+ metadata == o.metadata &&
110
+ success == o.success &&
111
+ warning == o.warning
112
+ end
113
+
114
+ # @see the `==` method
115
+ # @param [Object] Object to be compared
116
+ def eql?(o)
117
+ self == o
118
+ end
119
+
120
+ # Calculates hash code according to all attributes.
121
+ # @return [Integer] Hash code
122
+ def hash
123
+ [error, metadata, success, warning].hash
124
+ end
125
+
126
+ # Builds the object from hash
127
+ # @param [Hash] attributes Model attributes in the form of hash
128
+ # @return [Object] Returns the model itself
129
+ def self.build_from_hash(attributes)
130
+ new.build_from_hash(attributes)
131
+ end
132
+
133
+ # Builds the object from hash
134
+ # @param [Hash] attributes Model attributes in the form of hash
135
+ # @return [Object] Returns the model itself
136
+ def build_from_hash(attributes)
137
+ return nil unless attributes.is_a?(Hash)
138
+ attributes = attributes.transform_keys(&:to_sym)
139
+ self.class.openapi_types.each_pair do |key, type|
140
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
141
+ self.send("#{key}=", nil)
142
+ elsif type =~ /\AArray<(.*)>/i
143
+ # check to ensure the input is an array given that the attribute
144
+ # is documented as an array but the input is not
145
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
146
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
147
+ end
148
+ elsif !attributes[self.class.attribute_map[key]].nil?
149
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
150
+ end
151
+ end
152
+
153
+ self
154
+ end
155
+
156
+ # Deserializes the data based on type
157
+ # @param string type Data type
158
+ # @param string value Value to be deserialized
159
+ # @return [Object] Deserialized data
160
+ def _deserialize(type, value)
161
+ case type.to_sym
162
+ when :Time
163
+ Time.parse(value)
164
+ when :Date
165
+ Date.parse(value)
166
+ when :String
167
+ value.to_s
168
+ when :Integer
169
+ value.to_i
170
+ when :Float
171
+ value.to_f
172
+ when :Boolean
173
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
174
+ true
175
+ else
176
+ false
177
+ end
178
+ when :Object
179
+ # generic object (usually a Hash), return directly
180
+ value
181
+ when /\AArray<(?<inner_type>.+)>\z/
182
+ inner_type = Regexp.last_match[:inner_type]
183
+ value.map { |v| _deserialize(inner_type, v) }
184
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
185
+ k_type = Regexp.last_match[:k_type]
186
+ v_type = Regexp.last_match[:v_type]
187
+ {}.tap do |hash|
188
+ value.each do |k, v|
189
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
190
+ end
191
+ end
192
+ else # model
193
+ # models (e.g. Pet) or oneOf
194
+ klass = UltracartClient.const_get(type)
195
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
196
+ end
197
+ end
198
+
199
+ # Returns the string representation of the object
200
+ # @return [String] String presentation of the object
201
+ def to_s
202
+ to_hash.to_s
203
+ end
204
+
205
+ # to_body is an alias to to_hash (backward compatibility)
206
+ # @return [Hash] Returns the object in the form of hash
207
+ def to_body
208
+ to_hash
209
+ end
210
+
211
+ # Returns the object in the form of hash
212
+ # @return [Hash] Returns the object in the form of hash
213
+ def to_hash
214
+ hash = {}
215
+ self.class.attribute_map.each_pair do |attr, param|
216
+ value = self.send(attr)
217
+ if value.nil?
218
+ is_nullable = self.class.openapi_nullable.include?(attr)
219
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
220
+ end
221
+
222
+ hash[param] = _to_hash(value)
223
+ end
224
+ hash
225
+ end
226
+
227
+ # Outputs non-array value in the form of hash
228
+ # For object, use to_hash. Otherwise, just return the value
229
+ # @param [Object] value Any valid value
230
+ # @return [Hash] Returns the value in the form of hash
231
+ def _to_hash(value)
232
+ if value.is_a?(Array)
233
+ value.compact.map { |v| _to_hash(v) }
234
+ elsif value.is_a?(Hash)
235
+ {}.tap do |hash|
236
+ value.each { |k, v| hash[k] = _to_hash(v) }
237
+ end
238
+ elsif value.respond_to? :to_hash
239
+ value.to_hash
240
+ else
241
+ value
242
+ end
243
+ end
244
+
245
+ end
246
+
247
+ end
@@ -11,5 +11,5 @@ OpenAPI Generator version: 6.0.1-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '4.0.47.rc'
14
+ VERSION = '4.0.48.rc'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -277,6 +277,8 @@ require 'ultracart_api/models/email_commseq_postcard_send_test_response'
277
277
  require 'ultracart_api/models/email_commseq_postcards_request'
278
278
  require 'ultracart_api/models/email_commseq_postcards_response'
279
279
  require 'ultracart_api/models/email_commseq_response'
280
+ require 'ultracart_api/models/email_commseq_sequence_test_request'
281
+ require 'ultracart_api/models/email_commseq_sequence_test_response'
280
282
  require 'ultracart_api/models/email_commseq_stat'
281
283
  require 'ultracart_api/models/email_commseq_stat_response'
282
284
  require 'ultracart_api/models/email_commseq_step'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ultracart_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.47.rc
4
+ version: 4.0.48.rc
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-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
@@ -329,6 +329,8 @@ files:
329
329
  - docs/EmailCommseqPostcardsRequest.md
330
330
  - docs/EmailCommseqPostcardsResponse.md
331
331
  - docs/EmailCommseqResponse.md
332
+ - docs/EmailCommseqSequenceTestRequest.md
333
+ - docs/EmailCommseqSequenceTestResponse.md
332
334
  - docs/EmailCommseqStat.md
333
335
  - docs/EmailCommseqStatResponse.md
334
336
  - docs/EmailCommseqStep.md
@@ -1020,6 +1022,8 @@ files:
1020
1022
  - lib/ultracart_api/models/email_commseq_postcards_request.rb
1021
1023
  - lib/ultracart_api/models/email_commseq_postcards_response.rb
1022
1024
  - lib/ultracart_api/models/email_commseq_response.rb
1025
+ - lib/ultracart_api/models/email_commseq_sequence_test_request.rb
1026
+ - lib/ultracart_api/models/email_commseq_sequence_test_response.rb
1023
1027
  - lib/ultracart_api/models/email_commseq_stat.rb
1024
1028
  - lib/ultracart_api/models/email_commseq_stat_response.rb
1025
1029
  - lib/ultracart_api/models/email_commseq_step.rb