1 <?php
2
3 namespace PayPal\Api;
4
5 use PayPal\Common\PayPalModel;
6
7 /**
8 * Class CreditCardToken
9 *
10 * A resource representing a credit card that can be used to fund a payment.
11 *
12 * @package PayPal\Api
13 *
14 * @property string credit_card_id
15 * @property string payer_id
16 * @property string last4
17 * @property string type
18 * @property int expire_month
19 * @property int expire_year
20 */
21 class CreditCardToken extends PayPalModel
22 {
23 /**
24 * ID of credit card previously stored using `/vault/credit-card`.
25 *
26 * @param string $credit_card_id
27 *
28 * @return $this
29 */
30 public function setCreditCardId($credit_card_id)
31 {
32 $this->credit_card_id = $credit_card_id;
33 return $this;
34 }
35
36 /**
37 * ID of credit card previously stored using `/vault/credit-card`.
38 *
39 * @return string
40 */
41 public function getCreditCardId()
42 {
43 return $this->credit_card_id;
44 }
45
46 /**
47 * A unique identifier that you can assign and track when storing a credit card or using a stored credit card. This ID can help to avoid unintentional use or misuse of credit cards. This ID can be any value you would like to associate with the saved card, such as a UUID, username, or email address. **Required when using a stored credit card if a payer_id was originally provided when storing the credit card in vault.**
48 *
49 * @param string $payer_id
50 *
51 * @return $this
52 */
53 public function setPayerId($payer_id)
54 {
55 $this->payer_id = $payer_id;
56 return $this;
57 }
58
59 /**
60 * A unique identifier that you can assign and track when storing a credit card or using a stored credit card. This ID can help to avoid unintentional use or misuse of credit cards. This ID can be any value you would like to associate with the saved card, such as a UUID, username, or email address. **Required when using a stored credit card if a payer_id was originally provided when storing the credit card in vault.**
61 *
62 * @return string
63 */
64 public function getPayerId()
65 {
66 return $this->payer_id;
67 }
68
69 /**
70 * Last four digits of the stored credit card number.
71 *
72 * @param string $last4
73 *
74 * @return $this
75 */
76 public function setLast4($last4)
77 {
78 $this->last4 = $last4;
79 return $this;
80 }
81
82 /**
83 * Last four digits of the stored credit card number.
84 *
85 * @return string
86 */
87 public function getLast4()
88 {
89 return $this->last4;
90 }
91
92 /**
93 * Credit card type. Valid types are: `visa`, `mastercard`, `discover`, `amex`. Values are presented in lowercase and not should not be used for display.
94 *
95 * @param string $type
96 *
97 * @return $this
98 */
99 public function setType($type)
100 {
101 $this->type = $type;
102 return $this;
103 }
104
105 /**
106 * Credit card type. Valid types are: `visa`, `mastercard`, `discover`, `amex`. Values are presented in lowercase and not should not be used for display.
107 *
108 * @return string
109 */
110 public function getType()
111 {
112 return $this->type;
113 }
114
115 /**
116 * Expiration month with no leading zero. Acceptable values are 1 through 12.
117 *
118 * @param int $expire_month
119 *
120 * @return $this
121 */
122 public function setExpireMonth($expire_month)
123 {
124 $this->expire_month = $expire_month;
125 return $this;
126 }
127
128 /**
129 * Expiration month with no leading zero. Acceptable values are 1 through 12.
130 *
131 * @return int
132 */
133 public function getExpireMonth()
134 {
135 return $this->expire_month;
136 }
137
138 /**
139 * 4-digit expiration year.
140 *
141 * @param int $expire_year
142 *
143 * @return $this
144 */
145 public function setExpireYear($expire_year)
146 {
147 $this->expire_year = $expire_year;
148 return $this;
149 }
150
151 /**
152 * 4-digit expiration year.
153 *
154 * @return int
155 */
156 public function getExpireYear()
157 {
158 return $this->expire_year;
159 }
160
161 }
162