bookingsync-api 0.0.29 → 0.0.30

Sign up to get free protection for your applications and to get access to all the features.
Files changed (93) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -1
  3. data/README.md +44 -18
  4. data/lib/bookingsync/api/client.rb +0 -2
  5. data/lib/bookingsync/api/client/accounts.rb +11 -0
  6. data/lib/bookingsync/api/client/bathrooms.rb +11 -0
  7. data/lib/bookingsync/api/client/bedrooms.rb +11 -0
  8. data/lib/bookingsync/api/client/bookings_fees.rb +11 -0
  9. data/lib/bookingsync/api/client/bookings_payments.rb +11 -0
  10. data/lib/bookingsync/api/client/bookings_taxes.rb +11 -0
  11. data/lib/bookingsync/api/client/clients.rb +11 -0
  12. data/lib/bookingsync/api/client/destinations.rb +11 -0
  13. data/lib/bookingsync/api/client/fees.rb +11 -0
  14. data/lib/bookingsync/api/client/inquiries.rb +11 -0
  15. data/lib/bookingsync/api/client/payments.rb +11 -0
  16. data/lib/bookingsync/api/client/periods.rb +11 -0
  17. data/lib/bookingsync/api/client/photos.rb +11 -0
  18. data/lib/bookingsync/api/client/rates.rb +11 -0
  19. data/lib/bookingsync/api/client/rates_rules.rb +44 -0
  20. data/lib/bookingsync/api/client/rates_tables.rb +11 -0
  21. data/lib/bookingsync/api/client/rental_agreements.rb +11 -0
  22. data/lib/bookingsync/api/client/rentals_amenities.rb +23 -0
  23. data/lib/bookingsync/api/client/rentals_fees.rb +11 -0
  24. data/lib/bookingsync/api/client/reviews.rb +11 -0
  25. data/lib/bookingsync/api/client/seasons.rb +11 -0
  26. data/lib/bookingsync/api/client/sources.rb +11 -0
  27. data/lib/bookingsync/api/client/special_offers.rb +11 -0
  28. data/lib/bookingsync/api/client/taxes.rb +11 -0
  29. data/lib/bookingsync/api/version.rb +1 -1
  30. data/spec/bookingsync/api/client/accounts_spec.rb +7 -0
  31. data/spec/bookingsync/api/client/bathrooms_spec.rb +7 -0
  32. data/spec/bookingsync/api/client/bedrooms_spec.rb +7 -0
  33. data/spec/bookingsync/api/client/bookings_fees_spec.rb +9 -2
  34. data/spec/bookingsync/api/client/{billings_payments_spec.rb → bookings_payments_spec.rb} +7 -0
  35. data/spec/bookingsync/api/client/bookings_taxes_spec.rb +9 -2
  36. data/spec/bookingsync/api/client/clients_spec.rb +16 -13
  37. data/spec/bookingsync/api/client/destinations_spec.rb +7 -0
  38. data/spec/bookingsync/api/client/fees_spec.rb +9 -2
  39. data/spec/bookingsync/api/client/inquiries_spec.rb +7 -0
  40. data/spec/bookingsync/api/client/payments_spec.rb +7 -0
  41. data/spec/bookingsync/api/client/periods_spec.rb +7 -0
  42. data/spec/bookingsync/api/client/photos_spec.rb +7 -0
  43. data/spec/bookingsync/api/client/rates_rules_spec.rb +59 -0
  44. data/spec/bookingsync/api/client/rates_spec.rb +7 -0
  45. data/spec/bookingsync/api/client/rates_tables_spec.rb +7 -0
  46. data/spec/bookingsync/api/client/rental_agreements_spec.rb +7 -0
  47. data/spec/bookingsync/api/client/rentals_amenities_spec.rb +36 -8
  48. data/spec/bookingsync/api/client/rentals_fees_spec.rb +9 -2
  49. data/spec/bookingsync/api/client/reviews_spec.rb +7 -0
  50. data/spec/bookingsync/api/client/seasons_spec.rb +7 -0
  51. data/spec/bookingsync/api/client/sources_spec.rb +7 -0
  52. data/spec/bookingsync/api/client/special_offers_spec.rb +7 -0
  53. data/spec/bookingsync/api/client/taxes_spec.rb +9 -2
  54. data/spec/fixtures/cassettes/BookingSync_API_Client_Accounts/_account/returns_a_single_account.yml +80 -0
  55. data/spec/fixtures/cassettes/BookingSync_API_Client_Bathrooms/_bathroom/returns_a_single_bathroom.yml +81 -0
  56. data/spec/fixtures/cassettes/BookingSync_API_Client_Bedrooms/_bedroom/returns_a_single_bedroom.yml +81 -0
  57. data/spec/fixtures/cassettes/BookingSync_API_Client_BookingsFees/_bookings_fee/returns_a_single_bookings_fee.yml +81 -0
  58. data/spec/fixtures/cassettes/BookingSync_API_Client_BookingsPayments/_bookings_payment/returns_a_single_bookings_payment.yml +80 -0
  59. data/spec/fixtures/cassettes/BookingSync_API_Client_BookingsTaxes/_bookings_tax/returns_a_single_bookings_tax.yml +81 -0
  60. data/spec/fixtures/cassettes/BookingSync_API_Client_Clients/_client/returns_a_single_client.yml +81 -0
  61. data/spec/fixtures/cassettes/BookingSync_API_Client_Clients/_clients/returns_clients.yml +87 -0
  62. data/spec/fixtures/cassettes/BookingSync_API_Client_Clients/_create_client/creates_a_new_client.yml +76 -0
  63. data/spec/fixtures/cassettes/BookingSync_API_Client_Clients/_edit_client/updates_given_client_by_ID.yml +74 -0
  64. data/spec/fixtures/cassettes/BookingSync_API_Client_Destinations/_destination/returns_a_single_destination.yml +83 -0
  65. data/spec/fixtures/cassettes/BookingSync_API_Client_Fees/_fee/returns_a_single_fee.yml +81 -0
  66. data/spec/fixtures/cassettes/BookingSync_API_Client_Inquiries/_inquiry/returns_a_single_inquiry.yml +80 -0
  67. data/spec/fixtures/cassettes/BookingSync_API_Client_Payments/_payment/returns_a_single_payment.yml +80 -0
  68. data/spec/fixtures/cassettes/BookingSync_API_Client_Periods/_period/returns_a_single_period.yml +80 -0
  69. data/spec/fixtures/cassettes/BookingSync_API_Client_Photos/_photo/returns_a_single_photo.yml +80 -0
  70. data/spec/fixtures/cassettes/BookingSync_API_Client_Rates/_rate/returns_a_single_rate.yml +80 -0
  71. data/spec/fixtures/cassettes/BookingSync_API_Client_RatesRules/_create_rates_rule/creates_a_new_rates_rule.yml +75 -0
  72. data/spec/fixtures/cassettes/BookingSync_API_Client_RatesRules/_delete_rates_rule/deletes_given_rates_rule.yml +67 -0
  73. data/spec/fixtures/cassettes/BookingSync_API_Client_RatesRules/_edit_rates_rule/updates_given_rates_rule_by_ID.yml +73 -0
  74. data/spec/fixtures/cassettes/BookingSync_API_Client_RatesRules/_rates_rule/returns_a_single_rates_rule.yml +80 -0
  75. data/spec/fixtures/cassettes/BookingSync_API_Client_RatesRules/_rates_rules/returns_rates_rules.yml +38 -22
  76. data/spec/fixtures/cassettes/BookingSync_API_Client_RatesTables/_rates_table/returns_a_single_rates_table.yml +80 -0
  77. data/spec/fixtures/cassettes/BookingSync_API_Client_RentalAgreements/_rental_agreement/returns_a_single_rental_agreement.yml +80 -0
  78. data/spec/fixtures/cassettes/BookingSync_API_Client_RentalsAmenities/_create_rentals_amenity/{creates_a_new_rental_s_amenity.yml → creates_a_new_rentals_amenity.yml} +31 -23
  79. data/spec/fixtures/cassettes/BookingSync_API_Client_RentalsAmenities/_delete_rentals_amenity/deletes_given_rentals_amenity.yml +67 -0
  80. data/spec/fixtures/cassettes/BookingSync_API_Client_RentalsAmenities/{_create_rentals_amenity/returns_newly_created_rental_s_amenity.yml → _edit_rentals_amenity/updates_given_rentals_amenity_by_ID.yml} +34 -27
  81. data/spec/fixtures/cassettes/BookingSync_API_Client_RentalsFees/_rentals_fee/returns_a_single_rentals_fee.yml +81 -0
  82. data/spec/fixtures/cassettes/BookingSync_API_Client_Reviews/_review/returns_a_single_review.yml +81 -0
  83. data/spec/fixtures/cassettes/BookingSync_API_Client_Seasons/_season/returns_a_single_season.yml +81 -0
  84. data/spec/fixtures/cassettes/BookingSync_API_Client_Sources/_source/returns_a_single_source.yml +80 -0
  85. data/spec/fixtures/cassettes/BookingSync_API_Client_SpecialOffers/_special_offer/returns_a_single_special_offer.yml +81 -0
  86. data/spec/fixtures/cassettes/BookingSync_API_Client_Taxes/_tax/returns_a_single_tax.yml +81 -0
  87. metadata +68 -19
  88. data/lib/bookingsync/api/client/billing_addresses.rb +0 -22
  89. data/spec/bookingsync/api/client/billing_addresses_spec.rb +0 -12
  90. data/spec/fixtures/cassettes/BookingSync_API_Client_BillingAddresses/_billing_addresses/returns_billing_addresses.yml +0 -65
  91. data/spec/fixtures/cassettes/BookingSync_API_Client_Bookings/_clients/returns_clients.yml +0 -66
  92. data/spec/fixtures/cassettes/BookingSync_API_Client_Bookings/_create_client/creates_a_new_client.yml +0 -64
  93. data/spec/fixtures/cassettes/BookingSync_API_Client_Bookings/_edit_client/updates_given_client_by_ID.yml +0 -62
