RequestInterface.php 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. <?php
  2. /**
  3. * This file is part of the Klarna KP module
  4. *
  5. * (c) Klarna Bank AB (publ)
  6. *
  7. * For the full copyright and license information, please view the NOTICE
  8. * and LICENSE files that were distributed with this source code.
  9. */
  10. namespace Klarna\Kp\Api\Data;
  11. /**
  12. * Interface RequestInterface
  13. *
  14. * @package Klarna\Kp\Api\Data
  15. */
  16. interface RequestInterface extends ApiObjectInterface
  17. {
  18. /**
  19. * Used for storing merchant's internal order number or other reference (max 255 characters).
  20. *
  21. * @param string $reference
  22. */
  23. public function setMerchantReference1($reference);
  24. /**
  25. * Used for storing merchant's internal order number or other reference (max 255 characters).
  26. *
  27. * @param string $reference
  28. */
  29. public function setMerchantReference2($reference);
  30. /**
  31. * @param OptionsInterface $options
  32. */
  33. public function setOptions(OptionsInterface $options);
  34. /**
  35. * Information about the liable customer of the order.
  36. *
  37. * @param CustomerInterface $customer
  38. */
  39. public function setCustomer(CustomerInterface $customer);
  40. /**
  41. * @param UrlsInterface $urls
  42. */
  43. public function setMerchantUrls(UrlsInterface $urls);
  44. /**
  45. * ISO 3166 alpha-2: Purchase country
  46. *
  47. * @param string $purchaseCountry
  48. */
  49. public function setPurchaseCountry($purchaseCountry);
  50. /**
  51. * ISO 4217: Purchase currency.
  52. *
  53. * @param string $purchaseCurrency
  54. */
  55. public function setPurchaseCurrency($purchaseCurrency);
  56. /**
  57. * RFC 1766: Customer's locale.
  58. *
  59. * @param string $locale
  60. */
  61. public function setLocale($locale);
  62. /**
  63. * The billing address.
  64. *
  65. * @param AddressInterface $billingAddress
  66. */
  67. public function setBillingAddress(AddressInterface $billingAddress);
  68. /**
  69. * The shipping address.
  70. *
  71. * @param AddressInterface $shippingAddress
  72. */
  73. public function setShippingAddress(AddressInterface $shippingAddress);
  74. /**
  75. * The total tax amount of the order. Implicit decimal (eg 1000 instead of 10.00)
  76. *
  77. * @param int $orderTaxAmount
  78. */
  79. public function setOrderTaxAmount($orderTaxAmount);
  80. /**
  81. * The applicable order lines.
  82. *
  83. * @param array|OrderlineInterface[] $orderlines
  84. */
  85. public function setOrderLines(array $orderlines);
  86. /**
  87. * Add an orderline to the request.
  88. *
  89. * @param OrderlineInterface $orderline
  90. */
  91. public function addOrderLine(OrderlineInterface $orderline);
  92. /**
  93. * Container for optional merchant specific data.
  94. *
  95. * @param AttachmentInterface $attachment
  96. */
  97. public function setAttachment(AttachmentInterface $attachment);
  98. /**
  99. * Total amount of the order, including tax and any discounts. Implicit decimal (eg 1000 instead of 10.00)
  100. *
  101. * @param int $orderAmount
  102. */
  103. public function setOrderAmount($orderAmount);
  104. /**
  105. * Used to load a specific design for the credit form
  106. *
  107. * @param string $design
  108. */
  109. public function setDesign($design);
  110. /**
  111. * An optional list of merchant triggered payment methods
  112. *
  113. * @param array $paymentMethods
  114. */
  115. public function setCustomPaymentMethods(array $paymentMethods);
  116. /**
  117. * Add a merchant triggered payment method to request
  118. *
  119. * @param string $paymentMethod
  120. */
  121. public function addCustomPaymentMethods($paymentMethod);
  122. }