lanmao 0.1.0 → 0.2.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 (56) hide show
  1. checksums.yaml +4 -4
  2. data/lanmao.gemspec +6 -6
  3. data/lib/lanmao/api/account/audit_bind_card.rb +37 -0
  4. data/lib/lanmao/api/api_helper.rb +0 -3
  5. data/lib/lanmao/api/money/cancel_withdraw.rb +39 -0
  6. data/lib/lanmao/api/money/confirm_withdraw.rb +45 -0
  7. data/lib/lanmao/api/money/direct_recharge.rb +41 -0
  8. data/lib/lanmao/api/money/intercept_withdraw.rb +38 -0
  9. data/lib/lanmao/api/query/query_authorization_entrust_pay_record.rb +3 -3
  10. data/lib/lanmao/api/query/query_project_information.rb +5 -3
  11. data/lib/lanmao/api/query/query_transaction.rb +9 -2
  12. data/lib/lanmao/api/trade/async_transaction.rb +1 -9
  13. data/lib/lanmao/api/trade/authorization_entrust_pay.rb +42 -0
  14. data/lib/lanmao/api/trade/cancel_debenture_sale.rb +34 -0
  15. data/lib/lanmao/api/trade/cancel_pre_transaction.rb +34 -0
  16. data/lib/lanmao/api/trade/cancel_user_authorization.rb +34 -0
  17. data/lib/lanmao/api/trade/confirm_checkfile.rb +34 -0
  18. data/lib/lanmao/api/trade/debenture_sale.rb +34 -0
  19. data/lib/lanmao/api/trade/download_checkfile.rb +34 -0
  20. data/lib/lanmao/api/trade/establish_project.rb +2 -2
  21. data/lib/lanmao/api/trade/freeze.rb +34 -0
  22. data/lib/lanmao/api/trade/freeze_pre_transaction.rb +34 -0
  23. data/lib/lanmao/api/trade/modify_project.rb +2 -2
  24. data/lib/lanmao/api/trade/unfreeze.rb +34 -0
  25. data/lib/lanmao/api/trade/unfreeze_trade_password.rb +34 -0
  26. data/lib/lanmao/api/trade/user_authorization.rb +34 -0
  27. data/lib/lanmao/api/trade/user_auto_pre_transaction.rb +45 -0
  28. data/lib/lanmao/api/trade/user_pre_transaction.rb +34 -0
  29. data/lib/lanmao/api/trade/verify_deduct.rb +34 -0
  30. data/lib/lanmao/form/account/activate_stocked_user_form.rb +3 -4
  31. data/lib/lanmao/form/account/check_password_form.rb +3 -4
  32. data/lib/lanmao/form/account/enterprise_bind_bankcard.rb +37 -0
  33. data/lib/lanmao/form/account/enterprise_information_update_form.rb +33 -0
  34. data/lib/lanmao/form/account/enterprise_register_form.rb +3 -4
  35. data/lib/lanmao/form/account/modify_mobile_expand_form.rb +34 -0
  36. data/lib/lanmao/form/account/personal_bind_bankcard_expand_form.rb +38 -0
  37. data/lib/lanmao/form/account/personal_register_expand_form.rb +4 -5
  38. data/lib/lanmao/form/account/reset_password_form.rb +8 -9
  39. data/lib/lanmao/form/account/unbind_bankcard_form.rb +33 -0
  40. data/lib/lanmao/form/account/user_authorization_form.rb +8 -11
  41. data/lib/lanmao/form/account/user_pre_transaction_form.rb +3 -3
  42. data/lib/lanmao/form/form_helper.rb +1 -2
  43. data/lib/lanmao/form/money/withdraw_form.rb +43 -0
  44. data/lib/lanmao/http/error_code/account.rb +1 -52
  45. data/lib/lanmao/http/error_code/money.rb +0 -38
  46. data/lib/lanmao/http/error_code/query.rb +1 -39
  47. data/lib/lanmao/http/error_code/trade.rb +1 -43
  48. data/lib/lanmao/version.rb +1 -1
  49. metadata +32 -70
  50. data/lib/lanmao/form/query/.gitkeep +0 -0
  51. data/lib/lanmao/http/error_code/asset.rb +0 -20
  52. data/lib/lanmao/http/error_code/batch.rb +0 -28
  53. data/lib/lanmao/http/error_code/enterprise.rb +0 -12
  54. data/lib/lanmao/http/error_code/form.rb +0 -15
  55. data/lib/lanmao/http/error_code/platform.rb +0 -15
  56. /data/lib/lanmao/api/query/{query_user_information.rb → qurey_user_information.rb} +0 -0
