powa_api 0.0.3 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source :gemcutter
1
+ source 'http://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in powa-api.gemspec
4
4
  gemspec
@@ -14,7 +14,7 @@ module PowaApi
14
14
  xml.soapenv(:Body) do |xml|
15
15
  xml.urn(:FindUpdatedOrdersRequest) do |xml|
16
16
  xml.updatedFrom updated_from.strftime('%FT%T.000')
17
- xml.updateTo updated_to.strftime('%FT%T.000') if updated_to
17
+ xml.updatedTo updated_to.strftime('%FT%T.000') if updated_to
18
18
  end
19
19
  end
20
20
  end
@@ -55,9 +55,11 @@ module PowaApi
55
55
 
56
56
  # This method invokes find_updated_orders and then calls get_order_details for each order
57
57
  # and returns an array of the results
58
- def self.get_orders(start_date, end_date)
58
+ def self.get_orders(start_date, end_date=nil)
59
59
  orders = []
60
- order_ids = OrderService.find_updated_orders(start_date, end_date)
60
+
61
+ # Grab the list of orders and extract the order numbers
62
+ order_ids = OrderService.find_updated_orders(start_date, end_date).map { |order| order[:order_number] }
61
63
 
62
64
  order_ids.each do |order_id|
63
65
  orders << OrderService.get_order_details(order_id)
@@ -1,3 +1,3 @@
1
1
  module PowaApi
2
- VERSION = "0.0.3"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: powa_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,11 +10,11 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-11-21 00:00:00.000000000 Z
13
+ date: 2012-11-26 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler
17
- requirement: &70218966339480 !ruby/object:Gem::Requirement
17
+ requirement: &70154419775620 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: 1.0.0.rc.5
23
23
  type: :development
24
24
  prerelease: false
25
- version_requirements: *70218966339480
25
+ version_requirements: *70154419775620
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: savon
28
- requirement: &70218966338120 !ruby/object:Gem::Requirement
28
+ requirement: &70154419774280 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ! '>='
@@ -33,7 +33,7 @@ dependencies:
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *70218966338120
36
+ version_requirements: *70154419774280
37
37
  description: Implementation of the Powa API
38
38
  email: []
39
39
  executables: []