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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 23d9870f314e3bfd98217068f56f0222a5fa5e8c
4
- data.tar.gz: 4879a5bee3a7c03417236c72d75092cf49e11aaf
3
+ metadata.gz: 35d459a20825e6c61e0934241b27d8ee7ae60696
4
+ data.tar.gz: 427680ddce54f9d0384a7bdde2dab64dbd544173
5
5
  SHA512:
6
- metadata.gz: a2d0fd27bc875cbf074c5514c727dc1677fdf9a3cf7beff996bfe54b556ee721fe0b06503c8b8021084a7cef0e0bf69ee05bc082b247026e840d9cb05cb3ddfb
7
- data.tar.gz: 9312ddbc3db918dfa11df10c8bafe9de1af78b915be1100ed8f9f670c4809375be66a1d6eb79c73e27ee5a452780ae785bca38653dc4c09bb22a54ada90fd631
6
+ metadata.gz: 334cdae0087dd6e61fb3c61f100f612989765940e9da636d8526353b566fb87e0361bae092fc84019ea33870402fc898784d4bc8215929f19f6209c41b5168e6
7
+ data.tar.gz: ce9a23b5ce0859900eba9fc506a00aadc638b82ae9dbebcccab2d8cad23c5f19f0ae792ec8f8f5f518278993824038c0fbe8584d5ab1bd5d0e3f6943faa1fc61
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- xdelivery (0.1.0)
4
+ xdelivery (0.1.2)
5
5
  rest-client
6
6
 
7
7
  GEM
@@ -11,9 +11,21 @@ module Xdelivery
11
11
  :note, :callback_url, :ref_id, :tag
12
12
  ]
13
13
 
14
- def add(params)
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 { |k, v| COLUMNS.include?(k) == false }
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
@@ -1,3 +1,3 @@
1
1
  module Xdelivery
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
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.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: 2018-12-21 00:00:00.000000000 Z
11
+ date: 2019-06-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler