-
Notifications
You must be signed in to change notification settings - Fork 15
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
1 parent
74b8d19
commit bb06ba5
Showing
153 changed files
with
23,617 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 2013 | ||
VisualStudioVersion = 12.0.31101.0 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Paysafe", "Paysafe\Paysafe.csproj", "{1AA4F97B-967A-4420-B3CC-EF1EFBAA72F8}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PaysafeTests", "tests\PaysafeTests.csproj", "{5FCF0A84-E497-46AC-9058-CC79E6FEB872}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleApp", "SampleApp\SampleApp.csproj", "{A98AFF11-EA57-4475-9A27-7DB43053BA3F}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{1AA4F97B-967A-4420-B3CC-EF1EFBAA72F8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{1AA4F97B-967A-4420-B3CC-EF1EFBAA72F8}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{1AA4F97B-967A-4420-B3CC-EF1EFBAA72F8}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{1AA4F97B-967A-4420-B3CC-EF1EFBAA72F8}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{5FCF0A84-E497-46AC-9058-CC79E6FEB872}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{5FCF0A84-E497-46AC-9058-CC79E6FEB872}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{5FCF0A84-E497-46AC-9058-CC79E6FEB872}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{5FCF0A84-E497-46AC-9058-CC79E6FEB872}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{A98AFF11-EA57-4475-9A27-7DB43053BA3F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{A98AFF11-EA57-4475-9A27-7DB43053BA3F}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{A98AFF11-EA57-4475-9A27-7DB43053BA3F}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{A98AFF11-EA57-4475-9A27-7DB43053BA3F}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
EndGlobal |
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,182 @@ | ||
/* | ||
* Copyright (c) 2014 Optimal Payments | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and | ||
* associated documentation files (the "Software"), to deal in the Software without restriction, | ||
* including without limitation the rights to use, copy, modify, merge, publish, distribute, | ||
* sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is | ||
* furnished to do so, subject to the following conditions: | ||
* | ||
* The above copyright notice and this permission notice shall be included in all copies or | ||
* substantial portions of the Software. | ||
* | ||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT | ||
* NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, | ||
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
*/ | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using Paysafe.Common; | ||
|
||
namespace Paysafe.CardPayments | ||
{ | ||
public class AccordD : JSONObject | ||
{ | ||
/// <summary> | ||
/// Initialize the AccordD object with some set of properties | ||
/// </summary> | ||
/// <param name="properties">Dictionary<string, object></param> | ||
public AccordD(Dictionary<string, object> properties = null) | ||
: base(fieldTypes, properties) | ||
{ | ||
} | ||
|
||
private static new Dictionary<string, object> fieldTypes = new Dictionary<string, object> | ||
{ | ||
{CardPaymentsConstants.financingType, CardPaymentsConstants.enumFinancingType}, | ||
{CardPaymentsConstants.plan, STRING_TYPE}, | ||
{CardPaymentsConstants.gracePeriod, INT_TYPE}, | ||
{CardPaymentsConstants.term, INT_TYPE} | ||
}; | ||
|
||
/// <summary> | ||
/// Get the financingType | ||
/// </summary> | ||
/// <returns>string</returns> | ||
public string financingType() | ||
{ | ||
return this.getProperty(CardPaymentsConstants.financingType); | ||
} | ||
|
||
/// <summary> | ||
/// Set the financingType | ||
/// </summary> | ||
/// <returns>void</returns> | ||
public void financingType(string data) | ||
{ | ||
this.setProperty(CardPaymentsConstants.financingType, data); | ||
} | ||
|
||
/// <summary> | ||
/// Get the plan | ||
/// </summary> | ||
/// <returns>string</returns> | ||
public string plan() | ||
{ | ||
return this.getProperty(CardPaymentsConstants.plan); | ||
} | ||
|
||
/// <summary> | ||
/// Set the plan | ||
/// </summary> | ||
/// <returns>void</returns> | ||
public void plan(string data) | ||
{ | ||
this.setProperty(CardPaymentsConstants.plan, data); | ||
} | ||
|
||
/// <summary> | ||
/// Get the gracePeriod | ||
/// </summary> | ||
/// <returns>int</returns> | ||
public int gracePeriod() | ||
{ | ||
return this.getProperty(CardPaymentsConstants.gracePeriod); | ||
} | ||
|
||
/// <summary> | ||
/// Set the gracePeriod | ||
/// </summary> | ||
/// <returns>void</returns> | ||
public void gracePeriod(int data) | ||
{ | ||
this.setProperty(CardPaymentsConstants.gracePeriod, data); | ||
} | ||
|
||
/// <summary> | ||
/// Get the term | ||
/// </summary> | ||
/// <returns>int</returns> | ||
public int term() | ||
{ | ||
return this.getProperty(CardPaymentsConstants.term); | ||
} | ||
|
||
/// <summary> | ||
/// Set the term | ||
/// </summary> | ||
/// <returns>void</returns> | ||
public void term(int data) | ||
{ | ||
this.setProperty(CardPaymentsConstants.term, data); | ||
} | ||
|
||
/// <summary> | ||
/// AccordDBuilder<typeparam name="TBLDR"></typeparam> will allow a AccordD to be initialized | ||
/// within another builder. Set properties and subpropeties, then trigger .Done() to | ||
/// get back to the parent builder | ||
/// </summary> | ||
public class AccordDBuilder<TBLDR> : NestedJSONBuilder<AccordD, TBLDR> | ||
where TBLDR : GenericJSONBuilder | ||
{ | ||
/// <summary> | ||
/// Initialize the AccordD builder within the context of a parent builder | ||
/// </summary> | ||
/// <param name="parent">TBLDR</param> | ||
public AccordDBuilder(TBLDR parent) | ||
: base(parent) | ||
{ | ||
this.parent = parent; | ||
} | ||
|
||
/// <summary> | ||
/// Set the financingType | ||
/// </summary> | ||
/// <param name=data>string</param> | ||
/// <returns>AccordDBuilder<TBLDR></returns> | ||
public AccordDBuilder<TBLDR> financingType(string data) | ||
{ | ||
this.properties[CardPaymentsConstants.financingType] = data; | ||
return this; | ||
} | ||
|
||
/// <summary> | ||
/// Set the plan | ||
/// </summary> | ||
/// <param name=data>string</param> | ||
/// <returns>AccordDBuilder<TBLDR></returns> | ||
public AccordDBuilder<TBLDR> plan(string data) | ||
{ | ||
this.properties[CardPaymentsConstants.plan] = data; | ||
return this; | ||
} | ||
|
||
/// <summary> | ||
/// Set the gracePeriod | ||
/// </summary> | ||
/// <param name=data>int</param> | ||
/// <returns>AccordDBuilder<TBLDR></returns> | ||
public AccordDBuilder<TBLDR> gracePeriod(int data) | ||
{ | ||
this.properties[CardPaymentsConstants.gracePeriod] = data; | ||
return this; | ||
} | ||
|
||
/// <summary> | ||
/// Set the term | ||
/// </summary> | ||
/// <param name=data>int</param> | ||
/// <returns>AccordDBuilder<TBLDR></returns> | ||
public AccordDBuilder<TBLDR> term(int data) | ||
{ | ||
this.properties[CardPaymentsConstants.term] = data; | ||
return this; | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.