|
| 1 | +using System.Diagnostics.CodeAnalysis; |
| 2 | +using EasyPost.Models.API; |
| 3 | +using EasyPost.Utilities.Internal.Attributes; |
| 4 | + |
| 5 | +namespace EasyPost.Parameters.Claim |
| 6 | +{ |
| 7 | + /// <summary> |
| 8 | + /// <a href="https://docs.easypost.com/docs/customer-portals#creating-a-portal-session">Parameters</a> for <see cref="EasyPost.Services.CustomerPortalService.CreateAccountLink(CreateAccountLink, System.Threading.CancellationToken)"/> API calls. |
| 9 | + /// </summary> |
| 10 | + [ExcludeFromCodeCoverage] |
| 11 | + public class CreateAccountLink : BaseParameters<Models.API.CustomerPortalAccountLink> |
| 12 | + { |
| 13 | + #region Request Parameters |
| 14 | + |
| 15 | + /// <summary> |
| 16 | + /// Type of Customer Portal session. |
| 17 | + /// </summary> |
| 18 | + [TopLevelRequestParameter(Necessity.Required, "session_type")] |
| 19 | + public string? SessionType { get; set; } |
| 20 | + |
| 21 | + /// <summary> |
| 22 | + /// The User ID of the sub account for which the portal session is being created. |
| 23 | + /// </summary> |
| 24 | + [TopLevelRequestParameter(Necessity.Required, "user_id")] |
| 25 | + public string? UserId { get; set; } |
| 26 | + |
| 27 | + /// <summary> |
| 28 | + /// The URL to which the sub account will be redirected if the session URL is expired, reused, or otherwise invalid. |
| 29 | + /// This should trigger a new session request. |
| 30 | + /// </summary> |
| 31 | + [TopLevelRequestParameter(Necessity.Required, "refresh_url")] |
| 32 | + public string? RefreshUrl { get; set; } |
| 33 | + |
| 34 | + /// <summary> |
| 35 | + /// The URL to which the sub account will be redirected after exiting the Customer Portal session. |
| 36 | + /// This does not confirm completion of the flow; webhook or API polling is recommended for confirmation. |
| 37 | + /// </summary> |
| 38 | + [TopLevelRequestParameter(Necessity.Required, "return_url")] |
| 39 | + public string? ReturnUrl { get; set; } |
| 40 | + |
| 41 | + /// <summary> |
| 42 | + /// Used to configure the Customer Portal session. |
| 43 | + /// </summary> |
| 44 | + [TopLevelRequestParameter(Necessity.Optional, "metadata")] |
| 45 | + public Dictionary<string, object>? Metadata { get; set; } |
| 46 | + |
| 47 | + #endregion |
| 48 | + } |
| 49 | +} |
0 commit comments