ultracart_api 4.0.60.rc → 4.0.61.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: 261fc0f7647c885bfe5e3441803dcd3ee3669b3681f033712659a90d46db0a1b
4
- data.tar.gz: a2360ff50b965ca8bbbd3ab7f35dd01ab2e799b04b799c228b9e25e8db1a5feb
3
+ metadata.gz: 6d3fb3d72ab8ae823ff9d7c55d08505646e0cee81134dded52b0ad0c521636b7
4
+ data.tar.gz: 7356b90a1ce591d823b08c065c19814aff2c22b621f80411823d57801bf16cfe
5
5
  SHA512:
6
- metadata.gz: e8cf596bdb392ac3ff9a80cf4fde5bc918db647d68e4f48a1b7dff4bc12bcef41ceb47ecc817923b00f76983b1d668ce373c03c5d5fdac759f18d82b9f2fec02
7
- data.tar.gz: 89cb12a031838e43525266c1723a68fb2bca22c2d5e15965f0653b8286c9a5dad121d98f2371cdca34d9d2aa51e36b70162bddee139e935e3e121ee8abbb99fc
6
+ metadata.gz: b565e35b1bb58cfb82d276ce34baa85a912bdfcf8c08bc1de2dcc8d05ab9bbcb32c7a85cdb656000d137f873d1cdc7075763b74b1f292552fbaae5bcad5e5192
7
+ data.tar.gz: f502b71b1630f5055923a8062aec2d34a16007a09fbf2c6d9b830ec9c8e1205f8c61225289ba71168dc101bbc95fbb4c1c49e310c3e4784e527f737856c9512d
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.60.rc
10
+ - Package version: 4.0.61.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.60.rc.gem
27
+ gem install ./ultracart_api-4.0.61.rc.gem
28
28
  ```
29
29
 
30
- (for development, run `gem install --dev ./ultracart_api-4.0.60.rc.gem` to install the development dependencies)
30
+ (for development, run `gem install --dev ./ultracart_api-4.0.61.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.60.rc'
36
+ gem 'ultracart_api', '~> 4.0.61.rc'
37
37
 
38
38
  ### Install from Git
39
39
 
@@ -399,6 +399,7 @@ Class | Method | HTTP request | Description
399
399
  *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
400
400
  *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
