Class OfferCollectionOperations

All Implemented Interfaces:
IPartnerComponent<String>, IPartnerComponentString, IOfferCollection

public class OfferCollectionOperations
extends BasePartnerComponentString
implements IOfferCollection
Offer Collection operations implementation.
  • Constructor Details

    • OfferCollectionOperations

      public OfferCollectionOperations​(IPartner rootPartnerOperations, String country)
      Initializes a new instance of the OfferCollectionOperations class.
      Parameters:
      rootPartnerOperations - The root partner operations instance.
      country - The country on which to base the offers
  • Method Details

    • byId

      public IOffer byId​(String offerId)
      Retrieves the operations tied with a specific offer.
      Specified by:
      byId in interface IOfferCollection
      Parameters:
      offerId - The offer id.
      Returns:
      The offer operations.
    • get

      public ResourceCollection<Offer> get()
      Retrieves all the offers for the provided country.
      Specified by:
      get in interface IOfferCollection
      Returns:
      All offers for the provided country.
    • get

      public ResourceCollection<Offer> get​(int offset, int size)
      Retrieves all the offers for the provided country.
      Specified by:
      get in interface IOfferCollection
      Parameters:
      offset - The starting index.
      size - The maximum number of offers to return.
      Returns:
      All offers for the provided country.
    • byCategory

      public ICategoryOffersCollection byCategory​(String categoryId)
      Retrieves the operations that can be applied on offers the belong to an offer category.
      Specified by:
      byCategory in interface IOfferCollection
      Parameters:
      categoryId - The offer category Id.
      Returns:
      The category offers operations.