RecurringBilling.php 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617
  1. <?php
  2. namespace HitPay\Response;
  3. /**
  4. * Class RecurringBilling
  5. * @package HitPay\Response
  6. */
  7. class RecurringBilling
  8. {
  9. /**
  10. * @var string
  11. */
  12. public $id;
  13. /**
  14. * @var string
  15. */
  16. public $business_recurring_plans_id;
  17. /**
  18. * @var string
  19. */
  20. public $customer_name;
  21. /**
  22. * @var string
  23. */
  24. public $customer_email;
  25. /**
  26. * @var string
  27. */
  28. public $name;
  29. /**
  30. * @var string
  31. */
  32. public $description;
  33. /**
  34. * @var string
  35. */
  36. public $reference;
  37. /**
  38. * @var string
  39. */
  40. public $cycle;
  41. /**
  42. * @var string
  43. */
  44. public $cycle_repeat;
  45. /**
  46. * @var string
  47. */
  48. public $cycle_frequency;
  49. /**
  50. * @var float
  51. */
  52. public $amount;
  53. /**
  54. * @var string
  55. */
  56. public $currency;
  57. /**
  58. * @var string
  59. */
  60. public $created_at;
  61. /**
  62. * @var string
  63. */
  64. public $updated_at;
  65. /**
  66. * @var string
  67. */
  68. public $expires_at;
  69. /**
  70. * @var string
  71. */
  72. public $status;
  73. /**
  74. * @var array
  75. */
  76. public $payment_methods = array();
  77. /**
  78. * @var string
  79. */
  80. public $redirect_url;
  81. /**
  82. * @var string
  83. */
  84. public $url;
  85. /**
  86. * @var string
  87. */
  88. public $times_to_be_charged;
  89. /**
  90. * @var string
  91. */
  92. public $times_charged;
  93. /**
  94. * @var string
  95. */
  96. public $webhook;
  97. /**
  98. * @var string
  99. */
  100. public $save_card;
  101. /**
  102. * @var string
  103. */
  104. public $send_email;
  105. /**
  106. * RecurringBilling constructor.
  107. * @param \stdClass $result
  108. */
  109. public function __construct(\stdClass $result)
  110. {
  111. $this->setId($result->id);
  112. $this->setBusinessRecurringPlansId($result->business_recurring_plans_id);
  113. $this->setCustomerName($result->customer_name);
  114. $this->setCustomerEmail($result->customer_email);
  115. $this->setName($result->name);
  116. $this->setDescription($result->description);
  117. $this->setCycle($result->cycle);
  118. $this->setAmount($result->amount);
  119. $this->setCurrency($result->currency);
  120. $this->setStatus($result->status);
  121. $this->setTimesToBeCharged($result->times_to_be_charged);
  122. $this->setTimesCharged($result->times_charged);
  123. $this->setCreatedAt($result->created_at);
  124. $this->setUpdatedAt($result->updated_at);
  125. $this->setExpiresAt($result->expires_at);
  126. $this->setRedirectUrl($result->redirect_url);
  127. $this->setUrl($result->url);
  128. $this->setPaymentMethods($result->payment_methods);
  129. $this->setReference($result->reference);
  130. $this->setCycleRepeat($result->cycle_repeat);
  131. $this->setCycleFrequency($result->cycle_frequency);
  132. $this->setWebhook($result->webhook);
  133. $this->setSaveCard($result->save_card);
  134. $this->setSendEmail($result->send_email);
  135. }
  136. /**
  137. * @param string $id
  138. * @return RecurringBIlling
  139. */
  140. public function setId($id)
  141. {
  142. $this->id = $id;
  143. return $this;
  144. }
  145. /**
  146. * @return string
  147. */
  148. public function getId()
  149. {
  150. return $this->id;
  151. }
  152. /**
  153. * @param string $business_recurring_plans_id
  154. * @return RecurringBIlling
  155. */
  156. public function setBusinessRecurringPlansId($business_recurring_plans_id)
  157. {
  158. $this->business_recurring_plans_id = $business_recurring_plans_id;
  159. return $this;
  160. }
  161. /**
  162. * @return string
  163. */
  164. public function getBusinessRecurringPlansId()
  165. {
  166. return $this->business_recurring_plans_id;
  167. }
  168. /**
  169. * @param string $customer_name
  170. * @return RecurringBIlling
  171. */
  172. public function setCustomerName($customer_name)
  173. {
  174. $this->customer_name = $customer_name;
  175. return $this;
  176. }
  177. /**
  178. * @return string
  179. */
  180. public function getCustomerName()
  181. {
  182. return $this->customer_name;
  183. }
  184. /**
  185. * @param float $customer_email
  186. * @return RecurringBIlling
  187. */
  188. public function setCustomerEmail($customer_email)
  189. {
  190. $this->customer_email = $customer_email;
  191. return $this;
  192. }
  193. /**
  194. * @return string
  195. */
  196. public function getCustomerEmail()
  197. {
  198. return $this->customer_email;
  199. }
  200. /**
  201. * @param string $name
  202. * @return RecurringBIlling
  203. */
  204. public function setName($name)
  205. {
  206. $this->name = $name;
  207. return $this;
  208. }
  209. /**
  210. * @return string
  211. */
  212. public function getName()
  213. {
  214. return $this->name;
  215. }
  216. /**
  217. * @param string $description
  218. * @return RecurringBIlling
  219. */
  220. public function setDescription($description)
  221. {
  222. $this->description = $description;
  223. return $this;
  224. }
  225. /**
  226. * @return string
  227. */
  228. public function getDescription()
  229. {
  230. return $this->description;
  231. }
  232. /**
  233. * @param string $cycle
  234. * @return RecurringBIlling
  235. */
  236. public function setCycle($cycle)
  237. {
  238. $this->cycle = $cycle;
  239. }
  240. /**
  241. * @return int
  242. */
  243. public function getCycle()
  244. {
  245. return $this->cycle;
  246. }
  247. /**
  248. * @param string $currency
  249. * @return RecurringBIlling
  250. */
  251. public function setCurrency($currency)
  252. {
  253. $this->currency = $currency;
  254. return $this;
  255. }
  256. /**
  257. * @return string
  258. */
  259. public function getCurrency()
  260. {
  261. return $this->currency;
  262. }
  263. /**
  264. * @param float $amount
  265. * @return RecurringBIlling
  266. */
  267. public function setAmount($amount)
  268. {
  269. $this->amount = $amount;
  270. return $this;
  271. }
  272. /**
  273. * @return float
  274. */
  275. public function getAmount()
  276. {
  277. return $this->amount;
  278. }
  279. /**
  280. * @param string $times_to_be_charged
  281. * @return RecurringBIlling
  282. */
  283. public function setTimesToBeCharged($times_to_be_charged)
  284. {
  285. $this->times_to_be_charged = $times_to_be_charged;
  286. return $this;
  287. }
  288. /**
  289. * @return string
  290. */
  291. public function getTimesToBeCharged()
  292. {
  293. return $this->times_to_be_charged;
  294. }
  295. /**
  296. * @param string $times_charged
  297. * @return RecurringBIlling
  298. */
  299. public function setTimesCharged($times_charged)
  300. {
  301. $this->times_charged = $times_charged;
  302. return $this;
  303. }
  304. /**
  305. * @return string
  306. */
  307. public function getTimesCharged()
  308. {
  309. return $this->times_charged;
  310. }
  311. /**
  312. * @param string $status
  313. * @return RecurringBIlling
  314. */
  315. public function setStatus($status)
  316. {
  317. $this->status = $status;
  318. return $this;
  319. }
  320. /**
  321. * @return string
  322. */
  323. public function getStatus()
  324. {
  325. return $this->status;
  326. }
  327. /**
  328. * @param string $redirect_url
  329. * @return RecurringBIlling
  330. */
  331. public function setRedirectUrl($redirect_url)
  332. {
  333. $this->redirect_url = $redirect_url;
  334. return $this;
  335. }
  336. /**
  337. * @return string
  338. */
  339. public function getRedirectUrl()
  340. {
  341. return $this->redirect_url;
  342. }
  343. /**
  344. * @param array $payment_methods
  345. * @return RecurringBIlling
  346. */
  347. public function setPaymentMethods($payment_methods)
  348. {
  349. $this->payment_methods = $payment_methods;
  350. return $this;
  351. }
  352. /**
  353. * @return array
  354. */
  355. public function getPaymentMethods()
  356. {
  357. return $this->payment_methods;
  358. }
  359. /**
  360. * @param string $created_at
  361. * @return RecurringBIlling
  362. */
  363. public function setCreatedAt($created_at)
  364. {
  365. $this->created_at = $created_at;
  366. return $this;
  367. }
  368. /**
  369. * @return string
  370. */
  371. public function getCreatedAt()
  372. {
  373. return $this->created_at;
  374. }
  375. /**
  376. * @param string $updated_at
  377. * @return RecurringBIlling
  378. */
  379. public function setUpdatedAt($updated_at)
  380. {
  381. $this->updated_at = $updated_at;
  382. return $this;
  383. }
  384. /**
  385. * @return string
  386. */
  387. public function getUpdatedAt()
  388. {
  389. return $this->updated_at;
  390. }
  391. /**
  392. * @param string $expires_at
  393. * @return RecurringBIlling
  394. */
  395. public function setExpiresAt($expires_at)
  396. {
  397. $this->expires_at = $expires_at;
  398. return $this;
  399. }
  400. /**
  401. * @return string
  402. */
  403. public function getExpiresAt()
  404. {
  405. return $this->expires_at;
  406. }
  407. /**
  408. * @param string $url
  409. * @return RecurringBIlling
  410. */
  411. public function setUrl($url)
  412. {
  413. $this->url = $url;
  414. return $this;
  415. }
  416. /**
  417. * @return string
  418. */
  419. public function getUrl()
  420. {
  421. return $this->url;
  422. }
  423. /**
  424. * @return string
  425. */
  426. public function getReference()
  427. {
  428. return $this->reference;
  429. }
  430. /**
  431. * @param string $reference
  432. * @return RecurringBIlling
  433. */
  434. public function setReference($reference)
  435. {
  436. $this->reference = $reference;
  437. return $this;
  438. }
  439. /**
  440. * @return string
  441. */
  442. public function getCycleRepeat()
  443. {
  444. return $this->cycle_repeat;
  445. }
  446. /**
  447. * @return string
  448. */
  449. public function getCycleFrequency()
  450. {
  451. return $this->cycle_frequency;
  452. }
  453. /**
  454. * @param sring $cycle
  455. * @return RecurringBIlling
  456. */
  457. public function setCycleRepeat($cycle_repeat)
  458. {
  459. $this->cycle_repeat = $cycle_repeat;
  460. return $this;
  461. }
  462. /**
  463. * @param sring $cycle
  464. * @return RecurringBIlling
  465. */
  466. public function setCycleFrequency($cycle_frequency)
  467. {
  468. $this->cycle_frequency = $cycle_frequency;
  469. return $this;
  470. }
  471. /**
  472. * @param string $webhook
  473. * @return RecurringBIlling
  474. */
  475. public function setWebhook($webhook)
  476. {
  477. $this->webhook = $webhook;
  478. return $this;
  479. }
  480. /**
  481. * @return string
  482. */
  483. public function getWebhook()
  484. {
  485. return $this->webhook;
  486. }
  487. /**
  488. * @param sring $save_card
  489. * @return RecurringBIlling
  490. */
  491. public function setSaveCard($save_card)
  492. {
  493. $this->save_card = $save_card;
  494. return $this;
  495. }
  496. /**
  497. * @return string
  498. */
  499. public function getSaveCard()
  500. {
  501. return $this->save_card;
  502. }
  503. /**
  504. * @param sring $send_email
  505. * @return RecurringBIlling
  506. */
  507. public function setSendEmail($send_email)
  508. {
  509. $this->send_email = $send_email;
  510. return $this;
  511. }
  512. /**
  513. * @return string
  514. */
  515. public function getSendEmail()
  516. {
  517. return $this->send_email;
  518. }
  519. }