reapal 0.9.5 → 0.9.6

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: f07450399aff5e61821fcee6cb015cea5a9dba50
4
- data.tar.gz: 012e44028f84adc559630c4d0c1d1f42c8623876
3
+ metadata.gz: 3938c51eb0a3a516c9b0f00d0c65997aedcc197e
4
+ data.tar.gz: 3f462ab6ca89611339c02d324fe3f32b7f7751ae
5
5
  SHA512:
6
- metadata.gz: bb0f870317b28a8221fe3f43bf4c3870159b6a0d7319ab462f7b7c9100c525097b9a9a02c0694657eff5588c063a2157fc649749eafc699940136e842191861b
7
- data.tar.gz: 5a5e61e47f8480856ce748ff9d8c09971e29a01bb03346c795153253f38584a122d548671ea93a46b4c2eb1c5184f3b824f12fb65efa228cafecdcdc5cad632b
6
+ metadata.gz: 8086a05b2a92c98df5bf400f52bade2b93f12e01782b05a0ecd03f105b15170e3f0ab435891cac68c308276988f0f2af511c9142ad4ebb1f14cfb063f3ccb9c6
7
+ data.tar.gz: 1ab8be84c88d531bf0168ef867608a29baf13af5a9d51de0cb8c336059a02a385c212a2ebabf2b949a238fa02044f0e207306cc109892953a23ec7f4c8528427
@@ -40,7 +40,18 @@ module Reapal
40
40
  applyTime: Time.now.strftime('%Y-%m-%d %H:%M:%S'),
41
41
  }
42
42
 
43
- operate_post(:operate, service, params, post_path, Http::ErrorCode.deposit_confirm_api, ['0000'])
43
+ res = operate_post(:operate, service, params, post_path, Http::ErrorCode.deposit_confirm_api, ['0000'])
44
+
45
+ error_result_code = %w(9060 9065 9083 9084 9085 0017 0210 0302 0303 0328 0329
46
+ 0330 0332 0333 0335 0339 0340 0341 0342 0343 0344 0345
47
+ 0346 0347 0348 0350 0351 0352 0358 0359 0360 0362 0363
48
+ 0001 0004)
49
+
50
+ if 'S' == res[:result] && error_result_code.include?(res[:data][:resultCode])
51
+ res[:result] = 'F'
52
+ end
53
+
54
+ res
44
55
  end
45
56
 
46
57
  end # module
@@ -27,7 +27,13 @@ module Reapal
27
27
  queryTime: Time.now.strftime('%Y-%m-%d %H:%M:%S'),
28
28
  }
29
29
 
30
- operate_post(:query, service, params, post_path, Http::ErrorCode.deposit_query, ['0000'])
30
+ res = operate_post(:query, service, params, post_path, Http::ErrorCode.deposit_query, ['0000'])
31
+
32
+ if 'S' == res[:result] && ('0001' || '0004') == res[:data][:resultCode]
33
+ res[:result] = 'F'
34
+ end
35
+
36
+ res
31
37
  end
32
38
 
33
39
  end # module
@@ -36,7 +36,13 @@ module Reapal
36
36
  applyTime: Time.now.strftime('%Y-%m-%d %H:%M:%S'),
37
37
  }
38
38
 
39
- operate_post(:query, service, params, post_path, Http::ErrorCode.sub_account_query, ['0000'])
39
+ res = operate_post(:query, service, params, post_path, Http::ErrorCode.sub_account_query, ['0000'])
40
+
41
+ if 'S' == res[:result] && '0001' == res[:data][:resultCode]
42
+ res[:result] = 'F'
43
+ end
44
+
45
+ res
40
46
  end
41
47
 
42
48
  end # module
@@ -55,7 +55,13 @@ module Reapal
55
55
  queryTime: Time.now.strftime('%Y-%m-%d %H:%M:%S'),
56
56
  }
57
57
 
