Code Duplication    Length = 16-16 lines in 2 locations

src/Paystack.php 2 locations

@@ 323-338 (lines=16) @@
320
     * Create a customer
321
     * @return array
322
     */
323
    public function createCustomer(){
324
        $data = [
325
            "email" => request()->email,
326
            "first_name" => request()->fname,
327
            "last_name" => request()->lname,
328
            "phone" => request()->phone,
329
            "metadata" => request()->additional_info /* key => value pairs array */
330
331
        ];
332
333
        $this->setRequestOptions();
334
        $this->setHttpResponse('/customer', 'POST', $data);
335
    }
336
337
    /**
338
     * Fetch a customer based on id or code
339
     * @param $customer_id
340
     * @return array
341
     */
@@ 353-368 (lines=16) @@
350
     * @param $customer_id
351
     * @return array
352
     */
353
    public function updateCustomer($customer_id){
354
        $data = [
355
            "email" => request()->email,
356
            "first_name" => request()->fname,
357
            "last_name" => request()->lname,
358
            "phone" => request()->phone,
359
            "metadata" => request()->additional_info /* key => value pairs array */
360
361
        ];
362
363
        $this->setRequestOptions();
364
        return $this->setHttpResponse('/customer/'. $customer_id, 'PUT', $data)->getResponse();
365
    }
366
367
    /**
368
     * Export tranactions in .CSV
369
     * @return array
370
     */
371
    public function exportTransactions(){