@@ -1,64 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: post
5
- uri: https://www.bookingsync.com/api/v3/clients
6
- body:
7
- encoding: UTF-8
8
- string: '{"clients":[{"fullname":"John Smith","phone":"11111111","mobile":"33333333","email":"smith@example.com","fax":"1111111","address1":"Italy","country_code":"IT","city":"Rome"}]}'
9
- headers:
10
- User-Agent:
11
- - Faraday v0.9.0
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: 201
23
- message: Created
24
- headers:
25
- X-Ratelimit-Limit:
26
- - '1000'
27
- X-Ratelimit-Reset:
28
- - '1397516400'
29
- X-Ratelimit-Remaining:
30
- - '996'
31
- Location:
32
- - https://www.bookingsync.com/api/v3/clients/21
33
- Access-Control-Allow-Origin:
34
- - '*'
35
- Access-Control-Request-Method:
36
- - '*'
37
- Content-Type:
38
- - application/vnd.api+json; charset=utf-8
39
- X-Ua-Compatible:
40
- - IE=Edge
41
- Etag:
42
- - '"f60f84f3cae91e0bb7b5a0b1f4983735"'
43
- Cache-Control:
44
- - max-age=0, private, must-revalidate
45
- P3p:
46
- - CP="OTI DSP COR CUR ADMo DEVo TAI PSAi PSDi IVAi IVDi CONi HISi TELi OTPi
47
- OUR SAMi OTRo UNRo PUBi IND UNI STA"
48
- Set-Cookie:
49
- - _BookingSync_session=6f84ad4728ff2f51fd0ec06f51af6982; path=/; secure; HttpOnly
50
- X-Request-Id:
51
- - c511730e412109732e60d6d0c0a6720a
52
- X-Runtime:
53
- - '0.157385'
54
- Date:
55
- - Mon, 14 Apr 2014 22:04:17 GMT
56
- Connection:
57
- - close
58
- body:
59
- encoding: UTF-8
60
- string: '{"clients":[{"id":21,"email":"smith@example.com","phone":"11111111","mobile":"33333333","fax":"1111111","address1":"Italy","address2":null,"city":"Rome","state":null,"zip":null,"country_code":"IT","account_id":1,"created_at":"2014-04-14T22:04:16Z","updated_at":"2014-04-14T22:04:16Z","fullname":"John
61
- Smith","notes":null}]}'
62
- http_version:
63
- recorded_at: Mon, 14 Apr 2014 22:04:17 GMT
64
- recorded_with: VCR 2.9.0
@@ -1,62 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: put
5
- uri: https://www.bookingsync.com/api/v3/clients/2
6
- body:
7
- encoding: UTF-8
8
- string: '{"clients":[{"fullname":"Gary Smith"}]}'
9
- headers:
10
- User-Agent:
11
- - Faraday v0.9.0
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
- X-Ratelimit-Limit:
26
- - '1000'
27
- X-Ratelimit-Reset:
28
- - '1398106800'
29
- X-Ratelimit-Remaining:
30
- - '993'
31
- Access-Control-Allow-Origin:
32
- - '*'
33
- Access-Control-Request-Method:
34
- - '*'
35
- Content-Type:
36
- - application/vnd.api+json; charset=utf-8
37
- X-Ua-Compatible:
38
- - IE=Edge
39
- Etag:
40
- - '"611bdb1657961179c09b8dab364b46ac"'
41
- Cache-Control:
42
- - max-age=0, private, must-revalidate
43
- P3p:
44
- - CP="OTI DSP COR CUR ADMo DEVo TAI PSAi PSDi IVAi IVDi CONi HISi TELi OTPi
45
- OUR SAMi OTRo UNRo PUBi IND UNI STA"
46
- Set-Cookie:
47
- - _BookingSync_session=d5f491c8b46b52f121c4eb9b8c4d0f48; path=/; secure; HttpOnly
48
- X-Request-Id:
49
- - 94ffc7815ad532ba844b8bb11d957b0d
50
- X-Runtime:
51
- - '0.307201'
52
- Date:
53
- - Mon, 21 Apr 2014 18:40:41 GMT
54
- Connection:
55
- - close
56
- body:
57
- encoding: UTF-8
58
- string: '{"clients":[{"id":2,"email":"giuseppe.king@walker.us","phone":"","mobile":null,"fax":null,"address1":"","address2":null,"city":"","state":"","zip":"","country_code":"","account_id":1,"created_at":"2014-02-11T09:13:19Z","updated_at":"2014-04-14T22:23:54Z","fullname":"Gary
59
- Smith","notes":null}]}'
60
- http_version:
61
- recorded_at: Mon, 21 Apr 2014 18:40:41 GMT
62
- recorded_with: VCR 2.9.0