@@ -0,0 +1,43 @@
1
+ # coding: utf-8
2
+ module Lanmao
3
+ module Form
4
+ module Money
5
+ module WithdrawForm
6
+ # 提现
7
+ #
8
+ # @return [ Hash ] 结果集
9
+ # * :result [String] "S"/"F"/"P"
10
+ # * :request_params [Hash] 请求参数
11
+ # * :response [Object] 请求返回对象
12
+ # * :code [String] 结果代码
13
+ # * :msg [String] 结果信息
14
+ # * :data: 具体业务返回信息
15
+ # * :serial_no [String] 交易流水号
16
+ # * :order_no [String] 订单号
17
+ # * :amount [Number] 金额
18
+ # * :balance [Number] 操作后账户余额
19
+ #
20
+ def withdraw_form(flow_id, platform_user_no, expired, redirect_url, amount, withdraw_type='NORMAL', withdraw_form='IMMEDIATE', commission=0.0)
21
+
22
+ service = "WITHDRAW"
23
+
24
+ params = {
25
+ requestNo: flow_id,
26
+ platformUserNo: platform_user_no,
27
+ expired: expired,
28
+ redirectUrl: redirect_url,
29
+ amount: amount,
30
+ withdrawType: withdraw_type,
31
+ withdrawForm: withdraw_form,
32
+ commission: commission
33
+ }
34
+
35
+ res = get_form_data(service, params)
36
+
37
+ res
38
+ end
39
+
40
+ end # module
41
+ end
42
+ end
43
+ end
@@ -4,58 +4,7 @@ module Lanmao
4
4
  module Http
5
5
  module ErrorCode
6
6
 
7
- def self.create_account_p
8
- @_create_account ||= %w[RD000601 RD000602 RD000603 RD000604 RD000605 RD777777 RD10001]
9
- end
10
-
11
- def self.marketing_query
12
- @_marketing_query ||= %w[ ]
13
- end
14
-
15
- def self.account_credits
16
- @_account_credits ||= %w[RD000203 RD000537]
17
- end
18
-
19
- def self.account_transaction_query
20
- @_account_transaction_query ||= %w[]
21
- end
22
-
23
- def self.create_account_sr_query
24
- @_create_account_sr_query ||= %w[]
25
- end
26
-
27
- def self.gateway_query
28
- @_gateway_query ||= %w[]
29
- end
30
-
31
- def self.set_password_p
32
- @_set_password ||= %w[RD1031303 RD1031304 RD10001 RD001034 RD000602 RD001024 RD9997
33
- RD1031301 RD000603 RD000604 RD000605]
34
- end
35
-
36
- def self.bind_bank_card_p
37
- @_bind_bank_card ||= []
38
- end
39
-
40
- def self.account_balance
41
- @_account_balance ||= []
42
- end
43
-
44
- def self.find_account_by_mobile
45
- @_find_account_by_mobile ||= %w[T130016 T2600120]
46
- end
47
-
48
- def self.find_account_by_id
49
- @_find_account_by_id ||= %w[RD000061 RD000089 RD000060 RD000063]
50
- end
51
-
52
- def self.set_password_query
53
- @_set_password_query ||= %w[]
54
- end
55
-
56
- def self.binding_list
57
- @_binding_list ||= %w[]
58
- end
7
+
59
8
  end # module ErrorCode
60
9
  end
61
10
  end
@@ -4,45 +4,7 @@ module Lanmao
4
4
  module Http
5
5
  module ErrorCode
6
6
 
7
- def self.bank_recharge
8
- @_bank_recharge ||= []
9
- end
10
-
11
- def self.recharge_p
12
- @_recharge_p ||= []
13
- end
14
-
15
- def self.withdraw_p
16
- @_withdraw_p ||= []
17
- end
18
-
19
- def self.coupon_recharge
20
- @_coupon_recharge ||= []
21
- end
22
-
23
- def self.coupon_withdraw
24
- @_coupon_withdraw ||= []
25
- end
26
-
27
- def self.sign_borrower_p
28
- @_sign_borrower_p ||= []
29
- end
30
-
31
- def self.sign_transfer_p
32
- @_sign_transfer_p ||= []
33
- end
34
7
 
35
- def self.sign_payment_query
36
- @_sign_payment_query ||= []
37
- end
38
-
39
- def self.sign_repayment_query
40
- @_sign_repayment_query ||= []
41
- end
42
-
43
- def self.sign_transfer_check
44
- @_sign_transfer_check ||= []
45
- end
46
8
  end # module ErrorCode
47
9
  end
48
10
  end
@@ -4,45 +4,7 @@ module Lanmao
4
4
  module Http
5
5
  module ErrorCode
6
6
 
7
- def self.batch_query_payment_b
8
- @_batch_query_payment ||= %w[]
9
- end
10
-
11
- def self.batch_query_repayment_b
12
- @_batch_query_repayment ||= %w[]
13
- end
14
-
15
- def self.apply_bid_query
16
- @_apply_bid_query ||= %w[RD000094 RD000201 RD000210]
17
- end
18
-
19
- def self.batch_new_query_payment_b
20
- @_batch_new_query_payment ||= %w[]
21
- end
22
-
23
- def self.batch_new_query_repayment_b
24
- @_batch_new_query_repayment ||= %w[]
25
- end
26
-
27
- def self.buy_credit_query
28
- @_buy_credit_query ||= %w[]
29
- end
30
-
31
- def self.money_query
32
- @_money_query ||= %w[]
33
- end
34
-
35
- def self.cnaps_query
36
- @_cnaps_query ||= %w[]
37
- end
38
-
39
- def self.trustee_pay_query
40
- @_trustee_pay_query ||= %w[]
41
- end
42
-
43
- def self.batch_new_query_coupon_b
44
- @_batch_new_query_coupon_b || %w[]
45
- end
7
+
46
8
  end # module ErrorCode
47
9
  end
48
10
  end
@@ -4,49 +4,7 @@ module Lanmao
4
4
  module Http
5
5
  module ErrorCode
6
6
 
7
- def self.sign_bid_query
8
- @_sign_bid_query ||= %w[]
9
- end
10
-
11
- def self.auto_bid_apply
12
- @_auto_bid_apply ||= %w[]
13
- end
14
-
15
- def self.debt_query
16
- @_debt_query ||= %w[]
17
- end
18
-
19
- def self.buy_credit_p
20
- @_buy_credit_p ||= %w[]
21
- end
22
-
23
- def trustee_pay_p
24
- @_trustee_pay_p ||= %w[]
25
- end
26
-
27
- def self.sign_auto_bid_p
28
- @_sign_auto_bid ||= %w[]
29
- end
30
-
31
- def self.auto_bid_apply
32
- @_auto_bid_apply ||= %w[]
33
- end
34
-
35
- def self.revoke_auto_bid
36
- @_revoke_auto_bid ||= %w[]
37
- end
38
-
39
- def self.bid_apply_p
40
- @_bid_apply_p ||= ['RD001025']
41
- end
42
-
43
- def self.authorization_p
44
- @_authorization_p ||= []
45
- end
46
-
47
- def self.sign_transfer_query
48
- @_sign_transfer_query ||= []
49
- end
7
+
50
8
  end # module ErrorCode
51
9
  end # module http
