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
Project
ProjectBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Project
;
10
11
use
Commercetools\Api\Models\Message\MessagesConfiguration
;
12
use
Commercetools\Api\Models\Message\MessagesConfigurationBuilder
;
13
use
Commercetools\Base\Builder
;
14
use
Commercetools\Base\DateTimeImmutableCollection
;
15
use
Commercetools\Base\JsonObject
;
16
use
Commercetools\Base\JsonObjectModel
;
17
use
Commercetools\Base\MapperFactory
;
18
use DateTimeImmutable;
19
use stdClass;
20
24
final
class
ProjectBuilder
implements
Builder
25
{
30
private
$version;
31
36
private
$key;
37
42
private
$name;
43
48
private
$countries;
49
54
private
$currencies;
55
60
private
$languages;
61
66
private
$createdAt;
67
72
private
$trialUntil;
73
78
private
$messages;
79
84
private
$carts;
85
90
private
$shoppingLists;
91
96
private
$shippingRateInputType;
97
102
private
$externalOAuth;
103
108
private
$searchIndexing;
109
114
private
$businessUnits;
115
122
public
function
getVersion
()
123
{
124
return
$this->version;
125
}
126
133
public
function
getKey
()
134
{
135
return
$this->key;
136
}
137
144
public
function
getName
()
145
{
146
return
$this->name;
147
}
148
155
public
function
getCountries
()
156
{
157
return
$this->countries;
158
}
159
166
public
function
getCurrencies
()
167
{
168
return
$this->currencies;
169
}
170
177
public
function
getLanguages
()
178
{
179
return
$this->languages;
180
}
181
188
public
function
getCreatedAt
()
189
{
190
return
$this->createdAt;
191
}
192
199
public
function
getTrialUntil
()
200
{
201
return
$this->trialUntil;
202
}
203
210
public
function
getMessages
()
211
{
212
return
$this->messages instanceof
MessagesConfigurationBuilder
? $this->messages->
build
() : $this->messages;
213
}
214
221
public
function
getCarts
()
222
{
223
return
$this->carts instanceof
CartsConfigurationBuilder
? $this->carts->
build
() : $this->carts;
224
}
225
232
public
function
getShoppingLists
()
233
{
234
return
$this->shoppingLists instanceof
ShoppingListsConfigurationBuilder
? $this->shoppingLists->
build
() : $this->shoppingLists;
235
}
236
243
public
function
getShippingRateInputType
()
244
{
245
return
$this->shippingRateInputType instanceof
ShippingRateInputTypeBuilder
? $this->shippingRateInputType->
build
() : $this->shippingRateInputType;
246
}
247
254
public
function
getExternalOAuth
()
255
{
256
return
$this->externalOAuth instanceof
ExternalOAuthBuilder
? $this->externalOAuth->
build
() : $this->externalOAuth;
257
}
258
265
public
function
getSearchIndexing
()
266
{
267
return
$this->searchIndexing instanceof
SearchIndexingConfigurationBuilder
? $this->searchIndexing->
build
() : $this->searchIndexing;
268
}
269
276
public
function
getBusinessUnits
()
277
{
278
return
$this->businessUnits instanceof
BusinessUnitConfigurationBuilder
? $this->businessUnits->
build
() : $this->businessUnits;
279
}
280
285
public
function
withVersion
(?
int
$version)
286
{
287
$this->version = $version;
288
289
return
$this;
290
}
291
296
public
function
withKey
(?
string
$key)
297
{
298
$this->key = $key;
299
300
return
$this;
301
}
302
307
public
function
withName
(?
string
$name)
308
{
309
$this->name = $name;
310
311
return
$this;
312
}
313
318
public
function
withCountries
(?array $countries)
319
{
320
$this->countries = $countries;
321
322
return
$this;
323
}
324
329
public
function
withCurrencies
(?array $currencies)
330
{
331
$this->currencies = $currencies;
332
333
return
$this;
334
}
335
340
public
function
withLanguages
(?array $languages)
341
{
342
$this->languages = $languages;
343
344
return
$this;
345
}
346
351
public
function
withCreatedAt
(?DateTimeImmutable $createdAt)
352
{
353
$this->createdAt = $createdAt;
354
355
return
$this;
356
}
357
362
public
function
withTrialUntil
(?
string
$trialUntil)
363
{
364
$this->trialUntil = $trialUntil;
365
366
return
$this;
367
}
368
373
public
function
withMessages
(?
MessagesConfiguration
$messages)
374
{
375
$this->messages = $messages;
376
377
return
$this;
378
}
379
384
public
function
withCarts
(?
CartsConfiguration
$carts)
385
{
386
$this->carts = $carts;
387
388
return
$this;
389
}
390
395
public
function
withShoppingLists
(?
ShoppingListsConfiguration
$shoppingLists)
396
{
397
$this->shoppingLists = $shoppingLists;
398
399
return
$this;
400
}
401
406
public
function
withShippingRateInputType
(?
ShippingRateInputType
$shippingRateInputType)
407
{
408
$this->shippingRateInputType = $shippingRateInputType;
409
410
return
$this;
411
}
412
417
public
function
withExternalOAuth
(?
ExternalOAuth
$externalOAuth)
418
{
419
$this->externalOAuth = $externalOAuth;
420
421
return
$this;
422
}
423
428
public
function
withSearchIndexing
(?
SearchIndexingConfiguration
$searchIndexing)
429
{
430
$this->searchIndexing = $searchIndexing;
431
432
return
$this;
433
}
434
439
public
function
withBusinessUnits
(?
BusinessUnitConfiguration
$businessUnits)
440
{
441
$this->businessUnits = $businessUnits;
442
443
return
$this;
444
}
445
450
public
function
withMessagesBuilder
(?
MessagesConfigurationBuilder
$messages)
451
{
452
$this->messages = $messages;
453
454
return
$this;
455
}
456
461
public
function
withCartsBuilder
(?
CartsConfigurationBuilder
$carts)
462
{
463
$this->carts = $carts;
464
465
return
$this;
466
}
467
472
public
function
withShoppingListsBuilder
(?
ShoppingListsConfigurationBuilder
$shoppingLists)
473
{
474
$this->shoppingLists = $shoppingLists;
475
476
return
$this;
477
}
478
483
public
function
withShippingRateInputTypeBuilder
(?
ShippingRateInputTypeBuilder
$shippingRateInputType)
484
{
485
$this->shippingRateInputType = $shippingRateInputType;
486
487
return
$this;
488
}
489
494
public
function
withExternalOAuthBuilder
(?
ExternalOAuthBuilder
$externalOAuth)
495
{
496
$this->externalOAuth = $externalOAuth;
497
498
return
$this;
499
}
500
505
public
function
withSearchIndexingBuilder
(?
SearchIndexingConfigurationBuilder
$searchIndexing)
506
{
507
$this->searchIndexing = $searchIndexing;
508
509
return
$this;
510
}
511
516
public
function
withBusinessUnitsBuilder
(?
BusinessUnitConfigurationBuilder
$businessUnits)
517
{
518
$this->businessUnits = $businessUnits;
519
520
return
$this;
521
}
522
523
public
function
build
():
Project
524
{
525
return
new
ProjectModel
(
526
$this->version,
527
$this->key,
528
$this->name,
529
$this->countries,
530
$this->currencies,
531
$this->languages,
532
$this->createdAt,
533
$this->trialUntil,
534
$this->messages instanceof
MessagesConfigurationBuilder
? $this->messages->
build
() : $this->messages,
535
$this->carts instanceof
CartsConfigurationBuilder
? $this->carts->
build
() : $this->carts,
536
$this->shoppingLists instanceof
ShoppingListsConfigurationBuilder
? $this->shoppingLists->
build
() : $this->shoppingLists,
537
$this->shippingRateInputType instanceof
ShippingRateInputTypeBuilder
? $this->shippingRateInputType->
build
() : $this->shippingRateInputType,
538
$this->externalOAuth instanceof
ExternalOAuthBuilder
? $this->externalOAuth->
build
() : $this->externalOAuth,
539
$this->searchIndexing instanceof
SearchIndexingConfigurationBuilder
? $this->searchIndexing->
build
() : $this->searchIndexing,
540
$this->businessUnits instanceof
BusinessUnitConfigurationBuilder
? $this->businessUnits->
build
() : $this->businessUnits
541
);
542
}
543
544
public
static
function
of
():
ProjectBuilder
545
{
546
return
new
self
();
547
}
548
}
Commercetools\Api\Models\Message\MessagesConfigurationBuilder
Definition
MessagesConfigurationBuilder.php:22
Commercetools\Api\Models\Message\MessagesConfigurationBuilder\build
build()
Definition
MessagesConfigurationBuilder.php:82
Commercetools\Api\Models\Project\BusinessUnitConfigurationBuilder
Definition
BusinessUnitConfigurationBuilder.php:24
Commercetools\Api\Models\Project\BusinessUnitConfigurationBuilder\build
build()
Definition
BusinessUnitConfigurationBuilder.php:92
Commercetools\Api\Models\Project\CartsConfigurationBuilder
Definition
CartsConfigurationBuilder.php:22
Commercetools\Api\Models\Project\CartsConfigurationBuilder\build
build()
Definition
CartsConfigurationBuilder.php:82
Commercetools\Api\Models\Project\ExternalOAuthBuilder
Definition
ExternalOAuthBuilder.php:22
Commercetools\Api\Models\Project\ExternalOAuthBuilder\build
build()
Definition
ExternalOAuthBuilder.php:80
Commercetools\Api\Models\Project\ProjectBuilder
Definition
ProjectBuilder.php:25
Commercetools\Api\Models\Project\ProjectBuilder\withSearchIndexing
withSearchIndexing(?SearchIndexingConfiguration $searchIndexing)
Definition
ProjectBuilder.php:428
Commercetools\Api\Models\Project\ProjectBuilder\getShoppingLists
getShoppingLists()
Definition
ProjectBuilder.php:232
Commercetools\Api\Models\Project\ProjectBuilder\getBusinessUnits
getBusinessUnits()
Definition
ProjectBuilder.php:276
Commercetools\Api\Models\Project\ProjectBuilder\withBusinessUnits
withBusinessUnits(?BusinessUnitConfiguration $businessUnits)
Definition
ProjectBuilder.php:439
Commercetools\Api\Models\Project\ProjectBuilder\withShoppingLists
withShoppingLists(?ShoppingListsConfiguration $shoppingLists)
Definition
ProjectBuilder.php:395
Commercetools\Api\Models\Project\ProjectBuilder\withExternalOAuthBuilder
withExternalOAuthBuilder(?ExternalOAuthBuilder $externalOAuth)
Definition
ProjectBuilder.php:494
Commercetools\Api\Models\Project\ProjectBuilder\getShippingRateInputType
getShippingRateInputType()
Definition
ProjectBuilder.php:243
Commercetools\Api\Models\Project\ProjectBuilder\withCartsBuilder
withCartsBuilder(?CartsConfigurationBuilder $carts)
Definition
ProjectBuilder.php:461
Commercetools\Api\Models\Project\ProjectBuilder\withSearchIndexingBuilder
withSearchIndexingBuilder(?SearchIndexingConfigurationBuilder $searchIndexing)
Definition
ProjectBuilder.php:505
Commercetools\Api\Models\Project\ProjectBuilder\getName
getName()
Definition
ProjectBuilder.php:144
Commercetools\Api\Models\Project\ProjectBuilder\getCreatedAt
getCreatedAt()
Definition
ProjectBuilder.php:188
Commercetools\Api\Models\Project\ProjectBuilder\getExternalOAuth
getExternalOAuth()
Definition
ProjectBuilder.php:254
Commercetools\Api\Models\Project\ProjectBuilder\getKey
getKey()
Definition
ProjectBuilder.php:133
Commercetools\Api\Models\Project\ProjectBuilder\withShippingRateInputType
withShippingRateInputType(?ShippingRateInputType $shippingRateInputType)
Definition
ProjectBuilder.php:406
Commercetools\Api\Models\Project\ProjectBuilder\withCreatedAt
withCreatedAt(?DateTimeImmutable $createdAt)
Definition
ProjectBuilder.php:351
Commercetools\Api\Models\Project\ProjectBuilder\getVersion
getVersion()
Definition
ProjectBuilder.php:122
Commercetools\Api\Models\Project\ProjectBuilder\withCarts
withCarts(?CartsConfiguration $carts)
Definition
ProjectBuilder.php:384
Commercetools\Api\Models\Project\ProjectBuilder\withShippingRateInputTypeBuilder
withShippingRateInputTypeBuilder(?ShippingRateInputTypeBuilder $shippingRateInputType)
Definition
ProjectBuilder.php:483
Commercetools\Api\Models\Project\ProjectBuilder\getSearchIndexing
getSearchIndexing()
Definition
ProjectBuilder.php:265
Commercetools\Api\Models\Project\ProjectBuilder\getTrialUntil
getTrialUntil()
Definition
ProjectBuilder.php:199
Commercetools\Api\Models\Project\ProjectBuilder\withShoppingListsBuilder
withShoppingListsBuilder(?ShoppingListsConfigurationBuilder $shoppingLists)
Definition
ProjectBuilder.php:472
Commercetools\Api\Models\Project\ProjectBuilder\withCurrencies
withCurrencies(?array $currencies)
Definition
ProjectBuilder.php:329
Commercetools\Api\Models\Project\ProjectBuilder\getMessages
getMessages()
Definition
ProjectBuilder.php:210
Commercetools\Api\Models\Project\ProjectBuilder\withTrialUntil
withTrialUntil(?string $trialUntil)
Definition
ProjectBuilder.php:362
Commercetools\Api\Models\Project\ProjectBuilder\withMessagesBuilder
withMessagesBuilder(?MessagesConfigurationBuilder $messages)
Definition
ProjectBuilder.php:450
Commercetools\Api\Models\Project\ProjectBuilder\getLanguages
getLanguages()
Definition
ProjectBuilder.php:177
Commercetools\Api\Models\Project\ProjectBuilder\withLanguages
withLanguages(?array $languages)
Definition
ProjectBuilder.php:340
Commercetools\Api\Models\Project\ProjectBuilder\withCountries
withCountries(?array $countries)
Definition
ProjectBuilder.php:318
Commercetools\Api\Models\Project\ProjectBuilder\of
static of()
Definition
ProjectBuilder.php:544
Commercetools\Api\Models\Project\ProjectBuilder\withKey
withKey(?string $key)
Definition
ProjectBuilder.php:296
Commercetools\Api\Models\Project\ProjectBuilder\getCountries
getCountries()
Definition
ProjectBuilder.php:155
Commercetools\Api\Models\Project\ProjectBuilder\getCarts
getCarts()
Definition
ProjectBuilder.php:221
Commercetools\Api\Models\Project\ProjectBuilder\withBusinessUnitsBuilder
withBusinessUnitsBuilder(?BusinessUnitConfigurationBuilder $businessUnits)
Definition
ProjectBuilder.php:516
Commercetools\Api\Models\Project\ProjectBuilder\withMessages
withMessages(?MessagesConfiguration $messages)
Definition
ProjectBuilder.php:373
Commercetools\Api\Models\Project\ProjectBuilder\build
build()
Definition
ProjectBuilder.php:523
Commercetools\Api\Models\Project\ProjectBuilder\getCurrencies
getCurrencies()
Definition
ProjectBuilder.php:166
Commercetools\Api\Models\Project\ProjectBuilder\withVersion
withVersion(?int $version)
Definition
ProjectBuilder.php:285
Commercetools\Api\Models\Project\ProjectBuilder\withName
withName(?string $name)
Definition
ProjectBuilder.php:307
Commercetools\Api\Models\Project\ProjectBuilder\withExternalOAuth
withExternalOAuth(?ExternalOAuth $externalOAuth)
Definition
ProjectBuilder.php:417
Commercetools\Api\Models\Project\ProjectModel
Definition
ProjectModel.php:24
Commercetools\Api\Models\Project\SearchIndexingConfigurationBuilder
Definition
SearchIndexingConfigurationBuilder.php:22
Commercetools\Api\Models\Project\SearchIndexingConfigurationBuilder\build
build()
Definition
SearchIndexingConfigurationBuilder.php:218
Commercetools\Api\Models\Project\ShippingRateInputTypeBuilder
Definition
ShippingRateInputTypeBuilder.php:22
Commercetools\Api\Models\Project\ShippingRateInputTypeBuilder\build
build()
Definition
ShippingRateInputTypeBuilder.php:23
Commercetools\Api\Models\Project\ShoppingListsConfigurationBuilder
Definition
ShoppingListsConfigurationBuilder.php:22
Commercetools\Api\Models\Project\ShoppingListsConfigurationBuilder\build
build()
Definition
ShoppingListsConfigurationBuilder.php:53
Commercetools\Base\DateTimeImmutableCollection
Definition
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition
MapperFactory.php:16
Commercetools\Api\Models\Message\MessagesConfiguration
Definition
MessagesConfiguration.php:15
Commercetools\Api\Models\Project\BusinessUnitConfiguration
Definition
BusinessUnitConfiguration.php:16
Commercetools\Api\Models\Project\CartsConfiguration
Definition
CartsConfiguration.php:15
Commercetools\Api\Models\Project\ExternalOAuth
Definition
ExternalOAuth.php:15
Commercetools\Api\Models\Project\Project
Definition
Project.php:17
Commercetools\Api\Models\Project\SearchIndexingConfiguration
Definition
SearchIndexingConfiguration.php:15
Commercetools\Api\Models\Project\ShippingRateInputType
Definition
ShippingRateInputType.php:15
Commercetools\Api\Models\Project\ShoppingListsConfiguration
Definition
ShoppingListsConfiguration.php:15
Commercetools\Base\Builder
Definition
Builder.php:16
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Api\Models\Project
Definition
BusinessUnitConfiguration.php:9
Generated by
1.9.8