Hi nauna,
Refer below sample code.
HTML
<asp:GridView ID="GridView1" runat="server">
</asp:GridView>
JSON
{
"rate_response":{
"rates":[
{
"rate_id":"se-225670164",
"rate_type":"shipment",
"carrier_id":"se-314799",
"shipping_amount":{
"currency":"usd",
"amount":105.0100
},
"insurance_amount":{
"currency":"usd",
"amount":0.0
},
"confirmation_amount":{
"currency":"usd",
"amount":0.0
},
"other_amount":{
"currency":"usd",
"amount":0.0
},
"zone":7,
"package_type":"package",
"delivery_days":2,
"guaranteed_service":false,
"estimated_delivery_date":"2020-09-02T00:00:00Z",
"carrier_delivery_days":"2",
"ship_date":"2020-08-31T00:00:00Z",
"negotiated_rate":false,
"service_type":"USPS Priority Mail",
"service_code":"usps_priority_mail",
"trackable":true,
"carrier_code":"stamps_com",
"carrier_nickname":"ShipEngine Test Account - Stamps.com",
"carrier_friendly_name":"Stamps.com",
"validation_status":"valid",
"warning_messages":[
],
"error_messages":[
]
},
{
"rate_id":"se-225670165",
"rate_type":"shipment",
"carrier_id":"se-314799",
"shipping_amount":{
"currency":"usd",
"amount":12.7200
},
"insurance_amount":{
"currency":"usd",
"amount":0.0
},
"confirmation_amount":{
"currency":"usd",
"amount":0.0
},
"other_amount":{
"currency":"usd",
"amount":0.0
},
"zone":7,
"package_type":"medium_flat_rate_box",
"delivery_days":2,
"guaranteed_service":false,
"estimated_delivery_date":"2020-09-02T00:00:00Z",
"carrier_delivery_days":"2",
"ship_date":"2020-08-31T00:00:00Z",
"negotiated_rate":false,
"service_type":"USPS Priority Mail",
"service_code":"usps_priority_mail",
"trackable":true,
"carrier_code":"stamps_com",
"carrier_nickname":"ShipEngine Test Account - Stamps.com",
"carrier_friendly_name":"Stamps.com",
"validation_status":"valid",
"warning_messages":[
],
"error_messages":[
]
},
{
"rate_id":"se-225670166",
"rate_type":"shipment",
"carrier_id":"se-314799",
"shipping_amount":{
"currency":"usd",
"amount":6.9800
},
"insurance_amount":{
"currency":"usd",
"amount":0.0
},
"confirmation_amount":{
"currency":"usd",
"amount":0.0
},
"other_amount":{
"currency":"usd",
"amount":0.0
},
"zone":7,
"package_type":"small_flat_rate_box",
"delivery_days":2,
"guaranteed_service":false,
"estimated_delivery_date":"2020-09-02T00:00:00Z",
"carrier_delivery_days":"2",
"ship_date":"2020-08-31T00:00:00Z",
"negotiated_rate":false,
"service_type":"USPS Priority Mail",
"service_code":"usps_priority_mail",
"trackable":true,
"carrier_code":"stamps_com",
"carrier_nickname":"ShipEngine Test Account - Stamps.com",
"carrier_friendly_name":"Stamps.com",
"validation_status":"valid",
"warning_messages":[
],
"error_messages":[
]
},
{
"rate_id":"se-225670167",
"rate_type":"shipment",
"carrier_id":"se-314799",
"shipping_amount":{
"currency":"usd",
"amount":17.4700
},
"insurance_amount":{
"currency":"usd",
"amount":0.0
},
"confirmation_amount":{
"currency":"usd",
"amount":0.0
},
"other_amount":{
"currency":"usd",
"amount":0.0
},
"zone":7,
"package_type":"large_flat_rate_box",
"delivery_days":2,
"guaranteed_service":false,
"estimated_delivery_date":"2020-09-02T00:00:00Z",
"carrier_delivery_days":"2",
"ship_date":"2020-08-31T00:00:00Z",
"negotiated_rate":false,
"service_type":"USPS Priority Mail",
"service_code":"usps_priority_mail",
"trackable":true,
"carrier_code":"stamps_com",
"carrier_nickname":"ShipEngine Test Account - Stamps.com",
"carrier_friendly_name":"Stamps.com",
"validation_status":"valid",
"warning_messages":[
],
"error_messages":[
]
},
{
"rate_id":"se-225670168",
"rate_type":"shipment",
"carrier_id":"se-314799",
"shipping_amount":{
"currency":"usd",
"amount":6.4800
},
"insurance_amount":{
"currency":"usd",
"amount":0.0
},
"confirmation_amount":{
"currency":"usd",
"amount":0.0
},
"other_amount":{
"currency":"usd",
"amount":0.0
},
"zone":7,
"package_type":"flat_rate_envelope",
"delivery_days":2,
"guaranteed_service":false,
"estimated_delivery_date":"2020-09-02T00:00:00Z",
"carrier_delivery_days":"2",
"ship_date":"2020-08-31T00:00:00Z",
"negotiated_rate":false,
"service_type":"USPS Priority Mail",
"service_code":"usps_priority_mail",
"trackable":true,
"carrier_code":"stamps_com",
"carrier_nickname":"ShipEngine Test Account - Stamps.com",
"carrier_friendly_name":"Stamps.com",
"validation_status":"has_warnings",
"warning_messages":[
"Heads up! You've included custom dimensions for a package type with a standardized size. For more accurate rates, consider removing the dimensions for this shipment."
],
"error_messages":[
]
},
{
"rate_id":"se-225670169",
"rate_type":"shipment",
"carrier_id":"se-314799",
"shipping_amount":{
"currency":"usd",
"amount":7.0300
},
"insurance_amount":{
"currency":"usd",
"amount":0.0
},
"confirmation_amount":{
"currency":"usd",
"amount":0.0
},
"other_amount":{
"currency":"usd",
"amount":0.0
},
"zone":7,
"package_type":"flat_rate_padded_envelope",
"delivery_days":2,
"guaranteed_service":false,
"estimated_delivery_date":"2020-09-02T00:00:00Z",
"carrier_delivery_days":"2",
"ship_date":"2020-08-31T00:00:00Z",
"negotiated_rate":false,
"service_type":"USPS Priority Mail",
"service_code":"usps_priority_mail",
"trackable":true,
"carrier_code":"stamps_com",
"carrier_nickname":"ShipEngine Test Account - Stamps.com",
"carrier_friendly_name":"Stamps.com",
"validation_status":"valid",
"warning_messages":[
],
"error_messages":[
]
},
{
"rate_id":"se-225670170",
"rate_type":"shipment",
"carrier_id":"se-314799",
"shipping_amount":{
"currency":"usd",
"amount":6.7800
},
"insurance_amount":{
"currency":"usd",
"amount":0.0
},
"confirmation_amount":{
"currency":"usd",
"amount":0.0
},
"other_amount":{
"currency":"usd",
"amount":0.0
},
"zone":7,
"package_type":"flat_rate_legal_envelope",
"delivery_days":2,
"guaranteed_service":false,
"estimated_delivery_date":"2020-09-02T00:00:00Z",
"carrier_delivery_days":"2",
"ship_date":"2020-08-31T00:00:00Z",
"negotiated_rate":false,
"service_type":"USPS Priority Mail",
"service_code":"usps_priority_mail",
"trackable":true,
"carrier_code":"stamps_com",
"carrier_nickname":"ShipEngine Test Account - Stamps.com",
"carrier_friendly_name":"Stamps.com",
"validation_status":"valid",
"warning_messages":[
],
"error_messages":[
]
},
{
"rate_id":"se-225670171",
"rate_type":"shipment",
"carrier_id":"se-314801",
"shipping_amount":{
"currency":"usd",
"amount":64.23
},
"insurance_amount":{
"currency":"usd",
"amount":0.0
},
"confirmation_amount":{
"currency":"usd",
"amount":0.0
},
"other_amount":{
"currency":"usd",
"amount":3.69
},
"zone":null,
"package_type":null,
"delivery_days":3,
"guaranteed_service":false,
"estimated_delivery_date":"2020-09-03T23:59:00Z",
"carrier_delivery_days":"3",
"ship_date":"2020-08-31T00:00:00Z",
"negotiated_rate":false,
"service_type":"FedEx Ground®",
"service_code":"fedex_ground",
"trackable":true,
"carrier_code":"fedex",
"carrier_nickname":"ShipEngine Test Account - FedEx",
"carrier_friendly_name":"FedEx",
"validation_status":"valid",
"warning_messages":[
],
"error_messages":[
]
},
{
"rate_id":"se-225670172",
"rate_type":"shipment",
"carrier_id":"se-314800",
"shipping_amount":{
"currency":"usd",
"amount":68.40
},
"insurance_amount":{
"currency":"usd",
"amount":0.0
},
"confirmation_amount":{
"currency":"usd",
"amount":0.0
},
"other_amount":{
"currency":"usd",
"amount":0.00
},
"zone":null,
"package_type":null,
"delivery_days":4,
"guaranteed_service":true,
"estimated_delivery_date":"2020-09-04T23:00:00Z",
"carrier_delivery_days":"Friday 9/4 by 11:00 PM",
"ship_date":"2020-08-31T00:00:00Z",
"negotiated_rate":false,
"service_type":"UPS® Ground",
"service_code":"ups_ground",
"trackable":true,
"carrier_code":"ups",
"carrier_nickname":"ShipEngine Test Account - UPS",
"carrier_friendly_name":"UPS",
"validation_status":"valid",
"warning_messages":[
],
"error_messages":[
]
}
],
"invalid_rates":[
],
"rate_request_id":"se-21022166",
"shipment_id":"se-39254644",
"created_at":"2020-09-01T03:25:44.335327Z",
"status":"completed",
"errors":[
]
},
"shipment_id":"se-39254644",
"carrier_id":null,
"service_code":null,
"external_shipment_id":null,
"ship_date":"2020-08-31T00:00:00Z",
"created_at":"2020-09-01T03:25:43.6Z",
"modified_at":"2020-09-01T03:25:43.553Z",
"shipment_status":"pending",
"ship_to":{
"name":"Amanda Miller",
"phone":null,
"company_name":null,
"address_line1":"525 S Winchester Blvd",
"address_line2":null,
"address_line3":null,
"city_locality":"San Jose",
"state_province":"CA",
"postal_code":"95128",
"country_code":"US",
"address_residential_indicator":"unknown"
},
"ship_from":{
"name":"John Doe",
"phone":"512-555-5555",
"company_name":null,
"address_line1":"4009 Marathon Blvd",
"address_line2":null,
"address_line3":null,
"city_locality":"Austin",
"state_province":"TX",
"postal_code":"78756",
"country_code":"US",
"address_residential_indicator":"unknown"
},
"warehouse_id":null,
"return_to":{
"name":"John Doe",
"phone":"512-555-5555",
"company_name":null,
"address_line1":"4009 Marathon Blvd",
"address_line2":null,
"address_line3":null,
"city_locality":"Austin",
"state_province":"TX",
"postal_code":"78756",
"country_code":"US",
"address_residential_indicator":"unknown"
},
"confirmation":"none",
"customs":null,
"external_order_id":null,
"order_source_code":null,
"advanced_options":{
"bill_to_account":null,
"bill_to_country_code":null,
"bill_to_party":null,
"bill_to_postal_code":null,
"contains_alcohol":false,
"delivered_duty_paid":false,
"non_machinable":false,
"saturday_delivery":false,
"dry_ice":false,
"dry_ice_weight":null,
"freight_class":null,
"custom_field1":null,
"custom_field2":null,
"custom_field3":null,
"collect_on_delivery":null
},
"insurance_provider":"none",
"tags":[
],
"packages":[
{
"package_code":"package",
"weight":{
"value":17.00,
"unit":"pound"
},
"dimensions":{
"unit":"inch",
"length":36.00,
"width":12.00,
"height":24.00
},
"insured_value":{
"currency":"usd",
"amount":0.00
},
"label_messages":{
"reference1":null,
"reference2":null,
"reference3":null
},
"external_package_id":null
}
],
"total_weight":{
"value":17.00,
"unit":"pound"
},
"items":[
]
}
Code
C#
protected void Page_Load(object sender, EventArgs e)
{
var daa = System.IO.File.ReadAllText(Server.MapPath("~/JSON.txt"));
Root myDeserializedClass = Newtonsoft.Json.JsonConvert.DeserializeObject<Root>(daa);
ShipFrom shipFrom = myDeserializedClass.ship_from;
List<OutData> outData = new List<OutData>();
foreach (Rate rate in myDeserializedClass.rate_response.rates)
{
OutData od = new OutData();
od.name = shipFrom.name;
od.phone = shipFrom.phone;
od.company_name = Convert.ToString(shipFrom.company_name);
od.address_line1 = shipFrom.address_line1;
od.address_line2 = Convert.ToString(shipFrom.address_line2);
od.address_line3 = Convert.ToString(shipFrom.address_line3);
od.currency = rate.shipping_amount.currency;
od.amount = rate.shipping_amount.amount;
od.carrier_code = rate.carrier_code;
od.carrier_nickname = rate.carrier_nickname;
od.carrier_friendly_name = rate.carrier_friendly_name;
outData.Add(od);
}
GridView1.DataSource = outData;
GridView1.DataBind();
}
public class OutData
{
public string name { get; set; }
public string phone { get; set; }
public string company_name { get; set; }
public string address_line1 { get; set; }
public string address_line2 { get; set; }
public string address_line3 { get; set; }
public string currency { get; set; }
public double amount { get; set; }
public string carrier_code { get; set; }
public string carrier_nickname { get; set; }
public string carrier_friendly_name { get; set; }
}
public class BodyRateOptions
{
public BodyRateOptions()
{
this.service_codes = new List<string>();
this.carrier_ids = new List<string>();
}
public List<string> carrier_ids { get; set; }
public List<string> service_codes { get; set; }
}
public class BodyShipFrom
{
public string name { get; set; }
public string address_line1 { get; set; }
public string city_locality { get; set; }
public string state_province { get; set; }
public string postal_code { get; set; }
public string country_code { get; set; }
public string phone { get; set; }
}
public class BodyShipTo
{
public string name { get; set; }
public string address_line1 { get; set; }
public string city_locality { get; set; }
public string state_province { get; set; }
public string postal_code { get; set; }
public string country_code { get; set; }
}
public class BodyWeight
{
public int value { get; set; }
public string unit { get; set; }
}
public class BodyDimensions
{
public int length { get; set; }
public int width { get; set; }
public int height { get; set; }
public string unit { get; set; }
}
public class BodyPackage
{
public BodyWeight weight { get; set; }
public BodyDimensions dimensions { get; set; }
}
public class BodyShipment
{
public BodyShipment()
{
this.ship_to = new ShipTo();
this.ship_from = new ShipFrom();
this.packages = new List<Package>();
}
public ShipFrom ship_from { get; set; }
public ShipTo ship_to { get; set; }
public List<Package> packages { get; set; }
}
public class BodyRoot
{
public BodyRoot()
{
this.rate_options = new BodyRateOptions();
this.shipment = new BodyShipment();
}
public BodyRateOptions rate_options { get; set; }
public BodyShipment shipment { get; set; }
}
public class ShippingAmount
{
public string currency { get; set; }
public double amount { get; set; }
}
public class InsuranceAmount
{
public string currency { get; set; }
public double amount { get; set; }
}
public class ConfirmationAmount
{
public string currency { get; set; }
public double amount { get; set; }
}
public class OtherAmount
{
public string currency { get; set; }
public double amount { get; set; }
}
public class Rate
{
public string rate_id { get; set; }
public string rate_type { get; set; }
public string carrier_id { get; set; }
public ShippingAmount shipping_amount { get; set; }
public InsuranceAmount insurance_amount { get; set; }
public ConfirmationAmount confirmation_amount { get; set; }
public OtherAmount other_amount { get; set; }
public int? zone { get; set; }
public string package_type { get; set; }
public int delivery_days { get; set; }
public bool guaranteed_service { get; set; }
public DateTime estimated_delivery_date { get; set; }
public string carrier_delivery_days { get; set; }
public DateTime ship_date { get; set; }
public bool negotiated_rate { get; set; }
public string service_type { get; set; }
public string service_code { get; set; }
public bool trackable { get; set; }
public string carrier_code { get; set; }
public string carrier_nickname { get; set; }
public string carrier_friendly_name { get; set; }
public string validation_status { get; set; }
public List<string> warning_messages { get; set; }
public List<object> error_messages { get; set; }
}
public class RateResponse
{
public List<Rate> rates { get; set; }
public List<object> invalid_rates { get; set; }
public string rate_request_id { get; set; }
public string shipment_id { get; set; }
public DateTime created_at { get; set; }
public string status { get; set; }
public List<object> errors { get; set; }
}
public class ShipTo
{
public string name { get; set; }
public object phone { get; set; }
public object company_name { get; set; }
public string address_line1 { get; set; }
public object address_line2 { get; set; }
public object address_line3 { get; set; }
public string city_locality { get; set; }
public string state_province { get; set; }
public string postal_code { get; set; }
public string country_code { get; set; }
public string address_residential_indicator { get; set; }
}
public class ShipFrom
{
public string name { get; set; }
public string phone { get; set; }
public object company_name { get; set; }
public string address_line1 { get; set; }
public object address_line2 { get; set; }
public object address_line3 { get; set; }
public string city_locality { get; set; }
public string state_province { get; set; }
public string postal_code { get; set; }
public string country_code { get; set; }
public string address_residential_indicator { get; set; }
}
public class ReturnTo
{
public string name { get; set; }
public string phone { get; set; }
public object company_name { get; set; }
public string address_line1 { get; set; }
public object address_line2 { get; set; }
public object address_line3 { get; set; }
public string city_locality { get; set; }
public string state_province { get; set; }
public string postal_code { get; set; }
public string country_code { get; set; }
public string address_residential_indicator { get; set; }
}
public class AdvancedOptions
{
public object bill_to_account { get; set; }
public object bill_to_country_code { get; set; }
public object bill_to_party { get; set; }
public object bill_to_postal_code { get; set; }
public bool contains_alcohol { get; set; }
public bool delivered_duty_paid { get; set; }
public bool non_machinable { get; set; }
public bool saturday_delivery { get; set; }
public bool dry_ice { get; set; }
public object dry_ice_weight { get; set; }
public object freight_class { get; set; }
public object custom_field1 { get; set; }
public object custom_field2 { get; set; }
public object custom_field3 { get; set; }
public object collect_on_delivery { get; set; }
}
public class Weight
{
public double value { get; set; }
public string unit { get; set; }
}
public class Dimensions
{
public string unit { get; set; }
public double length { get; set; }
public double width { get; set; }
public double height { get; set; }
}
public class InsuredValue
{
public string currency { get; set; }
public double amount { get; set; }
}
public class LabelMessages
{
public object reference1 { get; set; }
public object reference2 { get; set; }
public object reference3 { get; set; }
}
public class Package
{
public Package()
{
this.weight = new Weight();
this.dimensions = new Dimensions();
//this.insured_value = new InsuredValue();
this.label_messages = new LabelMessages();
}
public string package_code { get; set; }
public Weight weight { get; set; }
public Dimensions dimensions { get; set; }
public InsuredValue insured_value { get; set; }
public LabelMessages label_messages { get; set; }
public object external_package_id { get; set; }
}
public class TotalWeight
{
public double value { get; set; }
public string unit { get; set; }
}
public class Root
{
public RateResponse rate_response { get; set; }
public string shipment_id { get; set; }
public object carrier_id { get; set; }
public object service_code { get; set; }
public object external_shipment_id { get; set; }
public DateTime ship_date { get; set; }
public DateTime created_at { get; set; }
public DateTime modified_at { get; set; }
public string shipment_status { get; set; }
public ShipTo ship_to { get; set; }
public ShipFrom ship_from { get; set; }
public object warehouse_id { get; set; }
public ReturnTo return_to { get; set; }
public string confirmation { get; set; }
public object customs { get; set; }
public object external_order_id { get; set; }
public object order_source_code { get; set; }
public AdvancedOptions advanced_options { get; set; }
public string insurance_provider { get; set; }
public List<object> tags { get; set; }
public List<Package> packages { get; set; }
public TotalWeight total_weight { get; set; }
public List<object> items { get; set; }
}
VB.Net
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Load
Dim daa = IO.File.ReadAllText(Server.MapPath("~/JSON.txt"))
Dim myDeserializedClass As Root = Newtonsoft.Json.JsonConvert.DeserializeObject(Of Root)(daa)
Dim shipFrom As ShipFrom = myDeserializedClass.ship_from
Dim outData As List(Of OutData) = New List(Of OutData)()
For Each rate As Rate In myDeserializedClass.rate_response.rates
Dim od As OutData = New OutData()
od.name = shipFrom.name
od.phone = shipFrom.phone
od.company_name = Convert.ToString(shipFrom.company_name)
od.address_line1 = shipFrom.address_line1
od.address_line2 = Convert.ToString(shipFrom.address_line2)
od.address_line3 = Convert.ToString(shipFrom.address_line3)
od.currency = rate.shipping_amount.currency
od.amount = rate.shipping_amount.amount
od.carrier_code = rate.carrier_code
od.carrier_nickname = rate.carrier_nickname
od.carrier_friendly_name = rate.carrier_friendly_name
outData.Add(od)
Next
GridView1.DataSource = outData
GridView1.DataBind()
End Sub
Public Class OutData
Public Property name As String
Public Property phone As String
Public Property company_name As String
Public Property address_line1 As String
Public Property address_line2 As String
Public Property address_line3 As String
Public Property currency As String
Public Property amount As Double
Public Property carrier_code As String
Public Property carrier_nickname As String
Public Property carrier_friendly_name As String
End Class
Public Class BodyRateOptions
Public Sub New()
Me.service_codes = New List(Of String)()
Me.carrier_ids = New List(Of String)()
End Sub
Public Property carrier_ids As List(Of String)
Public Property service_codes As List(Of String)
End Class
Public Class BodyShipFrom
Public Property name As String
Public Property address_line1 As String
Public Property city_locality As String
Public Property state_province As String
Public Property postal_code As String
Public Property country_code As String
Public Property phone As String
End Class
Public Class BodyShipTo
Public Property name As String
Public Property address_line1 As String
Public Property city_locality As String
Public Property state_province As String
Public Property postal_code As String
Public Property country_code As String
End Class
Public Class BodyWeight
Public Property value As Integer
Public Property unit As String
End Class
Public Class BodyDimensions
Public Property length As Integer
Public Property width As Integer
Public Property height As Integer
Public Property unit As String
End Class
Public Class BodyPackage
Public Property weight As BodyWeight
Public Property dimensions As BodyDimensions
End Class
Public Class BodyShipment
Public Sub New()
Me.ship_to = New ShipTo()
Me.ship_from = New ShipFrom()
Me.packages = New List(Of Package)()
End Sub
Public Property ship_from As ShipFrom
Public Property ship_to As ShipTo
Public Property packages As List(Of Package)
End Class
Public Class BodyRoot
Public Sub New()
Me.rate_options = New BodyRateOptions()
Me.shipment = New BodyShipment()
End Sub
Public Property rate_options As BodyRateOptions
Public Property shipment As BodyShipment
End Class
Public Class ShippingAmount
Public Property currency As String
Public Property amount As Double
End Class
Public Class InsuranceAmount
Public Property currency As String
Public Property amount As Double
End Class
Public Class ConfirmationAmount
Public Property currency As String
Public Property amount As Double
End Class
Public Class OtherAmount
Public Property currency As String
Public Property amount As Double
End Class
Public Class Rate
Public Property rate_id As String
Public Property rate_type As String
Public Property carrier_id As String
Public Property shipping_amount As ShippingAmount
Public Property insurance_amount As InsuranceAmount
Public Property confirmation_amount As ConfirmationAmount
Public Property other_amount As OtherAmount
Public Property zone As Integer?
Public Property package_type As String
Public Property delivery_days As Integer
Public Property guaranteed_service As Boolean
Public Property estimated_delivery_date As DateTime
Public Property carrier_delivery_days As String
Public Property ship_date As DateTime
Public Property negotiated_rate As Boolean
Public Property service_type As String
Public Property service_code As String
Public Property trackable As Boolean
Public Property carrier_code As String
Public Property carrier_nickname As String
Public Property carrier_friendly_name As String
Public Property validation_status As String
Public Property warning_messages As List(Of String)
Public Property error_messages As List(Of Object)
End Class
Public Class RateResponse
Public Property rates As List(Of Rate)
Public Property invalid_rates As List(Of Object)
Public Property rate_request_id As String
Public Property shipment_id As String
Public Property created_at As DateTime
Public Property status As String
Public Property errors As List(Of Object)
End Class
Public Class ShipTo
Public Property name As String
Public Property phone As Object
Public Property company_name As Object
Public Property address_line1 As String
Public Property address_line2 As Object
Public Property address_line3 As Object
Public Property city_locality As String
Public Property state_province As String
Public Property postal_code As String
Public Property country_code As String
Public Property address_residential_indicator As String
End Class
Public Class ShipFrom
Public Property name As String
Public Property phone As String
Public Property company_name As Object
Public Property address_line1 As String
Public Property address_line2 As Object
Public Property address_line3 As Object
Public Property city_locality As String
Public Property state_province As String
Public Property postal_code As String
Public Property country_code As String
Public Property address_residential_indicator As String
End Class
Public Class ReturnTo
Public Property name As String
Public Property phone As String
Public Property company_name As Object
Public Property address_line1 As String
Public Property address_line2 As Object
Public Property address_line3 As Object
Public Property city_locality As String
Public Property state_province As String
Public Property postal_code As String
Public Property country_code As String
Public Property address_residential_indicator As String
End Class
Public Class AdvancedOptions
Public Property bill_to_account As Object
Public Property bill_to_country_code As Object
Public Property bill_to_party As Object
Public Property bill_to_postal_code As Object
Public Property contains_alcohol As Boolean
Public Property delivered_duty_paid As Boolean
Public Property non_machinable As Boolean
Public Property saturday_delivery As Boolean
Public Property dry_ice As Boolean
Public Property dry_ice_weight As Object
Public Property freight_class As Object
Public Property custom_field1 As Object
Public Property custom_field2 As Object
Public Property custom_field3 As Object
Public Property collect_on_delivery As Object
End Class
Public Class Weight
Public Property value As Double
Public Property unit As String
End Class
Public Class Dimensions
Public Property unit As String
Public Property length As Double
Public Property width As Double
Public Property height As Double
End Class
Public Class InsuredValue
Public Property currency As String
Public Property amount As Double
End Class
Public Class LabelMessages
Public Property reference1 As Object
Public Property reference2 As Object
Public Property reference3 As Object
End Class
Public Class Package
Public Sub New()
Me.weight = New Weight()
Me.dimensions = New Dimensions()
Me.label_messages = New LabelMessages()
End Sub
Public Property package_code As String
Public Property weight As Weight
Public Property dimensions As Dimensions
Public Property insured_value As InsuredValue
Public Property label_messages As LabelMessages
Public Property external_package_id As Object
End Class
Public Class TotalWeight
Public Property value As Double
Public Property unit As String
End Class
Public Class Root
Public Property rate_response As RateResponse
Public Property shipment_id As String
Public Property carrier_id As Object
Public Property service_code As Object
Public Property external_shipment_id As Object
Public Property ship_date As DateTime
Public Property created_at As DateTime
Public Property modified_at As DateTime
Public Property shipment_status As String
Public Property ship_to As ShipTo
Public Property ship_from As ShipFrom
Public Property warehouse_id As Object
Public Property return_to As ReturnTo
Public Property confirmation As String
Public Property customs As Object
Public Property external_order_id As Object
Public Property order_source_code As Object
Public Property advanced_options As AdvancedOptions
Public Property insurance_provider As String
Public Property tags As List(Of Object)
Public Property packages As List(Of Package)
Public Property total_weight As TotalWeight
Public Property items As List(Of Object)
End Class