1: <?php
 2: 
 3: /**
 4:  * Base class for requests
 5:  */
 6: abstract class Syspay_Merchant_Request
 7: {
 8:     /**
 9:      * Get the HTTP method to use to make the request
10:      * @return string HTTP method
11:      */
12:     abstract public function getMethod();
13: 
14:     /**
15:      * Get the path to call to make the request
16:      * @return string API path
17:      */
18:     abstract public function getPath();
19: 
20:     /**
21:      * Build an object based on the decoded response received from the API (turned to a stdClass object)
22:      * @param  stdClass $response The data to build the object from
23:      * @return mixed    The object built
24:      */
25:     abstract public function buildResponse(stdClass $response);
26: 
27:     /**
28:      * Get the data to send to the API for the request
29:      * @return array An array of data that will be json-encoded by the Syspay_Merchant_Client
30:      */
31:     public function getData()
32:     {
33:         return null;
34:     }
35: }
36: