Skip to content

Commit 2f0ad50

Browse files
authored
Bug fix for legalEntityRetrivalRequest (#15)
* commit changes * Commit test validation
1 parent a3b5c99 commit 2f0ad50

File tree

4 files changed

+55
-25
lines changed

4 files changed

+55
-25
lines changed

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
CHANGELOG
22
---------
3+
## 15.0.1
4+
* **Bug Fix** Fix for returning principal list in legalEntityRetrievalResponse.
5+
36
## 15.0.0
47
* **Feature Support for Payfac MP API version 15.0**
58
Complex element -pciLevel of type pciLevelScore added in legalEntityCreateRequest
@@ -12,7 +15,6 @@ revenueBoost of type subMerchantRevenueBoostFeature
1215
subMerchantRevenueBoostFeature of type boolean with enabled would be True/false
1316
complianceProducts contain elements with their type:code of type complianceProductCode,name of type string,active of type boolean,activation of type date ,deActivation of type date,complianceStatus of type string,complianceStatusDate of type date
1417

15-
1618
## 14.0.1
1719
* **Bug Fix** Fix for recursive language call.
1820

PayFacMpSDK/PayFacMpSDK/Generated.cs

Lines changed: 36 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3353,7 +3353,7 @@ public string[] errors
33533353
[System.ComponentModel.DesignerCategoryAttribute("code")]
33543354
[System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://payfac.vantivcnp.com/api/merchant/onboard")]
33553355
[System.Xml.Serialization.XmlRootAttribute(Namespace = "http://payfac.vantivcnp.com/api/merchant/onboard", IsNullable = false)]
3356-
public partial class legalEntityCreateRequest
3356+
public partial class legalEntityCreateRequestBase
33573357
{
33583358

33593359
private string legalEntityNameField;
@@ -3374,8 +3374,6 @@ public partial class legalEntityCreateRequest
33743374

33753375
private address addressField;
33763376

3377-
private legalEntityPrincipal principalField;
3378-
33793377
private string yearsInBusinessField;
33803378

33813379
private pciLevelScore pciLevelField;
@@ -3501,19 +3499,6 @@ public address address
35013499
}
35023500
}
35033501

3504-
/// <remarks/>
3505-
public legalEntityPrincipal principal
3506-
{
3507-
get
3508-
{
3509-
return this.principalField;
3510-
}
3511-
set
3512-
{
3513-
this.principalField = value;
3514-
}
3515-
}
3516-
35173502
/// <remarks/>
35183503
public string yearsInBusiness
35193504
{
@@ -3552,17 +3537,17 @@ public string language
35523537

35533538
}
35543539
}
3555-
3540+
35563541
public pciLevelScore pciLevel
35573542
{
35583543
get
35593544
{
35603545
return this.pciLevelField;
35613546
}
35623547
set
3563-
{
3564-
this.pciLevelField = value;
3565-
this.pciLevelIntValue = (int)value;
3548+
{
3549+
this.pciLevelField = value;
3550+
this.pciLevelIntValue = (int)value;
35663551
}
35673552
}
35683553
[System.Xml.Serialization.XmlIgnore]
@@ -3579,6 +3564,33 @@ public int? pciLevelIntValue
35793564
}
35803565
}
35813566

3567+
/// <remarks/>
3568+
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")]
3569+
[System.SerializableAttribute()]
3570+
[System.Diagnostics.DebuggerStepThroughAttribute()]
3571+
[System.ComponentModel.DesignerCategoryAttribute("code")]
3572+
[System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://payfac.vantivcnp.com/api/merchant/onboard")]
3573+
[System.Xml.Serialization.XmlRootAttribute(Namespace = "http://payfac.vantivcnp.com/api/merchant/onboard", IsNullable = false)]
3574+
public partial class legalEntityCreateRequest : legalEntityCreateRequestBase
3575+
{
3576+
private legalEntityPrincipal principalField;
3577+
3578+
3579+
/// <remarks/>
3580+
public legalEntityPrincipal principal
3581+
{
3582+
get
3583+
{
3584+
return this.principalField;
3585+
}
3586+
set
3587+
{
3588+
this.principalField = value;
3589+
}
3590+
}
3591+
3592+
}
3593+
35823594
/// <remarks/>
35833595
[System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.6.1055.0")]
35843596
[System.SerializableAttribute()]
@@ -3864,10 +3876,10 @@ public bool duplicateSpecified
38643876
[System.ComponentModel.DesignerCategoryAttribute("code")]
38653877
[System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://payfac.vantivcnp.com/api/merchant/onboard")]
38663878
[System.Xml.Serialization.XmlRootAttribute(Namespace = "http://payfac.vantivcnp.com/api/merchant/onboard", IsNullable = false)]
3867-
public partial class legalEntityRetrievalResponse : legalEntityCreateRequest
3879+
public partial class legalEntityRetrievalResponse : legalEntityCreateRequestBase
38683880
{
38693881

3870-
private legalEntityPrincipal legalEntityPrincipalField;
3882+
private legalEntityPrincipal[] legalEntityPrincipalField;
38713883

38723884
private string legalEntityIdField;
38733885

@@ -3896,7 +3908,8 @@ public partial class legalEntityRetrievalResponse : legalEntityCreateRequest
38963908
private string overallStatusField;
38973909

38983910
/// <remarks/>
3899-
public legalEntityPrincipal legalEntityPrincipal
3911+
[XmlElement("principal")]
3912+
public legalEntityPrincipal[] principal
39003913
{
39013914
get
39023915
{

PayFacMpSDK/PayFacMpSDK/Versions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ namespace PayFacMpSDK
22
{
33
public class Versions
44
{
5-
public static string SDK_VERSION = "15.0.0";
5+
public static string SDK_VERSION = "15.0.1";
66
public static string LANGUAGE = "dotnet";
77
}
88
}

PayFacMpSDK/PayFacMpSDKTest/Functional/TestLegalEntityRetrievalRequest.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,23 @@ public void TestGetLegalEntityRetrievalRequestSimple()
2626
Assert.AreEqual(legalEntitytId, response.legalEntityId);
2727
Assert.AreEqual(10, response.responseCode);
2828
Assert.AreEqual("Approved", response.responseDescription);
29+
//Testing the first principal
30+
Assert.AreEqual(1, response.principal[0].principalId);
31+
//Testing the second principal that is not present in the response
32+
Assert.Throws<IndexOutOfRangeException>(() => { var _ = response.principal[1].principalId; });
2933
}
3034

35+
[Test]
36+
public void TestGetLegalEntityRetrievalRequestPrincipleCheck()
37+
{
38+
legalEntitytId = "201008";
39+
legalEntityRetrievalResponse response = new LegalEntityRetrievalRequest().GetLegalEntityRequest(legalEntitytId);
40+
Assert.AreEqual(legalEntitytId, response.legalEntityId);
41+
Assert.AreEqual(1, response.principal[0].principalId);
42+
Assert.AreEqual(2, response.principal[1].principalId);
43+
Assert.AreEqual(10, response.responseCode);
44+
Assert.AreEqual("Approved", response.responseDescription);
45+
}
3146

3247
[Test]
3348
public void TestGetLegalEntityRetrievalRequestManualReview()

0 commit comments

Comments
 (0)