ultracart_api 3.7.38 → 3.8.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -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