Interface Organization

  • All Implemented Interfaces:

    
    public interface Organization
    
                        

    The Organization interface provides methods for retrieving, updating, and deleting the current authenticated user's organization and creating, updating, deleting, reactivating, and searching an organizations members

    • Constructor Detail

    • Method Detail

      • onChange

         abstract Unit onChange(Function1<StytchObjectInfo<OrganizationData>, Unit> callback)

        Assign a callback that will be called when the organization data changes

      • get

         abstract StytchResult<OrganizationResponseData> get()

        Wraps Stytch’s organization/me endpoint.

        Returns:

        OrganizationResponse

      • get

         abstract Unit get(Function1<StytchResult<OrganizationResponseData>, Unit> callback)

        Wraps Stytch’s organization/me endpoint.

        Parameters:
        callback - a callback that receives an OrganizationResponse
      • getSync

         abstract OrganizationData getSync()

        Get member from memory without network call

        Returns:

        locally stored Organization

      • update

         abstract StytchResult<OrganizationUpdateResponseData> update(Organization.UpdateOrganizationParameters parameters)

        Updates the Organization of the logged-in member. The member must have permission to call this endpoint via the project's RBAC policy & their role assignments. An Organization must always have at least one auth setting set to either RESTRICTED or ALL_ALLOWED in order to provision new Members.

        Parameters:
        parameters - the parameters required for updating an organization
        Returns:

        UpdateOrganizationResponse

      • update

         abstract Unit update(Organization.UpdateOrganizationParameters parameters, Function1<StytchResult<OrganizationUpdateResponseData>, Unit> callback)

        Updates the Organization of the logged-in member. The member must have permission to call this endpoint via the project's RBAC policy & their role assignments. An Organization must always have at least one auth setting set to either RESTRICTED or ALL_ALLOWED in order to provision new Members.

        Parameters:
        parameters - the parameters required for updating an organization
        callback - a callback that receives an UpdateOrganizationResponse
      • updateCompletable

         abstract CompletableFuture<StytchResult<OrganizationUpdateResponseData>> updateCompletable(Organization.UpdateOrganizationParameters parameters)

        Updates the Organization of the logged-in member. The member must have permission to call this endpoint via the project's RBAC policy & their role assignments. An Organization must always have at least one auth setting set to either RESTRICTED or ALL_ALLOWED in order to provision new Members.

        Parameters:
        parameters - the parameters required for updating an organization
        Returns:

        UpdateOrganizationResponse

      • delete

         abstract StytchResult<OrganizationDeleteResponseData> delete()

        Deletes the Organization of the logged-in member. All Members of the Organization will also be deleted. The member must have permission to call this endpoint via the project's RBAC policy & their role assignments. Note: This endpoint will log out the current member, as they will also be deleted

        Returns:

        DeleteOrganizationResponse

      • delete

         abstract Unit delete(Function1<StytchResult<OrganizationDeleteResponseData>, Unit> callback)

        Deletes the Organization of the logged-in member. All Members of the Organization will also be deleted. The member must have permission to call this endpoint via the project's RBAC policy & their role assignments. Note: This endpoint will log out the current member, as they will also be deleted

        Parameters:
        callback - a callback that receives a DeleteOrganizationResponse
      • deleteCompletable

         abstract CompletableFuture<StytchResult<OrganizationDeleteResponseData>> deleteCompletable()

        Deletes the Organization of the logged-in member. All Members of the Organization will also be deleted. The member must have permission to call this endpoint via the project's RBAC policy & their role assignments. Note: This endpoint will log out the current member, as they will also be deleted

        Returns:

        DeleteOrganizationResponse