Conditions | 1 |
Paths | 1 |
Total Lines | 18 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
22 | public function __construct(\zaporylie\Vipps\VippsInterface $vipps, $subscription_key) |
||
23 | { |
||
24 | parent::__construct($vipps, $subscription_key); |
||
25 | |||
26 | // Adjust serializer. |
||
27 | $this->serializer = SerializerBuilder::create() |
||
28 | ->setPropertyNamingStrategy(new SerializedNameAnnotationStrategy(new IdenticalPropertyNamingStrategy())) |
||
29 | ->build(); |
||
30 | |||
31 | // Content type for all requests must be set. |
||
32 | $this->headers['Content-Type'] = 'application/json'; |
||
33 | |||
34 | // By default RequestID is different for each Resource object. |
||
35 | $this->headers['X-Request-Id'] = RequestIdFactory::generate(); |
||
36 | |||
37 | // Timestamp is equal to current DateTime. |
||
38 | $this->headers['X-TimeStamp'] = (new \DateTime())->format(\DateTime::ISO8601); |
||
39 | } |
||
40 | } |
||
41 |