Skip to content

Commit a90aaf9

Browse files
committed
Adding new apis and updating schema
1 parent e1ecea1 commit a90aaf9

36 files changed

+1101
-245
lines changed

Authorize.NET/Api/Contracts/V1/AnetApiSchema.generated.cs

Lines changed: 92 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//------------------------------------------------------------------------------
22
// <auto-generated>
33
// This code was generated by a tool.
4-
// Runtime Version:2.0.50727.5483
4+
// Runtime Version:2.0.50727.5485
55
//
66
// Changes to this file may cause incorrect behavior and will be lost if
77
// the code is regenerated.
@@ -231,6 +231,13 @@ public partial class creditCardSimpleType : object, System.ComponentModel.INotif
231231
/// <remarks/>
232232
public string expirationDate;
233233

234+
/// <remarks/>
235+
public bool paymentToken;
236+
237+
/// <remarks/>
238+
[System.Xml.Serialization.XmlIgnoreAttribute()]
239+
public bool paymentTokenSpecified;
240+
234241
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
235242

236243
protected void RaisePropertyChanged(string propertyName) {
@@ -338,7 +345,7 @@ public partial class SubscriptionDetail : object, System.ComponentModel.INotifyP
338345
public decimal amount;
339346

340347
/// <remarks/>
341-
public int currencyId;
348+
public string currencyCode;
342349

343350
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
344351

@@ -668,6 +675,38 @@ protected void RaisePropertyChanged(string propertyName) {
668675
}
669676
}
670677

678+
/// <remarks/>
679+
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")]
680+
[System.SerializableAttribute()]
681+
[System.Diagnostics.DebuggerStepThroughAttribute()]
682+
[System.ComponentModel.DesignerCategoryAttribute("code")]
683+
[System.Xml.Serialization.XmlTypeAttribute(Namespace="AnetApi/xml/v1/schema/AnetApiSchema.xsd")]
684+
public partial class createProfileResponse : object, System.ComponentModel.INotifyPropertyChanged {
685+
686+
/// <remarks/>
687+
public messagesType messages;
688+
689+
/// <remarks/>
690+
public string customerProfileId;
691+
692+
/// <remarks/>
693+
[System.Xml.Serialization.XmlArrayItemAttribute("numericString", IsNullable=false)]
694+
public string[] customerPaymentProfileIdList;
695+
696+
/// <remarks/>
697+
[System.Xml.Serialization.XmlArrayItemAttribute("numericString", IsNullable=false)]
698+
public string[] customerShippingAddressIdList;
699+
700+
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
701+
702+
protected void RaisePropertyChanged(string propertyName) {
703+
System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
704+
if ((propertyChanged != null)) {
705+
propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
706+
}
707+
}
708+
}
709+
671710
/// <remarks/>
672711
[System.Xml.Serialization.XmlIncludeAttribute(typeof(emailSettingsType))]
673712
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")]
@@ -813,6 +852,13 @@ protected void RaisePropertyChanged(string propertyName) {
813852
[System.Xml.Serialization.XmlTypeAttribute(Namespace="AnetApi/xml/v1/schema/AnetApiSchema.xsd")]
814853
public partial class customerProfilePaymentType : object, System.ComponentModel.INotifyPropertyChanged {
815854

855+
/// <remarks/>
856+
public bool createProfile;
857+
858+
/// <remarks/>
859+
[System.Xml.Serialization.XmlIgnoreAttribute()]
860+
public bool createProfileSpecified;
861+
816862
/// <remarks/>
817863
public string customerProfileId;
818864

@@ -859,6 +905,9 @@ public partial class transactionRequestType : object, System.ComponentModel.INot
859905
/// <remarks/>
860906
public customerProfilePaymentType profile;
861907

908+
/// <remarks/>
909+
public solutionType solution;
910+
862911
/// <remarks/>
863912
public string authCode;
864913

@@ -1283,6 +1332,30 @@ public enum ItemChoiceType1 {
12831332
track2,
12841333
}
12851334

1335+
/// <remarks/>
1336+
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")]
1337+
[System.SerializableAttribute()]
1338+
[System.Diagnostics.DebuggerStepThroughAttribute()]
1339+
[System.ComponentModel.DesignerCategoryAttribute("code")]
1340+
[System.Xml.Serialization.XmlTypeAttribute(Namespace="AnetApi/xml/v1/schema/AnetApiSchema.xsd")]
1341+
public partial class solutionType : object, System.ComponentModel.INotifyPropertyChanged {
1342+
1343+
/// <remarks/>
1344+
public string id;
1345+
1346+
/// <remarks/>
1347+
public string name;
1348+
1349+
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
1350+
1351+
protected void RaisePropertyChanged(string propertyName) {
1352+
System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
1353+
if ((propertyChanged != null)) {
1354+
propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
1355+
}
1356+
}
1357+
}
1358+
12861359
/// <remarks/>
12871360
[System.Xml.Serialization.XmlIncludeAttribute(typeof(orderExType))]
12881361
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")]
@@ -1590,30 +1663,6 @@ protected void RaisePropertyChanged(string propertyName) {
15901663
}
15911664
}
15921665

1593-
/// <remarks/>
1594-
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")]
1595-
[System.SerializableAttribute()]
1596-
[System.Diagnostics.DebuggerStepThroughAttribute()]
1597-
[System.ComponentModel.DesignerCategoryAttribute("code")]
1598-
[System.Xml.Serialization.XmlTypeAttribute(Namespace="AnetApi/xml/v1/schema/AnetApiSchema.xsd")]
1599-
public partial class solutionType : object, System.ComponentModel.INotifyPropertyChanged {
1600-
1601-
/// <remarks/>
1602-
public string id;
1603-
1604-
/// <remarks/>
1605-
public string name;
1606-
1607-
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
1608-
1609-
protected void RaisePropertyChanged(string propertyName) {
1610-
System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
1611-
if ((propertyChanged != null)) {
1612-
propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
1613-
}
1614-
}
1615-
}
1616-
16171666
/// <remarks/>
16181667
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")]
16191668
[System.SerializableAttribute()]
@@ -3364,6 +3413,19 @@ public partial class createCustomerShippingAddressResponse : ANetApiResponse {
33643413
public string customerAddressId;
33653414
}
33663415

3416+
/// <remarks/>
3417+
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")]
3418+
[System.SerializableAttribute()]
3419+
[System.Diagnostics.DebuggerStepThroughAttribute()]
3420+
[System.ComponentModel.DesignerCategoryAttribute("code")]
3421+
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="AnetApi/xml/v1/schema/AnetApiSchema.xsd")]
3422+
[System.Xml.Serialization.XmlRootAttribute(Namespace="AnetApi/xml/v1/schema/AnetApiSchema.xsd", IsNullable=false)]
3423+
public partial class createCustomerProfileFromTransactionRequest : ANetApiRequest {
3424+
3425+
/// <remarks/>
3426+
public string transId;
3427+
}
3428+
33673429
/// <remarks/>
33683430
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.3038")]
33693431
[System.SerializableAttribute()]
@@ -3823,6 +3885,9 @@ public partial class createTransactionResponse : ANetApiResponse {
38233885

38243886
/// <remarks/>
38253887
public transactionResponse transactionResponse;
3888+
3889+
/// <remarks/>
3890+
public createProfileResponse profileResponse;
38263891
}
38273892

38283893
/// <remarks/>
@@ -4145,7 +4210,7 @@ public partial class ARBGetSubscriptionListResponse : ANetApiResponse {
41454210
[System.ComponentModel.DesignerCategoryAttribute("code")]
41464211
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true, Namespace="AnetApi/xml/v1/schema/AnetApiSchema.xsd")]
41474212
[System.Xml.Serialization.XmlRootAttribute(Namespace="AnetApi/xml/v1/schema/AnetApiSchema.xsd", IsNullable=false)]
4148-
public partial class XXDoNotUseDummyRequest : object, System.ComponentModel.INotifyPropertyChanged {
4213+
public partial class EnumCollection : object, System.ComponentModel.INotifyPropertyChanged {
41494214

41504215
/// <remarks/>
41514216
public customerProfileSummaryType customerProfileSummaryType;
@@ -4460,8 +4525,5 @@ public enum transactionTypeEnum {
44604525

44614526
/// <remarks/>
44624527
authCaptureContinueTransaction,
4463-
4464-
/// <remarks/>
4465-
unknown,
44664528
}
44674529
}

Authorize.NET/Api/Contracts/V1/RequestFactoryWithSpecified.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,15 @@ public static void ARBGetSubscriptionListRequest(ARBGetSubscriptionListRequest r
533533

534534
public static void createFingerPrintRequest(createFingerPrintRequest request) { }
535535

536-
public static void EnumCollection(XXDoNotUseDummyRequest enumCollectionRequest)
536+
public static void authenticateTestType(authenticateTestRequest request) { }
537+
538+
public static void isAliveType(isAliveRequest request) { }
539+
540+
public static void isAliveType(ANetApiRequest request) { }
541+
542+
public static void logoutType(logoutRequest request) { }
543+
544+
public static void EnumCollection(EnumCollection enumCollectionRequest)
537545
{
538546
if (null != enumCollectionRequest)
539547
{

Authorize.NET/Api/Controllers/Bases/ApiOperationBase.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ protected ApiOperationBase(TQ apiRequest)
4848
SetApiRequest(apiRequest);
4949

5050
Logger.debug(string.Format("Creating instance for request:'{0}' and response:'{1}'", _requestClass, _responseClass));
51-
Logger.debug(string.Format("Request:'{0}'", apiRequest));
52-
Logger.debug(string.Format("Request:'{0}'", XmlUtility.GetXml(apiRequest)));
51+
//Logger.debug(string.Format("Request:'{0}'", apiRequest));
52+
//Logger.debug(string.Format("Request(Ctor):'{0}'", XmlUtility.GetXml(apiRequest)));
5353
Validate();
5454
}
5555

@@ -87,13 +87,13 @@ public TS ExecuteWithApiResponse(AuthorizeNet.Environment environment = null)
8787

8888
public void Execute(AuthorizeNet.Environment environment = null)
8989
{
90-
Logger.debug(string.Format(CultureInfo.InvariantCulture, "Executing Request:'{0}'", GetApiRequest()));
90+
BeforeExecute();
91+
92+
Logger.debug(string.Format(CultureInfo.InvariantCulture, "Executing Request:'{0}'", XmlUtility.GetXml(GetApiRequest())));
9193

9294
if (null == environment) { environment = ApiOperationBase<ANetApiRequest, ANetApiResponse>.RunEnvironment; }
9395
if (null == environment) throw new ArgumentException(NullEnvironmentErrorMessage);
9496

95-
BeforeExecute();
96-
9797
var httpApiResponse = HttpUtility.PostData<TQ, TS>(environment, GetApiRequest());
9898

9999
if (null != httpApiResponse)
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
namespace AuthorizeNet.Api.Controllers
2+
{
3+
using System;
4+
using AuthorizeNet.Api.Contracts.V1;
5+
using AuthorizeNet.Api.Controllers.Bases;
6+
7+
#pragma warning disable 1591
8+
public class authenticateTestController : ApiOperationBase<authenticateTestRequest, authenticateTestResponse> {
9+
10+
public authenticateTestController(authenticateTestRequest apiRequest) : base(apiRequest) {
11+
}
12+
13+
override protected void ValidateRequest() {
14+
var request = GetApiRequest();
15+
16+
//validate required fields
17+
//if ( 0 == request.) throw new ArgumentException( "SearchType cannot be null");
18+
//if ( null == request.Paging) throw new ArgumentException("Paging cannot be null");
19+
20+
//validate not-required fields
21+
}
22+
23+
protected override void BeforeExecute()
24+
{
25+
var request = GetApiRequest();
26+
RequestFactoryWithSpecified.authenticateTestType(request);
27+
}
28+
}
29+
#pragma warning restore 1591
30+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
namespace AuthorizeNet.Api.Controllers
2+
{
3+
using System;
4+
using AuthorizeNet.Api.Contracts.V1;
5+
using AuthorizeNet.Api.Controllers.Bases;
6+
7+
#pragma warning disable 1591
8+
public class createCustomerProfileFromTransactionController : ApiOperationBase<createCustomerProfileFromTransactionRequest, createCustomerProfileResponse>
9+
{
10+
11+
public createCustomerProfileFromTransactionController(createCustomerProfileFromTransactionRequest apiRequest)
12+
: base(apiRequest)
13+
{
14+
}
15+
16+
override protected void ValidateRequest() {
17+
var request = GetApiRequest();
18+
19+
//validate required fields
20+
if (null == request.transId) throw new ArgumentException("transactionId cannot be null");
21+
22+
//validate not-required fields
23+
}
24+
}
25+
#pragma warning restore 1591
26+
}

Authorize.NET/Api/Controllers/createCustomerProfileTransactionController.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ override protected void ValidateRequest() {
1414
var request = GetApiRequest();
1515

1616
//validate required fields
17-
//if ( 0 == request.SearchType) throw new ArgumentException( "SearchType cannot be null");
18-
//if ( null == request.Paging) throw new ArgumentException("Paging cannot be null");
17+
if (null == request.transaction) throw new ArgumentException("transaction cannot be null");
1918

2019
//validate not-required fields
2120
}

Authorize.NET/Api/Controllers/createFingerPrintController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ override protected void ValidateRequest() {
1515

1616
//validate required fields
1717
//if ( 0 == request.SearchType) throw new ArgumentException( "SearchType cannot be null");
18-
//if ( null == request.Paging) throw new ArgumentException("Paging cannot be null");
18+
if (null == request.supportInformation) throw new ArgumentException("supportInformation cannot be null");
1919

2020
//validate not-required fields
2121
}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
namespace AuthorizeNet.Api.Controllers
2+
{
3+
using System;
4+
using AuthorizeNet.Api.Contracts.V1;
5+
using AuthorizeNet.Api.Controllers.Bases;
6+
7+
#pragma warning disable 1591
8+
public class createProfileController
9+
//: ApiOperationBase<createProfileRequest, createProfileResponse>
10+
{
11+
12+
public createProfileController(customerProfilePaymentType apiRequest)// : base(apiRequest)
13+
{
14+
}
15+
16+
//override
17+
protected void ValidateRequest() {
18+
//var request = GetApiRequest();
19+
20+
//validate required fields
21+
//if ( 0 == request.SearchType) throw new ArgumentException( "SearchType cannot be null");
22+
//if ( null == request.Paging) throw new ArgumentException("Paging cannot be null");
23+
24+
//validate not-required fields
25+
}
26+
27+
//protected override void BeforeExecute()
28+
protected void BeforeExecute()
29+
{
30+
//var request = GetApiRequest();
31+
//RequestFactoryWithSpecified.createProfileType(request);
32+
}
33+
}
34+
#pragma warning restore 1591
35+
}

0 commit comments

Comments
 (0)