Skip to content

Instantly share code, notes, and snippets.

@att14
Created August 13, 2015 22:32
Show Gist options
  • Select an option

  • Save att14/b764451c0fe10561a101 to your computer and use it in GitHub Desktop.

Select an option

Save att14/b764451c0fe10561a101 to your computer and use it in GitHub Desktop.
Module Module1
Sub Main()
EasyPost.Client.apiKey = "..."
Dim fromAddress As New EasyPost.Address
With fromAddress
.phone = "1234567890"
.name = "Andrew Tribone"
.email = "tribone@easypost.com"
.street1 = "4160 Cesar Chavez"
.city = "San Francisco"
.state = "CA"
.zip = "94131"
End With
Dim toAddress As New EasyPost.Address
With toAddress
.name = "EasyPost"
.email = "contact@easypost.com"
.phone = "1234567890"
.street1 = "118 2nd Street"
.street2 = "Floor 4"
.city = "San Francisco"
.state = "CA"
.zip = "94105"
End With
Dim Parcel As New EasyPost.Parcel
With Parcel
.weight = 1.0
.height = 1.0
.length = 1.0
.width = 1.0
End With
Dim Shipment As New EasyPost.Shipment
With Shipment
.to_address = toAddress
.from_address = fromAddress
.parcel = Parcel
.Create()
.Buy(Shipment.LowestRate)
End With
Console.WriteLine(Shipment.id)
End Sub
End Module
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment