Version 3.0.338

This commit is contained in:
Anja Müller-Meißner 2022-09-06 16:08:19 +02:00 committed by Anja
parent 573fe77e12
commit 0468955d49
751 changed files with 62747 additions and 60672 deletions

View file

@ -4,53 +4,53 @@ using TINK.Repository.Request;
namespace TINK.ViewModel.Login
{
/// <summary> Manages the copri web view when user is logged in. </summary>
public class ManageAccountViewModel
{
/// <summary> Manages the copri web view when user is logged in. </summary>
public class ManageAccountViewModel
{
/// <summary> Holds the auth cookie of the user logged in.</summary>
private string SessionCookie { get; }
/// <summary> Holds the auth cookie of the user logged in.</summary>
private string SessionCookie { get; }
/// <summary> Holds the merchant id.</summary>
private string MerchantId { get; }
/// <summary> Holds the merchant id.</summary>
private string MerchantId { get; }
/// <summary>
/// Holds the current ui two letter ISO language name.
/// </summary>
private string UiIsoLanguageName { get; }
/// <summary>
/// Holds the current ui two letter ISO language name.
/// </summary>
private string UiIsoLanguageName { get; }
/// <summary> Holds the name of the host.</summary>
private string HostName { get; }
/// <summary> Holds the name of the host.</summary>
private string HostName { get; }
/// <param name="uiIsoLangugageName">Two letter ISO language name.</param>
public ManageAccountViewModel(
string sessionCookie,
string merchantId,
string uiIsoLangugageName,
string hostName)
{
SessionCookie = sessionCookie;
MerchantId = merchantId;
UiIsoLanguageName = uiIsoLangugageName;
HostName = hostName;
}
/// <param name="uiIsoLangugageName">Two letter ISO language name.</param>
public ManageAccountViewModel(
string sessionCookie,
string merchantId,
string uiIsoLangugageName,
string hostName)
{
SessionCookie = sessionCookie;
MerchantId = merchantId;
UiIsoLanguageName = uiIsoLangugageName;
HostName = hostName;
}
/// <summary> Get Uri of web view managing user account. </summary>
public string Uri
{
get
{
var sessionIdQueryElement = QueryBuilderHelper.GetSessionIdQueryElement("?", MerchantId, SessionCookie);
/// <summary> Get Uri of web view managing user account. </summary>
public string Uri
{
get
{
var sessionIdQueryElement = QueryBuilderHelper.GetSessionIdQueryElement("?", MerchantId, SessionCookie);
string GetUriText()
=> !string.IsNullOrEmpty(sessionIdQueryElement)
? $"https://{HostName}{sessionIdQueryElement}{QueryBuilderHelper.GetLanguageQueryElement("&", UiIsoLanguageName)}"
: $"https://{HostName}";
string GetUriText()
=> !string.IsNullOrEmpty(sessionIdQueryElement)
? $"https://{HostName}{sessionIdQueryElement}{QueryBuilderHelper.GetLanguageQueryElement("&", UiIsoLanguageName)}"
: $"https://{HostName}";
Log.ForContext<ManageAccountViewModel>().Debug($"Request to open url {GetUriText()} to get privacy info.");
Log.ForContext<ManageAccountViewModel>().Debug($"Request to open url {GetUriText()} to get privacy info.");
return GetUriText();
}
}
}
return GetUriText();
}
}
}
}

View file

