This repository has been archived by the owner on Jan 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Sivakumar Munuswami
committed
Aug 1, 2017
1 parent
8d08097
commit 07e2d0b
Showing
1,390 changed files
with
132,561 additions
and
7,567 deletions.
There are no files selected for viewing
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 @@ | ||
.\packages\Doxygen.1.8.13\tools\doxygen docs.config |
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,67 @@ | ||
using System; | ||
using System.Xml.Serialization; | ||
using Newtonsoft.Json; | ||
|
||
namespace FuelSDK | ||
{ | ||
/// <summary> | ||
/// The APIObject is the object from which all SOAP API base objects inherit. The APIObject allows all base objects to | ||
/// - Refer to a specific account. | ||
/// - Have an associated creation date. | ||
/// - Have a Marketing Cloud identifier. | ||
/// - Have an associated key from an external system. | ||
/// </summary> | ||
public partial class APIObject | ||
{ | ||
/// <summary> | ||
/// Gets or sets the authentication stub. | ||
/// </summary> | ||
/// <value>The authentication stub.</value> | ||
[XmlIgnore, JsonIgnore] | ||
public ETClient AuthStub { get; set; } | ||
/// <summary> | ||
/// Gets or sets the properties. | ||
/// </summary> | ||
/// <value>The properties.</value> | ||
[XmlIgnore] | ||
public string[] Props { get; set; } | ||
/// <summary> | ||
/// Gets or sets the search filter. | ||
/// </summary> | ||
/// <value>The search filter.</value> | ||
[XmlIgnore] | ||
public FilterPart SearchFilter { get; set; } | ||
/// <summary> | ||
/// Gets or sets the last request identifier. | ||
/// </summary> | ||
/// <value>The last request identifier.</value> | ||
[XmlIgnore] | ||
public string LastRequestID { get; set; } | ||
/// <summary> | ||
/// Gets or sets the directory path. | ||
/// </summary> | ||
/// <value>The directory path.</value> | ||
[XmlElementAttribute(Order = 10000), JsonIgnore] | ||
public string DirectoryPath { get; set; } | ||
/// <summary> | ||
/// Gets the unique identifier. | ||
/// Returns the ID if the value is greater than 0. | ||
/// If not and Object ID is not null returns Object ID. | ||
/// If not and Customer Key is not null returns Customer Key. | ||
/// If not throw throws error. | ||
/// </summary> | ||
/// <exception cref="System.InvalidOperationException"> | ||
/// <value>The unique identifier.</value> | ||
[XmlIgnore, JsonIgnore] | ||
public string UniqueID | ||
{ | ||
get | ||
{ | ||
if (ID > 0) return ID.ToString(); | ||
if (!string.IsNullOrEmpty(ObjectID)) return ObjectID; | ||
if (!string.IsNullOrEmpty(CustomerKey)) return CustomerKey; | ||
throw new InvalidOperationException("Unable to generate UniqueID"); | ||
} | ||
} | ||
} | ||
} |
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,55 @@ | ||
using System; | ||
using System.Linq; | ||
|
||
namespace FuelSDK | ||
{ | ||
/// <summary> | ||
/// Return object by delete operation. | ||
/// </summary> | ||
public class DeleteReturn : FuelReturn | ||
{ | ||
/// <summary> | ||
/// Gets or sets the results as an ResultDetail array. | ||
/// </summary> | ||
/// <value>Array of ResultDetail.</value> | ||
public ResultDetail[] Results { get; set; } | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="T:FuelSDK.DeleteReturn"/> class. | ||
/// </summary> | ||
/// <param name="objs">APIObject</param> | ||
public DeleteReturn(APIObject objs) | ||
{ | ||
if (objs == null) | ||
throw new ArgumentNullException("objs"); | ||
var response = ExecuteAPI((client, o) => | ||
{ | ||
string requestID; | ||
string overallStatus; | ||
return new ExecuteAPIResponse<DeleteResult>(client.SoapClient.Delete(new DeleteOptions(), o, out requestID, out overallStatus), requestID, overallStatus); | ||
}, objs); | ||
if (response != null) | ||
if (response.GetType() == typeof(DeleteResult[]) && response.Length > 0) | ||
Results = response.Cast<DeleteResult>().Select(x => new ResultDetail | ||
{ | ||
StatusCode = x.StatusCode, | ||
StatusMessage = x.StatusMessage, | ||
Object = (x.Object != null ? (objs.GetType().ToString().Contains("ET_") ? TranslateObject2(x.Object) : TranslateObject(x.Object)) : null), | ||
OrdinalID = x.OrdinalID, | ||
ErrorCode = x.ErrorCode, | ||
}).ToArray(); | ||
else | ||
Results = new ResultDetail[0]; | ||
} | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="T:FuelSDK.DeleteReturn"/> class. | ||
/// </summary> | ||
/// <exception cref="System.ArgumentNullException"> | ||
/// <param name="obj">FuelObject</param> | ||
public DeleteReturn(FuelObject obj) | ||
{ | ||
if (obj == null) | ||
throw new ArgumentNullException("obj"); | ||
ExecuteFuel(obj, obj.URLProperties, "DELETE", false); | ||
} | ||
} | ||
} |
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,40 @@ | ||
using System; | ||
namespace FuelSDK | ||
{ | ||
/// <summary> | ||
/// Contains SMTP and other information pertaining to the specific event of an email message bounce. | ||
/// </summary> | ||
public class ETBounceEvent : BounceEvent | ||
{ | ||
/// <summary> | ||
/// Gets or sets a value indicating whether this <see cref="T:FuelSDK.ETBounceEvent"/> get since last batch. | ||
/// </summary> | ||
/// <value><c>true</c> if get since last batch; otherwise, <c>false</c>.</value> | ||
public bool GetSinceLastBatch { get; set; } | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="T:FuelSDK.ETBounceEvent"/> class and set get since last batch to false. | ||
/// </summary> | ||
public ETBounceEvent() { GetSinceLastBatch = true; } | ||
/// <summary> | ||
/// Get <see cref="T:FuelSDK.GetReturn"/> object after initializaing LastRequestID. | ||
/// </summary> | ||
/// <returns>The <see cref="T:FuelSDK.GetReturn"/> object</returns> | ||
public GetReturn Get() { var r = new GetReturn(this); LastRequestID = r.RequestID; return r; } | ||
/// <summary> | ||
/// Gets more results. | ||
/// </summary> | ||
/// <returns><see cref="T:FuelSDK.GetReturn"/> object</returns> | ||
public GetReturn GetMoreResults() { var r = new GetReturn(this, true, null); LastRequestID = r.RequestID; return r; } | ||
/// <summary> | ||
/// Returns the <see cref="T:FuelSDK.InfoReturn"/> object. | ||
/// </summary> | ||
/// <returns><see cref="T:FuelSDK.InfoReturn"/> object</returns> | ||
public InfoReturn Info() { return new InfoReturn(this); } | ||
} | ||
|
||
[Obsolete("ET_BounceEvent will be removed in future release. Please use ETBounceEvent instead.")] | ||
public class ET_BounceEvent : ETBounceEvent | ||
{ | ||
|
||
} | ||
} |
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,96 @@ | ||
using System; | ||
using Newtonsoft.Json.Linq; | ||
|
||
namespace FuelSDK | ||
{ | ||
/// <summary> | ||
/// Represents a program in an account | ||
/// </summary> | ||
public class ETCampaign : FuelObject | ||
{ | ||
/// <summary> | ||
/// Gets or sets the name of the campaign. | ||
/// </summary> | ||
/// <value>The name.</value> | ||
public string Name { get; set; } | ||
/// <summary> | ||
/// Gets or sets the description of the campaign. | ||
/// </summary> | ||
/// <value>The description.</value> | ||
public string Description { get; set; } | ||
/// <summary> | ||
/// Gets or sets the campaign code of the campaign. | ||
/// </summary> | ||
/// <value>The campaign code.</value> | ||
public string CampaignCode { get; set; } | ||
/// <summary> | ||
/// Gets or sets the color of the campaign. | ||
/// </summary> | ||
/// <value>The color.</value> | ||
public string Color { get; set; } | ||
/// <summary> | ||
/// Gets or sets the if the campaign is flagged as favorite. | ||
/// </summary> | ||
/// <value>The favorite flag.</value> | ||
public bool? Favorite { get; set; } | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="T:FuelSDK.ETCampaign"/> class. | ||
/// </summary> | ||
public ETCampaign() | ||
{ | ||
Endpoint = "https://www.exacttargetapis.com/hub/v1/campaigns/{ID}"; | ||
URLProperties = new[] { "ID" }; | ||
RequiredURLProperties = new string[0]; | ||
} | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="T:FuelSDK.ETCampaign"/> class. | ||
/// </summary> | ||
/// <param name="obj">Javascript object.</param> | ||
public ETCampaign(JObject obj) | ||
{ | ||
if (obj["id"] != null) | ||
ID = int.Parse(CleanRestValue(obj["id"])); | ||
if (obj["createdDate"] != null) | ||
CreatedDate = DateTime.Parse(CleanRestValue(obj["createdDate"])); | ||
if (obj["modifiedDate"] != null) | ||
ModifiedDate = DateTime.Parse(CleanRestValue(obj["modifiedDate"])); | ||
if (obj["name"] != null) | ||
Name = CleanRestValue(obj["name"]); | ||
if (obj["description"] != null) | ||
Description = CleanRestValue(obj["description"]); | ||
if (obj["campaignCode"] != null) | ||
CampaignCode = CleanRestValue(obj["campaignCode"]); | ||
if (obj["color"] != null) | ||
Color = CleanRestValue(obj["color"]); | ||
if (obj["favorite"] != null) | ||
Favorite = bool.Parse(CleanRestValue(obj["favorite"])); | ||
} | ||
/// <summary> | ||
/// Post this instance. | ||
/// </summary> | ||
/// <returns>The <see cref="T:FuelSDK.PostReturn"/>.</returns> | ||
public PostReturn Post() { return new PostReturn(this); } | ||
/// <summary> | ||
/// Delete this instance. | ||
/// </summary> | ||
/// <returns>The <see cref="T:FuelSDK.DeleteReturn"/>.</returns> | ||
public DeleteReturn Delete() { return new DeleteReturn(this); } | ||
/// <summary> | ||
/// Get this instance. | ||
/// </summary> | ||
/// <returns>The <see cref="T:FuelSDK.GetReturn"/>.</returns> | ||
public GetReturn Get() { var r = new GetReturn(this); Page = r.LastPageNumber; return r; } | ||
/// <summary> | ||
/// Gets more results. | ||
/// </summary> | ||
/// <returns>The <see cref="T:FuelSDK.GetReturn"/>.</returns> | ||
public GetReturn GetMoreResults() { Page++; var r = new GetReturn(this); Page = r.LastPageNumber; return r; } | ||
} | ||
|
||
[Obsolete("ET_Campaign will be removed in future release. Please use ETCampaign instead.")] | ||
public class ET_Campaign : ETCampaign | ||
{ | ||
public ET_Campaign() : base() {} | ||
public ET_Campaign(JObject obj) : base(obj) { } | ||
} | ||
} |
Oops, something went wrong.