diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..150691a
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,217 @@
+## Ignore Visual Studio temporary files, build results, and
+## files generated by popular Visual Studio add-ons.
+
+# User-specific files
+*.suo
+*.user
+*.userosscache
+*.sln.docstates
+
+# User-specific files (MonoDevelop/Xamarin Studio)
+*.userprefs
+
+# Build results
+[Dd]ebug/
+[Dd]ebugPublic/
+[Rr]elease/
+[Rr]eleases/
+x64/
+x86/
+build/
+bld/
+[Bb]in/
+[Oo]bj/
+
+# Visual Studio 2015 cache/options directory
+.vs/
+# Uncomment if you have tasks that create the project's static files in wwwroot
+#wwwroot/
+
+# MSTest test Results
+[Tt]est[Rr]esult*/
+[Bb]uild[Ll]og.*
+
+# NUNIT
+*.VisualState.xml
+TestResult.xml
+
+# Build Results of an ATL Project
+[Dd]ebugPS/
+[Rr]eleasePS/
+dlldata.c
+
+# DNX
+project.lock.json
+artifacts/
+
+*_i.c
+*_p.c
+*_i.h
+*.ilk
+*.meta
+*.obj
+*.pch
+*.pdb
+*.pgc
+*.pgd
+*.rsp
+*.sbr
+*.tlb
+*.tli
+*.tlh
+*.tmp
+*.tmp_proj
+*.log
+*.vspscc
+*.vssscc
+.builds
+*.pidb
+*.svclog
+*.scc
+
+# Chutzpah Test files
+_Chutzpah*
+
+# Visual C++ cache files
+ipch/
+*.aps
+*.ncb
+*.opensdf
+*.sdf
+*.cachefile
+
+# Visual Studio profiler
+*.psess
+*.vsp
+*.vspx
+*.sap
+
+# TFS 2012 Local Workspace
+$tf/
+
+# Guidance Automation Toolkit
+*.gpState
+
+# ReSharper is a .NET coding add-in
+_ReSharper*/
+*.[Rr]e[Ss]harper
+*.DotSettings.user
+
+# JustCode is a .NET coding add-in
+.JustCode
+
+# TeamCity is a build add-in
+_TeamCity*
+
+# DotCover is a Code Coverage Tool
+*.dotCover
+
+# NCrunch
+_NCrunch_*
+.*crunch*.local.xml
+nCrunchTemp_*
+
+# MightyMoose
+*.mm.*
+AutoTest.Net/
+
+# Web workbench (sass)
+.sass-cache/
+
+# Installshield output folder
+[Ee]xpress/
+
+# DocProject is a documentation generator add-in
+DocProject/buildhelp/
+DocProject/Help/*.HxT
+DocProject/Help/*.HxC
+DocProject/Help/*.hhc
+DocProject/Help/*.hhk
+DocProject/Help/*.hhp
+DocProject/Help/Html2
+DocProject/Help/html
+
+# Click-Once directory
+publish/
+
+# Publish Web Output
+*.[Pp]ublish.xml
+*.azurePubxml
+# TODO: Comment the next line if you want to checkin your web deploy settings
+# but database connection strings (with potential passwords) will be unencrypted
+*.pubxml
+*.publishproj
+
+# NuGet Packages
+*.nupkg
+# The packages folder can be ignored because of Package Restore
+**/packages/*
+# except build/, which is used as an MSBuild target.
+!**/packages/build/
+# Uncomment if necessary however generally it will be regenerated when needed
+#!**/packages/repositories.config
+
+# Windows Azure Build Output
+csx/
+*.build.csdef
+
+# Windows Store app package directory
+AppPackages/
+
+# Visual Studio cache files
+# files ending in .cache can be ignored
+*.[Cc]ache
+# but keep track of directories ending in .cache
+!*.[Cc]ache/
+
+# Others
+ClientBin/
+[Ss]tyle[Cc]op.*
+~$*
+*~
+*.dbmdl
+*.dbproj.schemaview
+*.pfx
+*.publishsettings
+node_modules/
+orleans.codegen.cs
+
+# RIA/Silverlight projects
+Generated_Code/
+
+# Backup & report files from converting an old project file
+# to a newer Visual Studio version. Backup files are not needed,
+# because we have git ;-)
+_UpgradeReport_Files/
+Backup*/
+UpgradeLog*.XML
+UpgradeLog*.htm
+
+# SQL Server files
+*.mdf
+*.ldf
+
+# Business Intelligence projects
+*.rdl.data
+*.bim.layout
+*.bim_*.settings
+
+# Microsoft Fakes
+FakesAssemblies/
+
+# Node.js Tools for Visual Studio
+.ntvs_analysis.dat
+
+# Visual Studio 6 build log
+*.plg
+
+# Visual Studio 6 workspace options file
+*.opt
+
+# Visual Studio LightSwitch build output
+**/*.HTMLClient/GeneratedArtifacts
+**/*.DesktopClient/GeneratedArtifacts
+**/*.DesktopClient/ModelManifest.xml
+**/*.Server/GeneratedArtifacts
+**/*.Server/ModelManifest.xml
+_Pvt_Extensions
diff --git a/SNET.Core/HttpConnection.cs b/SNET.Core/HttpConnection.cs
index 215bad1..93e6ef7 100644
--- a/SNET.Core/HttpConnection.cs
+++ b/SNET.Core/HttpConnection.cs
@@ -28,7 +28,7 @@ public string Execute(string payLoad, HttpWebRequest httpRequest)
{
case "POST":
case "PUT":
- case "DELETE":
+ //case "DELETE":
using (StreamWriter streamWriter = new StreamWriter(((WebRequest)httpRequest).GetRequestStream()))
{
if (!string.IsNullOrEmpty(payLoad))
diff --git a/SecureNetRestApiSDK/Api/Models/Card.cs b/SecureNetRestApiSDK/Api/Models/Card.cs
index 3f8c1ea..ac1a545 100644
--- a/SecureNetRestApiSDK/Api/Models/Card.cs
+++ b/SecureNetRestApiSDK/Api/Models/Card.cs
@@ -22,6 +22,26 @@ public class Card
[JsonProperty("number")]
public String Number { get; set; }
+ ///
+ /// Masked Credit card account number.
+ ///
+ [JsonProperty("maskedNumber")]
+ public string MaskedNumber { get; set; }
+
+ ///
+ /// Credit Card Last 4 Digits
+ ///
+ [JsonProperty("lastFourDigits")]
+ public string LastFourDigits { get; set; }
+
+ ///
+ /// Credit Card Type
+ ///
+ [JsonProperty("creditCardType")]
+ public string CreditCardType { get; set; }
+
+
+
///
/// Card security code.
///
@@ -70,6 +90,8 @@ public class Card
[JsonProperty("signature")]
public byte[] Signature { get; set; }
+
+
#endregion
}
}
diff --git a/SecureNetRestApiSDK/Api/Models/StoredScheduledVariablePaymentPlan.cs b/SecureNetRestApiSDK/Api/Models/StoredScheduledVariablePaymentPlan.cs
index dce2c91..8630293 100644
--- a/SecureNetRestApiSDK/Api/Models/StoredScheduledVariablePaymentPlan.cs
+++ b/SecureNetRestApiSDK/Api/Models/StoredScheduledVariablePaymentPlan.cs
@@ -11,11 +11,25 @@ public class StoredScheduledVariablePaymentPlan
public int ScheduleId { get; set; }
[JsonProperty("paymentDate")]
- public DateTime PaymentDate { get; set; }
+ public DateTime? PaymentDate { get; set; }
[JsonProperty("amount")]
public decimal Amount { get; set; }
+ [JsonProperty("paid")]
+ public bool Paid { get; set; }
+
+ [JsonProperty("transactionId")]
+ public int TransactionId { get; set; }
+
+ [JsonProperty("processed")]
+ public string Processed { get; set; }
+
+ [JsonProperty("numberOfRetries")]
+ public int? NumberOfRetries { get; set; }
+
+ [JsonProperty("scheduledDate")]
+ public DateTime ScheduledDate { get; set; }
#endregion
}
}
diff --git a/SecureNetRestApiSDK/Api/Models/StoredVariablePaymentPlan.cs b/SecureNetRestApiSDK/Api/Models/StoredVariablePaymentPlan.cs
index 14fa7c7..110b257 100644
--- a/SecureNetRestApiSDK/Api/Models/StoredVariablePaymentPlan.cs
+++ b/SecureNetRestApiSDK/Api/Models/StoredVariablePaymentPlan.cs
@@ -1,5 +1,6 @@
using System;
using Newtonsoft.Json;
+using System.Collections.Generic;
namespace SecureNetRestApiSDK.Api.Models
{
@@ -11,7 +12,7 @@ public class StoredVariablePaymentPlan
public DateTime PlanStartDate { get; set; }
[JsonProperty("scheduledPayments")]
- public object ScheduledPayments { get; set; }
+ public List ScheduledPayments { get; set; }
[JsonProperty("maxRetries")]
public int MaxRetries { get; set; }
diff --git a/SecureNetRestApiSDK/Api/Models/VariablePaymentPlan.cs b/SecureNetRestApiSDK/Api/Models/VariablePaymentPlan.cs
index 500917c..48c2646 100644
--- a/SecureNetRestApiSDK/Api/Models/VariablePaymentPlan.cs
+++ b/SecureNetRestApiSDK/Api/Models/VariablePaymentPlan.cs
@@ -7,7 +7,7 @@ public class VariablePaymentPlan : StoredVariablePaymentPlan
{
#region Properties
- public DateTime PlanEndDate { get; set; }
+ public DateTime? PlanEndDate { get; set; }
public string PrimaryPaymentMethodId { get; set; }
public string SecondaryPaymentMethodId { get; set; }
public List UserDefinedFields { get; set; }
diff --git a/SecureNetRestApiSDK/Api/Requests/AddPaymentMethodRequest.cs b/SecureNetRestApiSDK/Api/Requests/AddPaymentMethodRequest.cs
index f7b0ed2..94e56bc 100644
--- a/SecureNetRestApiSDK/Api/Requests/AddPaymentMethodRequest.cs
+++ b/SecureNetRestApiSDK/Api/Requests/AddPaymentMethodRequest.cs
@@ -10,6 +10,7 @@ public class AddPaymentMethodRequest : SecureNetRequest
#region Properties
public string CustomerId { get; set; }
+ public Check Check { get; set; }
public Card Card { get; set; }
public string Phone { get; set; }
public string Notes { get; set; }
diff --git a/SecureNetRestApiSDK/Api/Requests/ChargeRequest.cs b/SecureNetRestApiSDK/Api/Requests/ChargeRequest.cs
index e1dea06..753228e 100644
--- a/SecureNetRestApiSDK/Api/Requests/ChargeRequest.cs
+++ b/SecureNetRestApiSDK/Api/Requests/ChargeRequest.cs
@@ -10,6 +10,7 @@ public class ChargeRequest : SecureNetRequest
{
#region Properties
+ public string CustomerId { get; set; }
///
/// Amount to charge the account.
///
diff --git a/SecureNetRestApiSDK/Api/Requests/TransactionRetrieveRequest.cs b/SecureNetRestApiSDK/Api/Requests/TransactionRetrieveRequest.cs
index 1189267..6660599 100644
--- a/SecureNetRestApiSDK/Api/Requests/TransactionRetrieveRequest.cs
+++ b/SecureNetRestApiSDK/Api/Requests/TransactionRetrieveRequest.cs
@@ -8,11 +8,11 @@ public class TransactionSearchRequest : SecureNetRequest
{
#region Properties
- public int TransactionId { get; set; }
+ //public int TransactionId { get; set; }
public string CustomerId { get; set; }
public DateTime StartDate { get; set; }
public DateTime EndDate { get; set; }
- public decimal Amount { get; set; }
+ // public decimal Amount { get; set; }
public DeveloperApplication DeveloperApplication { get; set; }
#endregion
@@ -21,12 +21,12 @@ public class TransactionSearchRequest : SecureNetRequest
public override string GetUri()
{
- return String.Format("api/transactions/{0}", TransactionId);
+ return "api/transactions/Search";
}
public override HttpMethodEnum GetMethod()
{
- return HttpMethodEnum.GET;
+ return HttpMethodEnum.POST;
}
#endregion
diff --git a/SecureNetRestApiSDK/Api/Requests/UpdatePaymentMethodRequest.cs b/SecureNetRestApiSDK/Api/Requests/UpdatePaymentMethodRequest.cs
index 6695ed5..88d1fb1 100644
--- a/SecureNetRestApiSDK/Api/Requests/UpdatePaymentMethodRequest.cs
+++ b/SecureNetRestApiSDK/Api/Requests/UpdatePaymentMethodRequest.cs
@@ -11,6 +11,7 @@ public class UpdatePaymentMethodRequest : SecureNetRequest
public string CustomerId { get; set; }
public string PaymentMethodId { get; set; }
+ public Check Check { get; set; }
public Card Card { get; set; }
public string Phone { get; set; }
public string Notes { get; set; }
diff --git a/SecureNetRestApiSDK/Api/Requests/VaultCustomerAndPaymentMethodRequest.cs b/SecureNetRestApiSDK/Api/Requests/VaultCustomerAndPaymentMethodRequest.cs
index 30f7958..3b34586 100644
--- a/SecureNetRestApiSDK/Api/Requests/VaultCustomerAndPaymentMethodRequest.cs
+++ b/SecureNetRestApiSDK/Api/Requests/VaultCustomerAndPaymentMethodRequest.cs
@@ -1,6 +1,7 @@
using System.Collections.Generic;
using SecureNetRestApiSDK.Api.Models;
using SNET.Core;
+using System;
namespace SecureNetRestApiSDK.Api.Requests
{
@@ -8,6 +9,8 @@ public class VaultCustomerAndPaymentMethodRequest : SecureNetRequest
{
#region Properties
+ public string CustomerId { get; set; }
+ public string PaymentMethodId { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public string PhoneNumber { get; set; }
@@ -18,6 +21,7 @@ public class VaultCustomerAndPaymentMethodRequest : SecureNetRequest
public string Notes { get; set; }
public List UserDefinedFields { get; set; }
public int CustomerDuplicateCheckIndicator { get; set; }
+ public Check Check { get; set; }
public Card Card { get; set; }
public string Phone { get; set; }
public bool Primary { get; set; }
@@ -30,6 +34,7 @@ public class VaultCustomerAndPaymentMethodRequest : SecureNetRequest
public override string GetUri()
{
+ //creates customer and payment method.
return "api/Customers/Payments";
}