Composable Commerce PHP SDKPHP SDK
  • Namespace
  • Class
  • Tree

Namespaces

  • Commercetools
    • Commons
      • Helper
    • Core
      • Builder
        • Request
        • Update
      • Cache
      • Client
        • Adapter
        • OAuth
      • Error
      • Helper
        • Annotate
        • State
          • Renderer
        • Subscriber
          • Log
      • Model
        • ApiClient
        • Cart
        • CartDiscount
        • Category
        • Channel
        • Common
        • Customer
        • CustomerGroup
        • CustomField
        • CustomObject
        • DiscountCode
        • Extension
        • Inventory
        • Message
        • Order
        • OrderEdit
        • Payment
        • Product
          • Search
        • ProductDiscount
        • ProductSelection
        • ProductType
        • Project
        • Review
        • ShippingMethod
        • ShoppingList
        • State
        • Store
        • Subscription
        • TaxCategory
        • Type
        • Zone
      • Request
        • ApiClients
        • CartDiscounts
          • Command
        • Carts
          • Command
        • Categories
          • Command
        • Channels
          • Command
        • CustomerGroups
          • Command
        • Customers
          • Command
        • CustomField
          • Command
        • CustomObjects
        • DiscountCodes
          • Command
        • Extensions
          • Command
        • GraphQL
        • InStores
        • Inventory
          • Command
        • Me
          • Command
        • Messages
        • OrderEdits
          • Command
          • StagedOrder
            • Command
        • Orders
          • Command
        • Payments
          • Command
        • ProductDiscounts
          • Command
        • Products
          • Command
        • ProductSelections
          • Command
        • ProductTypes
          • Command
        • Project
          • Command
        • Query
        • Reviews
          • Command
        • ShippingMethods
          • Command
        • ShoppingLists
          • Command
        • States
          • Command
        • Stores
          • Command
        • Subscriptions
          • Command
        • TaxCategories
          • Command
        • Types
          • Command
        • Zones
          • Command
      • Response

Classes

  • Payment
  • PaymentCollection
  • PaymentDraft
  • PaymentInfo
  • PaymentMethodInfo
  • PaymentReference
  • PaymentReferenceCollection
  • PaymentStatus
  • Transaction
  • TransactionCollection
  • TransactionState
  • TransactionType
  1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  27  28  29  30  31  32  33  34  35  36  37  38  39  40  41  42  43  44  45  46  47  48  49  50  51  52  53  54  55  56  57  58  59  60  61  62  63  64  65  66  67  68  69  70  71  72  73  74  75  76  77  78  79  80  81  82  83  84  85  86  87  88  89  90  91  92  93  94  95  96  97  98  99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 
<?php
/**
 * @author @jenschude <jens.schulze@commercetools.de>
 */

namespace Commercetools\Core\Model\Payment;

use Commercetools\Core\Model\Common\CreatedBy;
use Commercetools\Core\Model\Common\LastModifiedBy;
use Commercetools\Core\Model\Common\Resource;
use Commercetools\Core\Model\Common\DateTimeDecorator;
use Commercetools\Core\Model\Customer\CustomerReference;
use Commercetools\Core\Model\Common\Money;
use Commercetools\Core\Model\CustomField\CustomFieldObject;
use Commercetools\Core\Model\CustomField\CustomFieldObjectCollection;
use DateTime;

/**
 * @package Commercetools\Core\Model\Payment
 * @link https://docs.commercetools.com/http-api-projects-payments.html#payment
 * @method string getId()
 * @method Payment setId(string $id = null)
 * @method int getVersion()
 * @method Payment setVersion(int $version = null)
 * @method DateTimeDecorator getCreatedAt()
 * @method Payment setCreatedAt(DateTime $createdAt = null)
 * @method DateTimeDecorator getLastModifiedAt()
 * @method Payment setLastModifiedAt(DateTime $lastModifiedAt = null)
 * @method CustomerReference getCustomer()
 * @method Payment setCustomer(CustomerReference $customer = null)
 * @method string getInterfaceId()
 * @method Payment setInterfaceId(string $interfaceId = null)
 * @method Money getAmountPlanned()
 * @method Payment setAmountPlanned(Money $amountPlanned = null)
 * @method PaymentMethodInfo getPaymentMethodInfo()
 * @method Payment setPaymentMethodInfo(PaymentMethodInfo $paymentMethodInfo = null)
 * @method CustomFieldObject getCustom()
 * @method Payment setCustom(CustomFieldObject $custom = null)
 * @method PaymentStatus getPaymentStatus()
 * @method Payment setPaymentStatus(PaymentStatus $paymentStatus = null)
 * @method TransactionCollection getTransactions()
 * @method Payment setTransactions(TransactionCollection $transactions = null)
 * @method CustomFieldObjectCollection getInterfaceInteractions()
 * @method Payment setInterfaceInteractions(CustomFieldObjectCollection $interfaceInteractions = null)
 * @method string getKey()
 * @method Payment setKey(string $key = null)
 * @method string getAnonymousId()
 * @method Payment setAnonymousId(string $anonymousId = null)
 * @method CreatedBy getCreatedBy()
 * @method Payment setCreatedBy(CreatedBy $createdBy = null)
 * @method LastModifiedBy getLastModifiedBy()
 * @method Payment setLastModifiedBy(LastModifiedBy $lastModifiedBy = null)
 * @method PaymentReference getReference()
 */
