CreatePayment.php 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540
  1. <?php
  2. namespace HitPay\Response;
  3. /**
  4. * Class CreatePayment
  5. * @package HitPay\Response
  6. */
  7. class CreatePayment
  8. {
  9. /**
  10. * @var string
  11. */
  12. public $id;
  13. /**
  14. * @var string
  15. */
  16. public $name;
  17. /**
  18. * @var string
  19. */
  20. public $email;
  21. /**
  22. * @var int
  23. */
  24. public $phone;
  25. /**
  26. * @var float
  27. */
  28. public $amount;
  29. /**
  30. * @var string
  31. */
  32. public $currency;
  33. /**
  34. * @var string
  35. */
  36. public $status;
  37. /**
  38. * @var string
  39. */
  40. public $purpose;
  41. /**
  42. * @var string
  43. */
  44. public $reference_number;
  45. /**
  46. * @var array
  47. */
  48. public $payment_methods = array();
  49. /**
  50. * @var string
  51. */
  52. public $url;
  53. /**
  54. * @var string
  55. */
  56. public $redirect_url;
  57. /**
  58. * @var string
  59. */
  60. public $webhook;
  61. /**
  62. * @var int
  63. */
  64. public $send_sms;
  65. /**
  66. * @var int
  67. */
  68. public $send_email;
  69. /**
  70. * @var string
  71. */
  72. public $sms_status;
  73. /**
  74. * @var string
  75. */
  76. public $email_status;
  77. /**
  78. * @var string
  79. */
  80. public $allow_repeated_payments;
  81. /**
  82. * @var string
  83. */
  84. public $expiry_date;
  85. /**
  86. * @var string
  87. */
  88. public $created_at;
  89. /**
  90. * @var string
  91. */
  92. public $updated_at;
  93. /**
  94. * CreatePayment constructor.
  95. * @param \stdClass $result
  96. */
  97. public function __construct(\stdClass $result)
  98. {
  99. $this->setId($result->id);
  100. $this->setName($result->name);
  101. $this->setEmail($result->email);
  102. $this->setPhone($result->phone);
  103. $this->setAmount($result->amount);
  104. $this->setCurrency($result->currency);
  105. $this->setStatus($result->status);
  106. $this->setPurpose($result->purpose);
  107. $this->setReferenceNumber($result->reference_number);
  108. $this->setPaymentMethods($result->payment_methods);
  109. $this->setUrl($result->url);
  110. $this->setRedirectUrl($result->redirect_url);
  111. $this->setWebhook($result->webhook);
  112. $this->setSendSms($result->send_sms);
  113. $this->setSendEmail($result->send_email);
  114. $this->setSmsStatus($result->sms_status);
  115. $this->setEmailStatus($result->email_status);
  116. $this->setAllowRepeatedPayments($result->allow_repeated_payments);
  117. $this->setExpiryDate($result->expiry_date);
  118. $this->setCreatedAt($result->created_at);
  119. $this->setUpdatedAt($result->updated_at);
  120. }
  121. /**
  122. * @return string
  123. */
  124. public function getId()
  125. {
  126. return $this->id;
  127. }
  128. /**
  129. * @return string
  130. */
  131. public function getName()
  132. {
  133. return $this->name;
  134. }
  135. /**
  136. * @return string
  137. */
  138. public function getEmail()
  139. {
  140. return $this->email;
  141. }
  142. /**
  143. * @return int
  144. */
  145. public function getPhone()
  146. {
  147. return $this->phone;
  148. }
  149. /**
  150. * @return float
  151. */
  152. public function getAmount()
  153. {
  154. return $this->amount;
  155. }
  156. /**
  157. * @return string
  158. */
  159. public function getCurrency()
  160. {
  161. return $this->currency;
  162. }
  163. /**
  164. * @return string
  165. */
  166. public function getStatus()
  167. {
  168. return $this->status;
  169. }
  170. /**
  171. * @return string
  172. */
  173. public function getPurpose()
  174. {
  175. return $this->purpose;
  176. }
  177. /**
  178. * @return string
  179. */
  180. public function getReferenceNumber()
  181. {
  182. return $this->reference_number;
  183. }
  184. /**
  185. * @return array
  186. */
  187. public function getPaymentMethods()
  188. {
  189. return $this->payment_methods;
  190. }
  191. /**
  192. * @return string
  193. */
  194. public function getUrl()
  195. {
  196. return $this->url;
  197. }
  198. /**
  199. * @return string
  200. */
  201. public function getRedirectUrl()
  202. {
  203. return $this->redirect_url;
  204. }
  205. /**
  206. * @return string
  207. */
  208. public function getWebhook()
  209. {
  210. return $this->webhook;
  211. }
  212. /**
  213. * @return int
  214. */
  215. public function getSendSms()
  216. {
  217. return $this->send_sms;
  218. }
  219. /**
  220. * @return int
  221. */
  222. public function getSendEmail()
  223. {
  224. return $this->send_email;
  225. }
  226. /**
  227. * @return string
  228. */
  229. public function getSmsStatus()
  230. {
  231. return $this->sms_status;
  232. }
  233. /**
  234. * @return string
  235. */
  236. public function getEmailStatus()
  237. {
  238. return $this->email_status;
  239. }
  240. /**
  241. * @return string
  242. */
  243. public function getAllowRepeatedPayments()
  244. {
  245. return $this->allow_repeated_payments;
  246. }
  247. /**
  248. * @return string
  249. */
  250. public function getExpiryDate()
  251. {
  252. return $this->expiry_date;
  253. }
  254. /**
  255. * @return string
  256. */
  257. public function getCreatedAt()
  258. {
  259. return $this->created_at;
  260. }
  261. /**
  262. * @return string
  263. */
  264. public function getUpdatedAt()
  265. {
  266. return $this->updated_at;
  267. }
  268. /**
  269. * @param string $id
  270. * @return CreatePayment
  271. */
  272. public function setId($id)
  273. {
  274. $this->id = $id;
  275. return $this;
  276. }
  277. /**
  278. * @param string $name
  279. * @return CreatePayment
  280. */
  281. public function setName($name)
  282. {
  283. $this->name = $name;
  284. return $this;
  285. }
  286. /**
  287. * @param string $email
  288. * @return CreatePayment
  289. */
  290. public function setEmail($email)
  291. {
  292. $this->email = $email;
  293. return $this;
  294. }
  295. /**
  296. * @param int $phone
  297. */
  298. public function setPhone($phone)
  299. {
  300. $this->phone = $phone;
  301. }
  302. /**
  303. * @param float $amount
  304. * @return CreatePayment
  305. */
  306. public function setAmount($amount)
  307. {
  308. $this->amount = $amount;
  309. return $this;
  310. }
  311. /**
  312. * @param string $currency
  313. * @return CreatePayment
  314. */
  315. public function setCurrency($currency)
  316. {
  317. $this->currency = $currency;
  318. return $this;
  319. }
  320. /**
  321. * @param string $status
  322. * @return CreatePayment
  323. */
  324. public function setStatus($status)
  325. {
  326. $this->status = $status;
  327. return $this;
  328. }
  329. /**
  330. * @param string $purpose
  331. * @return CreatePayment
  332. */
  333. public function setPurpose($purpose)
  334. {
  335. $this->purpose = $purpose;
  336. return $this;
  337. }
  338. /**
  339. * @param string $reference_number
  340. * @return CreatePayment
  341. */
  342. public function setReferenceNumber($reference_number)
  343. {
  344. $this->reference_number = $reference_number;
  345. return $this;
  346. }
  347. /**
  348. * @param array $payment_methods
  349. * @return CreatePayment
  350. */
  351. public function setPaymentMethods($payment_methods)
  352. {
  353. $this->payment_methods = $payment_methods;
  354. return $this;
  355. }
  356. /**
  357. * @param string $url
  358. * @return CreatePayment
  359. */
  360. public function setUrl($url)
  361. {
  362. $this->url = $url;
  363. return $this;
  364. }
  365. /**
  366. * @param string $redirect_url
  367. * @return CreatePayment
  368. */
  369. public function setRedirectUrl($redirect_url)
  370. {
  371. $this->redirect_url = $redirect_url;
  372. return $this;
  373. }
  374. /**
  375. * @param string $webhook
  376. * @return CreatePayment
  377. */
  378. public function setWebhook($webhook)
  379. {
  380. $this->webhook = $webhook;
  381. return $this;
  382. }
  383. /**
  384. * @param int $send_sms
  385. * @return CreatePayment
  386. */
  387. public function setSendSms($send_sms)
  388. {
  389. $this->send_sms = $send_sms;
  390. return $this;
  391. }
  392. /**
  393. * @param int $send_email
  394. * @return CreatePayment
  395. */
  396. public function setSendEmail($send_email)
  397. {
  398. $this->send_email = $send_email;
  399. return $this;
  400. }
  401. /**
  402. * @param string $sms_status
  403. * @return CreatePayment
  404. */
  405. public function setSmsStatus($sms_status)
  406. {
  407. $this->sms_status = $sms_status;
  408. return $this;
  409. }
  410. /**
  411. * @param string $email_status
  412. * @return CreatePayment
  413. */
  414. public function setEmailStatus($email_status)
  415. {
  416. $this->email_status = $email_status;
  417. return $this;
  418. }
  419. /**
  420. * @param string $allow_repeated_payments
  421. * @return CreatePayment
  422. */
  423. public function setAllowRepeatedPayments($allow_repeated_payments)
  424. {
  425. $this->allow_repeated_payments = $allow_repeated_payments;
  426. return $this;
  427. }
  428. /**
  429. * @param string $expiry_date
  430. * @return CreatePayment
  431. */
  432. public function setExpiryDate($expiry_date)
  433. {
  434. $this->expiry_date = $expiry_date;
  435. return $this;
  436. }
  437. /**
  438. * @param string $created_at
  439. * @return CreatePayment
  440. */
  441. public function setCreatedAt($created_at)
  442. {
  443. $this->created_at = $created_at;
  444. return $this;
  445. }
  446. /**
  447. * @param string $updated_at
  448. * @return CreatePayment
  449. */
  450. public function setUpdatedAt($updated_at)
  451. {
  452. $this->updated_at = $updated_at;
  453. return $this;
  454. }
  455. }