예제 #1
0
        public async Task <IActionResult> SetAssetMerchantSettings(
            [FromBody] UpdateAssetMerchantSettingsRequest settingsRequest)
        {
            try
            {
                await _assetSettingsService.SetByMerchantAsync(settingsRequest.MerchantId,
                                                               settingsRequest.PaymentAssets,
                                                               settingsRequest.SettlementAssets);

                return(NoContent());
            }
            catch (InvalidRowKeyValueException e)
            {
                _log.ErrorWithDetails(e, new
                {
                    e.Variable,
                    e.Value
                });

                return(NotFound(ErrorResponse.Create("Merchant not found")));
            }
        }
예제 #2
0
 public Task SetAssetMerchantSettingsAsync(UpdateAssetMerchantSettingsRequest settingsRequest)
 {
     return(_runner.RunWithDefaultErrorHandlingAsync(() => _assetsApi.SetAssetMerchantSettingsAsync(settingsRequest)));
 }