RecurringBilling.php 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  1. <?php
  2. namespace HitPay\Request;
  3. /**
  4. * Class RecurringBilling - https://staging.hit-pay.com/docs.html?shell#recurring-billing
  5. *
  6. * @package HitPay\Request
  7. */
  8. class RecurringBilling
  9. {
  10. /**
  11. * Plan Id
  12. *
  13. * @var string
  14. */
  15. public $plan_id;
  16. /**
  17. * Customer email
  18. *
  19. * @var string
  20. */
  21. public $customer_email;
  22. /**
  23. * Customer name
  24. *
  25. * @var string
  26. */
  27. public $customer_name;
  28. /**
  29. * Billing start date (YYYY-MM-DD) in SGT
  30. *
  31. * @var null
  32. */
  33. public $start_date;
  34. /**
  35. * URL where hitpay redirects the user after the users enters the card details
  36. * and the subscription is active. Query arguments reference
  37.   * (subscription id) and  status are sent along
  38. *
  39. * @var string
  40. */
  41. public $redirect_url;
  42. /**
  43. * Arbitrary reference number that you can map to your internal reference number.
  44. * This value cannot be edited by the customer
  45. *
  46. * @var string
  47. */
  48. public $reference;
  49. /**
  50. * Amount related to the payment
  51. *
  52. * @var float
  53. */
  54. public $amount;
  55. /**
  56. * Optional URL value to which hitpay will send a POST request
  57. * when there is a new charge or if there is an error charging the card
  58. *
  59. * @var string
  60. */
  61. public $webhook;
  62. /**
  63. * Set the value “true” if you wish to save the card. More details in “Save Card” section
  64. *
  65. * @var string
  66. */
  67. public $save_card;
  68. /**
  69. * Number of times to charge the card
  70. *
  71. * @var string
  72. */
  73. public $times_to_be_charge;
  74. /**
  75. * Hitpay to send email receipts to the customer. Default value is false
  76. *
  77. * @var string
  78. */
  79. public $send_email;
  80. /**
  81. * @param float $plan_id
  82. * @return RecurringBIlling
  83. */
  84. public function setPlanId($plan_id)
  85. {
  86. $this->plan_id = $plan_id;
  87. return $this;
  88. }
  89. /**
  90. * @return string
  91. */
  92. public function getPlanId()
  93. {
  94. return $this->plan_id;
  95. }
  96. /**
  97. * @param float $customer_email
  98. * @return RecurringBIlling
  99. */
  100. public function setCustomerEmail($customer_email)
  101. {
  102. $this->customer_email = $customer_email;
  103. return $this;
  104. }
  105. /**
  106. * @return string
  107. */
  108. public function getCustomerEmail()
  109. {
  110. return $this->customer_email;
  111. }
  112. /**
  113. * @param float $amount
  114. * @return RecurringBIlling
  115. */
  116. public function setAmount($amount)
  117. {
  118. $this->amount = $amount;
  119. return $this;
  120. }
  121. /**
  122. * @return float
  123. */
  124. public function getAmount()
  125. {
  126. return $this->amount;
  127. }
  128. /**
  129. * @param string $start_date
  130. * @return RecurringBIlling
  131. */
  132. public function setStartDate($start_date)
  133. {
  134. $this->start_date = $start_date;
  135. return $this;
  136. }
  137. /**
  138. * @return string
  139. */
  140. public function getStartDate()
  141. {
  142. return $this->start_date;
  143. }
  144. /**
  145. * @param string $customer_name
  146. * @return RecurringBIlling
  147. */
  148. public function setCustomerName($customer_name)
  149. {
  150. $this->customer_name = $customer_name;
  151. return $this;
  152. }
  153. /**
  154. * @return string
  155. */
  156. public function getCustomerName()
  157. {
  158. return $this->customer_name;
  159. }
  160. /**
  161. * @param string $redirect_url
  162. * @return RecurringBIlling
  163. */
  164. public function setRedirectUrl($redirect_url)
  165. {
  166. $this->redirect_url = $redirect_url;
  167. return $this;
  168. }
  169. /**
  170. * @return string
  171. */
  172. public function getRedirectUrl()
  173. {
  174. return $this->redirect_url;
  175. }
  176. /**
  177. * @param string $webhook
  178. * @return RecurringBIlling
  179. */
  180. public function setWebhook($webhook)
  181. {
  182. $this->webhook = $webhook;
  183. return $this;
  184. }
  185. /**
  186. * @return string
  187. */
  188. public function getWebhook()
  189. {
  190. return $this->webhook;
  191. }
  192. /**
  193. * @param sring $save_card
  194. * @return RecurringBIlling
  195. */
  196. public function setSaveCard($save_card)
  197. {
  198. $this->save_card = $save_card;
  199. return $this;
  200. }
  201. /**
  202. * @return string
  203. */
  204. public function getSaveCard()
  205. {
  206. return $this->save_card;
  207. }
  208. /**
  209. * @param sring $times_to_be_charge
  210. * @return RecurringBIlling
  211. */
  212. public function setTimesToBeCharge($times_to_be_charge)
  213. {
  214. $this->times_to_be_charge = $times_to_be_charge;
  215. return $this;
  216. }
  217. /**
  218. * @return string
  219. */
  220. public function getTimesToBeCharge()
  221. {
  222. return $this->times_to_be_charge;
  223. }
  224. /**
  225. * @param sring $send_email
  226. * @return RecurringBIlling
  227. */
  228. public function setSendEmail($send_email)
  229. {
  230. $this->send_email = $send_email;
  231. return $this;
  232. }
  233. /**
  234. * @return string
  235. */
  236. public function getSendEmail()
  237. {
  238. return $this->send_email;
  239. }
  240. /**
  241. * @param string $reference
  242. * @return RecurringBIlling
  243. */
  244. public function setReference($reference)
  245. {
  246. $this->reference = $reference;
  247. return $this;
  248. }
  249. /**
  250. * @return string
  251. */
  252. public function getReference()
  253. {
  254. return $this->reference;
  255. }
  256. }