unp_smart 0.0.1 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +50 -6
  3. data/lib/unp_smart/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 955f7942bdb4460b51b18d9f0a3700ac15ad07f6
4
- data.tar.gz: 8fb515c5fa39660767cfadcb36085c4f312762de
3
+ metadata.gz: d1e6fab91beaa21a5e9be24293bac4c0acfb9602
4
+ data.tar.gz: bd661d9892db68861023319c1cc4c076723f6a23
5
5
  SHA512:
6
- metadata.gz: 0ef31862c4c24f90f7b57edb8b543dcee70476cd563851fea5b27ea686ec1ad33266215cb38ace7eba86a24536ac22a59e14524672c5097888403d6d9fa52afc
7
- data.tar.gz: 342dfc040c2fe95dd8b04e27b480d5b0ebc739d5d823f4b75f66f2c56812fe1ef6abeb63c4d88c0d665c6288c2d51227ed6c9325845939416fdad69573a593ea
6
+ metadata.gz: e37e4ec501319ca55e096570066e5725fbdd3653a413d4173dc7f8115d540aa4beb70abf0c563f48dafc810556551972bffa559ab5b2e44c87c4be9f0954bb59
7
+ data.tar.gz: 03c261effb0338e21e13a9bd401774ca4eb9b5c715c660728bb17ae2197af7ac1e2abddbdb28d4ab1f2f8335bfe8a584e57d2c837b404ae23c01c9e60fc04483
data/README.md CHANGED
@@ -1,8 +1,8 @@
1
- # UnpSmart
1
+ # 银联账单接口Ruby SDK
2
2
 
3
- TODO: Write a gem description
3
+ 提供此版SDK,方便用户调用银联账单服务接口
4
4
 
5
- ## Installation
5
+ ## 安装
6
6
 
7
7
  Add this line to your application's Gemfile:
8
8
 
@@ -16,13 +16,57 @@ Or install it yourself as:
16
16
 
17
17
  $ gem install unp_smart
18
18
 
19
- ## Usage
19
+ ## 配置
20
+
21
+ 在项目下增加config/unp_smart.yml文件
22
+
23
+ ```
24
+ development:
25
+ account: '000000'
26
+ secret_key: ''
27
+ server: 'https://data.unionpaysmart.com'
28
+ debug: true
29
+ verbose: false
30
+ raw_response: true
31
+
32
+ ```
33
+
34
+ * account 账单服务账号
35
+ * secret_key 私钥
36
+ * server 账单服务地址
37
+ * debug 是否开始debug模式
38
+ * verbose 是否开始verbose模式
39
+ * raw_response 是否解析返回结果
40
+
41
+
42
+ ## 使用
43
+
44
+ ```
45
+ UnpSmart.get path,params,&block
46
+
47
+ UnpSmart.post path,params,&block
48
+ ```
49
+
50
+ 支持 post or get,根据官方文档选择即可,接受两个参数
51
+
52
+ * 请求的接口 此接口可以从官方文档中得到
53
+ * 业务参数
54
+
55
+ 如:
56
+
57
+ ```
58
+ UnpSmart.get '/merchant/queryName',{mName: '巴黎春天'}
59
+ ```
60
+
61
+ 如果只关心返回成功结果,可以将配置参数raw_response设置为false,那么将返回两个值
62
+
63
+ * 第一个为接口是否请求成功,true or false
64
+ * 第二个为请求的内容,如果失败为失败信息
20
65
 
21
- TODO: Write usage instructions here
22
66
 
23
67
  ## Contributing
24
68
 
25
- 1. Fork it ( https://github.com/[my-github-username]/unp_smart/fork )
69
+ 1. Fork it ( https://github.com/unpsmart/unp_smart/fork )
26
70
  2. Create your feature branch (`git checkout -b my-new-feature`)
27
71
  3. Commit your changes (`git commit -am 'Add some feature'`)
28
72
  4. Push to the branch (`git push origin my-new-feature`)
@@ -1,3 +1,3 @@
1
1
  module UnpSmart
2
- VERSION = "0.0.1"
2
+ VERSION = "0.1.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unp_smart
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Xu