ultracart_api 3.1.2 → 3.1.7
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 +9 -4
- data/docs/Coupon.md +1 -0
- data/docs/CouponAmountOffSubtotalWithPurchase.md +10 -0
- data/docs/CouponApi.md +2 -2
- data/docs/CustomerApi.md +2 -2
- data/docs/EmailVerifyTokenValidateResponse.md +11 -0
- data/docs/ScreenRecordingPageViewDataResponse.md +12 -0
- data/docs/StorefrontApi.md +2 -2
- data/lib/ultracart_api.rb +3 -0
- data/lib/ultracart_api/api/coupon_api.rb +2 -2
- data/lib/ultracart_api/api/customer_api.rb +3 -3
- data/lib/ultracart_api/api/storefront_api.rb +3 -3
- data/lib/ultracart_api/models/coupon.rb +10 -1
- data/lib/ultracart_api/models/coupon_amount_off_subtotal_with_purchase.rb +220 -0
- data/lib/ultracart_api/models/email_verify_token_validate_response.rb +212 -0
- data/lib/ultracart_api/models/screen_recording_page_view_data_response.rb +221 -0
- 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: ba17b237b52de42f4a1635212e24c25b4346a897c64693981b6c9cc74c017e14
|
|
4
|
+
data.tar.gz: '08eafd57235df813717f19f0052cfd63e3fd30f2f8e1518e0390bedf7b9b7b63'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a7b252ef9d9318b346195ee5f052a576926fb2133c9782c2ade0ae246886d648f6b30e1ca980d5cdaabcd4cc4bf644c5f3a03e14731de9fd8fb524de43b99add
|
|
7
|
+
data.tar.gz: 0e1cc43bba38835880863c103b9bf7f645e952d8ae18a0f5ff4ff87779dc1ff0f9d69b24594baa1de1b177f3895158aa9f97a118acd000b30286ff83222c442d
|
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.7
|
|
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.7.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.7.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.7'
|
|
36
36
|
|
|
37
37
|
### Install from Git
|
|
38
38
|
|
|
@@ -492,6 +492,7 @@ Class | Method | HTTP request | Description
|
|
|
492
492
|
- [UltracartClient::CouponAmountOffSubtotalFreeShippingWithPurchase](docs/CouponAmountOffSubtotalFreeShippingWithPurchase.md)
|
|
493
493
|
- [UltracartClient::CouponAmountOffSubtotalWithBlockPurchase](docs/CouponAmountOffSubtotalWithBlockPurchase.md)
|
|
494
494
|
- [UltracartClient::CouponAmountOffSubtotalWithItemsPurchase](docs/CouponAmountOffSubtotalWithItemsPurchase.md)
|
|
495
|
+
- [UltracartClient::CouponAmountOffSubtotalWithPurchase](docs/CouponAmountOffSubtotalWithPurchase.md)
|
|
495
496
|
- [UltracartClient::CouponAutoApplyCondition](docs/CouponAutoApplyCondition.md)
|
|
496
497
|
- [UltracartClient::CouponAutoApplyConditions](docs/CouponAutoApplyConditions.md)
|
|
497
498
|
- [UltracartClient::CouponAutomaticallyApplyCouponCodes](docs/CouponAutomaticallyApplyCouponCodes.md)
|
|
@@ -671,6 +672,7 @@ Class | Method | HTTP request | Description
|
|
|
671
672
|
- [UltracartClient::EmailVerifyTokenRequest](docs/EmailVerifyTokenRequest.md)
|
|
672
673
|
- [UltracartClient::EmailVerifyTokenResponse](docs/EmailVerifyTokenResponse.md)
|
|
673
674
|
- [UltracartClient::EmailVerifyTokenValidateRequest](docs/EmailVerifyTokenValidateRequest.md)
|
|
675
|
+
- [UltracartClient::EmailVerifyTokenValidateResponse](docs/EmailVerifyTokenValidateResponse.md)
|
|
674
676
|
- [UltracartClient::Error](docs/Error.md)
|
|
675
677
|
- [UltracartClient::ErrorResponse](docs/ErrorResponse.md)
|
|
676
678
|
- [UltracartClient::Experiment](docs/Experiment.md)
|
|
@@ -865,6 +867,7 @@ Class | Method | HTTP request | Description
|
|
|
865
867
|
- [UltracartClient::ScreenRecordingFilterValuesEventParams](docs/ScreenRecordingFilterValuesEventParams.md)
|
|
866
868
|
- [UltracartClient::ScreenRecordingMultifield](docs/ScreenRecordingMultifield.md)
|
|
867
869
|
- [UltracartClient::ScreenRecordingPageView](docs/ScreenRecordingPageView.md)
|
|
870
|
+
- [UltracartClient::ScreenRecordingPageViewDataResponse](docs/ScreenRecordingPageViewDataResponse.md)
|
|
868
871
|
- [UltracartClient::ScreenRecordingPageViewEvent](docs/ScreenRecordingPageViewEvent.md)
|
|
869
872
|
- [UltracartClient::ScreenRecordingPageViewEventParameter](docs/ScreenRecordingPageViewEventParameter.md)
|
|
870
873
|
- [UltracartClient::ScreenRecordingPageViewParameter](docs/ScreenRecordingPageViewParameter.md)
|
|
@@ -1001,6 +1004,8 @@ Not every change is committed to every SDK.
|
|
|
1001
1004
|
|
|
1002
1005
|
| Version | Date | Comments |
|
|
1003
1006
|
| --: | :-: | --- |
|
|
1007
|
+
| 3.1.5 | 02/12/2021 | Bug Fix: PHP retry logic missing a closing brace. Also screen recording page view data response refactor |
|
|
1008
|
+
| 3.1.3 | 02/11/2021 | Bug Fix: wrong return type on CustomerApi.validateEmailVerificationToken |
|
|
1004
1009
|
| 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
1010
|
| 3.1.1 | 02/10/2021 | CustomerApi.getCustomerByEmail() method added |
|
|
1006
1011
|
| 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/Coupon.md
CHANGED
|
@@ -13,6 +13,7 @@ Name | Type | Description | Notes
|
|
|
13
13
|
**amount_off_subtotal_and_shipping** | [**CouponAmountOffSubtotalAndShipping**](CouponAmountOffSubtotalAndShipping.md) | | [optional]
|
|
14
14
|
**amount_off_subtotal_with_block_purchase** | [**CouponAmountOffSubtotalWithBlockPurchase**](CouponAmountOffSubtotalWithBlockPurchase.md) | | [optional]
|
|
15
15
|
**amount_off_subtotal_with_items_purchase** | [**CouponAmountOffSubtotalWithItemsPurchase**](CouponAmountOffSubtotalWithItemsPurchase.md) | | [optional]
|
|
16
|
+
**amount_off_subtotal_with_purchase** | [**CouponAmountOffSubtotalWithPurchase**](CouponAmountOffSubtotalWithPurchase.md) | | [optional]
|
|
16
17
|
**automatically_apply_coupon_codes** | [**CouponAutomaticallyApplyCouponCodes**](CouponAutomaticallyApplyCouponCodes.md) | | [optional]
|
|
17
18
|
**buy_one_get_one** | [**CouponBuyOneGetOneLimit**](CouponBuyOneGetOneLimit.md) | | [optional]
|
|
18
19
|
**calculated_description** | **String** | Calculated description displayed to the customer if no description is specified. | [optional]
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# UltracartClient::CouponAmountOffSubtotalWithPurchase
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
Name | Type | Description | Notes
|
|
5
|
+
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**currency_code** | **String** | The ISO-4217 three letter currency code the customer is viewing prices in | [optional]
|
|
7
|
+
**discount_amount** | **Float** | The amount of subtotal discount | [optional]
|
|
8
|
+
**purchase_amount** | **Float** | The purchase amount to qualify for subtotal discount and free shipping | [optional]
|
|
9
|
+
|
|
10
|
+
|
data/docs/CouponApi.md
CHANGED
|
@@ -947,7 +947,7 @@ simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
|
|
|
947
947
|
api_instance = UltracartClient::CouponApi.new_using_api_key(simple_key, false, false)
|
|
948
948
|
|
|
949
949
|
|
|
950
|
-
coupons_request = UltracartClient::CouponsRequest.new # CouponsRequest | Coupons to update (synchronous maximum
|
|
950
|
+
coupons_request = UltracartClient::CouponsRequest.new # CouponsRequest | Coupons to update (synchronous maximum 50 / asynchronous maximum 100)
|
|
951
951
|
|
|
952
952
|
opts = {
|
|
953
953
|
_expand: '_expand_example', # String | The object expansion to perform on the result. See documentation for examples
|
|
@@ -968,7 +968,7 @@ end
|
|
|
968
968
|
|
|
969
969
|
Name | Type | Description | Notes
|
|
970
970
|
------------- | ------------- | ------------- | -------------
|
|
971
|
-
**coupons_request** | [**CouponsRequest**](CouponsRequest.md)| Coupons to update (synchronous maximum
|
|
971
|
+
**coupons_request** | [**CouponsRequest**](CouponsRequest.md)| Coupons to update (synchronous maximum 50 / asynchronous maximum 100) |
|
|
972
972
|
**_expand** | **String**| The object expansion to perform on the result. See documentation for examples | [optional]
|
|
973
973
|
**_placeholders** | **BOOLEAN**| Whether or not placeholder values should be returned in the result. Useful for UIs that consume this REST API. | [optional]
|
|
974
974
|
**_async** | **BOOLEAN**| True if the operation should be run async. No result returned | [optional]
|
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
|
+
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# UltracartClient::ScreenRecordingPageViewDataResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
Name | Type | Description | Notes
|
|
5
|
+
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**error** | [**Error**](Error.md) | | [optional]
|
|
7
|
+
**events_json** | **String** | | [optional]
|
|
8
|
+
**metadata** | [**ResponseMetadata**](ResponseMetadata.md) | | [optional]
|
|
9
|
+
**success** | **BOOLEAN** | Indicates if API call was successful | [optional]
|
|
10
|
+
**warning** | [**Warning**](Warning.md) | | [optional]
|
|
11
|
+
|
|
12
|
+
|
data/docs/StorefrontApi.md
CHANGED
|
@@ -4366,7 +4366,7 @@ Name | Type | Description | Notes
|
|
|
4366
4366
|
|
|
4367
4367
|
|
|
4368
4368
|
# **get_screen_recording_page_view_data**
|
|
4369
|
-
>
|
|
4369
|
+
> ScreenRecordingPageViewDataResponse get_screen_recording_page_view_data(storefront_oid, screen_recording_uuid, screen_recording_page_view_uuid)
|
|
4370
4370
|
|
|
4371
4371
|
Get screen recording page view data
|
|
4372
4372
|
|
|
@@ -4408,7 +4408,7 @@ Name | Type | Description | Notes
|
|
|
4408
4408
|
|
|
4409
4409
|
### Return type
|
|
4410
4410
|
|
|
4411
|
-
[**
|
|
4411
|
+
[**ScreenRecordingPageViewDataResponse**](ScreenRecordingPageViewDataResponse.md)
|
|
4412
4412
|
|
|
4413
4413
|
### Authorization
|
|
4414
4414
|
|
data/lib/ultracart_api.rb
CHANGED
|
@@ -127,6 +127,7 @@ require 'ultracart_api/models/coupon_amount_off_subtotal_and_shipping'
|
|
|
127
127
|
require 'ultracart_api/models/coupon_amount_off_subtotal_free_shipping_with_purchase'
|
|
128
128
|
require 'ultracart_api/models/coupon_amount_off_subtotal_with_block_purchase'
|
|
129
129
|
require 'ultracart_api/models/coupon_amount_off_subtotal_with_items_purchase'
|
|
130
|
+
require 'ultracart_api/models/coupon_amount_off_subtotal_with_purchase'
|
|
130
131
|
require 'ultracart_api/models/coupon_auto_apply_condition'
|
|
131
132
|
require 'ultracart_api/models/coupon_auto_apply_conditions'
|
|
132
133
|
require 'ultracart_api/models/coupon_automatically_apply_coupon_codes'
|
|
@@ -306,6 +307,7 @@ require 'ultracart_api/models/email_third_party_providers_response'
|
|
|
306
307
|
require 'ultracart_api/models/email_verify_token_request'
|
|
307
308
|
require 'ultracart_api/models/email_verify_token_response'
|
|
308
309
|
require 'ultracart_api/models/email_verify_token_validate_request'
|
|
310
|
+
require 'ultracart_api/models/email_verify_token_validate_response'
|
|
309
311
|
require 'ultracart_api/models/error'
|
|
310
312
|
require 'ultracart_api/models/error_response'
|
|
311
313
|
require 'ultracart_api/models/experiment'
|
|
@@ -500,6 +502,7 @@ require 'ultracart_api/models/screen_recording_filter_values_event'
|
|
|
500
502
|
require 'ultracart_api/models/screen_recording_filter_values_event_params'
|
|
501
503
|
require 'ultracart_api/models/screen_recording_multifield'
|
|
502
504
|
require 'ultracart_api/models/screen_recording_page_view'
|
|
505
|
+
require 'ultracart_api/models/screen_recording_page_view_data_response'
|
|
503
506
|
require 'ultracart_api/models/screen_recording_page_view_event'
|
|
504
507
|
require 'ultracart_api/models/screen_recording_page_view_event_parameter'
|
|
505
508
|
require 'ultracart_api/models/screen_recording_page_view_parameter'
|
|
@@ -1034,7 +1034,7 @@ module UltracartClient
|
|
|
1034
1034
|
end
|
|
1035
1035
|
# Update multiple coupons
|
|
1036
1036
|
# Update multiple coupon on the UltraCart account.
|
|
1037
|
-
# @param coupons_request Coupons to update (synchronous maximum
|
|
1037
|
+
# @param coupons_request Coupons to update (synchronous maximum 50 / asynchronous maximum 100)
|
|
1038
1038
|
# @param [Hash] opts the optional parameters
|
|
1039
1039
|
# @option opts [String] :_expand The object expansion to perform on the result. See documentation for examples
|
|
1040
1040
|
# @option opts [BOOLEAN] :_placeholders Whether or not placeholder values should be returned in the result. Useful for UIs that consume this REST API.
|
|
@@ -1047,7 +1047,7 @@ module UltracartClient
|
|
|
1047
1047
|
|
|
1048
1048
|
# Update multiple coupons
|
|
1049
1049
|
# Update multiple coupon on the UltraCart account.
|
|
1050
|
-
# @param coupons_request Coupons to update (synchronous maximum
|
|
1050
|
+
# @param coupons_request Coupons to update (synchronous maximum 50 / asynchronous maximum 100)
|
|
1051
1051
|
# @param [Hash] opts the optional parameters
|
|
1052
1052
|
# @option opts [String] :_expand The object expansion to perform on the result. See documentation for examples
|
|
1053
1053
|
# @option opts [BOOLEAN] :_placeholders Whether or not placeholder values should be returned in the result. Useful for UIs that consume this REST API.
|
|
@@ -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
|
|
@@ -4833,7 +4833,7 @@ module UltracartClient
|
|
|
4833
4833
|
# @param screen_recording_uuid
|
|
4834
4834
|
# @param screen_recording_page_view_uuid
|
|
4835
4835
|
# @param [Hash] opts the optional parameters
|
|
4836
|
-
# @return [
|
|
4836
|
+
# @return [ScreenRecordingPageViewDataResponse]
|
|
4837
4837
|
def get_screen_recording_page_view_data(storefront_oid, screen_recording_uuid, screen_recording_page_view_uuid, opts = {})
|
|
4838
4838
|
data, _status_code, _headers = get_screen_recording_page_view_data_with_http_info(storefront_oid, screen_recording_uuid, screen_recording_page_view_uuid, opts)
|
|
4839
4839
|
data
|
|
@@ -4845,7 +4845,7 @@ module UltracartClient
|
|
|
4845
4845
|
# @param screen_recording_uuid
|
|
4846
4846
|
# @param screen_recording_page_view_uuid
|
|
4847
4847
|
# @param [Hash] opts the optional parameters
|
|
4848
|
-
# @return [Array<(
|
|
4848
|
+
# @return [Array<(ScreenRecordingPageViewDataResponse, Fixnum, Hash)>] ScreenRecordingPageViewDataResponse data, response status code and response headers
|
|
4849
4849
|
def get_screen_recording_page_view_data_with_http_info(storefront_oid, screen_recording_uuid, screen_recording_page_view_uuid, opts = {})
|
|
4850
4850
|
if @api_client.config.debugging
|
|
4851
4851
|
@api_client.config.logger.debug 'Calling API: StorefrontApi.get_screen_recording_page_view_data ...'
|
|
@@ -4888,7 +4888,7 @@ module UltracartClient
|
|
|
4888
4888
|
:form_params => form_params,
|
|
4889
4889
|
:body => post_body,
|
|
4890
4890
|
:auth_names => auth_names,
|
|
4891
|
-
:return_type => '
|
|
4891
|
+
:return_type => 'ScreenRecordingPageViewDataResponse')
|
|
4892
4892
|
if @api_client.config.debugging
|
|
4893
4893
|
@api_client.config.logger.debug "API called: StorefrontApi#get_screen_recording_page_view_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
4894
4894
|
end
|
|
@@ -36,6 +36,8 @@ module UltracartClient
|
|
|
36
36
|
|
|
37
37
|
attr_accessor :amount_off_subtotal_with_items_purchase
|
|
38
38
|
|
|
39
|
+
attr_accessor :amount_off_subtotal_with_purchase
|
|
40
|
+
|
|
39
41
|
attr_accessor :automatically_apply_coupon_codes
|
|
40
42
|
|
|
41
43
|
attr_accessor :buy_one_get_one
|
|
@@ -156,6 +158,7 @@ module UltracartClient
|
|
|
156
158
|
:'amount_off_subtotal_and_shipping' => :'amount_off_subtotal_and_shipping',
|
|
157
159
|
:'amount_off_subtotal_with_block_purchase' => :'amount_off_subtotal_with_block_purchase',
|
|
158
160
|
:'amount_off_subtotal_with_items_purchase' => :'amount_off_subtotal_with_items_purchase',
|
|
161
|
+
:'amount_off_subtotal_with_purchase' => :'amount_off_subtotal_with_purchase',
|
|
159
162
|
:'automatically_apply_coupon_codes' => :'automatically_apply_coupon_codes',
|
|
160
163
|
:'buy_one_get_one' => :'buy_one_get_one',
|
|
161
164
|
:'calculated_description' => :'calculated_description',
|
|
@@ -218,6 +221,7 @@ module UltracartClient
|
|
|
218
221
|
:'amount_off_subtotal_and_shipping' => :'CouponAmountOffSubtotalAndShipping',
|
|
219
222
|
:'amount_off_subtotal_with_block_purchase' => :'CouponAmountOffSubtotalWithBlockPurchase',
|
|
220
223
|
:'amount_off_subtotal_with_items_purchase' => :'CouponAmountOffSubtotalWithItemsPurchase',
|
|
224
|
+
:'amount_off_subtotal_with_purchase' => :'CouponAmountOffSubtotalWithPurchase',
|
|
221
225
|
:'automatically_apply_coupon_codes' => :'CouponAutomaticallyApplyCouponCodes',
|
|
222
226
|
:'buy_one_get_one' => :'CouponBuyOneGetOneLimit',
|
|
223
227
|
:'calculated_description' => :'String',
|
|
@@ -315,6 +319,10 @@ module UltracartClient
|
|
|
315
319
|
self.amount_off_subtotal_with_items_purchase = attributes[:'amount_off_subtotal_with_items_purchase']
|
|
316
320
|
end
|
|
317
321
|
|
|
322
|
+
if attributes.has_key?(:'amount_off_subtotal_with_purchase')
|
|
323
|
+
self.amount_off_subtotal_with_purchase = attributes[:'amount_off_subtotal_with_purchase']
|
|
324
|
+
end
|
|
325
|
+
|
|
318
326
|
if attributes.has_key?(:'automatically_apply_coupon_codes')
|
|
319
327
|
self.automatically_apply_coupon_codes = attributes[:'automatically_apply_coupon_codes']
|
|
320
328
|
end
|
|
@@ -624,6 +632,7 @@ module UltracartClient
|
|
|
624
632
|
amount_off_subtotal_and_shipping == o.amount_off_subtotal_and_shipping &&
|
|
625
633
|
amount_off_subtotal_with_block_purchase == o.amount_off_subtotal_with_block_purchase &&
|
|
626
634
|
amount_off_subtotal_with_items_purchase == o.amount_off_subtotal_with_items_purchase &&
|
|
635
|
+
amount_off_subtotal_with_purchase == o.amount_off_subtotal_with_purchase &&
|
|
627
636
|
automatically_apply_coupon_codes == o.automatically_apply_coupon_codes &&
|
|
628
637
|
buy_one_get_one == o.buy_one_get_one &&
|
|
629
638
|
calculated_description == o.calculated_description &&
|
|
@@ -681,7 +690,7 @@ module UltracartClient
|
|
|
681
690
|
# Calculates hash code according to all attributes.
|
|
682
691
|
# @return [Fixnum] Hash code
|
|
683
692
|
def hash
|
|
684
|
-
[affiliate_oid, allow_multiple_one_time_codes, amount_off_items, amount_off_shipping, amount_off_shipping_with_items_purchase, amount_off_subtotal, amount_off_subtotal_and_free_shipping, amount_off_subtotal_and_shipping, amount_off_subtotal_with_block_purchase, amount_off_subtotal_with_items_purchase, automatically_apply_coupon_codes, buy_one_get_one, calculated_description, can_be_used_with_other_coupons, coupon_oid, coupon_type, description, discount_item_with_item_purchase, discount_items, expiration_dts, free_item_and_shipping_with_subtotal, free_item_with_item_purchase, free_item_with_subtotal, free_items_with_item_purchase, free_items_with_mixmatch_purchase, free_shipping, free_shipping_specific_items, free_shipping_with_items_purchase, free_shipping_with_subtotal, merchant_code, merchant_notes, multiple_amounts_off_items, no_discount, percent_off_item_with_items_quantity_purchase, percent_off_items, percent_off_items_and_free_shipping, percent_off_items_with_items_purchase, percent_off_retail_price_items, percent_off_shipping, percent_off_subtotal, percent_off_subtotal_and_free_shipping, percent_off_subtotal_limit, percent_off_subtotal_with_items_purchase, percent_off_subtotal_with_subtotal, quickbooks_code, restrict_by_postal_codes, restrict_by_screen_branding_theme_codes, restrict_by_storefronts, start_dts, super_coupon, tiered_amount_off_item, tiered_amount_off_subtotal, tiered_percent_off_items, tiered_percent_off_shipping, tiered_percent_off_subtotal, usable_by].hash
|
|
693
|
+
[affiliate_oid, allow_multiple_one_time_codes, amount_off_items, amount_off_shipping, amount_off_shipping_with_items_purchase, amount_off_subtotal, amount_off_subtotal_and_free_shipping, amount_off_subtotal_and_shipping, amount_off_subtotal_with_block_purchase, amount_off_subtotal_with_items_purchase, amount_off_subtotal_with_purchase, automatically_apply_coupon_codes, buy_one_get_one, calculated_description, can_be_used_with_other_coupons, coupon_oid, coupon_type, description, discount_item_with_item_purchase, discount_items, expiration_dts, free_item_and_shipping_with_subtotal, free_item_with_item_purchase, free_item_with_subtotal, free_items_with_item_purchase, free_items_with_mixmatch_purchase, free_shipping, free_shipping_specific_items, free_shipping_with_items_purchase, free_shipping_with_subtotal, merchant_code, merchant_notes, multiple_amounts_off_items, no_discount, percent_off_item_with_items_quantity_purchase, percent_off_items, percent_off_items_and_free_shipping, percent_off_items_with_items_purchase, percent_off_retail_price_items, percent_off_shipping, percent_off_subtotal, percent_off_subtotal_and_free_shipping, percent_off_subtotal_limit, percent_off_subtotal_with_items_purchase, percent_off_subtotal_with_subtotal, quickbooks_code, restrict_by_postal_codes, restrict_by_screen_branding_theme_codes, restrict_by_storefronts, start_dts, super_coupon, tiered_amount_off_item, tiered_amount_off_subtotal, tiered_percent_off_items, tiered_percent_off_shipping, tiered_percent_off_subtotal, usable_by].hash
|
|
685
694
|
end
|
|
686
695
|
|
|
687
696
|
# Builds the object from hash
|
|
@@ -0,0 +1,220 @@
|
|
|
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 CouponAmountOffSubtotalWithPurchase
|
|
17
|
+
# The ISO-4217 three letter currency code the customer is viewing prices in
|
|
18
|
+
attr_accessor :currency_code
|
|
19
|
+
|
|
20
|
+
# The amount of subtotal discount
|
|
21
|
+
attr_accessor :discount_amount
|
|
22
|
+
|
|
23
|
+
# The purchase amount to qualify for subtotal discount and free shipping
|
|
24
|
+
attr_accessor :purchase_amount
|
|
25
|
+
|
|
26
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
27
|
+
def self.attribute_map
|
|
28
|
+
{
|
|
29
|
+
:'currency_code' => :'currency_code',
|
|
30
|
+
:'discount_amount' => :'discount_amount',
|
|
31
|
+
:'purchase_amount' => :'purchase_amount'
|
|
32
|
+
}
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Attribute type mapping.
|
|
36
|
+
def self.swagger_types
|
|
37
|
+
{
|
|
38
|
+
:'currency_code' => :'String',
|
|
39
|
+
:'discount_amount' => :'Float',
|
|
40
|
+
:'purchase_amount' => :'Float'
|
|
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?(:'currency_code')
|
|
53
|
+
self.currency_code = attributes[:'currency_code']
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
if attributes.has_key?(:'discount_amount')
|
|
57
|
+
self.discount_amount = attributes[:'discount_amount']
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
if attributes.has_key?(:'purchase_amount')
|
|
61
|
+
self.purchase_amount = attributes[:'purchase_amount']
|
|
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
|
+
if !@currency_code.nil? && @currency_code.to_s.length > 3
|
|
70
|
+
invalid_properties.push('invalid value for "currency_code", the character length must be smaller than or equal to 3.')
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
invalid_properties
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Check to see if the all the properties in the model are valid
|
|
77
|
+
# @return true if the model is valid
|
|
78
|
+
def valid?
|
|
79
|
+
return false if !@currency_code.nil? && @currency_code.to_s.length > 3
|
|
80
|
+
true
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Custom attribute writer method with validation
|
|
84
|
+
# @param [Object] currency_code Value to be assigned
|
|
85
|
+
def currency_code=(currency_code)
|
|
86
|
+
if !currency_code.nil? && currency_code.to_s.length > 3
|
|
87
|
+
fail ArgumentError, 'invalid value for "currency_code", the character length must be smaller than or equal to 3.'
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
@currency_code = currency_code
|
|
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
|
+
currency_code == o.currency_code &&
|
|
99
|
+
discount_amount == o.discount_amount &&
|
|
100
|
+
purchase_amount == o.purchase_amount
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# @see the `==` method
|
|
104
|
+
# @param [Object] Object to be compared
|
|
105
|
+
def eql?(o)
|
|
106
|
+
self == o
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Calculates hash code according to all attributes.
|
|
110
|
+
# @return [Fixnum] Hash code
|
|
111
|
+
def hash
|
|
112
|
+
[currency_code, discount_amount, purchase_amount].hash
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Builds the object from hash
|
|
116
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
117
|
+
# @return [Object] Returns the model itself
|
|
118
|
+
def build_from_hash(attributes)
|
|
119
|
+
return nil unless attributes.is_a?(Hash)
|
|
120
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
121
|
+
if type =~ /\AArray<(.*)>/i
|
|
122
|
+
# check to ensure the input is an array given that the attribute
|
|
123
|
+
# is documented as an array but the input is not
|
|
124
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
125
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
126
|
+
end
|
|
127
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
128
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
129
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
self
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
# Deserializes the data based on type
|
|
136
|
+
# @param string type Data type
|
|
137
|
+
# @param string value Value to be deserialized
|
|
138
|
+
# @return [Object] Deserialized data
|
|
139
|
+
def _deserialize(type, value)
|
|
140
|
+
case type.to_sym
|
|
141
|
+
when :DateTime
|
|
142
|
+
DateTime.parse(value)
|
|
143
|
+
when :Date
|
|
144
|
+
Date.parse(value)
|
|
145
|
+
when :String
|
|
146
|
+
value.to_s
|
|
147
|
+
when :Integer
|
|
148
|
+
value.to_i
|
|
149
|
+
when :Float
|
|
150
|
+
value.to_f
|
|
151
|
+
when :BOOLEAN
|
|
152
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
153
|
+
true
|
|
154
|
+
else
|
|
155
|
+
false
|
|
156
|
+
end
|
|
157
|
+
when :Object
|
|
158
|
+
# generic object (usually a Hash), return directly
|
|
159
|
+
value
|
|
160
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
161
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
162
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
163
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
164
|
+
k_type = Regexp.last_match[:k_type]
|
|
165
|
+
v_type = Regexp.last_match[:v_type]
|
|
166
|
+
{}.tap do |hash|
|
|
167
|
+
value.each do |k, v|
|
|
168
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
169
|
+
end
|
|
170
|
+
end
|
|
171
|
+
else # model
|
|
172
|
+
temp_model = UltracartClient.const_get(type).new
|
|
173
|
+
temp_model.build_from_hash(value)
|
|
174
|
+
end
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
# Returns the string representation of the object
|
|
178
|
+
# @return [String] String presentation of the object
|
|
179
|
+
def to_s
|
|
180
|
+
to_hash.to_s
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
184
|
+
# @return [Hash] Returns the object in the form of hash
|
|
185
|
+
def to_body
|
|
186
|
+
to_hash
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
# Returns the object in the form of hash
|
|
190
|
+
# @return [Hash] Returns the object in the form of hash
|
|
191
|
+
def to_hash
|
|
192
|
+
hash = {}
|
|
193
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
194
|
+
value = self.send(attr)
|
|
195
|
+
next if value.nil?
|
|
196
|
+
hash[param] = _to_hash(value)
|
|
197
|
+
end
|
|
198
|
+
hash
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
# Outputs non-array value in the form of hash
|
|
202
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
203
|
+
# @param [Object] value Any valid value
|
|
204
|
+
# @return [Hash] Returns the value in the form of hash
|
|
205
|
+
def _to_hash(value)
|
|
206
|
+
if value.is_a?(Array)
|
|
207
|
+
value.compact.map { |v| _to_hash(v) }
|
|
208
|
+
elsif value.is_a?(Hash)
|
|
209
|
+
{}.tap do |hash|
|
|
210
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
211
|
+
end
|
|
212
|
+
elsif value.respond_to? :to_hash
|
|
213
|
+
value.to_hash
|
|
214
|
+
else
|
|
215
|
+
value
|
|
216
|
+
end
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
end
|
|
220
|
+
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
|
|
@@ -0,0 +1,221 @@
|
|
|
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 ScreenRecordingPageViewDataResponse
|
|
17
|
+
attr_accessor :error
|
|
18
|
+
|
|
19
|
+
attr_accessor :events_json
|
|
20
|
+
|
|
21
|
+
attr_accessor :metadata
|
|
22
|
+
|
|
23
|
+
# Indicates if API call was successful
|
|
24
|
+
attr_accessor :success
|
|
25
|
+
|
|
26
|
+
attr_accessor :warning
|
|
27
|
+
|
|
28
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
29
|
+
def self.attribute_map
|
|
30
|
+
{
|
|
31
|
+
:'error' => :'error',
|
|
32
|
+
:'events_json' => :'events_json',
|
|
33
|
+
:'metadata' => :'metadata',
|
|
34
|
+
:'success' => :'success',
|
|
35
|
+
:'warning' => :'warning'
|
|
36
|
+
}
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Attribute type mapping.
|
|
40
|
+
def self.swagger_types
|
|
41
|
+
{
|
|
42
|
+
:'error' => :'Error',
|
|
43
|
+
:'events_json' => :'String',
|
|
44
|
+
:'metadata' => :'ResponseMetadata',
|
|
45
|
+
:'success' => :'BOOLEAN',
|
|
46
|
+
:'warning' => :'Warning'
|
|
47
|
+
}
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Initializes the object
|
|
51
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
52
|
+
def initialize(attributes = {})
|
|
53
|
+
return unless attributes.is_a?(Hash)
|
|
54
|
+
|
|
55
|
+
# convert string to symbol for hash key
|
|
56
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
57
|
+
|
|
58
|
+
if attributes.has_key?(:'error')
|
|
59
|
+
self.error = attributes[:'error']
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
if attributes.has_key?(:'events_json')
|
|
63
|
+
self.events_json = attributes[:'events_json']
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
if attributes.has_key?(:'metadata')
|
|
67
|
+
self.metadata = attributes[:'metadata']
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
if attributes.has_key?(:'success')
|
|
71
|
+
self.success = attributes[:'success']
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
if attributes.has_key?(:'warning')
|
|
75
|
+
self.warning = attributes[:'warning']
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
80
|
+
# @return Array for valid properties with the reasons
|
|
81
|
+
def list_invalid_properties
|
|
82
|
+
invalid_properties = Array.new
|
|
83
|
+
invalid_properties
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Check to see if the all the properties in the model are valid
|
|
87
|
+
# @return true if the model is valid
|
|
88
|
+
def valid?
|
|
89
|
+
true
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# Checks equality by comparing each attribute.
|
|
93
|
+
# @param [Object] Object to be compared
|
|
94
|
+
def ==(o)
|
|
95
|
+
return true if self.equal?(o)
|
|
96
|
+
self.class == o.class &&
|
|
97
|
+
error == o.error &&
|
|
98
|
+
events_json == o.events_json &&
|
|
99
|
+
metadata == o.metadata &&
|
|
100
|
+
success == o.success &&
|
|
101
|
+
warning == o.warning
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# @see the `==` method
|
|
105
|
+
# @param [Object] Object to be compared
|
|
106
|
+
def eql?(o)
|
|
107
|
+
self == o
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Calculates hash code according to all attributes.
|
|
111
|
+
# @return [Fixnum] Hash code
|
|
112
|
+
def hash
|
|
113
|
+
[error, events_json, metadata, success, warning].hash
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# Builds the object from hash
|
|
117
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
118
|
+
# @return [Object] Returns the model itself
|
|
119
|
+
def build_from_hash(attributes)
|
|
120
|
+
return nil unless attributes.is_a?(Hash)
|
|
121
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
122
|
+
if type =~ /\AArray<(.*)>/i
|
|
123
|
+
# check to ensure the input is an array given that the attribute
|
|
124
|
+
# is documented as an array but the input is not
|
|
125
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
126
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
127
|
+
end
|
|
128
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
129
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
130
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
self
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Deserializes the data based on type
|
|
137
|
+
# @param string type Data type
|
|
138
|
+
# @param string value Value to be deserialized
|
|
139
|
+
# @return [Object] Deserialized data
|
|
140
|
+
def _deserialize(type, value)
|
|
141
|
+
case type.to_sym
|
|
142
|
+
when :DateTime
|
|
143
|
+
DateTime.parse(value)
|
|
144
|
+
when :Date
|
|
145
|
+
Date.parse(value)
|
|
146
|
+
when :String
|
|
147
|
+
value.to_s
|
|
148
|
+
when :Integer
|
|
149
|
+
value.to_i
|
|
150
|
+
when :Float
|
|
151
|
+
value.to_f
|
|
152
|
+
when :BOOLEAN
|
|
153
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
154
|
+
true
|
|
155
|
+
else
|
|
156
|
+
false
|
|
157
|
+
end
|
|
158
|
+
when :Object
|
|
159
|
+
# generic object (usually a Hash), return directly
|
|
160
|
+
value
|
|
161
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
162
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
163
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
164
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
165
|
+
k_type = Regexp.last_match[:k_type]
|
|
166
|
+
v_type = Regexp.last_match[:v_type]
|
|
167
|
+
{}.tap do |hash|
|
|
168
|
+
value.each do |k, v|
|
|
169
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
170
|
+
end
|
|
171
|
+
end
|
|
172
|
+
else # model
|
|
173
|
+
temp_model = UltracartClient.const_get(type).new
|
|
174
|
+
temp_model.build_from_hash(value)
|
|
175
|
+
end
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# Returns the string representation of the object
|
|
179
|
+
# @return [String] String presentation of the object
|
|
180
|
+
def to_s
|
|
181
|
+
to_hash.to_s
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
185
|
+
# @return [Hash] Returns the object in the form of hash
|
|
186
|
+
def to_body
|
|
187
|
+
to_hash
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
# Returns the object in the form of hash
|
|
191
|
+
# @return [Hash] Returns the object in the form of hash
|
|
192
|
+
def to_hash
|
|
193
|
+
hash = {}
|
|
194
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
195
|
+
value = self.send(attr)
|
|
196
|
+
next if value.nil?
|
|
197
|
+
hash[param] = _to_hash(value)
|
|
198
|
+
end
|
|
199
|
+
hash
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# Outputs non-array value in the form of hash
|
|
203
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
204
|
+
# @param [Object] value Any valid value
|
|
205
|
+
# @return [Hash] Returns the value in the form of hash
|
|
206
|
+
def _to_hash(value)
|
|
207
|
+
if value.is_a?(Array)
|
|
208
|
+
value.compact.map { |v| _to_hash(v) }
|
|
209
|
+
elsif value.is_a?(Hash)
|
|
210
|
+
{}.tap do |hash|
|
|
211
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
212
|
+
end
|
|
213
|
+
elsif value.respond_to? :to_hash
|
|
214
|
+
value.to_hash
|
|
215
|
+
else
|
|
216
|
+
value
|
|
217
|
+
end
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
end
|
|
221
|
+
end
|
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.7
|
|
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-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: typhoeus
|
|
@@ -315,6 +315,7 @@ files:
|
|
|
315
315
|
- docs/CouponAmountOffSubtotalFreeShippingWithPurchase.md
|
|
316
316
|
- docs/CouponAmountOffSubtotalWithBlockPurchase.md
|
|
317
317
|
- docs/CouponAmountOffSubtotalWithItemsPurchase.md
|
|
318
|
+
- docs/CouponAmountOffSubtotalWithPurchase.md
|
|
318
319
|
- docs/CouponApi.md
|
|
319
320
|
- docs/CouponAutoApplyCondition.md
|
|
320
321
|
- docs/CouponAutoApplyConditions.md
|
|
@@ -496,6 +497,7 @@ files:
|
|
|
496
497
|
- docs/EmailVerifyTokenRequest.md
|
|
497
498
|
- docs/EmailVerifyTokenResponse.md
|
|
498
499
|
- docs/EmailVerifyTokenValidateRequest.md
|
|
500
|
+
- docs/EmailVerifyTokenValidateResponse.md
|
|
499
501
|
- docs/Error.md
|
|
500
502
|
- docs/ErrorResponse.md
|
|
501
503
|
- docs/Experiment.md
|
|
@@ -694,6 +696,7 @@ files:
|
|
|
694
696
|
- docs/ScreenRecordingFilterValuesEventParams.md
|
|
695
697
|
- docs/ScreenRecordingMultifield.md
|
|
696
698
|
- docs/ScreenRecordingPageView.md
|
|
699
|
+
- docs/ScreenRecordingPageViewDataResponse.md
|
|
697
700
|
- docs/ScreenRecordingPageViewEvent.md
|
|
698
701
|
- docs/ScreenRecordingPageViewEventParameter.md
|
|
699
702
|
- docs/ScreenRecordingPageViewParameter.md
|
|
@@ -903,6 +906,7 @@ files:
|
|
|
903
906
|
- lib/ultracart_api/models/coupon_amount_off_subtotal_free_shipping_with_purchase.rb
|
|
904
907
|
- lib/ultracart_api/models/coupon_amount_off_subtotal_with_block_purchase.rb
|
|
905
908
|
- lib/ultracart_api/models/coupon_amount_off_subtotal_with_items_purchase.rb
|
|
909
|
+
- lib/ultracart_api/models/coupon_amount_off_subtotal_with_purchase.rb
|
|
906
910
|
- lib/ultracart_api/models/coupon_auto_apply_condition.rb
|
|
907
911
|
- lib/ultracart_api/models/coupon_auto_apply_conditions.rb
|
|
908
912
|
- lib/ultracart_api/models/coupon_automatically_apply_coupon_codes.rb
|
|
@@ -1082,6 +1086,7 @@ files:
|
|
|
1082
1086
|
- lib/ultracart_api/models/email_verify_token_request.rb
|
|
1083
1087
|
- lib/ultracart_api/models/email_verify_token_response.rb
|
|
1084
1088
|
- lib/ultracart_api/models/email_verify_token_validate_request.rb
|
|
1089
|
+
- lib/ultracart_api/models/email_verify_token_validate_response.rb
|
|
1085
1090
|
- lib/ultracart_api/models/error.rb
|
|
1086
1091
|
- lib/ultracart_api/models/error_response.rb
|
|
1087
1092
|
- lib/ultracart_api/models/experiment.rb
|
|
@@ -1276,6 +1281,7 @@ files:
|
|
|
1276
1281
|
- lib/ultracart_api/models/screen_recording_filter_values_event_params.rb
|
|
1277
1282
|
- lib/ultracart_api/models/screen_recording_multifield.rb
|
|
1278
1283
|
- lib/ultracart_api/models/screen_recording_page_view.rb
|
|
1284
|
+
- lib/ultracart_api/models/screen_recording_page_view_data_response.rb
|
|
1279
1285
|
- lib/ultracart_api/models/screen_recording_page_view_event.rb
|
|
1280
1286
|
- lib/ultracart_api/models/screen_recording_page_view_event_parameter.rb
|
|
1281
1287
|
- lib/ultracart_api/models/screen_recording_page_view_parameter.rb
|