| @@ 7-60 (lines=54) @@ | ||
| 4 | ||
| 5 | namespace Everypay; |
|
| 6 | ||
| 7 | class PaymentNotification extends AbstractResource |
|
| 8 | { |
|
| 9 | const RESOURCE_NAME = 'notifications'; |
|
| 10 | ||
| 11 | /** |
|
| 12 | * Create a new payment notification object. |
|
| 13 | * |
|
| 14 | * Available params are: |
|
| 15 | * - amount: The amount in cents for the payment notification. [Required] |
|
| 16 | * - payee_name: Customer name. [Required] |
|
| 17 | * - payee_email: Customer email. [Required] |
|
| 18 | * - payee_phone: Customer phone number. [Required] |
|
| 19 | * - description: A decription for this payment max 255 chars. [Required] |
|
| 20 | * - expiration_date: After the given date, payment notification will not |
|
| 21 | * be available for payment. [Optional] |
|
| 22 | * - locale: Send email notification to available languages |
|
| 23 | * (el, en). Defaults to 'el' [Optional] |
|
| 24 | * |
|
| 25 | * @param array $params |
|
| 26 | * @return stdClass |
|
| 27 | */ |
|
| 28 | public static function create(array $params) |
|
| 29 | { |
|
| 30 | return parent::create($params); |
|
| 31 | } |
|
| 32 | ||
| 33 | /** |
|
| 34 | * Not available for this resource. |
|
| 35 | * |
|
| 36 | * @throws Everypay\Exception\RuntimeException |
|
| 37 | */ |
|
| 38 | public static function delete($token, array $params = array()) |
|
| 39 | { |
|
| 40 | throw new Exception\RuntimeException( |
|
| 41 | 'Resource ' . ucfirst(static::RESOURCE_NAME) . |
|
| 42 | ' does not support method ' . __METHOD__ |
|
| 43 | ); |
|
| 44 | } |
|
| 45 | ||
| 46 | /** |
|
| 47 | * Not available for this resource. |
|
| 48 | * |
|
| 49 | * @param string|stdClass |
|
| 50 | * @param array $params |
|
| 51 | * @throws Everypay\Exception\RuntimeException |
|
| 52 | */ |
|
| 53 | public static function update($token, array $params) |
|
| 54 | { |
|
| 55 | throw new Exception\RuntimeException( |
|
| 56 | 'Resource ' . ucfirst(static::RESOURCE_NAME) . |
|
| 57 | ' does not support method ' . __METHOD__ |
|
| 58 | ); |
|
| 59 | } |
|
| 60 | } |
|
| 61 | ||
| @@ 11-45 (lines=35) @@ | ||
| 8 | /** |
|
| 9 | * Reversal resource class. |
|
| 10 | */ |
|
| 11 | class Reversal extends AbstractResource |
|
| 12 | { |
|
| 13 | /** |
|
| 14 | * API resource name. |
|
| 15 | * |
|
| 16 | * @var string |
|
| 17 | */ |
|
| 18 | const RESOURCE_NAME = 'reversals'; |
|
| 19 | ||
| 20 | /** |
|
| 21 | * Not avalable for this resource. |
|
| 22 | * |
|
| 23 | * @throws Everypay\Exception\RuntimeException |
|
| 24 | */ |
|
| 25 | public static function update($token, 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 delete($token, array $params = array()) |
|
| 39 | { |
|
| 40 | throw new Exception\RuntimeException( |
|
| 41 | 'Resource ' . ucfirst(static::RESOURCE_NAME) . |
|
| 42 | ' does not support method ' . __METHOD__ |
|
| 43 | ); |
|
| 44 | } |
|
| 45 | } |
|
| 46 | ||