v2_intuity 1.0.5 → 1.0.6
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/lib/v2_intuity/clients/client.rb +3 -2
- data/lib/v2_intuity/streams/stream.rb +7 -3
- data/lib/v2_intuity/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 215cba1c197b14b5440d2a75a420134d6e9618a5
|
4
|
+
data.tar.gz: e7f1283c6c3ad33ed976b11cf800cbf5bca66350
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4dc3d6184e939ea6858a7b02080750ceb258b0a4da7db2de1ef1349fd35c65bf51e2a94091c71b697347d75a6b944ff592b9888792c5b271b35bb147b3453e10
|
7
|
+
data.tar.gz: 1e111930c5e897c5ba4fa01e8941713c38e692abda94ea0fe92ce625fd57cf1bd43185c047c29befb9eefb53f1982eaff4d679267bff92e10e8190820d15e344
|
@@ -18,8 +18,9 @@ module V2Intuity
|
|
18
18
|
def send_request(request)
|
19
19
|
case request.method
|
20
20
|
when V2Intuity::Request::METHODS[:get], V2Intuity::Request::METHODS[:delete]
|
21
|
-
|
22
|
-
|
21
|
+
re = @httparty_client.send(request.method.to_sym, request.uri, query: request.options[:query_filters], headers: request.options[:headers]) # puts re.request.last_uri.to_s
|
22
|
+
puts re.request.last_uri.to_s
|
23
|
+
re
|
23
24
|
when V2Intuity::Request::METHODS[:post], V2Intuity::Request::METHODS[:put]
|
24
25
|
@httparty_client.send(request.method.to_sym, request.uri, query: request.options[:query_filters],
|
25
26
|
body: request.options[:body].to_json,
|
@@ -21,13 +21,17 @@ module V2Intuity
|
|
21
21
|
private
|
22
22
|
|
23
23
|
def build_options(method, query_filters = [])
|
24
|
+
query_filters = query_filters.is_a?(Array) ? query_filters : [query_filters]
|
25
|
+
|
26
|
+
|
24
27
|
case method
|
25
28
|
when V2Intuity::Request::METHODS[:delete]
|
26
29
|
raise 'stream id is needed' unless stream_id
|
27
30
|
options = { method: method, id: stream_id }
|
28
31
|
|
29
32
|
when V2Intuity::Request::METHODS[:get]
|
30
|
-
|
33
|
+
puts method
|
34
|
+
options = { method: V2Intuity::Request::METHODS[:get], id: stream_id }.compact # id can be blank when getting all streams
|
31
35
|
when V2Intuity::Request::METHODS[:post]
|
32
36
|
raise 'name is required' unless name
|
33
37
|
body = { name: name, start_date: start_date,
|
@@ -41,9 +45,9 @@ module V2Intuity
|
|
41
45
|
|
42
46
|
else
|
43
47
|
raise 'incorrect method verb'
|
44
|
-
|
45
48
|
end
|
46
|
-
|
49
|
+
|
50
|
+
options[:query_filters] = query_filters unless query_filters.empty?
|
47
51
|
|
48
52
|
[V2Intuity::Endpoints::Stream.new, options]
|
49
53
|
end
|
data/lib/v2_intuity/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: v2_intuity
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- rruiz858
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-09-
|
11
|
+
date: 2017-09-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|