src/User.php
public function getMembership($userId, $organization = '')
    {
        $contents = $this
            ->call('GET', implode('/', [self::ORGANIZATION_RESOURCE, $this->getOrganizationName($organization), 'memberships', $userId]))
            ->getBody()
            ->getContents();

        return $this->getSingleMemberShipFromJsonResponse($contents);
    }
public function getMembership($userId, $organization = '')
    {
        $contents = $this
            ->call('GET', implode('/', [self::ORGANIZATION_RESOURCE, $this->getOrganizationName($organization), 'memberships', $userId]))
            ->getBody()
            ->getContents();

        return $this->getSingleMemberShipFromJsonResponse($contents);
    }
public function getMembership ( $ userId , $ organization = '' ) { $ contents = $ this -> call ( 'GET' , implode ( '/' , [ self :: ORGANIZATION_RESOURCE , $ this -> getOrganizationName ( $ organization ) , 'memberships' , $ userId ] ) ) -> getBody ( ) -> getContents ( ) ; return $ this -> getSingleMemberShipFromJsonResponse ( $ contents ) ; }
Get the membership metadata for the given organization and user's ID.

@since 1.7.0

@param string $organization Organization
@param string $userId       User ID

@throws GuzzleException
@throws \RuntimeException

@return Membership
Get the membership metadata for the given organization and user s ID .