bookingsync-api 0.0.31 → 0.0.32

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 29fe2938d76ac10f4caa4acd50999ef657b2dba6
4
- data.tar.gz: cf7ccaec405c817390aee0848ccad6de6ff8ae4b
3
+ metadata.gz: bdef22e6fd7715a95e8d49c62d3e312dfcd10a3f
4
+ data.tar.gz: 0b2dd6172adaebfc8ba991c57cd95f31862c2f2c
5
5
  SHA512:
6
- metadata.gz: 39eed57dc0615325520f718c4e2b2fbd34d04997f51a6e148270e3f3dec0cb1f46375020807059fd4f0b6754ec4fd1721ce8b7a0292f9ccc941f7dcd672a6fb1
7
- data.tar.gz: 9defc13f184204034eebcf7e0b0d4e005318e95840acb42f8aab9a85709e177de826f2ee9e2d8c07d1c80f52ffe2cbebc3e1b4c59ee430d896cec95a14efd366
6
+ metadata.gz: 6d2d900082d34b2d91dad5588ed2019a8522fa2dc9531a1fe0cc6d9c5810431b2d18f9c00eb6f3494e9737790dc809fd3e24d1eb34b017a0e54e6014c98169c6
7
+ data.tar.gz: 5b06f174ab183454113fc3e3230e108410c0cbdfe2bf4b8f33286ff4389f777e6f9b8db784b3ad32d4a0124c28cd40e26f6183b8e3ee6409d133d2d74d1e923b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.0.32
4
+
5
+ - Add support for preferences_payments endpoint.
6
+
3
7
  ## 0.0.31
4
8
 
5
9
  - Add support for fees and rentals_fees creation.
@@ -15,6 +15,7 @@ require "bookingsync/api/client/inquiries"
15
15
  require "bookingsync/api/client/instant_bookings"
16
16
  require "bookingsync/api/client/periods"
17
17
  require "bookingsync/api/client/payments"
18
+ require "bookingsync/api/client/preferences_payments"
18
19
  require "bookingsync/api/client/photos"
19
20
  require "bookingsync/api/client/rates"
20
21
  require "bookingsync/api/client/rates_rules"
@@ -55,6 +56,7 @@ module BookingSync::API
55
56
  include BookingSync::API::Client::InstantBookings
56
57
  include BookingSync::API::Client::Periods
57
58
  include BookingSync::API::Client::Payments
59
+ include BookingSync::API::Client::PreferencesPayments
58
60
  include BookingSync::API::Client::Photos
59
61
  include BookingSync::API::Client::Rates
60
62
  include BookingSync::API::Client::RatesRules
@@ -0,0 +1,24 @@
1
+ module BookingSync::API
2
+ class Client
3
+ module PreferencesPayments
4
+ # List preferences payments
5
+ #
6
+ # Returns preferences payments 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 preferences payments.
10
+ #
11
+ # @example Get the list of preferences payments for the current account
12
+ # preferences_payments = @api.preferences_payments
13
+ # preferences_payments.first.gateway # => "blue_pay"
14
+ # @example Get the list of preferences payments only with gateway and supported_cardtypes for smaller response
15
+ # @api.preferences_payments(fields: [:gateway, :supported_cardtypes])
16
+ # @see http://docs.api.bookingsync.com/reference/endpoints/preferences_payments/#list-preferences-payments
17
+ def preferences_payments(options = {}, &block)
18
+ paginate :preferences_payments, options, &block
19
+ end
20
+ end
21
+ end
22
+ end
23
+
24
+
@@ -1,5 +1,5 @@
1
1
  module BookingSync
2
2
  module API
3
- VERSION = "0.0.31"
3
+ VERSION = "0.0.32"
4
4
  end
5
5
  end
@@ -0,0 +1,13 @@
1
+ require "spec_helper"
2
+
3
+ describe BookingSync::API::Client::PreferencesPayments do
4
+
5
+ let(:client) { BookingSync::API::Client.new(test_access_token) }
6
+
7
+ describe ".preferences_payments", :vcr do
8
+ it "returns preferences payments" do
9
+ expect(client.preferences_payments).not_to be_empty
10
+ assert_requested :get, bs_url("preferences_payments")
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,80 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://www.bookingsync.com/api/v3/preferences_payments
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - BookingSync API gem v0.0.31
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
+ - Fri, 11 Dec 2015 12:58:38 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
+ - '1449838800'
49
+ X-Ratelimit-Remaining:
50
+ - '987'
51
+ Link:
52
+ - <https://www.bookingsync.com/api/v3/preferences_payments?page=1>; rel="first",
53
+ <https://www.bookingsync.com/api/v3/preferences_payments?page=1>; rel="last"
54
+ X-Total-Pages:
55
+ - '1'
56
+ X-Total-Count:
57
+ - '1'
58
+ Etag:
59
+ - '"5bf4c557faa3122cfd9f122a80fb5d07"'
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=3e84a567-2802-4b85-9cb5-881a09d2c97b; path=/; expires=Fri, 18 Dec
68
+ 2015 12:58:38 -0000; secure
69
+ - ahoy_visitor=1c3ce16c-9440-4d69-a4cd-12925ada96b6; path=/; expires=Mon, 11
70
+ Dec 2017 12:58:38 -0000; secure
71
+ X-Request-Id:
72
+ - 4204caff-8935-470f-8e4d-f8d3a0c35add
73
+ X-Runtime:
74
+ - '0.063435'
75
+ body:
76
+ encoding: UTF-8
77
+ string: '{"links":{"preferences_payments.account":"https://www.bookingsync.com/api/v3/accounts/{preferences_payments.account}"},"preferences_payments":[{"links":{"account":3837},"id":3797,"test":false,"gateway":"blue_pay","credentials":{"login":"test","password":"test"},"supported_cardtypes":["visa"],"currencies":["EUR","USD"],"created_at":"2014-08-08T18:20:53Z","updated_at":"2015-12-11T12:58:21Z"}]}'
78
+ http_version:
79
+ recorded_at: Fri, 11 Dec 2015 12:58:41 GMT
80
+ recorded_with: VCR 2.9.2
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.31
4
+ version: 0.0.32
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-17 00:00:00.000000000 Z
11
+ date: 2015-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -117,6 +117,7 @@ files:
117
117
  - lib/bookingsync/api/client/payments.rb
