commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
ProjectBuilder.php
1<?php
2
3declare(strict_types=1);
10
18use DateTimeImmutable;
19use stdClass;
20
24final 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
120 private $inventory;
121
126 private $discounts;
127
132 private $productCatalogModel;
133
140 public function getVersion()
141 {
142 return $this->version;
143 }
144
151 public function getKey()
152 {
153 return $this->key;
154 }
155
162 public function getName()
163 {
164 return $this->name;
165 }
166
173 public function getCountries()
174 {
175 return $this->countries;
176 }
177
184 public function getCurrencies()
185 {
186 return $this->currencies;
187 }
188
195 public function getLanguages()
196 {
197 return $this->languages;
198 }
199
206 public function getCreatedAt()
207 {
208 return $this->createdAt;
209 }
210
217 public function getTrialUntil()
218 {
219 return $this->trialUntil;
220 }
221
228 public function getMessages()
229 {
230 return $this->messages instanceof MessagesConfigurationBuilder ? $this->messages->build() : $this->messages;
231 }
232
239 public function getCarts()
240 {
241 return $this->carts instanceof CartsConfigurationBuilder ? $this->carts->build() : $this->carts;
242 }
243
250 public function getShoppingLists()
251 {
252 return $this->shoppingLists instanceof ShoppingListsConfigurationBuilder ? $this->shoppingLists->build() : $this->shoppingLists;
253 }
254
261 public function getShippingRateInputType()
262 {
263 return $this->shippingRateInputType instanceof ShippingRateInputTypeBuilder ? $this->shippingRateInputType->build() : $this->shippingRateInputType;
264 }
265
272 public function getExternalOAuth()
273 {
274 return $this->externalOAuth instanceof ExternalOAuthBuilder ? $this->externalOAuth->build() : $this->externalOAuth;
275 }
276
283 public function getSearchIndexing()
284 {
285 return $this->searchIndexing instanceof SearchIndexingConfigurationBuilder ? $this->searchIndexing->build() : $this->searchIndexing;
286 }
287
294 public function getBusinessUnits()
295 {
296 return $this->businessUnits instanceof BusinessUnitConfigurationBuilder ? $this->businessUnits->build() : $this->businessUnits;
297 }
298
305 public function getInventory()
306 {
307 return $this->inventory instanceof InventoryConfigurationBuilder ? $this->inventory->build() : $this->inventory;
308 }
309
316 public function getDiscounts()
317 {
318 return $this->discounts instanceof DiscountsConfigurationBuilder ? $this->discounts->build() : $this->discounts;
319 }
320
328 public function getProductCatalogModel()
329 {
330 return $this->productCatalogModel;
331 }
332
337 public function withVersion(?int $version)
338 {
339 $this->version = $version;
340
341 return $this;
342 }
343
348 public function withKey(?string $key)
349 {
350 $this->key = $key;
351
352 return $this;
353 }
354
359 public function withName(?string $name)
360 {
361 $this->name = $name;
362
363 return $this;
364 }
365
370 public function withCountries(?array $countries)
371 {
372 $this->countries = $countries;
373
374 return $this;
375 }
376
381 public function withCurrencies(?array $currencies)
382 {
383 $this->currencies = $currencies;
384
385 return $this;
386 }
387
392 public function withLanguages(?array $languages)
393 {
394 $this->languages = $languages;
395
396 return $this;
397 }
398
403 public function withCreatedAt(?DateTimeImmutable $createdAt)
404 {
405 $this->createdAt = $createdAt;
406
407 return $this;
408 }
409
414 public function withTrialUntil(?string $trialUntil)
415 {
416 $this->trialUntil = $trialUntil;
417
418 return $this;
419 }
420
425 public function withMessages(?MessagesConfiguration $messages)
426 {
427 $this->messages = $messages;
428
429 return $this;
430 }
431
436 public function withCarts(?CartsConfiguration $carts)
437 {
438 $this->carts = $carts;
439
440 return $this;
441 }
442
447 public function withShoppingLists(?ShoppingListsConfiguration $shoppingLists)
448 {
449 $this->shoppingLists = $shoppingLists;
450
451 return $this;
452 }
453
458 public function withShippingRateInputType(?ShippingRateInputType $shippingRateInputType)
459 {
460 $this->shippingRateInputType = $shippingRateInputType;
461
462 return $this;
463 }
464
469 public function withExternalOAuth(?ExternalOAuth $externalOAuth)
470 {
471 $this->externalOAuth = $externalOAuth;
472
473 return $this;
474 }
475
480 public function withSearchIndexing(?SearchIndexingConfiguration $searchIndexing)
481 {
482 $this->searchIndexing = $searchIndexing;
483
484 return $this;
485 }
486
491 public function withBusinessUnits(?BusinessUnitConfiguration $businessUnits)
492 {
493 $this->businessUnits = $businessUnits;
494
495 return $this;
496 }
497
502 public function withInventory(?InventoryConfiguration $inventory)
503 {
504 $this->inventory = $inventory;
505
506 return $this;
507 }
508
513 public function withDiscounts(?DiscountsConfiguration $discounts)
514 {
515 $this->discounts = $discounts;
516
517 return $this;
518 }
519
524 public function withProductCatalogModel(?string $productCatalogModel)
525 {
526 $this->productCatalogModel = $productCatalogModel;
527
528 return $this;
529 }
530
536 {
537 $this->messages = $messages;
538
539 return $this;
540 }
541
547 {
548 $this->carts = $carts;
549
550 return $this;
551 }
552
558 {
559 $this->shoppingLists = $shoppingLists;
560
561 return $this;
562 }
563
568 public function withShippingRateInputTypeBuilder(?ShippingRateInputTypeBuilder $shippingRateInputType)
569 {
570 $this->shippingRateInputType = $shippingRateInputType;
571
572 return $this;
573 }
574
579 public function withExternalOAuthBuilder(?ExternalOAuthBuilder $externalOAuth)
580 {
581 $this->externalOAuth = $externalOAuth;
582
583 return $this;
584 }
585
591 {
592 $this->searchIndexing = $searchIndexing;
593
594 return $this;
595 }
596
602 {
603 $this->businessUnits = $businessUnits;
604
605 return $this;
606 }
607
613 {
614 $this->inventory = $inventory;
615
616 return $this;
617 }
618
624 {
625 $this->discounts = $discounts;
626
627 return $this;
628 }
629
630 public function build(): Project
631 {
632 return new ProjectModel(
633 $this->version,
634 $this->key,
635 $this->name,
636 $this->countries,
637 $this->currencies,
638 $this->languages,
639 $this->createdAt,
640 $this->trialUntil,
641 $this->messages instanceof MessagesConfigurationBuilder ? $this->messages->build() : $this->messages,
642 $this->carts instanceof CartsConfigurationBuilder ? $this->carts->build() : $this->carts,
643 $this->shoppingLists instanceof ShoppingListsConfigurationBuilder ? $this->shoppingLists->build() : $this->shoppingLists,
644 $this->shippingRateInputType instanceof ShippingRateInputTypeBuilder ? $this->shippingRateInputType->build() : $this->shippingRateInputType,
645 $this->externalOAuth instanceof ExternalOAuthBuilder ? $this->externalOAuth->build() : $this->externalOAuth,
646 $this->searchIndexing instanceof SearchIndexingConfigurationBuilder ? $this->searchIndexing->build() : $this->searchIndexing,
647 $this->businessUnits instanceof BusinessUnitConfigurationBuilder ? $this->businessUnits->build() : $this->businessUnits,
648 $this->inventory instanceof InventoryConfigurationBuilder ? $this->inventory->build() : $this->inventory,
649 $this->discounts instanceof DiscountsConfigurationBuilder ? $this->discounts->build() : $this->discounts,
650 $this->productCatalogModel
651 );
652 }
653
654 public static function of(): ProjectBuilder
655 {
656 return new self();
657 }
658}
withSearchIndexing(?SearchIndexingConfiguration $searchIndexing)
withBusinessUnits(?BusinessUnitConfiguration $businessUnits)
withShoppingLists(?ShoppingListsConfiguration $shoppingLists)
withExternalOAuthBuilder(?ExternalOAuthBuilder $externalOAuth)
withCartsBuilder(?CartsConfigurationBuilder $carts)
withSearchIndexingBuilder(?SearchIndexingConfigurationBuilder $searchIndexing)
withShippingRateInputType(?ShippingRateInputType $shippingRateInputType)
withInventoryBuilder(?InventoryConfigurationBuilder $inventory)
withInventory(?InventoryConfiguration $inventory)
withShippingRateInputTypeBuilder(?ShippingRateInputTypeBuilder $shippingRateInputType)
withDiscounts(?DiscountsConfiguration $discounts)
withShoppingListsBuilder(?ShoppingListsConfigurationBuilder $shoppingLists)
withMessagesBuilder(?MessagesConfigurationBuilder $messages)
withProductCatalogModel(?string $productCatalogModel)
withBusinessUnitsBuilder(?BusinessUnitConfigurationBuilder $businessUnits)
withDiscountsBuilder(?DiscountsConfigurationBuilder $discounts)
withMessages(?MessagesConfiguration $messages)
withExternalOAuth(?ExternalOAuth $externalOAuth)