fantasticstay_api 0.1.1 → 0.1.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bdecfb00c6c09a2e935ade7f958df01b634928f4c6bb46baa6d6e0992c01ffaa
4
- data.tar.gz: ac032f6927c1b9769224c88008b10c6442c00b0e685b343081e96fd7b651c1f1
3
+ metadata.gz: f0a0159628ff5d6e47b19ff0cbcc1f206809c18bf01a85581c80ce448cc2d8cd
4
+ data.tar.gz: fc4aa632878fad907ddada639f09339d16d90db906c1bd4a2d1bb34a68cab3ac
5
5
  SHA512:
6
- metadata.gz: 75c5256ada0d0a1f1b3098ce474820fa6e67a5ca5d997fbab9682be27e745903ea2879dc97797bd940c3f5601c926fe672f053b6adb4b00e8e07bc8657287973
7
- data.tar.gz: 47658f8667df190a20bcb052a6bb2de69fc3b0ad90fb69c08777a6f47e2fa1e906bb5431ef349cb81a2ebf57d856bb6b523ef5d7bb916eff74030b2fd2d4d4b0
6
+ metadata.gz: 66c7a86db2f4e5bad774620f8c7f0eaa00af1e63ffffe357a3df59165507bf9e43446252b8a632c5a56da904c9be80a6cc40236919ca6b130d00f49fecd94f8f
7
+ data.tar.gz: ffdd16db301ead53334a991d423cf72714f6c19568d916b607e2304886ed785f76697adc459826fa79676159b0c5cb3ec4c807ba1f5367f0de3d196f75b4b9df
@@ -45,16 +45,17 @@ module FantasticstayApi
45
45
  end
46
46
 
47
47
  # FantasticstayApi::Client.new.reservations(38859)
48
- def reservations(listing_id, filters = [], sort = nil, global_params = {})
48
+ def reservations(listing_id, filters = [], sort = { order: 'checkIn', direction: 'desc' }, global_params = {})
49
49
  response = request(
50
50
  http_method: :get,
51
51
  endpoint: 'reservations',
52
52
  params: {
53
53
  listing_id: listing_id,
54
54
  filters: filters.to_json,
55
- sort: sort
55
+ sort: sort[:order],
56
+ direction: sort[:direction]
56
57
  }.merge!(global_params),
57
- cache_ttl: 3600*24
58
+ cache_ttl: 3600 * 24
58
59
  )
59
60
  process_response(response)
60
61
  end
@@ -73,7 +74,7 @@ module FantasticstayApi
73
74
  http_method: :get,
74
75
  endpoint: "guests/#{guest_id}",
75
76
  params: global_params,
76
- cache_ttl: 3600*24
77
+ cache_ttl: 3600 * 24
77
78
  )
78
79
  process_response(response)
79
80
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FantasticstayApi
4
- VERSION = '0.1.1'
4
+ VERSION = '0.1.2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fantasticstay_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dinis
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-09-14 00:00:00.000000000 Z
11
+ date: 2022-10-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -94,7 +94,7 @@ metadata:
94
94
  homepage_uri: https://github.com/dlage/fantasticstay_api_gem
95
95
  source_code_uri: https://github.com/dlage/fantasticstay_api_gem
96
96
  changelog_uri: https://github.com/dlage/fantasticstay_api_gem/blob/master/CHANGELOG.md
97
- post_install_message:
97
+ post_install_message:
98
98
  rdoc_options: []
99
99
  require_paths:
100
100
  - lib
@@ -109,8 +109,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  requirements: []
112
- rubygems_version: 3.3.7
113
- signing_key:
112
+ rubygems_version: 3.2.33
113
+ signing_key:
114
114
  specification_version: 4
115
115
  summary: FantasticStay API Wrapper.
116
116
  test_files: []