-
Notifications
You must be signed in to change notification settings - Fork 126
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
QR Code Message and account metrics implementation added
- Loading branch information
1 parent
b7b0986
commit 82812a7
Showing
14 changed files
with
782 additions
and
19 deletions.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
WhatsappBusiness.CloudApi/AccountMetrics/ConversationDirection.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace WhatsappBusiness.CloudApi.AccountMetrics | ||
{ | ||
public static class ConversationDirection | ||
{ | ||
public const string BusinessInitiated = "business_initiated"; | ||
public const string UserInitiated = "user_initiated"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace WhatsappBusiness.CloudApi.AccountMetrics | ||
{ | ||
public static class ConversationType | ||
{ | ||
public const string FREE_ENTRY = "FREE_ENTRY"; | ||
public const string FREE_TIER = "FREE_TIER"; | ||
public const string REGULAR = "REGULAR"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
namespace WhatsappBusiness.CloudApi.AccountMetrics | ||
{ | ||
public static class Dimension | ||
{ | ||
public const string Phone = "phone"; | ||
public const string Country = "country"; | ||
public const string ConversationType = "conversation_type"; | ||
public const string COnversationDirection = "conversation_direction"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
namespace WhatsappBusiness.CloudApi.AccountMetrics | ||
{ | ||
public static class Granularity | ||
{ | ||
public static class AnalyticsGranularity | ||
{ | ||
public const string HALF_HOUR = "HALF_HOUR"; | ||
public const string DAY = "DAY"; | ||
public const string MONTH = "MONTH"; | ||
} | ||
|
||
public static class ConversationGranularity | ||
{ | ||
public const string HALF_HOUR = "HALF_HOUR"; | ||
public const string DAILY = "DAILY"; | ||
public const string MONTHLY = "MONTHLY"; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace WhatsappBusiness.CloudApi.AccountMetrics | ||
{ | ||
public static class MetricType | ||
{ | ||
public const string COST = "COST"; | ||
public const string CONVERSATION = "CONVERSATION"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
using Newtonsoft.Json; | ||
using System.Collections.Generic; | ||
|
||
namespace WhatsappBusiness.CloudApi.Response | ||
{ | ||
public class AnalyticsResponse | ||
{ | ||
[JsonProperty("analytics")] | ||
public Analytics Analytics { get; set; } | ||
|
||
[JsonProperty("id")] | ||
public string Id { get; set; } | ||
} | ||
|
||
public class Analytics | ||
{ | ||
[JsonProperty("phone_numbers")] | ||
public List<string> PhoneNumbers { get; set; } | ||
|
||
[JsonProperty("country_codes")] | ||
public List<string> CountryCodes { get; set; } | ||
|
||
[JsonProperty("granularity")] | ||
public string Granularity { get; set; } | ||
|
||
[JsonProperty("data_points")] | ||
public List<AnalyticsDataPoint> DataPoints { get; set; } | ||
} | ||
|
||
public class AnalyticsDataPoint | ||
{ | ||
[JsonProperty("start")] | ||
public long Start { get; set; } | ||
|
||
[JsonProperty("end")] | ||
public long End { get; set; } | ||
|
||
[JsonProperty("sent")] | ||
public long Sent { get; set; } | ||
|
||
[JsonProperty("delivered")] | ||
public long Delivered { get; set; } | ||
} | ||
} |
47 changes: 47 additions & 0 deletions
47
WhatsappBusiness.CloudApi/Response/ConversationAnalyticsResponse.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
using Newtonsoft.Json; | ||
using System.Collections.Generic; | ||
|
||
namespace WhatsappBusiness.CloudApi.Response | ||
{ | ||
public class ConversationAnalyticsResponse | ||
{ | ||
[JsonProperty("conversation_analytics")] | ||
public ConversationAnalytics ConversationAnalytics { get; set; } | ||
} | ||
|
||
public class ConversationAnalytics | ||
{ | ||
[JsonProperty("data")] | ||
public List<ConversationAnalyticsData> Data { get; set; } | ||
} | ||
|
||
public class ConversationAnalyticsData | ||
{ | ||
[JsonProperty("data_points")] | ||
public List<ConversationAnalyticsDataPoint> DataPoints { get; set; } | ||
} | ||
|
||
public class ConversationAnalyticsDataPoint | ||
{ | ||
[JsonProperty("start")] | ||
public long Start { get; set; } | ||
|
||
[JsonProperty("end")] | ||
public long End { get; set; } | ||
|
||
[JsonProperty("conversation")] | ||
public long Conversation { get; set; } | ||
|
||
[JsonProperty("phone_number")] | ||
public string PhoneNumber { get; set; } | ||
|
||
[JsonProperty("conversation_type")] | ||
public string ConversationType { get; set; } | ||
|
||
[JsonProperty("conversation_direction")] | ||
public string ConversationDirection { get; set; } | ||
|
||
[JsonProperty("cost")] | ||
public double Cost { get; set; } | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
WhatsappBusiness.CloudApi/Response/QRCodeMessageFilterResponse.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
using Newtonsoft.Json; | ||
using System.Collections.Generic; | ||
|
||
namespace WhatsappBusiness.CloudApi.Response | ||
{ | ||
public class QRCodeMessageFilterResponse | ||
{ | ||
[JsonProperty("data")] | ||
public List<QRCodeMessageResponse> Data { get; set; } | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
WhatsappBusiness.CloudApi/Response/QRCodeMessageResponse.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using Newtonsoft.Json; | ||
|
||
namespace WhatsappBusiness.CloudApi.Response | ||
{ | ||
public class QRCodeMessageResponse | ||
{ | ||
[JsonProperty("code")] | ||
public string Code { get; set; } | ||
|
||
[JsonProperty("prefilled_message")] | ||
public string PrefilledMessage { get; set; } | ||
|
||
[JsonProperty("deep_link_url")] | ||
public string DeepLinkUrl { get; set; } | ||
|
||
[JsonProperty("qr_image_url")] | ||
public string QrImageUrl { get; set; } | ||
} | ||
} |
Oops, something went wrong.