Module: BookingSync::API::Client::RentalCancelationPolicyItems

Included in:
BookingSync::API::Client
Defined in:
lib/bookingsync/api/client/rental_cancelation_policy_items.rb

Instance Method Summary collapse

Instance Method Details

#rental_cancelation_policy_item(rental_cancelation_policy_item, options = {}) ⇒ BookingSync::API::Resource

Get a single rental cancelation policy item

Parameters:

  • rental_cancelation_policy_item (BookingSync::API::Resource|Integer)

    RentalCancelationPolicyItem or ID of the rental cancelation policy item.

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

    A customizable set of query options.

Options Hash (options):

  • fields: (Array)

    List of fields to be fetched.

Returns:



29
30
31
# File 'lib/bookingsync/api/client/rental_cancelation_policy_items.rb', line 29

def rental_cancelation_policy_item(rental_cancelation_policy_item, options = {})
  get("rental_cancelation_policy_items/#{rental_cancelation_policy_item}", options).pop
end

#rental_cancelation_policy_items(options = {}, &block) ⇒ Array<BookingSync::API::Resource>

List rental cancelation policy items.

Returns rental cancelation policy items for the rentals of the account and account itself user is authenticated with.

Examples:

Get the list of rental cancelation policy items for the current account

item = @api.rental_cancelation_policy_items
item.first.eligible_days # => 10

Get the list of rental cancelation policy items only with eligible_days for smaller response

@api.rental_cancelation_policy_items(fields: :eligible_days)

Parameters:

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

    A customizable set of options.

Options Hash (options):

  • fields: (Array)

    List of fields to be fetched.

Returns:

See Also:



18
19
20
# File 'lib/bookingsync/api/client/rental_cancelation_policy_items.rb', line 18

def rental_cancelation_policy_items(options = {}, &block)
  paginate :rental_cancelation_policy_items, options, &block
end