52
10
  end # module rockfintech
@@ -1,3 +1,3 @@
1
1
  module Lanmao
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lanmao
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - tony
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-06-03 00:00:00.000000000 Z
11
+ date: 2018-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -45,9 +45,6 @@ dependencies:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '1.7'
48
- - - ">="
49
- - !ruby/object:Gem::Version
50
- version: 1.7.1
51
48
  type: :development
52
49
  prerelease: false
53
50
  version_requirements: !ruby/object:Gem::Requirement
@@ -55,9 +52,6 @@ dependencies:
55
52
  - - "~>"
56
53
  - !ruby/object:Gem::Version
57
54
  version: '1.7'
58
- - - ">="
59
- - !ruby/object:Gem::Version
60
- version: 1.7.1
61
55
  - !ruby/object:Gem::Dependency
62
56
  name: rest-client
63
57
  requirement: !ruby/object:Gem::Requirement
@@ -65,9 +59,6 @@ dependencies:
65
59
  - - "~>"
66
60
  - !ruby/object:Gem::Version
67
61
  version: '2.0'
68
- - - ">="
69
- - !ruby/object:Gem::Version
70
- version: 2.0.2
71
62
  type: :development
72
63
  prerelease: false
73
64
  version_requirements: !ruby/object:Gem::Requirement
@@ -75,9 +66,6 @@ dependencies:
75
66
  - - "~>"
76
67
  - !ruby/object:Gem::Version
77
68
  version: '2.0'
78
- - - ">="
79
- - !ruby/object:Gem::Version
80
- version: 2.0.2
81
69
  - !ruby/object:Gem::Dependency
82
70
  name: rspec
83
71
  requirement: !ruby/object:Gem::Requirement
@@ -99,9 +87,6 @@ dependencies:
99
87
  - - "~>"
100
88
  - !ruby/object:Gem::Version
101
89
  version: '1.8'
102
- - - ">="
103
- - !ruby/object:Gem::Version
104
- version: 1.8.4
105
90
  type: :development
106
91
  prerelease: false
107
92
  version_requirements: !ruby/object:Gem::Requirement
@@ -109,9 +94,6 @@ dependencies:
109
94
  - - "~>"
110
95
  - !ruby/object:Gem::Version
111
96
  version: '1.8'
112
- - - ">="
113
- - !ruby/object:Gem::Version
114
- version: 1.8.4
115
97
  - !ruby/object:Gem::Dependency
116
98
  name: byebug
117
99
  requirement: !ruby/object:Gem::Requirement
@@ -130,56 +112,16 @@ dependencies:
130
112
  name: awesome_print
131
113
  requirement: !ruby/object:Gem::Requirement
132
114
  requirements:
133
- - - "~>"
134
- - !ruby/object:Gem::Version
135
- version: '1.8'
136
- type: :development
137
- prerelease: false
138
- version_requirements: !ruby/object:Gem::Requirement
139
- requirements:
140
- - - "~>"
141
- - !ruby/object:Gem::Version
142
- version: '1.8'
143
- - !ruby/object:Gem::Dependency
144
- name: macaddr
145
- requirement: !ruby/object:Gem::Requirement
146
- requirements:
147
- - - "~>"
148
- - !ruby/object:Gem::Version
149
- version: '1.7'
150
115
  - - ">="
151
116
  - !ruby/object:Gem::Version
152
- version: 1.7.1
153
- type: :runtime
154
- prerelease: false
155
- version_requirements: !ruby/object:Gem::Requirement
156
- requirements:
157
- - - "~>"
158
- - !ruby/object:Gem::Version
159
- version: '1.7'
160
- - - ">="
161
- - !ruby/object:Gem::Version
162
- version: 1.7.1
163
- - !ruby/object:Gem::Dependency
164
- name: rest-client
165
- requirement: !ruby/object:Gem::Requirement
166
- requirements:
167
- - - "~>"
168
- - !ruby/object:Gem::Version
169
- version: '2.0'
170
- - - ">="
171
- - !ruby/object:Gem::Version
172
- version: 2.0.2
173
- type: :runtime
117
+ version: '0'
118
+ type: :development
174
119
  prerelease: false
