Skip to content

Latest commit

 

History

History
130 lines (100 loc) · 3.85 KB

README.md

File metadata and controls

130 lines (100 loc) · 3.85 KB

Members

(organizations().members())

Available Operations

  • delete - Remove a member from organization using memberId
  • list - Fetch all members of current organizations

delete

Remove a member from organization using memberId

Example Usage

package hello.world;

import co.novu.co.novu.sdk.Novu;
import co.novu.co.novu.sdk.models.components.*;
import co.novu.co.novu.sdk.models.components.Security;
import co.novu.co.novu.sdk.models.operations.*;
import co.novu.co.novu.sdk.utils.EventStream;
import java.math.BigDecimal;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import java.util.Optional;
import org.openapitools.jackson.nullable.JsonNullable;
import static java.util.Map.entry;

public class Application {

    public static void main(String[] args) throws Exception {
        try {
            Novu sdk = Novu.builder()
                .apiKey("<YOUR_API_KEY_HERE>")
                .build();

            OrganizationControllerRemoveResponse res = sdk.organizations().members().delete()
                .memberId("<value>")
                .call();

            if (res.memberResponseDto().isPresent()) {
                // handle response
            }
        } catch (co.novu.co.novu.sdk.models.errors.SDKError e) {
            // handle exception
            throw e;
        } catch (Exception e) {
            // handle exception
            throw e;
        }
    }
}

Parameters

Parameter Type Required Description
memberId String ✔️ N/A

Response

Optional<? extends co.novu.co.novu.sdk.models.operations.OrganizationControllerRemoveResponse>

Errors

Error Object Status Code Content Type
models/errors/SDKError 4xx-5xx /

list

Fetch all members of current organizations

Example Usage

package hello.world;

import co.novu.co.novu.sdk.Novu;
import co.novu.co.novu.sdk.models.components.*;
import co.novu.co.novu.sdk.models.components.Security;
import co.novu.co.novu.sdk.models.operations.*;
import co.novu.co.novu.sdk.utils.EventStream;
import java.math.BigDecimal;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import java.util.Optional;
import org.openapitools.jackson.nullable.JsonNullable;
import static java.util.Map.entry;

public class Application {

    public static void main(String[] args) throws Exception {
        try {
            Novu sdk = Novu.builder()
                .apiKey("<YOUR_API_KEY_HERE>")
                .build();

            OrganizationControllerListOrganizationMembersResponse res = sdk.organizations().members().list()
                .call();

            if (res.memberResponseDtos().isPresent()) {
                // handle response
            }
        } catch (co.novu.co.novu.sdk.models.errors.SDKError e) {
            // handle exception
            throw e;
        } catch (Exception e) {
            // handle exception
            throw e;
        }
    }
}

Response

Optional<? extends co.novu.co.novu.sdk.models.operations.OrganizationControllerListOrganizationMembersResponse>

Errors

Error Object Status Code Content Type
models/errors/SDKError 4xx-5xx /