commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
Common
AttributionModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Common
;
10
11
use
Commercetools\Base\DateTimeImmutableCollection
;
12
use
Commercetools\Base\JsonObject
;
13
use
Commercetools\Base\JsonObjectModel
;
14
use
Commercetools\Base\MapperFactory
;
15
use stdClass;
16
20
final
class
AttributionModel
extends
JsonObjectModel
implements
Attribution
21
{
26
protected
$clientId
;
27
32
protected
$source
;
33
34
38
public
function
__construct
(
39
?
string
$clientId
=
null
,
40
?
string
$source
=
null
41
) {
42
$this->clientId =
$clientId
;
43
$this->source =
$source
;
44
}
45
52
public
function
getClientId
()
53
{
54
if
(is_null($this->clientId)) {
56
$data = $this->
raw
(self::FIELD_CLIENT_ID);
57
if
(is_null($data)) {
58
return
null
;
59
}
60
$this->clientId = (string) $data;
61
}
62
63
return
$this->clientId
;
64
}
65
72
public
function
getSource
()
73
{
74
if
(is_null($this->source)) {
76
$data = $this->
raw
(self::FIELD_SOURCE);
77
if
(is_null($data)) {
78
return
null
;
79
}
80
$this->source = (string) $data;
81
}
82
83
return
$this->source
;
84
}
85
86
90
public
function
setClientId
(?
string
$clientId
): void
91
{
92
$this->clientId =
$clientId
;
93
}
94
98
public
function
setSource
(?
string
$source
): void
99
{
100
$this->source =
$source
;
101
}
102
}
Commercetools\Api\Models\Common\AttributionModel
Definition:
AttributionModel.php:21
Commercetools\Api\Models\Common\AttributionModel\__construct
__construct(?string $clientId=null, ?string $source=null)
Definition:
AttributionModel.php:38
Commercetools\Api\Models\Common\AttributionModel\setSource
setSource(?string $source)
Definition:
AttributionModel.php:98
Commercetools\Api\Models\Common\AttributionModel\setClientId
setClientId(?string $clientId)
Definition:
AttributionModel.php:90
Commercetools\Api\Models\Common\AttributionModel\getClientId
getClientId()
Definition:
AttributionModel.php:52
Commercetools\Api\Models\Common\AttributionModel\$clientId
$clientId
Definition:
AttributionModel.php:26
Commercetools\Api\Models\Common\AttributionModel\$source
$source
Definition:
AttributionModel.php:32
Commercetools\Api\Models\Common\AttributionModel\getSource
getSource()
Definition:
AttributionModel.php:72
Commercetools\Base\BaseJsonObject\raw
raw(string $field)
Definition:
BaseJsonObject.php:57
Commercetools\Base\DateTimeImmutableCollection
Definition:
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition:
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition:
MapperFactory.php:16
Commercetools\Api\Models\Common\Attribution
Definition:
Attribution.php:15
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Api\Models\Common
Definition:
Address.php:9
Generated by
1.9.1