bookingsync-api 0.0.23 → 0.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/bookingsync/api/client.rb +10 -0
- data/lib/bookingsync/api/client/availabilities.rb +9 -0
- data/lib/bookingsync/api/client/bookings_fees.rb +22 -0
- data/lib/bookingsync/api/client/bookings_taxes.rb +22 -0
- data/lib/bookingsync/api/client/fees.rb +22 -0
- data/lib/bookingsync/api/client/rentals_fees.rb +22 -0
- data/lib/bookingsync/api/client/taxes.rb +22 -0
- data/lib/bookingsync/api/resource.rb +24 -5
- data/lib/bookingsync/api/version.rb +1 -1
- data/spec/bookingsync/api/client/availabilities_spec.rb +7 -0
- data/spec/bookingsync/api/client/bookings_fees_spec.rb +12 -0
- data/spec/bookingsync/api/client/bookings_taxes_spec.rb +12 -0
- data/spec/bookingsync/api/client/fees_spec.rb +12 -0
- data/spec/bookingsync/api/client/rentals_fees_spec.rb +12 -0
- data/spec/bookingsync/api/client/taxes_spec.rb +12 -0
- data/spec/bookingsync/api/resource_spec.rb +15 -1
- data/spec/fixtures/cassettes/BookingSync_API_Client_Availabilities/_availability/returns_a_single_availability.yml +80 -0
- data/spec/fixtures/cassettes/BookingSync_API_Client_BookingsFees/_bookings_fees/returns_bookings_fees.yml +81 -0
- data/spec/fixtures/cassettes/BookingSync_API_Client_BookingsTaxes/_bookings_taxes/returns_bookings_taxes.yml +81 -0
- data/spec/fixtures/cassettes/BookingSync_API_Client_Fees/_fees/returns_fees.yml +80 -0
- data/spec/fixtures/cassettes/BookingSync_API_Client_RentalsFees/_rentals_fees/returns_rentals_fees.yml +80 -0
- data/spec/fixtures/cassettes/BookingSync_API_Client_Taxes/_taxes/returns_taxes.yml +80 -0
- metadata +30 -3
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 64157839a5f71323210c1c480c175d47e3f75849
         | 
| 4 | 
            +
              data.tar.gz: bddc5df477750bbd7412e3c9853f4ce966171e1b
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: f3ded525d4e27a238ea688846f1113f136175b648c243e52a9add0a301e45d108165b52a867dab51ecb14eec35e322e2ef8ae79550223ff4317e855dcbdc03ee
         | 
| 7 | 
            +
              data.tar.gz: 24c48b5acc3da9f6d8cae714b47875ca933c31479019301168e356b046a9ba102108331ac4a3cb03d92f62651cccff8973a8032301de31185f160d7356d7c59f
         | 
    
        data/CHANGELOG.md
    CHANGED
    
    | @@ -2,6 +2,12 @@ | |
| 2 2 |  | 
| 3 3 | 
             
            ## master
         | 
| 4 4 |  | 
| 5 | 
            +
            ## 0.0.24
         | 
| 6 | 
            +
             | 
| 7 | 
            +
            - Add support for fetching a single availability
         | 
| 8 | 
            +
            - Add support for polymorphic associations
         | 
| 9 | 
            +
            - Add support for Taxes, Fees, BookingsTaxes, BookingsFees and RentalsFees endpoints
         | 
| 10 | 
            +
             | 
| 5 11 | 
             
            ## 0.0.23
         | 
| 6 12 |  | 
| 7 13 | 
             
            - Add BookingSync::Engine::APIClient that automatically refreshes token on 401 expired responses.
         | 
| @@ -3,9 +3,12 @@ require "bookingsync/api/client/amenities" | |
| 3 3 | 
             
            require "bookingsync/api/client/availabilities"
         | 
| 4 4 | 
             
            require "bookingsync/api/client/billing_addresses"
         | 
| 5 5 | 
             
            require "bookingsync/api/client/bookings"
         | 
| 6 | 
            +
            require "bookingsync/api/client/bookings_fees"
         | 
| 6 7 | 
             
            require "bookingsync/api/client/bookings_payments"
         | 
| 8 | 
            +
            require "bookingsync/api/client/bookings_taxes"
         | 
| 7 9 | 
             
            require "bookingsync/api/client/clients"
         | 
| 8 10 | 
             
            require "bookingsync/api/client/destinations"
         | 
| 11 | 
            +
            require "bookingsync/api/client/fees"
         | 
| 9 12 | 
             
            require "bookingsync/api/client/inquiries"
         | 
| 10 13 | 
             
            require "bookingsync/api/client/periods"
         | 
| 11 14 | 
             
            require "bookingsync/api/client/payments"
         | 
| @@ -14,12 +17,14 @@ require "bookingsync/api/client/rates" | |
| 14 17 | 
             
            require "bookingsync/api/client/rates_rules"
         | 
| 15 18 | 
             
            require "bookingsync/api/client/rates_tables"
         | 
| 16 19 | 
             
            require "bookingsync/api/client/rentals"
         | 
| 20 | 
            +
            require "bookingsync/api/client/rentals_fees"
         | 
| 17 21 | 
             
            require "bookingsync/api/client/rentals_amenities"
         | 
| 18 22 | 
             
            require "bookingsync/api/client/rental_agreements"
         | 
| 19 23 | 
             
            require "bookingsync/api/client/reviews"
         | 
| 20 24 | 
             
            require "bookingsync/api/client/seasons"
         | 
| 21 25 | 
             
            require "bookingsync/api/client/special_offers"
         | 
| 22 26 | 
             
            require "bookingsync/api/client/sources"
         | 
| 27 | 
            +
            require "bookingsync/api/client/taxes"
         | 
| 23 28 | 
             
            require "bookingsync/api/error"
         | 
| 24 29 | 
             
            require "bookingsync/api/relation"
         | 
| 25 30 | 
             
            require "bookingsync/api/response"
         | 
| @@ -34,9 +39,12 @@ module BookingSync::API | |
| 34 39 | 
             
                include BookingSync::API::Client::Availabilities
         | 
| 35 40 | 
             
                include BookingSync::API::Client::BillingAddresses
         | 
| 36 41 | 
             
                include BookingSync::API::Client::Bookings
         | 
| 42 | 
            +
                include BookingSync::API::Client::BookingsFees
         | 
| 37 43 | 
             
                include BookingSync::API::Client::BookingsPayments
         | 
| 44 | 
            +
                include BookingSync::API::Client::BookingsTaxes
         | 
| 38 45 | 
             
                include BookingSync::API::Client::Clients
         | 
| 39 46 | 
             
                include BookingSync::API::Client::Destinations
         | 
| 47 | 
            +
                include BookingSync::API::Client::Fees
         | 
| 40 48 | 
             
                include BookingSync::API::Client::Inquiries
         | 
| 41 49 | 
             
                include BookingSync::API::Client::Periods
         | 
| 42 50 | 
             
                include BookingSync::API::Client::Payments
         | 
| @@ -45,12 +53,14 @@ module BookingSync::API | |
| 45 53 | 
             
                include BookingSync::API::Client::RatesRules
         | 
| 46 54 | 
             
                include BookingSync::API::Client::RatesTables
         | 
| 47 55 | 
             
                include BookingSync::API::Client::Rentals
         | 
| 56 | 
            +
                include BookingSync::API::Client::RentalsFees
         | 
| 48 57 | 
             
                include BookingSync::API::Client::RentalsAmenities
         | 
| 49 58 | 
             
                include BookingSync::API::Client::RentalAgreements
         | 
| 50 59 | 
             
                include BookingSync::API::Client::Reviews
         | 
| 51 60 | 
             
                include BookingSync::API::Client::Seasons
         | 
| 52 61 | 
             
                include BookingSync::API::Client::SpecialOffers
         | 
| 53 62 | 
             
                include BookingSync::API::Client::Sources
         | 
| 63 | 
            +
                include BookingSync::API::Client::Taxes
         | 
| 54 64 |  | 
| 55 65 | 
             
                MEDIA_TYPE = "application/vnd.api+json"
         | 
| 56 66 |  | 
| @@ -15,6 +15,15 @@ module BookingSync::API | |
| 15 15 | 
             
                  def availabilities(options = {}, &block)
         | 
| 16 16 | 
             
                    paginate :availabilities, options, &block
         | 
| 17 17 | 
             
                  end
         | 
| 18 | 
            +
             | 
| 19 | 
            +
                  # Get a single availability
         | 
| 20 | 
            +
                  #
         | 
| 21 | 
            +
                  # @param availability [BookingSync::API::Resource|Integer] Availability or ID
         | 
| 22 | 
            +
                  #   of the availability.
         | 
| 23 | 
            +
                  # @return [BookingSync::API::Resource]
         | 
| 24 | 
            +
                  def availability(availability)
         | 
| 25 | 
            +
                    get("availabilities/#{availability}").pop
         | 
| 26 | 
            +
                  end
         | 
| 18 27 | 
             
                end
         | 
| 19 28 | 
             
              end
         | 
| 20 29 | 
             
            end
         | 
| @@ -0,0 +1,22 @@ | |
| 1 | 
            +
            module BookingSync::API
         | 
| 2 | 
            +
              class Client
         | 
| 3 | 
            +
                module BookingsFees
         | 
| 4 | 
            +
                  # List bookings fees
         | 
| 5 | 
            +
                  #
         | 
| 6 | 
            +
                  # Returns bookings fees for the account user is authenticated with.
         | 
| 7 | 
            +
                  # @param options [Hash] A customizable set of options.
         | 
| 8 | 
            +
                  # @option options [Array] fields: List of fields to be fetched.
         | 
| 9 | 
            +
                  # @return [Array<BookingSync::API::Resource>] Array of bookings fees.
         | 
| 10 | 
            +
                  #
         | 
| 11 | 
            +
                  # @example Get the list of bookings fees for the current account
         | 
| 12 | 
            +
                  #   bookings_fees = @api.bookings_fees
         | 
| 13 | 
            +
                  #   bookings_fees.first.times_booked # => 1
         | 
| 14 | 
            +
                  # @example Get the list of bookings fees only with times_booked for smaller response
         | 
| 15 | 
            +
                  #   @api.bookings_fees(fields: [:times_booked])
         | 
| 16 | 
            +
                  # @see http://docs.api.bookingsync.com/reference/endpoints/bookings_fees/#list-bookings_fees
         | 
