diff --git a/src/Plivo/Resource/Profile/ProfileListResponse.cs b/src/Plivo/Resource/Profile/ProfileListResponse.cs index d78de094..260e8c1b 100644 --- a/src/Plivo/Resource/Profile/ProfileListResponse.cs +++ b/src/Plivo/Resource/Profile/ProfileListResponse.cs @@ -11,6 +11,11 @@ namespace Plivo.Resource [JsonObject] public class ProfileListResponse : BaseResponse, IEnumerable { + /// + /// Gets or sets the meta. + /// + /// The meta. + public ProfileMeta Meta { get; set; } /// /// Gets or sets the objects. /// @@ -29,8 +34,9 @@ public ProfileListResponse() /// /// Meta. /// profiles. - public ProfileListResponse( List profiles) + public ProfileListResponse(ProfileMeta meta, List profiles) { + Meta = meta ?? throw new ArgumentNullException(nameof(meta)); Profiles = profiles ?? throw new ArgumentNullException(nameof(profiles)); } @@ -59,6 +65,7 @@ public IEnumerator GetEnumerator() public override string ToString() { return "Api Id: " + ApiId + "\n" + + "[Meta]\n" + Meta + "StatusCode: " + StatusCode + "[profiles]\n" + string.Join("\n", Profiles); diff --git a/src/Plivo/Resource/Profile/ProfileMeta.cs b/src/Plivo/Resource/Profile/ProfileMeta.cs new file mode 100644 index 00000000..e9cef648 --- /dev/null +++ b/src/Plivo/Resource/Profile/ProfileMeta.cs @@ -0,0 +1,51 @@ +using System.Threading; +using Newtonsoft.Json; + +namespace Plivo.Resource +{ + /// + /// Profile Meta. + /// + public class ProfileMeta + { + /// + /// Gets or sets the limit. + /// + /// The limit. + public uint Limit { get; set; } + + /// + /// Gets or sets the next. + /// + /// The next. + [JsonProperty("next")] + public string Next { get; set; } + + /// + /// Gets or sets the offset. + /// + /// The offset. + [JsonProperty("offset")] + public uint Offset { get; set; } + + /// + /// Gets or sets the previous. + /// + /// The previous. + [JsonProperty("previous")] + public string Previous { get; set; } + + /// + /// Returns a that represents the current . + /// + /// A that represents the current . + public override string ToString() + { + return + "Limit: " + Limit + "\n" + + "Next: " + Next + "\n" + + "Offset: " + Offset + "\n" + + "Previous: " + Previous + "\n"; + } + } +} \ No newline at end of file