ultracart_api 4.0.199 → 4.0.201
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +13 -4
- data/docs/ConversationAgentAuth.md +8 -0
- data/docs/CouponAmountOffItems.md +2 -0
- data/docs/CouponBuyOneGetOneLimit.md +2 -0
- data/docs/CouponDiscountItemWithItemPurchase.md +5 -1
- data/docs/CouponFreeItemWithItemPurchase.md +5 -1
- data/docs/CouponPercentOffItemsWithItemsPurchase.md +5 -1
- data/docs/EmailSmsOrder.md +24 -0
- data/docs/EmailSmsOrdersResponse.md +26 -0
- data/docs/EmailSmsStat.md +76 -0
- data/docs/EmailStatSmsSummaryRequest.md +20 -0
- data/docs/EmailStatSmsSummaryResponse.md +26 -0
- data/docs/PricingTier.md +2 -0
- data/docs/StorefrontApi.md +152 -0
- data/docs/Twilio.md +19 -1
- data/lib/ultracart_api/api/storefront_api.rb +156 -0
- data/lib/ultracart_api/models/conversation_agent_auth.rb +37 -1
- data/lib/ultracart_api/models/coupon_amount_off_items.rb +13 -1
- data/lib/ultracart_api/models/coupon_buy_one_get_one_limit.rb +13 -1
- data/lib/ultracart_api/models/coupon_discount_item_with_item_purchase.rb +28 -4
- data/lib/ultracart_api/models/coupon_free_item_with_item_purchase.rb +28 -4
- data/lib/ultracart_api/models/coupon_percent_off_items_with_items_purchase.rb +28 -4
- data/lib/ultracart_api/models/email_sms_order.rb +249 -0
- data/lib/ultracart_api/models/email_sms_orders_response.rb +258 -0
- data/lib/ultracart_api/models/email_sms_stat.rb +511 -0
- data/lib/ultracart_api/models/email_stat_sms_summary_request.rb +230 -0
- data/lib/ultracart_api/models/email_stat_sms_summary_response.rb +258 -0
- data/lib/ultracart_api/models/pricing_tier.rb +11 -1
- data/lib/ultracart_api/models/twilio.rb +85 -4
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +5 -0
- metadata +12 -2
@@ -2955,6 +2955,85 @@ module UltracartClient
|
|
2955
2955
|
return data, status_code, headers
|
2956
2956
|
end
|
2957
2957
|
|
2958
|
+
# Get email communication sequence sms stats
|
2959
|
+
# @param storefront_oid [Integer]
|
2960
|
+
# @param commseq_uuid [String]
|
2961
|
+
# @param stats_request [EmailStatSmsSummaryRequest] StatsRequest
|
2962
|
+
# @param [Hash] opts the optional parameters
|
2963
|
+
# @return [EmailStatSmsSummaryResponse]
|
2964
|
+
def get_email_commseq_sms_stats(storefront_oid, commseq_uuid, stats_request, opts = {})
|
2965
|
+
data, _status_code, _headers = get_email_commseq_sms_stats_with_http_info(storefront_oid, commseq_uuid, stats_request, opts)
|
2966
|
+
data
|
2967
|
+
end
|
2968
|
+
|
2969
|
+
# Get email communication sequence sms stats
|
2970
|
+
# @param storefront_oid [Integer]
|
2971
|
+
# @param commseq_uuid [String]
|
2972
|
+
# @param stats_request [EmailStatSmsSummaryRequest] StatsRequest
|
2973
|
+
# @param [Hash] opts the optional parameters
|
2974
|
+
# @return [Array<(EmailStatSmsSummaryResponse, Integer, Hash)>] EmailStatSmsSummaryResponse data, response status code and response headers
|
2975
|
+
def get_email_commseq_sms_stats_with_http_info(storefront_oid, commseq_uuid, stats_request, opts = {})
|
2976
|
+
if @api_client.config.debugging
|
2977
|
+
@api_client.config.logger.debug 'Calling API: StorefrontApi.get_email_commseq_sms_stats ...'
|
2978
|
+
end
|
2979
|
+
# verify the required parameter 'storefront_oid' is set
|
2980
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
2981
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling StorefrontApi.get_email_commseq_sms_stats"
|
2982
|
+
end
|
2983
|
+
# verify the required parameter 'commseq_uuid' is set
|
2984
|
+
if @api_client.config.client_side_validation && commseq_uuid.nil?
|
2985
|
+
fail ArgumentError, "Missing the required parameter 'commseq_uuid' when calling StorefrontApi.get_email_commseq_sms_stats"
|
2986
|
+
end
|
2987
|
+
# verify the required parameter 'stats_request' is set
|
2988
|
+
if @api_client.config.client_side_validation && stats_request.nil?
|
2989
|
+
fail ArgumentError, "Missing the required parameter 'stats_request' when calling StorefrontApi.get_email_commseq_sms_stats"
|
2990
|
+
end
|
2991
|
+
# resource path
|
2992
|
+
local_var_path = '/storefront/{storefront_oid}/email/commseqs/{commseq_uuid}/smsStats'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'commseq_uuid' + '}', CGI.escape(commseq_uuid.to_s))
|
2993
|
+
|
2994
|
+
# query parameters
|
2995
|
+
query_params = opts[:query_params] || {}
|
2996
|
+
|
2997
|
+
# header parameters
|
2998
|
+
header_params = opts[:header_params] || {}
|
2999
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
3000
|
+
# HTTP header 'Accept' (if needed)
|
3001
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
3002
|
+
# HTTP header 'Content-Type'
|
3003
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
3004
|
+
if !content_type.nil?
|
3005
|
+
header_params['Content-Type'] = content_type
|
3006
|
+
end
|
3007
|
+
|
3008
|
+
# form parameters
|
3009
|
+
form_params = opts[:form_params] || {}
|
3010
|
+
|
3011
|
+
# http body (model)
|
3012
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(stats_request)
|
3013
|
+
|
3014
|
+
# return_type
|
3015
|
+
return_type = opts[:debug_return_type] || 'EmailStatSmsSummaryResponse'
|
3016
|
+
|
3017
|
+
# auth_names
|
3018
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartBrowserApiKey', 'ultraCartOauth', 'ultraCartSimpleApiKey']
|
3019
|
+
|
3020
|
+
new_options = opts.merge(
|
3021
|
+
:operation => :"StorefrontApi.get_email_commseq_sms_stats",
|
3022
|
+
:header_params => header_params,
|
3023
|
+
:query_params => query_params,
|
3024
|
+
:form_params => form_params,
|
3025
|
+
:body => post_body,
|
3026
|
+
:auth_names => auth_names,
|
3027
|
+
:return_type => return_type
|
3028
|
+
)
|
3029
|
+
|
3030
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
3031
|
+
if @api_client.config.debugging
|
3032
|
+
@api_client.config.logger.debug "API called: StorefrontApi#get_email_commseq_sms_stats\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
3033
|
+
end
|
3034
|
+
return data, status_code, headers
|
3035
|
+
end
|
3036
|
+
|
2958
3037
|
# Get communication sequence stats overall
|
2959
3038
|
# @param storefront_oid [Integer]
|
2960
3039
|
# @param commseq_uuid [String]
|
@@ -5736,6 +5815,83 @@ module UltracartClient
|
|
5736
5815
|
return data, status_code, headers
|
5737
5816
|
end
|
5738
5817
|
|
5818
|
+
# Get email sms orders
|
5819
|
+
# @param storefront_oid [Integer]
|
5820
|
+
# @param commseq_uuid [String]
|
5821
|
+
# @param commseq_step_uuid [String]
|
5822
|
+
# @param [Hash] opts the optional parameters
|
5823
|
+
# @option opts [Integer] :days
|
5824
|
+
# @return [EmailSmsOrdersResponse]
|
5825
|
+
def get_email_sms_orders(storefront_oid, commseq_uuid, commseq_step_uuid, opts = {})
|
5826
|
+
data, _status_code, _headers = get_email_sms_orders_with_http_info(storefront_oid, commseq_uuid, commseq_step_uuid, opts)
|
5827
|
+
data
|
5828
|
+
end
|
5829
|
+
|
5830
|
+
# Get email sms orders
|
5831
|
+
# @param storefront_oid [Integer]
|
5832
|
+
# @param commseq_uuid [String]
|
5833
|
+
# @param commseq_step_uuid [String]
|
5834
|
+
# @param [Hash] opts the optional parameters
|
5835
|
+
# @option opts [Integer] :days
|
5836
|
+
# @return [Array<(EmailSmsOrdersResponse, Integer, Hash)>] EmailSmsOrdersResponse data, response status code and response headers
|
5837
|
+
def get_email_sms_orders_with_http_info(storefront_oid, commseq_uuid, commseq_step_uuid, opts = {})
|
5838
|
+
if @api_client.config.debugging
|
5839
|
+
@api_client.config.logger.debug 'Calling API: StorefrontApi.get_email_sms_orders ...'
|
5840
|
+
end
|
5841
|
+
# verify the required parameter 'storefront_oid' is set
|
5842
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
5843
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling StorefrontApi.get_email_sms_orders"
|
5844
|
+
end
|
5845
|
+
# verify the required parameter 'commseq_uuid' is set
|
5846
|
+
if @api_client.config.client_side_validation && commseq_uuid.nil?
|
5847
|
+
fail ArgumentError, "Missing the required parameter 'commseq_uuid' when calling StorefrontApi.get_email_sms_orders"
|
5848
|
+
end
|
5849
|
+
# verify the required parameter 'commseq_step_uuid' is set
|
5850
|
+
if @api_client.config.client_side_validation && commseq_step_uuid.nil?
|
5851
|
+
fail ArgumentError, "Missing the required parameter 'commseq_step_uuid' when calling StorefrontApi.get_email_sms_orders"
|
5852
|
+
end
|
5853
|
+
# resource path
|
5854
|
+
local_var_path = '/storefront/{storefront_oid}/email/commseqs/{commseq_uuid}/steps/{commseq_step_uuid}/sms/orders'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'commseq_uuid' + '}', CGI.escape(commseq_uuid.to_s)).sub('{' + 'commseq_step_uuid' + '}', CGI.escape(commseq_step_uuid.to_s))
|
5855
|
+
|
5856
|
+
# query parameters
|
5857
|
+
query_params = opts[:query_params] || {}
|
5858
|
+
query_params[:'days'] = opts[:'days'] if !opts[:'days'].nil?
|
5859
|
+
|
5860
|
+
# header parameters
|
5861
|
+
header_params = opts[:header_params] || {}
|
5862
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
5863
|
+
# HTTP header 'Accept' (if needed)
|
5864
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
5865
|
+
|
5866
|
+
# form parameters
|
5867
|
+
form_params = opts[:form_params] || {}
|
5868
|
+
|
5869
|
+
# http body (model)
|
5870
|
+
post_body = opts[:debug_body]
|
5871
|
+
|
5872
|
+
# return_type
|
5873
|
+
return_type = opts[:debug_return_type] || 'EmailSmsOrdersResponse'
|
5874
|
+
|
5875
|
+
# auth_names
|
5876
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartBrowserApiKey', 'ultraCartOauth', 'ultraCartSimpleApiKey']
|
5877
|
+
|
5878
|
+
new_options = opts.merge(
|
5879
|
+
:operation => :"StorefrontApi.get_email_sms_orders",
|
5880
|
+
:header_params => header_params,
|
5881
|
+
:query_params => query_params,
|
5882
|
+
:form_params => form_params,
|
5883
|
+
:body => post_body,
|
5884
|
+
:auth_names => auth_names,
|
5885
|
+
:return_type => return_type
|
5886
|
+
)
|
5887
|
+
|
5888
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
5889
|
+
if @api_client.config.debugging
|
5890
|
+
@api_client.config.logger.debug "API called: StorefrontApi#get_email_sms_orders\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
5891
|
+
end
|
5892
|
+
return data, status_code, headers
|
5893
|
+
end
|
5894
|
+
|
5739
5895
|
# Get email template
|
5740
5896
|
# @param storefront_oid [Integer]
|
5741
5897
|
# @param email_template_oid [Integer]
|
@@ -23,6 +23,14 @@ module UltracartClient
|
|
23
23
|
|
24
24
|
attr_accessor :merchant_id
|
25
25
|
|
26
|
+
attr_accessor :pbx_jwt
|
27
|
+
|
28
|
+
attr_accessor :pbx_voice_identity
|
29
|
+
|
30
|
+
attr_accessor :pbx_voice_token
|
31
|
+
|
32
|
+
attr_accessor :pbx_worker_token
|
33
|
+
|
26
34
|
attr_accessor :twilio_accounts
|
27
35
|
|
28
36
|
attr_accessor :websocket_url
|
@@ -34,6 +42,10 @@ module UltracartClient
|
|
34
42
|
:'conversation_participant_name' => :'conversation_participant_name',
|
35
43
|
:'jwt' => :'jwt',
|
36
44
|
:'merchant_id' => :'merchant_id',
|
45
|
+
:'pbx_jwt' => :'pbx_jwt',
|
46
|
+
:'pbx_voice_identity' => :'pbx_voice_identity',
|
47
|
+
:'pbx_voice_token' => :'pbx_voice_token',
|
48
|
+
:'pbx_worker_token' => :'pbx_worker_token',
|
37
49
|
:'twilio_accounts' => :'twilio_accounts',
|
38
50
|
:'websocket_url' => :'websocket_url'
|
39
51
|
}
|
@@ -51,6 +63,10 @@ module UltracartClient
|
|
51
63
|
:'conversation_participant_name' => :'String',
|
52
64
|
:'jwt' => :'String',
|
53
65
|
:'merchant_id' => :'String',
|
66
|
+
:'pbx_jwt' => :'String',
|
67
|
+
:'pbx_voice_identity' => :'String',
|
68
|
+
:'pbx_voice_token' => :'String',
|
69
|
+
:'pbx_worker_token' => :'String',
|
54
70
|
:'twilio_accounts' => :'Array<ConversationTwilioAccount>',
|
55
71
|
:'websocket_url' => :'String'
|
56
72
|
}
|
@@ -93,6 +109,22 @@ module UltracartClient
|
|
93
109
|
self.merchant_id = attributes[:'merchant_id']
|
94
110
|
end
|
95
111
|
|
112
|
+
if attributes.key?(:'pbx_jwt')
|
113
|
+
self.pbx_jwt = attributes[:'pbx_jwt']
|
114
|
+
end
|
115
|
+
|
116
|
+
if attributes.key?(:'pbx_voice_identity')
|
117
|
+
self.pbx_voice_identity = attributes[:'pbx_voice_identity']
|
118
|
+
end
|
119
|
+
|
120
|
+
if attributes.key?(:'pbx_voice_token')
|
121
|
+
self.pbx_voice_token = attributes[:'pbx_voice_token']
|
122
|
+
end
|
123
|
+
|
124
|
+
if attributes.key?(:'pbx_worker_token')
|
125
|
+
self.pbx_worker_token = attributes[:'pbx_worker_token']
|
126
|
+
end
|
127
|
+
|
96
128
|
if attributes.key?(:'twilio_accounts')
|
97
129
|
if (value = attributes[:'twilio_accounts']).is_a?(Array)
|
98
130
|
self.twilio_accounts = value
|
@@ -126,6 +158,10 @@ module UltracartClient
|
|
126
158
|
conversation_participant_name == o.conversation_participant_name &&
|
127
159
|
jwt == o.jwt &&
|
128
160
|
merchant_id == o.merchant_id &&
|
161
|
+
pbx_jwt == o.pbx_jwt &&
|
162
|
+
pbx_voice_identity == o.pbx_voice_identity &&
|
163
|
+
pbx_voice_token == o.pbx_voice_token &&
|
164
|
+
pbx_worker_token == o.pbx_worker_token &&
|
129
165
|
twilio_accounts == o.twilio_accounts &&
|
130
166
|
websocket_url == o.websocket_url
|
131
167
|
end
|
@@ -139,7 +175,7 @@ module UltracartClient
|
|
139
175
|
# Calculates hash code according to all attributes.
|
140
176
|
# @return [Integer] Hash code
|
141
177
|
def hash
|
142
|
-
[conversation_participant_arn, conversation_participant_name, jwt, merchant_id, twilio_accounts, websocket_url].hash
|
178
|
+
[conversation_participant_arn, conversation_participant_name, jwt, merchant_id, pbx_jwt, pbx_voice_identity, pbx_voice_token, pbx_worker_token, twilio_accounts, websocket_url].hash
|
143
179
|
end
|
144
180
|
|
145
181
|
# Builds the object from hash
|
@@ -21,6 +21,9 @@ module UltracartClient
|
|
21
21
|
# The amount of shipping discount
|
22
22
|
attr_accessor :discount_amount
|
23
23
|
|
24
|
+
# An optional list of item tags which will receive a discount.
|
25
|
+
attr_accessor :item_tags
|
26
|
+
|
24
27
|
# A list of items which are eligible for the discount amount.
|
25
28
|
attr_accessor :items
|
26
29
|
|
@@ -32,6 +35,7 @@ module UltracartClient
|
|
32
35
|
{
|
33
36
|
:'currency_code' => :'currency_code',
|
34
37
|
:'discount_amount' => :'discount_amount',
|
38
|
+
:'item_tags' => :'item_tags',
|
35
39
|
:'items' => :'items',
|
36
40
|
:'limit' => :'limit'
|
37
41
|
}
|
@@ -47,6 +51,7 @@ module UltracartClient
|
|
47
51
|
{
|
48
52
|
:'currency_code' => :'String',
|
49
53
|
:'discount_amount' => :'Float',
|
54
|
+
:'item_tags' => :'Array<String>',
|
50
55
|
:'items' => :'Array<String>',
|
51
56
|
:'limit' => :'Integer'
|
52
57
|
}
|
@@ -81,6 +86,12 @@ module UltracartClient
|
|
81
86
|
self.discount_amount = attributes[:'discount_amount']
|
82
87
|
end
|
83
88
|
|
89
|
+
if attributes.key?(:'item_tags')
|
90
|
+
if (value = attributes[:'item_tags']).is_a?(Array)
|
91
|
+
self.item_tags = value
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
84
95
|
if attributes.key?(:'items')
|
85
96
|
if (value = attributes[:'items']).is_a?(Array)
|
86
97
|
self.items = value
|
@@ -127,6 +138,7 @@ module UltracartClient
|
|
127
138
|
self.class == o.class &&
|
128
139
|
currency_code == o.currency_code &&
|
129
140
|
discount_amount == o.discount_amount &&
|
141
|
+
item_tags == o.item_tags &&
|
130
142
|
items == o.items &&
|
131
143
|
limit == o.limit
|
132
144
|
end
|
@@ -140,7 +152,7 @@ module UltracartClient
|
|
140
152
|
# Calculates hash code according to all attributes.
|
141
153
|
# @return [Integer] Hash code
|
142
154
|
def hash
|
143
|
-
[currency_code, discount_amount, items, limit].hash
|
155
|
+
[currency_code, discount_amount, item_tags, items, limit].hash
|
144
156
|
end
|
145
157
|
|
146
158
|
# Builds the object from hash
|
@@ -15,6 +15,9 @@ require 'time'
|
|
15
15
|
|
16
16
|
module UltracartClient
|
17
17
|
class CouponBuyOneGetOneLimit
|
18
|
+
# An optional list of item tags which will receive a discount.
|
19
|
+
attr_accessor :item_tags
|
20
|
+
|
18
21
|
# An optional list of items of which one must be purchased to receive free quantity of the same item.
|
19
22
|
attr_accessor :items
|
20
23
|
|
@@ -24,6 +27,7 @@ module UltracartClient
|
|
24
27
|
# Attribute mapping from ruby-style variable name to JSON key.
|
25
28
|
def self.attribute_map
|
26
29
|
{
|
30
|
+
:'item_tags' => :'item_tags',
|
27
31
|
:'items' => :'items',
|
28
32
|
:'limit' => :'limit'
|
29
33
|
}
|
@@ -37,6 +41,7 @@ module UltracartClient
|
|
37
41
|
# Attribute type mapping.
|
38
42
|
def self.openapi_types
|
39
43
|
{
|
44
|
+
:'item_tags' => :'Array<String>',
|
40
45
|
:'items' => :'Array<String>',
|
41
46
|
:'limit' => :'Integer'
|
42
47
|
}
|
@@ -63,6 +68,12 @@ module UltracartClient
|
|
63
68
|
h[k.to_sym] = v
|
64
69
|
}
|
65
70
|
|
71
|
+
if attributes.key?(:'item_tags')
|
72
|
+
if (value = attributes[:'item_tags']).is_a?(Array)
|
73
|
+
self.item_tags = value
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
66
77
|
if attributes.key?(:'items')
|
67
78
|
if (value = attributes[:'items']).is_a?(Array)
|
68
79
|
self.items = value
|
@@ -92,6 +103,7 @@ module UltracartClient
|
|
92
103
|
def ==(o)
|
93
104
|
return true if self.equal?(o)
|
94
105
|
self.class == o.class &&
|
106
|
+
item_tags == o.item_tags &&
|
95
107
|
items == o.items &&
|
96
108
|
limit == o.limit
|
97
109
|
end
|
@@ -105,7 +117,7 @@ module UltracartClient
|
|
105
117
|
# Calculates hash code according to all attributes.
|
106
118
|
# @return [Integer] Hash code
|
107
119
|
def hash
|
108
|
-
[items, limit].hash
|
120
|
+
[item_tags, items, limit].hash
|
109
121
|
end
|
110
122
|
|
111
123
|
# Builds the object from hash
|
@@ -21,6 +21,9 @@ module UltracartClient
|
|
21
21
|
# The item that will be sold at the discount_price when required_purchase_item is purchased.
|
22
22
|
attr_accessor :discount_item
|
23
23
|
|
24
|
+
# An optional list of item tags which will receive a discount of one of the required purchased items is purchased.
|
25
|
+
attr_accessor :discount_item_tags
|
26
|
+
|
24
27
|
# The price (unit cost) of the discounted item
|
25
28
|
attr_accessor :discount_price
|
26
29
|
|
@@ -30,14 +33,19 @@ module UltracartClient
|
|
30
33
|
# The item that must be purchased for the discount to be applied to the discount item.
|
31
34
|
attr_accessor :required_purchase_item
|
32
35
|
|
36
|
+
# An optional list of item tags which are required to be purchased.
|
37
|
+
attr_accessor :required_purchase_items_tags
|
38
|
+
|
33
39
|
# Attribute mapping from ruby-style variable name to JSON key.
|
34
40
|
def self.attribute_map
|
35
41
|
{
|
36
42
|
:'currency_code' => :'currency_code',
|
37
43
|
:'discount_item' => :'discount_item',
|
44
|
+
:'discount_item_tags' => :'discount_item_tags',
|
38
45
|
:'discount_price' => :'discount_price',
|
39
46
|
:'limit' => :'limit',
|
40
|
-
:'required_purchase_item' => :'required_purchase_item'
|
47
|
+
:'required_purchase_item' => :'required_purchase_item',
|
48
|
+
:'required_purchase_items_tags' => :'required_purchase_items_tags'
|
41
49
|
}
|
42
50
|
end
|
43
51
|
|
@@ -51,9 +59,11 @@ module UltracartClient
|
|
51
59
|
{
|
52
60
|
:'currency_code' => :'String',
|
53
61
|
:'discount_item' => :'String',
|
62
|
+
:'discount_item_tags' => :'Array<String>',
|
54
63
|
:'discount_price' => :'Float',
|
55
64
|
:'limit' => :'Integer',
|
56
|
-
:'required_purchase_item' => :'String'
|
65
|
+
:'required_purchase_item' => :'String',
|
66
|
+
:'required_purchase_items_tags' => :'Array<String>'
|
57
67
|
}
|
58
68
|
end
|
59
69
|
|
@@ -86,6 +96,12 @@ module UltracartClient
|
|
86
96
|
self.discount_item = attributes[:'discount_item']
|
87
97
|
end
|
88
98
|
|
99
|
+
if attributes.key?(:'discount_item_tags')
|
100
|
+
if (value = attributes[:'discount_item_tags']).is_a?(Array)
|
101
|
+
self.discount_item_tags = value
|
102
|
+
end
|
103
|
+
end
|
104
|
+
|
89
105
|
if attributes.key?(:'discount_price')
|
90
106
|
self.discount_price = attributes[:'discount_price']
|
91
107
|
end
|
@@ -97,6 +113,12 @@ module UltracartClient
|
|
97
113
|
if attributes.key?(:'required_purchase_item')
|
98
114
|
self.required_purchase_item = attributes[:'required_purchase_item']
|
99
115
|
end
|
116
|
+
|
117
|
+
if attributes.key?(:'required_purchase_items_tags')
|
118
|
+
if (value = attributes[:'required_purchase_items_tags']).is_a?(Array)
|
119
|
+
self.required_purchase_items_tags = value
|
120
|
+
end
|
121
|
+
end
|
100
122
|
end
|
101
123
|
|
102
124
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -134,9 +156,11 @@ module UltracartClient
|
|
134
156
|
self.class == o.class &&
|
135
157
|
currency_code == o.currency_code &&
|
136
158
|
discount_item == o.discount_item &&
|
159
|
+
discount_item_tags == o.discount_item_tags &&
|
137
160
|
discount_price == o.discount_price &&
|
138
161
|
limit == o.limit &&
|
139
|
-
required_purchase_item == o.required_purchase_item
|
162
|
+
required_purchase_item == o.required_purchase_item &&
|
163
|
+
required_purchase_items_tags == o.required_purchase_items_tags
|
140
164
|
end
|
141
165
|
|
142
166
|
# @see the `==` method
|
@@ -148,7 +172,7 @@ module UltracartClient
|
|
148
172
|
# Calculates hash code according to all attributes.
|
149
173
|
# @return [Integer] Hash code
|
150
174
|
def hash
|
151
|
-
[currency_code, discount_item, discount_price, limit, required_purchase_item].hash
|
175
|
+
[currency_code, discount_item, discount_item_tags, discount_price, limit, required_purchase_item, required_purchase_items_tags].hash
|
152
176
|
end
|
153
177
|
|
154
178
|
# Builds the object from hash
|
@@ -15,6 +15,9 @@ require 'time'
|
|
15
15
|
|
16
16
|
module UltracartClient
|
17
17
|
class CouponFreeItemWithItemPurchase
|
18
|
+
# An optional list of item tags which will receive a discount of one of the required purchased items is purchased.
|
19
|
+
attr_accessor :item_tags
|
20
|
+
|
18
21
|
# A list of free items which will receive a discount if one of the required purchase items is purchased.
|
19
22
|
attr_accessor :items
|
20
23
|
|
@@ -27,13 +30,18 @@ module UltracartClient
|
|
27
30
|
# Required items (at least one from the list) that must be purchased for coupon to be valid
|
28
31
|
attr_accessor :required_purchase_items
|
29
32
|
|
33
|
+
# An optional list of item tags which are required to be purchased.
|
34
|
+
attr_accessor :required_purchase_items_tags
|
35
|
+
|
30
36
|
# Attribute mapping from ruby-style variable name to JSON key.
|
31
37
|
def self.attribute_map
|
32
38
|
{
|
39
|
+
:'item_tags' => :'item_tags',
|
33
40
|
:'items' => :'items',
|
34
41
|
:'limit' => :'limit',
|
35
42
|
:'match_required_purchase_item_to_free_item' => :'match_required_purchase_item_to_free_item',
|
36
|
-
:'required_purchase_items' => :'required_purchase_items'
|
43
|
+
:'required_purchase_items' => :'required_purchase_items',
|
44
|
+
:'required_purchase_items_tags' => :'required_purchase_items_tags'
|
37
45
|
}
|
38
46
|
end
|
39
47
|
|
@@ -45,10 +53,12 @@ module UltracartClient
|
|
45
53
|
# Attribute type mapping.
|
46
54
|
def self.openapi_types
|
47
55
|
{
|
56
|
+
:'item_tags' => :'Array<String>',
|
48
57
|
:'items' => :'Array<String>',
|
49
58
|
:'limit' => :'Integer',
|
50
59
|
:'match_required_purchase_item_to_free_item' => :'Boolean',
|
51
|
-
:'required_purchase_items' => :'Array<String>'
|
60
|
+
:'required_purchase_items' => :'Array<String>',
|
61
|
+
:'required_purchase_items_tags' => :'Array<String>'
|
52
62
|
}
|
53
63
|
end
|
54
64
|
|
@@ -73,6 +83,12 @@ module UltracartClient
|
|
73
83
|
h[k.to_sym] = v
|
74
84
|
}
|
75
85
|
|
86
|
+
if attributes.key?(:'item_tags')
|
87
|
+
if (value = attributes[:'item_tags']).is_a?(Array)
|
88
|
+
self.item_tags = value
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
76
92
|
if attributes.key?(:'items')
|
77
93
|
if (value = attributes[:'items']).is_a?(Array)
|
78
94
|
self.items = value
|
@@ -92,6 +108,12 @@ module UltracartClient
|
|
92
108
|
self.required_purchase_items = value
|
93
109
|
end
|
94
110
|
end
|
111
|
+
|
112
|
+
if attributes.key?(:'required_purchase_items_tags')
|
113
|
+
if (value = attributes[:'required_purchase_items_tags']).is_a?(Array)
|
114
|
+
self.required_purchase_items_tags = value
|
115
|
+
end
|
116
|
+
end
|
95
117
|
end
|
96
118
|
|
97
119
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -112,10 +134,12 @@ module UltracartClient
|
|
112
134
|
def ==(o)
|
113
135
|
return true if self.equal?(o)
|
114
136
|
self.class == o.class &&
|
137
|
+
item_tags == o.item_tags &&
|
115
138
|
items == o.items &&
|
116
139
|
limit == o.limit &&
|
117
140
|
match_required_purchase_item_to_free_item == o.match_required_purchase_item_to_free_item &&
|
118
|
-
required_purchase_items == o.required_purchase_items
|
141
|
+
required_purchase_items == o.required_purchase_items &&
|
142
|
+
required_purchase_items_tags == o.required_purchase_items_tags
|
119
143
|
end
|
120
144
|
|
121
145
|
# @see the `==` method
|
@@ -127,7 +151,7 @@ module UltracartClient
|
|
127
151
|
# Calculates hash code according to all attributes.
|
128
152
|
# @return [Integer] Hash code
|
129
153
|
def hash
|
130
|
-
[items, limit, match_required_purchase_item_to_free_item, required_purchase_items].hash
|
154
|
+
[item_tags, items, limit, match_required_purchase_item_to_free_item, required_purchase_items, required_purchase_items_tags].hash
|
131
155
|
end
|
132
156
|
|
133
157
|
# Builds the object from hash
|
@@ -18,6 +18,9 @@ module UltracartClient
|
|
18
18
|
# The percentage of subtotal discount
|
19
19
|
attr_accessor :discount_percent
|
20
20
|
|
21
|
+
# An optional list of item tags which will receive a discount of one of the required purchased items is purchased.
|
22
|
+
attr_accessor :item_tags
|
23
|
+
|
21
24
|
# A list of items which will receive a discount if one of the required purchase items is purchased.
|
22
25
|
attr_accessor :items
|
23
26
|
|
@@ -27,13 +30,18 @@ module UltracartClient
|
|
27
30
|
# Required items (at least one from the list) that must be purchased for coupon to be valid
|
28
31
|
attr_accessor :required_purchase_items
|
29
32
|
|
33
|
+
# An optional list of item tags which are required to be purchased.
|
34
|
+
attr_accessor :required_purchase_items_tags
|
35
|
+
|
30
36
|
# Attribute mapping from ruby-style variable name to JSON key.
|
31
37
|
def self.attribute_map
|
32
38
|
{
|
33
39
|
:'discount_percent' => :'discount_percent',
|
40
|
+
:'item_tags' => :'item_tags',
|
34
41
|
:'items' => :'items',
|
35
42
|
:'limit' => :'limit',
|
36
|
-
:'required_purchase_items' => :'required_purchase_items'
|
43
|
+
:'required_purchase_items' => :'required_purchase_items',
|
44
|
+
:'required_purchase_items_tags' => :'required_purchase_items_tags'
|
37
45
|
}
|
38
46
|
end
|
39
47
|
|
@@ -46,9 +54,11 @@ module UltracartClient
|
|
46
54
|
def self.openapi_types
|
47
55
|
{
|
48
56
|
:'discount_percent' => :'Float',
|
57
|
+
:'item_tags' => :'Array<String>',
|
49
58
|
:'items' => :'Array<String>',
|
50
59
|
:'limit' => :'Integer',
|
51
|
-
:'required_purchase_items' => :'Array<String>'
|
60
|
+
:'required_purchase_items' => :'Array<String>',
|
61
|
+
:'required_purchase_items_tags' => :'Array<String>'
|
52
62
|
}
|
53
63
|
end
|
54
64
|
|
@@ -77,6 +87,12 @@ module UltracartClient
|
|
77
87
|
self.discount_percent = attributes[:'discount_percent']
|
78
88
|
end
|
79
89
|
|
90
|
+
if attributes.key?(:'item_tags')
|
91
|
+
if (value = attributes[:'item_tags']).is_a?(Array)
|
92
|
+
self.item_tags = value
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
80
96
|
if attributes.key?(:'items')
|
81
97
|
if (value = attributes[:'items']).is_a?(Array)
|
82
98
|
self.items = value
|
@@ -92,6 +108,12 @@ module UltracartClient
|
|
92
108
|
self.required_purchase_items = value
|
93
109
|
end
|
94
110
|
end
|
111
|
+
|
112
|
+
if attributes.key?(:'required_purchase_items_tags')
|
113
|
+
if (value = attributes[:'required_purchase_items_tags']).is_a?(Array)
|
114
|
+
self.required_purchase_items_tags = value
|
115
|
+
end
|
116
|
+
end
|
95
117
|
end
|
96
118
|
|
97
119
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -113,9 +135,11 @@ module UltracartClient
|
|
113
135
|
return true if self.equal?(o)
|
114
136
|
self.class == o.class &&
|
115
137
|
discount_percent == o.discount_percent &&
|
138
|
+
item_tags == o.item_tags &&
|
116
139
|
items == o.items &&
|
117
140
|
limit == o.limit &&
|
118
|
-
required_purchase_items == o.required_purchase_items
|
141
|
+
required_purchase_items == o.required_purchase_items &&
|
142
|
+
required_purchase_items_tags == o.required_purchase_items_tags
|
119
143
|
end
|
120
144
|
|
121
145
|
# @see the `==` method
|
@@ -127,7 +151,7 @@ module UltracartClient
|
|
127
151
|
# Calculates hash code according to all attributes.
|
128
152
|
# @return [Integer] Hash code
|
129
153
|
def hash
|
130
|
-
[discount_percent, items, limit, required_purchase_items].hash
|
154
|
+
[discount_percent, item_tags, items, limit, required_purchase_items, required_purchase_items_tags].hash
|
131
155
|
end
|
132
156
|
|
133
157
|
# Builds the object from hash
|