aboutsummaryrefslogtreecommitdiffstats
path: root/public/system/storage/vendor/cardinity/cardinity-sdk-php/src/Method/MethodInterface.php
blob: 0ca3889fd20b61d9547465f20ea4da2466074c46 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
namespace Cardinity\Method;

/**
 * Method interface for building queries for API.
 */
interface MethodInterface
{
    /**
     * HTTP method POST
     */
    const POST = 'POST';

    /**
     * HTTP method PATCH
     */
    const PATCH = 'PATCH';
    
    /**
     * HTTP method GET
     */
    const GET = 'GET';
    
    /**
     * HTTP method to use
     * @return string
     */
    public function getMethod();

    /**
     * API action name, part of full API request url
     * @return string
     */
    public function getAction();

    /**
     * Result object for this query result
     * @return ResultObjectInterface
     */
    public function createResultObject();
    
    /**
     * Validation constraints for fields
     * @return \Symfony\Component\Validator\Constraints\Collection
     */
    public function getValidationConstraints();

    /**
     * Field and values association of object attributes
     * @return array
     */
    public function getAttributes();
}