CRM V2

WPCrmQuestion
in package

Class de gestion de la segmentation question avec Wordpress

Tags
category

API

subpackage

Wordpress

author

Jérémy Munsch jeremy.munsch@ldc.fr

license

MIT https://opensource.org/licenses/MIT

link
/

Table of Contents

allWithCustomerAnswers()  : array<string|int, mixed>
Get all the questions with user answers
getAll()  : array<string|int, mixed>
Get all questions only
unansweredBy()  : array<string|int, Question>
Get unanswered question for a specific customer

Methods

allWithCustomerAnswers()

Get all the questions with user answers

public static allWithCustomerAnswers(WPCrmUser $user) : array<string|int, mixed>
Parameters
$user : WPCrmUser
Tags
throws
CrmException

If an error occurs on server side or on getting response.

throws
ValidationException

If a hashcode is not a valid UUID.

throws
ValidationException

If any of the provided ids are invalid.

throws
ApiErrorException

If any error or \LDC\LDCCRM\Enums\ApiError occurs. Possibles are : - modelNotFound, If the customer could not be found(CRM side).

phpcs:ignore

Squiz.Commenting.FunctionCommentThrowTag.WrongNumber

Return values
array<string|int, mixed> —

Of \LDC\LDCCRM\Models\Question and their \LDC\LDCCRM\Models\Answer.

getAll()

Get all questions only

public static getAll() : array<string|int, mixed>
Tags
throws
CrmException

If an error occurs on server side or on getting response.

throws
ApiErrorException

If any error or \LDC\LDCCRM\Enums\ApiError occurs.

phpcs:ignore

Squiz.Commenting.FunctionCommentThrowTag.WrongNumber

Return values
array<string|int, mixed> —

Of \LDC\LDCCRM\Models\Question

unansweredBy()

Get unanswered question for a specific customer

public static unansweredBy(WPCrmUser $user) : array<string|int, Question>
Parameters
$user : WPCrmUser
Tags
throws
CrmException

If an error occurs on server side or on getting response.

throws
ValidationException

If $user hashcode is not a valid UUID.

throws
ApiErrorException

If any error or \LDC\LDCCRM\Enums\ApiError occurs. Possibles are : - modelNotFound, If the customer could not be found(CRM side).

phpcs:ignore

Squiz.Commenting.FunctionCommentThrowTag.WrongNumber

Return values
array<string|int, Question> —

Search results