PHP Class Mollie_API_Resource_Base, mollie-api-php
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
Exibir arquivo
Open project: mollie/mollie-api-php
Class Usage Examples
Protected Properties
Public Methods
Protected Methods
Method |
Description |
|
copy ( object $api_result, object $object ) : object |
Copy the results received from the API into the PHP objects that we use. |
|
getResourceObject ( ) : object |
Get the object that is used by this API. Every API uses one type of object. |
|
performApiCall ( $http_method, $api_method, null $http_body = NULL ) : object |
Perform an API call, and interpret the results and convert them to correct objects. |
|
rest_update ( string $rest_resource, string $id, string $body ) : object |
Sends a POST request to a single Molle API object to update it. |
|
Private Methods
Method Details
__construct()
public method
public __construct ( Mollie_API_Client $api ) |
$api |
Mollie_API_Client |
|
Retrieve all objects of a certain resource.
Copy the results received from the API into the PHP objects that we use.
Create a resource with the remote API.
public create ( array $data = [], array $filters = [] ) : object |
$data |
array |
An array containing details on the resource. Fields supported depend on the resource created. |
$filters |
array |
|
return |
object |
|
Will throw a Mollie_API_Exception if the resource cannot be found.
Will throw a Mollie_API_Exception if the resource cannot be found.
getResourceObject()
abstract protected method
Get the object that is used by this API. Every API uses one type of object.
getResourcePath()
public method
rest_update()
protected method
Sends a POST request to a single Molle API object to update it.
setResourcePath()
public method
Set the resource to use a certain parent. Use this method before performing a get() or all() call.
public with ( Mollie_API_Object_Payment | object $parent ) |
$parent |
Mollie_API_Object_Payment | object |
An object with an 'id' property |
withParentId()
public method
Property Details
$api protected_oe property
protected Mollie_API_Client $api |
return |
Mollie_API_Client |
|
$parent_id protected_oe property
protected string|null $parent_id |
return |
string | null |
|
$resource_path protected_oe property
protected string $resource_path |
return |
string |
|