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

        $membership = Membership::createFromJsonResponse($contents);
        if (!\is_array($membership)) {
            throw new \RuntimeException('Something went wrong, return was not array, but should be');
        }

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

        $membership = Membership::createFromJsonResponse($contents);
        if (!\is_array($membership)) {
            throw new \RuntimeException('Something went wrong, return was not array, but should be');
        }

        return $membership;
    }
public function listMemberships ( $ organization = '' ) { $ contents = $ this -> call ( 'GET' , implode ( '/' , [ self :: ORGANIZATION_RESOURCE , $ this -> getOrganizationName ( $ organization ) , 'memberships' ] ) ) -> getBody ( ) -> getContents ( ) ; $ membership = Membership :: createFromJsonResponse ( $ contents ) ; if ( ! \ is_array ( $ membership ) ) { throw new \ RuntimeException ( 'Something went wrong, return was not array, but should be' ) ; } return $ membership ; }
List the membership metadata for the given organization.

@since 1.7.0

@param string $organization Organization

@throws GuzzleException
@throws \RuntimeException

@return Membership[]
List the membership metadata for the given organization .