class BlockChyp::BlockChyp

the main autogenerated blockchyp client

Public Instance Methods

balance(request) click to toggle source

Checks the remaining balance on a payment method.

# File lib/blockchyp.rb, line 92
def balance(request)
  route_terminal_request('POST', '/api/balance', '/api/balance', request)
end
batch_details(request) click to toggle source

Returns the batch details for a single batch.

# File lib/blockchyp.rb, line 208
def batch_details(request)
  gateway_request('POST', '/api/batch-details', request)
end
batch_history(request) click to toggle source

Returns the batch history for a merchant.

# File lib/blockchyp.rb, line 203
def batch_history(request)
  gateway_request('POST', '/api/batch-history', request)
end
boolean_prompt(request) click to toggle source

Asks the consumer a yes/no question.

# File lib/blockchyp.rb, line 134
def boolean_prompt(request)
  route_terminal_request('POST', '/api/boolean-prompt', '/api/boolean-prompt', request)
end
capture(request) click to toggle source

Captures a preauthorization.

# File lib/blockchyp.rb, line 144
def capture(request)
  gateway_request('POST', '/api/capture', request)
end
capture_signature(request) click to toggle source

Captures and returns a signature.

# 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) click to toggle source

Calculates the discount for actual cash transactions.

# File lib/blockchyp.rb, line 198
def cash_discount(request)
  gateway_request('POST', '/api/cash-discount', request)
end
charge(request) click to toggle source

Executes a standard direct preauth and capture.

# File lib/blockchyp.rb, line 67
def charge(request)
  route_terminal_request('POST', '/api/charge', '/api/charge', request)
end
clear(request) click to toggle source

Clears the line item display and any in progress transaction.

# File lib/blockchyp.rb, line 97
def clear(request)
  route_terminal_request('POST', '/api/clear', '/api/terminal-clear', request)
end
close_batch(request) click to toggle source

Closes the current credit card batch.

# File lib/blockchyp.rb, line 168
def close_batch(request)
  gateway_request('POST', '/api/close-batch', request)
end
customer(request) click to toggle source

Retrieves a customer by id.

# File lib/blockchyp.rb, line 188
def customer(request)
  gateway_request('POST', '/api/customer', request)
end
enroll(request) click to toggle source

Adds a new payment method to the token vault.

# File lib/blockchyp.rb, line 82
def enroll(request)
  route_terminal_request('POST', '/api/enroll', '/api/enroll', request)
end
gift_activate(request) click to toggle source

Activates or recharges a gift card.

# File lib/blockchyp.rb, line 87
def gift_activate(request)
  route_terminal_request('POST', '/api/gift-activate', '/api/gift-activate', request)
end
heartbeat(test) click to toggle source
# File lib/blockchyp.rb, line 57
def heartbeat(test)
  gateway_request('GET', '/api/heartbeat', { test: test })
end
merchant_profile(request) click to toggle source

Returns profile information for a merchant.

# File lib/blockchyp.rb, line 218
def merchant_profile(request)
  gateway_request('POST', '/api/public-merchant-profile', request)
end
message(request) click to toggle source

Displays a short message on the terminal.

# File lib/blockchyp.rb, line 129
def message(request)
  route_terminal_request('POST', '/api/message', '/api/message', request)
end
new_transaction_display(request) click to toggle source

Displays a new transaction on the terminal.

# File lib/blockchyp.rb, line 117
def new_transaction_display(request)
  route_terminal_request('POST', '/api/txdisplay', '/api/terminal-txdisplay', request)
end
ping(request) click to toggle source

Tests connectivity with a payment terminal.

# File lib/blockchyp.rb, line 62
def ping(request)
  route_terminal_request('POST', '/api/test', '/api/terminal-test', request)
end
preauth(request) click to toggle source

Executes a preauthorization intended to be captured later.

# File lib/blockchyp.rb, line 72
def preauth(request)
  route_terminal_request('POST', '/api/preauth', '/api/preauth', request)
end
refund(request) click to toggle source

Executes a refund.

# File lib/blockchyp.rb, line 77
def refund(request)
  route_terminal_request('POST', '/api/refund', '/api/refund', request)
end
reverse(request) click to toggle source

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.

# File lib/blockchyp.rb, line 163
def reverse(request)
  gateway_request('POST', '/api/reverse', request)
end
terminal_status(request) click to toggle source

Returns the current status of a terminal.

# 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) click to toggle source

Prompts the user to accept terms and conditions.

# 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) click to toggle source

Asks the consumer a text based question.

# 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) click to toggle source

Returns the transaction history for a merchant.

# File lib/blockchyp.rb, line 213
def transaction_history(request)
  gateway_request('POST', '/api/tx-history', request)
end
transaction_status(request) click to toggle source

Retrieves the current status of a transaction.

# File lib/blockchyp.rb, line 178
def transaction_status(request)
  gateway_request('POST', '/api/tx-status', request)
end
update_customer(request) click to toggle source

Updates or creates a customer record.

# File lib/blockchyp.rb, line 183
def update_customer(request)
  gateway_request('POST', '/api/update-customer', request)
end
update_transaction_display(request) click to toggle source

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.

# File lib/blockchyp.rb, line 124
def update_transaction_display(request)
  route_terminal_request('PUT', '/api/txdisplay', '/api/terminal-txdisplay', request)
end
void(request) click to toggle source

Discards a previous transaction.

# File lib/blockchyp.rb, line 149
def void(request)
  gateway_request('POST', '/api/void', request)
end