public static string ObterHash(this GerarEGiftResponse response) { var hash = response.EntityId; hash = hash.Substring(hash.LastIndexOf('/') + 1); return(hash); }
public static GenerateEGiftHashResponse Map(this GerarEGiftResponse response) { return(new GenerateEGiftHashResponse() { AccountId = response.AccountId, EntityId = response.EntityId, Status = response.Status }); }
public static string GerarUrlAtivacao(this GerarEGiftResponse response, string urlTemplate) { var hash = response.ObterHash(); if (string.IsNullOrEmpty(urlTemplate) || string.IsNullOrEmpty(hash)) { return(""); } return(string.Format(urlTemplate, hash)); }
public static string ObterAccountId(this GerarEGiftResponse response) { var accountId = response.AccountId; if (accountId.Contains("accountId=")) { accountId = accountId.Substring(accountId.IndexOf("accountId=")); accountId = accountId.Replace("accountId=", ""); return(accountId); } return(""); }