active_fulfillment 2.1.5 → 2.1.6

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7036a3a77c5f7ec83a92fbf8768847ab9416febd
4
- data.tar.gz: 8f0cd75f70e79221b07bfe3fed644708a24443cc
3
+ metadata.gz: e4362a1173e03f71bdcd1f26ca7a643f463ade18
4
+ data.tar.gz: 46c3b9a7179584e85496a07a204ceb5ace6d388b
5
5
  SHA512:
6
- metadata.gz: e38504af8b5b1b943e282957298cb55f02876ce6fbd4cfcffe3b7fb8fb6b9f16181ec80256812108a47d4deffca1b996fd13ffc4f38da2dbc8787ccc58b71229
7
- data.tar.gz: a8a228e30c53641539d85dfd50bb191bfa5d439a2a0a8d042955e4d34274c8faca1e47aaed5ffd5b1ff758c8c079a372b4f4af1503b8b2a69e5cb4a5a4a6dab4
6
+ metadata.gz: 5c071f80b06412e9cec9f4ff381b4853c758320ff3476331b3247437698c80f27157654931c5695e963765622f0b341db1279a043018c26d445ff2546bc9f0be
7
+ data.tar.gz: 1d85c23e9a29f9e86e9d5bd316a4126b3887f2735daaf3ebcfd3c3dab56bfabc9e0c3b916539d3959cdaf8f23b92332e323b78c4e835cd10726fc1a2458b51ba
checksums.yaml.gz.sig ADDED
Binary file
data.tar.gz.sig ADDED
Binary file
@@ -415,6 +415,7 @@ module ActiveMerchant
415
415
  requires!(address, :name, :address1, :city, :country, :zip)
416
416
  address[:state] ||= "N/A"
417
417
  address[:zip].upcase!
418
+ address[:name] = "#{address[:company]} - #{address[:name]}" if address[:company].present?
418
419
  ary = address.map{ |key, value| [LOOKUPS[:destination_address][key], value] if LOOKUPS[:destination_address].include?(key) && value.present? }
419
420
  Hash[ary.compact]
420
421
  end
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
  module ActiveMerchant
3
3
  module Fulfillment
4
- VERSION = "2.1.5"
4
+ VERSION = "2.1.6"
5
5
  end
6
6
  end
@@ -24,6 +24,18 @@ class AmazonMarketplaceWebServiceTest < Test::Unit::TestCase
24
24
  :phone => "(555)555-5555"
25
25
  }
26
26
 