@ -3,47 +3,47 @@ using TINK.Repository.Request;
namespace TINK.ViewModel.CopriWebView
{
/// <summary> Manages the copri web view for password forgotton use case. </summary>
public class PasswordForgottonViewModel
{
/// <summary> Holds the merchant id.</summary>
private string MerchantId { get; }
/// <summary> Manages the copri web view for password forgotton use case. </summary>
public class PasswordForgottonViewModel
{
/// <summary> Holds the merchant id.</summary>
private string MerchantId { get; }
/// <summary> Holds the name of the host.</summary>
private string HostName { get; }
/// <summary> Holds the name of the host.</summary>
private string HostName { get; }
/// <summary>
/// Holds the current ui two letter ISO language name.
/// </summary>
private string UiIsoLanguageName { get; }
/// <summary>
/// Holds the current ui two letter ISO language name.
/// </summary>
private string UiIsoLanguageName { get; }
/// <param name="uiIsoLangugageName">Two letter ISO language name.</param>
public PasswordForgottonViewModel(
string merchantId,
string uiIsoLangugageName,
string hostName)
{
MerchantId = merchantId;
UiIsoLanguageName = uiIsoLangugageName;
HostName = hostName;
}
/// <param name="uiIsoLangugageName">Two letter ISO language name.</param>
public PasswordForgottonViewModel(
string merchantId,
string uiIsoLangugageName,
string hostName)
{
MerchantId = merchantId;
UiIsoLanguageName = uiIsoLangugageName;
HostName = hostName;
}
/// <summary> Get Uri of web view providing password forgotton functionality. </summary>
public string Uri
{
get
{
var sessionIdQueryElement = QueryBuilderHelper.GetSessionIdQueryElement("?", MerchantId);
/// <summary> Get Uri of web view providing password forgotton functionality. </summary>
public string Uri
{
get
{
var sessionIdQueryElement = QueryBuilderHelper.GetSessionIdQueryElement("?", MerchantId);
string GetUriText()
=> !string.IsNullOrEmpty(sessionIdQueryElement)
? $"https://{HostName}/app/Account{sessionIdQueryElement}{QueryBuilderHelper.GetLanguageQueryElement("&", UiIsoLanguageName)}"
: $"https://{HostName}/app/Account";
string GetUriText()
=> !string.IsNullOrEmpty(sessionIdQueryElement)
? $"https://{HostName}/app/Account{sessionIdQueryElement}{QueryBuilderHelper.GetLanguageQueryElement("&", UiIsoLanguageName)}"
: $"https://{HostName}/app/Account";
Log.ForContext<PasswordForgottonViewModel>().Debug($"Request to open url {GetUriText()} to get privacy info.");
Log.ForContext<PasswordForgottonViewModel>().Debug($"Request to open url {GetUriText()} to get privacy info.");
return GetUriText();
}
}
}
return GetUriText();
}
}
}
}

View file

@ -3,45 +3,45 @@ using TINK.Repository.Request;
namespace TINK.ViewModel.CopriWebView
{
public class RegisterPageViewModel
{
/// <summary> Holds the merchant id.</summary>
private string MerchantId { get; }
public class RegisterPageViewModel
{
/// <summary> Holds the merchant id.</summary>
private string MerchantId { get; }
/// <summary> Holds the name of the host.</summary>
private string HostName { get; }
/// <summary> Holds the name of the host.</summary>
private string HostName { get; }
/// <summary>
/// Holds the current ui two letter ISO language name.
/// </summary>
private string UiIsoLanguageName { get; }
/// <summary>
/// Holds the current ui two letter ISO language name.
/// </summary>
private string UiIsoLanguageName { get; }
/// <param name="uiIsoLangugageName">Two letter ISO language name.</param>
public RegisterPageViewModel(
string merchantId,
string uiIsoLangugageName,
string hostName)
{
HostName = hostName;
UiIsoLanguageName = uiIsoLangugageName;
MerchantId = merchantId;
}
/// <param name="uiIsoLangugageName">Two letter ISO language name.</param>
public RegisterPageViewModel(
string merchantId,
string uiIsoLangugageName,
string hostName)
{
HostName = hostName;
UiIsoLanguageName = uiIsoLangugageName;
MerchantId = merchantId;
}
/// <summary>Get Uri of web view for creating account.</summary>
public string Uri
{
get
{
var sessionIdQueryElement = QueryBuilderHelper.GetSessionIdQueryElement("?", MerchantId);
/// <summary>Get Uri of web view for creating account.</summary>
public string Uri
{
get
{
var sessionIdQueryElement = QueryBuilderHelper.GetSessionIdQueryElement("?", MerchantId);
string GetUriText()
=> !string.IsNullOrEmpty(sessionIdQueryElement)
? $"https://{HostName}/app/Account/1.%20Kundendaten{sessionIdQueryElement}{QueryBuilderHelper.GetLanguageQueryElement("&", UiIsoLanguageName)}"
: $"https://{HostName}/app/Account/1.%20Kundendaten";
string GetUriText()
=> !string.IsNullOrEmpty(sessionIdQueryElement)
? $"https://{HostName}/app/Account/1.%20Kundendaten{sessionIdQueryElement}{QueryBuilderHelper.GetLanguageQueryElement("&", UiIsoLanguageName)}"
: $"https://{HostName}/app/Account/1.%20Kundendaten";
Log.ForContext<RegisterPageViewModel>().Debug($"Request to open url {GetUriText()} to get privacy info.");
return GetUriText();
}
}
}
Log.ForContext<RegisterPageViewModel>().Debug($"Request to open url {GetUriText()} to get privacy info.");
return GetUriText();
}
}
}
}