Skip to content

Commit

Permalink
Merge pull request #114 from FromDoppler/doi-1629-add-plan-expiration
Browse files Browse the repository at this point in the history
[Doi-1629] Add expiration date on customer creation
  • Loading branch information
fgchaio authored Sep 26, 2024
2 parents 11bb053 + 7dd4789 commit b9debdc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions doppler-beplic/Models/DTO/UserCreationDTO.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
}
}
5 changes: 3 additions & 2 deletions doppler-beplic/Services/Classes/BeplicService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,12 @@ public async Task<UserCreationResponse> 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();
Expand Down

0 comments on commit b9debdc

Please sign in to comment.