Module: Eloan::Helper::Request
- Included in:
- Api
- Defined in:
- lib/eloan/helper/request.rb
Instance Method Summary collapse
-
#request_params(code) ⇒ Object
根据code获取请求方式,默认请求参数.
Instance Method Details
#request_params(code) ⇒ Object
根据code获取请求方式,默认请求参数
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 |
# File 'lib/eloan/helper/request.rb', line 5 def request_params(code) case code when '101' { url: '/v1/users/add-cash-card', method: 'POST', notify: true, default: { 'cert_type' => '00', 'card_type' => 'D', 'bg_return_url' => configurate.bg_return_url } } when '102' { url: '/v1/users/add-withhold-card', method: 'POST', notify: true, default: { 'cert_type' => '00', 'card_type' => 'D', 'bg_return_url' => configurate.bg_return_url } } when '103' { url: '/v1/users/relieve-withhold-card', method: 'POST', default: { 'cert_type' => '00' } } when '201' { url: '/v1/trade/loan', method: 'POST', notify: true, default: { 'business_type' => '00', 'product_type' => '00', 'loan_purpose' => '00', 'loan_period' => '1', 'loan_period_type' => '01', 'entrusted_flag' => 'N', 'user_cert_type' => '00', 'user_cash_method' => 'T0', 'installment_number' => '1', 'payment_method' => '02', 'installment_rate' => '0.00', 'bg_return_url' => configurate.bg_return_url } } when '202' { url: '/v1/trade/repay', method: 'POST', notify: true, default: { 'business_type' => '00', 'product_type' => '00', 'cert_type' => '00', 'repay_mode' => '0', 'back_cert_type' => '00', 'bg_return_url' => configurate.bg_return_url } } when '204' { url: '/v1/trade/loan/cash', method: 'POST', notify: true, default: { 'bg_return_url' => configurate.bg_return_url } } when '301' { url: '/v1/users/query/add-cash-card', method: 'GET', default: { 'cert_type' => '00' } } when '302' { url: '/v1/query/trade/loan', method: 'GET', default: {} } when '303' { url: '/v1/query/users/add-withhold-card', method: 'GET', default: { 'cert_type' => '00' } } when '304' { url: '/v1/query/trade/repay', method: 'GET', default: {} } when '305' { url: '/v1/query/card/bin', method: 'GET', default: {} } when '306' { url: '/v1/query/bind/card', method: 'GET', default: { 'cert_type' => '00' } } when '307' { url: '/v1/query/loan/cash', method: 'GET', default: {} } when '308' { url: '/v1/query/clients/balance', method: 'GET', default: {} } else {} end end |