SaveCheckoutCartInput.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. namespace Webkul\BagistoApi\Dto;
  3. use ApiPlatform\Metadata\ApiProperty;
  4. use Symfony\Component\Serializer\Annotation\Groups;
  5. use Symfony\Component\Serializer\Annotation\SerializedName;
  6. /**
  7. * SaveCheckoutCartInput - GraphQL Input DTO for saving checkout selections.
  8. *
  9. * All fields are optional. Any field whose value equals the sentinel "-1" is
  10. * left untouched, so the frontend can selectively update only the fields it
  11. * cares about. Authentication token is passed via Authorization: Bearer header,
  12. * NOT as an input parameter.
  13. */
  14. class SaveCheckoutCartInput
  15. {
  16. #[Groups(['mutation'])]
  17. #[ApiProperty(description: 'Shipping method code. Pass "-1" to leave unchanged.')]
  18. #[SerializedName('shippingMethod')]
  19. public ?string $shippingMethod = null;
  20. #[Groups(['mutation'])]
  21. #[ApiProperty(description: 'Coupon code. Pass "-1" to leave unchanged, empty string to remove the applied coupon.')]
  22. #[SerializedName('couponCode')]
  23. public ?string $couponCode = null;
  24. #[Groups(['mutation'])]
  25. #[ApiProperty(description: 'Payment method code. Pass "-1" to leave unchanged.')]
  26. #[SerializedName('paymentMethod')]
  27. public ?string $paymentMethod = null;
  28. #[Groups(['mutation'])]
  29. #[ApiProperty(description: 'Gift Card Number. Pass "-1" to leave unchanged.')]
  30. #[SerializedName('giftCardNumber')]
  31. public ?string $giftCardNumber = null;
  32. #[Groups(['mutation'])]
  33. #[ApiProperty(description: 'Member discount toggle. Pass "-1" to leave unchanged, "1" to apply, empty string to remove.')]
  34. #[SerializedName('memberDiscount')]
  35. public ?string $memberDiscount = null;
  36. }