rock_fintech 0.5.0 → 0.6.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 11ee283007f8bb9cec689fc9d8a03d9546a0261f
4
- data.tar.gz: 85572febaf942ac11241c62348db66cdc59d3e4c
3
+ metadata.gz: bd2083a1deccba65e685ea129c1b6147cdb3c587
4
+ data.tar.gz: d47306f1569b75c463929076de1b9255b0e527c2
5
5
  SHA512:
6
- metadata.gz: c6535386a0ac3b7f9f9bfc305df13f4aa99d7488569e5a800077c7ca6f992d14443206a90cfd4e90fb8b5b6c3a8ec21cfc51f220911edb508137cebe2c2f41ea
7
- data.tar.gz: 682dce780f210eec25838e1608b486fab1e1fe346f942150480ea1357892291c98535b6035103f3ee34cba390ecba55cceece6311832f1fc0c62e98419d72cab
6
+ metadata.gz: 94e7a413a2f86d73d8948e6ea7717daccccb28a256f5955031006e95c3a0788e855b2cfb8d55549fbdf5507e4a7a29a33f9a2be450d9d308505c88667d0c8041
7
+ data.tar.gz: 8adbed2e2d19163da4528daf1686b873eaab64aab2ac9bb8306cecf1ed840aad4b543de258c658613fcdae12599f0b02ee052a7c87a5f50c88cd4771c5db497a
@@ -33,8 +33,8 @@ module RockFintech
33
33
  # * :third_reserved [String] 第三方流水号
34
34
  #
35
35
  def batch_end_credit_b(batch_count, batch_no, batch_type,
36
- batch_date, items,
37
- devise='000001', remark='')
36
+ batch_date, items, remark='')
37
+
38
38
 
39
39
  service = 'batch_end_credit_b'
40
40
 
@@ -44,7 +44,6 @@ module RockFintech
44
44
  batch_type: batch_type,
45
45
  batch_date: batch_date,
46
46
  items: items,
47
- client: devise,
48
47
  custom: remark,
49
48
  }
50
49
 
@@ -50,8 +50,8 @@ module RockFintech
50
50
  # * :third_reserved [String] 第三方流水号
51
51
  #
52
52
  def batch_payment_b(batch_count, batch_no, batch_type,
53
- batch_date, items,
54
- devise='000001', remark='')
53
+ batch_date, items, remark='')
54
+
55
55
 
56
56
  service = 'batch_payment_b'
57
57
 
@@ -61,7 +61,6 @@ module RockFintech
61
61
  batch_type: batch_type,
62
62
  batch_date: batch_date,
63
63
  items: items,
64
- client: devise,
65
64
  custom: remark,
66
65
  }
67
66
 
@@ -52,8 +52,8 @@ module RockFintech
52
52
  # * :reserved [String] 保留域
53
53
  #
54
54
  def batch_repayment_b(batch_count, batch_no, batch_type,
55
- batch_date, items,
56
- devise='000001', remark='')
55
+ batch_date, items, remark='')
56
+
57
57
 
58
58
  service = 'batch_payment_b'
59
59
 
@@ -63,7 +63,6 @@ module RockFintech
63
63
  batch_type: batch_type,
64
64
  batch_date: batch_date,
65
65
  items: items,
66
- client: devise,
67
66
  custom: remark,
68
67
  }
69
68
 
@@ -55,15 +55,27 @@ module RockFintech
55
55
 
56
56
  # 7. create response
57
57
  @response = RockFintech::Http::Response.new(service: @service,
58
- flow_id: @params[:out_serial_no],
58
+ flow_id: flow_id,
59
59
  http_response: http_response,
60
60
  raw_body: http_response.body,
61
61
  data: res,
62
62
  data_valid: Sign.verify(res, @config))
63
63
  end
64
64
 
65
+ def flow_id
66
+ if @params[:out_serial_no]
67
+ @params[:out_serial_no]
68
+ elsif @params[:serial_no]
69
+ @params[:serial_no]
70
+ elsif @params[:order_no]
71
+ @params[:order_no]
72
+ else
73
+ nil
74
+ end
75
+ end
76
+
65
77
  def identifier
66
- "[#{@service} - #{@params[:out_serial_no]}] "
78
+ "[#{@service} - #{flow_id}] "
67
79
  end
68
80
 
69
81
  end # end of class
@@ -1,3 +1,3 @@
1
1
  module RockFintech
2
- VERSION = "0.5.0"
2
+ VERSION = "0.6.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rock_fintech
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - chenpengyu
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-05-05 00:00:00.000000000 Z
11
+ date: 2018-05-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler