CreateSubscriptionPlan.php 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293
  1. <?php
  2. namespace HitPay\Response;
  3. /**
  4. * Class CreateSubscriptionPlan
  5. * @package HitPay\Response
  6. */
  7. class CreateSubscriptionPlan
  8. {
  9. /**
  10. * @var string
  11. */
  12. public $id;
  13. /**
  14. * @var string
  15. */
  16. public $name;
  17. /**
  18. * @var string
  19. */
  20. public $description;
  21. /**
  22. * @var string
  23. */
  24. public $cycle;
  25. /**
  26. * @var string
  27. */
  28. public $cycle_repeat;
  29. /**
  30. * @var string
  31. */
  32. public $cycle_frequency;
  33. /**
  34. * @var float
  35. */
  36. public $amount;
  37. /**
  38. * @var string
  39. */
  40. public $currency;
  41. /**
  42. * @var string
  43. */
  44. public $reference;
  45. /**
  46. * @var string
  47. */
  48. public $created_at;
  49. /**
  50. * @var string
  51. */
  52. public $updated_at;
  53. /**
  54. * CreateSubscriptionPlan constructor.
  55. * @param \stdClass $result
  56. */
  57. public function __construct(\stdClass $result)
  58. {
  59. $this->setId($result->id);
  60. $this->setName($result->name);
  61. $this->setDescription($result->description);
  62. $this->setCycle($result->cycle);
  63. $this->setAmount($result->amount);
  64. $this->setCurrency($result->currency);
  65. $this->setReference($result->reference);
  66. $this->setCreatedAt($result->created_at);
  67. $this->setUpdatedAt($result->updated_at);
  68. $this->setCycleRepeat($result->cycle_repeat);
  69. $this->setCycleFrequency($result->cycle_frequency);
  70. }
  71. /**
  72. * @return string
  73. */
  74. public function getId()
  75. {
  76. return $this->id;
  77. }
  78. /**
  79. * @return string
  80. */
  81. public function getName()
  82. {
  83. return $this->name;
  84. }
  85. /**
  86. * @return string
  87. */
  88. public function getDescription()
  89. {
  90. return $this->description;
  91. }
  92. /**
  93. * @return int
  94. */
  95. public function getCycle()
  96. {
  97. return $this->cycle;
  98. }
  99. /**
  100. * @return string
  101. */
  102. public function getCycleRepeat()
  103. {
  104. return $this->cycle_repeat;
  105. }
  106. /**
  107. * @return string
  108. */
  109. public function getCycleFrequency()
  110. {
  111. return $this->cycle_frequency;
  112. }
  113. /**
  114. * @return float
  115. */
  116. public function getAmount()
  117. {
  118. return $this->amount;
  119. }
  120. /**
  121. * @return string
  122. */
  123. public function getCurrency()
  124. {
  125. return $this->currency;
  126. }
  127. /**
  128. * @return string
  129. */
  130. public function getReference()
  131. {
  132. return $this->reference;
  133. }
  134. /**
  135. * @return string
  136. */
  137. public function getCreatedAt()
  138. {
  139. return $this->created_at;
  140. }
  141. /**
  142. * @return string
  143. */
  144. public function getUpdatedAt()
  145. {
  146. return $this->updated_at;
  147. }
  148. /**
  149. * @param string $id
  150. * @return CreateSubscriptionPlan
  151. */
  152. public function setId($id)
  153. {
  154. $this->id = $id;
  155. return $this;
  156. }
  157. /**
  158. * @param string $name
  159. * @return CreateSubscriptionPlan
  160. */
  161. public function setName($name)
  162. {
  163. $this->name = $name;
  164. return $this;
  165. }
  166. /**
  167. * @param string $description
  168. * @return CreateSubscriptionPlan
  169. */
  170. public function setDescription($description)
  171. {
  172. $this->description = $description;
  173. return $this;
  174. }
  175. /**
  176. * @param string $cycle
  177. * @return CreateSubscriptionPlan
  178. */
  179. public function setCycle($cycle)
  180. {
  181. $this->cycle = $cycle;
  182. return $this;
  183. }
  184. /**
  185. * @param sring $cycle
  186. * @return CreateSubscriptionPlan
  187. */
  188. public function setCycleRepeat($cycle_repeat)
  189. {
  190. $this->cycle_repeat = $cycle_repeat;
  191. return $this;
  192. }
  193. /**
  194. * @param sring $cycle
  195. * @return CreateSubscriptionPlan
  196. */
  197. public function setCycleFrequency($cycle_frequency)
  198. {
  199. $this->cycle_frequency = $cycle_frequency;
  200. return $this;
  201. }
  202. /**
  203. * @param float $amount
  204. * @return CreateSubscriptionPlan
  205. */
  206. public function setAmount($amount)
  207. {
  208. $this->amount = $amount;
  209. return $this;
  210. }
  211. /**
  212. * @param string $currency
  213. * @return CreateSubscriptionPlan
  214. */
  215. public function setCurrency($currency)
  216. {
  217. $this->currency = $currency;
  218. return $this;
  219. }
  220. /**
  221. * @param string $reference
  222. * @return CreateSubscriptionPlan
  223. */
  224. public function setReference($reference)
  225. {
  226. $this->reference = $reference;
  227. return $this;
  228. }
  229. /**
  230. * @param string $created_at
  231. * @return CreateSubscriptionPlan
  232. */
  233. public function setCreatedAt($created_at)
  234. {
  235. $this->created_at = $created_at;
  236. return $this;
  237. }
  238. /**
  239. * @param string $updated_at
  240. * @return CreateSubscriptionPlan
  241. */
  242. public function setUpdatedAt($updated_at)
  243. {
  244. $this->updated_at = $updated_at;
  245. return $this;
  246. }
  247. }