return ['data' =>
$customers, 'total' =>
$totalResult];
} /**
* @param array<string, mixed> $params
*
* @return CustomerModel
*/
public function create(array
$params) { $this->
checkPrivilege('create'
);
$this->
setupContext($params['shopId'
] ?? null
);
// Create models
$customer =
new CustomerModel();
$customer->
setAttribute(new CustomerAttribute());
// Normalize call between create and update to allow same parameters
if (isset($params['defaultBillingAddress'
])) { $params['billing'
] =
$params['defaultBillingAddress'
];
unset($params['defaultBillingAddress'
]);
}