58
- operate_post(:query, service, params, post_path, Http::ErrorCode.query_by_flow_id, ['0000'])
58
+ res = operate_post(:query, service, params, post_path, Http::ErrorCode.query_by_flow_id, ['0000'])
59
+
60
+ if 'S' == res[:result] && ('0001' || '0003') == res[:data][:resultCode]
61
+ res[:result] = 'F'
62
+ end
63
+
64
+ res
59
65
  end
60
66
 
61
67
  end # module QueryByFlowId
@@ -46,7 +46,13 @@ module Reapal
46
46
  queryTime: Time.now.strftime('%Y-%m-%d %H:%M:%S'),
47
47
  }
48
48
 
49
- operate_post(:query, service, params, post_path, Http::ErrorCode.query_by_single_flow_id, ['0000'])
49
+ res = operate_post(:query, service, params, post_path, Http::ErrorCode.query_by_single_flow_id, ['0000'])
50
+
51
+ if 'S' == res[:result] && ('0001' || '0003') == res[:data][:resultCode]
52
+ res[:result] = 'F'
53
+ end
54
+
55
+ res
50
56
  end
51
57
 
52
58
  end # module QueryBySingleFlowId
@@ -44,7 +44,13 @@ module Reapal
44
44
  queryTime: Time.now.strftime('%Y-%m-%d %H:%M:%S')
45
45
  }
46
46
 
47
- operate_post(:query, service, params, post_path, Http::ErrorCode.tender_auth_query, ['0000'])
47
+ res = operate_post(:query, service, params, post_path, Http::ErrorCode.tender_auth_query, ['0000'])
48
+
49
+ if 'S' == res[:result] && ('0001' || '0003') == res[:data][:resultCode]
50
+ res[:result] = 'F'
51
+ end
52
+
53
+ res
48
54
  end
49
55
 
50
56
  end # module Agree
@@ -29,7 +29,7 @@ module Reapal
29
29
  # * :resultCode [String] 结果代码
30
30
  #
31
31
  def tender_repayment_complete(flow_id, tender_no, periods, comp_principal, comp_interest,
32
- comp_poundage, comp_amount, comp_time, busway='01', remark='')
32
+ comp_poundage, comp_amount, comp_time, busway='01', remark='')
33
33
  service = 'reapal.trust.repaymentComplete'
34
34
  post_path = '/reagw/tender/rest.htm'
35
35
 
@@ -9,7 +9,7 @@ module Reapal
9
9
  #
10
10
  # @param flow_id [String] 还款计划订单号
11
11
  # @param tender_no [String] 商户系统标的号
12
- # @param project_details [String] 还款计划明细
12
+ # @param project_details [Array] 还款计划明细
13
13
  # * :periods [Integer] 还款期数
14
14
  # * :projPrincipal [BigDecimal] 计划还款本金
15
15
  # * :projInterest [BigDecimal] 计划还款利息
@@ -33,8 +33,6 @@ module Reapal
33
33
  service = 'reapal.trust.repaymentProject'
34
34
  post_path = '/reagw/tender/rest.htm'
35
35
 
36
- project_details[0][:projTime] = project_details[0][:projTime].strftime('%Y%m%d')
37
-
38
36
  params = {
39
37
  orderNo: flow_id,
40
38
  tenderNo: tender_no,
@@ -18,7 +18,7 @@ module Reapal
18
18
  end
19
19
 
20
20
  def self.com_contract_create
21
- ['9015'] || contract_create || contract_common
21
+ ['9015'] | contract_create | contract_common
22
22
  end
23
23
 
24
24
  def self.contract_query
@@ -1,3 +1,3 @@
1
1
  module Reapal
2
- VERSION = "0.9.5"
2
+ VERSION = "0.9.6"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reapal
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.5
4
+ version: 0.9.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - tony
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-12-06 00:00:00.000000000 Z
11
+ date: 2017-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler