Hi I'm trying to create an object/array to add a "code" "HAZ" to the Accessorial class shown below.
I don't know how to create it to add the code. I've added the accessorial class to the primary wrapper but am uncertain if if should be added as "Public accessorials As New Accessorials"
or Public accessorials As New list(Of Accessorials).
In the Accesorial class the code is shown as " Public codes As String()" which I'm assuming it can be a string array because there are time when more than one code can be submittied.
the JSON outcome (patrial) I'm looking for is according to the API guide is:
Code:"accessorials" : { "codes" : [ "HAZ" ], "hazardousContact" : { "name" : "John Snow", "phone" : "7704865900" }
Code:Public Class fgtload 'Primary wrapper Public service As New fgtservice Public payment As New fgtpayment Public transit As New fgttransit Public commodities As New List(Of Items) Public origin As New fgtorigin Public destination As New fgtdestination Public billTo As New fgtbillto Public accessorials As New Accessorials End Class Public Class Accessorials Public codes As String() Public hazardousContact As HazardousContact Public cod As Object Public insuranceDetails As Object Public sortAndSegregateDetails As Object Public markDetails As Object End Class




Reply With Quote
