ultracart_api 3.10.42 → 3.10.45

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: 8bec9650614da04e07b0945424d981f0dde40c89f20fe0b10f53307d154ce9ac
4
- data.tar.gz: 41cbc90e4a14ae38a1ee8073ba79a50dc5f973ea4cb8f35b9db671fa1607aae2
3
+ metadata.gz: b061dc3f423b1f007176e5eda82c4b8af271bcf1b9f9ab34e7ec55950c0df174
4
+ data.tar.gz: c3e14a0a86f473e47f5c3dc3112b787186e365bb4d7c70fbc3a44d1c5a44992b
5
5
  SHA512:
6
- metadata.gz: e483f0482a32f58dd1f3346bbe65cdeb92630bc83bfe9ba130e6b8105880a4496ef7c4d70f1e045447236f13140b61d8bcbef183a9d5e202897368cc4557f860
7
- data.tar.gz: f9d277d9f20410d466bbc4886c1403e55e55886560c02eb024ee155bb2cb379b660872d7f25b8a7f320fde60e9c20f7ca3e1e05fea22af883b3ca8dcbd95837b
6
+ metadata.gz: e63b5a5068ecb227263d511276a99a44260cb934735dc31e7e9b20e192678bfbcd39a8c947300691919ee5d2ac6ab6b696fcee30ca7af1a7d6faca77513f3f7f
7
+ data.tar.gz: 6bd55be389872157e68df2a851f3a103a73ac1b3de4561460cb4094c988bd9063d86865600a246a0d32bc8aafbd0f6bbd907a49084885925a0eb2b581d622da7
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.42
10
+ - Package version: 3.10.45
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.42.gem
27
+ gem install ./ultracart_api-3.10.45.gem
28
28
  ```
29
- (for development, run `gem install --dev ./ultracart_api-3.10.42.gem` to install the development dependencies)
29
+ (for development, run `gem install --dev ./ultracart_api-3.10.45.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.42'
35
+ gem 'ultracart_api', '~> 3.10.45'
36
36
 
37
37
  ### Install from Git
38
38
 
