public async Task <CosmosListPage <RMA> > ListRMAsForOrder(string orderID, DecodedToken decodedToken) { var me = await _oc.Me.GetAsync(accessToken : decodedToken.AccessToken); HSOrder order = await _oc.Orders.GetAsync <HSOrder>(OrderDirection.Incoming, orderID); await EnsureUserCanAccessOrder(order, decodedToken); var listFilter = new ListFilter("SourceOrderID", orderID); CosmosListOptions listOptions = new CosmosListOptions() { PageSize = 100, ContinuationToken = null, Filters = { listFilter } }; CosmosListPage <RMA> rmasOnOrder = await _rmaCommand.ListBuyerRMAs(listOptions, me.Buyer.ID); return(rmasOnOrder); }
public async Task <CosmosListPage <RMA> > ListBuyerRMAs([FromBody] CosmosListOptions listOptions) { var me = await _oc.Me.GetAsync(accessToken : UserContext.AccessToken); return(await _rmaCommand.ListBuyerRMAs(listOptions, me?.Buyer?.ID)); }
public async Task <CosmosListPage <RMA> > ListBuyerRMAs([FromBody] CosmosListOptions listOptions) { RequireOneOf(CustomRole.MPLocationViewAllOrders); return(await _rmaCommand.ListBuyerRMAs(listOptions, VerifiedUserContext)); }
public async Task <CosmosListPage <RMA> > ListBuyerRMAs([FromBody] CosmosListOptions listOptions) { return(await _rmaCommand.ListBuyerRMAs(listOptions, UserContext)); }