public static function create(array $arg_params)
    {
        //validate params
        $data = self::getParams($arg_params);
        if(!empty($data['metadata'])){
            $data['metadata'] = json_encode($data['metadata']);
        }

        //submit to api
        $customer_data = APIRequests::request(
            '/ecommerce/customers',
            APIRequests::METHOD_POST,
            $data
        );

        //return response
        return self::toObj($customer_data['body']);
    }
public static function create(array $arg_params)
    {
        //validate params
        $data = self::getParams($arg_params);
        if(!empty($data['metadata'])){
            $data['metadata'] = json_encode($data['metadata']);
        }

        //submit to api
        $customer_data = APIRequests::request(
            '/ecommerce/customers',
            APIRequests::METHOD_POST,
            $data
        );

        //return response
        return self::toObj($customer_data['body']);
    }
public static function create ( array $ arg_params ) { //validate params $ data = self :: getParams ( $ arg_params ) ; if ( ! empty ( $ data [ 'metadata' ] ) ) { $ data [ 'metadata' ] = json_encode ( $ data [ 'metadata' ] ) ; } //submit to api $ customer_data = APIRequests :: request ( '/ecommerce/customers' , APIRequests :: METHOD_POST , $ data ) ; //return response return self :: toObj ( $ customer_data [ 'body' ] ) ; }
Create A Customer

@param array $arg_params
@return null|object
@throws \Exception
Create A Customer