Open Journal Systems  3.3.0
vendor/omnipay/paypal/src/Message/RestSearchTransactionRequest.php
1 <?php
6 namespace Omnipay\PayPal\Message;
7 
107 class RestSearchTransactionRequest extends AbstractRestRequest
108 {
114  public function getAgreementId()
115  {
116  return $this->getParameter('agreementId');
117  }
118 
125  public function setAgreementId($value)
126  {
127  return $this->setParameter('agreementId', $value);
128  }
129 
135  public function getStartDate()
136  {
137  return $this->getParameter('startDate');
138  }
139 
146  public function setStartDate($value)
147  {
148  return $this->setParameter('startDate', is_string($value) ? new \DateTime($value) : $value);
149  }
150 
156  public function getEndDate()
157  {
158  return $this->getParameter('endDate');
159  }
160 
167  public function setEndDate($value)
168  {
169  return $this->setParameter('endDate', is_string($value) ? new \DateTime($value) : $value);
170  }
171 
172  public function getData()
173  {
174  $this->validate('agreementId', 'startDate', 'endDate');
175  return array(
176  'start_date' => $this->getStartDate()->format('Y-m-d'),
177  'end_date' => $this->getEndDate()->format('Y-m-d'),
178  );
179  }
180 
188  protected function getHttpMethod()
189  {
190  return 'GET';
191  }
192 
193  public function getEndpoint()
194  {
195  return parent::getEndpoint() . '/payments/billing-agreements/' .
196  $this->getAgreementId() . '/transactions';
197  }
198 }
Omnipay\Common\Message\AbstractRequest\getParameter
getParameter($key)
Definition: lib/vendor/omnipay/common/src/Omnipay/Common/Message/AbstractRequest.php:172
Omnipay\Common\Message\AbstractRequest\setParameter
setParameter($key, $value)
Definition: lib/vendor/omnipay/common/src/Omnipay/Common/Message/AbstractRequest.php:185
Omnipay\PayPal\Message\RestSearchTransactionRequest\getData
getData()
Definition: vendor/omnipay/paypal/src/Message/RestSearchTransactionRequest.php:172
Omnipay\PayPal\Message\RestSearchTransactionRequest\setEndDate
setEndDate($value)
Definition: vendor/omnipay/paypal/src/Message/RestSearchTransactionRequest.php:167
Omnipay\PayPal\Message\RestSearchTransactionRequest\getStartDate
getStartDate()
Definition: vendor/omnipay/paypal/src/Message/RestSearchTransactionRequest.php:135
Omnipay\PayPal\Message\RestSearchTransactionRequest\setStartDate
setStartDate($value)
Definition: vendor/omnipay/paypal/src/Message/RestSearchTransactionRequest.php:146
Omnipay\Common\Message\AbstractRequest\validate
validate()
Definition: lib/vendor/omnipay/common/src/Omnipay/Common/Message/AbstractRequest.php:226
Omnipay\PayPal\Message\RestSearchTransactionRequest\getAgreementId
getAgreementId()
Definition: vendor/omnipay/paypal/src/Message/RestSearchTransactionRequest.php:114
Omnipay\PayPal\Message\RestSearchTransactionRequest\setAgreementId
setAgreementId($value)
Definition: vendor/omnipay/paypal/src/Message/RestSearchTransactionRequest.php:125
Omnipay\PayPal\Message\RestSearchTransactionRequest\getEndpoint
getEndpoint()
Definition: vendor/omnipay/paypal/src/Message/RestSearchTransactionRequest.php:193
Omnipay\PayPal\Message\RestSearchTransactionRequest\getHttpMethod
getHttpMethod()
Definition: vendor/omnipay/paypal/src/Message/RestSearchTransactionRequest.php:188
Omnipay\PayPal\Message
Definition: lib/vendor/omnipay/paypal/src/Message/AbstractRequest.php:6
Omnipay\PayPal\Message\RestSearchTransactionRequest\getEndDate
getEndDate()
Definition: vendor/omnipay/paypal/src/Message/RestSearchTransactionRequest.php:156