Class: StellarBase::WithdrawController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- StellarBase::WithdrawController
- Defined in:
- app/controllers/stellar_base/withdraw_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'app/controllers/stellar_base/withdraw_controller.rb', line 4 def create op = WithdrawalRequests::Operations::Create .(withdrawal_request: withdraw_params) respond_to do |f| f.json do if op.success? twin = WithdrawalRequestTwin.new(op["model"]) representer = WithdrawalRequestRepresenter.new(twin) render json: representer else render json: errors_from(op), status: :unprocessable_entity end end end end |