1 <?php
2
3 namespace PayPal\Api;
4
5 use PayPal\Common\PayPalModel;
6
7 /**
8 * Class PaymentDetail
9 *
10 * Invoicing payment information.
11 *
12 * @package PayPal\Api
13 *
14 * @property string type
15 * @property string transaction_id
16 * @property string transaction_type
17 * @property string date
18 * @property string method
19 * @property string note
20 * @property \PayPal\Api\Currency amount
21 */
22 class PaymentDetail extends PayPalModel
23 {
24 /**
25 * The PayPal payment detail. Indicates whether payment was made in an invoicing flow through PayPal or externally. In the case of the mark-as-paid API, the supported payment type is `EXTERNAL`. For backward compatibility, the `PAYPAL` payment type is still supported.
26 * Valid Values: ["PAYPAL", "EXTERNAL"]
27 *
28 * @param string $type
29 *
30 * @return $this
31 */
32 public function setType($type)
33 {
34 $this->type = $type;
35 return $this;
36 }
37
38 /**
39 * The PayPal payment detail. Indicates whether payment was made in an invoicing flow through PayPal or externally. In the case of the mark-as-paid API, the supported payment type is `EXTERNAL`. For backward compatibility, the `PAYPAL` payment type is still supported.
40 *
41 * @return string
42 */
43 public function getType()
44 {
45 return $this->type;
46 }
47
48 /**
49 * The PayPal payment transaction ID. Required with the `PAYPAL` payment type.
50 *
51 * @param string $transaction_id
52 *
53 * @return $this
54 */
55 public function setTransactionId($transaction_id)
56 {
57 $this->transaction_id = $transaction_id;
58 return $this;
59 }
60
61 /**
62 * The PayPal payment transaction ID. Required with the `PAYPAL` payment type.
63 *
64 * @return string
65 */
66 public function getTransactionId()
67 {
68 return $this->transaction_id;
69 }
70
71 /**
72 * Type of the transaction.
73 * Valid Values: ["SALE", "AUTHORIZATION", "CAPTURE"]
74 *
75 * @param string $transaction_type
76 *
77 * @return $this
78 */
79 public function setTransactionType($transaction_type)
80 {
81 $this->transaction_type = $transaction_type;
82 return $this;
83 }
84
85 /**
86 * Type of the transaction.
87 *
88 * @return string
89 */
90 public function getTransactionType()
91 {
92 return $this->transaction_type;
93 }
94
95 /**
96 * The date when the invoice was paid. The date format is *yyyy*-*MM*-*dd* *z* as defined in [Internet Date/Time Format](http://tools.ietf.org/html/rfc3339#section-5.6).
97 *
98 * @param string $date
99 *
100 * @return $this
101 */
102 public function setDate($date)
103 {
104 $this->date = $date;
105 return $this;
106 }
107
108 /**
109 * The date when the invoice was paid. The date format is *yyyy*-*MM*-*dd* *z* as defined in [Internet Date/Time Format](http://tools.ietf.org/html/rfc3339#section-5.6).
110 *
111 * @return string
112 */
113 public function getDate()
114 {
115 return $this->date;
116 }
117
118 /**
119 * The payment mode or method. Required with the `EXTERNAL` payment type.
120 * Valid Values: ["BANK_TRANSFER", "CASH", "CHECK", "CREDIT_CARD", "DEBIT_CARD", "PAYPAL", "WIRE_TRANSFER", "OTHER"]
121 *
122 * @param string $method
123 *
124 * @return $this
125 */
126 public function setMethod($method)
127 {
128 $this->method = $method;
129 return $this;
130 }
131
132 /**
133 * The payment mode or method. Required with the `EXTERNAL` payment type.
134 *
135 * @return string
136 */
137 public function getMethod()
138 {
139 return $this->method;
140 }
141
142 /**
143 * Optional. A note associated with the payment.
144 *
145 * @param string $note
146 *
147 * @return $this
148 */
149 public function setNote($note)
150 {
151 $this->note = $note;
152 return $this;
153 }
154
155 /**
156 * Optional. A note associated with the payment.
157 *
158 * @return string
159 */
160 public function getNote()
161 {
162 return $this->note;
163 }
164
165 /**
166 * The amount to record as payment against invoice. If you omit this parameter, the total invoice amount is recorded as payment.
167 *
168 * @param \PayPal\Api\Currency $amount
169 *
170 * @return $this
171 */
172 public function setAmount($amount)
173 {
174 $this->amount = $amount;
175 return $this;
176 }
177
178 /**
179 * The amount to record as payment against invoice. If you omit this parameter, the total invoice amount is recorded as payment.
180 *
181 * @return \PayPal\Api\Currency
182 */
183 public function getAmount()
184 {
185 return $this->amount;
186 }
187
188 }
189