xdelivery 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/xdelivery/api/orders.rb +14 -2
- data/lib/xdelivery/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 35d459a20825e6c61e0934241b27d8ee7ae60696
|
4
|
+
data.tar.gz: 427680ddce54f9d0384a7bdde2dab64dbd544173
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 334cdae0087dd6e61fb3c61f100f612989765940e9da636d8526353b566fb87e0361bae092fc84019ea33870402fc898784d4bc8215929f19f6209c41b5168e6
|
7
|
+
data.tar.gz: ce9a23b5ce0859900eba9fc506a00aadc638b82ae9dbebcccab2d8cad23c5f19f0ae792ec8f8f5f518278993824038c0fbe8584d5ab1bd5d0e3f6943faa1fc61
|
data/Gemfile.lock
CHANGED
data/lib/xdelivery/api/orders.rb
CHANGED
@@ -11,9 +11,21 @@ module Xdelivery
|
|
11
11
|
:note, :callback_url, :ref_id, :tag
|
12
12
|
]
|
13
13
|
|
14
|
-
|
14
|
+
INVOICE_COLUMNS = [
|
15
|
+
:invoice_type, :email, :company_code, :donate_code, :device_id, :device
|
16
|
+
]
|
17
|
+
|
18
|
+
def add(params, invoice_params={})
|
15
19
|
self.orders ||= []
|
16
|
-
params.delete_if
|
20
|
+
(params || {}).delete_if do |k, v|
|
21
|
+
COLUMNS.include?(k) == false
|
22
|
+
end
|
23
|
+
invoice_params.delete_if do |k, v|
|
24
|
+
INVOICE_COLUMNS.include?(k) == false
|
25
|
+
end
|
26
|
+
|
27
|
+
params.merge!(invoice: invoice_params) unless invoice_params.empty?
|
28
|
+
|
17
29
|
orders.push(params)
|
18
30
|
params
|
19
31
|
end
|
data/lib/xdelivery/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xdelivery
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- eddie
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-06-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|