From 7dd47899fd5343ea8ff3f65f9fc9118d70ecf802 Mon Sep 17 00:00:00 2001 From: fgonzalez Date: Thu, 26 Sep 2024 11:53:47 -0300 Subject: [PATCH] chore: add expiration date on customer creation --- doppler-beplic/Models/DTO/UserCreationDTO.cs | 2 ++ doppler-beplic/Services/Classes/BeplicService.cs | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/doppler-beplic/Models/DTO/UserCreationDTO.cs b/doppler-beplic/Models/DTO/UserCreationDTO.cs index fc0d0a6..b9f0278 100644 --- a/doppler-beplic/Models/DTO/UserCreationDTO.cs +++ b/doppler-beplic/Models/DTO/UserCreationDTO.cs @@ -50,5 +50,7 @@ public class UserCreationPlan public string? PlanName { get; set; } [JsonProperty("messageLimit")] public int? MessageLimit { get; set; } + [JsonProperty("expirationDate")] + public string? ExpirationDate { get; set; } } } diff --git a/doppler-beplic/Services/Classes/BeplicService.cs b/doppler-beplic/Services/Classes/BeplicService.cs index 7402ab7..21b61dd 100644 --- a/doppler-beplic/Services/Classes/BeplicService.cs +++ b/doppler-beplic/Services/Classes/BeplicService.cs @@ -40,11 +40,12 @@ public async Task CreateUser(UserCreationDTO accountData) accountData.Customer.LegalName ??= _options.Customer.LegalName; accountData.Customer.Address ??= _options.Customer.Address; accountData.Customer.Cuit ??= _options.Customer.Cuit; - accountData.Customer.Plan ??= new UserCreationPlan + accountData.Customer.Plan = new UserCreationPlan { IdPlan = _options.Plan.Id, PlanName = _options.Plan.Name, - MessageLimit = _options.Plan.MessageLimit + MessageLimit = _options.Plan.MessageLimit, + ExpirationDate = accountData.Customer.Plan?.ExpirationDate }; var result = new UserCreationResponse();