Skip to content

Commit b450176

Browse files
author
Auto Mation
committed
TASK: Updating SDK
1 parent 336236d commit b450176

File tree

140 files changed

+1069
-354
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

140 files changed

+1069
-354
lines changed

changes.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,11 @@
3737
- :warning: changed property `country` of type `MissingTaxRateForCountryError` from type `string` to `CountryCode` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/error/MissingTaxRateForCountryError.raml:23:2)
3838
- :warning: changed property `currency` of type `OverlappingStandalonePriceValidityError` from type `string` to `CurrencyCode` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/error/OverlappingStandalonePriceValidityError.raml:25:2)
3939
- :warning: changed property `country` of type `OverlappingStandalonePriceValidityError` from type `string` to `CountryCode` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/error/OverlappingStandalonePriceValidityError.raml:29:2)
40+
- :warning: changed property `amountPlanned` of type `MyPayment` from type `TypedMoney` to `CentPrecisionMoney` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/me/MyPayment.raml:27:2)
41+
- :warning: changed property `amountPlanned` of type `Payment` from type `TypedMoney` to `CentPrecisionMoney` (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/payment/Payment.raml:49:2)
4042
- :warning: changed property `field` of type `DuplicateFieldError` to be required (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/error/DuplicateFieldError.raml:14:2)
4143
- :warning: changed property `duplicateValue` of type `DuplicateFieldError` to be required (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/error/DuplicateFieldError.raml:18:2)
44+
- :warning: changed property `state` of type `Transaction` to be required (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/payment/Transaction.raml:27:2)
4245
- :warning: changed property `lineItems` of type `ShoppingList` to be required (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/shopping-list/ShoppingList.raml:41:2)
4346
- :warning: changed property `textLineItems` of type `ShoppingList` to be required (file:/home/runner/work/commercetools-api-reference/commercetools-api-reference/commercetools-api-reference/api-specs/api/types/shopping-list/ShoppingList.raml:45:2)
4447
</details>

lib/commercetools-api/docs/RequestBuilder.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3334,7 +3334,8 @@ $request = $builder
33343334
```
33353335
## `withProjectKey("projectKey")->me()->payments()->post(null)`
33363336

3337-
null
3337+
Creating a Payment produces the [PaymentCreated](ctp:api:type:PaymentCreatedMessage) Message.
3338+
33383339

33393340
### Example
33403341
```php
@@ -3365,7 +3366,8 @@ $request = $builder
33653366
```
33663367
## `withProjectKey("projectKey")->me()->payments()->withId("ID")->post(null)`
33673368

3368-
null
3369+
This endpoint can only update a Payment when it has no [Transactions](ctp:api:type:Transaction).
3370+
33693371

33703372
### Example
33713373
```php
@@ -3381,7 +3383,8 @@ $request = $builder
33813383
```
33823384
## `withProjectKey("projectKey")->me()->payments()->withId("ID")->delete()`
33833385

3384-
null
3386+
This endpoint can only delete a Payment when it has no [Transactions](ctp:api:type:Transaction).
3387+
33853388

33863389
### Example
33873390
```php
@@ -3413,7 +3416,8 @@ $request = $builder
34133416
```
34143417
## `withProjectKey("projectKey")->me()->payments()->withKey("key")->post(null)`
34153418

3416-
null
3419+
This endpoint can only update a Payment when it has no [Transactions](ctp:api:type:Transaction).
3420+
34173421

34183422
### Example
34193423
```php
@@ -3429,7 +3433,8 @@ $request = $builder
34293433
```
34303434
## `withProjectKey("projectKey")->me()->payments()->withKey("key")->delete()`
34313435

3432-
null
3436+
This endpoint can only delete a Payment when it has no [Transactions](ctp:api:type:Transaction).
3437+
34333438

34343439
### Example
34353440
```php
@@ -4163,7 +4168,8 @@ $request = $builder
41634168
```
41644169
## `withProjectKey("projectKey")->payments()->post(null)`
41654170

4166-
To create a payment object a payment draft object has to be given with the request.
4171+
Creating a Payment produces the [PaymentCreated](ctp:api:type:PaymentCreatedMessage) Message.
4172+
41674173

41684174
### Example
41694175
```php

