ultracart_api 3.1.1 → 3.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +12 -4
- data/docs/CustomerApi.md +102 -0
- data/docs/EmailVerifyTokenRequest.md +9 -0
- data/docs/EmailVerifyTokenResponse.md +12 -0
- data/docs/EmailVerifyTokenValidateRequest.md +8 -0
- data/docs/ScreenRecording.md +2 -1
- data/lib/ultracart_api.rb +3 -0
- data/lib/ultracart_api/api/customer_api.rb +110 -0
- data/lib/ultracart_api/models/email_verify_token_request.rb +195 -0
- data/lib/ultracart_api/models/email_verify_token_response.rb +222 -0
- data/lib/ultracart_api/models/email_verify_token_validate_request.rb +185 -0
- data/lib/ultracart_api/models/screen_recording.rb +12 -1
- data/lib/ultracart_api/version.rb +1 -1
- metadata +8 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0c43b3e1a2a31ebfb41f5c7401b84ab1c802a27dc6aafbb7e98737efb5f7819a
|
|
4
|
+
data.tar.gz: 36eb6af473a311513adac48ba05f2e95dee946d604253546e606effdaf2894a4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5feba43dca30b19eb6a828dc2b1e4be9b366513eadc961010cc942a1f33ddf238e3704513e5d38e2473b474bff7a8a3a0af4c60a504293deaf4a79c7d6a0193f
|
|
7
|
+
data.tar.gz: d8617f478716de3f19c8edccf78630694b1e6506e31d5fcb72574c3fc5bae309a05e87a978b3025c337cf63e2241394a712c995a67032f8f4be70a58d90e8368
|
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.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.1.
|
|
27
|
+
gem install ./ultracart_api-3.1.2.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.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.1.
|
|
35
|
+
gem 'ultracart_api', '~> 3.1.2'
|
|
36
36
|
|
|
37
37
|
### Install from Git
|
|
38
38
|
|
|
@@ -147,9 +147,11 @@ Class | Method | HTTP request | Description
|
|
|
147
147
|
*UltracartClient::CustomerApi* | [**get_customers_for_data_tables**](docs/CustomerApi.md#get_customers_for_data_tables) | **POST** /customer/customers/dataTables | Retrieve customers for DataTables plugin
|
|
148
148
|
*UltracartClient::CustomerApi* | [**get_editor_values**](docs/CustomerApi.md#get_editor_values) | **GET** /customer/editor_values | Retrieve values needed for a customer profile editor
|
|
149
149
|
*UltracartClient::CustomerApi* | [**get_email_lists**](docs/CustomerApi.md#get_email_lists) | **GET** /customer/email_lists | Retrieve all email lists across all storefronts
|
|
150
|
+
*UltracartClient::CustomerApi* | [**get_email_verification_token**](docs/CustomerApi.md#get_email_verification_token) | **POST** /customer/customers/email_verify/get_token | Create a token that can be used to verify a customer email address
|
|
150
151
|
*UltracartClient::CustomerApi* | [**insert_customer**](docs/CustomerApi.md#insert_customer) | **POST** /customer/customers | Insert a customer
|
|
151
152
|
*UltracartClient::CustomerApi* | [**update_customer**](docs/CustomerApi.md#update_customer) | **PUT** /customer/customers/{customer_profile_oid} | Update a customer
|
|
152
153
|
*UltracartClient::CustomerApi* | [**update_customer_email_lists**](docs/CustomerApi.md#update_customer_email_lists) | **POST** /customer/customers/{customer_profile_oid}/email_lists | Update email list subscriptions for a customer
|
|
154
|
+
*UltracartClient::CustomerApi* | [**validate_email_verification_token**](docs/CustomerApi.md#validate_email_verification_token) | **POST** /customer/customers/email_verify/validate_token | Validate a token that can be used to verify a customer email address
|
|
153
155
|
*UltracartClient::FulfillmentApi* | [**acknowledge_orders**](docs/FulfillmentApi.md#acknowledge_orders) | **PUT** /fulfillment/distribution_centers/{distribution_center_code}/acknowledgements | Acknowledge receipt of orders.
|
|
154
156
|
*UltracartClient::FulfillmentApi* | [**get_distribution_center_orders**](docs/FulfillmentApi.md#get_distribution_center_orders) | **GET** /fulfillment/distribution_centers/{distribution_center_code}/orders | Retrieve orders queued up for this distribution center.
|
|
155
157
|
*UltracartClient::FulfillmentApi* | [**get_distribution_centers**](docs/FulfillmentApi.md#get_distribution_centers) | **GET** /fulfillment/distribution_centers | Retrieve distribution centers
|
|
@@ -666,6 +668,9 @@ Class | Method | HTTP request | Description
|
|
|
666
668
|
- [UltracartClient::EmailThirdPartyListImportRequest](docs/EmailThirdPartyListImportRequest.md)
|
|
667
669
|
- [UltracartClient::EmailThirdPartyProvider](docs/EmailThirdPartyProvider.md)
|
|
668
670
|
- [UltracartClient::EmailThirdPartyProvidersResponse](docs/EmailThirdPartyProvidersResponse.md)
|
|
671
|
+
- [UltracartClient::EmailVerifyTokenRequest](docs/EmailVerifyTokenRequest.md)
|
|
672
|
+
- [UltracartClient::EmailVerifyTokenResponse](docs/EmailVerifyTokenResponse.md)
|
|
673
|
+
- [UltracartClient::EmailVerifyTokenValidateRequest](docs/EmailVerifyTokenValidateRequest.md)
|
|
669
674
|
- [UltracartClient::Error](docs/Error.md)
|
|
670
675
|
- [UltracartClient::ErrorResponse](docs/ErrorResponse.md)
|
|
671
676
|
- [UltracartClient::Experiment](docs/Experiment.md)
|
|
@@ -996,6 +1001,9 @@ Not every change is committed to every SDK.
|
|
|
996
1001
|
|
|
997
1002
|
| Version | Date | Comments |
|
|
998
1003
|
| --: | :-: | --- |
|
|
1004
|
+
| 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
|
+
| 3.1.1 | 02/10/2021 | CustomerApi.getCustomerByEmail() method added |
|
|
1006
|
+
| 3.1.0 | 02/10/2021 | Minor revision jump. Added new convenience methods for simple_key use to all api calls. Updated docs |
|
|
999
1007
|
| 3.0.75 | 02/01/2021 | StoreFront Communication plan revision (internal use) |
|
|
1000
1008
|
| 3.0.71 | 01/28/2021 | BugFix: PHP SDK retry logic NPE |
|
|
1001
1009
|
| 3.0.70 | 01/26/2021 | Checkout return URL support |
|
data/docs/CustomerApi.md
CHANGED
|
@@ -12,9 +12,11 @@ Method | HTTP request | Description
|
|
|
12
12
|
[**get_customers_for_data_tables**](CustomerApi.md#get_customers_for_data_tables) | **POST** /customer/customers/dataTables | Retrieve customers for DataTables plugin
|
|
13
13
|
[**get_editor_values**](CustomerApi.md#get_editor_values) | **GET** /customer/editor_values | Retrieve values needed for a customer profile editor
|
|
14
14
|
[**get_email_lists**](CustomerApi.md#get_email_lists) | **GET** /customer/email_lists | Retrieve all email lists across all storefronts
|
|
15
|
+
[**get_email_verification_token**](CustomerApi.md#get_email_verification_token) | **POST** /customer/customers/email_verify/get_token | Create a token that can be used to verify a customer email address
|
|
15
16
|
[**insert_customer**](CustomerApi.md#insert_customer) | **POST** /customer/customers | Insert a customer
|
|
16
17
|
[**update_customer**](CustomerApi.md#update_customer) | **PUT** /customer/customers/{customer_profile_oid} | Update a customer
|
|
17
18
|
[**update_customer_email_lists**](CustomerApi.md#update_customer_email_lists) | **POST** /customer/customers/{customer_profile_oid}/email_lists | Update email list subscriptions for a customer
|
|
19
|
+
[**validate_email_verification_token**](CustomerApi.md#validate_email_verification_token) | **POST** /customer/customers/email_verify/validate_token | Validate a token that can be used to verify a customer email address
|
|
18
20
|
|
|
19
21
|
|
|
20
22
|
# **delete_customer**
|
|
@@ -491,6 +493,56 @@ This endpoint does not need any parameter.
|
|
|
491
493
|
|
|
492
494
|
|
|
493
495
|
|
|
496
|
+
# **get_email_verification_token**
|
|
497
|
+
> EmailVerifyTokenResponse get_email_verification_token(token_request)
|
|
498
|
+
|
|
499
|
+
Create a token that can be used to verify a customer email address
|
|
500
|
+
|
|
501
|
+
Create 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.
|
|
502
|
+
|
|
503
|
+
### Example
|
|
504
|
+
```ruby
|
|
505
|
+
# load the gem
|
|
506
|
+
require 'ultracart_api'
|
|
507
|
+
|
|
508
|
+
# Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
|
|
509
|
+
simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
|
|
510
|
+
api_instance = UltracartClient::CustomerApi.new_using_api_key(simple_key, false, false)
|
|
511
|
+
|
|
512
|
+
|
|
513
|
+
token_request = UltracartClient::EmailVerifyTokenRequest.new # EmailVerifyTokenRequest | Token request
|
|
514
|
+
|
|
515
|
+
|
|
516
|
+
begin
|
|
517
|
+
#Create a token that can be used to verify a customer email address
|
|
518
|
+
result = api_instance.get_email_verification_token(token_request)
|
|
519
|
+
p result
|
|
520
|
+
rescue UltracartClient::ApiError => e
|
|
521
|
+
puts "Exception when calling CustomerApi->get_email_verification_token: #{e}"
|
|
522
|
+
end
|
|
523
|
+
```
|
|
524
|
+
|
|
525
|
+
### Parameters
|
|
526
|
+
|
|
527
|
+
Name | Type | Description | Notes
|
|
528
|
+
------------- | ------------- | ------------- | -------------
|
|
529
|
+
**token_request** | [**EmailVerifyTokenRequest**](EmailVerifyTokenRequest.md)| Token request |
|
|
530
|
+
|
|
531
|
+
### Return type
|
|
532
|
+
|
|
533
|
+
[**EmailVerifyTokenResponse**](EmailVerifyTokenResponse.md)
|
|
534
|
+
|
|
535
|
+
### Authorization
|
|
536
|
+
|
|
537
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
|
538
|
+
|
|
539
|
+
### HTTP request headers
|
|
540
|
+
|
|
541
|
+
- **Content-Type**: application/json
|
|
542
|
+
- **Accept**: application/json
|
|
543
|
+
|
|
544
|
+
|
|
545
|
+
|
|
494
546
|
# **insert_customer**
|
|
495
547
|
> CustomerResponse insert_customer(customer, opts)
|
|
496
548
|
|
|
@@ -655,3 +707,53 @@ Name | Type | Description | Notes
|
|
|
655
707
|
|
|
656
708
|
|
|
657
709
|
|
|
710
|
+
# **validate_email_verification_token**
|
|
711
|
+
> EmailVerifyTokenResponse validate_email_verification_token(validation_request)
|
|
712
|
+
|
|
713
|
+
Validate a token that can be used to verify a customer email address
|
|
714
|
+
|
|
715
|
+
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.
|
|
716
|
+
|
|
717
|
+
### Example
|
|
718
|
+
```ruby
|
|
719
|
+
# load the gem
|
|
720
|
+
require 'ultracart_api'
|
|
721
|
+
|
|
722
|
+
# Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
|
|
723
|
+
simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
|
|
724
|
+
api_instance = UltracartClient::CustomerApi.new_using_api_key(simple_key, false, false)
|
|
725
|
+
|
|
726
|
+
|
|
727
|
+
validation_request = UltracartClient::EmailVerifyTokenValidateRequest.new # EmailVerifyTokenValidateRequest | Token validation request
|
|
728
|
+
|
|
729
|
+
|
|
730
|
+
begin
|
|
731
|
+
#Validate a token that can be used to verify a customer email address
|
|
732
|
+
result = api_instance.validate_email_verification_token(validation_request)
|
|
733
|
+
p result
|
|
734
|
+
rescue UltracartClient::ApiError => e
|
|
735
|
+
puts "Exception when calling CustomerApi->validate_email_verification_token: #{e}"
|
|
736
|
+
end
|
|
737
|
+
```
|
|
738
|
+
|
|
739
|
+
### Parameters
|
|
740
|
+
|
|
741
|
+
Name | Type | Description | Notes
|
|
742
|
+
------------- | ------------- | ------------- | -------------
|
|
743
|
+
**validation_request** | [**EmailVerifyTokenValidateRequest**](EmailVerifyTokenValidateRequest.md)| Token validation request |
|
|
744
|
+
|
|
745
|
+
### Return type
|
|
746
|
+
|
|
747
|
+
[**EmailVerifyTokenResponse**](EmailVerifyTokenResponse.md)
|
|
748
|
+
|
|
749
|
+
### Authorization
|
|
750
|
+
|
|
751
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
|
752
|
+
|
|
753
|
+
### HTTP request headers
|
|
754
|
+
|
|
755
|
+
- **Content-Type**: application/json
|
|
756
|
+
- **Accept**: application/json
|
|
757
|
+
|
|
758
|
+
|
|
759
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# UltracartClient::EmailVerifyTokenResponse
|
|
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
|
+
**token** | **String** | token | [optional]
|
|
10
|
+
**warning** | [**Warning**](Warning.md) | | [optional]
|
|
11
|
+
|
|
12
|
+
|
data/docs/ScreenRecording.md
CHANGED
|
@@ -11,7 +11,8 @@ Name | Type | Description | Notes
|
|
|
11
11
|
**esp_customer_uuid** | **String** | | [optional]
|
|
12
12
|
**events_gz_size** | **Integer** | | [optional]
|
|
13
13
|
**events_json_key** | **String** | | [optional]
|
|
14
|
-
**
|
|
14
|
+
**favorite** | **BOOLEAN** | True if the user calling the API has favorited this particular screen recording. | [optional]
|
|
15
|
+
**favorites** | **Array<Integer>** | Array of user ids that favorited this particular screen recording. | [optional]
|
|
15
16
|
**geolocation** | [**GeoPoint**](GeoPoint.md) | | [optional]
|
|
16
17
|
**geolocation_country** | **String** | | [optional]
|
|
17
18
|
**geolocation_state** | **String** | | [optional]
|
data/lib/ultracart_api.rb
CHANGED
|
@@ -303,6 +303,9 @@ require 'ultracart_api/models/email_third_party_list'
|
|
|
303
303
|
require 'ultracart_api/models/email_third_party_list_import_request'
|
|
304
304
|
require 'ultracart_api/models/email_third_party_provider'
|
|
305
305
|
require 'ultracart_api/models/email_third_party_providers_response'
|
|
306
|
+
require 'ultracart_api/models/email_verify_token_request'
|
|
307
|
+
require 'ultracart_api/models/email_verify_token_response'
|
|
308
|
+
require 'ultracart_api/models/email_verify_token_validate_request'
|
|
306
309
|
require 'ultracart_api/models/error'
|
|
307
310
|
require 'ultracart_api/models/error_response'
|
|
308
311
|
require 'ultracart_api/models/experiment'
|
|
@@ -568,6 +568,61 @@ module UltracartClient
|
|
|
568
568
|
end
|
|
569
569
|
return data, status_code, headers
|
|
570
570
|
end
|
|
571
|
+
# Create a token that can be used to verify a customer email address
|
|
572
|
+
# Create 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.
|
|
573
|
+
# @param token_request Token request
|
|
574
|
+
# @param [Hash] opts the optional parameters
|
|
575
|
+
# @return [EmailVerifyTokenResponse]
|
|
576
|
+
def get_email_verification_token(token_request, opts = {})
|
|
577
|
+
data, _status_code, _headers = get_email_verification_token_with_http_info(token_request, opts)
|
|
578
|
+
data
|
|
579
|
+
end
|
|
580
|
+
|
|
581
|
+
# Create a token that can be used to verify a customer email address
|
|
582
|
+
# Create 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.
|
|
583
|
+
# @param token_request Token request
|
|
584
|
+
# @param [Hash] opts the optional parameters
|
|
585
|
+
# @return [Array<(EmailVerifyTokenResponse, Fixnum, Hash)>] EmailVerifyTokenResponse data, response status code and response headers
|
|
586
|
+
def get_email_verification_token_with_http_info(token_request, opts = {})
|
|
587
|
+
if @api_client.config.debugging
|
|
588
|
+
@api_client.config.logger.debug 'Calling API: CustomerApi.get_email_verification_token ...'
|
|
589
|
+
end
|
|
590
|
+
# verify the required parameter 'token_request' is set
|
|
591
|
+
if @api_client.config.client_side_validation && token_request.nil?
|
|
592
|
+
fail ArgumentError, "Missing the required parameter 'token_request' when calling CustomerApi.get_email_verification_token"
|
|
593
|
+
end
|
|
594
|
+
# resource path
|
|
595
|
+
local_var_path = '/customer/customers/email_verify/get_token'
|
|
596
|
+
|
|
597
|
+
# query parameters
|
|
598
|
+
query_params = {}
|
|
599
|
+
|
|
600
|
+
# header parameters
|
|
601
|
+
header_params = {}
|
|
602
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
603
|
+
# HTTP header 'Accept' (if needed)
|
|
604
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
605
|
+
# HTTP header 'Content-Type'
|
|
606
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
607
|
+
|
|
608
|
+
# form parameters
|
|
609
|
+
form_params = {}
|
|
610
|
+
|
|
611
|
+
# http body (model)
|
|
612
|
+
post_body = @api_client.object_to_http_body(token_request)
|
|
613
|
+
auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
614
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
615
|
+
:header_params => header_params,
|
|
616
|
+
:query_params => query_params,
|
|
617
|
+
:form_params => form_params,
|
|
618
|
+
:body => post_body,
|
|
619
|
+
:auth_names => auth_names,
|
|
620
|
+
:return_type => 'EmailVerifyTokenResponse')
|
|
621
|
+
if @api_client.config.debugging
|
|
622
|
+
@api_client.config.logger.debug "API called: CustomerApi#get_email_verification_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
623
|
+
end
|
|
624
|
+
return data, status_code, headers
|
|
625
|
+
end
|
|
571
626
|
# Insert a customer
|
|
572
627
|
# Insert a customer on the UltraCart account.
|
|
573
628
|
# @param customer Customer to insert
|
|
@@ -751,5 +806,60 @@ module UltracartClient
|
|
|
751
806
|
end
|
|
752
807
|
return data, status_code, headers
|
|
753
808
|
end
|
|
809
|
+
# Validate a token that can be used to verify a customer email address
|
|
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
|
+
# @param validation_request Token validation request
|
|
812
|
+
# @param [Hash] opts the optional parameters
|
|
813
|
+
# @return [EmailVerifyTokenResponse]
|
|
814
|
+
def validate_email_verification_token(validation_request, opts = {})
|
|
815
|
+
data, _status_code, _headers = validate_email_verification_token_with_http_info(validation_request, opts)
|
|
816
|
+
data
|
|
817
|
+
end
|
|
818
|
+
|
|
819
|
+
# Validate a token that can be used to verify a customer email address
|
|
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
|
+
# @param validation_request Token validation request
|
|
822
|
+
# @param [Hash] opts the optional parameters
|
|
823
|
+
# @return [Array<(EmailVerifyTokenResponse, Fixnum, Hash)>] EmailVerifyTokenResponse data, response status code and response headers
|
|
824
|
+
def validate_email_verification_token_with_http_info(validation_request, opts = {})
|
|
825
|
+
if @api_client.config.debugging
|
|
826
|
+
@api_client.config.logger.debug 'Calling API: CustomerApi.validate_email_verification_token ...'
|
|
827
|
+
end
|
|
828
|
+
# verify the required parameter 'validation_request' is set
|
|
829
|
+
if @api_client.config.client_side_validation && validation_request.nil?
|
|
830
|
+
fail ArgumentError, "Missing the required parameter 'validation_request' when calling CustomerApi.validate_email_verification_token"
|
|
831
|
+
end
|
|
832
|
+
# resource path
|
|
833
|
+
local_var_path = '/customer/customers/email_verify/validate_token'
|
|
834
|
+
|
|
835
|
+
# query parameters
|
|
836
|
+
query_params = {}
|
|
837
|
+
|
|
838
|
+
# header parameters
|
|
839
|
+
header_params = {}
|
|
840
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
841
|
+
# HTTP header 'Accept' (if needed)
|
|
842
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
843
|
+
# HTTP header 'Content-Type'
|
|
844
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
845
|
+
|
|
846
|
+
# form parameters
|
|
847
|
+
form_params = {}
|
|
848
|
+
|
|
849
|
+
# http body (model)
|
|
850
|
+
post_body = @api_client.object_to_http_body(validation_request)
|
|
851
|
+
auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
852
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
853
|
+
:header_params => header_params,
|
|
854
|
+
:query_params => query_params,
|
|
855
|
+
:form_params => form_params,
|
|
856
|
+
:body => post_body,
|
|
857
|
+
:auth_names => auth_names,
|
|
858
|
+
:return_type => 'EmailVerifyTokenResponse')
|
|
859
|
+
if @api_client.config.debugging
|
|
860
|
+
@api_client.config.logger.debug "API called: CustomerApi#validate_email_verification_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
861
|
+
end
|
|
862
|
+
return data, status_code, headers
|
|
863
|
+
end
|
|
754
864
|
end
|
|
755
865
|
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 EmailVerifyTokenRequest
|
|
17
|
+
# email
|
|
18
|
+
attr_accessor :email
|
|
19
|
+
|
|
20
|
+
# password
|
|
21
|
+
attr_accessor :password
|
|
22
|
+
|
|
23
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
24
|
+
def self.attribute_map
|
|
25
|
+
{
|
|
26
|
+
:'email' => :'email',
|
|
27
|
+
:'password' => :'password'
|
|
28
|
+
}
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Attribute type mapping.
|
|
32
|
+
def self.swagger_types
|
|
33
|
+
{
|
|
34
|
+
:'email' => :'String',
|
|
35
|
+
:'password' => :'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?(:'email')
|
|
48
|
+
self.email = attributes[:'email']
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
if attributes.has_key?(:'password')
|
|
52
|
+
self.password = attributes[:'password']
|
|
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
|
+
email == o.email &&
|
|
75
|
+
password == o.password
|
|
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
|
+
[email, password].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,222 @@
|
|
|
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 EmailVerifyTokenResponse
|
|
17
|
+
attr_accessor :error
|
|
18
|
+
|
|
19
|
+
attr_accessor :metadata
|
|
20
|
+
|
|
21
|
+
# Indicates if API call was successful
|
|
22
|
+
attr_accessor :success
|
|
23
|
+
|
|
24
|
+
# token
|
|
25
|
+
attr_accessor :token
|
|
26
|
+
|
|
27
|
+
attr_accessor :warning
|
|
28
|
+
|
|
29
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
30
|
+
def self.attribute_map
|
|
31
|
+
{
|
|
32
|
+
:'error' => :'error',
|
|
33
|
+
:'metadata' => :'metadata',
|
|
34
|
+
:'success' => :'success',
|
|
35
|
+
:'token' => :'token',
|
|
36
|
+
:'warning' => :'warning'
|
|
37
|
+
}
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Attribute type mapping.
|
|
41
|
+
def self.swagger_types
|
|
42
|
+
{
|
|
43
|
+
:'error' => :'Error',
|
|
44
|
+
:'metadata' => :'ResponseMetadata',
|
|
45
|
+
:'success' => :'BOOLEAN',
|
|
46
|
+
:'token' => :'String',
|
|
47
|
+
:'warning' => :'Warning'
|
|
48
|
+
}
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Initializes the object
|
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
53
|
+
def initialize(attributes = {})
|
|
54
|
+
return unless attributes.is_a?(Hash)
|
|
55
|
+
|
|
56
|
+
# convert string to symbol for hash key
|
|
57
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
58
|
+
|
|
59
|
+
if attributes.has_key?(:'error')
|
|
60
|
+
self.error = attributes[:'error']
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
if attributes.has_key?(:'metadata')
|
|
64
|
+
self.metadata = attributes[:'metadata']
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
if attributes.has_key?(:'success')
|
|
68
|
+
self.success = attributes[:'success']
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
if attributes.has_key?(:'token')
|
|
72
|
+
self.token = attributes[:'token']
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
if attributes.has_key?(:'warning')
|
|
76
|
+
self.warning = attributes[:'warning']
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
81
|
+
# @return Array for valid properties with the reasons
|
|
82
|
+
def list_invalid_properties
|
|
83
|
+
invalid_properties = Array.new
|
|
84
|
+
invalid_properties
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Check to see if the all the properties in the model are valid
|
|
88
|
+
# @return true if the model is valid
|
|
89
|
+
def valid?
|
|
90
|
+
true
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Checks equality by comparing each attribute.
|
|
94
|
+
# @param [Object] Object to be compared
|
|
95
|
+
def ==(o)
|
|
96
|
+
return true if self.equal?(o)
|
|
97
|
+
self.class == o.class &&
|
|
98
|
+
error == o.error &&
|
|
99
|
+
metadata == o.metadata &&
|
|
100
|
+
success == o.success &&
|
|
101
|
+
token == o.token &&
|
|
102
|
+
warning == o.warning
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# @see the `==` method
|
|
106
|
+
# @param [Object] Object to be compared
|
|
107
|
+
def eql?(o)
|
|
108
|
+
self == o
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Calculates hash code according to all attributes.
|
|
112
|
+
# @return [Fixnum] Hash code
|
|
113
|
+
def hash
|
|
114
|
+
[error, metadata, success, token, warning].hash
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# Builds the object from hash
|
|
118
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
119
|
+
# @return [Object] Returns the model itself
|
|
120
|
+
def build_from_hash(attributes)
|
|
121
|
+
return nil unless attributes.is_a?(Hash)
|
|
122
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
123
|
+
if 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 # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
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 :DateTime
|
|
144
|
+
DateTime.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
|
+
temp_model = UltracartClient.const_get(type).new
|
|
175
|
+
temp_model.build_from_hash(value)
|
|
176
|
+
end
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
# Returns the string representation of the object
|
|
180
|
+
# @return [String] String presentation of the object
|
|
181
|
+
def to_s
|
|
182
|
+
to_hash.to_s
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
186
|
+
# @return [Hash] Returns the object in the form of hash
|
|
187
|
+
def to_body
|
|
188
|
+
to_hash
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
# Returns the object in the form of hash
|
|
192
|
+
# @return [Hash] Returns the object in the form of hash
|
|
193
|
+
def to_hash
|
|
194
|
+
hash = {}
|
|
195
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
196
|
+
value = self.send(attr)
|
|
197
|
+
next if value.nil?
|
|
198
|
+
hash[param] = _to_hash(value)
|
|
199
|
+
end
|
|
200
|
+
hash
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
# Outputs non-array value in the form of hash
|
|
204
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
205
|
+
# @param [Object] value Any valid value
|
|
206
|
+
# @return [Hash] Returns the value in the form of hash
|
|
207
|
+
def _to_hash(value)
|
|
208
|
+
if value.is_a?(Array)
|
|
209
|
+
value.compact.map { |v| _to_hash(v) }
|
|
210
|
+
elsif value.is_a?(Hash)
|
|
211
|
+
{}.tap do |hash|
|
|
212
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
213
|
+
end
|
|
214
|
+
elsif value.respond_to? :to_hash
|
|
215
|
+
value.to_hash
|
|
216
|
+
else
|
|
217
|
+
value
|
|
218
|
+
end
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
end
|
|
222
|
+
end
|
|
@@ -0,0 +1,185 @@
|
|
|
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 EmailVerifyTokenValidateRequest
|
|
17
|
+
# token
|
|
18
|
+
attr_accessor :token
|
|
19
|
+
|
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
21
|
+
def self.attribute_map
|
|
22
|
+
{
|
|
23
|
+
:'token' => :'token'
|
|
24
|
+
}
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# Attribute type mapping.
|
|
28
|
+
def self.swagger_types
|
|
29
|
+
{
|
|
30
|
+
:'token' => :'String'
|
|
31
|
+
}
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Initializes the object
|
|
35
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
36
|
+
def initialize(attributes = {})
|
|
37
|
+
return unless attributes.is_a?(Hash)
|
|
38
|
+
|
|
39
|
+
# convert string to symbol for hash key
|
|
40
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
41
|
+
|
|
42
|
+
if attributes.has_key?(:'token')
|
|
43
|
+
self.token = attributes[:'token']
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
48
|
+
# @return Array for valid properties with the reasons
|
|
49
|
+
def list_invalid_properties
|
|
50
|
+
invalid_properties = Array.new
|
|
51
|
+
invalid_properties
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Check to see if the all the properties in the model are valid
|
|
55
|
+
# @return true if the model is valid
|
|
56
|
+
def valid?
|
|
57
|
+
true
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# Checks equality by comparing each attribute.
|
|
61
|
+
# @param [Object] Object to be compared
|
|
62
|
+
def ==(o)
|
|
63
|
+
return true if self.equal?(o)
|
|
64
|
+
self.class == o.class &&
|
|
65
|
+
token == o.token
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# @see the `==` method
|
|
69
|
+
# @param [Object] Object to be compared
|
|
70
|
+
def eql?(o)
|
|
71
|
+
self == o
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Calculates hash code according to all attributes.
|
|
75
|
+
# @return [Fixnum] Hash code
|
|
76
|
+
def hash
|
|
77
|
+
[token].hash
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Builds the object from hash
|
|
81
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
82
|
+
# @return [Object] Returns the model itself
|
|
83
|
+
def build_from_hash(attributes)
|
|
84
|
+
return nil unless attributes.is_a?(Hash)
|
|
85
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
86
|
+
if type =~ /\AArray<(.*)>/i
|
|
87
|
+
# check to ensure the input is an array given that the attribute
|
|
88
|
+
# is documented as an array but the input is not
|
|
89
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
90
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
91
|
+
end
|
|
92
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
93
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
94
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
self
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Deserializes the data based on type
|
|
101
|
+
# @param string type Data type
|
|
102
|
+
# @param string value Value to be deserialized
|
|
103
|
+
# @return [Object] Deserialized data
|
|
104
|
+
def _deserialize(type, value)
|
|
105
|
+
case type.to_sym
|
|
106
|
+
when :DateTime
|
|
107
|
+
DateTime.parse(value)
|
|
108
|
+
when :Date
|
|
109
|
+
Date.parse(value)
|
|
110
|
+
when :String
|
|
111
|
+
value.to_s
|
|
112
|
+
when :Integer
|
|
113
|
+
value.to_i
|
|
114
|
+
when :Float
|
|
115
|
+
value.to_f
|
|
116
|
+
when :BOOLEAN
|
|
117
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
118
|
+
true
|
|
119
|
+
else
|
|
120
|
+
false
|
|
121
|
+
end
|
|
122
|
+
when :Object
|
|
123
|
+
# generic object (usually a Hash), return directly
|
|
124
|
+
value
|
|
125
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
126
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
127
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
128
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
129
|
+
k_type = Regexp.last_match[:k_type]
|
|
130
|
+
v_type = Regexp.last_match[:v_type]
|
|
131
|
+
{}.tap do |hash|
|
|
132
|
+
value.each do |k, v|
|
|
133
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
134
|
+
end
|
|
135
|
+
end
|
|
136
|
+
else # model
|
|
137
|
+
temp_model = UltracartClient.const_get(type).new
|
|
138
|
+
temp_model.build_from_hash(value)
|
|
139
|
+
end
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# Returns the string representation of the object
|
|
143
|
+
# @return [String] String presentation of the object
|
|
144
|
+
def to_s
|
|
145
|
+
to_hash.to_s
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
149
|
+
# @return [Hash] Returns the object in the form of hash
|
|
150
|
+
def to_body
|
|
151
|
+
to_hash
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# Returns the object in the form of hash
|
|
155
|
+
# @return [Hash] Returns the object in the form of hash
|
|
156
|
+
def to_hash
|
|
157
|
+
hash = {}
|
|
158
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
159
|
+
value = self.send(attr)
|
|
160
|
+
next if value.nil?
|
|
161
|
+
hash[param] = _to_hash(value)
|
|
162
|
+
end
|
|
163
|
+
hash
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# Outputs non-array value in the form of hash
|
|
167
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
168
|
+
# @param [Object] value Any valid value
|
|
169
|
+
# @return [Hash] Returns the value in the form of hash
|
|
170
|
+
def _to_hash(value)
|
|
171
|
+
if value.is_a?(Array)
|
|
172
|
+
value.compact.map { |v| _to_hash(v) }
|
|
173
|
+
elsif value.is_a?(Hash)
|
|
174
|
+
{}.tap do |hash|
|
|
175
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
176
|
+
end
|
|
177
|
+
elsif value.respond_to? :to_hash
|
|
178
|
+
value.to_hash
|
|
179
|
+
else
|
|
180
|
+
value
|
|
181
|
+
end
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
end
|
|
185
|
+
end
|
|
@@ -31,6 +31,10 @@ module UltracartClient
|
|
|
31
31
|
|
|
32
32
|
attr_accessor :events_json_key
|
|
33
33
|
|
|
34
|
+
# True if the user calling the API has favorited this particular screen recording.
|
|
35
|
+
attr_accessor :favorite
|
|
36
|
+
|
|
37
|
+
# Array of user ids that favorited this particular screen recording.
|
|
34
38
|
attr_accessor :favorites
|
|
35
39
|
|
|
36
40
|
attr_accessor :geolocation
|
|
@@ -91,6 +95,7 @@ module UltracartClient
|
|
|
91
95
|
:'esp_customer_uuid' => :'esp_customer_uuid',
|
|
92
96
|
:'events_gz_size' => :'events_gz_size',
|
|
93
97
|
:'events_json_key' => :'events_json_key',
|
|
98
|
+
:'favorite' => :'favorite',
|
|
94
99
|
:'favorites' => :'favorites',
|
|
95
100
|
:'geolocation' => :'geolocation',
|
|
96
101
|
:'geolocation_country' => :'geolocation_country',
|
|
@@ -129,6 +134,7 @@ module UltracartClient
|
|
|
129
134
|
:'esp_customer_uuid' => :'String',
|
|
130
135
|
:'events_gz_size' => :'Integer',
|
|
131
136
|
:'events_json_key' => :'String',
|
|
137
|
+
:'favorite' => :'BOOLEAN',
|
|
132
138
|
:'favorites' => :'Array<Integer>',
|
|
133
139
|
:'geolocation' => :'GeoPoint',
|
|
134
140
|
:'geolocation_country' => :'String',
|
|
@@ -196,6 +202,10 @@ module UltracartClient
|
|
|
196
202
|
self.events_json_key = attributes[:'events_json_key']
|
|
197
203
|
end
|
|
198
204
|
|
|
205
|
+
if attributes.has_key?(:'favorite')
|
|
206
|
+
self.favorite = attributes[:'favorite']
|
|
207
|
+
end
|
|
208
|
+
|
|
199
209
|
if attributes.has_key?(:'favorites')
|
|
200
210
|
if (value = attributes[:'favorites']).is_a?(Array)
|
|
201
211
|
self.favorites = value
|
|
@@ -331,6 +341,7 @@ module UltracartClient
|
|
|
331
341
|
esp_customer_uuid == o.esp_customer_uuid &&
|
|
332
342
|
events_gz_size == o.events_gz_size &&
|
|
333
343
|
events_json_key == o.events_json_key &&
|
|
344
|
+
favorite == o.favorite &&
|
|
334
345
|
favorites == o.favorites &&
|
|
335
346
|
geolocation == o.geolocation &&
|
|
336
347
|
geolocation_country == o.geolocation_country &&
|
|
@@ -366,7 +377,7 @@ module UltracartClient
|
|
|
366
377
|
# Calculates hash code according to all attributes.
|
|
367
378
|
# @return [Fixnum] Hash code
|
|
368
379
|
def hash
|
|
369
|
-
[analytics_client_oid, analytics_session_dts, analytics_session_oid, email, end_timestamp, esp_customer_uuid, events_gz_size, events_json_key, favorites, geolocation, geolocation_country, geolocation_state, merchant_id, order_id, page_view_count, page_views, rrweb_version, screen_recording_uuid, signed_download_url, start_timestamp, storefront_oids, storefronts, tags, time_on_site, ucacid, user_agent, user_agent_raw, user_ip, user_properties, watched, window_height, window_width].hash
|
|
380
|
+
[analytics_client_oid, analytics_session_dts, analytics_session_oid, email, end_timestamp, esp_customer_uuid, events_gz_size, events_json_key, favorite, favorites, geolocation, geolocation_country, geolocation_state, merchant_id, order_id, page_view_count, page_views, rrweb_version, screen_recording_uuid, signed_download_url, start_timestamp, storefront_oids, storefronts, tags, time_on_site, ucacid, user_agent, user_agent_raw, user_ip, user_properties, watched, window_height, window_width].hash
|
|
370
381
|
end
|
|
371
382
|
|
|
372
383
|
# Builds the object from hash
|
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.1.
|
|
4
|
+
version: 3.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- UltraCart
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-02-
|
|
11
|
+
date: 2021-02-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: typhoeus
|
|
@@ -493,6 +493,9 @@ files:
|
|
|
493
493
|
- docs/EmailThirdPartyListImportRequest.md
|
|
494
494
|
- docs/EmailThirdPartyProvider.md
|
|
495
495
|
- docs/EmailThirdPartyProvidersResponse.md
|
|
496
|
+
- docs/EmailVerifyTokenRequest.md
|
|
497
|
+
- docs/EmailVerifyTokenResponse.md
|
|
498
|
+
- docs/EmailVerifyTokenValidateRequest.md
|
|
496
499
|
- docs/Error.md
|
|
497
500
|
- docs/ErrorResponse.md
|
|
498
501
|
- docs/Experiment.md
|
|
@@ -1076,6 +1079,9 @@ files:
|
|
|
1076
1079
|
- lib/ultracart_api/models/email_third_party_list_import_request.rb
|
|
1077
1080
|
- lib/ultracart_api/models/email_third_party_provider.rb
|
|
1078
1081
|
- lib/ultracart_api/models/email_third_party_providers_response.rb
|
|
1082
|
+
- lib/ultracart_api/models/email_verify_token_request.rb
|
|
1083
|
+
- lib/ultracart_api/models/email_verify_token_response.rb
|
|
1084
|
+
- lib/ultracart_api/models/email_verify_token_validate_request.rb
|
|
1079
1085
|
- lib/ultracart_api/models/error.rb
|
|
1080
1086
|
- lib/ultracart_api/models/error_response.rb
|
|
1081
1087
|
- lib/ultracart_api/models/experiment.rb
|