ultracart_api 3.1.2 → 3.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -4
- data/docs/CustomerApi.md +2 -2
- data/docs/EmailVerifyTokenValidateResponse.md +11 -0
- data/lib/ultracart_api.rb +1 -0
- data/lib/ultracart_api/api/customer_api.rb +3 -3
- data/lib/ultracart_api/models/email_verify_token_validate_response.rb +212 -0
- data/lib/ultracart_api/version.rb +1 -1
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dedd83b9a5fef7b80e96ad9682d7011512e6e4d12c2b243c75a8db4a4c91d972
|
4
|
+
data.tar.gz: 45245d3b2545759641472bfee7a49fba4387f6513d306791260a33244e748d84
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dc2a4966d53f3f6893da77d8c49844e7d40fa3602f84ca430e704f0feb2c942bdd1337208cb0becdba7669eee00bb0196f4ccb57bfc0dfcb0304ae0e587aefc7
|
7
|
+
data.tar.gz: c79618dc49f5269b4b3ee0c7f78bc8d9d9c8ef437e7d4f2e9be9e860e3d5fab8669200a5c4cb642efe7196f3ee6b7bf4044a84a0a16456dbb779aee8269fdbc8
|
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.1.
|
10
|
+
- Package version: 3.1.3
|
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.1.
|
27
|
+
gem install ./ultracart_api-3.1.3.gem
|
28
28
|
```
|
29
|
-
(for development, run `gem install --dev ./ultracart_api-3.1.
|
29
|
+
(for development, run `gem install --dev ./ultracart_api-3.1.3.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.1.
|
35
|
+
gem 'ultracart_api', '~> 3.1.3'
|
36
36
|
|
37
37
|
### Install from Git
|
38
38
|
|
@@ -671,6 +671,7 @@ Class | Method | HTTP request | Description
|
|
671
671
|
- [UltracartClient::EmailVerifyTokenRequest](docs/EmailVerifyTokenRequest.md)
|
672
672
|
- [UltracartClient::EmailVerifyTokenResponse](docs/EmailVerifyTokenResponse.md)
|
673
673
|
- [UltracartClient::EmailVerifyTokenValidateRequest](docs/EmailVerifyTokenValidateRequest.md)
|
674
|
+
- [UltracartClient::EmailVerifyTokenValidateResponse](docs/EmailVerifyTokenValidateResponse.md)
|
674
675
|
- [UltracartClient::Error](docs/Error.md)
|
675
676
|
- [UltracartClient::ErrorResponse](docs/ErrorResponse.md)
|
676
677
|
- [UltracartClient::Experiment](docs/Experiment.md)
|
@@ -1001,6 +1002,7 @@ Not every change is committed to every SDK.
|
|
1001
1002
|
|
1002
1003
|
| Version | Date | Comments |
|
1003
1004
|
| --: | :-: | --- |
|
1005
|
+
| 3.1.3 | 02/11/2021 | Bug Fix: wrong return type on CustomerApi.validateEmailVerificationToken |
|
1004
1006
|
| 3.1.2 | 02/11/2021 | CustomerApi.getEmailVerificationToken, CustomerApi.validateEmailVerificationToken added to allow for custom email verification. Also added favorite flag to screen recording object |
|
1005
1007
|
| 3.1.1 | 02/10/2021 | CustomerApi.getCustomerByEmail() method added |
|
1006
1008
|
| 3.1.0 | 02/10/2021 | Minor revision jump. Added new convenience methods for simple_key use to all api calls. Updated docs |
|
data/docs/CustomerApi.md
CHANGED
@@ -708,7 +708,7 @@ Name | Type | Description | Notes
|
|
708
708
|
|
709
709
|
|
710
710
|
# **validate_email_verification_token**
|
711
|
-
>
|
711
|
+
> EmailVerifyTokenValidateResponse validate_email_verification_token(validation_request)
|
712
712
|
|
713
713
|
Validate a token that can be used to verify a customer email address
|
714
714
|
|
@@ -744,7 +744,7 @@ Name | Type | Description | Notes
|
|
744
744
|
|
745
745
|
### Return type
|
746
746
|
|
747
|
-
[**
|
747
|
+
[**EmailVerifyTokenValidateResponse**](EmailVerifyTokenValidateResponse.md)
|
748
748
|
|
749
749
|
### Authorization
|
750
750
|
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# UltracartClient::EmailVerifyTokenValidateResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**error** | [**Error**](Error.md) | | [optional]
|
7
|
+
**metadata** | [**ResponseMetadata**](ResponseMetadata.md) | | [optional]
|
8
|
+
**success** | **BOOLEAN** | Indicates if API call was successful | [optional]
|
9
|
+
**warning** | [**Warning**](Warning.md) | | [optional]
|
10
|
+
|
11
|
+
|
data/lib/ultracart_api.rb
CHANGED
@@ -306,6 +306,7 @@ require 'ultracart_api/models/email_third_party_providers_response'
|
|
306
306
|
require 'ultracart_api/models/email_verify_token_request'
|
307
307
|
require 'ultracart_api/models/email_verify_token_response'
|
308
308
|
require 'ultracart_api/models/email_verify_token_validate_request'
|
309
|
+
require 'ultracart_api/models/email_verify_token_validate_response'
|
309
310
|
require 'ultracart_api/models/error'
|
310
311
|
require 'ultracart_api/models/error_response'
|
311
312
|
require 'ultracart_api/models/experiment'
|
@@ -810,7 +810,7 @@ module UltracartClient
|
|
810
810
|
# Validate a token that can be used to verify a customer email address. The implementation of how a customer interacts with this token is left to the merchant.
|
811
811
|
# @param validation_request Token validation request
|
812
812
|
# @param [Hash] opts the optional parameters
|
813
|
-
# @return [
|
813
|
+
# @return [EmailVerifyTokenValidateResponse]
|
814
814
|
def validate_email_verification_token(validation_request, opts = {})
|
815
815
|
data, _status_code, _headers = validate_email_verification_token_with_http_info(validation_request, opts)
|
816
816
|
data
|
@@ -820,7 +820,7 @@ module UltracartClient
|
|
820
820
|
# Validate a token that can be used to verify a customer email address. The implementation of how a customer interacts with this token is left to the merchant.
|
821
821
|
# @param validation_request Token validation request
|
822
822
|
# @param [Hash] opts the optional parameters
|
823
|
-
# @return [Array<(
|
823
|
+
# @return [Array<(EmailVerifyTokenValidateResponse, Fixnum, Hash)>] EmailVerifyTokenValidateResponse data, response status code and response headers
|
824
824
|
def validate_email_verification_token_with_http_info(validation_request, opts = {})
|
825
825
|
if @api_client.config.debugging
|
826
826
|
@api_client.config.logger.debug 'Calling API: CustomerApi.validate_email_verification_token ...'
|
@@ -855,7 +855,7 @@ module UltracartClient
|
|
855
855
|
:form_params => form_params,
|
856
856
|
:body => post_body,
|
857
857
|
:auth_names => auth_names,
|
858
|
-
:return_type => '
|
858
|
+
:return_type => 'EmailVerifyTokenValidateResponse')
|
859
859
|
if @api_client.config.debugging
|
860
860
|
@api_client.config.logger.debug "API called: CustomerApi#validate_email_verification_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
861
861
|
end
|
@@ -0,0 +1,212 @@
|
|
1
|
+
=begin
|
2
|
+
#UltraCart Rest API V2
|
3
|
+
|
4
|
+
#UltraCart REST API Version 2
|
5
|
+
|
6
|
+
OpenAPI spec version: 2.0.0
|
7
|
+
Contact: support@ultracart.com
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
|
+
Swagger Codegen version: 2.4.15-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module UltracartClient
|
16
|
+
class EmailVerifyTokenValidateResponse
|
17
|
+
attr_accessor :error
|
18
|
+
|
19
|
+
attr_accessor :metadata
|
20
|
+
|
21
|
+
# Indicates if API call was successful
|
22
|
+
attr_accessor :success
|
23
|
+
|
24
|
+
attr_accessor :warning
|
25
|
+
|
26
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
27
|
+
def self.attribute_map
|
28
|
+
{
|
29
|
+
:'error' => :'error',
|
30
|
+
:'metadata' => :'metadata',
|
31
|
+
:'success' => :'success',
|
32
|
+
:'warning' => :'warning'
|
33
|
+
}
|
34
|
+
end
|
35
|
+
|
36
|
+
# Attribute type mapping.
|
37
|
+
def self.swagger_types
|
38
|
+
{
|
39
|
+
:'error' => :'Error',
|
40
|
+
:'metadata' => :'ResponseMetadata',
|
41
|
+
:'success' => :'BOOLEAN',
|
42
|
+
:'warning' => :'Warning'
|
43
|
+
}
|
44
|
+
end
|
45
|
+
|
46
|
+
# Initializes the object
|
47
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
48
|
+
def initialize(attributes = {})
|
49
|
+
return unless attributes.is_a?(Hash)
|
50
|
+
|
51
|
+
# convert string to symbol for hash key
|
52
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
53
|
+
|
54
|
+
if attributes.has_key?(:'error')
|
55
|
+
self.error = attributes[:'error']
|
56
|
+
end
|
57
|
+
|
58
|
+
if attributes.has_key?(:'metadata')
|
59
|
+
self.metadata = attributes[:'metadata']
|
60
|
+
end
|
61
|
+
|
62
|
+
if attributes.has_key?(:'success')
|
63
|
+
self.success = attributes[:'success']
|
64
|
+
end
|
65
|
+
|
66
|
+
if attributes.has_key?(:'warning')
|
67
|
+
self.warning = attributes[:'warning']
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
72
|
+
# @return Array for valid properties with the reasons
|
73
|
+
def list_invalid_properties
|
74
|
+
invalid_properties = Array.new
|
75
|
+
invalid_properties
|
76
|
+
end
|
77
|
+
|
78
|
+
# Check to see if the all the properties in the model are valid
|
79
|
+
# @return true if the model is valid
|
80
|
+
def valid?
|
81
|
+
true
|
82
|
+
end
|
83
|
+
|
84
|
+
# Checks equality by comparing each attribute.
|
85
|
+
# @param [Object] Object to be compared
|
86
|
+
def ==(o)
|
87
|
+
return true if self.equal?(o)
|
88
|
+
self.class == o.class &&
|
89
|
+
error == o.error &&
|
90
|
+
metadata == o.metadata &&
|
91
|
+
success == o.success &&
|
92
|
+
warning == o.warning
|
93
|
+
end
|
94
|
+
|
95
|
+
# @see the `==` method
|
96
|
+
# @param [Object] Object to be compared
|
97
|
+
def eql?(o)
|
98
|
+
self == o
|
99
|
+
end
|
100
|
+
|
101
|
+
# Calculates hash code according to all attributes.
|
102
|
+
# @return [Fixnum] Hash code
|
103
|
+
def hash
|
104
|
+
[error, metadata, success, warning].hash
|
105
|
+
end
|
106
|
+
|
107
|
+
# Builds the object from hash
|
108
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
109
|
+
# @return [Object] Returns the model itself
|
110
|
+
def build_from_hash(attributes)
|
111
|
+
return nil unless attributes.is_a?(Hash)
|
112
|
+
self.class.swagger_types.each_pair do |key, type|
|
113
|
+
if type =~ /\AArray<(.*)>/i
|
114
|
+
# check to ensure the input is an array given that the attribute
|
115
|
+
# is documented as an array but the input is not
|
116
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
117
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
118
|
+
end
|
119
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
120
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
121
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
122
|
+
end
|
123
|
+
|
124
|
+
self
|
125
|
+
end
|
126
|
+
|
127
|
+
# Deserializes the data based on type
|
128
|
+
# @param string type Data type
|
129
|
+
# @param string value Value to be deserialized
|
130
|
+
# @return [Object] Deserialized data
|
131
|
+
def _deserialize(type, value)
|
132
|
+
case type.to_sym
|
133
|
+
when :DateTime
|
134
|
+
DateTime.parse(value)
|
135
|
+
when :Date
|
136
|
+
Date.parse(value)
|
137
|
+
when :String
|
138
|
+
value.to_s
|
139
|
+
when :Integer
|
140
|
+
value.to_i
|
141
|
+
when :Float
|
142
|
+
value.to_f
|
143
|
+
when :BOOLEAN
|
144
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
145
|
+
true
|
146
|
+
else
|
147
|
+
false
|
148
|
+
end
|
149
|
+
when :Object
|
150
|
+
# generic object (usually a Hash), return directly
|
151
|
+
value
|
152
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
153
|
+
inner_type = Regexp.last_match[:inner_type]
|
154
|
+
value.map { |v| _deserialize(inner_type, v) }
|
155
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
156
|
+
k_type = Regexp.last_match[:k_type]
|
157
|
+
v_type = Regexp.last_match[:v_type]
|
158
|
+
{}.tap do |hash|
|
159
|
+
value.each do |k, v|
|
160
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
161
|
+
end
|
162
|
+
end
|
163
|
+
else # model
|
164
|
+
temp_model = UltracartClient.const_get(type).new
|
165
|
+
temp_model.build_from_hash(value)
|
166
|
+
end
|
167
|
+
end
|
168
|
+
|
169
|
+
# Returns the string representation of the object
|
170
|
+
# @return [String] String presentation of the object
|
171
|
+
def to_s
|
172
|
+
to_hash.to_s
|
173
|
+
end
|
174
|
+
|
175
|
+
# to_body is an alias to to_hash (backward compatibility)
|
176
|
+
# @return [Hash] Returns the object in the form of hash
|
177
|
+
def to_body
|
178
|
+
to_hash
|
179
|
+
end
|
180
|
+
|
181
|
+
# Returns the object in the form of hash
|
182
|
+
# @return [Hash] Returns the object in the form of hash
|
183
|
+
def to_hash
|
184
|
+
hash = {}
|
185
|
+
self.class.attribute_map.each_pair do |attr, param|
|
186
|
+
value = self.send(attr)
|
187
|
+
next if value.nil?
|
188
|
+
hash[param] = _to_hash(value)
|
189
|
+
end
|
190
|
+
hash
|
191
|
+
end
|
192
|
+
|
193
|
+
# Outputs non-array value in the form of hash
|
194
|
+
# For object, use to_hash. Otherwise, just return the value
|
195
|
+
# @param [Object] value Any valid value
|
196
|
+
# @return [Hash] Returns the value in the form of hash
|
197
|
+
def _to_hash(value)
|
198
|
+
if value.is_a?(Array)
|
199
|
+
value.compact.map { |v| _to_hash(v) }
|
200
|
+
elsif value.is_a?(Hash)
|
201
|
+
{}.tap do |hash|
|
202
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
203
|
+
end
|
204
|
+
elsif value.respond_to? :to_hash
|
205
|
+
value.to_hash
|
206
|
+
else
|
207
|
+
value
|
208
|
+
end
|
209
|
+
end
|
210
|
+
|
211
|
+
end
|
212
|
+
end
|
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.1.
|
4
|
+
version: 3.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- UltraCart
|
@@ -496,6 +496,7 @@ files:
|
|
496
496
|
- docs/EmailVerifyTokenRequest.md
|
497
497
|
- docs/EmailVerifyTokenResponse.md
|
498
498
|
- docs/EmailVerifyTokenValidateRequest.md
|
499
|
+
- docs/EmailVerifyTokenValidateResponse.md
|
499
500
|
- docs/Error.md
|
500
501
|
- docs/ErrorResponse.md
|
501
502
|
- docs/Experiment.md
|
@@ -1082,6 +1083,7 @@ files:
|
|
1082
1083
|
- lib/ultracart_api/models/email_verify_token_request.rb
|
1083
1084
|
- lib/ultracart_api/models/email_verify_token_response.rb
|
1084
1085
|
- lib/ultracart_api/models/email_verify_token_validate_request.rb
|
1086
|
+
- lib/ultracart_api/models/email_verify_token_validate_response.rb
|
1085
1087
|
- lib/ultracart_api/models/error.rb
|
1086
1088
|
- lib/ultracart_api/models/error_response.rb
|
1087
1089
|
- lib/ultracart_api/models/experiment.rb
|