commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
RecurringPaymentConfigurationModel.php
1<?php
2
3declare(strict_types=1);
10
15use stdClass;
16
21{
27
33
34
38 public function __construct(
39 ?string $paymentStrategy = 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
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 = RecurringPaymentAllocationCollection::fromArray($data);
81 }
82
84 }
85
86
90 public function setPaymentStrategy(?string $paymentStrategy): void
91 {
92 $this->paymentStrategy = $paymentStrategy;
93 }
94
99 {
100 $this->paymentAllocations = $paymentAllocations;
101 }
102}
__construct(?string $paymentStrategy=null, ?RecurringPaymentAllocationCollection $paymentAllocations=null)
setPaymentAllocations(?RecurringPaymentAllocationCollection $paymentAllocations)
static fromArray(array $data)