401
401
  *UltracartClient::StorefrontApi* | [**update_twilio_account**](docs/StorefrontApi.md#update_twilio_account) | **PUT** /storefront/twilio/accounts/{esp_twilio_uuid} | Update Twilio account
402
+ *UltracartClient::StorefrontApi* | [**validate_ruler**](docs/StorefrontApi.md#validate_ruler) | **POST** /storefront/ruler/validate | Validate AWS Event Ruler
402
403
  *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
403
404
  *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
404
405
  *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
@@ -1000,6 +1001,8 @@ Class | Method | HTTP request | Description
1000
1001
  - [UltracartClient::RegisterAffiliateClickResponse](docs/RegisterAffiliateClickResponse.md)
1001
1002
  - [UltracartClient::ResponseMetadata](docs/ResponseMetadata.md)
1002
1003
  - [UltracartClient::ResultSet](docs/ResultSet.md)
1004
+ - [UltracartClient::RulerValidationRequest](docs/RulerValidationRequest.md)
1005
+ - [UltracartClient::RulerValidationResponse](docs/RulerValidationResponse.md)
1003
1006
  - [UltracartClient::ScreenRecording](docs/ScreenRecording.md)
1004
1007
  - [UltracartClient::ScreenRecordingAdPlatform](docs/ScreenRecordingAdPlatform.md)
1005
1008
  - [UltracartClient::ScreenRecordingFilter](docs/ScreenRecordingFilter.md)
@@ -1188,6 +1191,7 @@ Not every change is committed to every SDK.
1188
1191
 
1189
1192
  | Version | Date | Comments |
1190
1193
  | --: | :-: | --- |
1194
+ | 4.0.61-RC | 09/07/2022 | sf comms - using aws event ruler for bigquery segmentation validation |
1191
1195
  | 4.0.60-RC | 09/02/2022 | customer editor added loyal ledger descriptions |
1192
1196
  | 4.0.59-RC | 08/30/2022 | storefront comm fields for sms configuration |
1193
1197
  | 4.0.58-RC | 08/26/2022 | postcard address fields for comm sequence testing |
@@ -0,0 +1,18 @@
1
+ # UltracartClient::RulerValidationRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **ruler** | **String** | | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'ultracart_api'
13
+
14
+ instance = UltracartClient::RulerValidationRequest.new(
15
+ ruler: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,20 @@
1
+ # UltracartClient::RulerValidationResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **error_message** | **String** | | [optional] |
8
+ | **valid** | **Boolean** | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'ultracart_api'
14
+
15
+ instance = UltracartClient::RulerValidationResponse.new(
16
+ error_message: null,
17
+ valid: null
18
+ )
19
+ ```
20
+
@@ -168,6 +168,7 @@ All URIs are relative to *https://secure.ultracart.com/rest/v2*
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
@@ -11933,3 +11934,72 @@ end
11933
11934
  - **Content-Type**: application/json
11934
11935
  - **Accept**: application/json
11935
11936
 
11937
+
11938
+ ## validate_ruler
11939
+
11940
+ > <RulerValidationResponse> validate_ruler(ruler_validate_request)
11941
+
11942
+ Validate AWS Event Ruler
11943
+
11944
+ ### Examples
11945
+
11946
+ ```ruby
11947
+ require 'time'
11948
+ require 'ultracart_api'
11949
+ require 'json'
11950
+ require 'yaml'
11951
+ require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
11952
+
11953
+ # This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
11954
+ # As such, this might not be the best way to use this object.
11955
+ # Please see https://github.com/UltraCart/sdk_samples for working examples.
11956
+
11957
+ api = UltracartClient::StorefrontApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
11958
+ ruler_validate_request = UltracartClient::RulerValidationRequest.new # RulerValidationRequest | Ruler Validate Request
11959
+
11960
+ begin
11961
+ # Validate AWS Event Ruler
11962
+ result = api_instance.validate_ruler(ruler_validate_request)
11963
+ p result
11964
+ rescue UltracartClient::ApiError => e
11965
+ puts "Error when calling StorefrontApi->validate_ruler: #{e}"
11966
+ end
11967
+ ```
11968
+
11969
+ #### Using the validate_ruler_with_http_info variant
11970
+
11971
+ This returns an Array which contains the response data, status code and headers.
11972
+
11973
+ > <Array(<RulerValidationResponse>, Integer, Hash)> validate_ruler_with_http_info(ruler_validate_request)
11974
+
11975
+ ```ruby
11976
+ begin
11977
+ # Validate AWS Event Ruler
11978
+ data, status_code, headers = api_instance.validate_ruler_with_http_info(ruler_validate_request)
11979
+ p status_code # => 2xx
11980
+ p headers # => { ... }
11981
+ p data # => <RulerValidationResponse>
11982
+ rescue UltracartClient::ApiError => e
11983
+ puts "Error when calling StorefrontApi->validate_ruler_with_http_info: #{e}"
11984
+ end
11985
+ ```
11986
+
11987
+ ### Parameters
11988
+
11989
+ | Name | Type | Description | Notes |
11990
+ | ---- | ---- | ----------- | ----- |
11991
+ | **ruler_validate_request** | [**RulerValidationRequest**](RulerValidationRequest.md) | Ruler Validate Request | |
11992
+
11993
+ ### Return type
11994
+
11995
+ [**RulerValidationResponse**](RulerValidationResponse.md)
11996
+
11997
+ ### Authorization
11998
+
11999
+ [ultraCartBrowserApiKey](../README.md#ultraCartBrowserApiKey), [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
12000
+
12001
+ ### HTTP request headers
12002
+
12003
+ - **Content-Type**: application/json
12004
+ - **Accept**: application/json
12005
+
@@ -11538,5 +11538,72 @@ module UltracartClient
11538
11538
  end
11539
11539
  return data, status_code, headers
11540
11540
  end
11541
+
11542
+ # Validate AWS Event Ruler
11543
+ # @param ruler_validate_request [RulerValidationRequest] Ruler Validate Request
11544
+ # @param [Hash] opts the optional parameters
11545
+ # @return [RulerValidationResponse]
11546
+ def validate_ruler(ruler_validate_request, opts = {})
11547
+ data, _status_code, _headers = validate_ruler_with_http_info(ruler_validate_request, opts)
11548
+ data
11549
+ end
11550
+
11551
+ # Validate AWS Event Ruler
11552
+ # @param ruler_validate_request [RulerValidationRequest] Ruler Validate Request
11553
+ # @param [Hash] opts the optional parameters
11554
+ # @return [Array<(RulerValidationResponse, Integer, Hash)>] RulerValidationResponse data, response status code and response headers
11555
+ def validate_ruler_with_http_info(ruler_validate_request, opts = {})
11556
+ if @api_client.config.debugging
11557
+ @api_client.config.logger.debug 'Calling API: StorefrontApi.validate_ruler ...'
11558
+ end
11559
+ # verify the required parameter 'ruler_validate_request' is set
11560
+ if @api_client.config.client_side_validation && ruler_validate_request.nil?
11561
+ fail ArgumentError, "Missing the required parameter 'ruler_validate_request' when calling StorefrontApi.validate_ruler"
11562
+ end
11563
+ # resource path
11564
+ local_var_path = '/storefront/ruler/validate'
11565
+
11566
+ # query parameters
11567
+ query_params = opts[:query_params] || {}
11568
+
11569
+ # header parameters
11570
+ header_params = opts[:header_params] || {}
11571
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
11572
+ # HTTP header 'Accept' (if needed)
11573
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
11574
+ # HTTP header 'Content-Type'
11575
+ content_type = @api_client.select_header_content_type(['application/json'])
11576
+ if !content_type.nil?
11577
+ header_params['Content-Type'] = content_type
11578
+ end
11579
+
11580
+ # form parameters
11581
+ form_params = opts[:form_params] || {}
11582
+
11583
+ # http body (model)
11584
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(ruler_validate_request)
11585
+
11586
+ # return_type
11587
+ return_type = opts[:debug_return_type] || 'RulerValidationResponse'
11588
+
11589
+ # auth_names
11590
+ auth_names = opts[:debug_auth_names] || ['ultraCartBrowserApiKey', 'ultraCartOauth', 'ultraCartSimpleApiKey']
11591
+
11592
+ new_options = opts.merge(
11593
+ :operation => :"StorefrontApi.validate_ruler",
11594
+ :header_params => header_params,
11595
+ :query_params => query_params,
11596
+ :form_params => form_params,
11597
+ :body => post_body,
11598
+ :auth_names => auth_names,
11599
+ :return_type => return_type
11600
+ )
11601
+
11602
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
11603
+ if @api_client.config.debugging
11604
+ @api_client.config.logger.debug "API called: StorefrontApi#validate_ruler\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
11605
+ end
11606
+ return data, status_code, headers
11607
+ end
11541
11608
  end
11542
11609
  end
@@ -0,0 +1,219 @@
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 RulerValidationRequest
18
+ attr_accessor :ruler
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'ruler' => :'ruler'
24
+ }
25
+ end
26
+
27
+ # Returns all the JSON keys this model knows about
28
+ def self.acceptable_attributes
29
+ attribute_map.values
30
+ end
31
+
32
+ # Attribute type mapping.
33
+ def self.openapi_types
34
+ {
35
+ :'ruler' => :'String'
36
+ }
37
+ end
38
+
39
+ # List of attributes with nullable: true
40
+ def self.openapi_nullable
41
+ Set.new([
42
+ ])
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param [Hash] attributes Model attributes in the form of hash
47
+ def initialize(attributes = {})
48
+ if (!attributes.is_a?(Hash))
49
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::RulerValidationRequest` initialize method"
50
+ end
51
+
52
+ # check to see if the attribute exists and convert string to symbol for hash key
53
+ attributes = attributes.each_with_object({}) { |(k, v), h|
54
+ if (!self.class.attribute_map.key?(k.to_sym))
55
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::RulerValidationRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
56
+ end
57
+ h[k.to_sym] = v
58
+ }
59
+
60
+ if attributes.key?(:'ruler')
61
+ self.ruler = attributes[:'ruler']
62
+ end
63
+ end
64
+
65
+ # Show invalid properties with the reasons. Usually used together with valid?
66
+ # @return Array for valid properties with the reasons
67
+ def list_invalid_properties
68
+ invalid_properties = Array.new
69
+ invalid_properties
70
+ end
71
+
72
+ # Check to see if the all the properties in the model are valid
73
+ # @return true if the model is valid
74
+ def valid?
75
+ true
76
+ end
77
+
78
+ # Checks equality by comparing each attribute.
79
+ # @param [Object] Object to be compared
80
+ def ==(o)
81
+ return true if self.equal?(o)
82
+ self.class == o.class &&
83
+ ruler == o.ruler
84
+ end
85
+
86
+ # @see the `==` method
87
+ # @param [Object] Object to be compared
88
+ def eql?(o)
89
+ self == o
90
+ end
91
+
92
+ # Calculates hash code according to all attributes.
93
+ # @return [Integer] Hash code
94
+ def hash
95
+ [ruler].hash
96
+ end
97
+
98
+ # Builds the object from hash
99
+ # @param [Hash] attributes Model attributes in the form of hash
100
+ # @return [Object] Returns the model itself
101
+ def self.build_from_hash(attributes)
102
+ new.build_from_hash(attributes)
103
+ end
104
+
105
+ # Builds the object from hash
106
+ # @param [Hash] attributes Model attributes in the form of hash
107
+ # @return [Object] Returns the model itself
108
+ def build_from_hash(attributes)
109
+ return nil unless attributes.is_a?(Hash)
110
+ attributes = attributes.transform_keys(&:to_sym)
111
+ self.class.openapi_types.each_pair do |key, type|
112
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
113
+ self.send("#{key}=", nil)
114
+ elsif type =~ /\AArray<(.*)>/i
115
+ # check to ensure the input is an array given that the attribute
116
+ # is documented as an array but the input is not
117
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
118
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
119
+ end
120
+ elsif !attributes[self.class.attribute_map[key]].nil?
121
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
122
+ end
123
+ end
124
+
125
+ self
126
+ end
127
+
128
+ # Deserializes the data based on type
129
+ # @param string type Data type
130
+ # @param string value Value to be deserialized
131
+ # @return [Object] Deserialized data
132
+ def _deserialize(type, value)
133
+ case type.to_sym
134
+ when :Time
135
+ Time.parse(value)
136
+ when :Date
137
+ Date.parse(value)
138
+ when :String
139
+ value.to_s
140
+ when :Integer
141
+ value.to_i
142
+ when :Float
143
+ value.to_f
144
+ when :Boolean
145
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
146
+ true
147
+ else
148
+ false
149
+ end
150
+ when :Object
151
+ # generic object (usually a Hash), return directly
152
+ value
153
+ when /\AArray<(?<inner_type>.+)>\z/
154
+ inner_type = Regexp.last_match[:inner_type]
155
+ value.map { |v| _deserialize(inner_type, v) }
156
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
157
+ k_type = Regexp.last_match[:k_type]
158
+ v_type = Regexp.last_match[:v_type]
159
+ {}.tap do |hash|
160
+ value.each do |k, v|
161
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
162
+ end
163
+ end
164
+ else # model
165
+ # models (e.g. Pet) or oneOf
166
+ klass = UltracartClient.const_get(type)
167
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
168
+ end
169
+ end
170
+
171
+ # Returns the string representation of the object
172
+ # @return [String] String presentation of the object
173
+ def to_s
174
+ to_hash.to_s
175
+ end
176
+
177
+ # to_body is an alias to to_hash (backward compatibility)
178
+ # @return [Hash] Returns the object in the form of hash
179
+ def to_body
180
+ to_hash
181
+ end
182
+
183
+ # Returns the object in the form of hash
184
+ # @return [Hash] Returns the object in the form of hash
185
+ def to_hash
186
+ hash = {}
187
+ self.class.attribute_map.each_pair do |attr, param|
188
+ value = self.send(attr)
189
+ if value.nil?
190
+ is_nullable = self.class.openapi_nullable.include?(attr)
191
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
192
+ end
193
+
194
+ hash[param] = _to_hash(value)
195
+ end
196
+ hash
197
+ end
198
+
199
+ # Outputs non-array value in the form of hash
200
+ # For object, use to_hash. Otherwise, just return the value
201
+ # @param [Object] value Any valid value
202
+ # @return [Hash] Returns the value in the form of hash
203
+ def _to_hash(value)
204
+ if value.is_a?(Array)
205
+ value.compact.map { |v| _to_hash(v) }
206
+ elsif value.is_a?(Hash)
207
+ {}.tap do |hash|
208
+ value.each { |k, v| hash[k] = _to_hash(v) }
209
+ end
210
+ elsif value.respond_to? :to_hash
211
+ value.to_hash
212
+ else
213
+ value
214
+ end
215
+ end
216
+
217
+ end
218
+
219
+ end
@@ -0,0 +1,228 @@
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 RulerValidationResponse
18
+ attr_accessor :error_message
19
+
20
+ attr_accessor :valid
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'error_message' => :'error_message',
26
+ :'valid' => :'valid'
27
+ }
28
+ end
29
+
30
+ # Returns all the JSON keys this model knows about
31
+ def self.acceptable_attributes
32
+ attribute_map.values
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ def self.openapi_types
37
+ {
38
+ :'error_message' => :'String',
39
+ :'valid' => :'Boolean'
40
+ }
41
+ end
42
+
43
+ # List of attributes with nullable: true
44
+ def self.openapi_nullable
45
+ Set.new([
46
+ ])
47
+ end
48
+
49
+ # Initializes the object
50
+ # @param [Hash] attributes Model attributes in the form of hash
51
+ def initialize(attributes = {})
52
+ if (!attributes.is_a?(Hash))
53
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::RulerValidationResponse` initialize method"
54
+ end
55
+
56
+ # check to see if the attribute exists and convert string to symbol for hash key
57
+ attributes = attributes.each_with_object({}) { |(k, v), h|
58
+ if (!self.class.attribute_map.key?(k.to_sym))
59
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::RulerValidationResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
60
+ end
61
+ h[k.to_sym] = v
62
+ }
63
+
64
+ if attributes.key?(:'error_message')
65
+ self.error_message = attributes[:'error_message']
66
+ end
67
+
68
+ if attributes.key?(:'valid')
69
+ self.valid = attributes[:'valid']
70
+ end
71
+ end
72
+
73
+ # Show invalid properties with the reasons. Usually used together with valid?
74
+ # @return Array for valid properties with the reasons
75
+ def list_invalid_properties
76
+ invalid_properties = Array.new
77
+ invalid_properties
78
+ end
79
+
80
+ # Check to see if the all the properties in the model are valid
81
+ # @return true if the model is valid
82
+ def valid?
83
+ true
84
+ end
85
+
86
+ # Checks equality by comparing each attribute.
87
+ # @param [Object] Object to be compared
88
+ def ==(o)
89
+ return true if self.equal?(o)
90
+ self.class == o.class &&
91
+ error_message == o.error_message &&
92
+ valid == o.valid
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 [Integer] Hash code
103
+ def hash
104
+ [error_message, valid].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 self.build_from_hash(attributes)
111
+ new.build_from_hash(attributes)
112
+ end
113
+
114
+ # Builds the object from hash
115
+ # @param [Hash] attributes Model attributes in the form of hash
116
+ # @return [Object] Returns the model itself
117
+ def build_from_hash(attributes)
118
+ return nil unless attributes.is_a?(Hash)
119
+ attributes = attributes.transform_keys(&:to_sym)
120
+ self.class.openapi_types.each_pair do |key, type|
121
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
122
+ self.send("#{key}=", nil)
123
+ elsif type =~ /\AArray<(.*)>/i
124
+ # check to ensure the input is an array given that the attribute
125
+ # is documented as an array but the input is not
126
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
127
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
128
+ end
129
+ elsif !attributes[self.class.attribute_map[key]].nil?
130
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
131
+ end
132
+ end
133
+
134
+ self
135
+ end
136
+
137
+ # Deserializes the data based on type
138
+ # @param string type Data type
139
+ # @param string value Value to be deserialized
140
+ # @return [Object] Deserialized data
141
+ def _deserialize(type, value)
142
+ case type.to_sym
143
+ when :Time
144
+ Time.parse(value)
145
+ when :Date
146
+ Date.parse(value)
147
+ when :String
148
+ value.to_s
149
+ when :Integer
150
+ value.to_i
151
+ when :Float
152
+ value.to_f
153
+ when :Boolean
154
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
155
+ true
156
+ else
157
+ false
158
+ end
159
+ when :Object
160
+ # generic object (usually a Hash), return directly
161
+ value
162
+ when /\AArray<(?<inner_type>.+)>\z/
163
+ inner_type = Regexp.last_match[:inner_type]
164
+ value.map { |v| _deserialize(inner_type, v) }
165
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
166
+ k_type = Regexp.last_match[:k_type]
167
+ v_type = Regexp.last_match[:v_type]
168
+ {}.tap do |hash|
169
+ value.each do |k, v|
170
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
171
+ end
172
+ end
173
+ else # model
174
+ # models (e.g. Pet) or oneOf
175
+ klass = UltracartClient.const_get(type)
176
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
177
+ end
178
+ end
179
+
180
+ # Returns the string representation of the object
181
+ # @return [String] String presentation of the object
182
+ def to_s
183
+ to_hash.to_s
184
+ end
185
+
186
+ # to_body is an alias to to_hash (backward compatibility)
187
+ # @return [Hash] Returns the object in the form of hash
188
+ def to_body
189
+ to_hash
190
+ end
191
+
192
+ # Returns the object in the form of hash
193
+ # @return [Hash] Returns the object in the form of hash
194
+ def to_hash
195
+ hash = {}
196
+ self.class.attribute_map.each_pair do |attr, param|
197
+ value = self.send(attr)
198
+ if value.nil?
199
+ is_nullable = self.class.openapi_nullable.include?(attr)
200
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
201
+ end
202
+
203
+ hash[param] = _to_hash(value)
204
+ end
205
+ hash
206
+ end
207
+
208
+ # Outputs non-array value in the form of hash
209
+ # For object, use to_hash. Otherwise, just return the value
210
+ # @param [Object] value Any valid value
211
+ # @return [Hash] Returns the value in the form of hash
212
+ def _to_hash(value)
213
+ if value.is_a?(Array)
214
+ value.compact.map { |v| _to_hash(v) }
215
+ elsif value.is_a?(Hash)
216
+ {}.tap do |hash|
217
+ value.each { |k, v| hash[k] = _to_hash(v) }
218
+ end
219
+ elsif value.respond_to? :to_hash
220
+ value.to_hash
221
+ else
222
+ value
223
+ end
224
+ end
225
+
226
+ end
227
+
228
+ 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.60.rc'
14
+ VERSION = '4.0.61.rc'
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: 4.0.60.rc
4
+ version: 4.0.61.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-09-02 00:00:00.000000000 Z
11
+ date: 2022-09-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -625,6 +625,8 @@ files:
625
625
  - docs/RegisterAffiliateClickResponse.md
626
626
  - docs/ResponseMetadata.md
627
627
  - docs/ResultSet.md
628
+ - docs/RulerValidationRequest.md
629
+ - docs/RulerValidationResponse.md
628
630
  - docs/ScreenRecording.md
629
631
  - docs/ScreenRecordingAdPlatform.md
630
632
  - docs/ScreenRecordingFilter.md
@@ -1319,6 +1321,8 @@ files:
1319
1321
  - lib/ultracart_api/models/register_affiliate_click_response.rb
1320
1322
  - lib/ultracart_api/models/response_metadata.rb
1321
1323
  - lib/ultracart_api/models/result_set.rb
1324
+ - lib/ultracart_api/models/ruler_validation_request.rb
1325
+ - lib/ultracart_api/models/ruler_validation_response.rb
1322
1326
  - lib/ultracart_api/models/screen_recording.rb
1323
1327
  - lib/ultracart_api/models/screen_recording_ad_platform.rb
1324
1328
  - lib/ultracart_api/models/screen_recording_filter.rb