118
118
  - lib/bookingsync/api/client/periods.rb
119
119
  - lib/bookingsync/api/client/photos.rb
120
+ - lib/bookingsync/api/client/preferences_payments.rb
120
121
  - lib/bookingsync/api/client/rates.rb
121
122
  - lib/bookingsync/api/client/rates_rules.rb
122
123
  - lib/bookingsync/api/client/rates_tables.rb
@@ -153,6 +154,7 @@ files:
153
154
  - spec/bookingsync/api/client/payments_spec.rb
154
155
  - spec/bookingsync/api/client/periods_spec.rb
155
156
  - spec/bookingsync/api/client/photos_spec.rb
157
+ - spec/bookingsync/api/client/preferences_payments_spec.rb
156
158
  - spec/bookingsync/api/client/rates_rules_spec.rb
157
159
  - spec/bookingsync/api/client/rates_spec.rb
158
160
  - spec/bookingsync/api/client/rates_tables_spec.rb
@@ -234,6 +236,7 @@ files:
234
236
  - spec/fixtures/cassettes/BookingSync_API_Client_Photos/_edit_photo/updates_photo_s_image_file.yml
235
237
  - spec/fixtures/cassettes/BookingSync_API_Client_Photos/_photo/returns_a_single_photo.yml
236
238
  - spec/fixtures/cassettes/BookingSync_API_Client_Photos/_photos/returns_photos.yml
239
+ - spec/fixtures/cassettes/BookingSync_API_Client_PreferencesPayments/_preferences_payments/returns_preferences_payments.yml
237
240
  - spec/fixtures/cassettes/BookingSync_API_Client_Rates/_rate/returns_a_single_rate.yml
238
241
  - spec/fixtures/cassettes/BookingSync_API_Client_Rates/_rates/returns_rates.yml
239
242
  - spec/fixtures/cassettes/BookingSync_API_Client_RatesRules/_create_rates_rule/creates_a_new_rates_rule.yml
@@ -315,7 +318,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
315
318
  version: '0'
316
319
  requirements: []
317
320
  rubyforge_project:
318
- rubygems_version: 2.4.5
321
+ rubygems_version: 2.4.8
319
322
  signing_key:
320
323
  specification_version: 4
321
324
  summary: Ruby interface for accessing https://www.bookingsync.com
@@ -337,6 +340,7 @@ test_files:
337
340
  - spec/bookingsync/api/client/payments_spec.rb
338
341
  - spec/bookingsync/api/client/periods_spec.rb
339
342
  - spec/bookingsync/api/client/photos_spec.rb
343
+ - spec/bookingsync/api/client/preferences_payments_spec.rb
340
344
  - spec/bookingsync/api/client/rates_rules_spec.rb
341
345
  - spec/bookingsync/api/client/rates_spec.rb
342
346
  - spec/bookingsync/api/client/rates_tables_spec.rb
@@ -418,6 +422,7 @@ test_files:
418
422
  - spec/fixtures/cassettes/BookingSync_API_Client_Photos/_edit_photo/updates_photo_s_image_file.yml
419
423
  - spec/fixtures/cassettes/BookingSync_API_Client_Photos/_photo/returns_a_single_photo.yml
420
424
  - spec/fixtures/cassettes/BookingSync_API_Client_Photos/_photos/returns_photos.yml
425
+ - spec/fixtures/cassettes/BookingSync_API_Client_PreferencesPayments/_preferences_payments/returns_preferences_payments.yml
421
426
  - spec/fixtures/cassettes/BookingSync_API_Client_Rates/_rate/returns_a_single_rate.yml
422
427
  - spec/fixtures/cassettes/BookingSync_API_Client_Rates/_rates/returns_rates.yml
423
428
  - spec/fixtures/cassettes/BookingSync_API_Client_RatesRules/_create_rates_rule/creates_a_new_rates_rule.yml