public static function createOneTimeBankUsingCredentials(Credentials $credentials, $attributes = array()) { $conn = new Connection($credentials); $attributes['type'] = 'bank'; $response = $conn->post('/tokens', $attributes); return new self($response, $conn); }
public static function createUsingCredentials(Credentials $credentials, $paymentMethod, $amount, $params = array()) { $conn = new Connection($credentials); $params['amount'] = $amount; if ($paymentMethod instanceof PaymentMethodReference) { $params['method'] = $paymentMethod->id; } else { $params['method'] = $paymentMethod->attributes; } $response = $conn->post('/credits', $params); return new self($response, $conn); }
public static function findByIdUsingCredentials(Credentials $credentials, $id) { $conn = new Connection($credentials); $response = $conn->get('/transactions/' . $id); return self::parse($response, $conn); }
public static function findCurrentUsingCredentials(Credentials $credentials) { $conn = new Connection($credentials); $response = $conn->get('/merchant'); return new self($response, $conn); }
public static function findByIdUsingCredentials(Credentials $credentials, $id) { $conn = new Connection($credentials); $response = $conn->get('/cards/' . $id); return new self($response, $conn); }
public static function allHoldsUsingCredentials(Credentials $credentials, $params = array()) { $conn = new Connection($credentials); $response = $conn->get('/charges/holds', $params); return new TransactionList($response, $conn); }