ffmike-rshoeboxed 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rshoeboxed/connection.rb +15 -3
- data/lib/rshoeboxed.rb +1 -1
- metadata +1 -1
@@ -77,7 +77,11 @@ module RShoeboxed
|
|
77
77
|
response = post_xml(request)
|
78
78
|
|
79
79
|
receipts = Receipt.parse(response)
|
80
|
-
|
80
|
+
if options[:paginate]
|
81
|
+
wrap_array_with_pagination(receipts, response, options[:current_page], options[:per_page])
|
82
|
+
else
|
83
|
+
receipts
|
84
|
+
end
|
81
85
|
end
|
82
86
|
|
83
87
|
def get_category_call
|
@@ -91,7 +95,11 @@ module RShoeboxed
|
|
91
95
|
response = post_xml(request)
|
92
96
|
|
93
97
|
categories = Category.parse(response)
|
94
|
-
|
98
|
+
if options[:paginate]
|
99
|
+
wrap_array_with_pagination(categories, response, options[:current_page], options[:per_page])
|
100
|
+
else
|
101
|
+
categories
|
102
|
+
end
|
95
103
|
end
|
96
104
|
|
97
105
|
def get_business_card_call(options = {})
|
@@ -105,7 +113,11 @@ module RShoeboxed
|
|
105
113
|
response = post_xml(request)
|
106
114
|
|
107
115
|
business_cards = BusinessCard.parse(response)
|
108
|
-
|
116
|
+
if options[:paginate]
|
117
|
+
wrap_array_with_pagination(business_cards, response, options[:current_page], options[:per_page])
|
118
|
+
else
|
119
|
+
business_cards
|
120
|
+
end
|
109
121
|
end
|
110
122
|
|
111
123
|
private
|
data/lib/rshoeboxed.rb
CHANGED