27
+ @commercial_address = {
28
+ :name => 'Johnny Buy',
29
+ :company => 'Shopify',
30
+ :address1 => '100 Information Super Highway',
31
+ :address2 => 'Suite 66',
32
+ :city => 'Beverly Hills',
33
+ :state => 'CA',
34
+ :country => 'US',
35
+ :zip => '90210',
36
+ :phone => "(555)555-5555"
37
+ }
38
+
27
39
  @canadian_address = {
28
40
  :name => 'Johnny Bouchard',
29
41
  :address1 => '100 Canuck St',
@@ -121,6 +133,20 @@ class AmazonMarketplaceWebServiceTest < Test::Unit::TestCase
121
133
  assert_equal expected_items, @service.build_address(@address)
122
134
  end
123
135
 
136
+ def test_build_address_attaches_company_name_to_name
137
+ expected_items = {
138
+ "DestinationAddress.Name" => "#{@commercial_address[:company]} - #{@commercial_address[:name]}",
139
+ "DestinationAddress.Line1" => @commercial_address[:address1],
140
+ "DestinationAddress.Line2" => @commercial_address[:address2],
141
+ "DestinationAddress.City" => @commercial_address[:city],
142
+ "DestinationAddress.StateOrProvinceCode" => @commercial_address[:state],
143
+ "DestinationAddress.CountryCode" => @commercial_address[:country],
144
+ "DestinationAddress.PostalCode" => @commercial_address[:zip],
145
+ "DestinationAddress.PhoneNumber" => @commercial_address[:phone]
146
+ }
147
+ assert_equal expected_items, @service.build_address(@commercial_address)
148
+ end
149
+
124
150
  def test_build_address_upcases_postal_code
125
151
  address = @service.build_address(@canadian_address)
126
152
  assert_equal address["DestinationAddress.PostalCode"], "H0H0H0"
metadata CHANGED
@@ -1,112 +1,134 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_fulfillment
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.5
4
+ version: 2.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cody Fauser
8
8
  - James MacAulay
9
9
  autorequire:
10
10
  bindir: bin
11
- cert_chain: []
12
- date: 2014-07-08 00:00:00.000000000 Z
11
+ cert_chain:
12
+ - |
13
+ -----BEGIN CERTIFICATE-----
14
+ MIIDcDCCAligAwIBAgIBATANBgkqhkiG9w0BAQUFADA/MQ8wDQYDVQQDDAZhZG1p
15
+ bnMxFzAVBgoJkiaJk/IsZAEZFgdzaG9waWZ5MRMwEQYKCZImiZPyLGQBGRYDY29t
16
+ MB4XDTE0MDUxNTIwMzM0OFoXDTE1MDUxNTIwMzM0OFowPzEPMA0GA1UEAwwGYWRt
17
+ aW5zMRcwFQYKCZImiZPyLGQBGRYHc2hvcGlmeTETMBEGCgmSJomT8ixkARkWA2Nv
18
+ bTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAL0/81O3e1vh5smcwp2G
19
+ MpLQ6q0kejQLa65bPYPxdzWA1SYOKyGfw+yR9LdFzsuKpwWzKq6zX35lj1IckWS4
20
+ bNBEQzxmufUxU0XPM02haFB8fOfDJzdXsWte9Ge4IFwahwn68gpMqN+BvxL+KMYz
21
+ Iut9YmN44d4LZdsENEIO5vmybuG2vYDz7R56qB0PA+Q2P2CdhymsBad2DQs69FBo
22
+ uico9V6VMYYctL9lCYdzu9IXrOYNTt88suKIVzzAlHOKeN0Ng5qdztFoTR8sfxDr
23
+ Ydg3KHl5n47wlpgd8R0f/4b5gGxW+v9pyJCgQnLlRu7DedVSvv7+GMtj3g9r3nhJ
24
+ KqECAwEAAaN3MHUwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0OBBYEFI/o
25
+ maf34HXbUOQsdoLHacEKQgunMB0GA1UdEQQWMBSBEmFkbWluc0BzaG9waWZ5LmNv
26
+ bTAdBgNVHRIEFjAUgRJhZG1pbnNAc2hvcGlmeS5jb20wDQYJKoZIhvcNAQEFBQAD
27
+ ggEBADkK9aj5T0HPExsov4EoMWFnO+G7RQ28C30VAfKxnL2UxG6i4XMHVs6Xi94h
28
+ qXFw1ec9Y2eDUqaolT3bviOk9BB197+A8Vz/k7MC6ci2NE+yDDB7HAC8zU6LAx8Y
29
+ Iqvw7B/PSZ/pz4bUVFlTATif4mi1vO3lidRkdHRtM7UePSn2rUpOi0gtXBP3bLu5
30
+ YjHJN7wx5cugMEyroKITG5gL0Nxtu21qtOlHX4Hc4KdE2JqzCPOsS4zsZGhgwhPs
31
+ fl3hbtVFTqbOlwL9vy1fudXcolIE/ZTcxQ+er07ZFZdKCXayR9PPs64heamfn0fp
32
+ TConQSX2BnZdhIEYW+cKzEC/bLc=
33
+ -----END CERTIFICATE-----
34
+ date: 2014-07-30 00:00:00.000000000 Z
13
35
  dependencies:
14
36
  - !ruby/object:Gem::Dependency
15
37
  name: activesupport
16
38
  requirement: !ruby/object:Gem::Requirement
17
39
  requirements:
18
- - - '>='
40
+ - - ">="
19
41
  - !ruby/object:Gem::Version
20
42
  version: 3.2.9
21
43
  type: :runtime
22
44
  prerelease: false
23
45
  version_requirements: !ruby/object:Gem::Requirement
24
46
  requirements:
25
- - - '>='
47
+ - - ">="
26
48
  - !ruby/object:Gem::Version
27
49
  version: 3.2.9
28
50
  - !ruby/object:Gem::Dependency
29
51
  name: builder
30
52
  requirement: !ruby/object:Gem::Requirement
31
53
  requirements:
32
- - - '>='
54
+ - - ">="
33
55
  - !ruby/object:Gem::Version
34
56
  version: 2.0.0
35
57
  type: :runtime
36
58
  prerelease: false
37
59
  version_requirements: !ruby/object:Gem::Requirement
38
60
  requirements:
39
- - - '>='
61
+ - - ">="
40
62
  - !ruby/object:Gem::Version
41
63
  version: 2.0.0
42
64
  - !ruby/object:Gem::Dependency
43
65
  name: active_utils
44
66
  requirement: !ruby/object:Gem::Requirement
45
67
  requirements:
46
- - - ~>
68
+ - - "~>"
47
69
  - !ruby/object:Gem::Version
48
70
  version: 2.2.0
49
71
  type: :runtime
50
72
  prerelease: false
51
73
  version_requirements: !ruby/object:Gem::Requirement
52
74
  requirements:
53
- - - ~>
75
+ - - "~>"
54
76
  - !ruby/object:Gem::Version
55
77
  version: 2.2.0
56
78
  - !ruby/object:Gem::Dependency
57
79
  name: rake
58
80
  requirement: !ruby/object:Gem::Requirement
59
81
  requirements:
60
- - - '>='
82
+ - - ">="
61
83
  - !ruby/object:Gem::Version
62
84
  version: '0'
63
85
  type: :development
64
86
  prerelease: false
65
87
  version_requirements: !ruby/object:Gem::Requirement
66
88
  requirements:
67
- - - '>='
89
+ - - ">="
68
90
  - !ruby/object:Gem::Version
69
91
  version: '0'
70
92
  - !ruby/object:Gem::Dependency
71
93
  name: mocha
72
94
  requirement: !ruby/object:Gem::Requirement
73
95
  requirements:
74
- - - '>='
96
+ - - ">="
75
97
  - !ruby/object:Gem::Version
76
98
  version: '0'
77
99
  type: :development
78
100
  prerelease: false
79
101
  version_requirements: !ruby/object:Gem::Requirement
80
102
  requirements:
81
- - - '>='
103
+ - - ">="
82
104
  - !ruby/object:Gem::Version
83
105
  version: '0'
84
106
  - !ruby/object:Gem::Dependency
85
107
  name: minitest
86
108
  requirement: !ruby/object:Gem::Requirement
87
109
  requirements:
88
- - - '>='
110
+ - - ">="
89
111
  - !ruby/object:Gem::Version
90
112
  version: '0'
91
113
  type: :development
92
114
  prerelease: false
93
115
  version_requirements: !ruby/object:Gem::Requirement
94
116
  requirements:
95
- - - '>='
117
+ - - ">="
96
118
  - !ruby/object:Gem::Version
97
119
  version: '0'
98
120
  - !ruby/object:Gem::Dependency
99
121
  name: rdoc
100
122
  requirement: !ruby/object:Gem::Requirement
101
123
  requirements:
102
- - - '>='
124
+ - - ">="
103
125
  - !ruby/object:Gem::Version
104
126
  version: 2.4.2
105
127
  type: :development
106
128
  prerelease: false
107
129
  version_requirements: !ruby/object:Gem::Requirement
108
130
  requirements:
109
- - - '>='
131
+ - - ">="
110
132
  - !ruby/object:Gem::Version
111
133
  version: 2.4.2
112
134
  description:
@@ -172,12 +194,12 @@ require_paths:
172
194
  - lib
173
195
  required_ruby_version: !ruby/object:Gem::Requirement
174
196
  requirements:
175
- - - '>='
197
+ - - ">="
176
198
  - !ruby/object:Gem::Version
177
199
  version: '0'
178
200
  required_rubygems_version: !ruby/object:Gem::Requirement
179
201
  requirements:
180
- - - '>='
202
+ - - ">="
181
203
  - !ruby/object:Gem::Version
182
204
  version: '0'
183
205
  requirements: []
@@ -188,40 +210,40 @@ specification_version: 4
188
210
  summary: Framework and tools for dealing with shipping, tracking and order fulfillment
189
211
  services.
190
212
  test_files:
191
- - test/fixtures/xml/amazon/inventory_get_response.xml
192
- - test/fixtures/xml/amazon/inventory_list_response.xml
193
- - test/fixtures/xml/amazon/inventory_list_response_with_next_1.xml
194
- - test/fixtures/xml/amazon/inventory_list_response_with_next_2.xml
195
- - test/fixtures/xml/amazon/tracking_response_1.xml
196
- - test/fixtures/xml/amazon/tracking_response_2.xml
197
- - test/fixtures/xml/amazon/tracking_response_error.xml
198
- - test/fixtures/xml/amazon/tracking_response_not_found.xml
199
- - test/fixtures/xml/amazon_mws/fulfillment_get_fulfillment_order.xml
213
+ - test/test_helper.rb
214
+ - test/remote/amazon_test.rb
215
+ - test/remote/webgistix_test.rb
216
+ - test/remote/shipwire_test.rb
217
+ - test/remote/amazon_mws_test.rb
218
+ - test/unit/services/amazon_test.rb
219
+ - test/unit/services/webgistix_test.rb
220
+ - test/unit/services/shipwire_test.rb
221
+ - test/unit/services/amazon_mws_test.rb
222
+ - test/unit/base_test.rb
223
+ - test/fixtures/xml/webgistix/multiple_tracking_response.xml
224
+ - test/fixtures/xml/webgistix/tracking_response.xml
200
225
  - test/fixtures/xml/amazon_mws/fulfillment_get_fulfillment_order_2.xml
201
- - test/fixtures/xml/amazon_mws/fulfillment_get_fullfillment_order_with_multiple_tracking_numbers.xml
202
- - test/fixtures/xml/amazon_mws/fulfillment_list_all_fulfillment_orders.xml
203
- - test/fixtures/xml/amazon_mws/inventory_list_inventory_item_supply.xml
204
- - test/fixtures/xml/amazon_mws/inventory_list_inventory_supply.xml
205
- - test/fixtures/xml/amazon_mws/inventory_list_inventory_supply_by_next_token.xml
206
226
  - test/fixtures/xml/amazon_mws/tracking_response_error.xml
227
+ - test/fixtures/xml/amazon_mws/inventory_list_inventory_supply_by_next_token.xml
228
+ - test/fixtures/xml/amazon_mws/inventory_list_inventory_supply.xml
229
+ - test/fixtures/xml/amazon_mws/fulfillment_list_all_fulfillment_orders.xml
207
230
  - test/fixtures/xml/amazon_mws/tracking_response_not_found.xml
208
- - test/fixtures/xml/shipwire/fulfillment_failure_response.xml
209
- - test/fixtures/xml/shipwire/invalid_login_response.xml
231
+ - test/fixtures/xml/amazon_mws/fulfillment_get_fulfillment_order.xml
232
+ - test/fixtures/xml/amazon_mws/inventory_list_inventory_item_supply.xml
233
+ - test/fixtures/xml/amazon_mws/fulfillment_get_fullfillment_order_with_multiple_tracking_numbers.xml
210
234
  - test/fixtures/xml/shipwire/inventory_get_response.xml
211
- - test/fixtures/xml/shipwire/successful_empty_tracking_response.xml
212
- - test/fixtures/xml/shipwire/successful_live_tracking_response.xml
213
235
  - test/fixtures/xml/shipwire/successful_tracking_response.xml
236
+ - test/fixtures/xml/shipwire/successful_empty_tracking_response.xml
214
237
  - test/fixtures/xml/shipwire/successful_tracking_response_with_tracking_urls.xml
215
- - test/fixtures/xml/webgistix/multiple_tracking_response.xml
216
- - test/fixtures/xml/webgistix/tracking_response.xml
238
+ - test/fixtures/xml/shipwire/successful_live_tracking_response.xml
239
+ - test/fixtures/xml/shipwire/invalid_login_response.xml
240
+ - test/fixtures/xml/shipwire/fulfillment_failure_response.xml
241
+ - test/fixtures/xml/amazon/inventory_get_response.xml
242
+ - test/fixtures/xml/amazon/inventory_list_response_with_next_1.xml
243
+ - test/fixtures/xml/amazon/tracking_response_2.xml
244
+ - test/fixtures/xml/amazon/tracking_response_error.xml
245
+ - test/fixtures/xml/amazon/inventory_list_response.xml
246
+ - test/fixtures/xml/amazon/tracking_response_1.xml
247
+ - test/fixtures/xml/amazon/inventory_list_response_with_next_2.xml
248
+ - test/fixtures/xml/amazon/tracking_response_not_found.xml
217
249
  - test/fixtures.yml
218
- - test/remote/amazon_mws_test.rb
219
- - test/remote/amazon_test.rb
220
- - test/remote/shipwire_test.rb
221
- - test/remote/webgistix_test.rb
222
- - test/test_helper.rb
223
- - test/unit/base_test.rb
224
- - test/unit/services/amazon_mws_test.rb
225
- - test/unit/services/amazon_test.rb
226
- - test/unit/services/shipwire_test.rb
227
- - test/unit/services/webgistix_test.rb
metadata.gz.sig ADDED
Binary file