commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
PaymentAddTransactionActionBuilder.php
1 <?php
2 
3 declare(strict_types=1);
10 
16 use stdClass;
17 
22 {
27  private $transaction;
28 
35  public function getTransaction()
36  {
37  return $this->transaction instanceof TransactionDraftBuilder ? $this->transaction->build() : $this->transaction;
38  }
39 
44  public function withTransaction(?TransactionDraft $transaction)
45  {
46  $this->transaction = $transaction;
47 
48  return $this;
49  }
50 
55  public function withTransactionBuilder(?TransactionDraftBuilder $transaction)
56  {
57  $this->transaction = $transaction;
58 
59  return $this;
60  }
61 
63  {
65  $this->transaction instanceof TransactionDraftBuilder ? $this->transaction->build() : $this->transaction
66  );
67  }
68 
69  public static function of(): PaymentAddTransactionActionBuilder
70  {
71  return new self();
72  }
73 }