ultracart_api 3.6.36 → 3.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +23 -4
- data/docs/AutoOrder.md +1 -0
- data/docs/AutoOrderLog.md +9 -0
- data/docs/CustomerApi.md +3 -4
- data/docs/ExperimentVariation.md +1 -0
- data/docs/GiftCertificate.md +19 -0
- data/docs/GiftCertificateApi.md +433 -0
- data/docs/GiftCertificateCreateRequest.md +11 -0
- data/docs/GiftCertificateLedgerEntry.md +13 -0
- data/docs/GiftCertificateQuery.md +16 -0
- data/docs/GiftCertificateResponse.md +12 -0
- data/docs/GiftCertificatesResponse.md +12 -0
- data/docs/OrderPaymentInsurance.md +1 -0
- data/docs/ScreenRecordingAdPlatform.md +1 -0
- data/lib/ultracart_api/api/customer_api.rb +5 -6
- data/lib/ultracart_api/api/gift_certificate_api.rb +502 -0
- data/lib/ultracart_api/models/auto_order.rb +13 -1
- data/lib/ultracart_api/models/auto_order_log.rb +195 -0
- data/lib/ultracart_api/models/experiment_variation.rb +11 -1
- data/lib/ultracart_api/models/gift_certificate.rb +297 -0
- data/lib/ultracart_api/models/gift_certificate_create_request.rb +215 -0
- data/lib/ultracart_api/models/gift_certificate_ledger_entry.rb +235 -0
- data/lib/ultracart_api/models/gift_certificate_query.rb +265 -0
- data/lib/ultracart_api/models/gift_certificate_response.rb +221 -0
- data/lib/ultracart_api/models/gift_certificates_response.rb +223 -0
- data/lib/ultracart_api/models/order_payment_insurance.rb +11 -1
- data/lib/ultracart_api/models/screen_recording_ad_platform.rb +14 -4
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +8 -0
- metadata +18 -2
@@ -5,6 +5,7 @@ Name | Type | Description | Notes
|
|
5
5
|
------------ | ------------- | ------------- | -------------
|
6
6
|
**application_id** | **String** | application id | [optional]
|
7
7
|
**claim_id** | **String** | claim id | [optional]
|
8
|
+
**insurance_type** | **String** | insurance type | [optional]
|
8
9
|
**refund_claim_id** | **String** | refund claim id | [optional]
|
9
10
|
|
10
11
|
|
@@ -9,5 +9,6 @@ Name | Type | Description | Notes
|
|
9
9
|
**gacid** | **String** | Google Analytics CID (Cookie) | [optional]
|
10
10
|
**glcid** | **String** | Google Adwords Click Id (Parameter) | [optional]
|
11
11
|
**msclkid** | **String** | Bing Click Id (Parameter | [optional]
|
12
|
+
**ttclid** | **String** | TikTok Click Id (Parameter | [optional]
|
12
13
|
|
13
14
|
|
@@ -36,17 +36,17 @@ module UltracartClient
|
|
36
36
|
# Delete a customer on the UltraCart account.
|
37
37
|
# @param customer_profile_oid The customer_profile_oid to delete.
|
38
38
|
# @param [Hash] opts the optional parameters
|
39
|
-
# @return [
|
39
|
+
# @return [nil]
|
40
40
|
def delete_customer(customer_profile_oid, opts = {})
|
41
|
-
|
42
|
-
|
41
|
+
delete_customer_with_http_info(customer_profile_oid, opts)
|
42
|
+
nil
|
43
43
|
end
|
44
44
|
|
45
45
|
# Delete a customer
|
46
46
|
# Delete a customer on the UltraCart account.
|
47
47
|
# @param customer_profile_oid The customer_profile_oid to delete.
|
48
48
|
# @param [Hash] opts the optional parameters
|
49
|
-
# @return [Array<(
|
49
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
50
50
|
def delete_customer_with_http_info(customer_profile_oid, opts = {})
|
51
51
|
if @api_client.config.debugging
|
52
52
|
@api_client.config.logger.debug 'Calling API: CustomerApi.delete_customer ...'
|
@@ -80,8 +80,7 @@ module UltracartClient
|
|
80
80
|
:query_params => query_params,
|
81
81
|
:form_params => form_params,
|
82
82
|
:body => post_body,
|
83
|
-
:auth_names => auth_names
|
84
|
-
:return_type => 'CustomerResponse')
|
83
|
+
:auth_names => auth_names)
|
85
84
|
if @api_client.config.debugging
|
86
85
|
@api_client.config.logger.debug "API called: CustomerApi#delete_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
87
86
|
end
|
@@ -0,0 +1,502 @@
|
|
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 'uri'
|
14
|
+
|
15
|
+
module UltracartClient
|
16
|
+
class GiftCertificateApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
|
23
|
+
def self.new_using_api_key(simple_key, verify_ssl = true, debugging = false)
|
24
|
+
api_config = Configuration.new
|
25
|
+
api_config.api_key_prefix['x-ultracart-simple-key'] = simple_key
|
26
|
+
api_config.api_version = '2017-03-01'
|
27
|
+
api_config.verify_ssl = verify_ssl
|
28
|
+
|
29
|
+
api_client = ApiClient.new(api_config)
|
30
|
+
api_client.config.debugging = debugging
|
31
|
+
|
32
|
+
UltracartClient::GiftCertificateApi.new(api_client)
|
33
|
+
end
|
34
|
+
|
35
|
+
# Add a gift certificate ledger entry
|
36
|
+
# Adds a ledger entry for this gift certificate.
|
37
|
+
# @param gift_certificate_oid
|
38
|
+
# @param gift_certificate_ledger_entry Gift certificate ledger entry
|
39
|
+
# @param [Hash] opts the optional parameters
|
40
|
+
# @return [GiftCertificateResponse]
|
41
|
+
def add_gift_certificate_ledger_entry(gift_certificate_oid, gift_certificate_ledger_entry, opts = {})
|
42
|
+
data, _status_code, _headers = add_gift_certificate_ledger_entry_with_http_info(gift_certificate_oid, gift_certificate_ledger_entry, opts)
|
43
|
+
data
|
44
|
+
end
|
45
|
+
|
46
|
+
# Add a gift certificate ledger entry
|
47
|
+
# Adds a ledger entry for this gift certificate.
|
48
|
+
# @param gift_certificate_oid
|
49
|
+
# @param gift_certificate_ledger_entry Gift certificate ledger entry
|
50
|
+
# @param [Hash] opts the optional parameters
|
51
|
+
# @return [Array<(GiftCertificateResponse, Fixnum, Hash)>] GiftCertificateResponse data, response status code and response headers
|
52
|
+
def add_gift_certificate_ledger_entry_with_http_info(gift_certificate_oid, gift_certificate_ledger_entry, opts = {})
|
53
|
+
if @api_client.config.debugging
|
54
|
+
@api_client.config.logger.debug 'Calling API: GiftCertificateApi.add_gift_certificate_ledger_entry ...'
|
55
|
+
end
|
56
|
+
# verify the required parameter 'gift_certificate_oid' is set
|
57
|
+
if @api_client.config.client_side_validation && gift_certificate_oid.nil?
|
58
|
+
fail ArgumentError, "Missing the required parameter 'gift_certificate_oid' when calling GiftCertificateApi.add_gift_certificate_ledger_entry"
|
59
|
+
end
|
60
|
+
# verify the required parameter 'gift_certificate_ledger_entry' is set
|
61
|
+
if @api_client.config.client_side_validation && gift_certificate_ledger_entry.nil?
|
62
|
+
fail ArgumentError, "Missing the required parameter 'gift_certificate_ledger_entry' when calling GiftCertificateApi.add_gift_certificate_ledger_entry"
|
63
|
+
end
|
64
|
+
# resource path
|
65
|
+
local_var_path = '/gift_certificate/gift_certificates/{gift_certificate_oid}/ledger_entry'.sub('{' + 'gift_certificate_oid' + '}', gift_certificate_oid.to_s)
|
66
|
+
|
67
|
+
# query parameters
|
68
|
+
query_params = {}
|
69
|
+
|
70
|
+
# header parameters
|
71
|
+
header_params = {}
|
72
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
73
|
+
# HTTP header 'Accept' (if needed)
|
74
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
75
|
+
# HTTP header 'Content-Type'
|
76
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
77
|
+
|
78
|
+
# form parameters
|
79
|
+
form_params = {}
|
80
|
+
|
81
|
+
# http body (model)
|
82
|
+
post_body = @api_client.object_to_http_body(gift_certificate_ledger_entry)
|
83
|
+
auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
84
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
85
|
+
:header_params => header_params,
|
86
|
+
:query_params => query_params,
|
87
|
+
:form_params => form_params,
|
88
|
+
:body => post_body,
|
89
|
+
:auth_names => auth_names,
|
90
|
+
:return_type => 'GiftCertificateResponse')
|
91
|
+
if @api_client.config.debugging
|
92
|
+
@api_client.config.logger.debug "API called: GiftCertificateApi#add_gift_certificate_ledger_entry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
93
|
+
end
|
94
|
+
return data, status_code, headers
|
95
|
+
end
|
96
|
+
# Create a gift certificate
|
97
|
+
# Creates a gift certificate for this merchant account.
|
98
|
+
# @param gift_certificate_create_request Gift certificate create request
|
99
|
+
# @param [Hash] opts the optional parameters
|
100
|
+
# @return [GiftCertificateResponse]
|
101
|
+
def create_gift_certificate(gift_certificate_create_request, opts = {})
|
102
|
+
data, _status_code, _headers = create_gift_certificate_with_http_info(gift_certificate_create_request, opts)
|
103
|
+
data
|
104
|
+
end
|
105
|
+
|
106
|
+
# Create a gift certificate
|
107
|
+
# Creates a gift certificate for this merchant account.
|
108
|
+
# @param gift_certificate_create_request Gift certificate create request
|
109
|
+
# @param [Hash] opts the optional parameters
|
110
|
+
# @return [Array<(GiftCertificateResponse, Fixnum, Hash)>] GiftCertificateResponse data, response status code and response headers
|
111
|
+
def create_gift_certificate_with_http_info(gift_certificate_create_request, opts = {})
|
112
|
+
if @api_client.config.debugging
|
113
|
+
@api_client.config.logger.debug 'Calling API: GiftCertificateApi.create_gift_certificate ...'
|
114
|
+
end
|
115
|
+
# verify the required parameter 'gift_certificate_create_request' is set
|
116
|
+
if @api_client.config.client_side_validation && gift_certificate_create_request.nil?
|
117
|
+
fail ArgumentError, "Missing the required parameter 'gift_certificate_create_request' when calling GiftCertificateApi.create_gift_certificate"
|
118
|
+
end
|
119
|
+
# resource path
|
120
|
+
local_var_path = '/gift_certificate/gift_certificates'
|
121
|
+
|
122
|
+
# query parameters
|
123
|
+
query_params = {}
|
124
|
+
|
125
|
+
# header parameters
|
126
|
+
header_params = {}
|
127
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
128
|
+
# HTTP header 'Accept' (if needed)
|
129
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
130
|
+
# HTTP header 'Content-Type'
|
131
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
132
|
+
|
133
|
+
# form parameters
|
134
|
+
form_params = {}
|
135
|
+
|
136
|
+
# http body (model)
|
137
|
+
post_body = @api_client.object_to_http_body(gift_certificate_create_request)
|
138
|
+
auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
139
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
140
|
+
:header_params => header_params,
|
141
|
+
:query_params => query_params,
|
142
|
+
:form_params => form_params,
|
143
|
+
:body => post_body,
|
144
|
+
:auth_names => auth_names,
|
145
|
+
:return_type => 'GiftCertificateResponse')
|
146
|
+
if @api_client.config.debugging
|
147
|
+
@api_client.config.logger.debug "API called: GiftCertificateApi#create_gift_certificate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
148
|
+
end
|
149
|
+
return data, status_code, headers
|
150
|
+
end
|
151
|
+
# Delete a gift certificate
|
152
|
+
# Deletes a gift certificate for this merchant account.
|
153
|
+
# @param gift_certificate_oid
|
154
|
+
# @param [Hash] opts the optional parameters
|
155
|
+
# @return [nil]
|
156
|
+
def delete_gift_certificate(gift_certificate_oid, opts = {})
|
157
|
+
delete_gift_certificate_with_http_info(gift_certificate_oid, opts)
|
158
|
+
nil
|
159
|
+
end
|
160
|
+
|
161
|
+
# Delete a gift certificate
|
162
|
+
# Deletes a gift certificate for this merchant account.
|
163
|
+
# @param gift_certificate_oid
|
164
|
+
# @param [Hash] opts the optional parameters
|
165
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
166
|
+
def delete_gift_certificate_with_http_info(gift_certificate_oid, opts = {})
|
167
|
+
if @api_client.config.debugging
|
168
|
+
@api_client.config.logger.debug 'Calling API: GiftCertificateApi.delete_gift_certificate ...'
|
169
|
+
end
|
170
|
+
# verify the required parameter 'gift_certificate_oid' is set
|
171
|
+
if @api_client.config.client_side_validation && gift_certificate_oid.nil?
|
172
|
+
fail ArgumentError, "Missing the required parameter 'gift_certificate_oid' when calling GiftCertificateApi.delete_gift_certificate"
|
173
|
+
end
|
174
|
+
# resource path
|
175
|
+
local_var_path = '/gift_certificate/gift_certificates/{gift_certificate_oid}'.sub('{' + 'gift_certificate_oid' + '}', gift_certificate_oid.to_s)
|
176
|
+
|
177
|
+
# query parameters
|
178
|
+
query_params = {}
|
179
|
+
|
180
|
+
# header parameters
|
181
|
+
header_params = {}
|
182
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
183
|
+
# HTTP header 'Accept' (if needed)
|
184
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
185
|
+
# HTTP header 'Content-Type'
|
186
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
187
|
+
|
188
|
+
# form parameters
|
189
|
+
form_params = {}
|
190
|
+
|
191
|
+
# http body (model)
|
192
|
+
post_body = nil
|
193
|
+
auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
194
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
195
|
+
:header_params => header_params,
|
196
|
+
:query_params => query_params,
|
197
|
+
:form_params => form_params,
|
198
|
+
:body => post_body,
|
199
|
+
:auth_names => auth_names)
|
200
|
+
if @api_client.config.debugging
|
201
|
+
@api_client.config.logger.debug "API called: GiftCertificateApi#delete_gift_certificate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
202
|
+
end
|
203
|
+
return data, status_code, headers
|
204
|
+
end
|
205
|
+
# Retrieve gift certificate by code
|
206
|
+
# Retrieves a gift certificate from the account based on the code (the value the customer enters at checkout time).
|
207
|
+
# @param code
|
208
|
+
# @param [Hash] opts the optional parameters
|
209
|
+
# @return [GiftCertificateResponse]
|
210
|
+
def get_gift_certificate_by_code(code, opts = {})
|
211
|
+
data, _status_code, _headers = get_gift_certificate_by_code_with_http_info(code, opts)
|
212
|
+
data
|
213
|
+
end
|
214
|
+
|
215
|
+
# Retrieve gift certificate by code
|
216
|
+
# Retrieves a gift certificate from the account based on the code (the value the customer enters at checkout time).
|
217
|
+
# @param code
|
218
|
+
# @param [Hash] opts the optional parameters
|
219
|
+
# @return [Array<(GiftCertificateResponse, Fixnum, Hash)>] GiftCertificateResponse data, response status code and response headers
|
220
|
+
def get_gift_certificate_by_code_with_http_info(code, opts = {})
|
221
|
+
if @api_client.config.debugging
|
222
|
+
@api_client.config.logger.debug 'Calling API: GiftCertificateApi.get_gift_certificate_by_code ...'
|
223
|
+
end
|
224
|
+
# verify the required parameter 'code' is set
|
225
|
+
if @api_client.config.client_side_validation && code.nil?
|
226
|
+
fail ArgumentError, "Missing the required parameter 'code' when calling GiftCertificateApi.get_gift_certificate_by_code"
|
227
|
+
end
|
228
|
+
# resource path
|
229
|
+
local_var_path = '/gift_certificate/gift_certificates/by_code/{code}'.sub('{' + 'code' + '}', code.to_s)
|
230
|
+
|
231
|
+
# query parameters
|
232
|
+
query_params = {}
|
233
|
+
|
234
|
+
# header parameters
|
235
|
+
header_params = {}
|
236
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
237
|
+
# HTTP header 'Accept' (if needed)
|
238
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
239
|
+
# HTTP header 'Content-Type'
|
240
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
241
|
+
|
242
|
+
# form parameters
|
243
|
+
form_params = {}
|
244
|
+
|
245
|
+
# http body (model)
|
246
|
+
post_body = nil
|
247
|
+
auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
248
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
249
|
+
:header_params => header_params,
|
250
|
+
:query_params => query_params,
|
251
|
+
:form_params => form_params,
|
252
|
+
:body => post_body,
|
253
|
+
:auth_names => auth_names,
|
254
|
+
:return_type => 'GiftCertificateResponse')
|
255
|
+
if @api_client.config.debugging
|
256
|
+
@api_client.config.logger.debug "API called: GiftCertificateApi#get_gift_certificate_by_code\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
257
|
+
end
|
258
|
+
return data, status_code, headers
|
259
|
+
end
|
260
|
+
# Retrieve gift certificate by oid
|
261
|
+
# Retrieves a gift certificate from the account based on the internal primary key.
|
262
|
+
# @param gift_certificate_oid
|
263
|
+
# @param [Hash] opts the optional parameters
|
264
|
+
# @return [GiftCertificateResponse]
|
265
|
+
def get_gift_certificate_by_oid(gift_certificate_oid, opts = {})
|
266
|
+
data, _status_code, _headers = get_gift_certificate_by_oid_with_http_info(gift_certificate_oid, opts)
|
267
|
+
data
|
268
|
+
end
|
269
|
+
|
270
|
+
# Retrieve gift certificate by oid
|
271
|
+
# Retrieves a gift certificate from the account based on the internal primary key.
|
272
|
+
# @param gift_certificate_oid
|
273
|
+
# @param [Hash] opts the optional parameters
|
274
|
+
# @return [Array<(GiftCertificateResponse, Fixnum, Hash)>] GiftCertificateResponse data, response status code and response headers
|
275
|
+
def get_gift_certificate_by_oid_with_http_info(gift_certificate_oid, opts = {})
|
276
|
+
if @api_client.config.debugging
|
277
|
+
@api_client.config.logger.debug 'Calling API: GiftCertificateApi.get_gift_certificate_by_oid ...'
|
278
|
+
end
|
279
|
+
# verify the required parameter 'gift_certificate_oid' is set
|
280
|
+
if @api_client.config.client_side_validation && gift_certificate_oid.nil?
|
281
|
+
fail ArgumentError, "Missing the required parameter 'gift_certificate_oid' when calling GiftCertificateApi.get_gift_certificate_by_oid"
|
282
|
+
end
|
283
|
+
# resource path
|
284
|
+
local_var_path = '/gift_certificate/gift_certificates/{gift_certificate_oid}'.sub('{' + 'gift_certificate_oid' + '}', gift_certificate_oid.to_s)
|
285
|
+
|
286
|
+
# query parameters
|
287
|
+
query_params = {}
|
288
|
+
|
289
|
+
# header parameters
|
290
|
+
header_params = {}
|
291
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
292
|
+
# HTTP header 'Accept' (if needed)
|
293
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
294
|
+
# HTTP header 'Content-Type'
|
295
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
296
|
+
|
297
|
+
# form parameters
|
298
|
+
form_params = {}
|
299
|
+
|
300
|
+
# http body (model)
|
301
|
+
post_body = nil
|
302
|
+
auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
303
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
304
|
+
:header_params => header_params,
|
305
|
+
:query_params => query_params,
|
306
|
+
:form_params => form_params,
|
307
|
+
:body => post_body,
|
308
|
+
:auth_names => auth_names,
|
309
|
+
:return_type => 'GiftCertificateResponse')
|
310
|
+
if @api_client.config.debugging
|
311
|
+
@api_client.config.logger.debug "API called: GiftCertificateApi#get_gift_certificate_by_oid\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
312
|
+
end
|
313
|
+
return data, status_code, headers
|
314
|
+
end
|
315
|
+
# Retrieve gift certificate by email
|
316
|
+
# Retrieves all gift certificates from the account based on customer email.
|
317
|
+
# @param email
|
318
|
+
# @param [Hash] opts the optional parameters
|
319
|
+
# @return [GiftCertificatesResponse]
|
320
|
+
def get_gift_certificates_by_email(email, opts = {})
|
321
|
+
data, _status_code, _headers = get_gift_certificates_by_email_with_http_info(email, opts)
|
322
|
+
data
|
323
|
+
end
|
324
|
+
|
325
|
+
# Retrieve gift certificate by email
|
326
|
+
# Retrieves all gift certificates from the account based on customer email.
|
327
|
+
# @param email
|
328
|
+
# @param [Hash] opts the optional parameters
|
329
|
+
# @return [Array<(GiftCertificatesResponse, Fixnum, Hash)>] GiftCertificatesResponse data, response status code and response headers
|
330
|
+
def get_gift_certificates_by_email_with_http_info(email, opts = {})
|
331
|
+
if @api_client.config.debugging
|
332
|
+
@api_client.config.logger.debug 'Calling API: GiftCertificateApi.get_gift_certificates_by_email ...'
|
333
|
+
end
|
334
|
+
# verify the required parameter 'email' is set
|
335
|
+
if @api_client.config.client_side_validation && email.nil?
|
336
|
+
fail ArgumentError, "Missing the required parameter 'email' when calling GiftCertificateApi.get_gift_certificates_by_email"
|
337
|
+
end
|
338
|
+
# resource path
|
339
|
+
local_var_path = '/gift_certificate/gift_certificates/by_email/{email}'.sub('{' + 'email' + '}', email.to_s)
|
340
|
+
|
341
|
+
# query parameters
|
342
|
+
query_params = {}
|
343
|
+
|
344
|
+
# header parameters
|
345
|
+
header_params = {}
|
346
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
347
|
+
# HTTP header 'Accept' (if needed)
|
348
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
349
|
+
# HTTP header 'Content-Type'
|
350
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
351
|
+
|
352
|
+
# form parameters
|
353
|
+
form_params = {}
|
354
|
+
|
355
|
+
# http body (model)
|
356
|
+
post_body = nil
|
357
|
+
auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
358
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
359
|
+
:header_params => header_params,
|
360
|
+
:query_params => query_params,
|
361
|
+
:form_params => form_params,
|
362
|
+
:body => post_body,
|
363
|
+
:auth_names => auth_names,
|
364
|
+
:return_type => 'GiftCertificatesResponse')
|
365
|
+
if @api_client.config.debugging
|
366
|
+
@api_client.config.logger.debug "API called: GiftCertificateApi#get_gift_certificates_by_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
367
|
+
end
|
368
|
+
return data, status_code, headers
|
369
|
+
end
|
370
|
+
# Retrieve gift certificates by query
|
371
|
+
# Retrieves gift certificates from the account. If no parameters are specified, all gift certificates will be returned. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.
|
372
|
+
# @param gift_certificate_query Gift certificates query
|
373
|
+
# @param [Hash] opts the optional parameters
|
374
|
+
# @option opts [Integer] :_limit The maximum number of records to return on this one API call. (Max 200) (default to 100)
|
375
|
+
# @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index. (default to 0)
|
376
|
+
# @option opts [String] :_since Fetch customers that have been created/modified since this date/time.
|
377
|
+
# @option opts [String] :_sort The sort order of the customers. See Sorting documentation for examples of using multiple values and sorting by ascending and descending.
|
378
|
+
# @option opts [String] :_expand The object expansion to perform on the result. See documentation for examples
|
379
|
+
# @return [GiftCertificatesResponse]
|
380
|
+
def get_gift_certificates_by_query(gift_certificate_query, opts = {})
|
381
|
+
data, _status_code, _headers = get_gift_certificates_by_query_with_http_info(gift_certificate_query, opts)
|
382
|
+
data
|
383
|
+
end
|
384
|
+
|
385
|
+
# Retrieve gift certificates by query
|
386
|
+
# Retrieves gift certificates from the account. If no parameters are specified, all gift certificates will be returned. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.
|
387
|
+
# @param gift_certificate_query Gift certificates query
|
388
|
+
# @param [Hash] opts the optional parameters
|
389
|
+
# @option opts [Integer] :_limit The maximum number of records to return on this one API call. (Max 200)
|
390
|
+
# @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index.
|
391
|
+
# @option opts [String] :_since Fetch customers that have been created/modified since this date/time.
|
392
|
+
# @option opts [String] :_sort The sort order of the customers. See Sorting documentation for examples of using multiple values and sorting by ascending and descending.
|
393
|
+
# @option opts [String] :_expand The object expansion to perform on the result. See documentation for examples
|
394
|
+
# @return [Array<(GiftCertificatesResponse, Fixnum, Hash)>] GiftCertificatesResponse data, response status code and response headers
|
395
|
+
def get_gift_certificates_by_query_with_http_info(gift_certificate_query, opts = {})
|
396
|
+
if @api_client.config.debugging
|
397
|
+
@api_client.config.logger.debug 'Calling API: GiftCertificateApi.get_gift_certificates_by_query ...'
|
398
|
+
end
|
399
|
+
# verify the required parameter 'gift_certificate_query' is set
|
400
|
+
if @api_client.config.client_side_validation && gift_certificate_query.nil?
|
401
|
+
fail ArgumentError, "Missing the required parameter 'gift_certificate_query' when calling GiftCertificateApi.get_gift_certificates_by_query"
|
402
|
+
end
|
403
|
+
# resource path
|
404
|
+
local_var_path = '/gift_certificate/gift_certificates/query'
|
405
|
+
|
406
|
+
# query parameters
|
407
|
+
query_params = {}
|
408
|
+
query_params[:'_limit'] = opts[:'_limit'] if !opts[:'_limit'].nil?
|
409
|
+
query_params[:'_offset'] = opts[:'_offset'] if !opts[:'_offset'].nil?
|
410
|
+
query_params[:'_since'] = opts[:'_since'] if !opts[:'_since'].nil?
|
411
|
+
query_params[:'_sort'] = opts[:'_sort'] if !opts[:'_sort'].nil?
|
412
|
+
query_params[:'_expand'] = opts[:'_expand'] if !opts[:'_expand'].nil?
|
413
|
+
|
414
|
+
# header parameters
|
415
|
+
header_params = {}
|
416
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
417
|
+
# HTTP header 'Accept' (if needed)
|
418
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
419
|
+
# HTTP header 'Content-Type'
|
420
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
421
|
+
|
422
|
+
# form parameters
|
423
|
+
form_params = {}
|
424
|
+
|
425
|
+
# http body (model)
|
426
|
+
post_body = @api_client.object_to_http_body(gift_certificate_query)
|
427
|
+
auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
428
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
429
|
+
:header_params => header_params,
|
430
|
+
:query_params => query_params,
|
431
|
+
:form_params => form_params,
|
432
|
+
:body => post_body,
|
433
|
+
:auth_names => auth_names,
|
434
|
+
:return_type => 'GiftCertificatesResponse')
|
435
|
+
if @api_client.config.debugging
|
436
|
+
@api_client.config.logger.debug "API called: GiftCertificateApi#get_gift_certificates_by_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
437
|
+
end
|
438
|
+
return data, status_code, headers
|
439
|
+
end
|
440
|
+
# Update a gift certificate
|
441
|
+
# Update a gift certificate for this merchant account.
|
442
|
+
# @param gift_certificate_oid
|
443
|
+
# @param gift_certificate Gift certificate
|
444
|
+
# @param [Hash] opts the optional parameters
|
445
|
+
# @return [GiftCertificateResponse]
|
446
|
+
def update_gift_certificate(gift_certificate_oid, gift_certificate, opts = {})
|
447
|
+
data, _status_code, _headers = update_gift_certificate_with_http_info(gift_certificate_oid, gift_certificate, opts)
|
448
|
+
data
|
449
|
+
end
|
450
|
+
|
451
|
+
# Update a gift certificate
|
452
|
+
# Update a gift certificate for this merchant account.
|
453
|
+
# @param gift_certificate_oid
|
454
|
+
# @param gift_certificate Gift certificate
|
455
|
+
# @param [Hash] opts the optional parameters
|
456
|
+
# @return [Array<(GiftCertificateResponse, Fixnum, Hash)>] GiftCertificateResponse data, response status code and response headers
|
457
|
+
def update_gift_certificate_with_http_info(gift_certificate_oid, gift_certificate, opts = {})
|
458
|
+
if @api_client.config.debugging
|
459
|
+
@api_client.config.logger.debug 'Calling API: GiftCertificateApi.update_gift_certificate ...'
|
460
|
+
end
|
461
|
+
# verify the required parameter 'gift_certificate_oid' is set
|
462
|
+
if @api_client.config.client_side_validation && gift_certificate_oid.nil?
|
463
|
+
fail ArgumentError, "Missing the required parameter 'gift_certificate_oid' when calling GiftCertificateApi.update_gift_certificate"
|
464
|
+
end
|
465
|
+
# verify the required parameter 'gift_certificate' is set
|
466
|
+
if @api_client.config.client_side_validation && gift_certificate.nil?
|
467
|
+
fail ArgumentError, "Missing the required parameter 'gift_certificate' when calling GiftCertificateApi.update_gift_certificate"
|
468
|
+
end
|
469
|
+
# resource path
|
470
|
+
local_var_path = '/gift_certificate/gift_certificates/{gift_certificate_oid}'.sub('{' + 'gift_certificate_oid' + '}', gift_certificate_oid.to_s)
|
471
|
+
|
472
|
+
# query parameters
|
473
|
+
query_params = {}
|
474
|
+
|
475
|
+
# header parameters
|
476
|
+
header_params = {}
|
477
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
478
|
+
# HTTP header 'Accept' (if needed)
|
479
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
480
|
+
# HTTP header 'Content-Type'
|
481
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
482
|
+
|
483
|
+
# form parameters
|
484
|
+
form_params = {}
|
485
|
+
|
486
|
+
# http body (model)
|
487
|
+
post_body = @api_client.object_to_http_body(gift_certificate)
|
488
|
+
auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
489
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
490
|
+
:header_params => header_params,
|
491
|
+
:query_params => query_params,
|
492
|
+
:form_params => form_params,
|
493
|
+
:body => post_body,
|
494
|
+
:auth_names => auth_names,
|
495
|
+
:return_type => 'GiftCertificateResponse')
|
496
|
+
if @api_client.config.debugging
|
497
|
+
@api_client.config.logger.debug "API called: GiftCertificateApi#update_gift_certificate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
498
|
+
end
|
499
|
+
return data, status_code, headers
|
500
|
+
end
|
501
|
+
end
|
502
|
+
end
|
@@ -53,6 +53,9 @@ module UltracartClient
|
|
53
53
|
# The items that are setup to rebill
|
54
54
|
attr_accessor :items
|
55
55
|
|
56
|
+
# Logs associated with this auto order
|
57
|
+
attr_accessor :logs
|
58
|
+
|
56
59
|
# The next time that the auto order will be attempted for processing
|
57
60
|
attr_accessor :next_attempt
|
58
61
|
|
@@ -111,6 +114,7 @@ module UltracartClient
|
|
111
114
|
:'enabled' => :'enabled',
|
112
115
|
:'failure_reason' => :'failure_reason',
|
113
116
|
:'items' => :'items',
|
117
|
+
:'logs' => :'logs',
|
114
118
|
:'next_attempt' => :'next_attempt',
|
115
119
|
:'original_order' => :'original_order',
|
116
120
|
:'original_order_id' => :'original_order_id',
|
@@ -137,6 +141,7 @@ module UltracartClient
|
|
137
141
|
:'enabled' => :'BOOLEAN',
|
138
142
|
:'failure_reason' => :'String',
|
139
143
|
:'items' => :'Array<AutoOrderItem>',
|
144
|
+
:'logs' => :'Array<AutoOrderLog>',
|
140
145
|
:'next_attempt' => :'String',
|
141
146
|
:'original_order' => :'Order',
|
142
147
|
:'original_order_id' => :'String',
|
@@ -209,6 +214,12 @@ module UltracartClient
|
|
209
214
|
end
|
210
215
|
end
|
211
216
|
|
217
|
+
if attributes.has_key?(:'logs')
|
218
|
+
if (value = attributes[:'logs']).is_a?(Array)
|
219
|
+
self.logs = value
|
220
|
+
end
|
221
|
+
end
|
222
|
+
|
212
223
|
if attributes.has_key?(:'next_attempt')
|
213
224
|
self.next_attempt = attributes[:'next_attempt']
|
214
225
|
end
|
@@ -283,6 +294,7 @@ module UltracartClient
|
|
283
294
|
enabled == o.enabled &&
|
284
295
|
failure_reason == o.failure_reason &&
|
285
296
|
items == o.items &&
|
297
|
+
logs == o.logs &&
|
286
298
|
next_attempt == o.next_attempt &&
|
287
299
|
original_order == o.original_order &&
|
288
300
|
original_order_id == o.original_order_id &&
|
@@ -301,7 +313,7 @@ module UltracartClient
|
|
301
313
|
# Calculates hash code according to all attributes.
|
302
314
|
# @return [Fixnum] Hash code
|
303
315
|
def hash
|
304
|
-
[auto_order_code, auto_order_oid, cancel_after_next_x_orders, cancel_downgrade, cancel_upgrade, canceled_by_user, canceled_dts, completed, credit_card_attempt, disabled_dts, enabled, failure_reason, items, next_attempt, original_order, original_order_id, override_affiliate_id, rebill_orders, rotating_transaction_gateway_code, status].hash
|
316
|
+
[auto_order_code, auto_order_oid, cancel_after_next_x_orders, cancel_downgrade, cancel_upgrade, canceled_by_user, canceled_dts, completed, credit_card_attempt, disabled_dts, enabled, failure_reason, items, logs, next_attempt, original_order, original_order_id, override_affiliate_id, rebill_orders, rotating_transaction_gateway_code, status].hash
|
305
317
|
end
|
306
318
|
|
307
319
|
# Builds the object from hash
|