[ApiBundle] Add normalization group to payment complete endpoint

This commit is contained in:
Wojdylak 2024-03-11 13:42:20 +01:00 committed by Grzegorz Sadowski
parent c33d0957cc
commit e786fb486a
No known key found for this signature in database
GPG key ID: EF87FF4E6E3BD364
3 changed files with 11 additions and 5 deletions

View file

@ -69,6 +69,12 @@
<attribute name="openapi_context">
<attribute name="summary">Completes Payment.</attribute>
</attribute>
<attribute name="normalization_context">
<attribute name="groups">
<attribute>shop:payment:show</attribute>
<attribute>sylius:shop:payment:show</attribute>
</attribute>
</attribute>
</itemOperation>
</itemOperations>

View file

@ -27,10 +27,6 @@
<cascade>
<cascade-all/>
</cascade>
<order-by>
<order-by-field name="id" />
</order-by>
</one-to-many>
<field name="currencyCode" column="currency_code" length="3" type="string" />

View file

@ -4,7 +4,11 @@
"@type": "Payment",
"order": "\/api\/v2\/admin\/orders\/nAWw2jewpA",
"id": @integer@,
"method": "\/api\/v2\/admin\/payment-methods\/CASH_ON_DELIVERY",
"method": {
"@id": "\/api\/v2\/admin\/payment-methods\/CASH_ON_DELIVERY",
"@type": "PaymentMethod",
"name": "Cash on delivery"
},
"currencyCode": "USD",
"amount": 6500,
"state": "completed",