UpdateRecurringBilling.php 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368
  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 UpdateRecurringBilling
  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. * Hitpay to send email receipts to the customer. Default value is false
  64. *
  65. * @var string
  66. */
  67. public $send_email;
  68. /**
  69. * Billing frequency (weekly / monthly / yearly /custom)
  70. *
  71. * @var string
  72. */
  73. public $cycle;
  74. /**
  75. * This field is only applicable when cycle = custom] It's the number of times the cycle will repeat.
  76. *
  77. * @var string
  78. */
  79. public $cycle_repeat;
  80. /**
  81. * This field is only applicable when cycle = custom] It's the frequency of the cycle [day / week / month / year
  82. *
  83. * @var string
  84. */
  85. public $cycle_frequency;
  86. /**
  87. * @param float $plan_id
  88. * @return UpdateRecurringBilling
  89. */
  90. public function setPlanId($plan_id)
  91. {
  92. $this->plan_id = $plan_id;
  93. return $this;
  94. }
  95. /**
  96. * @return string
  97. */
  98. public function getPlanId()
  99. {
  100. return $this->plan_id;
  101. }
  102. /**
  103. * @param float $customer_email
  104. * @return UpdateRecurringBilling
  105. */
  106. public function setCustomerEmail($customer_email)
  107. {
  108. $this->customer_email = $customer_email;
  109. return $this;
  110. }
  111. /**
  112. * @return string
  113. */
  114. public function getCustomerEmail()
  115. {
  116. return $this->customer_email;
  117. }
  118. /**
  119. * @param float $amount
  120. * @return UpdateRecurringBilling
  121. */
  122. public function setAmount($amount)
  123. {
  124. $this->amount = $amount;
  125. return $this;
  126. }
  127. /**
  128. * @return float
  129. */
  130. public function getAmount()
  131. {
  132. return $this->amount;
  133. }
  134. /**
  135. * @param string $start_date
  136. * @return UpdateRecurringBilling
  137. */
  138. public function setStartDate($start_date)
  139. {
  140. $this->start_date = $start_date;
  141. return $this;
  142. }
  143. /**
  144. * @return string
  145. */
  146. public function getStartDate()
  147. {
  148. return $this->start_date;
  149. }
  150. /**
  151. * @param string $customer_name
  152. * @return UpdateRecurringBilling
  153. */
  154. public function setCustomerName($customer_name)
  155. {
  156. $this->customer_name = $customer_name;
  157. return $this;
  158. }
  159. /**
  160. * @return string
  161. */
  162. public function getCustomerName()
  163. {
  164. return $this->customer_name;
  165. }
  166. /**
  167. * @param string $redirect_url
  168. * @return UpdateRecurringBilling
  169. */
  170. public function setRedirectUrl($redirect_url)
  171. {
  172. $this->redirect_url = $redirect_url;
  173. return $this;
  174. }
  175. /**
  176. * @return string
  177. */
  178. public function getRedirectUrl()
  179. {
  180. return $this->redirect_url;
  181. }
  182. /**
  183. * @param string $webhook
  184. * @return UpdateRecurringBilling
  185. */
  186. public function setWebhook($webhook)
  187. {
  188. $this->webhook = $webhook;
  189. return $this;
  190. }
  191. /**
  192. * @return string
  193. */
  194. public function getWebhook()
  195. {
  196. return $this->webhook;
  197. }
  198. /**
  199. * @param sring $save_card
  200. * @return UpdateRecurringBilling
  201. */
  202. public function setSaveCard($save_card)
  203. {
  204. $this->save_card = $save_card;
  205. return $this;
  206. }
  207. /**
  208. * @return string
  209. */
  210. public function getSaveCard()
  211. {
  212. return $this->save_card;
  213. }
  214. /**
  215. * @param sring $times_to_be_charge
  216. * @return UpdateRecurringBilling
  217. */
  218. public function setTimesToBeCharge($times_to_be_charge)
  219. {
  220. $this->times_to_be_charge = $times_to_be_charge;
  221. return $this;
  222. }
  223. /**
  224. * @return string
  225. */
  226. public function getTimesToBeCharge()
  227. {
  228. return $this->times_to_be_charge;
  229. }
  230. /**
  231. * @param sring $send_email
  232. * @return UpdateRecurringBilling
  233. */
  234. public function setSendEmail($send_email)
  235. {
  236. $this->send_email = $send_email;
  237. return $this;
  238. }
  239. /**
  240. * @return string
  241. */
  242. public function getSendEmail()
  243. {
  244. return $this->send_email;
  245. }
  246. /**
  247. * @param string $reference
  248. * @return UpdateRecurringBilling
  249. */
  250. public function setReference($reference)
  251. {
  252. $this->reference = $reference;
  253. return $this;
  254. }
  255. /**
  256. * @return string
  257. */
  258. public function getReference()
  259. {
  260. return $this->reference;
  261. }
  262. /**
  263. * @return string
  264. */
  265. public function getCycle()
  266. {
  267. return $this->cycle;
  268. }
  269. /**
  270. * @return string
  271. */
  272. public function getCycleRepeat()
  273. {
  274. return $this->cycle_repeat;
  275. }
  276. /**
  277. * @return string
  278. */
  279. public function getCycleFrequency()
  280. {
  281. return $this->cycle_frequency;
  282. }
  283. /**
  284. * @param sring $cycle
  285. * @return UpdateRecurringBilling
  286. */
  287. public function setCycle($cycle)
  288. {
  289. $this->cycle = $cycle;
  290. return $this;
  291. }
  292. /**
  293. * @param sring $cycle
  294. * @return UpdateRecurringBilling
  295. */
  296. public function setCycleRepeat($cycle_repeat)
  297. {
  298. $this->cycle_repeat = $cycle_repeat;
  299. return $this;
  300. }
  301. /**
  302. * @param sring $cycle
  303. * @return UpdateRecurringBilling
  304. */
  305. public function setCycleFrequency($cycle_frequency)
  306. {
  307. $this->cycle_frequency = $cycle_frequency;
  308. return $this;
  309. }
  310. }