175
120
  version_requirements: !ruby/object:Gem::Requirement
176
121
  requirements:
177
- - - "~>"
178
- - !ruby/object:Gem::Version
179
- version: '2.0'
180
122
  - - ">="
181
123
  - !ruby/object:Gem::Version
182
- version: 2.0.2
124
+ version: '0'
183
125
  description: 新网银行的存管实现
184
126
  email:
185
127
  - gandalf@omniaccount.com
@@ -199,40 +141,60 @@ files:
199
141
  - lanmao.gemspec
200
142
  - lib/lanmao.rb
201
143
  - lib/lanmao/api/account/.gitkeep
144
+ - lib/lanmao/api/account/audit_bind_card.rb
202
145
  - lib/lanmao/api/api_helper.rb
203
146
  - lib/lanmao/api/money/.gitkeep
204
147
  - lib/lanmao/api/money/auto_withdraw.rb
148
+ - lib/lanmao/api/money/cancel_withdraw.rb
149
+ - lib/lanmao/api/money/confirm_withdraw.rb
150
+ - lib/lanmao/api/money/direct_recharge.rb
151
+ - lib/lanmao/api/money/intercept_withdraw.rb
205
152
  - lib/lanmao/api/query/.gitkeep
206
153
  - lib/lanmao/api/query/query_authorization_entrust_pay_record.rb
207
154
  - lib/lanmao/api/query/query_project_information.rb
208
155
  - lib/lanmao/api/query/query_transaction.rb
209
- - lib/lanmao/api/query/query_user_information.rb
156
+ - lib/lanmao/api/query/qurey_user_information.rb
210
157
  - lib/lanmao/api/trade/.gitkeep
211
158
  - lib/lanmao/api/trade/async_transaction.rb
159
+ - lib/lanmao/api/trade/authorization_entrust_pay.rb
160
+ - lib/lanmao/api/trade/cancel_debenture_sale.rb
161
+ - lib/lanmao/api/trade/cancel_pre_transaction.rb
162
+ - lib/lanmao/api/trade/cancel_user_authorization.rb
163
+ - lib/lanmao/api/trade/confirm_checkfile.rb
164
+ - lib/lanmao/api/trade/debenture_sale.rb
165
+ - lib/lanmao/api/trade/download_checkfile.rb
212
166
  - lib/lanmao/api/trade/establish_project.rb
167
+ - lib/lanmao/api/trade/freeze.rb
168
+ - lib/lanmao/api/trade/freeze_pre_transaction.rb
213
169
  - lib/lanmao/api/trade/modify_project.rb
170
+ - lib/lanmao/api/trade/unfreeze.rb
171
+ - lib/lanmao/api/trade/unfreeze_trade_password.rb
172
+ - lib/lanmao/api/trade/user_authorization.rb
173
+ - lib/lanmao/api/trade/user_auto_pre_transaction.rb
174
+ - lib/lanmao/api/trade/user_pre_transaction.rb
175
+ - lib/lanmao/api/trade/verify_deduct.rb
214
176
  - lib/lanmao/client.rb
215
177
  - lib/lanmao/extensions.rb
216
178
  - lib/lanmao/form/account/.gitkeep
217
179
  - lib/lanmao/form/account/activate_stocked_user_form.rb
218
180
  - lib/lanmao/form/account/check_password_form.rb
181
+ - lib/lanmao/form/account/enterprise_bind_bankcard.rb
182
+ - lib/lanmao/form/account/enterprise_information_update_form.rb
219
183
  - lib/lanmao/form/account/enterprise_register_form.rb
184
+ - lib/lanmao/form/account/modify_mobile_expand_form.rb
185
+ - lib/lanmao/form/account/personal_bind_bankcard_expand_form.rb
220
186
  - lib/lanmao/form/account/personal_register_expand_form.rb