| 17 | 
            +
                  def bookings_fees(options = {}, &block)
         | 
| 18 | 
            +
                    paginate :bookings_fees, options, &block
         | 
| 19 | 
            +
                  end
         | 
| 20 | 
            +
                end
         | 
| 21 | 
            +
              end
         | 
| 22 | 
            +
            end
         | 
| @@ -0,0 +1,22 @@ | |
| 1 | 
            +
            module BookingSync::API
         | 
| 2 | 
            +
              class Client
         | 
| 3 | 
            +
                module BookingsTaxes
         | 
| 4 | 
            +
                  # List bookings taxes
         | 
| 5 | 
            +
                  #
         | 
| 6 | 
            +
                  # Returns bookings taxes for the account user is authenticated with.
         | 
| 7 | 
            +
                  # @param options [Hash] A customizable set of options.
         | 
| 8 | 
            +
                  # @option options [Array] fields: List of fields to be fetched.
         | 
| 9 | 
            +
                  # @return [Array<BookingSync::API::Resource>] Array of bookings taxes.
         | 
| 10 | 
            +
                  #
         | 
| 11 | 
            +
                  # @example Get the list of bookings taxes for the current account
         | 
| 12 | 
            +
                  #   bookings_taxes = @api.bookings_taxes
         | 
| 13 | 
            +
                  #   bookings_taxes.first.percentage # => 20.0
         | 
| 14 | 
            +
                  # @example Get the list of bookings taxes only with percentage for smaller response
         | 
| 15 | 
            +
                  #   @api.bookings_taxes(fields: [:percentage])
         | 
| 16 | 
            +
                  # @see http://docs.api.bookingsync.com/reference/endpoints/bookings_taxes/#list-bookings_taxes
         | 
| 17 | 
            +
                  def bookings_taxes(options = {}, &block)
         | 
| 18 | 
            +
                    paginate :bookings_taxes, options, &block
         | 
| 19 | 
            +
                  end
         | 
| 20 | 
            +
                end
         | 
| 21 | 
            +
              end
         | 
| 22 | 
            +
            end
         | 
| @@ -0,0 +1,22 @@ | |
| 1 | 
            +
            module BookingSync::API
         | 
| 2 | 
            +
              class Client
         | 
| 3 | 
            +
                module Fees
         | 
| 4 | 
            +
                  # List fees
         | 
| 5 | 
            +
                  #
         | 
| 6 | 
            +
                  # Returns fees for the account user is authenticated with.
         | 
| 7 | 
            +
                  # @param options [Hash] A customizable set of options.
         | 
| 8 | 
            +
                  # @option options [Array] fields: List of fields to be fetched.
         | 
| 9 | 
            +
                  # @return [Array<BookingSync::API::Resource>] Array of fees.
         | 
| 10 | 
            +
                  #
         | 
| 11 | 
            +
                  # @example Get the list of fees for the current account
         | 
| 12 | 
            +
                  #   fees = @api.fees
         | 
| 13 | 
            +
                  #   fees.first.rate # => 20.0
         | 
| 14 | 
            +
                  # @example Get the list of fees only with name and rate for smaller response
         | 
| 15 | 
            +
                  #   @api.fees(fields: [:name, :rate])
         | 
| 16 | 
            +
                  # @see http://docs.api.bookingsync.com/reference/endpoints/fees/#list-fees
         | 
| 17 | 
            +
                  def fees(options = {}, &block)
         | 
| 18 | 
            +
                    paginate :fees, options, &block
         | 
| 19 | 
            +
                  end
         | 
| 20 | 
            +
                end
         | 
| 21 | 
            +
              end
         | 
| 22 | 
            +
            end
         | 
| @@ -0,0 +1,22 @@ | |
| 1 | 
            +
            module BookingSync::API
         | 
| 2 | 
            +
              class Client
         | 
| 3 | 
            +
                module RentalsFees
         | 
| 4 | 
            +
                  # List rentals fees
         | 
| 5 | 
            +
                  #
         | 
| 6 | 
            +
                  # Returns rentals fees for the account user is authenticated with.
         | 
| 7 | 
            +
                  # @param options [Hash] A customizable set of options.
         | 
| 8 | 
            +
                  # @option options [Array] fields: List of fields to be fetched.
         | 
| 9 | 
            +
                  # @return [Array<BookingSync::API::Resource>] Array of rentals fees.
         | 
| 10 | 
            +
                  #
         | 
| 11 | 
            +
                  # @example Get the list of rentals fees for the current account
         | 
| 12 | 
            +
                  #   rentals_fees = @api.rentals fees
         | 
| 13 | 
            +
                  #   rentals_fees.first.always_applied # => true
         | 
| 14 | 
            +
                  # @example Get the list of rentals fees only with start_date and end_date for smaller response
         | 
| 15 | 
            +
                  #   @api.rentals fees(fields: [:start_date, :end_date])
         | 
| 16 | 
            +
                  # @see http://docs.api.bookingsync.com/reference/endpoints/rentals_fees/#list-rentals_fees
         | 
| 17 | 
            +
                  def rentals_fees(options = {}, &block)
         | 
| 18 | 
            +
                    paginate :rentals_fees, options, &block
         | 
| 19 | 
            +
                  end
         | 
| 20 | 
            +
                end
         | 
| 21 | 
            +
              end
         | 
| 22 | 
            +
            end
         | 
| @@ -0,0 +1,22 @@ | |
| 1 | 
            +
            module BookingSync::API
         | 
| 2 | 
            +
              class Client
         | 
| 3 | 
            +
                module Taxes
         | 
| 4 | 
            +
                  # List taxes
         | 
| 5 | 
            +
                  #
         | 
| 6 | 
            +
                  # Returns taxes for the account user is authenticated with.
         | 
| 7 | 
            +
                  # @param options [Hash] A customizable set of options.
         | 
| 8 | 
            +
                  # @option options [Array] fields: List of fields to be fetched.
         | 
| 9 | 
            +
                  # @return [Array<BookingSync::API::Resource>] Array of taxes.
         | 
| 10 | 
            +
                  #
         | 
| 11 | 
            +
                  # @example Get the list of taxes for the current account
         | 
| 12 | 
            +
                  #   taxes = @api.taxes
         | 
| 13 | 
            +
                  #   taxes.first.percentage # => 20.0
         | 
| 14 | 
            +
                  # @example Get the list of taxes only with percentage for smaller response
         | 
| 15 | 
            +
                  #   @api.taxes(fields: [:percentage])
         | 
| 16 | 
            +
                  # @see http://docs.api.bookingsync.com/reference/endpoints/taxes/#list-taxes
         | 
| 17 | 
            +
                  def taxes(options = {}, &block)
         | 
| 18 | 
            +
                    paginate :taxes, options, &block
         | 
| 19 | 
            +
                  end
         | 
| 20 | 
            +
                end
         | 
| 21 | 
            +
              end
         | 
| 22 | 
            +
            end
         | 
| @@ -40,12 +40,16 @@ module BookingSync::API | |
| 40 40 | 
             
                def method_missing(method, *args)
         | 
| 41 41 | 
             
                  return self[method] if has_key?(method) # eager loaded with :include
         | 
| 42 42 | 
             
                  association_key = :"#{@_resources_key}.#{method}"
         | 
| 43 | 
            -
                  if  | 
| 43 | 
            +
                  if (polymorphic_association = find_polymorphic_association(self[:links], method))
         | 
| 44 | 
            +
                    attributes = polymorphic_association.last
         | 
| 45 | 
            +
                    ids, type = Array(attributes[:id]), attributes[:type]
         | 
| 46 | 
            +
                    resolved_association_key = :"#{@_resources_key}.#{type.downcase}"
         | 
| 47 | 
            +
                    uri_association_key = "#{association_key}.id"
         | 
| 48 | 
            +
             | 
| 49 | 
            +
                    extract_resources(ids, resolved_association_key, uri_association_key, *args)
         | 
| 50 | 
            +
                  elsif self[:links] && self[:links].has_key?(method)
         | 
| 44 51 | 
             
                    ids = Array(self[:links][method])
         | 
| 45 | 
            -
                     | 
| 46 | 
            -
                    options = {uri: {association_key => ids}}
         | 
| 47 | 
            -
                    options.merge!(query: args.first) if args.first.is_a?(Hash)
         | 
| 48 | 
            -
                    @_rels[association_key].get(options).resources
         | 
| 52 | 
            +
                    extract_resources(ids, association_key, association_key, *args)
         | 
| 49 53 | 
             
                  else
         | 
| 50 54 | 
             
                    super
         | 
| 51 55 | 
             
                  end
         | 
| @@ -54,5 +58,20 @@ module BookingSync::API | |
| 54 58 | 
             
                def to_s
         | 
| 55 59 | 
             
                  id.to_s
         | 
| 56 60 | 
             
                end
         | 
| 61 | 
            +
             | 
| 62 | 
            +
                private
         | 
| 63 | 
            +
             | 
| 64 | 
            +
                # links structure: {:taggable=>{:type=>"Article", :id=>"15"}}
         | 
| 65 | 
            +
                def find_polymorphic_association(links, method)
         | 
| 66 | 
            +
                  links.select { |_, data| data.is_a?(Hash) }
         | 
| 67 | 
            +
                    .find { |assoc, _| assoc.to_s.downcase == method.to_s.downcase }
         | 
| 68 | 
            +
                end
         | 
| 69 | 
            +
             | 
| 70 | 
            +
                def extract_resources(ids, association_key, uri_association_key, *args)
         | 
| 71 | 
            +
                  return [] if ids.empty?
         | 
| 72 | 
            +
                  options = {uri: {uri_association_key => ids}}
         | 
| 73 | 
            +
                  options.merge!(query: args.first) if args.first.is_a?(Hash)
         | 
| 74 | 
            +
                  @_rels[association_key].get(options).resources
         | 
| 75 | 
            +
                end
         | 
| 57 76 | 
             
              end
         | 
| 58 77 | 
             
            end
         | 
| @@ -9,4 +9,11 @@ describe BookingSync::API::Client::Availabilities do | |
| 9 9 | 
             
                  assert_requested :get, bs_url("availabilities")
         | 
| 10 10 | 
             
                end
         | 
| 11 11 | 
             
              end
         | 
| 12 | 
            +
             | 
| 13 | 
            +
              describe ".availability", :vcr do
         | 
