lib/reapal/api/user/onekey_batch_contract.rb in reapal-0.2.2 vs lib/reapal/api/user/onekey_batch_contract.rb in reapal-0.3.0
- old
+ new
@@ -40,24 +40,10 @@
branch: card_branch,
subbranch: card_sub_branch,
applyTime: Time.now.strftime('%Y-%m-%d %H:%M:%S'),
}
- response = Http.post(service, params, @config, post_path)
-
- res = Reapal::Utils.api_result(params, response)
-
- return res if response.http_pending?
-
- # 个人签约只有返回码是 '0000', '0007' 才成功
- if ['0000', '0007'].include?(response.data[:resultCode])
- res[:result] = 'S'
- res[:data] = response.data
- else
- res[:result] = 'F'
- end
-
- res
+ operate_post(:operate, service, params, post_path, Http::ErrorCode.contract_create, ['0000', '0007'])
end
end # module Agree
end
end