Module: HomeAway::API::Domain::MyInbox

Included in:
Client
Defined in:
lib/homeaway/api/domain/my_inbox.rb

Instance Method Summary collapse

Instance Method Details

#my_inbox(opts = {}) ⇒ HomeAway::API::Paginator

Note:

user must be logged in via 3 legged oauth to call this function without error

Load the Owner’s Inbox for the logged-in User

analogous to calling a GET on API url /public/myInbox

Headers:

  • X-HomeAway-DisplayLocale: If a locale is not specified in a query param, it will be searched for in the X-HomeAway-DisplayLocale Header. If it is not supplied in either area the default locale of the user will be selected if it exists. Otherwise the Accept-Language Header will be used.

Parameters:

  • opts (Hash) (defaults to: {})

    a customizable set of options

Options Hash (opts):

  • :status (String)

    The conversation status by which to filter the inbox. The supported values for this param are: BLOCKED_RESERVATION, BOOKING, CANCELLED, INQUIRY, PAYMENT_REQUEST_SENT, POST_STAY, QUOTE_SENT, REPLIED, RESERVATION, RESERVATION_DOWNLOADABLE, RESERVATION_REQUEST, RESERVATION_REQUEST_DECLINED, RESERVATION_REQUEST_EXPIRED, STAYING, TENTATIVE_RESERVATION, UNKNOWN, RECALCULATE

  • :unreplied_only (Boolean)

    A flag indicating that the inbox should be populated by only unreplied conversations

  • :sort (String)

    The field by which to Sort Conversations.

  • :before_date (DateTime or Date parsible string)

    Conversations will not be included in the results unless they had some activity on or before this date. Use yyyy-MM-dd as the format

  • :archived (Boolean)

    A flag indicating that the inbox should be populated by only archived conversations

  • :search (String)

    A string to search for.

  • :inquiries (Boolean)

    A flag indicating the inbox should be populated by only inquiries

  • :sort_reservation_requests_inline (Boolean)

    If True, in the default Inbox view, sort Reservation Requests inline rather than at the top.

  • :reservations (Boolean)

    A flag indicating the inbox should be populated by only reservations

  • :sort_order (String)

    The order to sort by, ASC or DESC.

  • :unread_only (Boolean)

    A flag indicating that the inbox should be populated by only unread conversations

  • :after_date (DateTime or Date parsible string)

    Conversations will not be included in the results unless they had some activity on or after this date. Use yyyy-MM-dd as the format

  • :page (Integer)

    The page of the result set

  • :page_size (Integer)

    The size of a page of results

  • :as_traveler (Boolean)

    set this to true if you are attempting to get a traveler’s inbox, defaults to false which will retrieve an owner’s inbox

Returns:



46
47
48
49
50
51
52
53
54
# File 'lib/homeaway/api/domain/my_inbox.rb', line 46

def my_inbox(opts={})
  params = {
      'page' => 1,
      'pageSize' => @configuration.page_size,
      'asTraveler' => false
  }.merge(HomeAway::API::Util::Validators.query_keys(opts))
  hashie = get '/public/myInbox', params
  HomeAway::API::Paginator.new(self, hashie, @configuration.auto_pagination)
end