Class ResellerApi

java.lang.Object
software.xdev.brevo.client.BaseApi
software.xdev.brevo.api.ResellerApi

public class ResellerApi extends BaseApi
  • Constructor Details

    • ResellerApi

      public ResellerApi()
    • ResellerApi

      public ResellerApi(ApiClient apiClient)
  • Method Details

    • addCredits

      public RemainingCreditModel addCredits(String childIdentifier, AddCredits addCredits) throws ApiException
      Add Email and/or SMS credits to a specific child account
      Parameters:
      childIdentifier - Either auth key or id of reseller's child (required)
      addCredits - Values to post to add credit to a specific child account (required)
      Returns:
      RemainingCreditModel
      Throws:
      ApiException - if fails to make API call
    • addCredits

      public RemainingCreditModel addCredits(String childIdentifier, AddCredits addCredits, Map<String,String> additionalHeaders) throws ApiException
      Add Email and/or SMS credits to a specific child account
      Parameters:
      childIdentifier - Either auth key or id of reseller's child (required)
      addCredits - Values to post to add credit to a specific child account (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      RemainingCreditModel
      Throws:
      ApiException - if fails to make API call
    • associateIpToChild

      public void associateIpToChild(String childIdentifier, ManageIp ip) throws ApiException
      Associate a dedicated IP to the child
      Parameters:
      childIdentifier - Either auth key or id of reseller's child (required)
      ip - IP to associate (required)
      Throws:
      ApiException - if fails to make API call
    • associateIpToChild

      public void associateIpToChild(String childIdentifier, ManageIp ip, Map<String,String> additionalHeaders) throws ApiException
      Associate a dedicated IP to the child
      Parameters:
      childIdentifier - Either auth key or id of reseller's child (required)
      ip - IP to associate (required)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • createChildDomain

      public void createChildDomain(String childIdentifier, AddChildDomain addChildDomain) throws ApiException
      Create a domain for a child account
      Parameters:
      childIdentifier - Either auth key or id of reseller's child (required)
      addChildDomain - Sender domain to add for a specific child account. This will not be displayed to the parent account. (required)
      Throws:
      ApiException - if fails to make API call
    • createChildDomain

      public void createChildDomain(String childIdentifier, AddChildDomain addChildDomain, Map<String,String> additionalHeaders) throws ApiException
      Create a domain for a child account
      Parameters:
      childIdentifier - Either auth key or id of reseller's child (required)
      addChildDomain - Sender domain to add for a specific child account. This will not be displayed to the parent account. (required)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • createResellerChild

      public CreateReseller createResellerChild(CreateChild createChild) throws ApiException
      Creates a reseller child
      Parameters:
      createChild - reseller child to add (optional)
      Returns:
      CreateReseller
      Throws:
      ApiException - if fails to make API call
    • createResellerChild

      public CreateReseller createResellerChild(CreateChild createChild, Map<String,String> additionalHeaders) throws ApiException
      Creates a reseller child
      Parameters:
      createChild - reseller child to add (optional)
      additionalHeaders - additionalHeaders for this call
      Returns:
      CreateReseller
      Throws:
      ApiException - if fails to make API call
    • deleteChildDomain

      public void deleteChildDomain(String childIdentifier, String domainName) throws ApiException
      Delete the sender domain of the reseller child based on the childIdentifier and domainName passed
      Parameters:
      childIdentifier - Either auth key or id of reseller's child (required)
      domainName - Pass the existing domain that needs to be deleted (required)
      Throws:
      ApiException - if fails to make API call
    • deleteChildDomain

      public void deleteChildDomain(String childIdentifier, String domainName, Map<String,String> additionalHeaders) throws ApiException
      Delete the sender domain of the reseller child based on the childIdentifier and domainName passed
      Parameters:
      childIdentifier - Either auth key or id of reseller's child (required)
      domainName - Pass the existing domain that needs to be deleted (required)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • deleteResellerChild

      public void deleteResellerChild(String childIdentifier) throws ApiException
      Delete a single reseller child based on the child identifier supplied
      Parameters:
      childIdentifier - Either auth key or child id of reseller's child (required)
      Throws:
      ApiException - if fails to make API call
    • deleteResellerChild

      public void deleteResellerChild(String childIdentifier, Map<String,String> additionalHeaders) throws ApiException
      Delete a single reseller child based on the child identifier supplied
      Parameters:
      childIdentifier - Either auth key or child id of reseller's child (required)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • dissociateIpFromChild

      public void dissociateIpFromChild(String childIdentifier, ManageIp ip) throws ApiException
      Dissociate a dedicated IP to the child
      Parameters:
      childIdentifier - Either auth key or id of reseller's child (required)
      ip - IP to dissociate (required)
      Throws:
      ApiException - if fails to make API call
    • dissociateIpFromChild

      public void dissociateIpFromChild(String childIdentifier, ManageIp ip, Map<String,String> additionalHeaders) throws ApiException
      Dissociate a dedicated IP to the child
      Parameters:
      childIdentifier - Either auth key or id of reseller's child (required)
      ip - IP to dissociate (required)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • getChildAccountCreationStatus

      public GetChildAccountCreationStatus getChildAccountCreationStatus(String childIdentifier) throws ApiException
      Get the status of a reseller's child account creation, whether it is successfully created (exists) or not based on the childIdentifier supplied
      Parameters:
      childIdentifier - Either auth key or id of reseller's child (required)
      Returns:
      GetChildAccountCreationStatus
      Throws:
      ApiException - if fails to make API call
    • getChildAccountCreationStatus

      public GetChildAccountCreationStatus getChildAccountCreationStatus(String childIdentifier, Map<String,String> additionalHeaders) throws ApiException
      Get the status of a reseller's child account creation, whether it is successfully created (exists) or not based on the childIdentifier supplied
      Parameters:
      childIdentifier - Either auth key or id of reseller's child (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      GetChildAccountCreationStatus
      Throws:
      ApiException - if fails to make API call
    • getChildDomains

      public List<GetChildDomain> getChildDomains(String childIdentifier) throws ApiException
      Get all sender domains for a specific child account
      Parameters:
      childIdentifier - Either auth key or id of reseller's child (required)
      Returns:
      List<GetChildDomain>
      Throws:
      ApiException - if fails to make API call
    • getChildDomains

      public List<GetChildDomain> getChildDomains(String childIdentifier, Map<String,String> additionalHeaders) throws ApiException
      Get all sender domains for a specific child account
      Parameters:
      childIdentifier - Either auth key or id of reseller's child (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      List<GetChildDomain>
      Throws:
      ApiException - if fails to make API call
    • getChildInfo

      public GetChildInfo getChildInfo(String childIdentifier) throws ApiException
      Get a child account's details
      Parameters:
      childIdentifier - Either auth key or id of reseller's child (required)
      Returns:
      GetChildInfo
      Throws:
      ApiException - if fails to make API call
    • getChildInfo

      public GetChildInfo getChildInfo(String childIdentifier, Map<String,String> additionalHeaders) throws ApiException
      Get a child account's details
      Parameters:
      childIdentifier - Either auth key or id of reseller's child (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      GetChildInfo
      Throws:
      ApiException - if fails to make API call
    • getResellerChilds

      public GetChildrenList getResellerChilds(Long limit, Long offset) throws ApiException
      Get the list of all children accounts
      Parameters:
      limit - Number of documents for child accounts information per page (optional, default to 10)
      offset - Index of the first document in the page (optional, default to 0)
      Returns:
      GetChildrenList
      Throws:
      ApiException - if fails to make API call
    • getResellerChilds

      public GetChildrenList getResellerChilds(Long limit, Long offset, Map<String,String> additionalHeaders) throws ApiException
      Get the list of all children accounts
      Parameters:
      limit - Number of documents for child accounts information per page (optional, default to 10)
      offset - Index of the first document in the page (optional, default to 0)
      additionalHeaders - additionalHeaders for this call
      Returns:
      GetChildrenList
      Throws:
      ApiException - if fails to make API call
    • getSsoToken

      public GetSsoToken getSsoToken(String childIdentifier) throws ApiException
      Get session token to access Brevo (SSO) It returns a session [token] which will remain valid for a short period of time. A child account will be able to access a white-labeled section by using the following url pattern => https:/email.mydomain.com/login/sso?token=[token]
      Parameters:
      childIdentifier - Either auth key or id of reseller's child (required)
      Returns:
      GetSsoToken
      Throws:
      ApiException - if fails to make API call
    • getSsoToken

      public GetSsoToken getSsoToken(String childIdentifier, Map<String,String> additionalHeaders) throws ApiException
      Get session token to access Brevo (SSO) It returns a session [token] which will remain valid for a short period of time. A child account will be able to access a white-labeled section by using the following url pattern => https:/email.mydomain.com/login/sso?token=[token]
      Parameters:
      childIdentifier - Either auth key or id of reseller's child (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      GetSsoToken
      Throws:
      ApiException - if fails to make API call
    • removeCredits

      public RemainingCreditModel removeCredits(String childIdentifier, RemoveCredits removeCredits) throws ApiException
      Remove Email and/or SMS credits from a specific child account
      Parameters:
      childIdentifier - Either auth key or id of reseller's child (required)
      removeCredits - Values to post to remove email or SMS credits from a specific child account (required)
      Returns:
      RemainingCreditModel
      Throws:
      ApiException - if fails to make API call
    • removeCredits

      public RemainingCreditModel removeCredits(String childIdentifier, RemoveCredits removeCredits, Map<String,String> additionalHeaders) throws ApiException
      Remove Email and/or SMS credits from a specific child account
      Parameters:
      childIdentifier - Either auth key or id of reseller's child (required)
      removeCredits - Values to post to remove email or SMS credits from a specific child account (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      RemainingCreditModel
      Throws:
      ApiException - if fails to make API call
    • updateChildAccountStatus

      public void updateChildAccountStatus(String childIdentifier, UpdateChildAccountStatus updateChildAccountStatus) throws ApiException
      Update info of reseller's child account status based on the identifier supplied
      Parameters:
      childIdentifier - Either auth key or id of reseller's child (required)
      updateChildAccountStatus - values to update in child account status (required)
      Throws:
      ApiException - if fails to make API call
    • updateChildAccountStatus

      public void updateChildAccountStatus(String childIdentifier, UpdateChildAccountStatus updateChildAccountStatus, Map<String,String> additionalHeaders) throws ApiException
      Update info of reseller's child account status based on the identifier supplied
      Parameters:
      childIdentifier - Either auth key or id of reseller's child (required)
      updateChildAccountStatus - values to update in child account status (required)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • updateChildDomain

      public void updateChildDomain(String childIdentifier, String domainName, UpdateChildDomain updateChildDomain) throws ApiException
      Update the sender domain of reseller's child based on the childIdentifier and domainName passed
      Parameters:
      childIdentifier - Either auth key or id of reseller's child (required)
      domainName - Pass the existing domain that needs to be updated (required)
      updateChildDomain - value to update for sender domain (required)
      Throws:
      ApiException - if fails to make API call
    • updateChildDomain

      public void updateChildDomain(String childIdentifier, String domainName, UpdateChildDomain updateChildDomain, Map<String,String> additionalHeaders) throws ApiException
      Update the sender domain of reseller's child based on the childIdentifier and domainName passed
      Parameters:
      childIdentifier - Either auth key or id of reseller's child (required)
      domainName - Pass the existing domain that needs to be updated (required)
      updateChildDomain - value to update for sender domain (required)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • updateResellerChild

      public void updateResellerChild(String childIdentifier, UpdateChild resellerChild) throws ApiException
      Update info of reseller's child based on the child identifier supplied
      Parameters:
      childIdentifier - Either auth key or id of reseller's child (required)
      resellerChild - values to update in child profile (required)
      Throws:
      ApiException - if fails to make API call
    • updateResellerChild

      public void updateResellerChild(String childIdentifier, UpdateChild resellerChild, Map<String,String> additionalHeaders) throws ApiException
      Update info of reseller's child based on the child identifier supplied
      Parameters:
      childIdentifier - Either auth key or id of reseller's child (required)
      resellerChild - values to update in child profile (required)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • invokeAPI

      public <T> T invokeAPI(String url, String method, Object request, com.fasterxml.jackson.core.type.TypeReference<T> returnType, Map<String,String> additionalHeaders) throws ApiException
      Description copied from class: BaseApi
      Directly invoke the API for the given URL. Useful if the API returns direct links/URLs for subsequent requests.
      Specified by:
      invokeAPI in class BaseApi
      Parameters:
      url - The URL for the request, either full URL or only the path.
      method - The HTTP method for the request.
      request - The request object.
      returnType - The return type.
      additionalHeaders - Additional headers for the request.
      Returns:
      The API response in the specified type.
      Throws:
      ApiException - if fails to make API call.