ubox 0.1.8 → 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +7 -0
  3. data/lib/ubox.rb +10 -1
  4. data/lib/ubox/version.rb +1 -1
  5. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bf3172df50aa56c227751f00e288ee2831fec66d
4
- data.tar.gz: d246972a9f42c2216cf1ba53e09c4802b1052b95
3
+ metadata.gz: d4bff5aa97c0be41e28710e543f4477b8b86933c
4
+ data.tar.gz: 50fb98101cd0eb493e38370645cf837c2ea6bc7c
5
5
  SHA512:
6
- metadata.gz: 550282ec578a698343df9a8594baa75887153393f689c69b41c842aed28b43f5f68cd383028577083e66dbcc4a988122e5fe8a8f183bc8a5cd2efe3517d45e7f
7
- data.tar.gz: ba40c15c7319f4cb71892bda478c304a9d7bbd236551dd30ab1d5ef565a0318d9da66128e76fb093d0d1e3fd9c564a2b5919faa24c3fddb4d6384e1bef21d33d
6
+ metadata.gz: 4d8b7f6ce132eceef2b00570c7e458169021fb69391d7064aa582f674571efb19473ccec2454fe23c2660bc1ef5f6c0afa8852fc3d3b3e94a1277b5b1734b0ae
7
+ data.tar.gz: 31196de226145ae11dc2d872889730fe186448e332236631c41b4c73f83eac737621dd8d3dcde71db453054ae2bc379b986fe00c4680b98e674521073c8de2ee
data/README.md CHANGED
@@ -355,6 +355,13 @@ delivery_code = Ubox.order_code(vmid: '0061029',
355
355
  }
356
356
  ```
357
357
 
358
+ ### deliverTrade 出货接口
359
+ ```ruby
360
+ deliver = Ubox.deliver_trade(tran_id: delivery_code['body']['delivery_code'])
361
+ ```
362
+ ```json
363
+ ```
364
+
358
365
  ## Development
359
366
 
360
367
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -33,17 +33,20 @@ module Ubox
33
33
 
34
34
 
35
35
  def post_request(api_path, attributes)
36
- puts attributes
37
36
  params = {
38
37
  app_id: self.config.app_id,
39
38
  }.merge(attributes)
40
39
  params = params.merge({sign: self.sign(params)})
41
40
 
41
+ puts "\n\n#{api_path}\n"
42
+ puts params
43
+
42
44
  url = "#{self.config.api_url}/#{api_path}"
43
45
  uri = URI(url)
44
46
  res = Net::HTTP.post_form(uri, params)
45
47
 
46
48
  body = res.body
49
+ puts body
47
50
  JSON.parse(body)
48
51
  end
49
52
 
@@ -85,4 +88,10 @@ module Ubox
85
88
  def order_code(attributes)
86
89
  post_request('/orderCode', attributes)
87
90
  end
91
+
92
+ #出货接口
93
+ def deliver_trade(attributes)
94
+ post_request('/deliverTrade', attributes)
95
+ end
96
+
88
97
  end
@@ -1,3 +1,3 @@
1
1
  module Ubox
2
- VERSION = "0.1.8"
2
+ VERSION = "0.1.9"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ubox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Saxer