commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
lib
commercetools-api
src
Models
ApiClient
ApiClientDraftBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\ApiClient
;
10
11
use
Commercetools\Base\Builder
;
12
use
Commercetools\Base\DateTimeImmutableCollection
;
13
use
Commercetools\Base\JsonObject
;
14
use
Commercetools\Base\JsonObjectModel
;
15
use
Commercetools\Base\MapperFactory
;
16
use stdClass;
17
21
final
class
ApiClientDraftBuilder
implements
Builder
22
{
27
private
$name;
28
33
private
$scope;
34
39
private
$deleteDaysAfterCreation;
40
45
private
$accessTokenValiditySeconds;
46
51
private
$refreshTokenValiditySeconds;
52
59
public
function
getName
()
60
{
61
return
$this->name;
62
}
63
70
public
function
getScope
()
71
{
72
return
$this->scope;
73
}
74
81
public
function
getDeleteDaysAfterCreation
()
82
{
83
return
$this->deleteDaysAfterCreation;
84
}
85
92
public
function
getAccessTokenValiditySeconds
()
93
{
94
return
$this->accessTokenValiditySeconds;
95
}
96
103
public
function
getRefreshTokenValiditySeconds
()
104
{
105
return
$this->refreshTokenValiditySeconds;
106
}
107
112
public
function
withName
(?
string
$name)
113
{
114
$this->name = $name;
115
116
return
$this;
117
}
118
123
public
function
withScope
(?
string
$scope)
124
{
125
$this->scope = $scope;
126
127
return
$this;
128
}
129
134
public
function
withDeleteDaysAfterCreation
(?
int
$deleteDaysAfterCreation)
135
{
136
$this->deleteDaysAfterCreation = $deleteDaysAfterCreation;
137
138
return
$this;
139
}
140
145
public
function
withAccessTokenValiditySeconds
(?
int
$accessTokenValiditySeconds)
146
{
147
$this->accessTokenValiditySeconds = $accessTokenValiditySeconds;
148
149
return
$this;
150
}
151
156
public
function
withRefreshTokenValiditySeconds
(?
int
$refreshTokenValiditySeconds)
157
{
158
$this->refreshTokenValiditySeconds = $refreshTokenValiditySeconds;
159
160
return
$this;
161
}
162
163
164
public
function
build
():
ApiClientDraft
165
{
166
return
new
ApiClientDraftModel
(
167
$this->name,
168
$this->scope,
169
$this->deleteDaysAfterCreation,
170
$this->accessTokenValiditySeconds,
171
$this->refreshTokenValiditySeconds
172
);
173
}
174
175
public
static
function
of
():
ApiClientDraftBuilder
176
{
177
return
new
self
();
178
}
179
}
Commercetools\Api\Models\ApiClient\ApiClientDraftBuilder
Definition
ApiClientDraftBuilder.php:22
Commercetools\Api\Models\ApiClient\ApiClientDraftBuilder\getName
getName()
Definition
ApiClientDraftBuilder.php:59
Commercetools\Api\Models\ApiClient\ApiClientDraftBuilder\withAccessTokenValiditySeconds
withAccessTokenValiditySeconds(?int $accessTokenValiditySeconds)
Definition
ApiClientDraftBuilder.php:145
Commercetools\Api\Models\ApiClient\ApiClientDraftBuilder\getAccessTokenValiditySeconds
getAccessTokenValiditySeconds()
Definition
ApiClientDraftBuilder.php:92
Commercetools\Api\Models\ApiClient\ApiClientDraftBuilder\withRefreshTokenValiditySeconds
withRefreshTokenValiditySeconds(?int $refreshTokenValiditySeconds)
Definition
ApiClientDraftBuilder.php:156
Commercetools\Api\Models\ApiClient\ApiClientDraftBuilder\getScope
getScope()
Definition
ApiClientDraftBuilder.php:70
Commercetools\Api\Models\ApiClient\ApiClientDraftBuilder\build
build()
Definition
ApiClientDraftBuilder.php:164
Commercetools\Api\Models\ApiClient\ApiClientDraftBuilder\of
static of()
Definition
ApiClientDraftBuilder.php:175
Commercetools\Api\Models\ApiClient\ApiClientDraftBuilder\withName
withName(?string $name)
Definition
ApiClientDraftBuilder.php:112
Commercetools\Api\Models\ApiClient\ApiClientDraftBuilder\getDeleteDaysAfterCreation
getDeleteDaysAfterCreation()
Definition
ApiClientDraftBuilder.php:81
Commercetools\Api\Models\ApiClient\ApiClientDraftBuilder\getRefreshTokenValiditySeconds
getRefreshTokenValiditySeconds()
Definition
ApiClientDraftBuilder.php:103
Commercetools\Api\Models\ApiClient\ApiClientDraftBuilder\withScope
withScope(?string $scope)
Definition
ApiClientDraftBuilder.php:123
Commercetools\Api\Models\ApiClient\ApiClientDraftBuilder\withDeleteDaysAfterCreation
withDeleteDaysAfterCreation(?int $deleteDaysAfterCreation)
Definition
ApiClientDraftBuilder.php:134
Commercetools\Api\Models\ApiClient\ApiClientDraftModel
Definition
ApiClientDraftModel.php:21
Commercetools\Base\DateTimeImmutableCollection
Definition
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition
MapperFactory.php:16
Commercetools\Api\Models\ApiClient\ApiClientDraft
Definition
ApiClientDraft.php:15
Commercetools\Base\Builder
Definition
Builder.php:16
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Api\Models\ApiClient
Definition
ApiClient.php:9
Generated by
1.9.8