lib/commercetools-api/src/Models/Me/MyCartAddPaymentAction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ interface MyCartAddPaymentAction extends MyCartUpdateAction
1717
public const FIELD_PAYMENT = 'payment';
1818

1919
/**
20-
* <p><a href="ctp:api:type:ResourceIdentifier">ResourceIdentifier</a> to a <a href="ctp:api:type:Payment">Payment</a>.</p>
20+
* <p><a href="ctp:api:type:ResourceIdentifier">ResourceIdentifier</a> of a <a href="ctp:api:type:Payment">Payment</a>.</p>
2121
*
2222
2323
* @return null|PaymentResourceIdentifier

lib/commercetools-api/src/Models/Me/MyCartAddPaymentActionBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ final class MyCartAddPaymentActionBuilder implements Builder
2929
private $payment;
3030

3131
/**
32-
* <p><a href="ctp:api:type:ResourceIdentifier">ResourceIdentifier</a> to a <a href="ctp:api:type:Payment">Payment</a>.</p>
32+
* <p><a href="ctp:api:type:ResourceIdentifier">ResourceIdentifier</a> of a <a href="ctp:api:type:Payment">Payment</a>.</p>
3333
*
3434
3535
* @return null|PaymentResourceIdentifier

lib/commercetools-api/src/Models/Me/MyCartAddPaymentActionModel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function getAction()
6565
}
6666

6767
/**
68-
* <p><a href="ctp:api:type:ResourceIdentifier">ResourceIdentifier</a> to a <a href="ctp:api:type:Payment">Payment</a>.</p>
68+
* <p><a href="ctp:api:type:ResourceIdentifier">ResourceIdentifier</a> of a <a href="ctp:api:type:Payment">Payment</a>.</p>
6969
*
7070
*
7171
* @return null|PaymentResourceIdentifier

lib/commercetools-api/src/Models/Me/MyCartRemovePaymentAction.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ interface MyCartRemovePaymentAction extends MyCartUpdateAction
1717
public const FIELD_PAYMENT = 'payment';
1818

1919
/**
20-
* <p><a href="ctp:api:type:ResourceIdentifier">ResourceIdentifier</a> to a <a href="ctp:api:type:Payment">Payment</a>.</p>
20+
* <p><a href="ctp:api:type:ResourceIdentifier">ResourceIdentifier</a> of a <a href="ctp:api:type:Payment">Payment</a>.</p>
2121
*
2222
2323
* @return null|PaymentResourceIdentifier

lib/commercetools-api/src/Models/Me/MyCartRemovePaymentActionBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ final class MyCartRemovePaymentActionBuilder implements Builder
2929
private $payment;
3030

3131
/**
32-
* <p><a href="ctp:api:type:ResourceIdentifier">ResourceIdentifier</a> to a <a href="ctp:api:type:Payment">Payment</a>.</p>
32+
* <p><a href="ctp:api:type:ResourceIdentifier">ResourceIdentifier</a> of a <a href="ctp:api:type:Payment">Payment</a>.</p>
3333
*
3434
3535
* @return null|PaymentResourceIdentifier

lib/commercetools-api/src/Models/Me/MyCartRemovePaymentActionModel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function getAction()
6565
}
6666

6767
/**
68-
* <p><a href="ctp:api:type:ResourceIdentifier">ResourceIdentifier</a> to a <a href="ctp:api:type:Payment">Payment</a>.</p>
68+
* <p><a href="ctp:api:type:ResourceIdentifier">ResourceIdentifier</a> of a <a href="ctp:api:type:Payment">Payment</a>.</p>
6969
*
7070
*
7171
* @return null|PaymentResourceIdentifier

lib/commercetools-api/src/Models/Me/MyPayment.php

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
namespace Commercetools\Api\Models\Me;
1010

11-
use Commercetools\Api\Models\Common\TypedMoney;
11+
use Commercetools\Api\Models\Common\CentPrecisionMoney;
1212
use Commercetools\Api\Models\Customer\CustomerReference;
1313
use Commercetools\Api\Models\Payment\PaymentMethodInfo;
1414
use Commercetools\Api\Models\Payment\TransactionCollection;
@@ -28,60 +28,65 @@ interface MyPayment extends JsonObject
2828
public const FIELD_CUSTOM = 'custom';
2929

3030
/**
31-
* <p>Unique identifier of the MyPayment.</p>
31+
* <p>Unique identifier of the Payment.</p>
3232
*
3333
3434
* @return null|string
3535
*/
3636
public function getId();
3737

