diff --git a/EasyPost/Hooks.cs b/EasyPost/Hooks.cs
index dbdf10d3..78aea32b 100644
--- a/EasyPost/Hooks.cs
+++ b/EasyPost/Hooks.cs
@@ -1,11 +1,14 @@
using System;
-using System.Collections.Generic;
using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;
+using EasyPost._base;
namespace EasyPost;
+///
+/// Class representing a set of callbacks to use for introspecting API requests made by an .
+///
public class Hooks
{
///
@@ -20,6 +23,10 @@ public class Hooks
public EventHandler? OnRequestResponseReceived { get; set; }
}
+///
+/// Represents a set of containing information about an in-flight HTTP request.
+/// This set is passed into the event handler.
+///
public class OnRequestExecutingEventArgs : EventArgs
{
///
@@ -71,6 +78,10 @@ internal OnRequestExecutingEventArgs(HttpRequestMessage request, int timestamp,
}
}
+///
+/// Represents a set of containing information about an HTTP response received by the client.
+/// This set is passed into the event handler.
+///
public class OnRequestResponseReceivedEventArgs : EventArgs
{
///
diff --git a/EasyPost/Models/API/CarrierAccountType.cs b/EasyPost/Models/API/CarrierAccountType.cs
index 82b3cd33..ac40be84 100644
--- a/EasyPost/Models/API/CarrierAccountType.cs
+++ b/EasyPost/Models/API/CarrierAccountType.cs
@@ -3,18 +3,44 @@
namespace EasyPost.Models.API;
+///
+/// Enums representing specific carrier account types.
+///
public class CarrierAccountType : ValueEnum
{
+ ///
+ /// Represents a FedEx carrier account.
+ ///
public static readonly CarrierAccountType FedEx = new CarrierAccountType(26, "FedexAccount");
+
+ ///
+ /// Represents a FedEx SmartPost carrier account.
+ ///
public static readonly CarrierAccountType FedExSmartPost = new CarrierAccountType(30, "FedexSmartpostAccount");
+
+ ///
+ /// Represents a UPS carrier account.
+ ///
public static readonly CarrierAccountType Ups = new CarrierAccountType(59, "UpsAccount");
+ ///
+ /// Constructor for CarrierAccountType enum.
+ ///
+ /// Internal ID of the enum. Must be unique among all enums of this specific type.
+ /// Name of the carrier account type. Stored as the value associated with this enum.
private CarrierAccountType(int id, string name)
: base(id, name)
{
}
+ ///
+ /// Gets the name of this .
+ ///
public string Name => (string)Value;
+ ///
+ /// Gets all enums.
+ ///
+ ///
public static IEnumerable All() => GetAll();
}
diff --git a/EasyPost/Parameters/BaseParameters.cs b/EasyPost/Parameters/BaseParameters.cs
index d1249ef5..70680f37 100644
--- a/EasyPost/Parameters/BaseParameters.cs
+++ b/EasyPost/Parameters/BaseParameters.cs
@@ -231,10 +231,12 @@ private void Add(RequestParameterAttribute requestParameterAttribute, object? va
// Get the key and update the list of keys
string key = keys[0];
keys = keys.Skip(1).ToArray();
+#pragma warning disable CA1854 // Don't want to use TryGetValue because no need for value
if (!dictionary.ContainsKey(key))
{
dictionary[key] = UpdateDictionary(new Dictionary(), keys, value);
}
+#pragma warning restore CA1854
object? subDirectory = dictionary[key];
if (subDirectory is Dictionary subDictionary)
diff --git a/EasyPost/Parameters/IBaseParameters.cs b/EasyPost/Parameters/IBaseParameters.cs
index 53776873..40dca45d 100644
--- a/EasyPost/Parameters/IBaseParameters.cs
+++ b/EasyPost/Parameters/IBaseParameters.cs
@@ -12,10 +12,22 @@
namespace EasyPost.Parameters
{
+ ///
+ /// Base interface for all EasyPost API parameters.
+ ///
public interface IBaseParameters
{
+ ///
+ /// Convert this object to a .
+ ///
+ ///
public Dictionary ToDictionary();
+ ///
+ /// Convert this object to a sub- based on the parent parameter object type.
+ ///
+ ///
+ ///
public Dictionary ToSubDictionary(Type parentParameterObjectType);
}
}