paychex_api 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/paychex_api/api_array.rb +12 -8
- data/lib/paychex_api/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc00ec5a8405825185829380f0df8d122a491f61a867bcbb3b726197cace5fa8
|
4
|
+
data.tar.gz: acd90fb4babca071be0b146aff187da6fbe8c10f2c958d9fb5fc9c92f945d420
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2358dff6c297109a76ae2718b3cf6cfe435eb55e0106f4163114f92e143c343a59f0b43727d5fddb04803731bfcb3a4b44157ee10771793292f4c54f6bf2bf7a
|
7
|
+
data.tar.gz: 2a4a3dfa007b7af1435ef604562253da7d105fa083e8efe2e33760cf18d3e0288485099479f47883a6f388c3e919d9e88ec274090e9acb80b4a00bcb24c3e053
|
data/Gemfile.lock
CHANGED
@@ -8,8 +8,8 @@ module PaychexAPI
|
|
8
8
|
@next_page = nil
|
9
9
|
@prev_page = nil
|
10
10
|
|
11
|
-
attr_reader :status, :headers, :
|
12
|
-
attr_writer :next_page
|
11
|
+
attr_reader :status, :headers, :links, :metadata, :errors
|
12
|
+
attr_writer :next_page, :members
|
13
13
|
|
14
14
|
def self.process_response(response, api_client)
|
15
15
|
ApiArray.new(response, api_client)
|
@@ -28,20 +28,24 @@ module PaychexAPI
|
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
31
|
+
def members
|
32
|
+
@members || []
|
33
|
+
end
|
34
|
+
|
31
35
|
def length
|
32
|
-
|
36
|
+
members.length
|
33
37
|
end
|
34
38
|
|
35
39
|
def [](index)
|
36
|
-
|
40
|
+
members[index]
|
37
41
|
end
|
38
42
|
|
39
43
|
def last
|
40
|
-
|
44
|
+
members.last
|
41
45
|
end
|
42
46
|
|
43
47
|
def each
|
44
|
-
|
48
|
+
members.each { |member| yield(member) }
|
45
49
|
end
|
46
50
|
|
47
51
|
def pages?
|
@@ -53,12 +57,12 @@ module PaychexAPI
|
|
53
57
|
end
|
54
58
|
|
55
59
|
def each_page
|
56
|
-
yield(
|
60
|
+
yield(members, @linked, @meta)
|
57
61
|
while @next_page
|
58
62
|
response = get_page(@next_page)
|
59
63
|
apply_response_metadata(response, false)
|
60
64
|
@members = get_response_content(response)
|
61
|
-
yield(
|
65
|
+
yield(members, @linked, @meta)
|
62
66
|
end
|
63
67
|
@link_hash = {}
|
64
68
|
end
|
data/lib/paychex_api/version.rb
CHANGED