sequra_create_order_request_customer_options

Hook Filter

Filter the customer options.

Description

This filter allows modifying the customer which is used to build the payload for the Order API calls.

ParameterTypeDescription
$customerSeQura\Core\BusinessLogic\Domain\Order\Models\OrderRequest\CustomerCustomer instance

Changelog

VersionDescription
3.0.0Introduced

Usage Example

add_filter('sequra_create_order_request_customer_options', function($customer){
  return new \SeQura\Core\BusinessLogic\Domain\Order\Models\OrderRequest\Customer(
    $customer->getEmail(), // Your custom value here.
    $customer->getLanguageCode(), // Your custom value here.
    $customer->getIpNumber(), // Your custom value here.
    $customer->getUserAgent(), // Your custom value here.
    $customer->getGivenNames(), // Your custom value here.
    $customer->getSurnames(), // Your custom value here.
    $customer->getTitle(), // Your custom value here.
    $customer->getRef(), // Your custom value here.
    $customer->getDateOfBirth(), // Your custom value here.
    $customer->getNin(), // Your custom value here.
    $customer->getCompany(), // Your custom value here.
    $customer->getVatNumber(), // Your custom value here.
    $customer->getCreatedAt(), // Your custom value here.
    $customer->getUpdatedAt(), // Your custom value here.
    $customer->getRating(), // Your custom value here.
    $customer->getNinControl(), // Your custom value here.
    $customer->getPreviousOrders(), // Your custom value here.
    $customer->getVehicle(), // Your custom value here.
    $customer->getLoggedIn(), // Your custom value here.
  );
});