Open geekelo opened 3 months ago
The P2pTrades::TradeDisputesController
manages disputes related to P2P trades. Here’s a detailed overview of its functionality:
P2pTrades::TradeDisputesController
OverviewApi::V1
Api::BaseController
find_trade
index
@trade.disputes
association and renders it using the P2pTradeDisputeSerializer
.create
P2pTradeDispute
with parameters from create_service
.P2pApi::TradeDispute::CreateJob
if successful.create_service
P2pApi::Requests::TradeDispute::CreateService
with the current user and trade.find_trade
params[:trade_id]
and checks access permissions.@trade
instance variable if access is allowed.allow_trade_access
create
:
StandardError
.ResourceErrors
or provides a generic message in production.Index:
/api/v1/p2p_trades/:trade_id/trade_disputes
Create:
/api/v1/p2p_trades/:trade_id/trade_disputes
with appropriate parameters.If you need further details on specific parts or have additional questions, let me know!