<?php
/**
 * OrganisationApi
 * PHP version 5
 *
 * @category Class
 * @package  Fifa\ConnectId\Sdk\Api
 * @author   Swagger Codegen team
 * @link     https://github.com/swagger-api/swagger-codegen
 */

/**
 * FIFA Connect ID - ID Directory V6
 *
 * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
 *
 * OpenAPI spec version: v6
 * 
 * Generated by: https://github.com/swagger-api/swagger-codegen.git
 *
 */

/**
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen
 * Do not edit the class manually.
 */

namespace Fifa\ConnectId\Sdk\Api\Resource;

use \Fifa\ConnectId\Sdk\Api\ApiClient;
use \Fifa\ConnectId\Sdk\Api\ApiException;
use \Fifa\ConnectId\Sdk\Api\Configuration;
use \Fifa\ConnectId\Sdk\Api\ObjectSerializer;

/**
 * OrganisationApi Class Doc Comment
 *
 * @category Class
 * @package  Fifa\ConnectId\Sdk\Api
 * @author   Swagger Codegen team
 * @link     https://github.com/swagger-api/swagger-codegen
 */
class OrganisationApi
{
    /**
     * API Client
     *
     * @var \Fifa\ConnectId\Sdk\Api\ApiClient instance of the ApiClient
     */
    protected $apiClient;

    /**
     * Constructor
     *
     * @param \Fifa\ConnectId\Sdk\Api\ApiClient|null $apiClient The api client to use
     */
    public function __construct(\Fifa\ConnectId\Sdk\Api\ApiClient $apiClient = null)
    {
        if ($apiClient === null) {
            $apiClient = new ApiClient();
        }

        $this->apiClient = $apiClient;
    }

    /**
     * Get API client
     *
     * @return \Fifa\ConnectId\Sdk\Api\ApiClient get the API client
     */
    public function getApiClient()
    {
        return $this->apiClient;
    }

    /**
     * Set the API client
     *
     * @param \Fifa\ConnectId\Sdk\Api\ApiClient $apiClient set the API client
     *
     * @return OrganisationApi
     */
    public function setApiClient(\Fifa\ConnectId\Sdk\Api\ApiClient $apiClient)
    {
        $this->apiClient = $apiClient;
        return $this;
    }

    /**
     * Operation organisationFind
     *
     * Finds organisations matching provided data
     *
     * @param \Fifa\ConnectId\Sdk\Api\Model\FindOrganisationsRequestType $body Request object (required)
     * @param string $x_actor_details Name or identifier of a user invoking the method on API (optional)
     * @throws \Fifa\ConnectId\Sdk\Api\ApiException on non-2xx response
     * @return \Fifa\ConnectId\Sdk\Api\Model\FindOrganisationsResponseType
     */
    public function organisationFind($body, $x_actor_details = null)
    {
        list($response) = $this->organisationFindWithHttpInfo($body, $x_actor_details);
        return $response;
    }

