{"action":"opened","issue":{"url":"https://api.github.com/repos/Vantiv/payfac-mp-sdk-dotnet/issues/4","repository_url":"https://api.github.com/repos/Vantiv/payfac-mp-sdk-dotnet","labels_url":"https://api.github.com/repos/Vantiv/payfac-mp-sdk-dotnet/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/Vantiv/payfac-mp-sdk-dotnet/issues/4/comments","events_url":"https://api.github.com/repos/Vantiv/payfac-mp-sdk-dotnet/issues/4/events","html_url":"https://github.com/Vantiv/payfac-mp-sdk-dotnet/issues/4","id":546464368,"node_id":"MDU6SXNzdWU1NDY0NjQzNjg=","number":4,"title":"originalLegalEntityId is not properly serialized on legalEntityResponse","user":{"login":"bdunn313","id":867683,"node_id":"MDQ6VXNlcjg2NzY4Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/867683?v=4","gravatar_id":"","url":"https://api.github.com/users/bdunn313","html_url":"https://github.com/bdunn313","followers_url":"https://api.github.com/users/bdunn313/followers","following_url":"https://api.github.com/users/bdunn313/following{/other_user}","gists_url":"https://api.github.com/users/bdunn313/gists{/gist_id}","starred_url":"https://api.github.com/users/bdunn313/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdunn313/subscriptions","organizations_url":"https://api.github.com/users/bdunn313/orgs","repos_url":"https://api.github.com/users/bdunn313/repos","events_url":"https://api.github.com/users/bdunn313/events{/privacy}","received_events_url":"https://api.github.com/users/bdunn313/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2020-01-07T19:28:31Z","updated_at":"2020-01-07T19:28:31Z","closed_at":null,"author_association":"NONE","body":"When creating a legalEntity and a 200 success is received with an _originalLegalEntityId_ & _originalLegalEntityStatus_ in the response instead of a _legalEntityId_ or _legalEntityIdResponse_ then `legalEntityResponse.legalEntityId == null` and `legalEntityResponse.originallegalEntityId == null`.\r\n\r\nI would expect in the above scenario for `legalEntityId == null` but for `originallegalEntityId` to equal the originalLegalEntityId from the response XML.\r\n\r\nThis appears to be a serialization issue - the XML is cased with an upper-case \"Legal\" while the C# property is written with a lower-case \"legal\". This appears to also be the issue with originalLegalEntityStatus.\r\n\r\nI believe the following property needs to be changed, or extra code needs to be added to properly convert the raw XML into the properties listed above\r\nhttps://github.com/Vantiv/payfac-mp-sdk-dotnet/blob/13.x/PayFacMpSDK/PayFacMpSDK/Generated.cs#L3693\r\n\r\nExample request XML (preprod env url removed):\r\n```xml\r\n<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\r\n<legalEntityCreateRequest\r\n\txmlns=\"http://preprod-url\">\r\n\t<legalEntityName>Yarrgh Pirate Co.</legalEntityName>\r\n\t<legalEntityType>INDIVIDUAL_SOLE_PROPRIETORSHIP</legalEntityType>\r\n\t<legalEntityOwnershipType>PRIVATE</legalEntityOwnershipType>\r\n\t<doingBusinessAs>Jolly Roger Services</doingBusinessAs>\r\n\t<taxId>551351516</taxId>\r\n\t<contactPhone>5555555555</contactPhone>\r\n\t<annualCreditCardSalesVolume>0</annualCreditCardSalesVolume>\r\n\t<hasAcceptedCreditCards>false</hasAcceptedCreditCards>\r\n\t<address>\r\n\t\t<streetAddress1>2223 Executive Dr</streetAddress1>\r\n\t\t<streetAddress2>Suite 104</streetAddress2>\r\n\t\t<city>Detroit</city>\r\n\t\t<stateProvince>MI</stateProvince>\r\n\t\t<postalCode>48201</postalCode>\r\n\t\t<countryCode>USA</countryCode>\r\n\t</address>\r\n\t<principal>\r\n\t\t<firstName>Joeya</firstName>\r\n\t\t<lastName>Schmoeya</lastName>\r\n\t\t<emailAddress>joe2a@example.com</emailAddress>\r\n\t\t<ssn>111111113</ssn>\r\n\t\t<contactPhone>1111111111</contactPhone>\r\n\t\t<dateOfBirth>1982-01-31</dateOfBirth>\r\n\t\t<address>\r\n\t\t\t<streetAddress1>900 Chelmsford St</streetAddress1>\r\n\t\t\t<streetAddress2>Ste 5</streetAddress2>\r\n\t\t\t<city>Royal Oak</city>\r\n\t\t\t<stateProvince>MI</stateProvince>\r\n\t\t\t<postalCode>48067</postalCode>\r\n\t\t\t<countryCode>USA</countryCode>\r\n\t\t</address>\r\n\t\t<stakePercent>100</stakePercent>\r\n\t</principal>\r\n\t<yearsInBusiness>0</yearsInBusiness>\r\n</legalEntityCreateRequest>\r\n```\r\n\r\nExample response XML (preprod env url removed):\r\n```xml\r\n<legalEntityCreateResponse xmlns=\"http://preprod-url\" duplicate=\"true\">\r\n    <transactionId>83982920810924792</transactionId>\r\n    <originalLegalEntityId>83982920810690989</originalLegalEntityId>\r\n    <originalLegalEntityStatus>Approved</originalLegalEntityStatus>\r\n</legalEntityCreateResponse>\r\n```\r\n\r\nExample C# code to generate above XML (config removed):\r\n```cs\r\nvar request = new legalEntityCreateRequest\r\n{\r\n    legalEntityName = \"Yarrgh Pirate Co.\",\r\n    legalEntityType = legalEntityType.LIMITED_LIABILITY_COMPANY,\r\n    legalEntityOwnershipType = legalEntityOwnershipType.PRIVATE,\r\n    doingBusinessAs = \"Jolly Roger Services\",\r\n    taxId = \"551351516\",\r\n    contactPhone = \"5555555555\",\r\n    annualCreditCardSalesVolume = \"0\",\r\n    hasAcceptedCreditCards = false,\r\n    address =  new address()\r\n    {\r\n        streetAddress1 = \"2223 Executive Dr\",\r\n        city = \"Suite 104\",\r\n        stateProvince = \"Detroit\",\r\n        postalCode = \"48201\",\r\n        countryCode = \"USA\"\r\n    },\r\n    principal = new legalEntityPrincipal\r\n    {\r\n        firstName = \"Joeya\",\r\n        lastName = \"Schmoeya\",\r\n        emailAddress = \"joe2a@example.com\",\r\n        ssn = \"111111113\",\r\n        contactPhone = \"1111111111\",\r\n        dateOfBirth =  (new DateTime(1982, 1, 31)).Value,\r\n        address = new principalAddress()\r\n        {\r\n            streetAddress1 = \"900 Chelmsford St\",\r\n            streetAddress2 = \"Ste 5\",\r\n            city = \"Royal Oak\",\r\n            stateProvince = \"MI\",\r\n            postalCode = \"48067\",\r\n            countryCode = \"USA\"\r\n        },\r\n        stakePercent = 100\r\n    },\r\n    yearsInBusiness = \"0\",\r\n};\r\nif (respose.legalEntityId == null) {\r\n  Assert.True(response.orignallegalEntityId, null);\r\n  Assert.True(response.originallegalEntityStatus, null);\r\n}\r\n```\r\n\r\nPlease let me know if further info is needed."}}
{"actor":{"display_login":"bdunn313"}}