assignEntityViewToCustomer method

Future<EntityView?> assignEntityViewToCustomer(
  1. String customerId,
  2. String entityViewId, {
  3. RequestConfig? requestConfig,
})

Implementation

Future<EntityView?> assignEntityViewToCustomer(
    String customerId, String entityViewId,
    {RequestConfig? requestConfig}) async {
  return nullIfNotFound(
    (RequestConfig requestConfig) async {
      var response = await _tbClient.post<Map<String, dynamic>>(
          '/api/customer/$customerId/entityView/$entityViewId',
          options: defaultHttpOptionsFromConfig(requestConfig));
      return response.data != null
          ? EntityView.fromJson(response.data!)
          : null;
    },
    requestConfig: requestConfig,
  );
}