    /**
     * Operation organisationFindWithHttpInfo
     *
     * Finds organisations matching provided data
     *
     * @param \Fifa\ConnectId\Sdk\Api\Model\FindOrganisationsRequestType $body Request object (required)
     * @param string $x_actor_details Name or identifier of a user invoking the method on API (optional)
     * @throws \Fifa\ConnectId\Sdk\Api\ApiException on non-2xx response
     * @return array of \Fifa\ConnectId\Sdk\Api\Model\FindOrganisationsResponseType, HTTP status code, HTTP response headers (array of strings)
     */
    public function organisationFindWithHttpInfo($body, $x_actor_details = null)
    {
        // verify the required parameter 'body' is set
        if ($body === null) {
            throw new \InvalidArgumentException('Missing the required parameter $body when calling organisationFind');
        }
        // parse inputs
        $resourcePath = "/api/v6/organisation/find";
        $httpBody = '';
        $queryParams = [];
        $headerParams = [];
        $formParams = [];
        $_header_accept = $this->apiClient->selectHeaderAccept(['application/json', 'text/json']);
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json', 'text/json', 'application/_*+json']);

        // header params
        if ($x_actor_details !== null) {
            $headerParams['X-ActorDetails'] = $this->apiClient->getSerializer()->toHeaderValue($x_actor_details);
        }
        // default format to json
        $resourcePath = str_replace("{format}", "json", $resourcePath);

        // body params
        $_tempBody = null;
        if (isset($body)) {
            $_tempBody = $body;
        }

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        // this endpoint requires OAuth (access token)
        if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
            $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
        }
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath,
                'POST',
                $queryParams,
                $httpBody,
                $headerParams,
                '\Fifa\ConnectId\Sdk\Api\Model\FindOrganisationsResponseType',
                '/api/v6/organisation/find'
            );

            return [$this->apiClient->getSerializer()->deserialize($response, '\Fifa\ConnectId\Sdk\Api\Model\FindOrganisationsResponseType', $httpHeader), $statusCode, $httpHeader];
        } catch (ApiException $e) {
            switch ($e->getCode()) {
                case 200:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\FindOrganisationsResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 400:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\BadRequestResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 429:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\TooManyRequestsResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
            }

            throw $e;
        }
    }

    /**
     * Operation organisationGetActingOrganisations
     *
     * Returns a list of string identifiers of acting organisations
     *
     * @throws \Fifa\ConnectId\Sdk\Api\ApiException on non-2xx response
     * @return \Fifa\ConnectId\Sdk\Api\Model\GetActingOrganisationsResponseType
     */
    public function organisationGetActingOrganisations()
    {
        list($response) = $this->organisationGetActingOrganisationsWithHttpInfo();
        return $response;
    }

    /**
     * Operation organisationGetActingOrganisationsWithHttpInfo
     *
     * Returns a list of string identifiers of acting organisations
     *
     * @throws \Fifa\ConnectId\Sdk\Api\ApiException on non-2xx response
     * @return array of \Fifa\ConnectId\Sdk\Api\Model\GetActingOrganisationsResponseType, HTTP status code, HTTP response headers (array of strings)
     */
    public function organisationGetActingOrganisationsWithHttpInfo()
    {
        // parse inputs
        $resourcePath = "/api/v6/organisation/getactingorganisations";
        $httpBody = '';
        $queryParams = [];
        $headerParams = [];
        $formParams = [];
        $_header_accept = $this->apiClient->selectHeaderAccept(['application/json', 'text/json']);
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType([]);

        // default format to json
        $resourcePath = str_replace("{format}", "json", $resourcePath);

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        // this endpoint requires OAuth (access token)
        if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
            $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
        }
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath,
                'GET',
                $queryParams,
                $httpBody,
                $headerParams,
                '\Fifa\ConnectId\Sdk\Api\Model\GetActingOrganisationsResponseType',
                '/api/v6/organisation/getactingorganisations'
            );

            return [$this->apiClient->getSerializer()->deserialize($response, '\Fifa\ConnectId\Sdk\Api\Model\GetActingOrganisationsResponseType', $httpHeader), $statusCode, $httpHeader];
        } catch (ApiException $e) {
            switch ($e->getCode()) {
                case 200:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\GetActingOrganisationsResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 400:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\BadRequestResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 429:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\TooManyRequestsResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
            }

            throw $e;
        }
    }

    /**
     * Operation organisationGetAll
     *
     * Gets organisations matching provided data
     *
     * @param \Fifa\ConnectId\Sdk\Api\Model\GetAllOrganisationsRequestType $body Request object (required)
     * @param string $x_actor_details Name or identifier of a user invoking the method on API (optional)
     * @throws \Fifa\ConnectId\Sdk\Api\ApiException on non-2xx response
     * @return \Fifa\ConnectId\Sdk\Api\Model\GetAllOrganisationsResponseType
     */
    public function organisationGetAll($body, $x_actor_details = null)
    {
        list($response) = $this->organisationGetAllWithHttpInfo($body, $x_actor_details);
        return $response;
    }

    /**
     * Operation organisationGetAllWithHttpInfo
     *
     * Gets organisations matching provided data
     *
     * @param \Fifa\ConnectId\Sdk\Api\Model\GetAllOrganisationsRequestType $body Request object (required)
     * @param string $x_actor_details Name or identifier of a user invoking the method on API (optional)
     * @throws \Fifa\ConnectId\Sdk\Api\ApiException on non-2xx response
     * @return array of \Fifa\ConnectId\Sdk\Api\Model\GetAllOrganisationsResponseType, HTTP status code, HTTP response headers (array of strings)
     */
    public function organisationGetAllWithHttpInfo($body, $x_actor_details = null)
    {
        // verify the required parameter 'body' is set
        if ($body === null) {
            throw new \InvalidArgumentException('Missing the required parameter $body when calling organisationGetAll');
        }
        // parse inputs
        $resourcePath = "/api/v6/organisation/getall";
        $httpBody = '';
        $queryParams = [];
        $headerParams = [];
        $formParams = [];
        $_header_accept = $this->apiClient->selectHeaderAccept(['application/json', 'text/json']);
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json', 'text/json', 'application/_*+json']);

        // header params
        if ($x_actor_details !== null) {
            $headerParams['X-ActorDetails'] = $this->apiClient->getSerializer()->toHeaderValue($x_actor_details);
        }
        // default format to json
        $resourcePath = str_replace("{format}", "json", $resourcePath);

        // body params
        $_tempBody = null;
        if (isset($body)) {
            $_tempBody = $body;
        }

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        // this endpoint requires OAuth (access token)
        if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
            $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
        }
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath,
                'POST',
                $queryParams,
                $httpBody,
                $headerParams,
                '\Fifa\ConnectId\Sdk\Api\Model\GetAllOrganisationsResponseType',
                '/api/v6/organisation/getall'
            );

            return [$this->apiClient->getSerializer()->deserialize($response, '\Fifa\ConnectId\Sdk\Api\Model\GetAllOrganisationsResponseType', $httpHeader), $statusCode, $httpHeader];
        } catch (ApiException $e) {
            switch ($e->getCode()) {
                case 200:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\GetAllOrganisationsResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 400:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\BadRequestResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 429:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\TooManyRequestsResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
            }

            throw $e;
        }
    }

    /**
     * Operation organisationGetByOrganisationfifaid
     *
     * Gets organisation data associated with the specified FIFA Unique Identifier.
     *
     * @param string $organisation_fifa_id FIFA Unique Identifier (required)
     * @throws \Fifa\ConnectId\Sdk\Api\ApiException on non-2xx response
     * @return \Fifa\ConnectId\Sdk\Api\Model\OrganisationLocalType
     */
    public function organisationGetByOrganisationfifaid($organisation_fifa_id)
    {
        list($response) = $this->organisationGetByOrganisationfifaidWithHttpInfo($organisation_fifa_id);
        return $response;
    }

    /**
     * Operation organisationGetByOrganisationfifaidWithHttpInfo
     *
     * Gets organisation data associated with the specified FIFA Unique Identifier.
     *
     * @param string $organisation_fifa_id FIFA Unique Identifier (required)
     * @throws \Fifa\ConnectId\Sdk\Api\ApiException on non-2xx response
     * @return array of \Fifa\ConnectId\Sdk\Api\Model\OrganisationLocalType, HTTP status code, HTTP response headers (array of strings)
     */
    public function organisationGetByOrganisationfifaidWithHttpInfo($organisation_fifa_id)
    {
        // verify the required parameter 'organisation_fifa_id' is set
        if ($organisation_fifa_id === null) {
            throw new \InvalidArgumentException('Missing the required parameter $organisation_fifa_id when calling organisationGetByOrganisationfifaid');
        }
        // parse inputs
        $resourcePath = "/api/v6/organisation/get";
        $httpBody = '';
        $queryParams = [];
        $headerParams = [];
        $formParams = [];
        $_header_accept = $this->apiClient->selectHeaderAccept(['application/json', 'text/json']);
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType([]);

        // query params
        if ($organisation_fifa_id !== null) {
            $queryParams['organisationFifaId'] = $this->apiClient->getSerializer()->toQueryValue($organisation_fifa_id);
        }
        // default format to json
        $resourcePath = str_replace("{format}", "json", $resourcePath);

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        // this endpoint requires OAuth (access token)
        if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
            $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
        }
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath,
                'GET',
                $queryParams,
                $httpBody,
                $headerParams,
                '\Fifa\ConnectId\Sdk\Api\Model\OrganisationLocalType',
                '/api/v6/organisation/get'
            );

            return [$this->apiClient->getSerializer()->deserialize($response, '\Fifa\ConnectId\Sdk\Api\Model\OrganisationLocalType', $httpHeader), $statusCode, $httpHeader];
        } catch (ApiException $e) {
            switch ($e->getCode()) {
                case 200:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\OrganisationLocalType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 301:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\OrganisationLocalType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 400:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\BadRequestResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 429:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\TooManyRequestsResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
            }

            throw $e;
        }
    }

    /**
     * Operation organisationGetDuplicates
     *
     * Gets a list of organisations this organisation may be duplicated with.
     *
     * @param \Fifa\ConnectId\Sdk\Api\Model\OrganisationLocalType $body Organisation data (required)
     * @param string $x_actor_details Name or identifier of a user invoking the method on API (optional)
     * @throws \Fifa\ConnectId\Sdk\Api\ApiException on non-2xx response
     * @return \Fifa\ConnectId\Sdk\Api\Model\GetOrganisationDuplicatesResponseType
     */
    public function organisationGetDuplicates($body, $x_actor_details = null)
    {
        list($response) = $this->organisationGetDuplicatesWithHttpInfo($body, $x_actor_details);
        return $response;
    }

    /**
     * Operation organisationGetDuplicatesWithHttpInfo
     *
     * Gets a list of organisations this organisation may be duplicated with.
     *
     * @param \Fifa\ConnectId\Sdk\Api\Model\OrganisationLocalType $body Organisation data (required)
     * @param string $x_actor_details Name or identifier of a user invoking the method on API (optional)
     * @throws \Fifa\ConnectId\Sdk\Api\ApiException on non-2xx response
     * @return array of \Fifa\ConnectId\Sdk\Api\Model\GetOrganisationDuplicatesResponseType, HTTP status code, HTTP response headers (array of strings)
     */
    public function organisationGetDuplicatesWithHttpInfo($body, $x_actor_details = null)
    {
        // verify the required parameter 'body' is set
        if ($body === null) {
            throw new \InvalidArgumentException('Missing the required parameter $body when calling organisationGetDuplicates');
        }
        // parse inputs
        $resourcePath = "/api/v6/organisation/getduplicates";
        $httpBody = '';
        $queryParams = [];
        $headerParams = [];
        $formParams = [];
        $_header_accept = $this->apiClient->selectHeaderAccept(['application/json', 'text/json']);
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json', 'text/json', 'application/_*+json']);

        // header params
        if ($x_actor_details !== null) {
            $headerParams['X-ActorDetails'] = $this->apiClient->getSerializer()->toHeaderValue($x_actor_details);
        }
        // default format to json
        $resourcePath = str_replace("{format}", "json", $resourcePath);

        // body params
        $_tempBody = null;
        if (isset($body)) {
            $_tempBody = $body;
        }

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        // this endpoint requires OAuth (access token)
        if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
            $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
        }
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath,
                'POST',
                $queryParams,
                $httpBody,
                $headerParams,
                '\Fifa\ConnectId\Sdk\Api\Model\GetOrganisationDuplicatesResponseType',
                '/api/v6/organisation/getduplicates'
            );

            return [$this->apiClient->getSerializer()->deserialize($response, '\Fifa\ConnectId\Sdk\Api\Model\GetOrganisationDuplicatesResponseType', $httpHeader), $statusCode, $httpHeader];
        } catch (ApiException $e) {
            switch ($e->getCode()) {
                case 200:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\GetOrganisationDuplicatesResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 400:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\BadRequestResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 429:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\TooManyRequestsResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
            }

            throw $e;
        }
    }

    /**
     * Operation organisationGetMemberAssociationForFifaIdByOrganisationfifaid
     *
     * Gets a member association FIFA Unique Identifier and short name of searched organisation.
     *
     * @param string $organisation_fifa_id FIFA Unique Identifier (required)
     * @throws \Fifa\ConnectId\Sdk\Api\ApiException on non-2xx response
     * @return \Fifa\ConnectId\Sdk\Api\Model\MemberAssociationResponseType
     */
    public function organisationGetMemberAssociationForFifaIdByOrganisationfifaid($organisation_fifa_id)
    {
        list($response) = $this->organisationGetMemberAssociationForFifaIdByOrganisationfifaidWithHttpInfo($organisation_fifa_id);
        return $response;
    }

    /**
     * Operation organisationGetMemberAssociationForFifaIdByOrganisationfifaidWithHttpInfo
     *
     * Gets a member association FIFA Unique Identifier and short name of searched organisation.
     *
     * @param string $organisation_fifa_id FIFA Unique Identifier (required)
     * @throws \Fifa\ConnectId\Sdk\Api\ApiException on non-2xx response
     * @return array of \Fifa\ConnectId\Sdk\Api\Model\MemberAssociationResponseType, HTTP status code, HTTP response headers (array of strings)
     */
    public function organisationGetMemberAssociationForFifaIdByOrganisationfifaidWithHttpInfo($organisation_fifa_id)
    {
        // verify the required parameter 'organisation_fifa_id' is set
        if ($organisation_fifa_id === null) {
            throw new \InvalidArgumentException('Missing the required parameter $organisation_fifa_id when calling organisationGetMemberAssociationForFifaIdByOrganisationfifaid');
        }
        // parse inputs
        $resourcePath = "/api/v6/organisation/getmemberassociationforfifaid";
        $httpBody = '';
        $queryParams = [];
        $headerParams = [];
        $formParams = [];
        $_header_accept = $this->apiClient->selectHeaderAccept(['application/json', 'text/json']);
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType([]);

        // query params
        if ($organisation_fifa_id !== null) {
            $queryParams['organisationFifaId'] = $this->apiClient->getSerializer()->toQueryValue($organisation_fifa_id);
        }
        // default format to json
        $resourcePath = str_replace("{format}", "json", $resourcePath);

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        // this endpoint requires OAuth (access token)
        if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
            $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
        }
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath,
                'GET',
                $queryParams,
                $httpBody,
                $headerParams,
                '\Fifa\ConnectId\Sdk\Api\Model\MemberAssociationResponseType',
                '/api/v6/organisation/getmemberassociationforfifaid'
            );

            return [$this->apiClient->getSerializer()->deserialize($response, '\Fifa\ConnectId\Sdk\Api\Model\MemberAssociationResponseType', $httpHeader), $statusCode, $httpHeader];
        } catch (ApiException $e) {
            switch ($e->getCode()) {
                case 200:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\MemberAssociationResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 400:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\BadRequestResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 429:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\TooManyRequestsResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
            }

            throw $e;
        }
    }

    /**
     * Operation organisationGetMemberAssociationsOnboardedStatus
     *
     * Returns a list of objects with fifaId and onboarded status.
     *
     * @param \Fifa\ConnectId\Sdk\Api\Model\NationalAssociationsOnboardedRequestType $body  (required)
     * @param string $x_actor_details Name or identifier of a user invoking the method on API (optional)
     * @throws \Fifa\ConnectId\Sdk\Api\ApiException on non-2xx response
     * @return \Fifa\ConnectId\Sdk\Api\Model\NationalAssociationsOnboardedResponseType
     */
    public function organisationGetMemberAssociationsOnboardedStatus($body, $x_actor_details = null)
    {
        list($response) = $this->organisationGetMemberAssociationsOnboardedStatusWithHttpInfo($body, $x_actor_details);
        return $response;
    }

    /**
     * Operation organisationGetMemberAssociationsOnboardedStatusWithHttpInfo
     *
     * Returns a list of objects with fifaId and onboarded status.
     *
     * @param \Fifa\ConnectId\Sdk\Api\Model\NationalAssociationsOnboardedRequestType $body  (required)
     * @param string $x_actor_details Name or identifier of a user invoking the method on API (optional)
     * @throws \Fifa\ConnectId\Sdk\Api\ApiException on non-2xx response
     * @return array of \Fifa\ConnectId\Sdk\Api\Model\NationalAssociationsOnboardedResponseType, HTTP status code, HTTP response headers (array of strings)
     */
    public function organisationGetMemberAssociationsOnboardedStatusWithHttpInfo($body, $x_actor_details = null)
    {
        // verify the required parameter 'body' is set
        if ($body === null) {
            throw new \InvalidArgumentException('Missing the required parameter $body when calling organisationGetMemberAssociationsOnboardedStatus');
        }
        // parse inputs
        $resourcePath = "/api/v6/organisation/getmemberassociationsonboardedstatus";
        $httpBody = '';
        $queryParams = [];
        $headerParams = [];
        $formParams = [];
        $_header_accept = $this->apiClient->selectHeaderAccept(['application/json', 'text/json']);
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json', 'text/json', 'application/_*+json']);

        // header params
        if ($x_actor_details !== null) {
            $headerParams['X-ActorDetails'] = $this->apiClient->getSerializer()->toHeaderValue($x_actor_details);
        }
        // default format to json
        $resourcePath = str_replace("{format}", "json", $resourcePath);

        // body params
        $_tempBody = null;
        if (isset($body)) {
            $_tempBody = $body;
        }

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        // this endpoint requires OAuth (access token)
        if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
            $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
        }
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath,
                'POST',
                $queryParams,
                $httpBody,
                $headerParams,
                '\Fifa\ConnectId\Sdk\Api\Model\NationalAssociationsOnboardedResponseType',
                '/api/v6/organisation/getmemberassociationsonboardedstatus'
            );

            return [$this->apiClient->getSerializer()->deserialize($response, '\Fifa\ConnectId\Sdk\Api\Model\NationalAssociationsOnboardedResponseType', $httpHeader), $statusCode, $httpHeader];
        } catch (ApiException $e) {
            switch ($e->getCode()) {
                case 200:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\NationalAssociationsOnboardedResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 400:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\BadRequestResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 429:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\TooManyRequestsResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
            }

            throw $e;
        }
    }

    /**
     * Operation organisationMerge
     *
     * Merges two organisations. Returns the primary organisation.
     *
     * @param \Fifa\ConnectId\Sdk\Api\Model\MergeOrganisationsRequestType $body Request with secondary and primary organisations FIFA Unique Identifiers. (required)
     * @param string $x_actor_details Name or identifier of a user invoking the method on API (optional)
     * @throws \Fifa\ConnectId\Sdk\Api\ApiException on non-2xx response
     * @return \Fifa\ConnectId\Sdk\Api\Model\OrganisationLocalType
     */
    public function organisationMerge($body, $x_actor_details = null)
    {
        list($response) = $this->organisationMergeWithHttpInfo($body, $x_actor_details);
        return $response;
    }

    /**
     * Operation organisationMergeWithHttpInfo
     *
     * Merges two organisations. Returns the primary organisation.
     *
     * @param \Fifa\ConnectId\Sdk\Api\Model\MergeOrganisationsRequestType $body Request with secondary and primary organisations FIFA Unique Identifiers. (required)
     * @param string $x_actor_details Name or identifier of a user invoking the method on API (optional)
     * @throws \Fifa\ConnectId\Sdk\Api\ApiException on non-2xx response
     * @return array of \Fifa\ConnectId\Sdk\Api\Model\OrganisationLocalType, HTTP status code, HTTP response headers (array of strings)
     */
    public function organisationMergeWithHttpInfo($body, $x_actor_details = null)
    {
        // verify the required parameter 'body' is set
        if ($body === null) {
            throw new \InvalidArgumentException('Missing the required parameter $body when calling organisationMerge');
        }
        // parse inputs
        $resourcePath = "/api/v6/organisation/merge";
        $httpBody = '';
        $queryParams = [];
        $headerParams = [];
        $formParams = [];
        $_header_accept = $this->apiClient->selectHeaderAccept(['application/json', 'text/json']);
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json', 'text/json', 'application/_*+json']);

        // header params
        if ($x_actor_details !== null) {
            $headerParams['X-ActorDetails'] = $this->apiClient->getSerializer()->toHeaderValue($x_actor_details);
        }
        // default format to json
        $resourcePath = str_replace("{format}", "json", $resourcePath);

        // body params
        $_tempBody = null;
        if (isset($body)) {
            $_tempBody = $body;
        }

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        // this endpoint requires OAuth (access token)
        if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
            $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
        }
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath,
                'POST',
                $queryParams,
                $httpBody,
                $headerParams,
                '\Fifa\ConnectId\Sdk\Api\Model\OrganisationLocalType',
                '/api/v6/organisation/merge'
            );

            return [$this->apiClient->getSerializer()->deserialize($response, '\Fifa\ConnectId\Sdk\Api\Model\OrganisationLocalType', $httpHeader), $statusCode, $httpHeader];
        } catch (ApiException $e) {
            switch ($e->getCode()) {
                case 200:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\OrganisationLocalType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 400:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\BadRequestResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 409:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\ConflictResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 429:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\TooManyRequestsResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
            }

            throw $e;
        }
    }

    /**
     * Operation organisationRegisterByForce
     *
     * Registers a new organisation and assigns FIFA Unique Identifier.
     *
     * @param \Fifa\ConnectId\Sdk\Api\Model\OrganisationLocalType $body Organisation data. (required)
     * @param bool $force Ignores FIFA registration rules violation check (optional, default to false)
     * @param string $x_actor_details Name or identifier of a user invoking the method on API (optional)
     * @throws \Fifa\ConnectId\Sdk\Api\ApiException on non-2xx response
     * @return \Fifa\ConnectId\Sdk\Api\Model\RegisterResponseType
     */
    public function organisationRegisterByForce($body, $force = null, $x_actor_details = null)
    {
        list($response) = $this->organisationRegisterByForceWithHttpInfo($body, $force, $x_actor_details);
        return $response;
    }

    /**
     * Operation organisationRegisterByForceWithHttpInfo
     *
     * Registers a new organisation and assigns FIFA Unique Identifier.
     *
     * @param \Fifa\ConnectId\Sdk\Api\Model\OrganisationLocalType $body Organisation data. (required)
     * @param bool $force Ignores FIFA registration rules violation check (optional, default to false)
     * @param string $x_actor_details Name or identifier of a user invoking the method on API (optional)
     * @throws \Fifa\ConnectId\Sdk\Api\ApiException on non-2xx response
     * @return array of \Fifa\ConnectId\Sdk\Api\Model\RegisterResponseType, HTTP status code, HTTP response headers (array of strings)
     */
    public function organisationRegisterByForceWithHttpInfo($body, $force = null, $x_actor_details = null)
    {
        // verify the required parameter 'body' is set
        if ($body === null) {
            throw new \InvalidArgumentException('Missing the required parameter $body when calling organisationRegisterByForce');
        }
        // parse inputs
        $resourcePath = "/api/v6/organisation/register";
        $httpBody = '';
        $queryParams = [];
        $headerParams = [];
        $formParams = [];
        $_header_accept = $this->apiClient->selectHeaderAccept(['application/json', 'text/json']);
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json', 'text/json', 'application/_*+json']);

        // query params
        if ($force !== null) {
            $queryParams['force'] = $this->apiClient->getSerializer()->toQueryValue($force);
        }
        // header params
        if ($x_actor_details !== null) {
            $headerParams['X-ActorDetails'] = $this->apiClient->getSerializer()->toHeaderValue($x_actor_details);
        }
        // default format to json
        $resourcePath = str_replace("{format}", "json", $resourcePath);

        // body params
        $_tempBody = null;
        if (isset($body)) {
            $_tempBody = $body;
        }

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        // this endpoint requires OAuth (access token)
        if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
            $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
        }
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath,
                'POST',
                $queryParams,
                $httpBody,
                $headerParams,
                '\Fifa\ConnectId\Sdk\Api\Model\RegisterResponseType',
                '/api/v6/organisation/register'
            );

            return [$this->apiClient->getSerializer()->deserialize($response, '\Fifa\ConnectId\Sdk\Api\Model\RegisterResponseType', $httpHeader), $statusCode, $httpHeader];
        } catch (ApiException $e) {
            switch ($e->getCode()) {
                case 201:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\RegisterResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 400:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\BadRequestResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 409:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\GetOrganisationDuplicatesResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 429:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\TooManyRequestsResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
            }

            throw $e;
        }
    }

    /**
     * Operation organisationUnmerge
     *
     * Reverts merge operation. Returns the secondary organisation when unmerge operations is completed.
     *
     * @param \Fifa\ConnectId\Sdk\Api\Model\UnmergeOrganisationsRequestType $body Request with secondary and primary organisations FIFA Unique Identifiers. (required)
     * @param string $x_actor_details Name or identifier of a user invoking the method on API (optional)
     * @throws \Fifa\ConnectId\Sdk\Api\ApiException on non-2xx response
     * @return \Fifa\ConnectId\Sdk\Api\Model\OrganisationLocalType
     */
    public function organisationUnmerge($body, $x_actor_details = null)
    {
        list($response) = $this->organisationUnmergeWithHttpInfo($body, $x_actor_details);
        return $response;
    }

    /**
     * Operation organisationUnmergeWithHttpInfo
     *
     * Reverts merge operation. Returns the secondary organisation when unmerge operations is completed.
     *
     * @param \Fifa\ConnectId\Sdk\Api\Model\UnmergeOrganisationsRequestType $body Request with secondary and primary organisations FIFA Unique Identifiers. (required)
     * @param string $x_actor_details Name or identifier of a user invoking the method on API (optional)
     * @throws \Fifa\ConnectId\Sdk\Api\ApiException on non-2xx response
     * @return array of \Fifa\ConnectId\Sdk\Api\Model\OrganisationLocalType, HTTP status code, HTTP response headers (array of strings)
     */
    public function organisationUnmergeWithHttpInfo($body, $x_actor_details = null)
    {
        // verify the required parameter 'body' is set
        if ($body === null) {
            throw new \InvalidArgumentException('Missing the required parameter $body when calling organisationUnmerge');
        }
        // parse inputs
        $resourcePath = "/api/v6/organisation/unmerge";
        $httpBody = '';
        $queryParams = [];
        $headerParams = [];
        $formParams = [];
        $_header_accept = $this->apiClient->selectHeaderAccept(['application/json', 'text/json']);
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json', 'text/json', 'application/_*+json']);

        // header params
        if ($x_actor_details !== null) {
            $headerParams['X-ActorDetails'] = $this->apiClient->getSerializer()->toHeaderValue($x_actor_details);
        }
        // default format to json
        $resourcePath = str_replace("{format}", "json", $resourcePath);

        // body params
        $_tempBody = null;
        if (isset($body)) {
            $_tempBody = $body;
        }

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        // this endpoint requires OAuth (access token)
        if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
            $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
        }
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath,
                'POST',
                $queryParams,
                $httpBody,
                $headerParams,
                '\Fifa\ConnectId\Sdk\Api\Model\OrganisationLocalType',
                '/api/v6/organisation/unmerge'
            );

            return [$this->apiClient->getSerializer()->deserialize($response, '\Fifa\ConnectId\Sdk\Api\Model\OrganisationLocalType', $httpHeader), $statusCode, $httpHeader];
        } catch (ApiException $e) {
            switch ($e->getCode()) {
                case 200:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\OrganisationLocalType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 400:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\BadRequestResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 409:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\ConflictResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 429:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\TooManyRequestsResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
            }

            throw $e;
        }
    }

    /**
     * Operation organisationUpdateByForce
     *
     * Updates organisation data.
     *
     * @param \Fifa\ConnectId\Sdk\Api\Model\OrganisationLocalType $body Organisation data to be updated. (required)
     * @param bool $force Ignores FIFA registration rules violation check (optional, default to false)
     * @param string $x_actor_details Name or identifier of a user invoking the method on API (optional)
     * @throws \Fifa\ConnectId\Sdk\Api\ApiException on non-2xx response
     * @return \Fifa\ConnectId\Sdk\Api\Model\OrganisationLocalType
     */
    public function organisationUpdateByForce($body, $force = null, $x_actor_details = null)
    {
        list($response) = $this->organisationUpdateByForceWithHttpInfo($body, $force, $x_actor_details);
        return $response;
    }

    /**
     * Operation organisationUpdateByForceWithHttpInfo
     *
     * Updates organisation data.
     *
     * @param \Fifa\ConnectId\Sdk\Api\Model\OrganisationLocalType $body Organisation data to be updated. (required)
     * @param bool $force Ignores FIFA registration rules violation check (optional, default to false)
     * @param string $x_actor_details Name or identifier of a user invoking the method on API (optional)
     * @throws \Fifa\ConnectId\Sdk\Api\ApiException on non-2xx response
     * @return array of \Fifa\ConnectId\Sdk\Api\Model\OrganisationLocalType, HTTP status code, HTTP response headers (array of strings)
     */
    public function organisationUpdateByForceWithHttpInfo($body, $force = null, $x_actor_details = null)
    {
        // verify the required parameter 'body' is set
        if ($body === null) {
            throw new \InvalidArgumentException('Missing the required parameter $body when calling organisationUpdateByForce');
        }
        // parse inputs
        $resourcePath = "/api/v6/organisation/update";
        $httpBody = '';
        $queryParams = [];
        $headerParams = [];
        $formParams = [];
        $_header_accept = $this->apiClient->selectHeaderAccept(['application/json', 'text/json']);
        if (!is_null($_header_accept)) {
            $headerParams['Accept'] = $_header_accept;
        }
        $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(['application/json', 'text/json', 'application/_*+json']);

        // query params
        if ($force !== null) {
            $queryParams['force'] = $this->apiClient->getSerializer()->toQueryValue($force);
        }
        // header params
        if ($x_actor_details !== null) {
            $headerParams['X-ActorDetails'] = $this->apiClient->getSerializer()->toHeaderValue($x_actor_details);
        }
        // default format to json
        $resourcePath = str_replace("{format}", "json", $resourcePath);

        // body params
        $_tempBody = null;
        if (isset($body)) {
            $_tempBody = $body;
        }

        // for model (json/xml)
        if (isset($_tempBody)) {
            $httpBody = $_tempBody; // $_tempBody is the method argument, if present
        } elseif (count($formParams) > 0) {
            $httpBody = $formParams; // for HTTP post (form)
        }
        // this endpoint requires OAuth (access token)
        if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
            $headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
        }
        // make the API Call
        try {
            list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
                $resourcePath,
                'POST',
                $queryParams,
                $httpBody,
                $headerParams,
                '\Fifa\ConnectId\Sdk\Api\Model\OrganisationLocalType',
                '/api/v6/organisation/update'
            );

            return [$this->apiClient->getSerializer()->deserialize($response, '\Fifa\ConnectId\Sdk\Api\Model\OrganisationLocalType', $httpHeader), $statusCode, $httpHeader];
        } catch (ApiException $e) {
            switch ($e->getCode()) {
                case 200:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\OrganisationLocalType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 400:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\BadRequestResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 409:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\GetOrganisationDuplicatesResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
                case 429:
                    $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Fifa\ConnectId\Sdk\Api\Model\TooManyRequestsResponseType', $e->getResponseHeaders());
                    $e->setResponseObject($data);
                    break;
            }

            throw $e;
        }
    }
}

