| @@ 11-68 (lines=58) @@ | ||
| 8 | /** |
|
| 9 | * Balance resource class. |
|
| 10 | */ |
|
| 11 | class Balance extends AbstractResource |
|
| 12 | { |
|
| 13 | /** |
|
| 14 | * API resource name. |
|
| 15 | * |
|
| 16 | * @var string |
|
| 17 | */ |
|
| 18 | const RESOURCE_NAME = 'balance'; |
|
| 19 | ||
| 20 | /** |
|
| 21 | * Retrieve a merchant's balance. |
|
| 22 | * |
|
| 23 | * @return stdClass |
|
| 24 | */ |
|
| 25 | public static function balance() |
|
| 26 | { |
|
| 27 | return self::invoke(__FUNCTION__, static::RESOURCE_NAME, array()); |
|
| 28 | } |
|
| 29 | ||
| 30 | /** |
|
| 31 | * Not avalable for this resource. |
|
| 32 | * |
|
| 33 | * @throws Everypay\Exception\RuntimeException |
|
| 34 | */ |
|
| 35 | public static function create(array $params) |
|
| 36 | { |
|
| 37 | throw new Exception\RuntimeException( |
|
| 38 | 'Resource ' . ucfirst(static::RESOURCE_NAME) . |
|
| 39 | ' does not support method ' . __METHOD__ |
|
| 40 | ); |
|
| 41 | } |
|
| 42 | ||
| 43 | /** |
|
| 44 | * Not avalable for this resource. |
|
| 45 | * |
|
| 46 | * @throws Everypay\Exception\RuntimeException |
|
| 47 | */ |
|
| 48 | public static function update($token, array $params) |
|
| 49 | { |
|
| 50 | throw new Exception\RuntimeException( |
|
| 51 | 'Resource ' . ucfirst(static::RESOURCE_NAME) . |
|
| 52 | ' does not support method ' . __METHOD__ |
|
| 53 | ); |
|
| 54 | } |
|
| 55 | ||
| 56 | /** |
|
| 57 | * Not avalable for this resource. |
|
| 58 | * |
|
| 59 | * @throws Everypay\Exception\RuntimeException |
|
| 60 | */ |
|
| 61 | public static function delete($token, array $params = array()) |
|
| 62 | { |
|
| 63 | throw new Exception\RuntimeException( |
|
| 64 | 'Resource ' . ucfirst(static::RESOURCE_NAME) . |
|
| 65 | ' does not support method ' . __METHOD__ |
|
| 66 | ); |
|
| 67 | } |
|
| 68 | } |
|
| 69 | ||
| @@ 11-58 (lines=48) @@ | ||
| 8 | /** |
|
| 9 | * Payout resource class. |
|
| 10 | */ |
|
| 11 | class Payout extends AbstractResource |
|
| 12 | { |
|
| 13 | /** |
|
| 14 | * API resource name. |
|
| 15 | * |
|
| 16 | * @var string |
|
| 17 | */ |
|
| 18 | const RESOURCE_NAME = 'payouts'; |
|
| 19 | ||
| 20 | /** |
|
| 21 | * Not avalable for this resource. |
|
| 22 | * |
|
| 23 | * @throws Everypay\Exception\RuntimeException |
|
| 24 | */ |
|
| 25 | public static function create(array $params) |
|
| 26 | { |
|
| 27 | throw new Exception\RuntimeException( |
|
| 28 | 'Resource ' . ucfirst(static::RESOURCE_NAME) . |
|
| 29 | ' does not support method ' . __METHOD__ |
|
| 30 | ); |
|
| 31 | } |
|
| 32 | ||
| 33 | /** |
|
| 34 | * Not avalable for this resource. |
|
| 35 | * |
|
| 36 | * @throws Everypay\Exception\RuntimeException |
|
| 37 | */ |
|
| 38 | public static function update($token, array $params) |
|
| 39 | { |
|
| 40 | throw new Exception\RuntimeException( |
|
| 41 | 'Resource ' . ucfirst(static::RESOURCE_NAME) . |
|
| 42 | ' does not support method ' . __METHOD__ |
|
| 43 | ); |
|
| 44 | } |
|
| 45 | ||
| 46 | /** |
|
| 47 | * Not avalable for this resource. |
|
| 48 | * |
|
| 49 | * @throws Everypay\Exception\RuntimeException |
|
| 50 | */ |
|
| 51 | public static function delete($token, array $params = array()) |
|
| 52 | { |
|
| 53 | throw new Exception\RuntimeException( |
|
| 54 | 'Resource ' . ucfirst(static::RESOURCE_NAME) . |
|
| 55 | ' does not support method ' . __METHOD__ |
|
| 56 | ); |
|
| 57 | } |
|
| 58 | } |
|
| 59 | ||
| @@ 11-78 (lines=68) @@ | ||
| 8 | /** |
|
| 9 | * Token resource class. |
|
| 10 | */ |
|
| 11 | class Token extends AbstractResource |
|
| 12 | { |
|
| 13 | /** |
|
| 14 | * API resource name. |
|
| 15 | * |
|
| 16 | * @var string |
|
| 17 | */ |
|
| 18 | const RESOURCE_NAME = 'tokens'; |
|
| 19 | ||
| 20 | /** |
|
| 21 | * Create a new card token object. |
|
| 22 | * |
|
| 23 | * Available params are valid card info data. |
|
| 24 | * - card_number: A valid credit /debit card number. [Required] |
|
| 25 | * - expiration_month: Integer representation of month. [Required] |
|
| 26 | * - expiration_year: Integer represantation of a valid expiration year. [Required] |
|
| 27 | * - cvv: Card verification value. Three or four (American express) digits. [Required] |
|
| 28 | * - holder_name: First and last name of the card holder. [Required] |
|
| 29 | * |
|
| 30 | * @param array $params |
|
| 31 | * @return stdClass |
|
| 32 | */ |
|
| 33 | public static function create(array $params) |
|
| 34 | { |
|
| 35 | return parent::create($params); |
|
| 36 | } |
|
| 37 | ||
| 38 | /** |
|
| 39 | * Not available for this resource. |
|
| 40 | * |
|
| 41 | * @param array $params |
|
| 42 | * @throws Everypay\Exception\RuntimeException |
|
| 43 | */ |
|
| 44 | public static function listAll(array $params = array()) |
|
| 45 | { |
|
| 46 | throw new Exception\RuntimeException( |
|
| 47 | 'Resource ' . ucfirst(static::RESOURCE_NAME) . |
|
| 48 | ' does not support method ' . __METHOD__ |
|
| 49 | ); |
|
| 50 | } |
|
| 51 | ||
| 52 | /** |
|
| 53 | * Not avalable for this resource. |
|
| 54 | * |
|
| 55 | * @param array $params |
|
| 56 | * @throws Everypay\Exception\RuntimeException |
|
| 57 | */ |
|
| 58 | public static function update($token, array $params) |
|
| 59 | { |
|
| 60 | throw new Exception\RuntimeException( |
|
| 61 | 'Resource ' . ucfirst(static::RESOURCE_NAME) . |
|
| 62 | ' does not support method ' . __METHOD__ |
|
| 63 | ); |
|
| 64 | } |
|
| 65 | ||
| 66 | /** |
|
| 67 | * Not avalable for this resource. |
|
| 68 | * |
|
| 69 | * @throws Everypay\Exception\RuntimeException |
|
| 70 | */ |
|
| 71 | public static function delete($token, array $params = array()) |
|
| 72 | { |
|
| 73 | throw new Exception\RuntimeException( |
|
| 74 | 'Resource ' . ucfirst(static::RESOURCE_NAME) . |
|
| 75 | ' does not support method ' . __METHOD__ |
|
| 76 | ); |
|
| 77 | } |
|
| 78 | } |
|
| 79 | ||