Creditsafe API für GB-Kunden Bugfix

This commit is contained in:
2023-11-09 11:12:35 +01:00
parent 48b2ec5a99
commit 5bf500fe2b

View File

@@ -315,22 +315,6 @@ Public Class cCreditSafeAPI
Dim success As Boolean = json.Load(jsonRespString) Dim success As Boolean = json.Load(jsonRespString)
If (success <> True) Then Return "Verbindungsfehler" If (success <> True) Then Return "Verbindungsfehler"
'Aubbau JSON Object
' "report" {
' "companyIdentification" : {
' "basicInformation" : {
' "companyRegistrationDate" : "01.01.2022",
' "creditScore" : {
' "currentCreditRating" : {
' "commonValue" : "A",
' "providerValue" : {
' "value" : "350",
'....}
' "pdfReportStream": "base64"
'},
Dim reportObj As Chilkat.JsonObject = json.ObjectOf("report") Dim reportObj As Chilkat.JsonObject = json.ObjectOf("report")
If (json.LastMethodSuccess = True) Then If (json.LastMethodSuccess = True) Then
@@ -345,28 +329,32 @@ Public Class cCreditSafeAPI
Dim turnover As Chilkat.JsonObject = turnoverArray.ObjectAt(0) Dim turnover As Chilkat.JsonObject = turnoverArray.ObjectAt(0)
company.csTurnover = turnover.StringOf("range") & " (" & turnover.StringOf("year") & ")" company.csTurnover = turnover.StringOf("range") & " (" & turnover.StringOf("year") & ")"
Else Else
Debug.WriteLine("otherInformationObject object not found.") Debug.WriteLine("additionalInformationObject object not found.")
End If End If
End If End If
If (reportObj.LastMethodSuccess = True) And companyAddInformObj IsNot Nothing Then If (reportObj.LastMethodSuccess = True) And companyAddInformObj IsNot Nothing Then
Dim companyMiscObj As Chilkat.JsonObject = companyAddInformObj.ObjectOf("misc") Dim companyMiscObj As Chilkat.JsonObject = companyAddInformObj.ObjectOf("misc")
company.csBusinessPurpose = companyMiscObj.StringOf("businessPurpose") If companyMiscObj IsNot Nothing AndAlso companyMiscObj.LastMethodSuccess = True Then
If (companyAddInformObj.LastMethodSuccess = True) Then company.csBusinessPurpose = companyMiscObj.StringOf("businessPurpose")
Dim deCurrentRatingObj As Chilkat.JsonObject = companyMiscObj.ObjectOf("deCurrentRating") If (companyAddInformObj.LastMethodSuccess = True) Then
If (companyAddInformObj.LastMethodSuccess = True) And deCurrentRatingObj IsNot Nothing Then Dim deCurrentRatingObj As Chilkat.JsonObject = companyMiscObj.ObjectOf("deCurrentRating")
If (deCurrentRatingObj.LastMethodSuccess = True) Then If (companyAddInformObj.LastMethodSuccess = True) And deCurrentRatingObj IsNot Nothing Then
company.csIndex = deCurrentRatingObj.StringOf("value") If (deCurrentRatingObj.LastMethodSuccess = True) Then
Else company.csIndex = deCurrentRatingObj.StringOf("value")
Else
Debug.WriteLine("deCurrentRatingObj.value not found.")
End If
Debug.WriteLine("deCurrentRatingObj object not found.") Debug.WriteLine("deCurrentRatingObj object not found.")
End If End If
Debug.WriteLine("companyMiscObj object not found.") Debug.WriteLine("businessPurpose object not found.")
End If End If
Debug.WriteLine("companyAddInformObj object not found.") Debug.WriteLine("companyMiscObj object not found.")
End If End If
Debug.WriteLine("reportObj object not found.") Debug.WriteLine("reportObj object not found.")
End If End If
'End If 'End If