vertex_client 0.6.4 → 0.6.5
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
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2031ee6ae966cf912a46c215217042403fc9c6f6b308e4411d62d0c1afbc8142
|
|
4
|
+
data.tar.gz: 3b4ea87664f78d85eb3c00ef911b21e0ed8ef8c1b4f15bde26b4e4c8cece81d9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 43e035abf1aa16e3ccb4cc07903672998153361a8feb3a36d39f194e9208881416fed2922579b6529733dbbbd527a0e577390494a62b2c723fbdb551f9c54b08
|
|
7
|
+
data.tar.gz: 01ba1485a519b47dce96dd3d7d97d8329c32f562a262ef44fa96eb8778dd5512bd11561624b7556715e0d16f1dbb60269ed000d33042a2c86a3610e6bf34ba07
|
|
@@ -5,7 +5,7 @@ module VertexClient
|
|
|
5
5
|
SALE_TRANSACTION_TYPE = 'SALE'.freeze
|
|
6
6
|
|
|
7
7
|
def validate!
|
|
8
|
-
raise VertexClient::ValidationError.new('customer requires a state
|
|
8
|
+
raise VertexClient::ValidationError.new('customer requires a state and postal_code') if customer_missing_location?
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
def body
|
|
@@ -15,7 +15,7 @@ module VertexClient
|
|
|
15
15
|
end
|
|
16
16
|
|
|
17
17
|
def line_items
|
|
18
|
-
@line_items ||=
|
|
18
|
+
@line_items ||= normalized_line_items.map do |line_item|
|
|
19
19
|
LineItem.new(
|
|
20
20
|
product: product_for_line_item(line_item[:product]),
|
|
21
21
|
quantity: line_item[:quantity],
|
|
@@ -44,6 +44,10 @@ module VertexClient
|
|
|
44
44
|
def tax_for_line_item(line_item)
|
|
45
45
|
line_item[:total_tax]
|
|
46
46
|
end
|
|
47
|
+
|
|
48
|
+
def normalized_line_items
|
|
49
|
+
[ @body[:line_item] ].flatten
|
|
50
|
+
end
|
|
47
51
|
end
|
|
48
52
|
end
|
|
49
53
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: vertex_client
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.6.
|
|
4
|
+
version: 0.6.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Custom Ink
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-
|
|
11
|
+
date: 2019-03-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|