@@ -393,6 +393,7 @@ Class | Method | HTTP request | Description
393
393
  *UltracartClient::StorefrontApi* | [**update_screen_recording_tags**](docs/StorefrontApi.md#update_screen_recording_tags) | **POST** /storefront/{storefront_oid}/screen_recordings/{screen_recording_uuid}/tags | Update tags on a screen recording
394
394
  *UltracartClient::StorefrontApi* | [**update_transaction_email**](docs/StorefrontApi.md#update_transaction_email) | **PUT** /storefront/{storefront_oid}/transaction_email/list/{email_id} | Updates a transaction email object
395
395
  *UltracartClient::StorefrontApi* | [**update_twilio_account**](docs/StorefrontApi.md#update_twilio_account) | **PUT** /storefront/twilio/accounts/{esp_twilio_uuid} | Update Twilio account
396
+ *UltracartClient::StorefrontApi* | [**validate_ruler**](docs/StorefrontApi.md#validate_ruler) | **POST** /storefront/ruler/validate | Validate AWS Event Ruler
396
397
  *UltracartClient::TaxApi* | [**delete_tax_provider_self_city**](docs/TaxApi.md#delete_tax_provider_self_city) | **DELETE** /tax/providers/self/city/{city} | Deletes a Self tax provider city
397
398
  *UltracartClient::TaxApi* | [**delete_tax_provider_self_country**](docs/TaxApi.md#delete_tax_provider_self_country) | **DELETE** /tax/providers/self/country/{countryCode} | Deletes a Self tax provider country
398
399
  *UltracartClient::TaxApi* | [**delete_tax_provider_self_county**](docs/TaxApi.md#delete_tax_provider_self_county) | **DELETE** /tax/providers/self/county/{county} | Deletes a Self tax provider county
@@ -994,6 +995,8 @@ Class | Method | HTTP request | Description
994
995
  - [UltracartClient::RegisterAffiliateClickResponse](docs/RegisterAffiliateClickResponse.md)
995
996
  - [UltracartClient::ResponseMetadata](docs/ResponseMetadata.md)
996
997
  - [UltracartClient::ResultSet](docs/ResultSet.md)
998
+ - [UltracartClient::RulerValidationRequest](docs/RulerValidationRequest.md)
999
+ - [UltracartClient::RulerValidationResponse](docs/RulerValidationResponse.md)
997
1000
  - [UltracartClient::ScreenRecording](docs/ScreenRecording.md)
998
1001
  - [UltracartClient::ScreenRecordingAdPlatform](docs/ScreenRecordingAdPlatform.md)
999
1002
  - [UltracartClient::ScreenRecordingFilter](docs/ScreenRecordingFilter.md)
@@ -1179,6 +1182,9 @@ Not every change is committed to every SDK.
1179
1182
 
1180
1183
  | Version | Date | Comments |
1181
1184
  | --: | :-: | --- |
1185
+ | 3.10.45 | 09/12/2022 | storefront comm - send back reviews.io configured flag on getEmailSettings |
1186
+ | 3.10.44 | 09/07/2022 | sf comms - using aws event ruler for bigquery segmentation validation |
1187
+ | 3.10.43 | 09/02/2022 | customer editor added loyal ledger descriptions |
1182
1188
  | 3.10.42 | 08/30/2022 | storefront comm fields for sms configuration |
1183
1189
  | 3.10.41 | 08/26/2022 | postcard address fields for comm sequence testing |
1184
1190
  | 3.10.40 | 08/22/2022 | exposing individual reviews within item.review object |
@@ -8,6 +8,7 @@ Name | Type | Description | Notes
8
8
  **card_exp_years** | **Array<String>** | card_exp_years | [optional]
9
9
  **card_types** | **Array<String>** | card_types | [optional]
10
10
  **countries** | [**Array<Country>**](Country.md) | countries | [optional]
11
+ **loyalty_ledger_descriptions** | **Array<String>** | loyalty_ledger_descriptions | [optional]
11
12
  **loyalty_program_type** | **String** | loyalty_program_type | [optional]
12
13
  **qb_classes** | **Array<String>** | qb_classes | [optional]
13
14
  **sales_rep_codes** | **Array<String>** | sales_rep_codes | [optional]
@@ -12,6 +12,7 @@ Name | Type | Description | Notes
12
12
  **postcard_from_name** | **String** | | [optional]
13
13
  **postcard_from_postal_code** | **String** | | [optional]
14
14
  **postcard_from_state** | **String** | | [optional]
15
+ **reviews_io_configured** | **BOOLEAN** | True if the Reviews.io integration is configured | [optional]
15
16
  **sms_esp_twilio_uuid** | **String** | | [optional]
16
17
  **sms_phone_number** | **String** | | [optional]
17
18
  **transactional_esp_domain_user** | **String** | | [optional]
@@ -0,0 +1,8 @@
1
+ # UltracartClient::RulerValidationRequest
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **ruler** | **String** | | [optional]
7
+
8
+
@@ -0,0 +1,9 @@
1
+ # UltracartClient::RulerValidationResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **error_message** | **String** | | [optional]
7
+ **valid** | **BOOLEAN** | | [optional]
8
+
9
+
@@ -168,6 +168,7 @@ Method | HTTP request | Description
168
168
  [**update_screen_recording_tags**](StorefrontApi.md#update_screen_recording_tags) | **POST** /storefront/{storefront_oid}/screen_recordings/{screen_recording_uuid}/tags | Update tags on a screen recording
169
169
  [**update_transaction_email**](StorefrontApi.md#update_transaction_email) | **PUT** /storefront/{storefront_oid}/transaction_email/list/{email_id} | Updates a transaction email object
170
170
  [**update_twilio_account**](StorefrontApi.md#update_twilio_account) | **PUT** /storefront/twilio/accounts/{esp_twilio_uuid} | Update Twilio account
171
+ [**validate_ruler**](StorefrontApi.md#validate_ruler) | **POST** /storefront/ruler/validate | Validate AWS Event Ruler
171
172
 
172
173
 
173
174
  # **add_to_library**
@@ -8622,3 +8623,51 @@ Name | Type | Description | Notes
8622
8623
 
8623
8624
 
8624
8625
 
8626
+ # **validate_ruler**
8627
+ > RulerValidationResponse validate_ruler(ruler_validate_request)
8628
+
8629
+ Validate AWS Event Ruler
8630
+
8631
+ ### Example
8632
+ ```ruby
8633
+ # load the gem
8634
+ require 'ultracart_api'
8635
+
8636
+ # Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
8637
+ simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
8638
+ api_instance = UltracartClient::StorefrontApi.new_using_api_key(simple_key, false, false)
8639
+
8640
+
8641
+ ruler_validate_request = UltracartClient::RulerValidationRequest.new # RulerValidationRequest | Ruler Validate Request
8642
+
8643
+
8644
+ begin
8645
+ #Validate AWS Event Ruler
8646
+ result = api_instance.validate_ruler(ruler_validate_request)
8647
+ p result
8648
+ rescue UltracartClient::ApiError => e
8649
+ puts "Exception when calling StorefrontApi->validate_ruler: #{e}"
8650
+ end
8651
+ ```
8652
+
8653
+ ### Parameters
8654
+
8655
+ Name | Type | Description | Notes
8656
+ ------------- | ------------- | ------------- | -------------
8657
+ **ruler_validate_request** | [**RulerValidationRequest**](RulerValidationRequest.md)| Ruler Validate Request |
8658
+
8659
+ ### Return type
8660
+
8661
+ [**RulerValidationResponse**](RulerValidationResponse.md)
8662
+
8663
+ ### Authorization
8664
+
8665
+ [ultraCartBrowserApiKey](../README.md#ultraCartBrowserApiKey), [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
8666
+
8667
+ ### HTTP request headers
8668
+
8669
+ - **Content-Type**: application/json
8670
+ - **Accept**: application/json
8671
+
8672
+
8673
+
@@ -9725,5 +9725,58 @@ module UltracartClient
9725
9725
  end
9726
9726
  return data, status_code, headers
9727
9727
  end
9728
+ # Validate AWS Event Ruler
9729
+ # @param ruler_validate_request Ruler Validate Request
9730
+ # @param [Hash] opts the optional parameters
9731
+ # @return [RulerValidationResponse]
9732
+ def validate_ruler(ruler_validate_request, opts = {})
9733
+ data, _status_code, _headers = validate_ruler_with_http_info(ruler_validate_request, opts)
9734
+ data
9735
+ end
9736
+
9737
+ # Validate AWS Event Ruler
9738
+ # @param ruler_validate_request Ruler Validate Request
9739
+ # @param [Hash] opts the optional parameters
9740
+ # @return [Array<(RulerValidationResponse, Fixnum, Hash)>] RulerValidationResponse data, response status code and response headers
9741
+ def validate_ruler_with_http_info(ruler_validate_request, opts = {})
9742
+ if @api_client.config.debugging
9743
+ @api_client.config.logger.debug 'Calling API: StorefrontApi.validate_ruler ...'
9744
+ end
9745
+ # verify the required parameter 'ruler_validate_request' is set
9746
+ if @api_client.config.client_side_validation && ruler_validate_request.nil?
9747
+ fail ArgumentError, "Missing the required parameter 'ruler_validate_request' when calling StorefrontApi.validate_ruler"
9748
+ end
9749
+ # resource path
9750
+ local_var_path = '/storefront/ruler/validate'
9751
+
9752
+ # query parameters
9753
+ query_params = {}
9754
+
9755
+ # header parameters
9756
+ header_params = {}
9757
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
9758
+ # HTTP header 'Accept' (if needed)
9759
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
9760
+ # HTTP header 'Content-Type'
9761
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
9762
+
9763
+ # form parameters
9764
+ form_params = {}
9765
+
9766
+ # http body (model)
9767
+ post_body = @api_client.object_to_http_body(ruler_validate_request)
9768
+ auth_names = ['ultraCartBrowserApiKey', 'ultraCartOauth', 'ultraCartSimpleApiKey']
9769
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
9770
+ :header_params => header_params,
9771
+ :query_params => query_params,
9772
+ :form_params => form_params,
9773
+ :body => post_body,
9774
+ :auth_names => auth_names,
9775
+ :return_type => 'RulerValidationResponse')
9776
+ if @api_client.config.debugging
9777
+ @api_client.config.logger.debug "API called: StorefrontApi#validate_ruler\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
9778
+ end
9779
+ return data, status_code, headers
9780
+ end
9728
9781
  end
9729
9782
  end
@@ -29,6 +29,9 @@ module UltracartClient
29
29
  # countries
30
30
  attr_accessor :countries
31
31
 
32
+ # loyalty_ledger_descriptions
33
+ attr_accessor :loyalty_ledger_descriptions
34
+
32
35
  # loyalty_program_type
33
36
  attr_accessor :loyalty_program_type
34
37
 
@@ -52,6 +55,7 @@ module UltracartClient
52
55
  :'card_exp_years' => :'card_exp_years',
53
56
  :'card_types' => :'card_types',
54
57
  :'countries' => :'countries',
58
+ :'loyalty_ledger_descriptions' => :'loyalty_ledger_descriptions',
55
59
  :'loyalty_program_type' => :'loyalty_program_type',
56
60
  :'qb_classes' => :'qb_classes',
57
61
  :'sales_rep_codes' => :'sales_rep_codes',
@@ -68,6 +72,7 @@ module UltracartClient
68
72
  :'card_exp_years' => :'Array<String>',
69
73
  :'card_types' => :'Array<String>',
70
74
  :'countries' => :'Array<Country>',
75
+ :'loyalty_ledger_descriptions' => :'Array<String>',
71
76
  :'loyalty_program_type' => :'String',
72
77
  :'qb_classes' => :'Array<String>',
73
78
  :'sales_rep_codes' => :'Array<String>',
@@ -114,6 +119,12 @@ module UltracartClient
114
119
  end
115
120
  end
116
121
 
122
+ if attributes.has_key?(:'loyalty_ledger_descriptions')
123
+ if (value = attributes[:'loyalty_ledger_descriptions']).is_a?(Array)
124
+ self.loyalty_ledger_descriptions = value
125
+ end
126
+ end
127
+
117
128
  if attributes.has_key?(:'loyalty_program_type')
118
129
  self.loyalty_program_type = attributes[:'loyalty_program_type']
119
130
  end
@@ -166,6 +177,7 @@ module UltracartClient
166
177
  card_exp_years == o.card_exp_years &&
167
178
  card_types == o.card_types &&
168
179
  countries == o.countries &&
180
+ loyalty_ledger_descriptions == o.loyalty_ledger_descriptions &&
169
181
  loyalty_program_type == o.loyalty_program_type &&
170
182
  qb_classes == o.qb_classes &&
171
183
  sales_rep_codes == o.sales_rep_codes &&
@@ -182,7 +194,7 @@ module UltracartClient
182
194
  # Calculates hash code according to all attributes.
183
195
  # @return [Fixnum] Hash code
184
196
  def hash
185
- [affiliates, card_exp_months, card_exp_years, card_types, countries, loyalty_program_type, qb_classes, sales_rep_codes, state_optional_countries, terms].hash
197
+ [affiliates, card_exp_months, card_exp_years, card_types, countries, loyalty_ledger_descriptions, loyalty_program_type, qb_classes, sales_rep_codes, state_optional_countries, terms].hash
186
198
  end
187
199
 
188
200
  # Builds the object from hash
@@ -32,6 +32,9 @@ module UltracartClient
32
32
 
33
33
  attr_accessor :postcard_from_state
34
34
 
35
+ # True if the Reviews.io integration is configured
36
+ attr_accessor :reviews_io_configured
37
+
35
38
  attr_accessor :sms_esp_twilio_uuid
36
39
 
37
40
  attr_accessor :sms_phone_number
@@ -54,6 +57,7 @@ module UltracartClient
54
57
  :'postcard_from_name' => :'postcard_from_name',
55
58
  :'postcard_from_postal_code' => :'postcard_from_postal_code',
56
59
  :'postcard_from_state' => :'postcard_from_state',
60
+ :'reviews_io_configured' => :'reviews_io_configured',
57
61
  :'sms_esp_twilio_uuid' => :'sms_esp_twilio_uuid',
58
62
  :'sms_phone_number' => :'sms_phone_number',
59
63
  :'transactional_esp_domain_user' => :'transactional_esp_domain_user',
@@ -74,6 +78,7 @@ module UltracartClient
74
78
  :'postcard_from_name' => :'String',
75
79
  :'postcard_from_postal_code' => :'String',
76
80
  :'postcard_from_state' => :'String',
81
+ :'reviews_io_configured' => :'BOOLEAN',
77
82
  :'sms_esp_twilio_uuid' => :'String',
78
83
  :'sms_phone_number' => :'String',
79
84
  :'transactional_esp_domain_user' => :'String',
@@ -126,6 +131,10 @@ module UltracartClient
126
131
  self.postcard_from_state = attributes[:'postcard_from_state']
127
132
  end
128
133
 
134
+ if attributes.has_key?(:'reviews_io_configured')
135
+ self.reviews_io_configured = attributes[:'reviews_io_configured']
136
+ end
137
+
129
138
  if attributes.has_key?(:'sms_esp_twilio_uuid')
130
139
  self.sms_esp_twilio_uuid = attributes[:'sms_esp_twilio_uuid']
131
140
  end
@@ -174,6 +183,7 @@ module UltracartClient
174
183
  postcard_from_name == o.postcard_from_name &&
175
184
  postcard_from_postal_code == o.postcard_from_postal_code &&
176
185
  postcard_from_state == o.postcard_from_state &&
186
+ reviews_io_configured == o.reviews_io_configured &&
177
187
  sms_esp_twilio_uuid == o.sms_esp_twilio_uuid &&
178
188
  sms_phone_number == o.sms_phone_number &&
179
189
  transactional_esp_domain_user == o.transactional_esp_domain_user &&
@@ -190,7 +200,7 @@ module UltracartClient
190
200
  # Calculates hash code according to all attributes.
191
201
  # @return [Fixnum] Hash code
192
202
  def hash
193
- [marketing_esp_domain_user, marketing_esp_domain_uuid, marketing_esp_friendly_name, postcard_from_address1, postcard_from_address2, postcard_from_city, postcard_from_name, postcard_from_postal_code, postcard_from_state, sms_esp_twilio_uuid, sms_phone_number, transactional_esp_domain_user, transactional_esp_domain_uuid, transactional_esp_friendly_name].hash
203
+ [marketing_esp_domain_user, marketing_esp_domain_uuid, marketing_esp_friendly_name, postcard_from_address1, postcard_from_address2, postcard_from_city, postcard_from_name, postcard_from_postal_code, postcard_from_state, reviews_io_configured, sms_esp_twilio_uuid, sms_phone_number, transactional_esp_domain_user, transactional_esp_domain_uuid, transactional_esp_friendly_name].hash
194
204
  end
195
205
 
196
206
  # Builds the object from hash
@@ -0,0 +1,184 @@
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 RulerValidationRequest
17
+ attr_accessor :ruler
18
+
19
+ # Attribute mapping from ruby-style variable name to JSON key.
20
+ def self.attribute_map
21
+ {
22
+ :'ruler' => :'ruler'
23
+ }
24
+ end
25
+
26
+ # Attribute type mapping.
27
+ def self.swagger_types
28
+ {
29
+ :'ruler' => :'String'
30
+ }
31
+ end
32
+
33
+ # Initializes the object
34
+ # @param [Hash] attributes Model attributes in the form of hash
35
+ def initialize(attributes = {})
36
+ return unless attributes.is_a?(Hash)
37
+
38
+ # convert string to symbol for hash key
39
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
40
+
41
+ if attributes.has_key?(:'ruler')
42
+ self.ruler = attributes[:'ruler']
43
+ end
44
+ end
45
+
46
+ # Show invalid properties with the reasons. Usually used together with valid?
47
+ # @return Array for valid properties with the reasons
48
+ def list_invalid_properties
49
+ invalid_properties = Array.new
50
+ invalid_properties
51
+ end
52
+
53
+ # Check to see if the all the properties in the model are valid
54
+ # @return true if the model is valid
55
+ def valid?
56
+ true
57
+ end
58
+
59
+ # Checks equality by comparing each attribute.
60
+ # @param [Object] Object to be compared
61
+ def ==(o)
62
+ return true if self.equal?(o)
63
+ self.class == o.class &&
64
+ ruler == o.ruler
65
+ end
66
+
67
+ # @see the `==` method
68
+ # @param [Object] Object to be compared
69
+ def eql?(o)
70
+ self == o
71
+ end
72
+
73
+ # Calculates hash code according to all attributes.
74
+ # @return [Fixnum] Hash code
75
+ def hash
76
+ [ruler].hash
77
+ end
78
+
79
+ # Builds the object from hash
80
+ # @param [Hash] attributes Model attributes in the form of hash
81
+ # @return [Object] Returns the model itself
82
+ def build_from_hash(attributes)
83
+ return nil unless attributes.is_a?(Hash)
84
+ self.class.swagger_types.each_pair do |key, type|
85
+ if type =~ /\AArray<(.*)>/i
86
+ # check to ensure the input is an array given that the attribute
87
+ # is documented as an array but the input is not
88
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
89
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
90
+ end
91
+ elsif !attributes[self.class.attribute_map[key]].nil?
92
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
93
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
94
+ end
95
+
96
+ self
97
+ end
98
+
99
+ # Deserializes the data based on type
100
+ # @param string type Data type
101
+ # @param string value Value to be deserialized
102
+ # @return [Object] Deserialized data
103
+ def _deserialize(type, value)
104
+ case type.to_sym
105
+ when :DateTime
106
+ DateTime.parse(value)
107
+ when :Date
108
+ Date.parse(value)
109
+ when :String
110
+ value.to_s
111
+ when :Integer
112
+ value.to_i
113
+ when :Float
114
+ value.to_f
115
+ when :BOOLEAN
116
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
117
+ true
118
+ else
119
+ false
120
+ end
121
+ when :Object
122
+ # generic object (usually a Hash), return directly
123
+ value
124
+ when /\AArray<(?<inner_type>.+)>\z/
125
+ inner_type = Regexp.last_match[:inner_type]
126
+ value.map { |v| _deserialize(inner_type, v) }
127
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
128
+ k_type = Regexp.last_match[:k_type]
129
+ v_type = Regexp.last_match[:v_type]
130
+ {}.tap do |hash|
131
+ value.each do |k, v|
132
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
133
+ end
134
+ end
135
+ else # model
136
+ temp_model = UltracartClient.const_get(type).new
137
+ temp_model.build_from_hash(value)
138
+ end
139
+ end
140
+
141
+ # Returns the string representation of the object
142
+ # @return [String] String presentation of the object
143
+ def to_s
144
+ to_hash.to_s
145
+ end
146
+
147
+ # to_body is an alias to to_hash (backward compatibility)
148
+ # @return [Hash] Returns the object in the form of hash
149
+ def to_body
150
+ to_hash
151
+ end
152
+
153
+ # Returns the object in the form of hash
154
+ # @return [Hash] Returns the object in the form of hash
155
+ def to_hash
156
+ hash = {}
157
+ self.class.attribute_map.each_pair do |attr, param|
158
+ value = self.send(attr)
159
+ next if value.nil?
160
+ hash[param] = _to_hash(value)
161
+ end
162
+ hash
163
+ end
164
+
165
+ # Outputs non-array value in the form of hash
166
+ # For object, use to_hash. Otherwise, just return the value
167
+ # @param [Object] value Any valid value
168
+ # @return [Hash] Returns the value in the form of hash
169
+ def _to_hash(value)
170
+ if value.is_a?(Array)
171
+ value.compact.map { |v| _to_hash(v) }
172
+ elsif value.is_a?(Hash)
173
+ {}.tap do |hash|
174
+ value.each { |k, v| hash[k] = _to_hash(v) }
175
+ end
176
+ elsif value.respond_to? :to_hash
177
+ value.to_hash
178
+ else
179
+ value
180
+ end
181
+ end
182
+
183
+ end
184
+ end
@@ -0,0 +1,193 @@
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 RulerValidationResponse
17
+ attr_accessor :error_message
18
+
19
+ attr_accessor :valid
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'error_message' => :'error_message',
25
+ :'valid' => :'valid'
26
+ }
27
+ end
28
+
29
+ # Attribute type mapping.
30
+ def self.swagger_types
31
+ {
32
+ :'error_message' => :'String',
33
+ :'valid' => :'BOOLEAN'
34
+ }
35
+ end
36
+
37
+ # Initializes the object
38
+ # @param [Hash] attributes Model attributes in the form of hash
39
+ def initialize(attributes = {})
40
+ return unless attributes.is_a?(Hash)
41
+
42
+ # convert string to symbol for hash key
43
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
44
+
45
+ if attributes.has_key?(:'error_message')
46
+ self.error_message = attributes[:'error_message']
47
+ end
48
+
49
+ if attributes.has_key?(:'valid')
50
+ self.valid = attributes[:'valid']
51
+ end
52
+ end
53
+
54
+ # Show invalid properties with the reasons. Usually used together with valid?
55
+ # @return Array for valid properties with the reasons
56
+ def list_invalid_properties
57
+ invalid_properties = Array.new
58
+ invalid_properties
59
+ end
60
+
61
+ # Check to see if the all the properties in the model are valid
62
+ # @return true if the model is valid
63
+ def valid?
64
+ true
65
+ end
66
+
67
+ # Checks equality by comparing each attribute.
68
+ # @param [Object] Object to be compared
69
+ def ==(o)
70
+ return true if self.equal?(o)
71
+ self.class == o.class &&
72
+ error_message == o.error_message &&
73
+ valid == o.valid
74
+ end
75
+
76
+ # @see the `==` method
77
+ # @param [Object] Object to be compared
78
+ def eql?(o)
79
+ self == o
80
+ end
81
+
82
+ # Calculates hash code according to all attributes.
83
+ # @return [Fixnum] Hash code
84
+ def hash
85
+ [error_message, valid].hash
86
+ end
87
+
88
+ # Builds the object from hash
89
+ # @param [Hash] attributes Model attributes in the form of hash
90
+ # @return [Object] Returns the model itself
91
+ def build_from_hash(attributes)
92
+ return nil unless attributes.is_a?(Hash)
93
+ self.class.swagger_types.each_pair do |key, type|
94
+ if type =~ /\AArray<(.*)>/i
95
+ # check to ensure the input is an array given that the attribute
96
+ # is documented as an array but the input is not
97
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
98
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
99
+ end
100
+ elsif !attributes[self.class.attribute_map[key]].nil?
101
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
102
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
103
+ end
104
+
105
+ self
106
+ end
107
+
108
+ # Deserializes the data based on type
109
+ # @param string type Data type
110
+ # @param string value Value to be deserialized
111
+ # @return [Object] Deserialized data
112
+ def _deserialize(type, value)
113
+ case type.to_sym
114
+ when :DateTime
115
+ DateTime.parse(value)
116
+ when :Date
117
+ Date.parse(value)
118
+ when :String
119
+ value.to_s
120
+ when :Integer
121
+ value.to_i
122
+ when :Float
123
+ value.to_f
124
+ when :BOOLEAN
125
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
126
+ true
127
+ else
128
+ false
129
+ end
130
+ when :Object
131
+ # generic object (usually a Hash), return directly
132
+ value
133
+ when /\AArray<(?<inner_type>.+)>\z/
134
+ inner_type = Regexp.last_match[:inner_type]
135
+ value.map { |v| _deserialize(inner_type, v) }
136
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
137
+ k_type = Regexp.last_match[:k_type]
138
+ v_type = Regexp.last_match[:v_type]
139
+ {}.tap do |hash|
140
+ value.each do |k, v|
141
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
142
+ end
143
+ end
144
+ else # model
145
+ temp_model = UltracartClient.const_get(type).new
146
+ temp_model.build_from_hash(value)
147
+ end
148
+ end
149
+
150
+ # Returns the string representation of the object
151
+ # @return [String] String presentation of the object
152
+ def to_s
153
+ to_hash.to_s
154
+ end
155
+
156
+ # to_body is an alias to to_hash (backward compatibility)
157
+ # @return [Hash] Returns the object in the form of hash
158
+ def to_body
159
+ to_hash
160
+ end
161
+
162
+ # Returns the object in the form of hash
163
+ # @return [Hash] Returns the object in the form of hash
164
+ def to_hash
165
+ hash = {}
166
+ self.class.attribute_map.each_pair do |attr, param|
167
+ value = self.send(attr)
168
+ next if value.nil?
169
+ hash[param] = _to_hash(value)
170
+ end
171
+ hash
172
+ end
173
+
174
+ # Outputs non-array value in the form of hash
175
+ # For object, use to_hash. Otherwise, just return the value
176
+ # @param [Object] value Any valid value
177
+ # @return [Hash] Returns the value in the form of hash
178
+ def _to_hash(value)
179
+ if value.is_a?(Array)
180
+ value.compact.map { |v| _to_hash(v) }
181
+ elsif value.is_a?(Hash)
182
+ {}.tap do |hash|
183
+ value.each { |k, v| hash[k] = _to_hash(v) }
184
+ end
185
+ elsif value.respond_to? :to_hash
186
+ value.to_hash
187
+ else
188
+ value
189
+ end
190
+ end
191
+
192
+ end
193
+ 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.42'
14
+ VERSION = '3.10.45'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -567,6 +567,8 @@ require 'ultracart_api/models/register_affiliate_click_request'
567
567
  require 'ultracart_api/models/register_affiliate_click_response'
568
568
  require 'ultracart_api/models/response_metadata'
569
569
  require 'ultracart_api/models/result_set'
570
+ require 'ultracart_api/models/ruler_validation_request'
571
+ require 'ultracart_api/models/ruler_validation_response'
570
572
  require 'ultracart_api/models/screen_recording'
571
573
  require 'ultracart_api/models/screen_recording_ad_platform'
572
574
  require 'ultracart_api/models/screen_recording_filter'
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.42
4
+ version: 3.10.45
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-30 00:00:00.000000000 Z
11
+ date: 2022-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -785,6 +785,8 @@ files:
785
785
  - docs/RegisterAffiliateClickResponse.md
786
786
  - docs/ResponseMetadata.md
787
787
  - docs/ResultSet.md
788
+ - docs/RulerValidationRequest.md
789
+ - docs/RulerValidationResponse.md
788
790
  - docs/ScreenRecording.md
789
791
  - docs/ScreenRecordingAdPlatform.md
790
792
  - docs/ScreenRecordingFilter.md
@@ -1479,6 +1481,8 @@ files:
1479
1481
  - lib/ultracart_api/models/register_affiliate_click_response.rb
1480
1482
  - lib/ultracart_api/models/response_metadata.rb
1481
1483
  - lib/ultracart_api/models/result_set.rb
1484
+ - lib/ultracart_api/models/ruler_validation_request.rb
1485
+ - lib/ultracart_api/models/ruler_validation_response.rb
1482
1486
  - lib/ultracart_api/models/screen_recording.rb
1483
1487
  - lib/ultracart_api/models/screen_recording_ad_platform.rb
1484
1488
  - lib/ultracart_api/models/screen_recording_filter.rb