221
187
  - lib/lanmao/form/account/reset_password_form.rb
188
+ - lib/lanmao/form/account/unbind_bankcard_form.rb
222
189
  - lib/lanmao/form/account/user_authorization_form.rb
223
190
  - lib/lanmao/form/account/user_pre_transaction_form.rb
224
191
  - lib/lanmao/form/form_helper.rb
225
192
  - lib/lanmao/form/money/.gitkeep
226
193
  - lib/lanmao/form/money/recharge_form.rb
227
- - lib/lanmao/form/query/.gitkeep
194
+ - lib/lanmao/form/money/withdraw_form.rb
228
195
  - lib/lanmao/form/trade/.gitkeep
229
196
  - lib/lanmao/http/error_code/account.rb
230
- - lib/lanmao/http/error_code/asset.rb
231
- - lib/lanmao/http/error_code/batch.rb
232
- - lib/lanmao/http/error_code/enterprise.rb
233
- - lib/lanmao/http/error_code/form.rb
234
197
  - lib/lanmao/http/error_code/money.rb
235
- - lib/lanmao/http/error_code/platform.rb
236
198
  - lib/lanmao/http/error_code/query.rb
237
199
  - lib/lanmao/http/error_code/trade.rb
238
200
  - lib/lanmao/http/request.rb
File without changes
@@ -1,20 +0,0 @@
1
- # coding: utf-8
2
-
3
- module Lanmao
4
- module Http
5
- module ErrorCode
6
-
7
- def self.assets_enroll
8
- @_assets_enroll ||= %w[RD000189 RD000191 RD000388 RD000391 RD000435 RD000537]
9
- end
10
-
11
- def self.assets_revoke
12
- @_assets_revoke ||= %w[RD000001 RD000005 RD000027 RD000439 RD000490 RD000537]
13
- end
14
-
15
- def self.asset_query
16
- @_assets_revoke ||= %w[]
17
- end
18
- end # module ErrorCode
19
- end
20
- end
@@ -1,28 +0,0 @@
1
- # coding: utf-8
2
-
3
- module Lanmao
4
- module Http
5
- module ErrorCode
6
-
7
- def self.batch_payment_b
8
- @_batch_payment ||= %w[]
9
- end
10
-
11
- def self.batch_repayment_b
12
- @_batch_payment ||= %w[RD000195]
13
- end
14
-
15
- def self.batch_end_credit_b
16
- @_batch_payment ||= %w[]
17
- end
18
-
19
- def self.batch_coupon_b
20
- @_batch_coupon_b ||= %w[]
21
- end
22
-
23
- def self.batch_notify_resend_b
24
- @_batch_notify_resend_b ||= %w[]
25
- end
26
- end # module ErrorCode
27
- end
28
- end
@@ -1,12 +0,0 @@
1
- # coding: utf-8
2
- module Lanmao
3
- module Http
4
- module ErrorCode
5
-
6
- def self.enterprise_add
7
- @_enterprise_add ||= %w[400 401 403 404 405 410 429 500 503]
8
- end
9
-
10
- end # module ErrorCode
11
- end
12
- end
@@ -1,15 +0,0 @@
1
- # coding: utf-8
2
-
3
- module Lanmao
4
- module Http
5
- module ErrorCode
6
- def self.sign_again_p
7
- @_sign_again_p ||= %w[]
8
- end
9
-
10
- def self.trustee_pay_p
11
- @_trustee_pay_p ||= %w[]
12
- end
13
- end # module ErrorCode
14
- end
15
- end
@@ -1,15 +0,0 @@
1
- # coding: utf-8
2
-
3
- module Lanmao
4
- module Http
5
- module ErrorCode
6
- def self.money_dispatch
7
- @_money_dispatch ||= %w[RD000001 RD000005 RD000012 RD000017 RD000537]
8
- end
9
-
10
- def self.money_revoke
11
- @_money_revoke ||= %w[RD000004 RD000008]
12
- end
13
- end # module ErrorCode
14
- end
15
- end