Show:

A bookings list and its metadata.

Table of Contents

Constructor

SnapCar.BookingHistory
(
  • limit=20
)

Parameters:

  • [limit=20] Number optional

    The maximum number of elements to return.

Methods

moreBookingsAvailable () Boolean

Tells whether more bookings are available in the history regarding the current offset in the pagination and the total number of bookings. If yes, the SnapCar.BookingHistory.nextBookings method can be called.

Returns:

Boolean:

Whether more bookings are available or not.

nextBookings () jQuery.Promise

Loads the next bookings in the history regarding the current offset in the pagination.

Returns:

jQuery.Promise:

A Promise object. Success handlers are called with a SnapCar.BookingHistory as the single argument. Failure handlers are called with a single SnapCar.APIError argument upon error.

Properties

count

Number const

The number of bookings fetched.

history

Array const

The list of SnapCar.Booking fetched

offset

Number const

The current position in the pagination.

total

Number const

The total number of bookings in the history.