commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
Customer
CustomerSignInResultBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Customer
;
10
11
use
Commercetools\Api\Models\Cart\Cart
;
12
use
Commercetools\Api\Models\Cart\CartBuilder
;
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 stdClass;
19
23
final
class
CustomerSignInResultBuilder
implements
Builder
24
{
29
private
$customer;
30
35
private
$cart;
36
43
public
function
getCustomer
()
44
{
45
return
$this->customer instanceof
CustomerBuilder
? $this->customer->
build
() : $this->customer;
46
}
47
55
public
function
getCart
()
56
{
57
return
$this->cart instanceof
CartBuilder
? $this->cart->
build
() : $this->cart;
58
}
59
64
public
function
withCustomer
(?
Customer
$customer)
65
{
66
$this->customer = $customer;
67
68
return
$this;
69
}
70
75
public
function
withCart
(?
Cart
$cart)
76
{
77
$this->cart = $cart;
78
79
return
$this;
80
}
81
86
public
function
withCustomerBuilder
(?
CustomerBuilder
$customer)
87
{
88
$this->customer = $customer;
89
90
return
$this;
91
}
92
97
public
function
withCartBuilder
(?
CartBuilder
$cart)
98
{
99
$this->cart = $cart;
100
101
return
$this;
102
}
103
104
public
function
build
():
CustomerSignInResult
105
{
106
return
new
CustomerSignInResultModel
(
107
$this->customer instanceof
CustomerBuilder
? $this->customer->
build
() : $this->customer,
108
$this->cart instanceof
CartBuilder
? $this->cart->
build
() : $this->cart
109
);
110
}
111
112
public
static
function
of
():
CustomerSignInResultBuilder
113
{
114
return
new
self
();
115
}
116
}
Commercetools\Api\Models\Cart\CartBuilder
Definition:
CartBuilder.php:45
Commercetools\Api\Models\Cart\CartBuilder\build
build()
Definition:
CartBuilder.php:1439
Commercetools\Api\Models\Customer\CustomerBuilder
Definition:
CustomerBuilder.php:35
Commercetools\Api\Models\Customer\CustomerBuilder\build
build()
Definition:
CustomerBuilder.php:926
Commercetools\Api\Models\Customer\CustomerSignInResultBuilder
Definition:
CustomerSignInResultBuilder.php:24
Commercetools\Api\Models\Customer\CustomerSignInResultBuilder\withCustomer
withCustomer(?Customer $customer)
Definition:
CustomerSignInResultBuilder.php:64
Commercetools\Api\Models\Customer\CustomerSignInResultBuilder\of
static of()
Definition:
CustomerSignInResultBuilder.php:112
Commercetools\Api\Models\Customer\CustomerSignInResultBuilder\withCartBuilder
withCartBuilder(?CartBuilder $cart)
Definition:
CustomerSignInResultBuilder.php:97
Commercetools\Api\Models\Customer\CustomerSignInResultBuilder\build
build()
Definition:
CustomerSignInResultBuilder.php:104
Commercetools\Api\Models\Customer\CustomerSignInResultBuilder\getCustomer
getCustomer()
Definition:
CustomerSignInResultBuilder.php:43
Commercetools\Api\Models\Customer\CustomerSignInResultBuilder\getCart
getCart()
Definition:
CustomerSignInResultBuilder.php:55
Commercetools\Api\Models\Customer\CustomerSignInResultBuilder\withCustomerBuilder
withCustomerBuilder(?CustomerBuilder $customer)
Definition:
CustomerSignInResultBuilder.php:86
Commercetools\Api\Models\Customer\CustomerSignInResultBuilder\withCart
withCart(?Cart $cart)
Definition:
CustomerSignInResultBuilder.php:75
Commercetools\Api\Models\Customer\CustomerSignInResultModel
Definition:
CustomerSignInResultModel.php:23
Commercetools\Base\DateTimeImmutableCollection
Definition:
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition:
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition:
MapperFactory.php:16
Commercetools\Api\Models\Cart\Cart
Definition:
Cart.php:28
Commercetools\Api\Models\Customer\Customer
Definition:
Customer.php:23
Commercetools\Api\Models\Customer\CustomerSignInResult
Definition:
CustomerSignInResult.php:16
Commercetools\Base\Builder
Definition:
Builder.php:16
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Api\Models\Customer
Definition:
Customer.php:9
Generated by
1.9.1