forked from traderinteractive/netacuity-php
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEdgeDatabase.php
More file actions
55 lines (50 loc) · 1.94 KB
/
EdgeDatabase.php
File metadata and controls
55 lines (50 loc) · 1.94 KB
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
54
55
<?php
namespace TraderInteractive\NetAcuity\Databases;
use GuzzleHttp\ClientInterface;
/**
* Formats and returns our expected data set according to the Net Acuity Edge type database.
*/
final class EdgeDatabase extends AbstractNetAcuityDatabase
{
/**
* EdgeDatabase constructor.
*
* @param ClientInterface $client The injected GuzzleHttp Client.
* @param string $apiUserToken The Net Acuity API User Token.
* @param string $netacuityBaseUrl The base url for the netacuity webservice.
*/
public function __construct(
ClientInterface $client,
string $apiUserToken,
string $netacuityBaseUrl = self::DEFAULT_NETACUITY_BASE_URL
) {
parent::__construct($client, $apiUserToken, $netacuityBaseUrl);
$this->databaseIdentifier = 4;
$this->translations = [
'area-code' => 'edge-area-codes',
'city' => 'edge-city',
'city-code' => 'edge-city-code',
'city-conf' => 'edge-city-conf',
'conn-speed' => 'edge-conn-speed',
'continent-code' => 'edge-continent-code',
'country' => 'edge-country',
'country-code' => 'edge-country-code',
'country-conf' => 'edge-country-conf',
'county' => 'edge-county',
'gmt-offset' => 'edge-gmt-offset',
'in-dist' => 'edge-in-dst',
'ip' => 'ip',
'latitude' => 'edge-latitude',
'longitude' => 'edge-longitude',
'metro-code' => 'edge-metro-code',
'postal-conf' => 'edge-postal-conf',
'region' => 'edge-region',
'region-code' => 'edge-region-code',
'region-conf' => 'edge-region-conf',
'timezone-name' => 'edge-timezone-name',
'transaction-id' => 'trans-id',
'two-letter-country' => 'edge-two-letter-country',
'zip-code' => 'edge-postal-code',
];
}
}