1 | <?php |
||
33 | class Request implements RequestInterface |
||
34 | { |
||
35 | /** |
||
36 | * The requestscheme |
||
37 | * |
||
38 | * @var string |
||
39 | */ |
||
40 | private $requestScheme = "http://webservices.amazon.%s/onca/xml?%s"; |
||
41 | |||
42 | /** |
||
43 | * @var ClientInterface |
||
44 | */ |
||
45 | private $client; |
||
46 | |||
47 | /** |
||
48 | * Initialize instance |
||
49 | * |
||
50 | * @param ClientInterface $client |
||
51 | */ |
||
52 | public function __construct(ClientInterface $client) |
||
56 | |||
57 | /** |
||
58 | * {@inheritdoc} |
||
59 | */ |
||
60 | public function perform(OperationInterface $operation, ConfigurationInterface $configuration) |
||
74 | |||
75 | /** |
||
76 | * Prepares the parameters for the request |
||
77 | * |
||
78 | * @param OperationInterface $operation |
||
79 | * @param ConfigurationInterface $configuration |
||
80 | * |
||
81 | * @return array |
||
82 | */ |
||
83 | protected function prepareRequestParams(OperationInterface $operation, ConfigurationInterface $configuration) |
||
107 | |||
108 | /** |
||
109 | * Builds the final querystring including the signature |
||
110 | * |
||
111 | * @param array $params |
||
112 | * @param ConfigurationInterface $configuration |
||
113 | * |
||
114 | * @return string |
||
115 | */ |
||
116 | protected function buildQueryString(array $params, ConfigurationInterface $configuration) |
||
129 | |||
130 | /** |
||
131 | * Calculates the signature for the request |
||
132 | * |
||
133 | * @param array $params |
||
134 | * @param string $country |
||
135 | * @param string $secret |
||
136 | * |
||
137 | * @return string |
||
138 | */ |
||
139 | protected function buildSignature(array $params, $country, $secret) |
||
150 | } |
||
151 |