diff --git a/lib/Beyonic.php b/lib/Beyonic.php index 30a2b7b..5d22142 100644 --- a/lib/Beyonic.php +++ b/lib/Beyonic.php @@ -1,6 +1,4 @@ +?> \ No newline at end of file diff --git a/lib/Beyonic/Beyonic_Exception.php b/lib/Beyonic/Beyonic_Exception.php index acd9550..5991074 100644 --- a/lib/Beyonic/Beyonic_Exception.php +++ b/lib/Beyonic/Beyonic_Exception.php @@ -1,5 +1,10 @@ code}: {$this->message} when sending {$this->requestMethod} to {$this->requestURL}.\nError Details: {$this->responseBody}\n"; } } -?> +?> \ No newline at end of file diff --git a/lib/Beyonic/Collection.php b/lib/Beyonic/Collection.php index b22c7cc..b56185f 100644 --- a/lib/Beyonic/Collection.php +++ b/lib/Beyonic/Collection.php @@ -2,12 +2,12 @@ require_once( dirname(__FILE__) . '/Endpoint_Wrapper.php'); -/* - The Beyonic_Collection class provides access to the Collection API. -*/ +/** + * The Beyonic_Collection class provides access to the Collection API. + */ class Beyonic_Collection extends Beyonic_Endpoint_Wrapper { protected static $endpoint = 'collections'; } -?> +?> \ No newline at end of file diff --git a/lib/Beyonic/Collection_Request.php b/lib/Beyonic/Collection_Request.php index c2d4e42..73431df 100644 --- a/lib/Beyonic/Collection_Request.php +++ b/lib/Beyonic/Collection_Request.php @@ -2,12 +2,12 @@ require_once( dirname(__FILE__) . '/Endpoint_Wrapper.php'); -/* - The Beyonic_Collection_Request class provides access to the Collection Request API. -*/ +/** + * The Beyonic_Collection_Request class provides access to the Collection Request API. + */ class Beyonic_Collection_Request extends Beyonic_Endpoint_Wrapper { protected static $endpoint = 'collectionrequests'; } -?> +?> \ No newline at end of file diff --git a/lib/Beyonic/Contact.php b/lib/Beyonic/Contact.php index 404435e..14f80a0 100644 --- a/lib/Beyonic/Contact.php +++ b/lib/Beyonic/Contact.php @@ -2,12 +2,12 @@ require_once( dirname(__FILE__) . '/Endpoint_Wrapper.php'); -/* - The Beyonic_Contact class provides access to the Contact API. -*/ +/** + * The Beyonic_Contact class provides access to the Contact API. + */ class Beyonic_Contact extends Beyonic_Endpoint_Wrapper { protected static $endpoint = 'contacts'; } -?> +?> \ No newline at end of file diff --git a/lib/Beyonic/Currency.php b/lib/Beyonic/Currency.php index ab4d214..d4bd512 100644 --- a/lib/Beyonic/Currency.php +++ b/lib/Beyonic/Currency.php @@ -2,12 +2,12 @@ require_once( dirname(__FILE__) . '/Endpoint_Wrapper.php'); -/* - The Beyonic_Currency class provides access to the Currencies API. -*/ +/** + * The Beyonic_Currency class provides access to the Currencies API. + */ class Beyonic_Currency extends Beyonic_Endpoint_Wrapper { protected static $endpoint = 'currencies'; } -?> +?> \ No newline at end of file diff --git a/lib/Beyonic/Endpoint_Wrapper.php b/lib/Beyonic/Endpoint_Wrapper.php index 6bc0a2b..3fc3508 100644 --- a/lib/Beyonic/Endpoint_Wrapper.php +++ b/lib/Beyonic/Endpoint_Wrapper.php @@ -2,10 +2,10 @@ require_once( dirname(__FILE__) . '/Beyonic.php' ); -/* - The Beyonic_Endpoint_Wrapper class provides common routines needed by - all interface classses. -*/ +/** + * The Beyonic_Endpoint_Wrapper class provides common routines needed by + * all interface classses. + */ class Beyonic_Endpoint_Wrapper { protected static $endpoint = null; @@ -17,7 +17,12 @@ function __construct( $jsonObject ) { $this->$prop = $value; } - /* Send any changes made as a PATCH Request. Allows for overriding headers per request using $headerParameters */ + /** + * Send any changes made as a PATCH Request. Allows for overriding headers per request using $headerParameters + * + * @param array $headerParameters + * @return static + */ public function send( $headerParameters = null ) { $values = array(); @@ -29,14 +34,25 @@ public function send( $headerParameters = null ) { } - /* Get the associated object with $id */ + /** + * Get the associated object with $id + * + * @param string|int $id + * @param array|null $parameters + * @return static + */ public static function get( $id, $parameters = null ) { return( new static( Beyonic::sendRequest( static::$endpoint, 'GET', $id, $parameters ) ) ); } - /* Get all of the associated object */ - /* Use $parameters (when available) to search for a subset */ + /** + * Get all of the associated object + * + * Use $parameters (when available) to search for a subset + * @param array|null $parameters + * @return array + */ public static function getAll( $parameters = null ) { $resp = Beyonic::sendRequest( static::$endpoint, 'GET', null, $parameters ); @@ -52,22 +68,41 @@ public static function getAll( $parameters = null ) { return( $all ); } - /* Create the new object based on the $parameters and overrides headers for this requestr with $headerParameters */ + /** + * Create the new object based on the $parameters and overrides headers for this requestr with $headerParameters. + * + * @param array|null $parameters + * @param array|null $headerParameters + * @return static + */ public static function create( $parameters, $headerParameters = null ) { return( new static( Beyonic::sendRequest( static::$endpoint, 'POST', null, $parameters, $headerParameters ) ) ); } - /* Update the object associated with $id using $parameters and overrides headers for this request with $headerParameters */ + /** + * Update the object associated with $id using $parameters and overrides headers for this request with $headerParameters + * + * @param string|int $id + * @param array $parameters + * @param array|null $headerParameters + * @return static + */ public static function update( $id, $parameters, $headerParameters = null ) { return( new static( Beyonic::sendRequest( static::$endpoint, 'PATCH', $id, $parameters, $headerParameters ) ) ); } + /** + * Delete the object associated with $id + * + * @param string|int $id + */ /* Delete the object associated with $id */ public static function delete( $id ) { new static( Beyonic::sendRequest( static::$endpoint, 'DELETE', $id ) ); } + } -?> +?> \ No newline at end of file diff --git a/lib/Beyonic/Network.php b/lib/Beyonic/Network.php index a8edb0f..0bbe7a0 100644 --- a/lib/Beyonic/Network.php +++ b/lib/Beyonic/Network.php @@ -2,12 +2,12 @@ require_once( dirname(__FILE__) . '/Endpoint_Wrapper.php'); -/* - The Beyonic_Network class provides access to the Networks API. -*/ +/** + * The Beyonic_Network class provides access to the Networks API. + */ class Beyonic_Network extends Beyonic_Endpoint_Wrapper { protected static $endpoint = 'networks'; } -?> +?> \ No newline at end of file diff --git a/lib/Beyonic/Payment.php b/lib/Beyonic/Payment.php index 08a0f3d..fa7cb2f 100644 --- a/lib/Beyonic/Payment.php +++ b/lib/Beyonic/Payment.php @@ -2,12 +2,12 @@ require_once( dirname(__FILE__) . '/Endpoint_Wrapper.php'); -/* - The Beyonic_Payment class provides access to the Payment API. -*/ +/** + * The Beyonic_Payment class provides access to the Payment API. + */ class Beyonic_Payment extends Beyonic_Endpoint_Wrapper { protected static $endpoint = 'payments'; } -?> +?> \ No newline at end of file diff --git a/lib/Beyonic/Response.php b/lib/Beyonic/Response.php index 4c13512..755af4f 100644 --- a/lib/Beyonic/Response.php +++ b/lib/Beyonic/Response.php @@ -1,8 +1,8 @@ +?> \ No newline at end of file diff --git a/lib/Beyonic/Transaction.php b/lib/Beyonic/Transaction.php index 0a224a0..4fb58df 100644 --- a/lib/Beyonic/Transaction.php +++ b/lib/Beyonic/Transaction.php @@ -2,12 +2,12 @@ require_once( dirname(__FILE__) . '/Endpoint_Wrapper.php'); -/* - The Beyonic_Transaction class provides access to the Transactions API. -*/ +/** + * The Beyonic_Transaction class provides access to the Transactions API. + */ class Beyonic_Transaction extends Beyonic_Endpoint_Wrapper { protected static $endpoint = 'transactions'; } -?> +?> \ No newline at end of file diff --git a/lib/Beyonic/Webhook.php b/lib/Beyonic/Webhook.php index 6107b36..d6fffcb 100644 --- a/lib/Beyonic/Webhook.php +++ b/lib/Beyonic/Webhook.php @@ -2,13 +2,13 @@ require_once( dirname(__FILE__) . '/Endpoint_Wrapper.php' ); -/* - The Beyonic_Webhook class provides access to list, create, add & deletej - Webhook callbacks. -*/ +/** + * The Beyonic_Webhook class provides access to list, create, add & deletej + * Webhook callbacks. + */ class Beyonic_Webhook extends Beyonic_Endpoint_Wrapper { protected static $endpoint = 'webhooks'; } -?> +?> \ No newline at end of file