Client Class |
[This is preliminary documentation and is subject to change.]
Namespace: AstonClub.Integration
The Client type exposes the following members.
Name | Description | |
---|---|---|
![]() | Client(IBaseSettings) | Initializes a new instance of the Client class |
![]() | Client(IBaseSettings, ILogger) | Initializes a new instance of the Client class |
Name | Description | |
---|---|---|
![]() | CancelTransaction |
Cancels a transaction that has already been started.
|
![]() | ChargeCustomer |
Initiates a charge for a customer.
|
![]() | GetCustomers |
Gets the available customers customers.
|
![]() | GetReport |
Gets transaction summarys for all terminals (stations) for the merchant.
|
![]() | GetTerminalReport |
Gets a transactoin summary for a single terminal (station).
|
![]() | GetTransaction |
Gets the current details for an existing transaction.
|
![]() | Ping |
Pings this API to confirm connectivity.
|
![]() | ProcessTransaction |
Processes a transation that has already been started.
|
![]() | RefundTransaction |
Refunds a transaction that has already been completed (charged).
|
var client = new AstonClub.Integration.Client(); // Get available customers var customers = client.GetCustomers(); // Charge a customer var charge = Transaction.CreateTransaction(customer, new Item() {Amount = 10, Name = "Test Item", Quantity = 1, Tax = 0.91}); try { var pendingTransaction = client.ChargeCustomer(charge); // check pendingTransaction var results = client.ProcessCharge(pendingTransaction); } catch (Exception ex) { // The transaction failed! }