ubox 0.1.7 → 0.1.8

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 +22 -0
  3. data/lib/ubox.rb +5 -0
  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: 265d5e73054dc427f3f533c54db9b5f20d78390b
4
- data.tar.gz: 963584cf9f495d7270a435d50674e12661284264
3
+ metadata.gz: bf3172df50aa56c227751f00e288ee2831fec66d
4
+ data.tar.gz: d246972a9f42c2216cf1ba53e09c4802b1052b95
5
5
  SHA512:
6
- metadata.gz: 92414dc6e23aa7ae05a6608622f9218db7c017aa09f9b31590d01f4f83b58e62ca5a4910606439b62ff630e4d8778fa2d357ba384ee1b43d5f14e407c5c2a7cb
7
- data.tar.gz: 5750dcfcfe45aa898ae1ce036921980a3c5dfd86d5a35d350410782209d211fda58a290a1a4d703ddb921ade9152b3f905b503b9b53b239235c254a395491835
6
+ metadata.gz: 550282ec578a698343df9a8594baa75887153393f689c69b41c842aed28b43f5f68cd383028577083e66dbcc4a988122e5fe8a8f183bc8a5cd2efe3517d45e7f
7
+ data.tar.gz: ba40c15c7319f4cb71892bda478c304a9d7bbd236551dd30ab1d5ef565a0318d9da66128e76fb093d0d1e3fd9c564a2b5919faa24c3fddb4d6384e1bef21d33d
data/README.md CHANGED
@@ -332,6 +332,28 @@ products = Ubox.product_list(vmid: '0061029')
332
332
  }
333
333
  }
334
334
  ```
335
+ ### orderCode 根据商品和售货机买码接口
336
+ ```ruby
337
+ delivery_code = Ubox.order_code(vmid: '0061029',
338
+ product_id: list['body']['products'][0]['id'],
339
+ app_uid: Random.rand_str(32),
340
+ app_tran_id: Random.rand_str(32))
341
+ ```
342
+ ```json
343
+ {
344
+ "head": {
345
+ "return_code": 200,
346
+ "return_msg": "正常响应"
347
+ },
348
+ "body": {
349
+ "delivery_code": "53830",
350
+ "vmid": "0061029",
351
+ "expire_time": 1464862845,
352
+ "box_number": "A07",
353
+ "tran_id": "106179946"
354
+ }
355
+ }
356
+ ```
335
357
 
336
358
  ## Development
337
359
 
@@ -80,4 +80,9 @@ module Ubox
80
80
  def product_list(attributes)
81
81
  post_request('/productList', attributes)
82
82
  end
83
+
84
+ #根据售货机和商品买码接口
85
+ def order_code(attributes)
86
+ post_request('/orderCode', attributes)
87
+ end
83
88
  end
@@ -1,3 +1,3 @@
1
1
  module Ubox
2
- VERSION = "0.1.7"
2
+ VERSION = "0.1.8"
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.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Saxer