Options
All
  • Public
  • Public/Protected
  • All
Menu

Offers handler class

Hierarchy

  • Offers

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

Private transport

transport: API

Handles communication with API

Methods

accept

  • accept(offer: Offer, headers: object): Promise<AxiosResponse>
  • Accepts an offer.

    Parameters

    • offer: Offer

      Offer to accept

    • headers: object

      Request headers

    Returns Promise<AxiosResponse>

    A promise that resolves to a boolean indicating whether the request was successful

counter

  • counter(offer: Offer, counterOffer: object, headers: object): Promise<AxiosResponse>
  • Counteroffers with a new offer

    Parameters

    • offer: Offer

      Offer to counteroffer

    • counterOffer: object

      Counteroffer object { offerAmount: number }

      • offerAmount: number
    • headers: object

      Request headers

    Returns Promise<AxiosResponse>

    A promise that resolves to a boolean indicating whether the request was successful

findAll

  • Retrieves all offers

    Parameters

    Returns Promise<AxiosResponse>

    A promise that resolves to an array of offers

findById

  • findById(offerId: number, headers: object): Promise<AxiosResponse>
  • Retrieves an offer by ID

    Parameters

    • offerId: number

      offerId

    • headers: object

      Request headers

    Returns Promise<AxiosResponse>

    A promise that resolves to an offer

Generated using TypeDoc