Class: BlockChyp::BlockChyp
- Inherits:
-
BlockChypClient
- Object
- BlockChypClient
- BlockChyp::BlockChyp
- Defined in:
- lib/blockchyp.rb
Overview
the main autogenerated blockchyp client
Instance Attribute Summary
Attributes inherited from BlockChypClient
#api_key, #bearer_token, #gateway_host, #gateway_timeout, #https, #offline_cache_enabled, #offline_fixed_key, #route_cache, #route_cache_location, #route_cache_ttl, #signing_key, #terminal_connect_timeout, #terminal_timeout, #test_gateway_host
Instance Method Summary collapse
-
#balance(request) ⇒ Object
Checks the remaining balance on a payment method.
-
#batch_details(request) ⇒ Object
Returns the batch details for a single batch.
-
#batch_history(request) ⇒ Object
Returns the batch history for a merchant.
-
#boolean_prompt(request) ⇒ Object
Asks the consumer a yes/no question.
-
#cancel_payment_link(request) ⇒ Object
Cancels a payment link.
-
#capture(request) ⇒ Object
Captures a preauthorization.
-
#capture_signature(request) ⇒ Object
Captures and returns a signature.
-
#cash_discount(request) ⇒ Object
Calculates the discount for actual cash transactions.
-
#charge(request) ⇒ Object
Executes a standard direct preauth and capture.
-
#clear(request) ⇒ Object
Clears the line item display and any in progress transaction.
-
#close_batch(request) ⇒ Object
Closes the current credit card batch.
-
#customer(request) ⇒ Object
Retrieves a customer by id.
-
#customer_search(request) ⇒ Object
Searches the customer database.
-
#delete_customer(request) ⇒ Object
Deletes a customer record.
-
#delete_queued_transaction(request) ⇒ Object
Deletes a queued transaction from the terminal.
-
#delete_token(request) ⇒ Object
Deletes a payment token.
-
#enroll(request) ⇒ Object
Adds a new payment method to the token vault.
-
#gift_activate(request) ⇒ Object
Activates or recharges a gift card.
- #heartbeat(test) ⇒ Object
-
#list_queued_transactions(request) ⇒ Object
Returns a list of queued transactions on a terminal.
-
#merchant_profile(request) ⇒ Object
Returns profile information for a merchant.
-
#message(request) ⇒ Object
Displays a short message on the terminal.
-
#new_transaction_display(request) ⇒ Object
Displays a new transaction on the terminal.
-
#ping(request) ⇒ Object
Tests connectivity with a payment terminal.
-
#preauth(request) ⇒ Object
Executes a preauthorization intended to be captured later.
-
#refund(request) ⇒ Object
Executes a refund.
-
#reverse(request) ⇒ Object
Executes a manual time out reversal.
-
#send_payment_link(request) ⇒ Object
Creates and send a payment link to a customer.
-
#terminal_status(request) ⇒ Object
Returns the current status of a terminal.
-
#terms_and_conditions(request) ⇒ Object
Prompts the user to accept terms and conditions.
-
#text_prompt(request) ⇒ Object
Asks the consumer a text based question.
-
#transaction_history(request) ⇒ Object
Returns the transaction history for a merchant.
-
#transaction_status(request) ⇒ Object
Retrieves the current status of a transaction.
-
#update_customer(request) ⇒ Object
Updates or creates a customer record.
-
#update_transaction_display(request) ⇒ Object
Appends items to an existing transaction display.
-
#void(request) ⇒ Object
Discards a previous transaction.
Methods inherited from BlockChypClient
#compute_hmac, #decrypt, #derive_offline_key, #encrypt, #evict, #gateway_request, #generate_error_response, #generate_gateway_headers, #get_http_request, #get_timeout, #initialize, #read_offline_cache, #request_route_from_gateway, #resolve_gateway_uri, #resolve_terminal_route, #resolve_terminal_uri, #route_cache_get, #route_terminal_request, #terminal_request, #update_offline_cache, #user_agent
Constructor Details
This class inherits a constructor from BlockChyp::BlockChypClient
Instance Method Details
#balance(request) ⇒ Object
Checks the remaining balance on a payment method.
92 93 94 |
# File 'lib/blockchyp.rb', line 92 def balance(request) route_terminal_request('POST', '/api/balance', '/api/balance', request) end |
#batch_details(request) ⇒ Object
Returns the batch details for a single batch.
223 224 225 |
# File 'lib/blockchyp.rb', line 223 def batch_details(request) gateway_request('POST', '/api/batch-details', request) end |
#batch_history(request) ⇒ Object
Returns the batch history for a merchant.
218 219 220 |
# File 'lib/blockchyp.rb', line 218 def batch_history(request) gateway_request('POST', '/api/batch-history', request) end |
#boolean_prompt(request) ⇒ Object
Asks the consumer a yes/no question.
134 135 136 |
# File 'lib/blockchyp.rb', line 134 def boolean_prompt(request) route_terminal_request('POST', '/api/boolean-prompt', '/api/boolean-prompt', request) end |
#cancel_payment_link(request) ⇒ Object
Cancels a payment link.
188 189 190 |
# File 'lib/blockchyp.rb', line 188 def cancel_payment_link(request) gateway_request('POST', '/api/cancel-payment-link', request) end |
#capture(request) ⇒ Object
Captures a preauthorization.
154 155 156 |
# File 'lib/blockchyp.rb', line 154 def capture(request) gateway_request('POST', '/api/capture', request) end |
#capture_signature(request) ⇒ Object
Captures and returns a signature.
112 113 114 |
# File 'lib/blockchyp.rb', line 112 def capture_signature(request) route_terminal_request('POST', '/api/capture-signature', '/api/capture-signature', request) end |
#cash_discount(request) ⇒ Object
Calculates the discount for actual cash transactions.
213 214 215 |
# File 'lib/blockchyp.rb', line 213 def cash_discount(request) gateway_request('POST', '/api/cash-discount', request) end |
#charge(request) ⇒ Object
Executes a standard direct preauth and capture.
67 68 69 |
# File 'lib/blockchyp.rb', line 67 def charge(request) route_terminal_request('POST', '/api/charge', '/api/charge', request) end |
#clear(request) ⇒ Object
Clears the line item display and any in progress transaction.
97 98 99 |
# File 'lib/blockchyp.rb', line 97 def clear(request) route_terminal_request('POST', '/api/clear', '/api/terminal-clear', request) end |
#close_batch(request) ⇒ Object
Closes the current credit card batch.
178 179 180 |
# File 'lib/blockchyp.rb', line 178 def close_batch(request) gateway_request('POST', '/api/close-batch', request) end |
#customer(request) ⇒ Object
Retrieves a customer by id.
203 204 205 |
# File 'lib/blockchyp.rb', line 203 def customer(request) gateway_request('POST', '/api/customer', request) end |
#customer_search(request) ⇒ Object
Searches the customer database.
208 209 210 |
# File 'lib/blockchyp.rb', line 208 def customer_search(request) gateway_request('POST', '/api/customer-search', request) end |
#delete_customer(request) ⇒ Object
Deletes a customer record.
238 239 240 |
# File 'lib/blockchyp.rb', line 238 def delete_customer(request) gateway_request('DELETE', '/api/customer/' + request[:customerId], request) end |
#delete_queued_transaction(request) ⇒ Object
Deletes a queued transaction from the terminal.
149 150 151 |
# File 'lib/blockchyp.rb', line 149 def delete_queued_transaction(request) route_terminal_request('POST', '/api/queue/delete', '/api/queue/delete', request) end |
#delete_token(request) ⇒ Object
Deletes a payment token.
243 244 245 |
# File 'lib/blockchyp.rb', line 243 def delete_token(request) gateway_request('DELETE', '/api/token/' + request[:token], request) end |
#enroll(request) ⇒ Object
Adds a new payment method to the token vault.
82 83 84 |
# File 'lib/blockchyp.rb', line 82 def enroll(request) route_terminal_request('POST', '/api/enroll', '/api/enroll', request) end |
#gift_activate(request) ⇒ Object
Activates or recharges a gift card.
87 88 89 |
# File 'lib/blockchyp.rb', line 87 def gift_activate(request) route_terminal_request('POST', '/api/gift-activate', '/api/gift-activate', request) end |
#heartbeat(test) ⇒ Object
57 58 59 |
# File 'lib/blockchyp.rb', line 57 def heartbeat(test) gateway_request('GET', '/api/heartbeat', { test: test }) end |
#list_queued_transactions(request) ⇒ Object
Returns a list of queued transactions on a terminal.
144 145 146 |
# File 'lib/blockchyp.rb', line 144 def list_queued_transactions(request) route_terminal_request('POST', '/api/queue/list', '/api/queue/list', request) end |
#merchant_profile(request) ⇒ Object
Returns profile information for a merchant.
233 234 235 |
# File 'lib/blockchyp.rb', line 233 def merchant_profile(request) gateway_request('POST', '/api/public-merchant-profile', request) end |
#message(request) ⇒ Object
Displays a short message on the terminal.
129 130 131 |
# File 'lib/blockchyp.rb', line 129 def (request) route_terminal_request('POST', '/api/message', '/api/message', request) end |
#new_transaction_display(request) ⇒ Object
Displays a new transaction on the terminal.
117 118 119 |
# File 'lib/blockchyp.rb', line 117 def new_transaction_display(request) route_terminal_request('POST', '/api/txdisplay', '/api/terminal-txdisplay', request) end |
#ping(request) ⇒ Object
Tests connectivity with a payment terminal.
62 63 64 |
# File 'lib/blockchyp.rb', line 62 def ping(request) route_terminal_request('POST', '/api/test', '/api/terminal-test', request) end |
#preauth(request) ⇒ Object
Executes a preauthorization intended to be captured later.
72 73 74 |
# File 'lib/blockchyp.rb', line 72 def preauth(request) route_terminal_request('POST', '/api/preauth', '/api/preauth', request) end |
#refund(request) ⇒ Object
Executes a refund.
77 78 79 |
# File 'lib/blockchyp.rb', line 77 def refund(request) route_terminal_request('POST', '/api/refund', '/api/refund', request) end |
#reverse(request) ⇒ Object
Executes a manual time out reversal.
We love time out reversals. Don’t be afraid to use them whenever a request to a BlockChyp terminal times out. You have up to two minutes to reverse any transaction. The only caveat is that you must assign transactionRef values when you build the original request. Otherwise, we have no real way of knowing which transaction you’re trying to reverse because we may not have assigned it an id yet. And if we did assign it an id, you wouldn’t know what it is because your request to the terminal timed out before you got a response.
173 174 175 |
# File 'lib/blockchyp.rb', line 173 def reverse(request) gateway_request('POST', '/api/reverse', request) end |
#send_payment_link(request) ⇒ Object
Creates and send a payment link to a customer.
183 184 185 |
# File 'lib/blockchyp.rb', line 183 def send_payment_link(request) gateway_request('POST', '/api/send-payment-link', request) end |
#terminal_status(request) ⇒ Object
Returns the current status of a terminal.
102 103 104 |
# File 'lib/blockchyp.rb', line 102 def terminal_status(request) route_terminal_request('POST', '/api/terminal-status', '/api/terminal-status', request) end |
#terms_and_conditions(request) ⇒ Object
Prompts the user to accept terms and conditions.
107 108 109 |
# File 'lib/blockchyp.rb', line 107 def terms_and_conditions(request) route_terminal_request('POST', '/api/tc', '/api/terminal-tc', request) end |
#text_prompt(request) ⇒ Object
Asks the consumer a text based question.
139 140 141 |
# File 'lib/blockchyp.rb', line 139 def text_prompt(request) route_terminal_request('POST', '/api/text-prompt', '/api/text-prompt', request) end |
#transaction_history(request) ⇒ Object
Returns the transaction history for a merchant.
228 229 230 |
# File 'lib/blockchyp.rb', line 228 def transaction_history(request) gateway_request('POST', '/api/tx-history', request) end |
#transaction_status(request) ⇒ Object
Retrieves the current status of a transaction.
193 194 195 |
# File 'lib/blockchyp.rb', line 193 def transaction_status(request) gateway_request('POST', '/api/tx-status', request) end |
#update_customer(request) ⇒ Object
Updates or creates a customer record.
198 199 200 |
# File 'lib/blockchyp.rb', line 198 def update_customer(request) gateway_request('POST', '/api/update-customer', request) end |
#update_transaction_display(request) ⇒ Object
Appends items to an existing transaction display. Subtotal, Tax, and Total are overwritten by the request. Items with the same description are combined into groups.
124 125 126 |
# File 'lib/blockchyp.rb', line 124 def update_transaction_display(request) route_terminal_request('PUT', '/api/txdisplay', '/api/terminal-txdisplay', request) end |
#void(request) ⇒ Object
Discards a previous transaction.
159 160 161 |
# File 'lib/blockchyp.rb', line 159 def void(request) gateway_request('POST', '/api/void', request) end |