class Payment extends Resource
{
    public function fieldDefinitions()
    {
        return [
            'id' => [static::TYPE => 'string'],
            'version' => [static::TYPE => 'int'],
            'key' => [static::TYPE => 'string', static::OPTIONAL => true],
            'createdAt' => [
                static::TYPE => DateTime::class,
                static::DECORATOR => DateTimeDecorator::class
            ],
            'lastModifiedAt' => [
                static::TYPE => DateTime::class,
                static::DECORATOR => DateTimeDecorator::class
            ],
            'customer' => [static::TYPE => CustomerReference::class, static::OPTIONAL => true],
            'anonymousId' => [static::TYPE => 'string', static::OPTIONAL => true],
            'externalId' => [static::TYPE => 'string', static::OPTIONAL => true],
            'interfaceId' => [static::TYPE => 'string', static::OPTIONAL => true],
            'amountPlanned' => [static::TYPE => Money::class],
            'amountAuthorized' => [static::TYPE => Money::class, static::OPTIONAL => true],
            'authorizedUntil' => [
                static::TYPE => DateTime::class,
                static::OPTIONAL => true,
                static::DECORATOR => DateTimeDecorator::class
            ],
            'amountPaid' => [static::TYPE => Money::class, static::OPTIONAL => true],
            'amountRefunded' => [static::TYPE => Money::class, static::OPTIONAL => true],
            'paymentMethodInfo' => [static::TYPE => PaymentMethodInfo::class],
            'custom' => [static::TYPE => CustomFieldObject::class, static::OPTIONAL => true],
            'paymentStatus' => [static::TYPE => PaymentStatus::class],
            'transactions' => [static::TYPE => TransactionCollection::class],
            'interfaceInteractions' => [
                static::TYPE => CustomFieldObjectCollection::class
            ],
            'createdBy' => [static::TYPE => CreatedBy::class, static::OPTIONAL => true],
            'lastModifiedBy' => [static::TYPE => LastModifiedBy::class, static::OPTIONAL => true],
        ];
    }

    /**
     * @deprecated
     * @return string
     */
    public function getExternalId()
    {
        return parent::getExternalId();
    }

    /**
     * @deprecated
     * @param string $externalId
     * @return static
     */
    public function setExternalId($externalId = null)
    {
        return parent::setExternalId($externalId);
    }

    /**
     * @deprecated
     * @return Money
     */
    public function getAmountAuthorized()
    {
        return parent::getAmountAuthorized();
    }

    /**
     * @deprecated
     * @param Money $amountAuthorized
     * @return static
     */
    public function setAmountAuthorized(Money $amountAuthorized = null)
    {
        return parent::setAmountAuthorized($amountAuthorized);
    }

    /**
     * @deprecated
     * @return Money
     */
    public function getAmountPaid()
    {
        return parent::getAmountPaid();
    }

    /**
     * @deprecated
     * @param Money $amountPaid
     * @return static
     */
    public function setAmountPaid(Money $amountPaid = null)
    {
        return parent::setAmountPaid($amountPaid);
    }

    /**
     * @deprecated
     * @return Money
     */
    public function getAmountRefunded()
    {
        return parent::getAmountRefunded();
    }

    /**
     * @deprecated
     * @param Money $amountRefunded
     * @return static
     */
    public function setAmountRefunded(Money $amountRefunded = null)
    {
        return parent::setAmountRefunded($amountRefunded);
    }

    /**
     * @deprecated
     * @return Money
     */
    public function getAuthorizedUntil()
    {
        return parent::getAuthorizedUntil();
    }

    /**
     * @deprecated
     * @param Money $amountUntil
     * @return static
     */
    public function setAuthorizedUntil(Money $amountUntil = null)
    {
        return parent::setAuthorizedUntil($amountUntil);
    }
}
PHP SDK API documentation generated by ApiGen