ultracart_api 3.3.1 → 3.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -4
- data/docs/SingleSignOnAuthorizeResponse.md +9 -0
- data/docs/SingleSignOnTokenResponse.md +10 -0
- data/docs/SsoApi.md +4 -4
- data/lib/ultracart_api.rb +2 -0
- data/lib/ultracart_api/api/sso_api.rb +6 -6
- data/lib/ultracart_api/models/single_sign_on_authorize_response.rb +195 -0
- data/lib/ultracart_api/models/single_sign_on_token_response.rb +205 -0
- data/lib/ultracart_api/version.rb +1 -1
- metadata +5 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 94efd609acdfdc97a1723452a7e90da9fc89b3f86ae5d02b8b48c706e969018c
|
4
|
+
data.tar.gz: 7412f2aa45760fad55ea1ff684488b3054ed0cc4e2a1b5d19e8bea83ebd5bcf8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87b17f2a5b510b65647546cd87525be3840e6fb6564552c0629b5dfb696be2d89541eb669303d21bb4e55d400ad8ad850abc2190f4b9bce6a4a187f990235d90
|
7
|
+
data.tar.gz: fead47614254b4e61c3bd385a5c7c34553827cceec181ff91ef255b1dc78da3925b95629d3ed6fe7b3dbc440de4e60ee8830e88e23006460db12fe132ae554b5
|
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.3.
|
10
|
+
- Package version: 3.3.2
|
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.3.
|
27
|
+
gem install ./ultracart_api-3.3.2.gem
|
28
28
|
```
|
29
|
-
(for development, run `gem install --dev ./ultracart_api-3.3.
|
29
|
+
(for development, run `gem install --dev ./ultracart_api-3.3.2.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.3.
|
35
|
+
gem 'ultracart_api', '~> 3.3.2'
|
36
36
|
|
37
37
|
### Install from Git
|
38
38
|
|
@@ -926,7 +926,9 @@ Class | Method | HTTP request | Description
|
|
926
926
|
- [UltracartClient::SelfConfig](docs/SelfConfig.md)
|
927
927
|
- [UltracartClient::SimpleValue](docs/SimpleValue.md)
|
928
928
|
- [UltracartClient::SingleSignOnAuthorizeRequest](docs/SingleSignOnAuthorizeRequest.md)
|
929
|
+
- [UltracartClient::SingleSignOnAuthorizeResponse](docs/SingleSignOnAuthorizeResponse.md)
|
929
930
|
- [UltracartClient::SingleSignOnTokenRequest](docs/SingleSignOnTokenRequest.md)
|
931
|
+
- [UltracartClient::SingleSignOnTokenResponse](docs/SingleSignOnTokenResponse.md)
|
930
932
|
- [UltracartClient::SovosConfig](docs/SovosConfig.md)
|
931
933
|
- [UltracartClient::StateProvince](docs/StateProvince.md)
|
932
934
|
- [UltracartClient::StepWaiting](docs/StepWaiting.md)
|
@@ -1044,6 +1046,7 @@ Not every change is committed to every SDK.
|
|
1044
1046
|
|
1045
1047
|
| Version | Date | Comments |
|
1046
1048
|
| --: | :-: | --- |
|
1049
|
+
| 3.3.2 | 07/16/2021 | sso bug fixes |
|
1047
1050
|
| 3.3.1 | 07/16/2021 | screen recording - event sub text used for assisting in UX rendering |
|
1048
1051
|
| 3.3.0 | 07/16/2021 | new endpoint SingleSignOn |
|
1049
1052
|
| 3.2.15 | 07/13/2021 | storefront communications - added methods to retrieve step dispatch logs |
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# UltracartClient::SingleSignOnAuthorizeResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**expiration_dts** | **String** | Expiration date/time after which the single sign-on login operation will have timed out | [optional]
|
7
|
+
**login_url** | **String** | The URL that you should redirect the customer's browser to. This URL will begin the login process. | [optional]
|
8
|
+
|
9
|
+
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# UltracartClient::SingleSignOnTokenResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**expiration_dts** | **String** | Expiration date/time after which time the key is no longer valid | [optional]
|
7
|
+
**ip_address** | **String** | IP address of the user which we recommend you lock the simple key's usage to. | [optional]
|
8
|
+
**simple_key** | **String** | The simple key that can then be used to make SDK calls on the users behalf. | [optional]
|
9
|
+
|
10
|
+
|
data/docs/SsoApi.md
CHANGED
@@ -56,7 +56,7 @@ This endpoint does not need any parameter.
|
|
56
56
|
|
57
57
|
|
58
58
|
# **sso_authorize**
|
59
|
-
>
|
59
|
+
> SingleSignOnAuthorizeResponse sso_authorize(authorization_request)
|
60
60
|
|
61
61
|
Authorize a single sign on session
|
62
62
|
|
@@ -92,7 +92,7 @@ Name | Type | Description | Notes
|
|
92
92
|
|
93
93
|
### Return type
|
94
94
|
|
95
|
-
[**
|
95
|
+
[**SingleSignOnAuthorizeResponse**](SingleSignOnAuthorizeResponse.md)
|
96
96
|
|
97
97
|
### Authorization
|
98
98
|
|
@@ -150,7 +150,7 @@ nil (empty response body)
|
|
150
150
|
|
151
151
|
|
152
152
|
# **sso_token**
|
153
|
-
>
|
153
|
+
> SingleSignOnTokenResponse sso_token(token_request)
|
154
154
|
|
155
155
|
Exchange a single sign on code for a simple key token
|
156
156
|
|
@@ -186,7 +186,7 @@ Name | Type | Description | Notes
|
|
186
186
|
|
187
187
|
### Return type
|
188
188
|
|
189
|
-
[**
|
189
|
+
[**SingleSignOnTokenResponse**](SingleSignOnTokenResponse.md)
|
190
190
|
|
191
191
|
### Authorization
|
192
192
|
|
data/lib/ultracart_api.rb
CHANGED
@@ -546,7 +546,9 @@ require 'ultracart_api/models/screenshots_response'
|
|
546
546
|
require 'ultracart_api/models/self_config'
|
547
547
|
require 'ultracart_api/models/simple_value'
|
548
548
|
require 'ultracart_api/models/single_sign_on_authorize_request'
|
549
|
+
require 'ultracart_api/models/single_sign_on_authorize_response'
|
549
550
|
require 'ultracart_api/models/single_sign_on_token_request'
|
551
|
+
require 'ultracart_api/models/single_sign_on_token_response'
|
550
552
|
require 'ultracart_api/models/sovos_config'
|
551
553
|
require 'ultracart_api/models/state_province'
|
552
554
|
require 'ultracart_api/models/step_waiting'
|
@@ -85,7 +85,7 @@ module UltracartClient
|
|
85
85
|
# Starts the process of authorizing a single sign on session.
|
86
86
|
# @param authorization_request Authorization request
|
87
87
|
# @param [Hash] opts the optional parameters
|
88
|
-
# @return [
|
88
|
+
# @return [SingleSignOnAuthorizeResponse]
|
89
89
|
def sso_authorize(authorization_request, opts = {})
|
90
90
|
data, _status_code, _headers = sso_authorize_with_http_info(authorization_request, opts)
|
91
91
|
data
|
@@ -95,7 +95,7 @@ module UltracartClient
|
|
95
95
|
# Starts the process of authorizing a single sign on session.
|
96
96
|
# @param authorization_request Authorization request
|
97
97
|
# @param [Hash] opts the optional parameters
|
98
|
-
# @return [Array<(
|
98
|
+
# @return [Array<(SingleSignOnAuthorizeResponse, Fixnum, Hash)>] SingleSignOnAuthorizeResponse data, response status code and response headers
|
99
99
|
def sso_authorize_with_http_info(authorization_request, opts = {})
|
100
100
|
if @api_client.config.debugging
|
101
101
|
@api_client.config.logger.debug 'Calling API: SsoApi.sso_authorize ...'
|
@@ -130,7 +130,7 @@ module UltracartClient
|
|
130
130
|
:form_params => form_params,
|
131
131
|
:body => post_body,
|
132
132
|
:auth_names => auth_names,
|
133
|
-
:return_type => '
|
133
|
+
:return_type => 'SingleSignOnAuthorizeResponse')
|
134
134
|
if @api_client.config.debugging
|
135
135
|
@api_client.config.logger.debug "API called: SsoApi#sso_authorize\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
136
136
|
end
|
@@ -188,7 +188,7 @@ module UltracartClient
|
|
188
188
|
# Called by your application after receiving the code back on the redirect URI to obtain a simple key token to make API calls with
|
189
189
|
# @param token_request Token request
|
190
190
|
# @param [Hash] opts the optional parameters
|
191
|
-
# @return [
|
191
|
+
# @return [SingleSignOnTokenResponse]
|
192
192
|
def sso_token(token_request, opts = {})
|
193
193
|
data, _status_code, _headers = sso_token_with_http_info(token_request, opts)
|
194
194
|
data
|
@@ -198,7 +198,7 @@ module UltracartClient
|
|
198
198
|
# Called by your application after receiving the code back on the redirect URI to obtain a simple key token to make API calls with
|
199
199
|
# @param token_request Token request
|
200
200
|
# @param [Hash] opts the optional parameters
|
201
|
-
# @return [Array<(
|
201
|
+
# @return [Array<(SingleSignOnTokenResponse, Fixnum, Hash)>] SingleSignOnTokenResponse data, response status code and response headers
|
202
202
|
def sso_token_with_http_info(token_request, opts = {})
|
203
203
|
if @api_client.config.debugging
|
204
204
|
@api_client.config.logger.debug 'Calling API: SsoApi.sso_token ...'
|
@@ -233,7 +233,7 @@ module UltracartClient
|
|
233
233
|
:form_params => form_params,
|
234
234
|
:body => post_body,
|
235
235
|
:auth_names => auth_names,
|
236
|
-
:return_type => '
|
236
|
+
:return_type => 'SingleSignOnTokenResponse')
|
237
237
|
if @api_client.config.debugging
|
238
238
|
@api_client.config.logger.debug "API called: SsoApi#sso_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
239
239
|
end
|
@@ -0,0 +1,195 @@
|
|
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 SingleSignOnAuthorizeResponse
|
17
|
+
# Expiration date/time after which the single sign-on login operation will have timed out
|
18
|
+
attr_accessor :expiration_dts
|
19
|
+
|
20
|
+
# The URL that you should redirect the customer's browser to. This URL will begin the login process.
|
21
|
+
attr_accessor :login_url
|
22
|
+
|
23
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
24
|
+
def self.attribute_map
|
25
|
+
{
|
26
|
+
:'expiration_dts' => :'expiration_dts',
|
27
|
+
:'login_url' => :'login_url'
|
28
|
+
}
|
29
|
+
end
|
30
|
+
|
31
|
+
# Attribute type mapping.
|
32
|
+
def self.swagger_types
|
33
|
+
{
|
34
|
+
:'expiration_dts' => :'String',
|
35
|
+
:'login_url' => :'String'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# Initializes the object
|
40
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
41
|
+
def initialize(attributes = {})
|
42
|
+
return unless attributes.is_a?(Hash)
|
43
|
+
|
44
|
+
# convert string to symbol for hash key
|
45
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
46
|
+
|
47
|
+
if attributes.has_key?(:'expiration_dts')
|
48
|
+
self.expiration_dts = attributes[:'expiration_dts']
|
49
|
+
end
|
50
|
+
|
51
|
+
if attributes.has_key?(:'login_url')
|
52
|
+
self.login_url = attributes[:'login_url']
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
57
|
+
# @return Array for valid properties with the reasons
|
58
|
+
def list_invalid_properties
|
59
|
+
invalid_properties = Array.new
|
60
|
+
invalid_properties
|
61
|
+
end
|
62
|
+
|
63
|
+
# Check to see if the all the properties in the model are valid
|
64
|
+
# @return true if the model is valid
|
65
|
+
def valid?
|
66
|
+
true
|
67
|
+
end
|
68
|
+
|
69
|
+
# Checks equality by comparing each attribute.
|
70
|
+
# @param [Object] Object to be compared
|
71
|
+
def ==(o)
|
72
|
+
return true if self.equal?(o)
|
73
|
+
self.class == o.class &&
|
74
|
+
expiration_dts == o.expiration_dts &&
|
75
|
+
login_url == o.login_url
|
76
|
+
end
|
77
|
+
|
78
|
+
# @see the `==` method
|
79
|
+
# @param [Object] Object to be compared
|
80
|
+
def eql?(o)
|
81
|
+
self == o
|
82
|
+
end
|
83
|
+
|
84
|
+
# Calculates hash code according to all attributes.
|
85
|
+
# @return [Fixnum] Hash code
|
86
|
+
def hash
|
87
|
+
[expiration_dts, login_url].hash
|
88
|
+
end
|
89
|
+
|
90
|
+
# Builds the object from hash
|
91
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
92
|
+
# @return [Object] Returns the model itself
|
93
|
+
def build_from_hash(attributes)
|
94
|
+
return nil unless attributes.is_a?(Hash)
|
95
|
+
self.class.swagger_types.each_pair do |key, type|
|
96
|
+
if type =~ /\AArray<(.*)>/i
|
97
|
+
# check to ensure the input is an array given that the attribute
|
98
|
+
# is documented as an array but the input is not
|
99
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
100
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
101
|
+
end
|
102
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
103
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
104
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
105
|
+
end
|
106
|
+
|
107
|
+
self
|
108
|
+
end
|
109
|
+
|
110
|
+
# Deserializes the data based on type
|
111
|
+
# @param string type Data type
|
112
|
+
# @param string value Value to be deserialized
|
113
|
+
# @return [Object] Deserialized data
|
114
|
+
def _deserialize(type, value)
|
115
|
+
case type.to_sym
|
116
|
+
when :DateTime
|
117
|
+
DateTime.parse(value)
|
118
|
+
when :Date
|
119
|
+
Date.parse(value)
|
120
|
+
when :String
|
121
|
+
value.to_s
|
122
|
+
when :Integer
|
123
|
+
value.to_i
|
124
|
+
when :Float
|
125
|
+
value.to_f
|
126
|
+
when :BOOLEAN
|
127
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
128
|
+
true
|
129
|
+
else
|
130
|
+
false
|
131
|
+
end
|
132
|
+
when :Object
|
133
|
+
# generic object (usually a Hash), return directly
|
134
|
+
value
|
135
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
136
|
+
inner_type = Regexp.last_match[:inner_type]
|
137
|
+
value.map { |v| _deserialize(inner_type, v) }
|
138
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
139
|
+
k_type = Regexp.last_match[:k_type]
|
140
|
+
v_type = Regexp.last_match[:v_type]
|
141
|
+
{}.tap do |hash|
|
142
|
+
value.each do |k, v|
|
143
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
144
|
+
end
|
145
|
+
end
|
146
|
+
else # model
|
147
|
+
temp_model = UltracartClient.const_get(type).new
|
148
|
+
temp_model.build_from_hash(value)
|
149
|
+
end
|
150
|
+
end
|
151
|
+
|
152
|
+
# Returns the string representation of the object
|
153
|
+
# @return [String] String presentation of the object
|
154
|
+
def to_s
|
155
|
+
to_hash.to_s
|
156
|
+
end
|
157
|
+
|
158
|
+
# to_body is an alias to to_hash (backward compatibility)
|
159
|
+
# @return [Hash] Returns the object in the form of hash
|
160
|
+
def to_body
|
161
|
+
to_hash
|
162
|
+
end
|
163
|
+
|
164
|
+
# Returns the object in the form of hash
|
165
|
+
# @return [Hash] Returns the object in the form of hash
|
166
|
+
def to_hash
|
167
|
+
hash = {}
|
168
|
+
self.class.attribute_map.each_pair do |attr, param|
|
169
|
+
value = self.send(attr)
|
170
|
+
next if value.nil?
|
171
|
+
hash[param] = _to_hash(value)
|
172
|
+
end
|
173
|
+
hash
|
174
|
+
end
|
175
|
+
|
176
|
+
# Outputs non-array value in the form of hash
|
177
|
+
# For object, use to_hash. Otherwise, just return the value
|
178
|
+
# @param [Object] value Any valid value
|
179
|
+
# @return [Hash] Returns the value in the form of hash
|
180
|
+
def _to_hash(value)
|
181
|
+
if value.is_a?(Array)
|
182
|
+
value.compact.map { |v| _to_hash(v) }
|
183
|
+
elsif value.is_a?(Hash)
|
184
|
+
{}.tap do |hash|
|
185
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
186
|
+
end
|
187
|
+
elsif value.respond_to? :to_hash
|
188
|
+
value.to_hash
|
189
|
+
else
|
190
|
+
value
|
191
|
+
end
|
192
|
+
end
|
193
|
+
|
194
|
+
end
|
195
|
+
end
|
@@ -0,0 +1,205 @@
|
|
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 SingleSignOnTokenResponse
|
17
|
+
# Expiration date/time after which time the key is no longer valid
|
18
|
+
attr_accessor :expiration_dts
|
19
|
+
|
20
|
+
# IP address of the user which we recommend you lock the simple key's usage to.
|
21
|
+
attr_accessor :ip_address
|
22
|
+
|
23
|
+
# The simple key that can then be used to make SDK calls on the users behalf.
|
24
|
+
attr_accessor :simple_key
|
25
|
+
|
26
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
27
|
+
def self.attribute_map
|
28
|
+
{
|
29
|
+
:'expiration_dts' => :'expiration_dts',
|
30
|
+
:'ip_address' => :'ip_address',
|
31
|
+
:'simple_key' => :'simple_key'
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
# Attribute type mapping.
|
36
|
+
def self.swagger_types
|
37
|
+
{
|
38
|
+
:'expiration_dts' => :'String',
|
39
|
+
:'ip_address' => :'String',
|
40
|
+
:'simple_key' => :'String'
|
41
|
+
}
|
42
|
+
end
|
43
|
+
|
44
|
+
# Initializes the object
|
45
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
46
|
+
def initialize(attributes = {})
|
47
|
+
return unless attributes.is_a?(Hash)
|
48
|
+
|
49
|
+
# convert string to symbol for hash key
|
50
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
51
|
+
|
52
|
+
if attributes.has_key?(:'expiration_dts')
|
53
|
+
self.expiration_dts = attributes[:'expiration_dts']
|
54
|
+
end
|
55
|
+
|
56
|
+
if attributes.has_key?(:'ip_address')
|
57
|
+
self.ip_address = attributes[:'ip_address']
|
58
|
+
end
|
59
|
+
|
60
|
+
if attributes.has_key?(:'simple_key')
|
61
|
+
self.simple_key = attributes[:'simple_key']
|
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
|
+
expiration_dts == o.expiration_dts &&
|
84
|
+
ip_address == o.ip_address &&
|
85
|
+
simple_key == o.simple_key
|
86
|
+
end
|
87
|
+
|
88
|
+
# @see the `==` method
|
89
|
+
# @param [Object] Object to be compared
|
90
|
+
def eql?(o)
|
91
|
+
self == o
|
92
|
+
end
|
93
|
+
|
94
|
+
# Calculates hash code according to all attributes.
|
95
|
+
# @return [Fixnum] Hash code
|
96
|
+
def hash
|
97
|
+
[expiration_dts, ip_address, simple_key].hash
|
98
|
+
end
|
99
|
+
|
100
|
+
# Builds the object from hash
|
101
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
102
|
+
# @return [Object] Returns the model itself
|
103
|
+
def build_from_hash(attributes)
|
104
|
+
return nil unless attributes.is_a?(Hash)
|
105
|
+
self.class.swagger_types.each_pair do |key, type|
|
106
|
+
if type =~ /\AArray<(.*)>/i
|
107
|
+
# check to ensure the input is an array given that the attribute
|
108
|
+
# is documented as an array but the input is not
|
109
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
110
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
111
|
+
end
|
112
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
113
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
114
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
115
|
+
end
|
116
|
+
|
117
|
+
self
|
118
|
+
end
|
119
|
+
|
120
|
+
# Deserializes the data based on type
|
121
|
+
# @param string type Data type
|
122
|
+
# @param string value Value to be deserialized
|
123
|
+
# @return [Object] Deserialized data
|
124
|
+
def _deserialize(type, value)
|
125
|
+
case type.to_sym
|
126
|
+
when :DateTime
|
127
|
+
DateTime.parse(value)
|
128
|
+
when :Date
|
129
|
+
Date.parse(value)
|
130
|
+
when :String
|
131
|
+
value.to_s
|
132
|
+
when :Integer
|
133
|
+
value.to_i
|
134
|
+
when :Float
|
135
|
+
value.to_f
|
136
|
+
when :BOOLEAN
|
137
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
138
|
+
true
|
139
|
+
else
|
140
|
+
false
|
141
|
+
end
|
142
|
+
when :Object
|
143
|
+
# generic object (usually a Hash), return directly
|
144
|
+
value
|
145
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
146
|
+
inner_type = Regexp.last_match[:inner_type]
|
147
|
+
value.map { |v| _deserialize(inner_type, v) }
|
148
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
149
|
+
k_type = Regexp.last_match[:k_type]
|
150
|
+
v_type = Regexp.last_match[:v_type]
|
151
|
+
{}.tap do |hash|
|
152
|
+
value.each do |k, v|
|
153
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
154
|
+
end
|
155
|
+
end
|
156
|
+
else # model
|
157
|
+
temp_model = UltracartClient.const_get(type).new
|
158
|
+
temp_model.build_from_hash(value)
|
159
|
+
end
|
160
|
+
end
|
161
|
+
|
162
|
+
# Returns the string representation of the object
|
163
|
+
# @return [String] String presentation of the object
|
164
|
+
def to_s
|
165
|
+
to_hash.to_s
|
166
|
+
end
|
167
|
+
|
168
|
+
# to_body is an alias to to_hash (backward compatibility)
|
169
|
+
# @return [Hash] Returns the object in the form of hash
|
170
|
+
def to_body
|
171
|
+
to_hash
|
172
|
+
end
|
173
|
+
|
174
|
+
# Returns the object in the form of hash
|
175
|
+
# @return [Hash] Returns the object in the form of hash
|
176
|
+
def to_hash
|
177
|
+
hash = {}
|
178
|
+
self.class.attribute_map.each_pair do |attr, param|
|
179
|
+
value = self.send(attr)
|
180
|
+
next if value.nil?
|
181
|
+
hash[param] = _to_hash(value)
|
182
|
+
end
|
183
|
+
hash
|
184
|
+
end
|
185
|
+
|
186
|
+
# Outputs non-array value in the form of hash
|
187
|
+
# For object, use to_hash. Otherwise, just return the value
|
188
|
+
# @param [Object] value Any valid value
|
189
|
+
# @return [Hash] Returns the value in the form of hash
|
190
|
+
def _to_hash(value)
|
191
|
+
if value.is_a?(Array)
|
192
|
+
value.compact.map { |v| _to_hash(v) }
|
193
|
+
elsif value.is_a?(Hash)
|
194
|
+
{}.tap do |hash|
|
195
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
196
|
+
end
|
197
|
+
elsif value.respond_to? :to_hash
|
198
|
+
value.to_hash
|
199
|
+
else
|
200
|
+
value
|
201
|
+
end
|
202
|
+
end
|
203
|
+
|
204
|
+
end
|
205
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ultracart_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.3.
|
4
|
+
version: 3.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- UltraCart
|
@@ -741,7 +741,9 @@ files:
|
|
741
741
|
- docs/SelfConfig.md
|
742
742
|
- docs/SimpleValue.md
|
743
743
|
- docs/SingleSignOnAuthorizeRequest.md
|
744
|
+
- docs/SingleSignOnAuthorizeResponse.md
|
744
745
|
- docs/SingleSignOnTokenRequest.md
|
746
|
+
- docs/SingleSignOnTokenResponse.md
|
745
747
|
- docs/SovosConfig.md
|
746
748
|
- docs/SsoApi.md
|
747
749
|
- docs/StateProvince.md
|
@@ -1352,7 +1354,9 @@ files:
|
|
1352
1354
|
- lib/ultracart_api/models/self_config.rb
|
1353
1355
|
- lib/ultracart_api/models/simple_value.rb
|
1354
1356
|
- lib/ultracart_api/models/single_sign_on_authorize_request.rb
|
1357
|
+
- lib/ultracart_api/models/single_sign_on_authorize_response.rb
|
1355
1358
|
- lib/ultracart_api/models/single_sign_on_token_request.rb
|
1359
|
+
- lib/ultracart_api/models/single_sign_on_token_response.rb
|
1356
1360
|
- lib/ultracart_api/models/sovos_config.rb
|
1357
1361
|
- lib/ultracart_api/models/state_province.rb
|
1358
1362
|
- lib/ultracart_api/models/step_waiting.rb
|