3838
/**
39+
* <p>Current version of the Payment.</p>
40+
*
3941
4042
* @return null|int
4143
*/
4244
public function getVersion();
4345

4446
/**
45-
* <p>A reference to the customer this payment belongs to.</p>
47+
* <p>Reference to a <a href="ctp:api:type:Customer">Customer</a> associated with the Payment. Set automatically with a <a href="/../api/authorization#password-flow">password flow token</a>. Either <code>customer</code> or <code>anonymousId</code> is present.</p>
4648
*
4749
4850
* @return null|CustomerReference
4951
*/
5052
public function getCustomer();
5153

5254
/**
53-
* <p>Identifies payments belonging to an anonymous session (the customer has not signed up/in yet).</p>
55+
* <p><a href="/../api/authorization#tokens-for-anonymous-sessions">Anonymous session</a> associated with the Payment. Set automatically with a <a href="/../api/authorization#tokens-for-anonymous-sessions">token for an anonymous session</a>. Either <code>customer</code> or <code>anonymousId</code> is present.</p>
5456
*
5557
5658
* @return null|string
5759
*/
5860
public function getAnonymousId();
5961

6062
/**
61-
* <p>How much money this payment intends to receive from the customer.
62-
* The value usually matches the cart or order gross total.</p>
63+
* <p>Money value the Payment intends to receive from the customer.
64+
* The value typically matches the <a href="ctp:api:type:Cart">Cart</a> or <a href="ctp:api:type:Order">Order</a> gross total.</p>
6365
*
6466
65-
* @return null|TypedMoney
67+
* @return null|CentPrecisionMoney
6668
*/
6769
public function getAmountPlanned();
6870

6971
/**
72+
* <p>Information regarding the payment interface (for example, a PSP), and the specific payment method used.</p>
73+
*
7074
7175
* @return null|PaymentMethodInfo
7276
*/
7377
public function getPaymentMethodInfo();
7478

7579
/**
76-
* <p>A list of financial transactions of different TransactionTypes
77-
* with different TransactionStates.</p>
80+
* <p>Financial transactions of the Payment. Each Transaction has a <a href="ctp:api:type:TransactionType">TransactionType</a> and a <a href="ctp:api:type:TransactionState">TransactionState</a>.</p>
7881
*
7982
8083
* @return null|TransactionCollection
8184
*/
8285
public function getTransactions();
8386

8487
/**
88+
* <p>Custom Fields defined for the Payment.</p>
89+
*
8590
8691
* @return null|CustomFields
8792
*/
@@ -108,9 +113,9 @@ public function setCustomer(?CustomerReference $customer): void;
108113
public function setAnonymousId(?string $anonymousId): void;
109114

110115
/**
111-
* @param ?TypedMoney $amountPlanned
116+
* @param ?CentPrecisionMoney $amountPlanned
112117
*/
113-
public function setAmountPlanned(?TypedMoney $amountPlanned): void;
118+
public function setAmountPlanned(?CentPrecisionMoney $amountPlanned): void;
114119

115120
/**
116121
* @param ?PaymentMethodInfo $paymentMethodInfo

lib/commercetools-api/src/Models/Me/MyPaymentAddTransactionAction.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ interface MyPaymentAddTransactionAction extends MyPaymentUpdateAction
1717
public const FIELD_TRANSACTION = 'transaction';
1818

1919
/**
20+
* <p>Transaction to add to the Payment.</p>
21+
*
2022
2123
* @return null|TransactionDraft
2224
*/

0 commit comments

Comments
 (0)