public async Task <IResponseContent> ActiveCards(string tenantUid, string token, string origin, string action = "") { var customerGuid = DecodeJwt(token).CustomerGuid; if (String.IsNullOrEmpty(action)) { var emptyAction = new CustomerAccountBalance { CustomerGuid = customerGuid.ToString(), }; var emptyActionResponse = await SubmitPostAsync($"{URL_API_ACTIVE_CARDS}", origin, emptyAction, token, tenantUid, _logger); return(AssertResponseContent <ActiveCardResponseContent>(emptyActionResponse)); } var activeCard = new ActiveCardParams { CustomerGuid = customerGuid.ToString(), Action = action }; var response = await SubmitPostAsync($"{URL_API_ACTIVE_CARDS}", origin, activeCard, token, tenantUid, _logger); return(AssertResponseContent <ActiveCardResponseContent>(response)); }
public IResponseContent GetAccountBalance(string tenantUid, string origin, string customerGuid, string customerToken) { var customerInfo = new CustomerAccountBalance { CustomerGuid = customerGuid }; // temporary fix using query string var url = $"{URL_GET_ACCOUNT_BALANCE}/{customerGuid}"; try { //IRestResponse response = SubmitGet(URL_GET_ACCOUNT_BALANCE, origin, customerInfo, customerToken); IRestResponse response = SubmitGet(url, origin, customerInfo, customerToken, tenantUid); return(AssertResponseContent <GetCustomerAccountBalanceResponseContent>(response)); } catch (Exception ex) { return(new GetCustomerAccountBalanceResponseContent { Exception = ex }); } }