blockchyp 1.24.14 → 2.0.0.pre.alpha7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Makefile +1 -41
- data/README.md +441 -3551
- data/lib/blockchyp/version.rb +1 -1
- data/lib/blockchyp.rb +41 -366
- data/lib/blockchyp_client.rb +125 -207
- data/test/boolean_prompt_test.rb +18 -32
- data/test/heartbeat_test.rb +10 -10
- data/test/new_transaction_display_test.rb +50 -44
- data/test/pan_charge_test.rb +27 -44
- data/test/pan_enroll_test.rb +25 -45
- data/test/pan_preauth_test.rb +26 -43
- data/test/simple_batch_close_test.rb +23 -37
- data/test/simple_capture_test.rb +21 -38
- data/test/simple_gift_activate_test.rb +15 -30
- data/test/simple_message_test.rb +15 -29
- data/test/simple_ping_test.rb +14 -28
- data/test/simple_refund_test.rb +22 -40
- data/test/simple_reversal_test.rb +22 -39
- data/test/simple_void_test.rb +22 -39
- data/test/terminal_charge_test.rb +25 -40
- data/test/terminal_clear_test.rb +14 -28
- data/test/terminal_ebt_balance_test.rb +16 -30
- data/test/terminal_ebt_charge_test.rb +27 -42
- data/test/terminal_enroll_test.rb +24 -39
- data/test/terminal_gift_card_balance_test.rb +15 -29
- data/test/terminal_keyed_charge_test.rb +26 -41
- data/test/terminal_manual_ebt_charge_test.rb +28 -43
- data/test/terminal_preauth_test.rb +25 -40
- data/test/terms_and_conditions_test.rb +19 -33
- data/test/test_helper.rb +10 -9
- data/test/text_prompt_test.rb +15 -29
- data/test/update_transaction_display_test.rb +50 -44
- metadata +5 -64
- data/test/activate_terminal_test.rb +0 -45
- data/test/add_test_merchant_test.rb +0 -56
- data/test/batch_history_test.rb +0 -54
- data/test/cancel_payment_link_test.rb +0 -72
- data/test/capture_signature_test.rb +0 -46
- data/test/deactivate_terminal_test.rb +0 -42
- data/test/delete_branding_asset_test.rb +0 -50
- data/test/delete_customer_test.rb +0 -55
- data/test/delete_media_asset_test.rb +0 -53
- data/test/delete_queued_transaction_test.rb +0 -56
- data/test/delete_slide_show_test.rb +0 -50
- data/test/delete_survey_question_test.rb +0 -51
- data/test/delete_test_merchant_test.rb +0 -59
- data/test/delete_token_test.rb +0 -55
- data/test/empty_branding_asset_test.rb +0 -44
- data/test/empty_slide_show_test.rb +0 -45
- data/test/gateway_timeout_test.rb +0 -49
- data/test/get_customer_test.rb +0 -55
- data/test/get_merchants_test.rb +0 -52
- data/test/invite_merchant_user_test.rb +0 -45
- data/test/link_token_test.rb +0 -56
- data/test/list_queued_transactions_test.rb +0 -55
- data/test/list_terminals_test.rb +0 -42
- data/test/media_asset_test.rb +0 -57
- data/test/media_test.rb +0 -42
- data/test/media_upload_test.rb +0 -52
- data/test/merchant_platforms_test.rb +0 -59
- data/test/merchant_profile_test.rb +0 -43
- data/test/merchant_users_test.rb +0 -42
- data/test/partial_refund_test.rb +0 -58
- data/test/search_customer_test.rb +0 -55
- data/test/send_payment_link_test.rb +0 -67
- data/test/simple_locate_test.rb +0 -44
- data/test/slide_show_test.rb +0 -51
- data/test/slide_shows_test.rb +0 -49
- data/test/survey_question_test.rb +0 -48
- data/test/survey_questions_test.rb +0 -50
- data/test/survey_results_test.rb +0 -48
- data/test/tc_delete_template_test.rb +0 -51
- data/test/tc_entry_test.rb +0 -56
- data/test/tc_log_test.rb +0 -42
- data/test/tc_template_test.rb +0 -53
- data/test/tc_template_update_test.rb +0 -48
- data/test/tc_templates_test.rb +0 -42
- data/test/terminal_branding_test.rb +0 -42
- data/test/terminal_queued_transaction_test.rb +0 -51
- data/test/terminal_status_test.rb +0 -45
- data/test/terminal_timeout_test.rb +0 -46
- data/test/testdata/aviato.png +0 -0
- data/test/token_metadata_test.rb +0 -55
- data/test/transaction_history_test.rb +0 -54
- data/test/unlink_token_test.rb +0 -56
- data/test/update_branding_asset_test.rb +0 -62
- data/test/update_customer_test.rb +0 -49
- data/test/update_merchant_platforms_test.rb +0 -61
- data/test/update_merchant_test.rb +0 -60
- data/test/update_slide_show_test.rb +0 -60
- data/test/update_survey_question_test.rb +0 -47
- data/test/upload_status_test.rb +0 -53
data/lib/blockchyp/version.rb
CHANGED
data/lib/blockchyp.rb
CHANGED
@@ -1,11 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# Copyright 2019-2022 BlockChyp, Inc. All rights reserved. Use of this code is
|
4
|
-
# governed by a license that can be found in the LICENSE file.
|
5
|
-
#
|
6
|
-
# This file was generated automatically by the BlockChyp SDK Generator.
|
7
|
-
# Changes to this file will be lost every time the code is regenerated.
|
8
|
-
|
9
3
|
require_relative 'blockchyp_client'
|
10
4
|
|
11
5
|
module CardType
|
@@ -13,7 +7,6 @@ module CardType
|
|
13
7
|
DEBIT = 1
|
14
8
|
EBT = 2
|
15
9
|
BLOCKCHAIN_GIFT = 3
|
16
|
-
HEALTHCARE = 4
|
17
10
|
end
|
18
11
|
|
19
12
|
module SignatureFormat
|
@@ -29,34 +22,6 @@ module PromptType
|
|
29
22
|
PHONE_NUMBER = 'phone'
|
30
23
|
CUSTOMER_NUMBER = 'customer-number'
|
31
24
|
REWARDS_NUMBER = 'rewards-number'
|
32
|
-
FIRST_NAME = 'first-name'
|
33
|
-
LAST_NAME = 'last-name'
|
34
|
-
end
|
35
|
-
|
36
|
-
module AVSResponse
|
37
|
-
NOT_APPLICABLE = ''
|
38
|
-
NOT_SUPPORTED = 'not_supported'
|
39
|
-
RETRY = 'retry'
|
40
|
-
NO_MATCH = 'no_match'
|
41
|
-
ADDRESS_MATCH = 'address_match'
|
42
|
-
POSTAL_CODE_MATCH = 'zip_match'
|
43
|
-
ADDRESS_AND_POSTAL_CODE_MATCH = 'match'
|
44
|
-
end
|
45
|
-
|
46
|
-
module CVMType
|
47
|
-
SIGNATURE = 'Signature'
|
48
|
-
OFFLINE_PIN = 'Offline PIN'
|
49
|
-
ONLINE_PIN = 'Online PIN'
|
50
|
-
CDCVM = 'CDCVM'
|
51
|
-
NO_CVM = 'No CVM'
|
52
|
-
end
|
53
|
-
|
54
|
-
module HealthcareType
|
55
|
-
HEALTHCARE = 'healthcare'
|
56
|
-
PRESCRIPTION = 'prescription'
|
57
|
-
VISION = 'vision'
|
58
|
-
CLINIC = 'clinic'
|
59
|
-
DENTAL = 'dental'
|
60
25
|
end
|
61
26
|
|
62
27
|
module BlockChyp
|
@@ -64,121 +29,81 @@ module BlockChyp
|
|
64
29
|
class BlockChyp < BlockChypClient
|
65
30
|
|
66
31
|
def heartbeat(test)
|
67
|
-
|
68
|
-
end
|
69
|
-
|
70
|
-
# Tests connectivity with a payment terminal.
|
71
|
-
def ping(request)
|
72
|
-
route_terminal_request('POST', '/api/test', '/api/terminal-test', request)
|
32
|
+
gateway_get('/api/heartbeat', test)
|
73
33
|
end
|
74
34
|
|
75
35
|
# Executes a standard direct preauth and capture.
|
76
36
|
def charge(request)
|
77
|
-
route_terminal_request(
|
37
|
+
route_terminal_request(request, '/api/charge', '/api/charge', 'POST')
|
78
38
|
end
|
79
39
|
|
80
40
|
# Executes a preauthorization intended to be captured later.
|
81
41
|
def preauth(request)
|
82
|
-
route_terminal_request(
|
83
|
-
end
|
84
|
-
|
85
|
-
# Executes a refund.
|
86
|
-
def refund(request)
|
87
|
-
route_terminal_request('POST', '/api/refund', '/api/refund', request)
|
42
|
+
route_terminal_request(request, '/api/preauth', '/api/preauth', 'POST')
|
88
43
|
end
|
89
44
|
|
90
|
-
#
|
91
|
-
def
|
92
|
-
route_terminal_request(
|
93
|
-
end
|
94
|
-
|
95
|
-
# Activates or recharges a gift card.
|
96
|
-
def gift_activate(request)
|
97
|
-
route_terminal_request('POST', '/api/gift-activate', '/api/gift-activate', request)
|
45
|
+
# Tests connectivity with a payment terminal.
|
46
|
+
def ping(request)
|
47
|
+
route_terminal_request(request, '/api/test', '/api/terminal-test', 'POST')
|
98
48
|
end
|
99
49
|
|
100
50
|
# Checks the remaining balance on a payment method.
|
101
51
|
def balance(request)
|
102
|
-
route_terminal_request(
|
52
|
+
route_terminal_request(request, '/api/balance', '/api/balance', 'POST')
|
103
53
|
end
|
104
54
|
|
105
55
|
# Clears the line item display and any in progress transaction.
|
106
56
|
def clear(request)
|
107
|
-
route_terminal_request(
|
108
|
-
end
|
109
|
-
|
110
|
-
# Returns the current status of a terminal.
|
111
|
-
def terminal_status(request)
|
112
|
-
route_terminal_request('POST', '/api/terminal-status', '/api/terminal-status', request)
|
57
|
+
route_terminal_request(request, '/api/clear', '/api/terminal-clear', 'POST')
|
113
58
|
end
|
114
59
|
|
115
60
|
# Prompts the user to accept terms and conditions.
|
116
61
|
def terms_and_conditions(request)
|
117
|
-
route_terminal_request(
|
62
|
+
route_terminal_request(request, '/api/tc', '/api/terminal-tc', 'POST')
|
118
63
|
end
|
119
64
|
|
120
|
-
#
|
121
|
-
|
122
|
-
|
65
|
+
# Appends items to an existing transaction display Subtotal, Tax, and
|
66
|
+
# Total are overwritten by the request. Items with the same description
|
67
|
+
# are combined into groups.
|
68
|
+
def update_transaction_display(request)
|
69
|
+
route_terminal_request(request, '/api/txdisplay', '/api/terminal-txdisplay', 'PUT')
|
123
70
|
end
|
124
71
|
|
125
72
|
# Displays a new transaction on the terminal.
|
126
73
|
def new_transaction_display(request)
|
127
|
-
route_terminal_request(
|
128
|
-
end
|
129
|
-
|
130
|
-
# Appends items to an existing transaction display. Subtotal, Tax, and
|
131
|
-
# Total are overwritten by the request. Items with the same description
|
132
|
-
# are combined into groups.
|
133
|
-
def update_transaction_display(request)
|
134
|
-
route_terminal_request('PUT', '/api/txdisplay', '/api/terminal-txdisplay', request)
|
74
|
+
route_terminal_request(request, '/api/txdisplay', '/api/terminal-txdisplay', 'POST')
|
135
75
|
end
|
136
76
|
|
137
|
-
#
|
138
|
-
def
|
139
|
-
route_terminal_request(
|
77
|
+
# Asks the consumer text based question.
|
78
|
+
def text_prompt(request)
|
79
|
+
route_terminal_request(request, '/api/text-prompt', '/api/text-prompt', 'POST')
|
140
80
|
end
|
141
81
|
|
142
82
|
# Asks the consumer a yes/no question.
|
143
83
|
def boolean_prompt(request)
|
144
|
-
route_terminal_request(
|
84
|
+
route_terminal_request(request, '/api/boolean-prompt', '/api/boolean-prompt', 'POST')
|
145
85
|
end
|
146
86
|
|
147
|
-
#
|
148
|
-
def
|
149
|
-
route_terminal_request(
|
87
|
+
# Displays a short message on the terminal.
|
88
|
+
def message(request)
|
89
|
+
route_terminal_request(request, '/api/message', '/api/message', 'POST')
|
150
90
|
end
|
151
91
|
|
152
|
-
#
|
153
|
-
def
|
154
|
-
route_terminal_request(
|
92
|
+
# Executes a refund.
|
93
|
+
def refund(request)
|
94
|
+
route_terminal_request(request, '/api/refund', '/api/refund', 'POST')
|
155
95
|
end
|
156
96
|
|
157
|
-
#
|
158
|
-
def
|
159
|
-
route_terminal_request(
|
97
|
+
# Adds a new payment method to the token vault.
|
98
|
+
def enroll(request)
|
99
|
+
route_terminal_request(request, '/api/enroll', '/api/enroll', 'POST')
|
160
100
|
end
|
161
101
|
|
162
|
-
#
|
163
|
-
def
|
164
|
-
route_terminal_request(
|
102
|
+
# Activates or recharges a gift card.
|
103
|
+
def gift_activate(request)
|
104
|
+
route_terminal_request(request, '/api/gift-activate', '/api/gift-activate', 'POST')
|
165
105
|
end
|
166
106
|
|
167
|
-
# Returns routing and location data for a payment terminal.
|
168
|
-
def locate(request)
|
169
|
-
gateway_request('POST', '/api/terminal-locate', request)
|
170
|
-
end
|
171
|
-
|
172
|
-
# Captures a preauthorization.
|
173
|
-
def capture(request)
|
174
|
-
gateway_request('POST', '/api/capture', request)
|
175
|
-
end
|
176
|
-
|
177
|
-
# Discards a previous transaction.
|
178
|
-
def void(request)
|
179
|
-
gateway_request('POST', '/api/void', request)
|
180
|
-
end
|
181
|
-
|
182
107
|
# Executes a manual time out reversal.
|
183
108
|
#
|
184
109
|
# We love time out reversals. Don't be afraid to use them whenever a
|
@@ -190,272 +115,22 @@ module BlockChyp
|
|
190
115
|
# an id, you wouldn't know what it is because your request to the terminal
|
191
116
|
# timed out before you got a response.
|
192
117
|
def reverse(request)
|
193
|
-
gateway_request('
|
194
|
-
end
|
195
|
-
|
196
|
-
# Closes the current credit card batch.
|
197
|
-
def close_batch(request)
|
198
|
-
gateway_request('POST', '/api/close-batch', request)
|
199
|
-
end
|
200
|
-
|
201
|
-
# Creates and send a payment link to a customer.
|
202
|
-
def send_payment_link(request)
|
203
|
-
gateway_request('POST', '/api/send-payment-link', request)
|
204
|
-
end
|
205
|
-
|
206
|
-
# Cancels a payment link.
|
207
|
-
def cancel_payment_link(request)
|
208
|
-
gateway_request('POST', '/api/cancel-payment-link', request)
|
209
|
-
end
|
210
|
-
|
211
|
-
# Retrieves the current status of a transaction.
|
212
|
-
def transaction_status(request)
|
213
|
-
gateway_request('POST', '/api/tx-status', request)
|
214
|
-
end
|
215
|
-
|
216
|
-
# Updates or creates a customer record.
|
217
|
-
def update_customer(request)
|
218
|
-
gateway_request('POST', '/api/update-customer', request)
|
219
|
-
end
|
220
|
-
|
221
|
-
# Retrieves a customer by id.
|
222
|
-
def customer(request)
|
223
|
-
gateway_request('POST', '/api/customer', request)
|
224
|
-
end
|
225
|
-
|
226
|
-
# Searches the customer database.
|
227
|
-
def customer_search(request)
|
228
|
-
gateway_request('POST', '/api/customer-search', request)
|
229
|
-
end
|
230
|
-
|
231
|
-
# Calculates the discount for actual cash transactions.
|
232
|
-
def cash_discount(request)
|
233
|
-
gateway_request('POST', '/api/cash-discount', request)
|
234
|
-
end
|
235
|
-
|
236
|
-
# Returns the batch history for a merchant.
|
237
|
-
def batch_history(request)
|
238
|
-
gateway_request('POST', '/api/batch-history', request)
|
239
|
-
end
|
240
|
-
|
241
|
-
# Returns the batch details for a single batch.
|
242
|
-
def batch_details(request)
|
243
|
-
gateway_request('POST', '/api/batch-details', request)
|
244
|
-
end
|
245
|
-
|
246
|
-
# Returns the transaction history for a merchant.
|
247
|
-
def transaction_history(request)
|
248
|
-
gateway_request('POST', '/api/tx-history', request)
|
249
|
-
end
|
250
|
-
|
251
|
-
# Returns profile information for a merchant.
|
252
|
-
def merchant_profile(request)
|
253
|
-
gateway_request('POST', '/api/public-merchant-profile', request)
|
118
|
+
gateway_request('/api/reverse', request, 'POST')
|
254
119
|
end
|
255
120
|
|
256
|
-
#
|
257
|
-
def
|
258
|
-
gateway_request('
|
259
|
-
end
|
260
|
-
|
261
|
-
# Retrieves payment token metadata.
|
262
|
-
def token_metadata(request)
|
263
|
-
gateway_request('GET', '/api/token/' + request[:token], request)
|
264
|
-
end
|
265
|
-
|
266
|
-
# Links a token to a customer record.
|
267
|
-
def link_token(request)
|
268
|
-
gateway_request('POST', '/api/link-token', request)
|
269
|
-
end
|
270
|
-
|
271
|
-
# Removes a link between a customer and a token.
|
272
|
-
def unlink_token(request)
|
273
|
-
gateway_request('POST', '/api/unlink-token', request)
|
274
|
-
end
|
275
|
-
|
276
|
-
# Deletes a payment token.
|
277
|
-
def delete_token(request)
|
278
|
-
gateway_request('DELETE', '/api/token/' + request[:token], request)
|
279
|
-
end
|
280
|
-
|
281
|
-
|
282
|
-
# Adds a test merchant account.
|
283
|
-
def get_merchants(request)
|
284
|
-
dashboard_request('POST', '/api/get-merchants', request)
|
285
|
-
end
|
286
|
-
|
287
|
-
# Adds or updates a merchant account. Can be used to create or update test
|
288
|
-
# merchants. Only gateway partners may create new live merchants.
|
289
|
-
def update_merchant(request)
|
290
|
-
dashboard_request('POST', '/api/update-merchant', request)
|
291
|
-
end
|
292
|
-
|
293
|
-
# List all active users and pending invites for a merchant account.
|
294
|
-
def merchant_users(request)
|
295
|
-
dashboard_request('POST', '/api/merchant-users', request)
|
296
|
-
end
|
297
|
-
|
298
|
-
# Invites a user to join a merchant account.
|
299
|
-
def invite_merchant_user(request)
|
300
|
-
dashboard_request('POST', '/api/invite-merchant-user', request)
|
301
|
-
end
|
302
|
-
|
303
|
-
# Adds a test merchant account.
|
304
|
-
def add_test_merchant(request)
|
305
|
-
dashboard_request('POST', '/api/add-test-merchant', request)
|
306
|
-
end
|
307
|
-
|
308
|
-
# Deletes a test merchant account. Supports partner scoped API credentials
|
309
|
-
# only. Live merchant accounts cannot be deleted.
|
310
|
-
def delete_test_merchant(request)
|
311
|
-
dashboard_request('DELETE', '/api/test-merchant/' + request[:merchantId], request)
|
312
|
-
end
|
313
|
-
|
314
|
-
# List all merchant platforms configured for a gateway merchant.
|
315
|
-
def merchant_platforms(request)
|
316
|
-
dashboard_request('GET', '/api/plugin-configs/' + request[:merchantId], request)
|
317
|
-
end
|
318
|
-
|
319
|
-
# List all merchant platforms configured for a gateway merchant.
|
320
|
-
def update_merchant_platforms(request)
|
321
|
-
dashboard_request('POST', '/api/plugin-configs', request)
|
322
|
-
end
|
323
|
-
|
324
|
-
# Deletes a boarding platform configuration.
|
325
|
-
def delete_merchant_platforms(request)
|
326
|
-
dashboard_request('DELETE', '/api/plugin-config/' + request[:platformId], request)
|
327
|
-
end
|
328
|
-
|
329
|
-
# Returns all terminals associated with the merchant account.
|
330
|
-
def terminals(request)
|
331
|
-
dashboard_request('GET', '/api/terminals', request)
|
332
|
-
end
|
333
|
-
|
334
|
-
# Deactivates a terminal.
|
335
|
-
def deactivate_terminal(request)
|
336
|
-
dashboard_request('DELETE', '/api/terminal/' + request[:terminalId], request)
|
337
|
-
end
|
338
|
-
|
339
|
-
# Activates a terminal.
|
340
|
-
def activate_terminal(request)
|
341
|
-
dashboard_request('POST', '/api/terminal-activate', request)
|
342
|
-
end
|
343
|
-
|
344
|
-
# Returns a list of terms and conditions templates associated with a
|
345
|
-
# merchant account.
|
346
|
-
def tc_templates(request)
|
347
|
-
dashboard_request('GET', '/api/tc-templates', request)
|
348
|
-
end
|
349
|
-
|
350
|
-
# Returns a single terms and conditions template.
|
351
|
-
def tc_template(request)
|
352
|
-
dashboard_request('GET', '/api/tc-templates/' + request[:templateId], request)
|
353
|
-
end
|
354
|
-
|
355
|
-
# Updates or creates a terms and conditions template.
|
356
|
-
def tc_update_template(request)
|
357
|
-
dashboard_request('POST', '/api/tc-templates', request)
|
358
|
-
end
|
359
|
-
|
360
|
-
# Deletes a single terms and conditions template.
|
361
|
-
def tc_delete_template(request)
|
362
|
-
dashboard_request('DELETE', '/api/tc-templates/' + request[:templateId], request)
|
363
|
-
end
|
364
|
-
|
365
|
-
# Returns up to 250 entries from the Terms and Conditions log.
|
366
|
-
def tc_log(request)
|
367
|
-
dashboard_request('POST', '/api/tc-log', request)
|
368
|
-
end
|
369
|
-
|
370
|
-
# Returns a single detailed Terms and Conditions entry.
|
371
|
-
def tc_entry(request)
|
372
|
-
dashboard_request('GET', '/api/tc-entry/' + request[:logEntryId], request)
|
373
|
-
end
|
374
|
-
|
375
|
-
# Returns all survey questions for a given merchant.
|
376
|
-
def survey_questions(request)
|
377
|
-
dashboard_request('GET', '/api/survey-questions', request)
|
378
|
-
end
|
379
|
-
|
380
|
-
# Returns a single survey question with response data.
|
381
|
-
def survey_question(request)
|
382
|
-
dashboard_request('GET', '/api/survey-questions/' + request[:questionId], request)
|
383
|
-
end
|
384
|
-
|
385
|
-
# Updates or creates a survey question.
|
386
|
-
def update_survey_question(request)
|
387
|
-
dashboard_request('POST', '/api/survey-questions', request)
|
388
|
-
end
|
389
|
-
|
390
|
-
# Deletes a survey question.
|
391
|
-
def delete_survey_question(request)
|
392
|
-
dashboard_request('DELETE', '/api/survey-questions/' + request[:questionId], request)
|
393
|
-
end
|
394
|
-
|
395
|
-
# Returns results for a single survey question.
|
396
|
-
def survey_results(request)
|
397
|
-
dashboard_request('POST', '/api/survey-results', request)
|
398
|
-
end
|
399
|
-
|
400
|
-
# Returns the media library for a given partner, merchant, or
|
401
|
-
# organization.
|
402
|
-
def media(request)
|
403
|
-
dashboard_request('GET', '/api/media', request)
|
404
|
-
end
|
405
|
-
|
406
|
-
# Uploads a media asset to the media library.
|
407
|
-
def upload_media(request, file)
|
408
|
-
upload_request('/api/upload-media', request, file)
|
409
|
-
end
|
410
|
-
|
411
|
-
# Retrieves the current status of a file upload.
|
412
|
-
def upload_status(request)
|
413
|
-
dashboard_request('GET', '/api/media-upload/' + request[:uploadId], request)
|
414
|
-
end
|
415
|
-
|
416
|
-
# Returns the media details for a single media asset.
|
417
|
-
def media_asset(request)
|
418
|
-
dashboard_request('GET', '/api/media/' + request[:mediaId], request)
|
419
|
-
end
|
420
|
-
|
421
|
-
# Deletes a media asset.
|
422
|
-
def delete_media_asset(request)
|
423
|
-
dashboard_request('DELETE', '/api/media/' + request[:mediaId], request)
|
424
|
-
end
|
425
|
-
|
426
|
-
# Returns a collection of slide shows.
|
427
|
-
def slide_shows(request)
|
428
|
-
dashboard_request('GET', '/api/slide-shows', request)
|
429
|
-
end
|
430
|
-
|
431
|
-
# Returns a single slide show with slides.
|
432
|
-
def slide_show(request)
|
433
|
-
dashboard_request('GET', '/api/slide-shows/' + request[:slideShowId], request)
|
434
|
-
end
|
435
|
-
|
436
|
-
# Updates or creates a slide show.
|
437
|
-
def update_slide_show(request)
|
438
|
-
dashboard_request('POST', '/api/slide-shows', request)
|
439
|
-
end
|
440
|
-
|
441
|
-
# Deletes a single slide show.
|
442
|
-
def delete_slide_show(request)
|
443
|
-
dashboard_request('DELETE', '/api/slide-shows/' + request[:slideShowId], request)
|
444
|
-
end
|
445
|
-
|
446
|
-
# Returns the terminal branding stack for a given set of API credentials.
|
447
|
-
def terminal_branding(request)
|
448
|
-
dashboard_request('GET', '/api/terminal-branding', request)
|
121
|
+
# Captures a preauthorization.
|
122
|
+
def capture(request)
|
123
|
+
gateway_request('/api/capture', request, 'POST')
|
449
124
|
end
|
450
125
|
|
451
|
-
#
|
452
|
-
def
|
453
|
-
|
126
|
+
# Closes the current credit card batch.
|
127
|
+
def close_batch(request)
|
128
|
+
gateway_request('/api/close-batch', request, 'POST')
|
454
129
|
end
|
455
130
|
|
456
|
-
#
|
457
|
-
def
|
458
|
-
|
131
|
+
# Discards a previous preauth transaction.
|
132
|
+
def void(request)
|
133
|
+
gateway_request('/api/void', request, 'POST')
|
459
134
|
end
|
460
135
|
|
461
136
|
end
|