File tree 1 file changed +24
-1
lines changed
1 file changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -352,7 +352,7 @@ public function createCustomer(){
352
352
"first_name " => request ()->fname ,
353
353
"last_name " => request ()->lname ,
354
354
"phone " => request ()->phone ,
355
- "metadata " => request ()->addtional_info ,
355
+ "metadata " => request ()->addtional_info /* key => value pairs array */
356
356
357
357
];
358
358
@@ -387,6 +387,29 @@ public function fetchCustomer($customer_id){
387
387
388
388
}
389
389
390
+ /**
391
+ * Update a customer's details based on their id or code
392
+ * @param $customer_id
393
+ * @return array
394
+ */
395
+ public function updateCustomer ($ customer_id ){
396
+
397
+ $ data = [
398
+
399
+ "email " => request ()->email ,
400
+ "first_name " => request ()->fname ,
401
+ "last_name " => request ()->lname ,
402
+ "phone " => request ()->phone ,
403
+ "metadata " => request ()->addtional_info /* key => value pairs array */
404
+
405
+ ];
406
+
407
+ $ this ->setRequestOptions ();
408
+
409
+ return $ this ->setGetResponse ('/customer/ ' . $ customer_id , $ data )->getResponse ();
410
+
411
+ }
412
+
390
413
}
391
414
392
415
You can’t perform that action at this time.
0 commit comments