@@ -140,12 +140,12 @@ public function getStartDate()
140
140
/**
141
141
* Set the request startDate
142
142
*
143
- * @param string $value
143
+ * @param string|DateTime $value
144
144
* @return RestSearchTransactionRequest provides a fluent interface.
145
145
*/
146
146
public function setStartDate ($ value )
147
147
{
148
- return $ this ->setParameter ('startDate ' , $ value );
148
+ return $ this ->setParameter ('startDate ' , is_string ( $ value ) ? new \ DateTime ( $ value ) : $ value );
149
149
}
150
150
151
151
/**
@@ -161,20 +161,20 @@ public function getEndDate()
161
161
/**
162
162
* Set the request endDate
163
163
*
164
- * @param string $value
164
+ * @param string|DateTime $value
165
165
* @return RestSearchTransactionRequest provides a fluent interface.
166
166
*/
167
167
public function setEndDate ($ value )
168
168
{
169
- return $ this ->setParameter ('endDate ' , $ value );
169
+ return $ this ->setParameter ('endDate ' , is_string ( $ value ) ? new \ DateTime ( $ value ) : $ value );
170
170
}
171
171
172
172
public function getData ()
173
173
{
174
- $ this ->validate ('agreementId ' );
174
+ $ this ->validate ('agreementId ' , ' startDate ' , ' endDate ' );
175
175
return array (
176
- 'start_date ' => $ this ->getStartDate (),
177
- 'end_date ' => $ this ->getEndDate (),
176
+ 'start_date ' => $ this ->getStartDate ()-> format ( ' Y-m-d ' ),
177
+ 'end_date ' => $ this ->getEndDate ()-> format ( ' Y-m-d ' ),
178
178
);
179
179
}
180
180
0 commit comments