ubox 0.2.1 → 0.2.2

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 +40 -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: 3b543a18379473b965419423095cfb1e7abd70c6
4
- data.tar.gz: 69bf6b9d72504242ff5cd85096880ff0344915e8
3
+ metadata.gz: b792d696afa49365621c7970360fc18087c4b179
4
+ data.tar.gz: ce6a5f06691fe7ac37a72e5b75c944f862f19fde
5
5
  SHA512:
6
- metadata.gz: afb815679b21444d8189fe505822dd88df09dd856ba293d46e8c09d03a8c5326fc8d1a5ec813a78ba621704b05acd80f4abacd03851f0b17987858027daa4daa
7
- data.tar.gz: 6c00c517665f9501e71bf647d19bb70c81dbbd5a87b994c3c36d2a3305c3560cf6857c1b1403cb3e8f1988770e23584b2e15b9e1ec07e45dc3eb2a822cf170b2
6
+ metadata.gz: 1ac1441ca60433f4047416ac705503402e08c85bce5f5a53374a26c3bcca6fe9742379a95fba57706d83f495431e8f3e238b1dce5066ab0684539a0758b70205
7
+ data.tar.gz: 367267fa090f3d7c654bf086e2369d3ed9d02fae3b09038058ba02b76fa71a2a819e223dd467603059796e01dc3729328678a677bb75994920adeaca949c7e9d
data/README.md CHANGED
@@ -390,6 +390,46 @@ vm_status = Ubox.check_vm_status(vmid: '0061029')
390
390
  }
391
391
  ```
392
392
 
393
+
394
+ ### checkVmstatus 检查售货机是否联网
395
+ ```ruby
396
+ product_info = Ubox.product_info(vmid: '0061029', productid: 19458)
397
+ ```
398
+
399
+ ```json
400
+ {
401
+ "head": {
402
+ "return_code": 200,
403
+ "return_msg": "正常响应"
404
+ },
405
+ "body": {
406
+ "product": {
407
+ "productId": 19458,
408
+ "shortName": "VNA藏帝男用延时喷剂",
409
+ "fullName": "VNA藏帝男用延时喷剂15ml",
410
+ "offeredPrice": 19900,
411
+ "retailPrice": 19900,
412
+ "num": 1,
413
+ "picMap": [
414
+ "http://img.ubox.cn/box-tmp/m/19458/19458.jpg?t=20151118131152",
415
+ "http://img.ubox.cn/box-tmp/19458/19458.png?t=20151118131152"
416
+ ],
417
+ "discountRate": 100,
418
+ "brandId": 707614,
419
+ "brandName": "首趣",
420
+ "tabCategoryId": 3,
421
+ "typeName": "百货",
422
+ "description": "",
423
+ "reason": "",
424
+ "icon": "",
425
+ "actionId": "",
426
+ "endTime": "",
427
+ "productCode": "6951757100632"
428
+ }
429
+ }
430
+ }
431
+ ```
432
+
393
433
  ## Development
394
434
 
395
435
  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.
@@ -102,4 +102,9 @@ module Ubox
102
102
  def check_vm_status(attributes)
103
103
  post_request('/checkVmstatus', attributes)
104
104
  end
105
+
106
+ #根据商品id和售货机编号获取商品详情
107
+ def product_info(attributes)
108
+ post_request('/productInfo', attributes)
109
+ end
105
110
  end
@@ -1,3 +1,3 @@
1
1
  module Ubox
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
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.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Saxer