ultracart_api 3.1.14 → 3.1.37
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -77
- data/docs/Coupon.md +1 -0
- data/docs/CouponPercentOffMsrpItems.md +11 -0
- data/docs/CustomerLoyalty.md +1 -0
- data/docs/EmailCampaign.md +2 -1
- data/docs/EmailFlow.md +2 -1
- data/docs/LibraryItemAttribute.md +0 -1
- data/docs/OrderApi.md +4 -0
- data/docs/OrderProcessPaymentRequest.md +1 -0
- data/docs/OrderQuery.md +3 -1
- data/docs/ScreenRecording.md +13 -0
- data/docs/ScreenRecordingAdPlatform.md +13 -0
- data/docs/ScreenRecordingFilter.md +12 -0
- data/docs/ScreenRecordingFilterValues.md +12 -1
- data/docs/ScreenRecordingFilterValuesPageParam.md +9 -0
- data/docs/ScreenRecordingFilterValuesPageView.md +12 -0
- data/docs/ScreenRecordingPageView.md +2 -0
- data/docs/ScreenRecordingPageViewEvent.md +1 -0
- data/docs/ScreenRecordingQueryResponse.md +3 -0
- data/docs/ScreenRecordingSegment.md +3 -0
- data/docs/ScreenRecordingSettings.md +5 -0
- data/docs/StorefrontApi.md +3 -4
- data/docs/TaxJarConfig.md +1 -0
- data/lib/ultracart_api.rb +4 -0
- data/lib/ultracart_api/api/order_api.rb +6 -0
- data/lib/ultracart_api/api/storefront_api.rb +5 -6
- data/lib/ultracart_api/models/coupon.rb +10 -1
- data/lib/ultracart_api/models/coupon_percent_off_msrp_items.rb +219 -0
- data/lib/ultracart_api/models/customer_loyalty.rb +11 -1
- data/lib/ultracart_api/models/email_campaign.rb +12 -2
- data/lib/ultracart_api/models/email_flow.rb +12 -2
- data/lib/ultracart_api/models/library_item_attribute.rb +1 -10
- data/lib/ultracart_api/models/order_process_payment_request.rb +11 -1
- data/lib/ultracart_api/models/order_query.rb +22 -2
- data/lib/ultracart_api/models/screen_recording.rb +128 -1
- data/lib/ultracart_api/models/screen_recording_ad_platform.rb +235 -0
- data/lib/ultracart_api/models/screen_recording_filter.rb +109 -1
- data/lib/ultracart_api/models/screen_recording_filter_values.rb +128 -11
- data/lib/ultracart_api/models/screen_recording_filter_values_page_param.rb +195 -0
- data/lib/ultracart_api/models/screen_recording_filter_values_page_view.rb +226 -0
- data/lib/ultracart_api/models/screen_recording_page_view.rb +21 -1
- data/lib/ultracart_api/models/screen_recording_page_view_event.rb +10 -1
- data/lib/ultracart_api/models/screen_recording_query_response.rb +30 -1
- data/lib/ultracart_api/models/screen_recording_segment.rb +30 -1
- data/lib/ultracart_api/models/screen_recording_settings.rb +49 -4
- data/lib/ultracart_api/models/tax_jar_config.rb +11 -1
- data/lib/ultracart_api/version.rb +1 -1
- metadata +10 -2
data/docs/StorefrontApi.md
CHANGED
@@ -1115,7 +1115,7 @@ nil (empty response body)
|
|
1115
1115
|
|
1116
1116
|
|
1117
1117
|
# **delete_screen_recording_segment**
|
1118
|
-
>
|
1118
|
+
> delete_screen_recording_segment(storefront_oid, screen_recording_segment_oid)
|
1119
1119
|
|
1120
1120
|
Delete screen recording segment
|
1121
1121
|
|
@@ -1136,8 +1136,7 @@ screen_recording_segment_oid = 56 # Integer |
|
|
1136
1136
|
|
1137
1137
|
begin
|
1138
1138
|
#Delete screen recording segment
|
1139
|
-
|
1140
|
-
p result
|
1139
|
+
api_instance.delete_screen_recording_segment(storefront_oid, screen_recording_segment_oid)
|
1141
1140
|
rescue UltracartClient::ApiError => e
|
1142
1141
|
puts "Exception when calling StorefrontApi->delete_screen_recording_segment: #{e}"
|
1143
1142
|
end
|
@@ -1152,7 +1151,7 @@ Name | Type | Description | Notes
|
|
1152
1151
|
|
1153
1152
|
### Return type
|
1154
1153
|
|
1155
|
-
|
1154
|
+
nil (empty response body)
|
1156
1155
|
|
1157
1156
|
### Authorization
|
1158
1157
|
|
data/docs/TaxJarConfig.md
CHANGED
@@ -8,6 +8,7 @@ Name | Type | Description | Notes
|
|
8
8
|
**estimate_only** | **BOOLEAN** | True if this TaxJar configuration is to estimate taxes only and not report placed orders to TaxJar | [optional]
|
9
9
|
**send_outside_nexus** | **BOOLEAN** | Send orders outside your nexus TaxJar. The default is to not transmit outside orders to TaxJar to reduce API calls. However, this will prevent TaxJar from dynamically creating new Nexus when thresholds are exceeded for a state. | [optional]
|
10
10
|
**send_test_orders** | **BOOLEAN** | Send test orders through to TaxJar. The default is to not transmit test orders to TaxJar. | [optional]
|
11
|
+
**skip_channel_orders** | **BOOLEAN** | Do not send channel partner orders to TaxJar. Set this to true if your channel partner reports tax on their own. | [optional]
|
11
12
|
**use_distribution_center_from** | **BOOLEAN** | Use distribution center from address | [optional]
|
12
13
|
|
13
14
|
|
data/lib/ultracart_api.rb
CHANGED
@@ -156,6 +156,7 @@ require 'ultracart_api/models/coupon_percent_off_item_with_items_quantity_purcha
|
|
156
156
|
require 'ultracart_api/models/coupon_percent_off_items'
|
157
157
|
require 'ultracart_api/models/coupon_percent_off_items_and_free_shipping'
|
158
158
|
require 'ultracart_api/models/coupon_percent_off_items_with_items_purchase'
|
159
|
+
require 'ultracart_api/models/coupon_percent_off_msrp_items'
|
159
160
|
require 'ultracart_api/models/coupon_percent_off_retail_price_items'
|
160
161
|
require 'ultracart_api/models/coupon_percent_off_shipping'
|
161
162
|
require 'ultracart_api/models/coupon_percent_off_subtotal'
|
@@ -485,6 +486,7 @@ require 'ultracart_api/models/register_affiliate_click_response'
|
|
485
486
|
require 'ultracart_api/models/response_metadata'
|
486
487
|
require 'ultracart_api/models/result_set'
|
487
488
|
require 'ultracart_api/models/screen_recording'
|
489
|
+
require 'ultracart_api/models/screen_recording_ad_platform'
|
488
490
|
require 'ultracart_api/models/screen_recording_filter'
|
489
491
|
require 'ultracart_api/models/screen_recording_filter_geo_distance'
|
490
492
|
require 'ultracart_api/models/screen_recording_filter_ip_search'
|
@@ -500,6 +502,8 @@ require 'ultracart_api/models/screen_recording_filter_string_search'
|
|
500
502
|
require 'ultracart_api/models/screen_recording_filter_values'
|
501
503
|
require 'ultracart_api/models/screen_recording_filter_values_event'
|
502
504
|
require 'ultracart_api/models/screen_recording_filter_values_event_params'
|
505
|
+
require 'ultracart_api/models/screen_recording_filter_values_page_param'
|
506
|
+
require 'ultracart_api/models/screen_recording_filter_values_page_view'
|
503
507
|
require 'ultracart_api/models/screen_recording_merchant_notes_request'
|
504
508
|
require 'ultracart_api/models/screen_recording_multifield'
|
505
509
|
require 'ultracart_api/models/screen_recording_page_view'
|
@@ -578,6 +578,8 @@ module UltracartClient
|
|
578
578
|
# @option opts [String] :custom_field_5
|
579
579
|
# @option opts [String] :custom_field_6
|
580
580
|
# @option opts [String] :custom_field_7
|
581
|
+
# @option opts [String] :ship_on_date_begin
|
582
|
+
# @option opts [String] :ship_on_date_end
|
581
583
|
# @option opts [Integer] :_limit The maximum number of records to return on this one API call. (Maximum 200) (default to 100)
|
582
584
|
# @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index. (default to 0)
|
583
585
|
# @option opts [String] :_sort The sort order of the orders. See Sorting documentation for examples of using multiple values and sorting by ascending and descending.
|
@@ -628,6 +630,8 @@ module UltracartClient
|
|
628
630
|
# @option opts [String] :custom_field_5
|
629
631
|
# @option opts [String] :custom_field_6
|
630
632
|
# @option opts [String] :custom_field_7
|
633
|
+
# @option opts [String] :ship_on_date_begin
|
634
|
+
# @option opts [String] :ship_on_date_end
|
631
635
|
# @option opts [Integer] :_limit The maximum number of records to return on this one API call. (Maximum 200)
|
632
636
|
# @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index.
|
633
637
|
# @option opts [String] :_sort The sort order of the orders. See Sorting documentation for examples of using multiple values and sorting by ascending and descending.
|
@@ -679,6 +683,8 @@ module UltracartClient
|
|
679
683
|
query_params[:'Custom Field 5'] = opts[:'custom_field_5'] if !opts[:'custom_field_5'].nil?
|
680
684
|
query_params[:'Custom Field 6'] = opts[:'custom_field_6'] if !opts[:'custom_field_6'].nil?
|
681
685
|
query_params[:'Custom Field 7'] = opts[:'custom_field_7'] if !opts[:'custom_field_7'].nil?
|
686
|
+
query_params[:'ship_on_date_begin'] = opts[:'ship_on_date_begin'] if !opts[:'ship_on_date_begin'].nil?
|
687
|
+
query_params[:'ship_on_date_end'] = opts[:'ship_on_date_end'] if !opts[:'ship_on_date_end'].nil?
|
682
688
|
query_params[:'_limit'] = opts[:'_limit'] if !opts[:'_limit'].nil?
|
683
689
|
query_params[:'_offset'] = opts[:'_offset'] if !opts[:'_offset'].nil?
|
684
690
|
query_params[:'_sort'] = opts[:'_sort'] if !opts[:'_sort'].nil?
|
@@ -1141,17 +1141,17 @@ module UltracartClient
|
|
1141
1141
|
# @param storefront_oid
|
1142
1142
|
# @param screen_recording_segment_oid
|
1143
1143
|
# @param [Hash] opts the optional parameters
|
1144
|
-
# @return [
|
1144
|
+
# @return [nil]
|
1145
1145
|
def delete_screen_recording_segment(storefront_oid, screen_recording_segment_oid, opts = {})
|
1146
|
-
|
1147
|
-
|
1146
|
+
delete_screen_recording_segment_with_http_info(storefront_oid, screen_recording_segment_oid, opts)
|
1147
|
+
nil
|
1148
1148
|
end
|
1149
1149
|
|
1150
1150
|
# Delete screen recording segment
|
1151
1151
|
# @param storefront_oid
|
1152
1152
|
# @param screen_recording_segment_oid
|
1153
1153
|
# @param [Hash] opts the optional parameters
|
1154
|
-
# @return [Array<(
|
1154
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
1155
1155
|
def delete_screen_recording_segment_with_http_info(storefront_oid, screen_recording_segment_oid, opts = {})
|
1156
1156
|
if @api_client.config.debugging
|
1157
1157
|
@api_client.config.logger.debug 'Calling API: StorefrontApi.delete_screen_recording_segment ...'
|
@@ -1189,8 +1189,7 @@ module UltracartClient
|
|
1189
1189
|
:query_params => query_params,
|
1190
1190
|
:form_params => form_params,
|
1191
1191
|
:body => post_body,
|
1192
|
-
:auth_names => auth_names
|
1193
|
-
:return_type => 'ScreenRecordingSegmentResponse')
|
1192
|
+
:auth_names => auth_names)
|
1194
1193
|
if @api_client.config.debugging
|
1195
1194
|
@api_client.config.logger.debug "API called: StorefrontApi#delete_screen_recording_segment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1196
1195
|
end
|
@@ -100,6 +100,8 @@ module UltracartClient
|
|
100
100
|
|
101
101
|
attr_accessor :percent_off_items_with_items_purchase
|
102
102
|
|
103
|
+
attr_accessor :percent_off_msrp_items
|
104
|
+
|
103
105
|
attr_accessor :percent_off_retail_price_items
|
104
106
|
|
105
107
|
attr_accessor :percent_off_shipping
|
@@ -186,6 +188,7 @@ module UltracartClient
|
|
186
188
|
:'percent_off_items' => :'percent_off_items',
|
187
189
|
:'percent_off_items_and_free_shipping' => :'percent_off_items_and_free_shipping',
|
188
190
|
:'percent_off_items_with_items_purchase' => :'percent_off_items_with_items_purchase',
|
191
|
+
:'percent_off_msrp_items' => :'percent_off_msrp_items',
|
189
192
|
:'percent_off_retail_price_items' => :'percent_off_retail_price_items',
|
190
193
|
:'percent_off_shipping' => :'percent_off_shipping',
|
191
194
|
:'percent_off_subtotal' => :'percent_off_subtotal',
|
@@ -249,6 +252,7 @@ module UltracartClient
|
|
249
252
|
:'percent_off_items' => :'CouponPercentOffItems',
|
250
253
|
:'percent_off_items_and_free_shipping' => :'CouponPercentOffItemsAndFreeShipping',
|
251
254
|
:'percent_off_items_with_items_purchase' => :'CouponPercentOffItemsWithItemsPurchase',
|
255
|
+
:'percent_off_msrp_items' => :'CouponPercentOffMsrpItems',
|
252
256
|
:'percent_off_retail_price_items' => :'CouponPercentOffRetailPriceItems',
|
253
257
|
:'percent_off_shipping' => :'CouponPercentOffShipping',
|
254
258
|
:'percent_off_subtotal' => :'CouponPercentOffSubtotal',
|
@@ -431,6 +435,10 @@ module UltracartClient
|
|
431
435
|
self.percent_off_items_with_items_purchase = attributes[:'percent_off_items_with_items_purchase']
|
432
436
|
end
|
433
437
|
|
438
|
+
if attributes.has_key?(:'percent_off_msrp_items')
|
439
|
+
self.percent_off_msrp_items = attributes[:'percent_off_msrp_items']
|
440
|
+
end
|
441
|
+
|
434
442
|
if attributes.has_key?(:'percent_off_retail_price_items')
|
435
443
|
self.percent_off_retail_price_items = attributes[:'percent_off_retail_price_items']
|
436
444
|
end
|
@@ -660,6 +668,7 @@ module UltracartClient
|
|
660
668
|
percent_off_items == o.percent_off_items &&
|
661
669
|
percent_off_items_and_free_shipping == o.percent_off_items_and_free_shipping &&
|
662
670
|
percent_off_items_with_items_purchase == o.percent_off_items_with_items_purchase &&
|
671
|
+
percent_off_msrp_items == o.percent_off_msrp_items &&
|
663
672
|
percent_off_retail_price_items == o.percent_off_retail_price_items &&
|
664
673
|
percent_off_shipping == o.percent_off_shipping &&
|
665
674
|
percent_off_subtotal == o.percent_off_subtotal &&
|
@@ -690,7 +699,7 @@ module UltracartClient
|
|
690
699
|
# Calculates hash code according to all attributes.
|
691
700
|
# @return [Fixnum] Hash code
|
692
701
|
def 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
|
702
|
+
[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_msrp_items, 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
|
694
703
|
end
|
695
704
|
|
696
705
|
# Builds the object from hash
|
@@ -0,0 +1,219 @@
|
|
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 CouponPercentOffMsrpItems
|
17
|
+
# The percentage of subtotal discount
|
18
|
+
attr_accessor :discount_percent
|
19
|
+
|
20
|
+
# A list of items which cannot be discounted.
|
21
|
+
attr_accessor :excluded_items
|
22
|
+
|
23
|
+
# An list of items which will receive a discount.
|
24
|
+
attr_accessor :items
|
25
|
+
|
26
|
+
# The (optional) maximum quantity of discounted items.
|
27
|
+
attr_accessor :limit
|
28
|
+
|
29
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
30
|
+
def self.attribute_map
|
31
|
+
{
|
32
|
+
:'discount_percent' => :'discount_percent',
|
33
|
+
:'excluded_items' => :'excluded_items',
|
34
|
+
:'items' => :'items',
|
35
|
+
:'limit' => :'limit'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# Attribute type mapping.
|
40
|
+
def self.swagger_types
|
41
|
+
{
|
42
|
+
:'discount_percent' => :'Float',
|
43
|
+
:'excluded_items' => :'Array<String>',
|
44
|
+
:'items' => :'Array<String>',
|
45
|
+
:'limit' => :'Integer'
|
46
|
+
}
|
47
|
+
end
|
48
|
+
|
49
|
+
# Initializes the object
|
50
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
51
|
+
def initialize(attributes = {})
|
52
|
+
return unless attributes.is_a?(Hash)
|
53
|
+
|
54
|
+
# convert string to symbol for hash key
|
55
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
56
|
+
|
57
|
+
if attributes.has_key?(:'discount_percent')
|
58
|
+
self.discount_percent = attributes[:'discount_percent']
|
59
|
+
end
|
60
|
+
|
61
|
+
if attributes.has_key?(:'excluded_items')
|
62
|
+
if (value = attributes[:'excluded_items']).is_a?(Array)
|
63
|
+
self.excluded_items = value
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
if attributes.has_key?(:'items')
|
68
|
+
if (value = attributes[:'items']).is_a?(Array)
|
69
|
+
self.items = value
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
if attributes.has_key?(:'limit')
|
74
|
+
self.limit = attributes[:'limit']
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
79
|
+
# @return Array for valid properties with the reasons
|
80
|
+
def list_invalid_properties
|
81
|
+
invalid_properties = Array.new
|
82
|
+
invalid_properties
|
83
|
+
end
|
84
|
+
|
85
|
+
# Check to see if the all the properties in the model are valid
|
86
|
+
# @return true if the model is valid
|
87
|
+
def valid?
|
88
|
+
true
|
89
|
+
end
|
90
|
+
|
91
|
+
# Checks equality by comparing each attribute.
|
92
|
+
# @param [Object] Object to be compared
|
93
|
+
def ==(o)
|
94
|
+
return true if self.equal?(o)
|
95
|
+
self.class == o.class &&
|
96
|
+
discount_percent == o.discount_percent &&
|
97
|
+
excluded_items == o.excluded_items &&
|
98
|
+
items == o.items &&
|
99
|
+
limit == o.limit
|
100
|
+
end
|
101
|
+
|
102
|
+
# @see the `==` method
|
103
|
+
# @param [Object] Object to be compared
|
104
|
+
def eql?(o)
|
105
|
+
self == o
|
106
|
+
end
|
107
|
+
|
108
|
+
# Calculates hash code according to all attributes.
|
109
|
+
# @return [Fixnum] Hash code
|
110
|
+
def hash
|
111
|
+
[discount_percent, excluded_items, items, limit].hash
|
112
|
+
end
|
113
|
+
|
114
|
+
# Builds the object from hash
|
115
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
116
|
+
# @return [Object] Returns the model itself
|
117
|
+
def build_from_hash(attributes)
|
118
|
+
return nil unless attributes.is_a?(Hash)
|
119
|
+
self.class.swagger_types.each_pair do |key, type|
|
120
|
+
if type =~ /\AArray<(.*)>/i
|
121
|
+
# check to ensure the input is an array given that the attribute
|
122
|
+
# is documented as an array but the input is not
|
123
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
124
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
125
|
+
end
|
126
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
127
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
128
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
129
|
+
end
|
130
|
+
|
131
|
+
self
|
132
|
+
end
|
133
|
+
|
134
|
+
# Deserializes the data based on type
|
135
|
+
# @param string type Data type
|
136
|
+
# @param string value Value to be deserialized
|
137
|
+
# @return [Object] Deserialized data
|
138
|
+
def _deserialize(type, value)
|
139
|
+
case type.to_sym
|
140
|
+
when :DateTime
|
141
|
+
DateTime.parse(value)
|
142
|
+
when :Date
|
143
|
+
Date.parse(value)
|
144
|
+
when :String
|
145
|
+
value.to_s
|
146
|
+
when :Integer
|
147
|
+
value.to_i
|
148
|
+
when :Float
|
149
|
+
value.to_f
|
150
|
+
when :BOOLEAN
|
151
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
152
|
+
true
|
153
|
+
else
|
154
|
+
false
|
155
|
+
end
|
156
|
+
when :Object
|
157
|
+
# generic object (usually a Hash), return directly
|
158
|
+
value
|
159
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
160
|
+
inner_type = Regexp.last_match[:inner_type]
|
161
|
+
value.map { |v| _deserialize(inner_type, v) }
|
162
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
163
|
+
k_type = Regexp.last_match[:k_type]
|
164
|
+
v_type = Regexp.last_match[:v_type]
|
165
|
+
{}.tap do |hash|
|
166
|
+
value.each do |k, v|
|
167
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
168
|
+
end
|
169
|
+
end
|
170
|
+
else # model
|
171
|
+
temp_model = UltracartClient.const_get(type).new
|
172
|
+
temp_model.build_from_hash(value)
|
173
|
+
end
|
174
|
+
end
|
175
|
+
|
176
|
+
# Returns the string representation of the object
|
177
|
+
# @return [String] String presentation of the object
|
178
|
+
def to_s
|
179
|
+
to_hash.to_s
|
180
|
+
end
|
181
|
+
|
182
|
+
# to_body is an alias to to_hash (backward compatibility)
|
183
|
+
# @return [Hash] Returns the object in the form of hash
|
184
|
+
def to_body
|
185
|
+
to_hash
|
186
|
+
end
|
187
|
+
|
188
|
+
# Returns the object in the form of hash
|
189
|
+
# @return [Hash] Returns the object in the form of hash
|
190
|
+
def to_hash
|
191
|
+
hash = {}
|
192
|
+
self.class.attribute_map.each_pair do |attr, param|
|
193
|
+
value = self.send(attr)
|
194
|
+
next if value.nil?
|
195
|
+
hash[param] = _to_hash(value)
|
196
|
+
end
|
197
|
+
hash
|
198
|
+
end
|
199
|
+
|
200
|
+
# Outputs non-array value in the form of hash
|
201
|
+
# For object, use to_hash. Otherwise, just return the value
|
202
|
+
# @param [Object] value Any valid value
|
203
|
+
# @return [Hash] Returns the value in the form of hash
|
204
|
+
def _to_hash(value)
|
205
|
+
if value.is_a?(Array)
|
206
|
+
value.compact.map { |v| _to_hash(v) }
|
207
|
+
elsif value.is_a?(Hash)
|
208
|
+
{}.tap do |hash|
|
209
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
210
|
+
end
|
211
|
+
elsif value.respond_to? :to_hash
|
212
|
+
value.to_hash
|
213
|
+
else
|
214
|
+
value
|
215
|
+
end
|
216
|
+
end
|
217
|
+
|
218
|
+
end
|
219
|
+
end
|
@@ -20,6 +20,9 @@ module UltracartClient
|
|
20
20
|
# Ledger entries
|
21
21
|
attr_accessor :ledger_entries
|
22
22
|
|
23
|
+
# Pending Points
|
24
|
+
attr_accessor :pending_points
|
25
|
+
|
23
26
|
# Redemptions
|
24
27
|
attr_accessor :redemptions
|
25
28
|
|
@@ -28,6 +31,7 @@ module UltracartClient
|
|
28
31
|
{
|
29
32
|
:'current_points' => :'current_points',
|
30
33
|
:'ledger_entries' => :'ledger_entries',
|
34
|
+
:'pending_points' => :'pending_points',
|
31
35
|
:'redemptions' => :'redemptions'
|
32
36
|
}
|
33
37
|
end
|
@@ -37,6 +41,7 @@ module UltracartClient
|
|
37
41
|
{
|
38
42
|
:'current_points' => :'Integer',
|
39
43
|
:'ledger_entries' => :'Array<CustomerLoyaltyLedger>',
|
44
|
+
:'pending_points' => :'Integer',
|
40
45
|
:'redemptions' => :'Array<CustomerLoyaltyRedemption>'
|
41
46
|
}
|
42
47
|
end
|
@@ -59,6 +64,10 @@ module UltracartClient
|
|
59
64
|
end
|
60
65
|
end
|
61
66
|
|
67
|
+
if attributes.has_key?(:'pending_points')
|
68
|
+
self.pending_points = attributes[:'pending_points']
|
69
|
+
end
|
70
|
+
|
62
71
|
if attributes.has_key?(:'redemptions')
|
63
72
|
if (value = attributes[:'redemptions']).is_a?(Array)
|
64
73
|
self.redemptions = value
|
@@ -86,6 +95,7 @@ module UltracartClient
|
|
86
95
|
self.class == o.class &&
|
87
96
|
current_points == o.current_points &&
|
88
97
|
ledger_entries == o.ledger_entries &&
|
98
|
+
pending_points == o.pending_points &&
|
89
99
|
redemptions == o.redemptions
|
90
100
|
end
|
91
101
|
|
@@ -98,7 +108,7 @@ module UltracartClient
|
|
98
108
|
# Calculates hash code according to all attributes.
|
99
109
|
# @return [Fixnum] Hash code
|
100
110
|
def hash
|
101
|
-
[current_points, ledger_entries, redemptions].hash
|
111
|
+
[current_points, ledger_entries, pending_points, redemptions].hash
|
102
112
|
end
|
103
113
|
|
104
114
|
# Builds the object from hash
|
@@ -29,9 +29,12 @@ module UltracartClient
|
|
29
29
|
# Email communication sequence UUID
|
30
30
|
attr_accessor :email_communication_sequence_uuid
|
31
31
|
|
32
|
-
# True if the customer should end the flow once they purchase
|
32
|
+
# True if the customer should end the flow once they purchase from this campaign
|
33
33
|
attr_accessor :end_once_customer_purchases
|
34
34
|
|
35
|
+
# True if the customer should end the flow once they purchase from anywhere
|
36
|
+
attr_accessor :end_once_customer_purchases_anywhere
|
37
|
+
|
35
38
|
# Campaign folder UUID. Null for uncategorized
|
36
39
|
attr_accessor :esp_campaign_folder_uuid
|
37
40
|
|
@@ -92,6 +95,7 @@ module UltracartClient
|
|
92
95
|
:'email_campaign_uuid' => :'email_campaign_uuid',
|
93
96
|
:'email_communication_sequence_uuid' => :'email_communication_sequence_uuid',
|
94
97
|
:'end_once_customer_purchases' => :'end_once_customer_purchases',
|
98
|
+
:'end_once_customer_purchases_anywhere' => :'end_once_customer_purchases_anywhere',
|
95
99
|
:'esp_campaign_folder_uuid' => :'esp_campaign_folder_uuid',
|
96
100
|
:'esp_domain_user' => :'esp_domain_user',
|
97
101
|
:'esp_domain_uuid' => :'esp_domain_uuid',
|
@@ -121,6 +125,7 @@ module UltracartClient
|
|
121
125
|
:'email_campaign_uuid' => :'String',
|
122
126
|
:'email_communication_sequence_uuid' => :'String',
|
123
127
|
:'end_once_customer_purchases' => :'BOOLEAN',
|
128
|
+
:'end_once_customer_purchases_anywhere' => :'BOOLEAN',
|
124
129
|
:'esp_campaign_folder_uuid' => :'String',
|
125
130
|
:'esp_domain_user' => :'String',
|
126
131
|
:'esp_domain_uuid' => :'String',
|
@@ -173,6 +178,10 @@ module UltracartClient
|
|
173
178
|
self.end_once_customer_purchases = attributes[:'end_once_customer_purchases']
|
174
179
|
end
|
175
180
|
|
181
|
+
if attributes.has_key?(:'end_once_customer_purchases_anywhere')
|
182
|
+
self.end_once_customer_purchases_anywhere = attributes[:'end_once_customer_purchases_anywhere']
|
183
|
+
end
|
184
|
+
|
176
185
|
if attributes.has_key?(:'esp_campaign_folder_uuid')
|
177
186
|
self.esp_campaign_folder_uuid = attributes[:'esp_campaign_folder_uuid']
|
178
187
|
end
|
@@ -283,6 +292,7 @@ module UltracartClient
|
|
283
292
|
email_campaign_uuid == o.email_campaign_uuid &&
|
284
293
|
email_communication_sequence_uuid == o.email_communication_sequence_uuid &&
|
285
294
|
end_once_customer_purchases == o.end_once_customer_purchases &&
|
295
|
+
end_once_customer_purchases_anywhere == o.end_once_customer_purchases_anywhere &&
|
286
296
|
esp_campaign_folder_uuid == o.esp_campaign_folder_uuid &&
|
287
297
|
esp_domain_user == o.esp_domain_user &&
|
288
298
|
esp_domain_uuid == o.esp_domain_uuid &&
|
@@ -311,7 +321,7 @@ module UltracartClient
|
|
311
321
|
# Calculates hash code according to all attributes.
|
312
322
|
# @return [Fixnum] Hash code
|
313
323
|
def hash
|
314
|
-
[click_rate_formatted, created_dts, deleted, email_campaign_uuid, email_communication_sequence_uuid, end_once_customer_purchases, esp_campaign_folder_uuid, esp_domain_user, esp_domain_uuid, esp_friendly_name, library_item_oid, memberships, merchant_id, name, open_rate_formatted, prevent_sending_due_to_spam, revenue_formatted, revenue_per_customer_formatted, scheduled_dts, screenshot_large_full_url, status, status_dts, storefront_oid].hash
|
324
|
+
[click_rate_formatted, created_dts, deleted, email_campaign_uuid, email_communication_sequence_uuid, end_once_customer_purchases, end_once_customer_purchases_anywhere, esp_campaign_folder_uuid, esp_domain_user, esp_domain_uuid, esp_friendly_name, library_item_oid, memberships, merchant_id, name, open_rate_formatted, prevent_sending_due_to_spam, revenue_formatted, revenue_per_customer_formatted, scheduled_dts, screenshot_large_full_url, status, status_dts, storefront_oid].hash
|
315
325
|
end
|
316
326
|
|
317
327
|
# Builds the object from hash
|