| 14 | 
            +
                it "returns a single availability" do
         | 
| 15 | 
            +
                  availability = client.availability(2)
         | 
| 16 | 
            +
                  expect(availability.id).to eq 2
         | 
| 17 | 
            +
                end
         | 
| 18 | 
            +
              end
         | 
| 12 19 | 
             
            end
         | 
| @@ -0,0 +1,12 @@ | |
| 1 | 
            +
            require "spec_helper"
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            describe BookingSync::API::Client::BookingsFees do
         | 
| 4 | 
            +
              let(:api) { BookingSync::API::Client.new(test_access_token) }
         | 
| 5 | 
            +
             | 
| 6 | 
            +
              describe ".bookings_fees", :vcr do
         | 
| 7 | 
            +
                it "returns bookings fees" do
         | 
| 8 | 
            +
                  expect(api.bookings_fees).not_to be_empty
         | 
| 9 | 
            +
                  assert_requested :get, bs_url("bookings_fees")
         | 
| 10 | 
            +
                end
         | 
| 11 | 
            +
              end
         | 
| 12 | 
            +
            end
         | 
| @@ -0,0 +1,12 @@ | |
| 1 | 
            +
            require "spec_helper"
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            describe BookingSync::API::Client::BookingsTaxes do
         | 
| 4 | 
            +
              let(:api) { BookingSync::API::Client.new(test_access_token) }
         | 
| 5 | 
            +
             | 
| 6 | 
            +
              describe ".bookings_taxes", :vcr do
         | 
| 7 | 
            +
                it "returns bookings taxes" do
         | 
| 8 | 
            +
                  expect(api.bookings_taxes).not_to be_empty
         | 
| 9 | 
            +
                  assert_requested :get, bs_url("bookings_taxes")
         | 
| 10 | 
            +
                end
         | 
| 11 | 
            +
              end
         | 
| 12 | 
            +
            end
         | 
| @@ -0,0 +1,12 @@ | |
| 1 | 
            +
            require "spec_helper"
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            describe BookingSync::API::Client::Fees do
         | 
| 4 | 
            +
              let(:api) { BookingSync::API::Client.new(test_access_token) }
         | 
| 5 | 
            +
             | 
| 6 | 
            +
              describe ".fees", :vcr do
         | 
| 7 | 
            +
                it "returns fees" do
         | 
| 8 | 
            +
                  expect(api.fees).not_to be_empty
         | 
| 9 | 
            +
                  assert_requested :get, bs_url("fees")
         | 
| 10 | 
            +
                end
         | 
| 11 | 
            +
              end
         | 
| 12 | 
            +
            end
         | 
| @@ -0,0 +1,12 @@ | |
| 1 | 
            +
            require "spec_helper"
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            describe BookingSync::API::Client::RentalsFees do
         | 
| 4 | 
            +
              let(:api) { BookingSync::API::Client.new(test_access_token) }
         | 
| 5 | 
            +
             | 
| 6 | 
            +
              describe ".rentals_fees", :vcr do
         | 
| 7 | 
            +
                it "returns rentals fees" do
         | 
| 8 | 
            +
                  expect(api.rentals_fees).not_to be_empty
         | 
| 9 | 
            +
                  assert_requested :get, bs_url("rentals_fees")
         | 
| 10 | 
            +
                end
         | 
| 11 | 
            +
              end
         | 
| 12 | 
            +
            end
         | 
| @@ -0,0 +1,12 @@ | |
| 1 | 
            +
            require "spec_helper"
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            describe BookingSync::API::Client::Taxes do
         | 
| 4 | 
            +
              let(:api) { BookingSync::API::Client.new(test_access_token) }
         | 
| 5 | 
            +
             | 
| 6 | 
            +
              describe ".taxes", :vcr do
         | 
| 7 | 
            +
                it "returns taxes" do
         | 
| 8 | 
            +
                  expect(api.taxes).not_to be_empty
         | 
| 9 | 
            +
                  assert_requested :get, bs_url("taxes")
         | 
| 10 | 
            +
                end
         | 
| 11 | 
            +
              end
         | 
| 12 | 
            +
            end
         | 
| @@ -5,7 +5,8 @@ describe BookingSync::API::Resource do | |
| 5 5 | 
             
              let(:relation) {
         | 
| 6 6 | 
             
                BookingSync::API::Relation.from_links(client, {
         | 
| 7 7 | 
             
                  :"foo.photos" => "http://foo.com/photos/{foo.photos}",
         | 
| 8 | 
            -
                  :"foo.category" => "http://foo.com/categories/{foo.category}"
         | 
| 8 | 
            +
                  :"foo.category" => "http://foo.com/categories/{foo.category}",
         | 
| 9 | 
            +
                  :"foo.article" => "http://foo.com/articles/{foo.taggable.id}"
         | 
| 9 10 | 
             
                })
         | 
| 10 11 | 
             
              }
         | 
