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.
@@ -77,7 +77,11 @@ module RShoeboxed
77
77
  response = post_xml(request)
78
78
 
79
79
  receipts = Receipt.parse(response)
80
- wrap_array_with_pagination(receipts, response, options[:current_page], options[:per_page]) if options[:paginate]
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
- wrap_array_with_pagination(categories, response, options[:current_page], options[:per_page]) if options[:paginate]
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
- wrap_array_with_pagination(business_cards, response, options[:current_page], options[:per_page]) if options[:paginate]
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
@@ -10,5 +10,5 @@ require 'rshoeboxed/list_proxy'
10
10
  require 'rshoeboxed/parse_error'
11
11
 
12
12
  module RShoeboxed
13
- VERSION = '0.0.8'
13
+ VERSION = '0.0.9'
14
14
  end
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.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Curren