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
Cart
RecurringPaymentConfigurationDraftModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Cart
;
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
RecurringPaymentConfigurationDraftModel
extends
JsonObjectModel
implements
RecurringPaymentConfigurationDraft
21
{
26
protected
$paymentStrategy
;
27
32
protected
$paymentAllocations
;
33
34
38
public
function
__construct
(
39
?
string
$paymentStrategy
=
null
,
40
?
PaymentAllocationDraftCollection
$paymentAllocations
=
null
41
) {
42
$this->paymentStrategy =
$paymentStrategy
;
43
$this->paymentAllocations =
$paymentAllocations
;
44
}
45
52
public
function
getPaymentStrategy
()
53
{
54
if
(is_null($this->paymentStrategy)) {
56
$data = $this->
raw
(self::FIELD_PAYMENT_STRATEGY);
57
if
(is_null($data)) {
58
return
null
;
59
}
60
$this->paymentStrategy = (string) $data;
61
}
62
63
return
$this->paymentStrategy
;
64
}
65
72
public
function
getPaymentAllocations
()
73
{
74
if
(is_null($this->paymentAllocations)) {
76
$data = $this->
raw
(self::FIELD_PAYMENT_ALLOCATIONS);
77
if
(is_null($data)) {
78
return
null
;
79
}
80
$this->paymentAllocations =
PaymentAllocationDraftCollection::fromArray
($data);
81
}
82
83
return
$this->paymentAllocations
;
84
}
85
86
90
public
function
setPaymentStrategy
(?
string
$paymentStrategy
): void
91
{
92
$this->paymentStrategy =
$paymentStrategy
;
93
}
94
98
public
function
setPaymentAllocations
(?
PaymentAllocationDraftCollection
$paymentAllocations
): void
99
{
100
$this->paymentAllocations =
$paymentAllocations
;
101
}
102
}
Commercetools\Api\Models\Cart\PaymentAllocationDraftCollection
Definition
PaymentAllocationDraftCollection.php:22
Commercetools\Api\Models\Cart\RecurringPaymentConfigurationDraftModel
Definition
RecurringPaymentConfigurationDraftModel.php:21
Commercetools\Api\Models\Cart\RecurringPaymentConfigurationDraftModel\setPaymentAllocations
setPaymentAllocations(?PaymentAllocationDraftCollection $paymentAllocations)
Definition
RecurringPaymentConfigurationDraftModel.php:98
Commercetools\Api\Models\Cart\RecurringPaymentConfigurationDraftModel\$paymentStrategy
$paymentStrategy
Definition
RecurringPaymentConfigurationDraftModel.php:26
Commercetools\Api\Models\Cart\RecurringPaymentConfigurationDraftModel\$paymentAllocations
$paymentAllocations
Definition
RecurringPaymentConfigurationDraftModel.php:32
Commercetools\Api\Models\Cart\RecurringPaymentConfigurationDraftModel\getPaymentStrategy
getPaymentStrategy()
Definition
RecurringPaymentConfigurationDraftModel.php:52
Commercetools\Api\Models\Cart\RecurringPaymentConfigurationDraftModel\getPaymentAllocations
getPaymentAllocations()
Definition
RecurringPaymentConfigurationDraftModel.php:72
Commercetools\Api\Models\Cart\RecurringPaymentConfigurationDraftModel\__construct
__construct(?string $paymentStrategy=null, ?PaymentAllocationDraftCollection $paymentAllocations=null)
Definition
RecurringPaymentConfigurationDraftModel.php:38
Commercetools\Api\Models\Cart\RecurringPaymentConfigurationDraftModel\setPaymentStrategy
setPaymentStrategy(?string $paymentStrategy)
Definition
RecurringPaymentConfigurationDraftModel.php:90
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\Cart\RecurringPaymentConfigurationDraft
Definition
RecurringPaymentConfigurationDraft.php:15
Commercetools\Base\CSequence\fromArray
static fromArray(array $data)
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Api\Models\Cart
Definition
AbsoluteAllocation.php:9
Generated by
1.9.8