| 11 12 | 
             
              let(:client) { BookingSync::API::Client.new(test_access_token,
         | 
| @@ -63,6 +64,19 @@ describe BookingSync::API::Resource do | |
| 63 64 | 
             
                  end
         | 
| 64 65 | 
             
                end
         | 
| 65 66 |  | 
| 67 | 
            +
                context "polymorphic association" do
         | 
| 68 | 
            +
                  let(:links) do
         | 
| 69 | 
            +
                   { taggable: { "type" => "Article", "id" => "15" },
         | 
| 70 | 
            +
                      other_polymorphable: { "type" => "Other", "id" => "15" },
         | 
| 71 | 
            +
                      category: 15  }
         | 
| 72 | 
            +
                  end
         | 
| 73 | 
            +
                  it "fetches association based on links and type" do
         | 
| 74 | 
            +
                    stub_request(:get, "http://foo.com/articles/15")
         | 
| 75 | 
            +
                      .to_return(body: {articles: [{name: "Secret one"}]}.to_json)
         | 
| 76 | 
            +
                    expect(resource.taggable).to eql([{name: "Secret one"}])
         | 
| 77 | 
            +
                  end
         | 
| 78 | 
            +
                end
         | 
| 79 | 
            +
             | 
| 66 80 | 
             
                context "when there are not associated ids" do
         | 
| 67 81 | 
             
                  let(:links) { {photos: []} }
         | 
| 68 82 | 
             
                  it "returns an empty array" do
         | 
| @@ -0,0 +1,80 @@ | |
| 1 | 
            +
            ---
         | 
| 2 | 
            +
            http_interactions:
         | 
| 3 | 
            +
            - request:
         | 
| 4 | 
            +
                method: get
         | 
| 5 | 
            +
                uri: https://www.bookingsync.com/api/v3/availabilities/2
         | 
| 6 | 
            +
                body:
         | 
| 7 | 
            +
                  encoding: US-ASCII
         | 
| 8 | 
            +
                  string: ''
         | 
| 9 | 
            +
                headers:
         | 
| 10 | 
            +
                  User-Agent:
         | 
| 11 | 
            +
                  - BookingSync API gem v0.0.22
         | 
| 12 | 
            +
                  Accept:
         | 
| 13 | 
            +
                  - application/vnd.api+json
         | 
| 14 | 
            +
                  Content-Type:
         | 
| 15 | 
            +
                  - application/vnd.api+json
         | 
| 16 | 
            +
                  Authorization:
         | 
| 17 | 
            +
                  - Bearer <<ACCESS_TOKEN>>
         | 
| 18 | 
            +
                  Accept-Encoding:
         | 
| 19 | 
            +
                  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
         | 
| 20 | 
            +
              response:
         | 
| 21 | 
            +
                status:
         | 
| 22 | 
            +
                  code: 200
         | 
| 23 | 
            +
                  message: OK
         | 
| 24 | 
            +
                headers:
         | 
| 25 | 
            +
                  Content-Type:
         | 
| 26 | 
            +
                  - application/vnd.api+json; charset=utf-8
         | 
| 27 | 
            +
                  Transfer-Encoding:
         | 
| 28 | 
            +
                  - chunked
         | 
| 29 | 
            +
                  Connection:
         | 
| 30 | 
            +
                  - keep-alive
         | 
| 31 | 
            +
                  Status:
         | 
| 32 | 
            +
                  - 200 OK
         | 
| 33 | 
            +
                  X-Frame-Options:
         | 
| 34 | 
            +
                  - SAMEORIGIN
         | 
| 35 | 
            +
                  X-Xss-Protection:
         | 
| 36 | 
            +
                  - 1; mode=block
         | 
| 37 | 
            +
                  X-Content-Type-Options:
         | 
| 38 | 
            +
                  - nosniff
         | 
| 39 | 
            +
                  X-Ratelimit-Limit:
         | 
| 40 | 
            +
                  - '1000'
         | 
| 41 | 
            +
                  X-Ratelimit-Reset:
         | 
| 42 | 
            +
                  - '1423166400'
         | 
| 43 | 
            +
                  X-Ratelimit-Remaining:
         | 
| 44 | 
            +
                  - '999'
         | 
| 45 | 
            +
                  Link:
         | 
| 46 | 
            +
                  - <https://www.bookingsync.com/api/v3/availabilities/2?page=1>; rel="first", <https://www.bookingsync.com/api/v3/availabilities/2?page=1>;
         | 
| 47 | 
            +
                    rel="last"
         | 
| 48 | 
            +
                  X-Total-Pages:
         | 
| 49 | 
            +
                  - '1'
         | 
| 50 | 
            +
                  X-Total-Count:
         | 
| 51 | 
            +
                  - '1'
         | 
| 52 | 
            +
                  Etag:
         | 
| 53 | 
            +
                  - '"00618251246b208d25945de17b374a01"'
         | 
| 54 | 
            +
                  Cache-Control:
         | 
| 55 | 
            +
                  - max-age=0, private, must-revalidate
         | 
| 56 | 
            +
                  P3p:
         | 
| 57 | 
            +
                  - CP="OTI DSP COR CUR ADMo DEVo TAI PSAi PSDi IVAi IVDi CONi HISi TELi OTPi
         | 
| 58 | 
            +
                    OUR SAMi OTRo UNRo PUBi IND UNI STA"
         | 
| 59 | 
            +
                  Set-Cookie:
         | 
| 60 | 
            +
                  - ahoy_track=true; path=/
         | 
| 61 | 
            +
                  - ahoy_visit=577aa29d-8c3b-43a0-8c7a-9f38b990bc13; path=/; expires=Thu, 12 Feb
         | 
| 62 | 
            +
                    2015 19:28:31 -0000
         | 
| 63 | 
            +
                  - ahoy_visitor=ca0da68c-62f3-4caa-ad82-db9646aee325; path=/; expires=Sun, 05
         | 
| 64 | 
            +
                    Feb 2017 19:28:31 -0000
         | 
| 65 | 
            +
                  X-Request-Id:
         | 
| 66 | 
            +
                  - 472298e4-797b-42d5-b4a5-154699198797
         | 
| 67 | 
            +
                  X-Runtime:
         | 
| 68 | 
            +
                  - '0.122531'
         | 
| 69 | 
            +
                  X-Powered-By:
         | 
| 70 | 
            +
                  - Phusion Passenger 4.0.45
         | 
| 71 | 
            +
                  Date:
         | 
| 72 | 
            +
                  - Thu, 05 Feb 2015 19:28:31 GMT
         | 
| 73 | 
            +
                  Server:
         | 
| 74 | 
            +
                  - nginx/1.6.0 + Phusion Passenger 4.0.45
         | 
| 75 | 
            +
                body:
         | 
| 76 | 
            +
                  encoding: UTF-8
         | 
| 77 | 
            +
                  string: '{"links":{"availabilities.rental":"https://www.bookingsync.com/api/v3/rentals/{availabilities.rental}"},"availabilities":[{"links":{"rental":2},"id":2,"map":"1111111111111111111111111111111111111111111111111111111111111111111111111111100111111111111111100011111110000000000000011111111000000000000111000111111111111111111111111111111111111111111111111110000000000111111111111111111111111111000000000001111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","start_date":"2015-01-01","updated_at":"2015-01-21T11:44:59Z"}]}'
         | 
| 78 | 
            +
                http_version: 
         | 
| 79 | 
            +
              recorded_at: Thu, 05 Feb 2015 19:28:31 GMT
         | 
| 80 | 
            +
            recorded_with: VCR 2.9.2
         | 
| @@ -0,0 +1,81 @@ | |
| 1 | 
            +
            ---
         | 
| 2 | 
            +
            http_interactions:
         | 
| 3 | 
            +
            - request:
         | 
| 4 | 
            +
                method: get
         | 
| 5 | 
            +
                uri: https://www.bookingsync.com/api/v3/bookings_fees
         | 
| 6 | 
            +
                body:
         | 
| 7 | 
            +
                  encoding: US-ASCII
         | 
| 8 | 
            +
                  string: ''
         | 
| 9 | 
            +
                headers:
         | 
| 10 | 
            +
                  User-Agent:
         | 
| 11 | 
            +
                  - BookingSync API gem v0.0.23
         | 
| 12 | 
            +
                  Accept:
         | 
| 13 | 
            +
                  - application/vnd.api+json
         | 
| 14 | 
            +
                  Content-Type:
         | 
| 15 | 
            +
                  - application/vnd.api+json
         | 
| 16 | 
            +
                  Authorization:
         | 
| 17 | 
            +
                  - Bearer <<ACCESS_TOKEN>>
         | 
| 18 | 
            +
                  Accept-Encoding:
         | 
| 19 | 
            +
                  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
         | 
| 20 | 
            +
              response:
         | 
| 21 | 
            +
                status:
         | 
| 22 | 
            +
                  code: 200
         | 
| 23 | 
            +
                  message: OK
         | 
| 24 | 
            +
                headers:
         | 
| 25 | 
            +
                  Server:
         | 
| 26 | 
            +
                  - nginx
         | 
| 27 | 
            +
                  Date:
         | 
| 28 | 
            +
                  - Tue, 24 Mar 2015 12:47:14 GMT
         | 
| 29 | 
            +
                  Content-Type:
         | 
| 30 | 
            +
                  - application/vnd.api+json; charset=utf-8
         | 
| 31 | 
            +
                  Transfer-Encoding:
         | 
| 32 | 
            +
                  - chunked
         | 
| 33 | 
            +
                  Connection:
         | 
| 34 | 
            +
                  - keep-alive
         | 
| 35 | 
            +
                  Status:
         | 
| 36 | 
            +
                  - 200 OK
         | 
| 37 | 
            +
                  Strict-Transport-Security:
         | 
| 38 | 
            +
                  - max-age=31536000
         | 
| 39 | 
            +
                  X-Frame-Options:
         | 
| 40 | 
            +
                  - SAMEORIGIN
         | 
| 41 | 
            +
                  X-Xss-Protection:
         | 
| 42 | 
            +
                  - 1; mode=block
         | 
| 43 | 
            +
                  X-Content-Type-Options:
         | 
| 44 | 
            +
                  - nosniff
         | 
| 45 | 
            +
                  X-Ratelimit-Limit:
         | 
| 46 | 
            +
                  - '1000'
         | 
| 47 | 
            +
                  X-Ratelimit-Reset:
         | 
| 48 | 
            +
                  - '1427202000'
         | 
| 49 | 
            +
                  X-Ratelimit-Remaining:
         | 
| 50 | 
            +
                  - '924'
         | 
| 51 | 
            +
                  Link:
         | 
| 52 | 
            +
                  - <https://www.bookingsync.com/api/v3/bookings_fees?page=1>; rel="first", <https://www.bookingsync.com/api/v3/bookings_fees?page=1>;
         | 
| 53 | 
            +
                    rel="last"
         | 
| 54 | 
            +
                  X-Total-Pages:
         | 
| 55 | 
            +
                  - '1'
         | 
| 56 | 
            +
                  X-Total-Count:
         | 
| 57 | 
            +
                  - '1'
         | 
| 58 | 
            +
                  Etag:
         | 
| 59 | 
            +
                  - '"43c938a8782d08886ac529486d4c6524"'
         | 
| 60 | 
            +
                  Cache-Control:
         | 
| 61 | 
            +
                  - max-age=0, private, must-revalidate
         | 
| 62 | 
            +
                  P3p:
         | 
| 63 | 
            +
                  - CP="OTI DSP COR CUR ADMo DEVo TAI PSAi PSDi IVAi IVDi CONi HISi TELi OTPi
         | 
| 64 | 
            +
                    OUR SAMi OTRo UNRo PUBi IND UNI STA"
         | 
| 65 | 
            +
                  Set-Cookie:
         | 
| 66 | 
            +
                  - ahoy_track=true; path=/; secure
         | 
| 67 | 
            +
                  - ahoy_visit=e903b78c-f174-420a-a0e9-5b53bf10a8b9; path=/; expires=Tue, 31 Mar
         | 
| 68 | 
            +
                    2015 12:47:14 -0000; secure
         | 
| 69 | 
            +
                  - ahoy_visitor=7b2ab09d-cf8a-41bf-b904-78680ac09589; path=/; expires=Fri, 24
         | 
| 70 | 
            +
                    Mar 2017 12:47:14 -0000; secure
         | 
| 71 | 
            +
                  X-Request-Id:
         | 
| 72 | 
            +
                  - d13d1227-035b-4731-9b70-3f8dfa39bcd0
         | 
| 73 | 
            +
                  X-Runtime:
         | 
| 74 | 
            +
                  - '0.497416'
         | 
| 75 | 
            +
                body:
         | 
| 76 | 
            +
                  encoding: UTF-8
         | 
| 77 | 
            +
                  string: '{"links":{"bookings_fees.rentals_fee":"https://www.bookingsync.com/api/v3/rentals_fees/{bookings_fees.rentals_fee}","bookings_fees.bookings_taxes":"https://www.bookingsync.com/api/v3/bookings_taxes/{bookings_fees.bookings_taxes}"},"bookings_fees":[{"links":{"rentals_fee":74,"bookings_taxes":[]},"id":1044,"name":{"en":"Final
         | 
| 78 | 
            +
                    Cleaning"},"price":"100.0","required":true,"included_in_price":true,"times_booked":1,"created_at":"2015-03-24T12:15:17Z","updated_at":"2015-03-24T12:15:17Z"}]}'
         | 
| 79 | 
            +
                http_version: 
         | 
| 80 | 
            +
              recorded_at: Tue, 24 Mar 2015 12:47:14 GMT
         | 
| 81 | 
            +
            recorded_with: VCR 2.9.3
         | 
| @@ -0,0 +1,81 @@ | |
| 1 | 
            +
            ---
         | 
| 2 | 
            +
            http_interactions:
         | 
| 3 | 
            +
            - request:
         | 
| 4 | 
            +
                method: get
         | 
| 5 | 
            +
                uri: https://www.bookingsync.com/api/v3/bookings_taxes
         | 
| 6 | 
            +
                body:
         | 
| 7 | 
            +
                  encoding: US-ASCII
         | 
| 8 | 
            +
                  string: ''
         | 
| 9 | 
            +
                headers:
         | 
| 10 | 
            +
                  User-Agent:
         | 
| 11 | 
            +
                  - BookingSync API gem v0.0.23
         | 
| 12 | 
            +
                  Accept:
         | 
| 13 | 
            +
                  - application/vnd.api+json
         | 
| 14 | 
            +
                  Content-Type:
         | 
| 15 | 
            +
                  - application/vnd.api+json
         | 
| 16 | 
            +
                  Authorization:
         | 
| 17 | 
            +
                  - Bearer <<ACCESS_TOKEN>>
         | 
| 18 | 
            +
                  Accept-Encoding:
         | 
| 19 | 
            +
                  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
         | 
| 20 | 
            +
              response:
         | 
| 21 | 
            +
                status:
         | 
| 22 | 
            +
                  code: 200
         | 
| 23 | 
            +
                  message: OK
         | 
| 24 | 
            +
                headers:
         | 
| 25 | 
            +
                  Server:
         | 
| 26 | 
            +
                  - nginx
         | 
| 27 | 
            +
                  Date:
         | 
| 28 | 
            +
                  - Tue, 24 Mar 2015 12:47:15 GMT
         | 
| 29 | 
            +
                  Content-Type:
         | 
| 30 | 
            +
                  - application/vnd.api+json; charset=utf-8
         | 
| 31 | 
            +
                  Transfer-Encoding:
         | 
| 32 | 
            +
                  - chunked
         | 
| 33 | 
            +
                  Connection:
         | 
| 34 | 
            +
                  - keep-alive
         | 
| 35 | 
            +
                  Status:
         | 
| 36 | 
            +
                  - 200 OK
         | 
| 37 | 
            +
                  Strict-Transport-Security:
         | 
| 38 | 
            +
                  - max-age=31536000
         | 
| 39 | 
            +
                  X-Frame-Options:
         | 
| 40 | 
            +
                  - SAMEORIGIN
         | 
| 41 | 
            +
                  X-Xss-Protection:
         | 
| 42 | 
            +
                  - 1; mode=block
         | 
| 43 | 
            +
                  X-Content-Type-Options:
         | 
| 44 | 
            +
                  - nosniff
         | 
| 45 | 
            +
                  X-Ratelimit-Limit:
         | 
| 46 | 
            +
                  - '1000'
         | 
| 47 | 
            +
                  X-Ratelimit-Reset:
         | 
| 48 | 
            +
                  - '1427202000'
         | 
| 49 | 
            +
                  X-Ratelimit-Remaining:
         | 
| 50 | 
            +
                  - '923'
         | 
| 51 | 
            +
                  Link:
         | 
| 52 | 
            +
                  - <https://www.bookingsync.com/api/v3/bookings_taxes?page=1>; rel="first", <https://www.bookingsync.com/api/v3/bookings_taxes?page=1>;
         | 
| 53 | 
            +
                    rel="last"
         | 
| 54 | 
            +
                  X-Total-Pages:
         | 
| 55 | 
            +
                  - '1'
         | 
| 56 | 
            +
                  X-Total-Count:
         | 
| 57 | 
            +
                  - '2'
         | 
| 58 | 
            +
                  Etag:
         | 
| 59 | 
            +
                  - '"62de21dabf8671eb0223094482fb681f"'
         | 
| 60 | 
            +
                  Cache-Control:
         | 
| 61 | 
            +
                  - max-age=0, private, must-revalidate
         | 
| 62 | 
            +
                  P3p:
         | 
| 63 | 
            +
                  - CP="OTI DSP COR CUR ADMo DEVo TAI PSAi PSDi IVAi IVDi CONi HISi TELi OTPi
         | 
| 64 | 
            +
                    OUR SAMi OTRo UNRo PUBi IND UNI STA"
         | 
| 65 | 
            +
                  Set-Cookie:
         | 
| 66 | 
            +
                  - ahoy_track=true; path=/; secure
         | 
| 67 | 
            +
                  - ahoy_visit=196bd645-5644-4eaa-b0aa-0b59baca4930; path=/; expires=Tue, 31 Mar
         | 
| 68 | 
            +
                    2015 12:47:15 -0000; secure
         | 
| 69 | 
            +
                  - ahoy_visitor=da390569-df86-4266-90a8-b88e521e173f; path=/; expires=Fri, 24
         | 
| 70 | 
            +
                    Mar 2017 12:47:15 -0000; secure
         | 
| 71 | 
            +
                  X-Request-Id:
         | 
| 72 | 
            +
                  - f87ec4ef-4f4a-4ca7-a84e-7034c127c1f0
         | 
| 73 | 
            +
                  X-Runtime:
         | 
| 74 | 
            +
                  - '0.374740'
         | 
| 75 | 
            +
                body:
         | 
| 76 | 
            +
                  encoding: UTF-8
         | 
| 77 | 
            +
                  string: '{"links":{"bookings_taxes.booking":"https://www.bookingsync.com/api/v3/bookings/{bookings_taxes.booking}","bookings_taxes.tax":"https://www.bookingsync.com/api/v3/taxes/{bookings_taxes.tax}","bookings_taxes.rentals":"https://www.bookingsync.com/api/v3/rentals/{bookings_taxes.taxable.id}","bookings_taxes.fees":"https://www.bookingsync.com/api/v3/fees/{bookings_taxes.taxable.id}"},"bookings_taxes":[{"links":{"booking":118302,"tax":21,"taxable":{"id":38,"type":"Fee"}},"id":83,"name":{"en":"VAT"},"tax_included_in_price":false,"percentage":"23.0","amount":"23.0"},{"links":{"booking":118302,"tax":20,"taxable":{"id":7678,"type":"Rental"}},"id":82,"name":{"en":"Rental
         | 
| 78 | 
            +
                    VAT"},"tax_included_in_price":false,"percentage":"23.0","amount":"138.0"}]}'
         | 
| 79 | 
            +
                http_version: 
         | 
| 80 | 
            +
              recorded_at: Tue, 24 Mar 2015 12:47:16 GMT
         | 
| 81 | 
            +
            recorded_with: VCR 2.9.3
         | 
| @@ -0,0 +1,80 @@ | |
| 1 | 
            +
            ---
         | 
| 2 | 
            +
            http_interactions:
         | 
| 3 | 
            +
            - request:
         | 
| 4 | 
            +
                method: get
         | 
| 5 | 
            +
                uri: https://www.bookingsync.com/api/v3/fees
         | 
| 6 | 
            +
                body:
         | 
| 7 | 
            +
                  encoding: US-ASCII
         | 
| 8 | 
            +
                  string: ''
         | 
| 9 | 
            +
                headers:
         | 
| 10 | 
            +
                  User-Agent:
         | 
| 11 | 
            +
                  - BookingSync API gem v0.0.23
         | 
| 12 | 
            +
                  Accept:
         | 
| 13 | 
            +
                  - application/vnd.api+json
         | 
| 14 | 
            +
                  Content-Type:
         | 
| 15 | 
            +
                  - application/vnd.api+json
         | 
| 16 | 
            +
                  Authorization:
         | 
| 17 | 
            +
                  - Bearer <<ACCESS_TOKEN>>
         | 
| 18 | 
            +
                  Accept-Encoding:
         | 
| 19 | 
            +
                  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
         | 
| 20 | 
            +
              response:
         | 
| 21 | 
            +
                status:
         | 
| 22 | 
            +
                  code: 200
         | 
| 23 | 
            +
                  message: OK
         | 
| 24 | 
            +
                headers:
         | 
| 25 | 
            +
                  Server:
         | 
| 26 | 
            +
                  - nginx
         | 
| 27 | 
            +
                  Date:
         | 
| 28 | 
            +
                  - Tue, 24 Mar 2015 12:21:43 GMT
         | 
| 29 | 
            +
                  Content-Type:
         | 
| 30 | 
            +
                  - application/vnd.api+json; charset=utf-8
         | 
| 31 | 
            +
                  Transfer-Encoding:
         | 
| 32 | 
            +
                  - chunked
         | 
| 33 | 
            +
                  Connection:
         | 
| 34 | 
            +
                  - keep-alive
         | 
| 35 | 
            +
                  Status:
         | 
| 36 | 
            +
                  - 200 OK
         | 
| 37 | 
            +
                  Strict-Transport-Security:
         | 
| 38 | 
            +
                  - max-age=31536000
         | 
| 39 | 
            +
                  X-Frame-Options:
         | 
| 40 | 
            +
                  - SAMEORIGIN
         | 
| 41 | 
            +
                  X-Xss-Protection:
         | 
| 42 | 
            +
                  - 1; mode=block
         | 
| 43 | 
            +
                  X-Content-Type-Options:
         | 
| 44 | 
            +
                  - nosniff
         | 
| 45 | 
            +
                  X-Ratelimit-Limit:
         | 
| 46 | 
            +
                  - '1000'
         | 
| 47 | 
            +
                  X-Ratelimit-Reset:
         | 
| 48 | 
            +
                  - '1427202000'
         | 
| 49 | 
            +
                  X-Ratelimit-Remaining:
         | 
| 50 | 
            +
                  - '995'
         | 
| 51 | 
            +
                  Link:
         | 
| 52 | 
            +
                  - <https://www.bookingsync.com/api/v3/fees?page=1>; rel="first", <https://www.bookingsync.com/api/v3/fees?page=1>;
         | 
| 53 | 
            +
                    rel="last"
         | 
| 54 | 
            +
                  X-Total-Pages:
         | 
| 55 | 
            +
                  - '1'
         | 
| 56 | 
            +
                  X-Total-Count:
         | 
| 57 | 
            +
                  - '1'
         | 
| 58 | 
            +
                  Etag:
         | 
| 59 | 
            +
                  - '"c31f9e3c8bee92680521f9259ff5a451"'
         | 
| 60 | 
            +
                  Cache-Control:
         | 
| 61 | 
            +
                  - max-age=0, private, must-revalidate
         | 
| 62 | 
            +
                  P3p:
         | 
| 63 | 
            +
                  - CP="OTI DSP COR CUR ADMo DEVo TAI PSAi PSDi IVAi IVDi CONi HISi TELi OTPi
         | 
| 64 | 
            +
                    OUR SAMi OTRo UNRo PUBi IND UNI STA"
         | 
| 65 | 
            +
                  Set-Cookie:
         | 
| 66 | 
            +
                  - ahoy_track=true; path=/; secure
         | 
| 67 | 
            +
                  - ahoy_visit=37963e69-b4b2-415d-bdd4-2aa0c8295727; path=/; expires=Tue, 31 Mar
         | 
| 68 | 
            +
                    2015 12:21:43 -0000; secure
         | 
| 69 | 
            +
                  - ahoy_visitor=7b79ddaf-05ab-413e-85b6-8b75d4934849; path=/; expires=Fri, 24
         | 
| 70 | 
            +
                    Mar 2017 12:21:43 -0000; secure
         | 
| 71 | 
            +
                  X-Request-Id:
         | 
| 72 | 
            +
                  - 92cea7f1-f421-4cfd-a2b9-07cc334ea23d
         | 
| 73 | 
            +
                  X-Runtime:
         | 
| 74 | 
            +
                  - '0.100979'
         | 
| 75 | 
            +
                body:
         | 
| 76 | 
            +
                  encoding: UTF-8
         | 
| 77 | 
            +
                  string: '{"links":{"fees.account":"https://www.bookingsync.com/api/v3/accounts/{fees.account}"},"fees":[{"links":{"account":4630},"id":38,"rate":"100.0","rate_kind":"fixed","created_at":"2015-03-24T12:13:34Z","updated_at":"2015-03-24T12:13:34Z","downpayment_percentage":"0.0"}]}'
         | 
| 78 | 
            +
                http_version: 
         | 
| 79 | 
            +
              recorded_at: Tue, 24 Mar 2015 12:21:43 GMT
         | 
| 80 | 
            +
            recorded_with: VCR 2.9.3
         | 
| @@ -0,0 +1,80 @@ | |
| 1 | 
            +
            ---
         | 
| 2 | 
            +
            http_interactions:
         | 
| 3 | 
            +
            - request:
         | 
| 4 | 
            +
                method: get
         | 
| 5 | 
            +
                uri: https://www.bookingsync.com/api/v3/rentals_fees
         | 
| 6 | 
            +
                body:
         | 
| 7 | 
            +
                  encoding: US-ASCII
         | 
| 8 | 
            +
                  string: ''
         | 
| 9 | 
            +
                headers:
         | 
| 10 | 
            +
                  User-Agent:
         | 
| 11 | 
            +
                  - BookingSync API gem v0.0.23
         | 
| 12 | 
            +
                  Accept:
         | 
| 13 | 
            +
                  - application/vnd.api+json
         | 
| 14 | 
            +
                  Content-Type:
         | 
| 15 | 
            +
                  - application/vnd.api+json
         | 
| 16 | 
            +
                  Authorization:
         | 
| 17 | 
            +
                  - Bearer <<ACCESS_TOKEN>>
         | 
| 18 | 
            +
                  Accept-Encoding:
         | 
| 19 | 
            +
                  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
         | 
| 20 | 
            +
              response:
         | 
| 21 | 
            +
                status:
         | 
| 22 | 
            +
                  code: 200
         | 
| 23 | 
            +
                  message: OK
         | 
| 24 | 
            +
                headers:
         | 
| 25 | 
            +
                  Server:
         | 
| 26 | 
            +
                  - nginx
         | 
| 27 | 
            +
                  Date:
         | 
| 28 | 
            +
                  - Tue, 24 Mar 2015 12:21:45 GMT
         | 
| 29 | 
            +
                  Content-Type:
         | 
| 30 | 
            +
                  - application/vnd.api+json; charset=utf-8
         | 
| 31 | 
            +
                  Transfer-Encoding:
         | 
| 32 | 
            +
                  - chunked
         | 
| 33 | 
            +
                  Connection:
         | 
| 34 | 
            +
                  - keep-alive
         | 
| 35 | 
            +
                  Status:
         | 
| 36 | 
            +
                  - 200 OK
         | 
| 37 | 
            +
                  Strict-Transport-Security:
         | 
| 38 | 
            +
                  - max-age=31536000
         | 
| 39 | 
            +
                  X-Frame-Options:
         | 
| 40 | 
            +
                  - SAMEORIGIN
         | 
| 41 | 
            +
                  X-Xss-Protection:
         | 
| 42 | 
            +
                  - 1; mode=block
         | 
| 43 | 
            +
                  X-Content-Type-Options:
         | 
| 44 | 
            +
                  - nosniff
         | 
| 45 | 
            +
                  X-Ratelimit-Limit:
         | 
| 46 | 
            +
                  - '1000'
         | 
| 47 | 
            +
                  X-Ratelimit-Reset:
         | 
| 48 | 
            +
                  - '1427202000'
         | 
| 49 | 
            +
                  X-Ratelimit-Remaining:
         | 
| 50 | 
            +
                  - '994'
         | 
| 51 | 
            +
                  Link:
         | 
| 52 | 
            +
                  - <https://www.bookingsync.com/api/v3/rentals_fees?page=1>; rel="first", <https://www.bookingsync.com/api/v3/rentals_fees?page=1>;
         | 
| 53 | 
            +
                    rel="last"
         | 
| 54 | 
            +
                  X-Total-Pages:
         | 
| 55 | 
            +
                  - '1'
         | 
| 56 | 
            +
                  X-Total-Count:
         | 
| 57 | 
            +
                  - '1'
         | 
| 58 | 
            +
                  Etag:
         | 
| 59 | 
            +
                  - '"710d100420f325f2511502cfa6919c6b"'
         | 
| 60 | 
            +
                  Cache-Control:
         | 
| 61 | 
            +
                  - max-age=0, private, must-revalidate
         | 
| 62 | 
            +
                  P3p:
         | 
| 63 | 
            +
                  - CP="OTI DSP COR CUR ADMo DEVo TAI PSAi PSDi IVAi IVDi CONi HISi TELi OTPi
         | 
| 64 | 
            +
                    OUR SAMi OTRo UNRo PUBi IND UNI STA"
         | 
| 65 | 
            +
                  Set-Cookie:
         | 
| 66 | 
            +
                  - ahoy_track=true; path=/; secure
         | 
| 67 | 
            +
                  - ahoy_visit=64b9a59b-eaaa-4331-be62-d39d955974dc; path=/; expires=Tue, 31 Mar
         | 
| 68 | 
            +
                    2015 12:21:44 -0000; secure
         | 
| 69 | 
            +
                  - ahoy_visitor=f27a275b-339b-4f13-8c73-40b38d4d698e; path=/; expires=Fri, 24
         | 
| 70 | 
            +
                    Mar 2017 12:21:44 -0000; secure
         | 
| 71 | 
            +
                  X-Request-Id:
         | 
| 72 | 
            +
                  - 1275ac3c-5e1f-4586-9c4c-f3b3ad2d4c50
         | 
| 73 | 
            +
                  X-Runtime:
         | 
| 74 | 
            +
                  - '0.120639'
         | 
| 75 | 
            +
                body:
         | 
| 76 | 
            +
                  encoding: UTF-8
         | 
| 77 | 
            +
                  string: '{"links":{"rentals_fees.fee":"https://www.bookingsync.com/api/v3/fees/{rentals_fees.fee}","rentals_fees.rental":"https://www.bookingsync.com/api/v3/rentals/{rentals_fees.rental}"},"rentals_fees":[{"links":{"fee":38,"rental":7678},"id":74,"always_applied":true,"end_date":null,"maximum_bookable":null,"public":true,"required":true,"start_date":null,"created_at":"2015-03-24T12:14:55Z","updated_at":"2015-03-24T12:14:55Z"}]}'
         | 
| 78 | 
            +
                http_version: 
         | 
| 79 | 
            +
              recorded_at: Tue, 24 Mar 2015 12:21:45 GMT
         | 
| 80 | 
            +
            recorded_with: VCR 2.9.3
         | 
| @@ -0,0 +1,80 @@ | |
| 1 | 
            +
            ---
         | 
| 2 | 
            +
            http_interactions:
         | 
| 3 | 
            +
            - request:
         | 
| 4 | 
            +
                method: get
         | 
| 5 | 
            +
                uri: https://www.bookingsync.com/api/v3/taxes
         | 
| 6 | 
            +
                body:
         | 
| 7 | 
            +
                  encoding: US-ASCII
         | 
| 8 | 
            +
                  string: ''
         | 
| 9 | 
            +
                headers:
         | 
| 10 | 
            +
                  User-Agent:
         | 
| 11 | 
            +
                  - BookingSync API gem v0.0.23
         | 
| 12 | 
            +
                  Accept:
         | 
| 13 | 
            +
                  - application/vnd.api+json
         | 
| 14 | 
            +
                  Content-Type:
         | 
| 15 | 
            +
                  - application/vnd.api+json
         | 
| 16 | 
            +
                  Authorization:
         | 
| 17 | 
            +
                  - Bearer <<ACCESS_TOKEN>>
         | 
| 18 | 
            +
                  Accept-Encoding:
         | 
| 19 | 
            +
                  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
         | 
| 20 | 
            +
              response:
         | 
| 21 | 
            +
                status:
         | 
| 22 | 
            +
                  code: 200
         | 
| 23 | 
            +
                  message: OK
         | 
| 24 | 
            +
                headers:
         | 
| 25 | 
            +
                  Server:
         | 
| 26 | 
            +
                  - nginx
         | 
| 27 | 
            +
                  Date:
         | 
| 28 | 
            +
                  - Tue, 24 Mar 2015 12:21:46 GMT
         | 
| 29 | 
            +
                  Content-Type:
         | 
| 30 | 
            +
                  - application/vnd.api+json; charset=utf-8
         | 
| 31 | 
            +
                  Transfer-Encoding:
         | 
| 32 | 
            +
                  - chunked
         | 
| 33 | 
            +
                  Connection:
         | 
| 34 | 
            +
                  - keep-alive
         | 
| 35 | 
            +
                  Status:
         | 
| 36 | 
            +
                  - 200 OK
         | 
| 37 | 
            +
                  Strict-Transport-Security:
         | 
| 38 | 
            +
                  - max-age=31536000
         | 
| 39 | 
            +
                  X-Frame-Options:
         | 
| 40 | 
            +
                  - SAMEORIGIN
         | 
| 41 | 
            +
                  X-Xss-Protection:
         | 
| 42 | 
            +
                  - 1; mode=block
         | 
| 43 | 
            +
                  X-Content-Type-Options:
         | 
| 44 | 
            +
                  - nosniff
         | 
| 45 | 
            +
                  X-Ratelimit-Limit:
         | 
| 46 | 
            +
                  - '1000'
         | 
| 47 | 
            +
                  X-Ratelimit-Reset:
         | 
| 48 | 
            +
                  - '1427202000'
         | 
| 49 | 
            +
                  X-Ratelimit-Remaining:
         | 
| 50 | 
            +
                  - '993'
         | 
| 51 | 
            +
                  Link:
         | 
| 52 | 
            +
                  - <https://www.bookingsync.com/api/v3/taxes?page=1>; rel="first", <https://www.bookingsync.com/api/v3/taxes?page=1>;
         | 
| 53 | 
            +
                    rel="last"
         | 
| 54 | 
            +
                  X-Total-Pages:
         | 
| 55 | 
            +
                  - '1'
         | 
| 56 | 
            +
                  X-Total-Count:
         | 
| 57 | 
            +
                  - '2'
         | 
| 58 | 
            +
                  Etag:
         | 
| 59 | 
            +
                  - '"1bd03b90a1b781f1a17944dda4b1ae06"'
         | 
| 60 | 
            +
                  Cache-Control:
         | 
| 61 | 
            +
                  - max-age=0, private, must-revalidate
         | 
| 62 | 
            +
                  P3p:
         | 
| 63 | 
            +
                  - CP="OTI DSP COR CUR ADMo DEVo TAI PSAi PSDi IVAi IVDi CONi HISi TELi OTPi
         | 
| 64 | 
            +
                    OUR SAMi OTRo UNRo PUBi IND UNI STA"
         | 
| 65 | 
            +
                  Set-Cookie:
         | 
| 66 | 
            +
                  - ahoy_track=true; path=/; secure
         | 
| 67 | 
            +
                  - ahoy_visit=4df8884e-f70a-4910-bbb6-1688364fe04e; path=/; expires=Tue, 31 Mar
         | 
| 68 | 
            +
                    2015 12:21:46 -0000; secure
         | 
| 69 | 
            +
                  - ahoy_visitor=c44f76f8-8914-4d06-b074-719a3c04012b; path=/; expires=Fri, 24
         | 
| 70 | 
            +
                    Mar 2017 12:21:46 -0000; secure
         | 
| 71 | 
            +
                  X-Request-Id:
         | 
| 72 | 
            +
                  - 0832ae74-dce4-4bd8-b16e-c339117bceb4
         | 
| 73 | 
            +
                  X-Runtime:
         | 
| 74 | 
            +
                  - '0.103752'
         | 
| 75 | 
            +
                body:
         | 
| 76 | 
            +
                  encoding: UTF-8
         | 
| 77 | 
            +
                  string: '{"links":{"taxes.account":"https://www.bookingsync.com/api/v3/accounts/{taxes.account}"},"taxes":[{"links":{"account":4630},"id":20,"percentage":"23.0","created_at":"2015-03-24T12:12:32Z","updated_at":"2015-03-24T12:12:32Z"},{"links":{"account":4630},"id":21,"percentage":"23.0","created_at":"2015-03-24T12:12:43Z","updated_at":"2015-03-24T12:12:43Z"}]}'
         | 
| 78 | 
            +
                http_version: 
         | 
| 79 | 
            +
              recorded_at: Tue, 24 Mar 2015 12:21:46 GMT
         | 
| 80 | 
            +
            recorded_with: VCR 2.9.3
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: bookingsync-api
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.0. | 
| 4 | 
            +
              version: 0.0.24
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Sébastien Grosjean
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2015- | 
| 11 | 
            +
            date: 2015-03-24 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: faraday
         | 
| @@ -104,9 +104,12 @@ files: | |
| 104 104 | 
             
            - lib/bookingsync/api/client/availabilities.rb
         | 
| 105 105 | 
             
            - lib/bookingsync/api/client/billing_addresses.rb
         | 
| 106 106 | 
             
            - lib/bookingsync/api/client/bookings.rb
         | 
| 107 | 
            +
            - lib/bookingsync/api/client/bookings_fees.rb
         | 
| 107 108 | 
             
            - lib/bookingsync/api/client/bookings_payments.rb
         | 
| 109 | 
            +
            - lib/bookingsync/api/client/bookings_taxes.rb
         | 
| 108 110 | 
             
            - lib/bookingsync/api/client/clients.rb
         | 
| 109 111 | 
             
            - lib/bookingsync/api/client/destinations.rb
         | 
| 112 | 
            +
            - lib/bookingsync/api/client/fees.rb
         | 
| 110 113 | 
             
            - lib/bookingsync/api/client/inquiries.rb
         | 
| 111 114 | 
             
            - lib/bookingsync/api/client/payments.rb
         | 
| 112 115 | 
             
            - lib/bookingsync/api/client/periods.rb
         | 
| @@ -117,10 +120,12 @@ files: | |
| 117 120 | 
             
            - lib/bookingsync/api/client/rental_agreements.rb
         | 
| 118 121 | 
             
            - lib/bookingsync/api/client/rentals.rb
         | 
| 119 122 | 
             
            - lib/bookingsync/api/client/rentals_amenities.rb
         | 
| 123 | 
            +
            - lib/bookingsync/api/client/rentals_fees.rb
         | 
| 120 124 | 
             
            - lib/bookingsync/api/client/reviews.rb
         | 
| 121 125 | 
             
            - lib/bookingsync/api/client/seasons.rb
         | 
| 122 126 | 
             
            - lib/bookingsync/api/client/sources.rb
         | 
| 123 127 | 
             
            - lib/bookingsync/api/client/special_offers.rb
         | 
| 128 | 
            +
            - lib/bookingsync/api/client/taxes.rb
         | 
| 124 129 | 
             
            - lib/bookingsync/api/error.rb
         | 
| 125 130 | 
             
            - lib/bookingsync/api/middleware/logger.rb
         | 
| 126 131 | 
             
            - lib/bookingsync/api/relation.rb
         | 
| @@ -132,9 +137,12 @@ files: | |
| 132 137 | 
             
            - spec/bookingsync/api/client/availabilities_spec.rb
         | 
| 133 138 | 
             
            - spec/bookingsync/api/client/billing_addresses_spec.rb
         | 
| 134 139 | 
             
            - spec/bookingsync/api/client/billings_payments_spec.rb
         | 
| 140 | 
            +
            - spec/bookingsync/api/client/bookings_fees_spec.rb
         | 
| 135 141 | 
             
            - spec/bookingsync/api/client/bookings_spec.rb
         | 
| 142 | 
            +
            - spec/bookingsync/api/client/bookings_taxes_spec.rb
         | 
| 136 143 | 
             
            - spec/bookingsync/api/client/clients_spec.rb
         | 
| 137 144 | 
             
            - spec/bookingsync/api/client/destinations_spec.rb
         | 
| 145 | 
            +
            - spec/bookingsync/api/client/fees_spec.rb
         | 
| 138 146 | 
             
            - spec/bookingsync/api/client/inquiries_spec.rb
         | 
| 139 147 | 
             
            - spec/bookingsync/api/client/payments_spec.rb
         | 
| 140 148 | 
             
            - spec/bookingsync/api/client/periods_spec.rb
         | 
| @@ -144,11 +152,13 @@ files: | |
| 144 152 | 
             
            - spec/bookingsync/api/client/rates_tables_spec.rb
         | 
| 145 153 | 
             
            - spec/bookingsync/api/client/rental_agreements_spec.rb
         | 
| 146 154 | 
             
            - spec/bookingsync/api/client/rentals_amenities_spec.rb
         | 
| 155 | 
            +
            - spec/bookingsync/api/client/rentals_fees_spec.rb
         | 
| 147 156 | 
             
            - spec/bookingsync/api/client/rentals_spec.rb
         | 
| 148 157 | 
             
            - spec/bookingsync/api/client/reviews_spec.rb
         | 
| 149 158 | 
             
            - spec/bookingsync/api/client/seasons_spec.rb
         | 
| 150 159 | 
             
            - spec/bookingsync/api/client/sources_spec.rb
         | 
| 151 160 | 
             
            - spec/bookingsync/api/client/special_offers_spec.rb
         | 
| 161 | 
            +
            - spec/bookingsync/api/client/taxes_spec.rb
         | 
| 152 162 | 
             
            - spec/bookingsync/api/client_spec.rb
         | 
| 153 163 | 
             
            - spec/bookingsync/api/error_spec.rb
         | 
| 154 164 | 
             
            - spec/bookingsync/api/relation_spec.rb
         | 
| @@ -158,6 +168,7 @@ files: | |
| 158 168 | 
             
            - spec/fixtures/cassettes/BookingSync_API_Client_Amenities/_amenities/returns_amenities.yml
         | 
| 159 169 | 
             
            - spec/fixtures/cassettes/BookingSync_API_Client_Amenities/_amenity/returns_amenity.yml
         | 
| 160 170 | 
             
            - spec/fixtures/cassettes/BookingSync_API_Client_Availabilities/_availabilities/returns_availabilities.yml
         | 
| 171 | 
            +
            - spec/fixtures/cassettes/BookingSync_API_Client_Availabilities/_availability/returns_a_single_availability.yml
         | 
| 161 172 | 
             
            - spec/fixtures/cassettes/BookingSync_API_Client_BillingAddresses/_billing_addresses/returns_billing_addresses.yml
         | 
| 162 173 | 
             
            - spec/fixtures/cassettes/BookingSync_API_Client_Bookings/_booking/returns_a_single_booking.yml
         | 
| 163 174 | 
             
            - spec/fixtures/cassettes/BookingSync_API_Client_Bookings/_bookings/pagination/with_a_block/yields_block_with_batch_of_bookings.yml
         | 
| @@ -170,8 +181,11 @@ files: | |
| 170 181 | 
             
            - spec/fixtures/cassettes/BookingSync_API_Client_Bookings/_create_client/creates_a_new_client.yml
         | 
| 171 182 | 
             
            - spec/fixtures/cassettes/BookingSync_API_Client_Bookings/_edit_booking/updates_given_booking_by_ID.yml
         | 
| 172 183 | 
             
            - spec/fixtures/cassettes/BookingSync_API_Client_Bookings/_edit_client/updates_given_client_by_ID.yml
         | 
| 184 | 
            +
            - spec/fixtures/cassettes/BookingSync_API_Client_BookingsFees/_bookings_fees/returns_bookings_fees.yml
         | 
| 173 185 | 
             
            - spec/fixtures/cassettes/BookingSync_API_Client_BookingsPayments/_bookings_payments/returns_bookings_payments.yml
         | 
| 186 | 
            +
            - spec/fixtures/cassettes/BookingSync_API_Client_BookingsTaxes/_bookings_taxes/returns_bookings_taxes.yml
         | 
| 174 187 | 
             
            - spec/fixtures/cassettes/BookingSync_API_Client_Destinations/_destinations/returns_destinations.yml
         | 
| 188 | 
            +
            - spec/fixtures/cassettes/BookingSync_API_Client_Fees/_fees/returns_fees.yml
         | 
| 175 189 | 
             
            - spec/fixtures/cassettes/BookingSync_API_Client_Inquiries/_create_inquiry/creates_a_new_inquiry.yml
         | 
| 176 190 | 
             
            - spec/fixtures/cassettes/BookingSync_API_Client_Inquiries/_inquiries/returns_inquiries.yml
         | 
| 177 191 | 
             
            - spec/fixtures/cassettes/BookingSync_API_Client_Payments/_cancel_payment/cancels_given_payment.yml
         | 
| @@ -216,6 +230,7 @@ files: | |
| 216 230 | 
             
            - spec/fixtures/cassettes/BookingSync_API_Client_RentalsAmenities/_rentals_amenities/links/returns_associated_rental.yml
         | 
| 217 231 | 
             
            - spec/fixtures/cassettes/BookingSync_API_Client_RentalsAmenities/_rentals_amenities/returns_rentals_amenities.yml
         | 
| 218 232 | 
             
            - spec/fixtures/cassettes/BookingSync_API_Client_RentalsAmenities/_rentals_amenity/returns_rentals_amenity.yml
         | 
| 233 | 
            +
            - spec/fixtures/cassettes/BookingSync_API_Client_RentalsFees/_rentals_fees/returns_rentals_fees.yml
         | 
| 219 234 | 
             
            - spec/fixtures/cassettes/BookingSync_API_Client_Reviews/_create_review/creates_a_new_review.yml
         | 
| 220 235 | 
             
            - spec/fixtures/cassettes/BookingSync_API_Client_Reviews/_reviews/returns_reviews.yml
         | 
| 221 236 | 
             
            - spec/fixtures/cassettes/BookingSync_API_Client_Seasons/_create_season/creates_a_new_season.yml
         | 
| @@ -229,6 +244,7 @@ files: | |
| 229 244 | 
             
            - spec/fixtures/cassettes/BookingSync_API_Client_SpecialOffers/_delete_special_offer/deletes_given_special_offer.yml
         | 
| 230 245 | 
             
            - spec/fixtures/cassettes/BookingSync_API_Client_SpecialOffers/_edit_special_offer/updates_given_special_offer_by_ID.yml
         | 
| 231 246 | 
             
            - spec/fixtures/cassettes/BookingSync_API_Client_SpecialOffers/_special_offers/returns_special_offers.yml
         | 
| 247 | 
            +
            - spec/fixtures/cassettes/BookingSync_API_Client_Taxes/_taxes/returns_taxes.yml
         | 
| 232 248 | 
             
            - spec/fixtures/cassettes/spec/cassettes/BookingSync_API_Client_Bookings/_create_booking/creates_a_booking_yml.yml
         | 
| 233 249 | 
             
            - spec/fixtures/files/test.jpg
         | 
| 234 250 | 
             
            - spec/spec_helper.rb
         | 
| @@ -252,7 +268,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 252 268 | 
             
                  version: '0'
         | 
| 253 269 | 
             
            requirements: []
         | 
| 254 270 | 
             
            rubyforge_project: 
         | 
| 255 | 
            -
            rubygems_version: 2. | 
| 271 | 
            +
            rubygems_version: 2.4.3
         | 
| 256 272 | 
             
            signing_key: 
         | 
| 257 273 | 
             
            specification_version: 4
         | 
| 258 274 | 
             
            summary: Ruby interface for accessing https://www.bookingsync.com
         | 
| @@ -261,9 +277,12 @@ test_files: | |
| 261 277 | 
             
            - spec/bookingsync/api/client/availabilities_spec.rb
         | 
| 262 278 | 
             
            - spec/bookingsync/api/client/billing_addresses_spec.rb
         | 
| 263 279 | 
             
            - spec/bookingsync/api/client/billings_payments_spec.rb
         | 
| 280 | 
            +
            - spec/bookingsync/api/client/bookings_fees_spec.rb
         | 
| 264 281 | 
             
            - spec/bookingsync/api/client/bookings_spec.rb
         | 
| 282 | 
            +
            - spec/bookingsync/api/client/bookings_taxes_spec.rb
         | 
| 265 283 | 
             
            - spec/bookingsync/api/client/clients_spec.rb
         | 
| 266 284 | 
             
            - spec/bookingsync/api/client/destinations_spec.rb
         | 
| 285 | 
            +
            - spec/bookingsync/api/client/fees_spec.rb
         | 
| 267 286 | 
             
            - spec/bookingsync/api/client/inquiries_spec.rb
         | 
| 268 287 | 
             
            - spec/bookingsync/api/client/payments_spec.rb
         | 
| 269 288 | 
             
            - spec/bookingsync/api/client/periods_spec.rb
         | 
| @@ -273,11 +292,13 @@ test_files: | |
| 273 292 | 
             
            - spec/bookingsync/api/client/rates_tables_spec.rb
         | 
| 274 293 | 
             
            - spec/bookingsync/api/client/rental_agreements_spec.rb
         | 
| 275 294 | 
             
            - spec/bookingsync/api/client/rentals_amenities_spec.rb
         | 
| 295 | 
            +
            - spec/bookingsync/api/client/rentals_fees_spec.rb
         | 
| 276 296 | 
             
            - spec/bookingsync/api/client/rentals_spec.rb
         | 
| 277 297 | 
             
            - spec/bookingsync/api/client/reviews_spec.rb
         | 
| 278 298 | 
             
            - spec/bookingsync/api/client/seasons_spec.rb
         | 
| 279 299 | 
             
            - spec/bookingsync/api/client/sources_spec.rb
         | 
| 280 300 | 
             
            - spec/bookingsync/api/client/special_offers_spec.rb
         | 
| 301 | 
            +
            - spec/bookingsync/api/client/taxes_spec.rb
         | 
| 281 302 | 
             
            - spec/bookingsync/api/client_spec.rb
         | 
| 282 303 | 
             
            - spec/bookingsync/api/error_spec.rb
         | 
| 283 304 | 
             
            - spec/bookingsync/api/relation_spec.rb
         | 
| @@ -287,6 +308,7 @@ test_files: | |
| 287 308 | 
             
            - spec/fixtures/cassettes/BookingSync_API_Client_Amenities/_amenities/returns_amenities.yml
         | 
| 288 309 | 
             
            - spec/fixtures/cassettes/BookingSync_API_Client_Amenities/_amenity/returns_amenity.yml
         | 
| 289 310 | 
             
            - spec/fixtures/cassettes/BookingSync_API_Client_Availabilities/_availabilities/returns_availabilities.yml
         | 
| 311 | 
            +
            - spec/fixtures/cassettes/BookingSync_API_Client_Availabilities/_availability/returns_a_single_availability.yml
         | 
| 290 312 | 
             
            - spec/fixtures/cassettes/BookingSync_API_Client_BillingAddresses/_billing_addresses/returns_billing_addresses.yml
         | 
| 291 313 | 
             
            - spec/fixtures/cassettes/BookingSync_API_Client_Bookings/_booking/returns_a_single_booking.yml
         | 
| 292 314 | 
             
            - spec/fixtures/cassettes/BookingSync_API_Client_Bookings/_bookings/pagination/with_a_block/yields_block_with_batch_of_bookings.yml
         | 
| @@ -299,8 +321,11 @@ test_files: | |
| 299 321 | 
             
            - spec/fixtures/cassettes/BookingSync_API_Client_Bookings/_create_client/creates_a_new_client.yml
         | 
| 300 322 | 
             
            - spec/fixtures/cassettes/BookingSync_API_Client_Bookings/_edit_booking/updates_given_booking_by_ID.yml
         | 
| 301 323 | 
             
            - spec/fixtures/cassettes/BookingSync_API_Client_Bookings/_edit_client/updates_given_client_by_ID.yml
         | 
| 324 | 
            +
            - spec/fixtures/cassettes/BookingSync_API_Client_BookingsFees/_bookings_fees/returns_bookings_fees.yml
         | 
| 302 325 | 
             
            - spec/fixtures/cassettes/BookingSync_API_Client_BookingsPayments/_bookings_payments/returns_bookings_payments.yml
         | 
| 326 | 
            +
            - spec/fixtures/cassettes/BookingSync_API_Client_BookingsTaxes/_bookings_taxes/returns_bookings_taxes.yml
         | 
| 303 327 | 
             
            - spec/fixtures/cassettes/BookingSync_API_Client_Destinations/_destinations/returns_destinations.yml
         | 
| 328 | 
            +
            - spec/fixtures/cassettes/BookingSync_API_Client_Fees/_fees/returns_fees.yml
         | 
| 304 329 | 
             
            - spec/fixtures/cassettes/BookingSync_API_Client_Inquiries/_create_inquiry/creates_a_new_inquiry.yml
         | 
| 305 330 | 
             
            - spec/fixtures/cassettes/BookingSync_API_Client_Inquiries/_inquiries/returns_inquiries.yml
         | 
| 306 331 | 
             
            - spec/fixtures/cassettes/BookingSync_API_Client_Payments/_cancel_payment/cancels_given_payment.yml
         | 
| @@ -345,6 +370,7 @@ test_files: | |
| 345 370 | 
             
            - spec/fixtures/cassettes/BookingSync_API_Client_RentalsAmenities/_rentals_amenities/links/returns_associated_rental.yml
         | 
| 346 371 | 
             
            - spec/fixtures/cassettes/BookingSync_API_Client_RentalsAmenities/_rentals_amenities/returns_rentals_amenities.yml
         | 
| 347 372 | 
             
            - spec/fixtures/cassettes/BookingSync_API_Client_RentalsAmenities/_rentals_amenity/returns_rentals_amenity.yml
         | 
| 373 | 
            +
            - spec/fixtures/cassettes/BookingSync_API_Client_RentalsFees/_rentals_fees/returns_rentals_fees.yml
         | 
| 348 374 | 
             
            - spec/fixtures/cassettes/BookingSync_API_Client_Reviews/_create_review/creates_a_new_review.yml
         | 
| 349 375 | 
             
            - spec/fixtures/cassettes/BookingSync_API_Client_Reviews/_reviews/returns_reviews.yml
         | 
| 350 376 | 
             
            - spec/fixtures/cassettes/BookingSync_API_Client_Seasons/_create_season/creates_a_new_season.yml
         | 
| @@ -358,6 +384,7 @@ test_files: | |
| 358 384 | 
             
            - spec/fixtures/cassettes/BookingSync_API_Client_SpecialOffers/_delete_special_offer/deletes_given_special_offer.yml
         | 
| 359 385 | 
             
            - spec/fixtures/cassettes/BookingSync_API_Client_SpecialOffers/_edit_special_offer/updates_given_special_offer_by_ID.yml
         | 
| 360 386 | 
             
            - spec/fixtures/cassettes/BookingSync_API_Client_SpecialOffers/_special_offers/returns_special_offers.yml
         | 
| 387 | 
            +
            - spec/fixtures/cassettes/BookingSync_API_Client_Taxes/_taxes/returns_taxes.yml
         | 
| 361 388 | 
             
            - spec/fixtures/cassettes/spec/cassettes/BookingSync_API_Client_Bookings/_create_booking/creates_a_booking_yml.yml
         | 
| 362 389 | 
             
            - spec/fixtures/files/test.jpg
         | 
| 363 390 | 
             
            - spec/spec_helper.rb
         |