Class CouponsApi

java.lang.Object
software.xdev.brevo.api.CouponsApi

@Generated("org.openapitools.codegen.languages.JavaClientCodegen") public class CouponsApi extends Object
  • Constructor Details

    • CouponsApi

      public CouponsApi()
    • CouponsApi

      public CouponsApi(ApiClient apiClient)
  • Method Details

    • getApiClient

      public ApiClient getApiClient()
    • setApiClient

      public void setApiClient(ApiClient apiClient)
    • createCouponCollection

      public CreateCouponCollection201Response createCouponCollection(CreateCouponCollectionRequest createCouponCollectionRequest) throws ApiException
      Create а coupon collection
      Parameters:
      createCouponCollectionRequest - Values to create a coupon collection (required)
      Returns:
      CreateCouponCollection201Response
      Throws:
      ApiException - if fails to make API call
    • createCouponCollection

      public CreateCouponCollection201Response createCouponCollection(CreateCouponCollectionRequest createCouponCollectionRequest, Map<String,String> additionalHeaders) throws ApiException
      Create а coupon collection
      Parameters:
      createCouponCollectionRequest - Values to create a coupon collection (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      CreateCouponCollection201Response
      Throws:
      ApiException - if fails to make API call
    • createCoupons

      public void createCoupons(CreateCouponsRequest createCouponsRequest) throws ApiException
      Create coupons for a coupon collection
      Parameters:
      createCouponsRequest - Values to create coupons (required)
      Throws:
      ApiException - if fails to make API call
    • createCoupons

      public void createCoupons(CreateCouponsRequest createCouponsRequest, Map<String,String> additionalHeaders) throws ApiException
      Create coupons for a coupon collection
      Parameters:
      createCouponsRequest - Values to create coupons (required)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • getCouponCollection

      public GetCouponCollection getCouponCollection(String id) throws ApiException
      Get a coupon collection by id
      Parameters:
      id - Id of the collection to return (required)
      Returns:
      GetCouponCollection
      Throws:
      ApiException - if fails to make API call
    • getCouponCollection

      public GetCouponCollection getCouponCollection(String id, Map<String,String> additionalHeaders) throws ApiException
      Get a coupon collection by id
      Parameters:
      id - Id of the collection to return (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      GetCouponCollection
      Throws:
      ApiException - if fails to make API call
    • getCouponCollections

      public GetCouponCollection getCouponCollections(Long limit, Long offset, String sort) throws ApiException
      Get all your coupon collections
      Parameters:
      limit - Number of documents returned per page (optional, default to 50)
      offset - Index of the first document on the page (optional, default to 0)
      sort - Sort the results by creation time in ascending/descending order (optional, default to desc)
      Returns:
      GetCouponCollection
      Throws:
      ApiException - if fails to make API call
    • getCouponCollections

      public GetCouponCollection getCouponCollections(Long limit, Long offset, String sort, Map<String,String> additionalHeaders) throws ApiException
      Get all your coupon collections
      Parameters:
      limit - Number of documents returned per page (optional, default to 50)
      offset - Index of the first document on the page (optional, default to 0)
      sort - Sort the results by creation time in ascending/descending order (optional, default to desc)
      additionalHeaders - additionalHeaders for this call
      Returns:
      GetCouponCollection
      Throws:
      ApiException - if fails to make API call
    • updateCouponCollection

      public UpdateCouponCollection200Response updateCouponCollection(String id, UpdateCouponCollectionRequest updateCouponCollectionRequest) throws ApiException
      Update a coupon collection by id
      Parameters:
      id - Id of the collection to update (required)
      updateCouponCollectionRequest - Values to update the coupon collection (required)
      Returns:
      UpdateCouponCollection200Response
      Throws:
      ApiException - if fails to make API call
    • updateCouponCollection

      public UpdateCouponCollection200Response updateCouponCollection(String id, UpdateCouponCollectionRequest updateCouponCollectionRequest, Map<String,String> additionalHeaders) throws ApiException
      Update a coupon collection by id
      Parameters:
      id - Id of the collection to update (required)
      updateCouponCollectionRequest - Values to update the coupon collection (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      UpdateCouponCollection200Response
      Throws:
      ApiException - if fails to make API call