ffmike-rshoeboxed 0.0.7 → 0.0.8
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.
- data/lib/rshoeboxed/connection.rb +19 -4
- data/lib/rshoeboxed.rb +1 -1
- metadata +2 -2
@@ -69,28 +69,43 @@ module RShoeboxed
|
|
69
69
|
options = {
|
70
70
|
:use_sell_date => false,
|
71
71
|
:per_page => 50,
|
72
|
-
:current_page => 1
|
72
|
+
:current_page => 1,
|
73
|
+
:paginate => false
|
73
74
|
}.merge(options)
|
74
75
|
|
75
76
|
request = build_receipt_request(start_date, end_date, options)
|
76
77
|
response = post_xml(request)
|
77
78
|
|
78
79
|
receipts = Receipt.parse(response)
|
79
|
-
wrap_array_with_pagination(receipts, response, options[:current_page], options[:per_page])
|
80
|
+
wrap_array_with_pagination(receipts, response, options[:current_page], options[:per_page]) if options[:paginate]
|
80
81
|
end
|
81
82
|
|
82
83
|
def get_category_call
|
84
|
+
options = {
|
85
|
+
:per_page => 50,
|
86
|
+
:current_page => 1,
|
87
|
+
:paginate => false
|
88
|
+
}.merge(options)
|
89
|
+
|
83
90
|
request = build_category_request
|
84
91
|
response = post_xml(request)
|
85
92
|
|
86
|
-
Category.parse(response)
|
93
|
+
categories = Category.parse(response)
|
94
|
+
wrap_array_with_pagination(categories, response, options[:current_page], options[:per_page]) if options[:paginate]
|
87
95
|
end
|
88
96
|
|
89
97
|
def get_business_card_call(options = {})
|
98
|
+
options = {
|
99
|
+
:per_page => 50,
|
100
|
+
:current_page => 1,
|
101
|
+
:paginate => false
|
102
|
+
}.merge(options)
|
103
|
+
|
90
104
|
request = build_business_card_request(options)
|
91
105
|
response = post_xml(request)
|
92
106
|
|
93
|
-
BusinessCard.parse(response)
|
107
|
+
business_cards = BusinessCard.parse(response)
|
108
|
+
wrap_array_with_pagination(business_cards, response, options[:current_page], options[:per_page]) if options[:paginate]
|
94
109
|
end
|
95
110
|
|
96
111
|
private
|
data/lib/rshoeboxed.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ffmike-rshoeboxed
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Curren
|
@@ -11,7 +11,7 @@ autorequire:
|
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
13
|
|
14
|
-
date: 2009-
|
14
|
+
date: 2009-07-21 00:00:00 -07:00
|
15
15
|
default_executable:
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|