ChargeSavedCard.php 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. <?php
  2. namespace HitPay\Response;
  3. /**
  4. * Class ChargeSavedCard
  5. * @package HitPay\Response
  6. */
  7. class ChargeSavedCard
  8. {
  9. /**
  10. * @var string
  11. */
  12. public $payment_id;
  13. /**
  14. * @var string
  15. */
  16. public $recurring_billing_id;
  17. /**
  18. * @var float
  19. */
  20. public $amount;
  21. /**
  22. * @var string
  23. */
  24. public $currency;
  25. /**
  26. * @var string
  27. */
  28. public $status;
  29. /**
  30. * ChargeSavedCard constructor.
  31. * @param \stdClass $result
  32. */
  33. public function __construct(\stdClass $result)
  34. {
  35. $this->setPaymentId($result->payment_id);
  36. $this->setRecurringBillingId($result->recurring_billing_id);
  37. $this->setAmount($result->amount);
  38. $this->setCurrency($result->currency);
  39. $this->setStatus($result->status);
  40. }
  41. /**
  42. * @return string
  43. */
  44. public function getPaymentId()
  45. {
  46. return $this->payment_id;
  47. }
  48. /**
  49. * @return string
  50. */
  51. public function getRecurringBillingId()
  52. {
  53. return $this->recurring_billing_id;
  54. }
  55. /**
  56. * @return float
  57. */
  58. public function getAmount()
  59. {
  60. return $this->amount;
  61. }
  62. /**
  63. * @return string
  64. */
  65. public function getCurrency()
  66. {
  67. return $this->currency;
  68. }
  69. /**
  70. * @return string
  71. */
  72. public function getStatus()
  73. {
  74. return $this->status;
  75. }
  76. /**
  77. * @param string $payment_id
  78. * @return ChargeSavedCard
  79. */
  80. public function setPaymentId($payment_id)
  81. {
  82. $this->payment_id = $payment_id;
  83. return $this;
  84. }
  85. /**
  86. * @param string $recurring_billing_id
  87. * @return ChargeSavedCard
  88. */
  89. public function setRecurringBillingId($recurring_billing_id)
  90. {
  91. $this->recurring_billing_id = $recurring_billing_id;
  92. return $this;
  93. }
  94. /**
  95. * @param float $amount
  96. * @return ChargeSavedCard
  97. */
  98. public function setAmount($amount)
  99. {
  100. $this->amount = $amount;
  101. return $this;
  102. }
  103. /**
  104. * @param string $currency
  105. * @return ChargeSavedCard
  106. */
  107. public function setCurrency($currency)
  108. {
  109. $this->currency = $currency;
  110. return $this;
  111. }
  112. /**
  113. * @param string $status
  114. * @return ChargeSavedCard
  115. */
  116. public function setStatus($status)
  117. {
  118. $this->status = $status;
  119. return $this;
  120. }
  121. }