diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..1ff0c42
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,63 @@
+###############################################################################
+# Set default behavior to automatically normalize line endings.
+###############################################################################
+* text=auto
+
+###############################################################################
+# Set default behavior for command prompt diff.
+#
+# This is need for earlier builds of msysgit that does not have it on by
+# default for csharp files.
+# Note: This is only used by command line
+###############################################################################
+#*.cs diff=csharp
+
+###############################################################################
+# Set the merge driver for project and solution files
+#
+# Merging from the command prompt will add diff markers to the files if there
+# are conflicts (Merging from VS is not affected by the settings below, in VS
+# the diff markers are never inserted). Diff markers may cause the following
+# file extensions to fail to load in VS. An alternative would be to treat
+# these files as binary and thus will always conflict and require user
+# intervention with every merge. To do so, just uncomment the entries below
+###############################################################################
+#*.sln merge=binary
+#*.csproj merge=binary
+#*.vbproj merge=binary
+#*.vcxproj merge=binary
+#*.vcproj merge=binary
+#*.dbproj merge=binary
+#*.fsproj merge=binary
+#*.lsproj merge=binary
+#*.wixproj merge=binary
+#*.modelproj merge=binary
+#*.sqlproj merge=binary
+#*.wwaproj merge=binary
+
+###############################################################################
+# behavior for image files
+#
+# image files are treated as binary by default.
+###############################################################################
+#*.jpg binary
+#*.png binary
+#*.gif binary
+
+###############################################################################
+# diff behavior for common document formats
+#
+# Convert binary document formats to text before diffing them. This feature
+# is only available from the command line. Turn it on by uncommenting the
+# entries below.
+###############################################################################
+#*.doc diff=astextplain
+#*.DOC diff=astextplain
+#*.docx diff=astextplain
+#*.DOCX diff=astextplain
+#*.dot diff=astextplain
+#*.DOT diff=astextplain
+#*.pdf diff=astextplain
+#*.PDF diff=astextplain
+#*.rtf diff=astextplain
+#*.RTF diff=astextplain
diff --git a/.gitignore b/.gitignore
index aa3bc35..9491a2f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,14 +3,9 @@
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
-*.sln
-
-# Mac OS
-.DS_STORE
-
# User-specific files
+*.rsuser
*.suo
-*.swp
*.user
*.userosscache
*.sln.docstates
@@ -18,6 +13,9 @@
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
+# Mono auto generated files
+mono_crash.*
+
# Build results
[Dd]ebug/
[Dd]ebugPublic/
@@ -25,44 +23,63 @@
[Rr]eleases/
x64/
x86/
+[Ww][Ii][Nn]32/
+[Aa][Rr][Mm]/
+[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
+[Oo]ut/
[Ll]og/
-Shippo/lib/net4[05]/
+[Ll]ogs/
-# Visual Studio 2015 cache/options directory
+# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
+# Visual Studio 2017 auto generated files
+Generated\ Files/
+
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
-# NUNIT
+# NUnit
*.VisualState.xml
TestResult.xml
+nunit-*.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
+# Benchmark Results
+BenchmarkDotNet.Artifacts/
+
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
-**/Properties/launchSettings.json
+# ASP.NET Scaffolding
+ScaffoldingReadMe.txt
+
+# StyleCop
+StyleCopReport.xml
+
+# Files built by Visual Studio
*_i.c
*_p.c
-*_i.h
+*_h.h
*.ilk
*.meta
*.obj
+*.iobj
*.pch
*.pdb
+*.ipdb
*.pgc
*.pgd
*.rsp
@@ -72,6 +89,7 @@ artifacts/
*.tlh
*.tmp
*.tmp_proj
+*_wpftmp.csproj
*.log
*.vspscc
*.vssscc
@@ -100,6 +118,9 @@ ipch/
*.vspx
*.sap
+# Visual Studio Trace Files
+*.e2e
+
# TFS 2012 Local Workspace
$tf/
@@ -111,15 +132,21 @@ _ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
-# JustCode is a .NET coding add-in
-.JustCode
-
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
+# AxoCover is a Code Coverage Tool
+.axoCover/*
+!.axoCover/settings.json
+
+# Coverlet is a free, cross platform Code Coverage Tool
+coverage*.json
+coverage*.xml
+coverage*.info
+
# Visual Studio code coverage results
*.coverage
*.coveragexml
@@ -155,7 +182,7 @@ publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
-# TODO: Comment the next line if you want to checkin your web deploy settings
+# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
@@ -167,13 +194,15 @@ PublishScripts/
# NuGet Packages
*.nupkg
+# NuGet Symbol Packages
+*.snupkg
# The packages folder can be ignored because of Package Restore
-**/packages/*
+**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
-!**/packages/build/
+!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
-#!**/packages/repositories.config
-# NuGet v3's project.json files produces more ignoreable files
+#!**/[Pp]ackages/repositories.config
+# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
@@ -190,12 +219,15 @@ AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
+*.appx
+*.appxbundle
+*.appxupload
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
-!*.[Cc]ache/
+!?*.[Cc]ache/
# Others
ClientBin/
@@ -208,6 +240,10 @@ ClientBin/
*.publishsettings
orleans.codegen.cs
+# Including strong name files can present a security risk
+# (https://github.com/github/gitignore/pull/2483#issue-259490424)
+#*.snk
+
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
@@ -222,15 +258,22 @@ _UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
+ServiceFabricBackup/
+*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
+*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
+*.rptproj.rsuser
+*- [Bb]ackup.rdl
+*- [Bb]ackup ([0-9]).rdl
+*- [Bb]ackup ([0-9][0-9]).rdl
# Microsoft Fakes
FakesAssemblies/
@@ -242,9 +285,6 @@ FakesAssemblies/
.ntvs_analysis.dat
node_modules/
-# Typescript v1 declaration files
-typings/
-
# Visual Studio 6 build log
*.plg
@@ -269,12 +309,8 @@ paket-files/
# FAKE - F# Make
.fake/
-# JetBrains Rider
-.idea/
-*.sln.iml
-
-# CodeRush
-.cr/
+# CodeRush personal settings
+.cr/personal
# Python Tools for Visual Studio (PTVS)
__pycache__/
@@ -284,5 +320,44 @@ __pycache__/
# tools/**
# !tools/packages.config
-# Editor Config
-.editorconfig
+# Tabs Studio
+*.tss
+
+# Telerik's JustMock configuration file
+*.jmconfig
+
+# BizTalk build output
+*.btp.cs
+*.btm.cs
+*.odx.cs
+*.xsd.cs
+
+# OpenCover UI analysis results
+OpenCover/
+
+# Azure Stream Analytics local run output
+ASALocalRun/
+
+# MSBuild Binary and Structured Log
+*.binlog
+
+# NVidia Nsight GPU debugger configuration file
+*.nvuser
+
+# MFractors (Xamarin productivity tool) working folder
+.mfractor/
+
+# Local History for Visual Studio
+.localhistory/
+
+# BeatPulse healthcheck temp database
+healthchecksdb
+
+# Backup folder for Package Reference Convert tool in Visual Studio 2017
+MigrationBackup/
+
+# Ionide (cross platform F# VS Code tools) working folder
+.ionide/
+
+# Fody - auto-generated XML schema
+FodyWeavers.xsd
\ No newline at end of file
diff --git a/Shippo.sln b/Shippo.sln
deleted file mode 100644
index d707368..0000000
--- a/Shippo.sln
+++ /dev/null
@@ -1,37 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 15
-VisualStudioVersion = 15.0.28010.2019
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Shippo", "Shippo\Shippo.csproj", "{6816FD58-3FC6-4EFC-95F8-D11E9C1D387F}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ShippoExample", "ShippoExample\ShippoExample.csproj", "{7712EC9C-2581-49EE-8B61-745843F2CD6F}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ShippoTesting", "ShippoTesting\ShippoTesting.csproj", "{4AF39DE0-2FA9-43D1-9254-CF8546FF22C8}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {6816FD58-3FC6-4EFC-95F8-D11E9C1D387F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {6816FD58-3FC6-4EFC-95F8-D11E9C1D387F}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {6816FD58-3FC6-4EFC-95F8-D11E9C1D387F}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {6816FD58-3FC6-4EFC-95F8-D11E9C1D387F}.Release|Any CPU.Build.0 = Release|Any CPU
- {7712EC9C-2581-49EE-8B61-745843F2CD6F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {7712EC9C-2581-49EE-8B61-745843F2CD6F}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {7712EC9C-2581-49EE-8B61-745843F2CD6F}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {7712EC9C-2581-49EE-8B61-745843F2CD6F}.Release|Any CPU.Build.0 = Release|Any CPU
- {4AF39DE0-2FA9-43D1-9254-CF8546FF22C8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {4AF39DE0-2FA9-43D1-9254-CF8546FF22C8}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {4AF39DE0-2FA9-43D1-9254-CF8546FF22C8}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {4AF39DE0-2FA9-43D1-9254-CF8546FF22C8}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {62C615CA-09FE-4FD1-B71D-6D327A4C17F2}
- EndGlobalSection
-EndGlobal
diff --git a/ShippoExample/App.config b/ShippoExample/App.config
deleted file mode 100644
index 8e15646..0000000
--- a/ShippoExample/App.config
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/ShippoExample/Program.cs b/ShippoExample/Program.cs
index 4ccf30a..ff01b73 100644
--- a/ShippoExample/Program.cs
+++ b/ShippoExample/Program.cs
@@ -1,158 +1,163 @@
-using System;
+using Shippo;
using System.Collections;
-using System.Collections.Generic;
-using Shippo;
+namespace ShippoExample;
-namespace ShippoExample
+public class Program
{
- class Program
- {
- static readonly string TRACKING_NO = "9205590164917312751089";
+ static readonly string TRACKING_NO = "9205590164917312751089";
- private static void RunBatchExample(APIResource resource)
+ private static void RunBatchExample(APIResource resource)
+ {
+ ShippoCollection carrierAccounts = resource.AllCarrierAccount();
+ string defaultCarrierAccount = "";
+ foreach (CarrierAccount account in carrierAccounts)
{
- ShippoCollection carrierAccounts = resource.AllCarrierAccount();
- string defaultCarrierAccount = "";
- foreach (CarrierAccount account in carrierAccounts) {
- if (account.Carrier.ToString() == "usps")
- defaultCarrierAccount = account.ObjectId;
- }
-
- Address addressFrom = Address.createForPurchase("Mr. Hippo", "965 Mission St.", "Ste 201", "SF",
- "CA", "94103", "US", "4151234567", "ship@gmail.com");
- Address addressTo = Address.createForPurchase("Mrs. Hippo", "965 Missions St.", "Ste 202", "SF",
- "CA", "94103", "US", "4151234568", "msship@gmail.com");
- Parcel[] parcels = {Parcel.createForShipment(5, 5, 5, "in", 2, "oz")};
- Shipment shipment = Shipment.createForBatch(addressFrom, addressTo, parcels);
- BatchShipment batchShipment = BatchShipment.createForBatchShipments(defaultCarrierAccount, "usps_priority", shipment);
-
- List batchShipments = new List();
- batchShipments.Add(batchShipment);
-
- Batch batch = resource.CreateBatch(defaultCarrierAccount, "usps_priority", ShippoEnums.LabelFiletypes.PDF_4x6,
- "BATCH #170", batchShipments);
- Console.WriteLine("Batch Status = " + batch.Status);
- Console.WriteLine("Metadata = " + batch.Metadata);
+ if (account.Carrier.ToString() == "usps")
+ defaultCarrierAccount = account.ObjectId;
}
+ Address addressFrom = Address.createForPurchase("Mr. Hippo", "965 Mission St.", "Ste 201", "SF",
+ "CA", "94103", "US", "4151234567", "ship@gmail.com");
+ Address addressTo = Address.createForPurchase("Mrs. Hippo", "965 Missions St.", "Ste 202", "SF",
+ "CA", "94103", "US", "4151234568", "msship@gmail.com");
+ Parcel[] parcels = { Parcel.createForShipment(5, 5, 5, "in", 2, "oz") };
+ Shipment shipment = Shipment.createForBatch(addressFrom, addressTo, parcels);
+ BatchShipment batchShipment = BatchShipment.createForBatchShipments(defaultCarrierAccount, "usps_priority", shipment);
+
+ List batchShipments = new List();
+ batchShipments.Add(batchShipment);
+
+ Batch batch = resource.CreateBatch(defaultCarrierAccount, "usps_priority", ShippoEnums.LabelFiletypes.PDF_4x6,
+ "BATCH #170", batchShipments);
+ Console.WriteLine("Batch Status = " + batch.Status);
+ Console.WriteLine("Metadata = " + batch.Metadata);
+ }
- private static void RunTrackingExample(APIResource resource)
- {
- Track track = resource.RetrieveTracking("usps", TRACKING_NO);
- Console.WriteLine("Carrier = " + track.Carrier.ToUpper());
- Console.WriteLine("Tracking number = " + track.TrackingNumber);
- }
+ private static void RunTrackingExample(APIResource resource)
+ {
+ Track track = resource.RetrieveTracking("usps", TRACKING_NO);
+ Console.WriteLine("Carrier = " + track.Carrier.ToUpper());
+ Console.WriteLine("Tracking number = " + track.TrackingNumber);
+ }
- private static void RunInternationalAddressValidationExample(APIResource resource)
+ private static void RunInternationalAddressValidationExample(APIResource resource)
+ {
+ Hashtable parameters = new Hashtable();
+ parameters.Add("name", "Shippo Hippo");
+ parameters.Add("company", "Shippo");
+ parameters.Add("street_no", null);
+ parameters.Add("street1", "40 Bay St");
+ parameters.Add("street2", null);
+ parameters.Add("city", "Toronto");
+ parameters.Add("state", "ON");
+ parameters.Add("zip", "M5J 2X2");
+ parameters.Add("country", "CA");
+ parameters.Add("phone", "+1 555 341 9393");
+ parameters.Add("email", "hippo@goshippo.com");
+ parameters.Add("metadata", "Customer ID 123456");
+ parameters.Add("validate", "true");
+
+ Address address = resource.CreateAddress(parameters);
+ Console.Out.WriteLine("Address IsValid: " + address.ValidationResults.IsValid);
+ if (address.ValidationResults.Messages != null)
{
- Hashtable parameters = new Hashtable();
- parameters.Add("name", "Shippo Hippo");
- parameters.Add("company", "Shippo");
- parameters.Add("street_no", null);
- parameters.Add("street1", "40 Bay St");
- parameters.Add("street2", null);
- parameters.Add("city", "Toronto");
- parameters.Add("state", "ON");
- parameters.Add("zip", "M5J 2X2");
- parameters.Add("country", "CA");
- parameters.Add("phone", "+1 555 341 9393");
- parameters.Add("email", "hippo@goshippo.com");
- parameters.Add("metadata", "Customer ID 123456");
- parameters.Add("validate", "true");
- Address address = resource.CreateAddress(parameters);
- Console.Out.WriteLine("Address IsValid: " + address.ValidationResults.IsValid);
- if (address.ValidationResults.Messages != null) {
- foreach (ValidationMessage message in address.ValidationResults.Messages) {
- Console.Out.WriteLine("Address Message Code: " + message.Code);
- Console.Out.WriteLine("Address Message Text: " + message.Text);
- Console.Out.WriteLine();
- }
+ foreach (ValidationMessage message in address.ValidationResults.Messages)
+ {
+ Console.Out.WriteLine("Address Message Code: " + message.Code);
+ Console.Out.WriteLine("Address Message Text: " + message.Text);
+ Console.Out.WriteLine();
}
- Console.Out.WriteLine("Address Latitude: " + address.Latitude);
- Console.Out.WriteLine("Address Longitude: " + address.Longitude);
}
+ Console.Out.WriteLine("Address Latitude: " + address.Latitude);
+ Console.Out.WriteLine("Address Longitude: " + address.Longitude);
+ }
- static void Main(string[] args)
+ static void Main(string[] args)
+ {
+ // replace with your Shippo Token
+ // don't have one? get more info here
+ // (https://goshippo.com/docs/#overview)
+
+ APIResource resource = new APIResource("");
+ // to address
+ Hashtable toAddressTable = new Hashtable();
+ toAddressTable.Add("name", "Mr. Hippo");
+ toAddressTable.Add("company", "Shippo");
+ toAddressTable.Add("street1", "215 Clayton St.");
+ toAddressTable.Add("city", "San Francisco");
+ toAddressTable.Add("state", "CA");
+ toAddressTable.Add("zip", "94117");
+ toAddressTable.Add("country", "US");
+ toAddressTable.Add("phone", "+1 555 341 9393");
+ toAddressTable.Add("email", "support@goshipppo.com");
+
+ // from address
+ Hashtable fromAddressTable = new Hashtable();
+ fromAddressTable.Add("name", "Ms Hippo");
+ fromAddressTable.Add("company", "San Diego Zoo");
+ fromAddressTable.Add("street1", "2920 Zoo Drive");
+ fromAddressTable.Add("city", "San Diego");
+ fromAddressTable.Add("state", "CA");
+ fromAddressTable.Add("zip", "92101");
+ fromAddressTable.Add("country", "US");
+ fromAddressTable.Add("email", "hippo@goshipppo.com");
+ fromAddressTable.Add("phone", "+1 619 231 1515");
+ fromAddressTable.Add("metadata", "Customer ID 123456");
+
+ // parcel
+ Hashtable parcelTable = new Hashtable();
+ parcelTable.Add("length", "5");
+ parcelTable.Add("width", "5");
+ parcelTable.Add("height", "5");
+ parcelTable.Add("distance_unit", "in");
+ parcelTable.Add("weight", "2");
+ parcelTable.Add("mass_unit", "lb");
+ List parcels = new List();
+ parcels.Add(parcelTable);
+
+
+ // shipment
+ Hashtable shipmentTable = new Hashtable();
+ shipmentTable.Add("address_to", toAddressTable);
+ shipmentTable.Add("address_from", fromAddressTable);
+ shipmentTable.Add("parcels", parcels);
+ shipmentTable.Add("object_purpose", "PURCHASE");
+ shipmentTable.Add("async", false);
+
+ // create Shipment object
+ Console.WriteLine("Creating Shipment object..");
+ Shipment shipment = resource.CreateShipment(shipmentTable);
+
+ // select desired shipping rate according to your business logic
+ // we simply select the first rate in this example
+ Rate rate = shipment.Rates[0];
+
+ Console.WriteLine("Getting shipping label..");
+ Hashtable transactionParameters = new Hashtable();
+ transactionParameters.Add("rate", rate.ObjectId);
+ transactionParameters.Add("async", false);
+ Shippo.Transaction transaction = resource.CreateTransaction(transactionParameters);
+
+ if (((String)transaction.Status).Equals("SUCCESS", StringComparison.OrdinalIgnoreCase))
{
- // replace with your Shippo Token
- // don't have one? get more info here
- // (https://goshippo.com/docs/#overview)
- APIResource resource = new APIResource("");
- // to address
- Hashtable toAddressTable = new Hashtable();
- toAddressTable.Add("name", "Mr. Hippo");
- toAddressTable.Add("company", "Shippo");
- toAddressTable.Add("street1", "215 Clayton St.");
- toAddressTable.Add("city", "San Francisco");
- toAddressTable.Add("state", "CA");
- toAddressTable.Add("zip", "94117");
- toAddressTable.Add("country", "US");
- toAddressTable.Add("phone", "+1 555 341 9393");
- toAddressTable.Add("email", "support@goshipppo.com");
-
- // from address
- Hashtable fromAddressTable = new Hashtable();
- fromAddressTable.Add("name", "Ms Hippo");
- fromAddressTable.Add("company", "San Diego Zoo");
- fromAddressTable.Add("street1", "2920 Zoo Drive");
- fromAddressTable.Add("city", "San Diego");
- fromAddressTable.Add("state", "CA");
- fromAddressTable.Add("zip", "92101");
- fromAddressTable.Add("country", "US");
- fromAddressTable.Add("email", "hippo@goshipppo.com");
- fromAddressTable.Add("phone", "+1 619 231 1515");
- fromAddressTable.Add("metadata", "Customer ID 123456");
-
- // parcel
- Hashtable parcelTable = new Hashtable();
- parcelTable.Add("length", "5");
- parcelTable.Add("width", "5");
- parcelTable.Add("height", "5");
- parcelTable.Add("distance_unit", "in");
- parcelTable.Add("weight", "2");
- parcelTable.Add("mass_unit", "lb");
- List parcels = new List();
- parcels.Add(parcelTable);
-
-
- // shipment
- Hashtable shipmentTable = new Hashtable();
- shipmentTable.Add("address_to", toAddressTable);
- shipmentTable.Add("address_from", fromAddressTable);
- shipmentTable.Add("parcels", parcels);
- shipmentTable.Add("object_purpose", "PURCHASE");
- shipmentTable.Add("async", false);
-
- // create Shipment object
- Console.WriteLine("Creating Shipment object..");
- Shipment shipment = resource.CreateShipment(shipmentTable);
-
- // select desired shipping rate according to your business logic
- // we simply select the first rate in this example
- Rate rate = shipment.Rates[0];
-
- Console.WriteLine("Getting shipping label..");
- Hashtable transactionParameters = new Hashtable();
- transactionParameters.Add("rate", rate.ObjectId);
- transactionParameters.Add("async", false);
- Transaction transaction = resource.CreateTransaction(transactionParameters);
-
- if (((String) transaction.Status).Equals("SUCCESS", StringComparison.OrdinalIgnoreCase)) {
- Console.WriteLine("Label url : " + transaction.LabelURL);
- Console.WriteLine("Tracking number : " + transaction.TrackingNumber);
- } else {
- Console.WriteLine("An Error has occured while generating your label. Messages : " + transaction.Messages);
- }
+ Console.WriteLine("Label url : " + transaction.LabelURL);
+ Console.WriteLine("Tracking number : " + transaction.TrackingNumber);
+ }
+ else
+ {
+ Console.WriteLine("An Error has occured while generating your label. Messages : " + transaction.Messages);
+ }
- Console.WriteLine("\nBatch\n");
- RunBatchExample(resource);
+ Console.WriteLine("\nBatch\n");
+ RunBatchExample(resource);
- Console.WriteLine("\nTrack\n");
- RunTrackingExample(resource);
+ Console.WriteLine("\nTrack\n");
+ RunTrackingExample(resource);
- Console.WriteLine("\nValidating International Address\n");
- RunInternationalAddressValidationExample(resource);
- }
+ Console.WriteLine("\nValidating International Address\n");
+ RunInternationalAddressValidationExample(resource);
+ Console.ReadLine();
}
-}
+
+}
\ No newline at end of file
diff --git a/ShippoExample/Properties/AssemblyInfo.cs b/ShippoExample/Properties/AssemblyInfo.cs
deleted file mode 100644
index e11055a..0000000
--- a/ShippoExample/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("ShippoExample")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("ShippoExample")]
-[assembly: AssemblyCopyright("Copyright © 2018")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("7712ec9c-2581-49ee-8b61-745843f2cd6f")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/ShippoExample/ShippoExample.csproj b/ShippoExample/ShippoExample.csproj
index b6f1b0b..cc228d1 100644
--- a/ShippoExample/ShippoExample.csproj
+++ b/ShippoExample/ShippoExample.csproj
@@ -1,63 +1,14 @@
-
-
-
+
+
- Debug
- AnyCPU
- {7712EC9C-2581-49EE-8B61-745843F2CD6F}
Exe
- ShippoExample
- ShippoExample
- v4.5
- 512
- true
+ net6.0
+ enable
+ enable
-
- AnyCPU
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
-
-
- AnyCPU
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
- ShippoExample.Program
-
-
-
- ..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll
-
-
- ..\packages\Shippo.2.1.8\lib\net45\Shippo.dll
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
+
-
-
\ No newline at end of file
+
+
diff --git a/ShippoExample/packages.config b/ShippoExample/packages.config
deleted file mode 100644
index 9037ace..0000000
--- a/ShippoExample/packages.config
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/ShippoTesting/ShippoTest.cs b/ShippoTesting/ShippoTest.cs
index ef303b1..694eea5 100644
--- a/ShippoTesting/ShippoTest.cs
+++ b/ShippoTesting/ShippoTest.cs
@@ -1,20 +1,20 @@
-using NUnit.Framework;
-using System;
+using Shippo;
using System.Collections;
-using Shippo;
-
-namespace ShippoTesting {
+namespace ShippoTesting
+{
[TestFixture]
- public class ShippoTest {
- static internal APIResource apiResource;
+ public class ShippoTest
+ {
+ static internal APIResource apiResource;
static internal APIResource liveAPI;
static internal Boolean live;
static internal String now;
public APIResource staticAPIResource;
- [SetUp] public void Init()
+ [SetUp]
+ public void Init()
{
String token = Environment.GetEnvironmentVariable("Wrapper_Token");
apiResource = new APIResource(token);
@@ -25,10 +25,11 @@ [SetUp] public void Init()
public static APIResource getAPIResource()
{
- return live?liveAPI:apiResource;
+ return live ? liveAPI : apiResource;
}
- public static void setLive(Boolean live_api=true){
+ public static void setLive(Boolean live_api = true)
+ {
live = live_api;
}
diff --git a/ShippoTesting/ShippoTesting.csproj b/ShippoTesting/ShippoTesting.csproj
index bc4aeb2..977d492 100644
--- a/ShippoTesting/ShippoTesting.csproj
+++ b/ShippoTesting/ShippoTesting.csproj
@@ -1,69 +1,24 @@
-
-
+
+
- Debug
- AnyCPU
- 8.0.30703
- 2.0
- {4AF39DE0-2FA9-43D1-9254-CF8546FF22C8}
- Library
- ShippoTesting
- ShippoTesting
- v4.5
+ net6.0
+ enable
+ enable
+
+ false
+ true
-
- true
- full
- false
- bin\Debug
- DEBUG;
- prompt
- 4
- false
-
-
- full
- true
- bin\Release
- prompt
- 4
- false
-
-
-
-
- ..\packages\NUnit.3.8.1\lib\net45\nunit.framework.dll
-
-
- ..\packages\Newtonsoft.Json.10.0.1\lib\net45\Newtonsoft.Json.dll
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
- {218CF4C2-C457-43E4-9D1B-0880D10181FF}
- Shippo
-
+
+
+
+
+
+
-
+
+
diff --git a/ShippoTesting/Usings.cs b/ShippoTesting/Usings.cs
new file mode 100644
index 0000000..cefced4
--- /dev/null
+++ b/ShippoTesting/Usings.cs
@@ -0,0 +1 @@
+global using NUnit.Framework;
\ No newline at end of file
diff --git a/ShippoTesting/packages.config b/ShippoTesting/packages.config
deleted file mode 100644
index 0a783b6..0000000
--- a/ShippoTesting/packages.config
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/Shippo_Core.sln b/Shippo_Core.sln
new file mode 100644
index 0000000..7395beb
--- /dev/null
+++ b/Shippo_Core.sln
@@ -0,0 +1,37 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.5.33530.505
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Shippo_Core", "Shippo_Core\Shippo_Core.csproj", "{A810BC91-7487-4257-B620-9E6D744D6D54}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ShippoExample", "ShippoExample\ShippoExample.csproj", "{6E83B9A1-E48D-4F2C-BFBB-33CF8C9901D2}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ShippoTesting", "ShippoTesting\ShippoTesting.csproj", "{4034B026-CDD7-4733-92BB-E6ABB8D08758}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {A810BC91-7487-4257-B620-9E6D744D6D54}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A810BC91-7487-4257-B620-9E6D744D6D54}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A810BC91-7487-4257-B620-9E6D744D6D54}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A810BC91-7487-4257-B620-9E6D744D6D54}.Release|Any CPU.Build.0 = Release|Any CPU
+ {6E83B9A1-E48D-4F2C-BFBB-33CF8C9901D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {6E83B9A1-E48D-4F2C-BFBB-33CF8C9901D2}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {6E83B9A1-E48D-4F2C-BFBB-33CF8C9901D2}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {6E83B9A1-E48D-4F2C-BFBB-33CF8C9901D2}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4034B026-CDD7-4733-92BB-E6ABB8D08758}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4034B026-CDD7-4733-92BB-E6ABB8D08758}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4034B026-CDD7-4733-92BB-E6ABB8D08758}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4034B026-CDD7-4733-92BB-E6ABB8D08758}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {F696DBE3-1986-4C0F-A8D8-D3C7BF80729B}
+ EndGlobalSection
+EndGlobal
diff --git a/Shippo/APIResource.cs b/Shippo_Core/APIResource.cs
similarity index 88%
rename from Shippo/APIResource.cs
rename to Shippo_Core/APIResource.cs
index 706d415..bd3d900 100644
--- a/Shippo/APIResource.cs
+++ b/Shippo_Core/APIResource.cs
@@ -1,36 +1,33 @@
-/*
- * Copyright 2011 - 2012 Xamarin, Inc., 2011 - 2012 Joe Dluzen
- *
- * Author(s):
- * Gonzalo Paniagua Javier (gonzalo@xamarin.com)
- * Joe Dluzen (jdluzen@gmail.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-using System;
-using System.Collections.Generic;
+/*
+* Copyright 2011 - 2012 Xamarin, Inc., 2011 - 2012 Joe Dluzen
+*
+* Author(s):
+* Gonzalo Paniagua Javier (gonzalo@xamarin.com)
+* Joe Dluzen (jdluzen@gmail.com)
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+using Newtonsoft.Json;
using System.Collections;
-using System.Globalization;
-using System.IO;
using System.Net;
using System.Text;
using System.Web;
-using Newtonsoft.Json;
-
-namespace Shippo {
- public class APIResource {
+namespace Shippo
+{
+ public class APIResource
+ {
public static readonly string api_endpoint = "https://api.goshippo.com";
static readonly string user_agent = "Shippo/v1 CSharpBindings/1.0";
public static readonly int RatesReqTimeout = 25;
@@ -47,7 +44,8 @@ public APIResource(string inputToken)
apiVersion = "2018-02-08";
}
- public virtual void SetApiVersion(String version) {
+ public virtual void SetApiVersion(String version)
+ {
apiVersion = version;
}
@@ -55,10 +53,11 @@ public virtual void SetApiVersion(String version) {
// Setup Request handles headers, credentials etc for WebRequests
protected virtual WebRequest SetupRequest(string method, string url)
{
- WebRequest req = (WebRequest) WebRequest.Create(url);
+ WebRequest req = (WebRequest)WebRequest.Create(url);
req.Method = method;
- if (req is HttpWebRequest) {
- ((HttpWebRequest) req).UserAgent = user_agent;
+ if (req is HttpWebRequest)
+ {
+ ((HttpWebRequest)req).UserAgent = user_agent;
}
/* ENABLE BLOCK FOR BASIC AUTH
@@ -67,11 +66,13 @@ protected virtual WebRequest SetupRequest(string method, string url)
// Disable lines below for basic auth
string tokenType = "ShippoToken";
- if (accessToken.StartsWith("oauth.")) {
+ if (accessToken.StartsWith("oauth."))
+ {
tokenType = "Bearer";
}
req.Headers.Add("Authorization", string.Format("{0} {1}", tokenType, accessToken));
- if (apiVersion != null) {
+ if (apiVersion != null)
+ {
req.Headers.Add("Shippo-API-Version", apiVersion);
}
req.Timeout = TimeoutSeconds * 1000;
@@ -83,7 +84,8 @@ protected virtual WebRequest SetupRequest(string method, string url)
// Return response as String
static string GetResponseAsString(WebResponse response)
{
- using (StreamReader sr = new StreamReader(response.GetResponseStream(), encoding)) {
+ using (StreamReader sr = new StreamReader(response.GetResponseStream(), encoding))
+ {
return sr.ReadToEnd();
}
}
@@ -103,27 +105,34 @@ public virtual string DoRequest(string endpoint, string method, string body)
{
string result = null;
WebRequest req = SetupRequest(method, endpoint);
- if (body != null) {
+ if (body != null)
+ {
byte[] bytes = encoding.GetBytes(body.ToString());
req.ContentLength = bytes.Length;
- using (Stream st = req.GetRequestStream()) {
+ using (Stream st = req.GetRequestStream())
+ {
st.Write(bytes, 0, bytes.Length);
}
}
- try {
- using (WebResponse resp = (WebResponse) req.GetResponse()) {
+ try
+ {
+ using (WebResponse resp = (WebResponse)req.GetResponse())
+ {
result = GetResponseAsString(resp);
}
- } catch (WebException wexc) {
- if (wexc.Response != null) {
+ }
+ catch (WebException wexc)
+ {
+ if (wexc.Response != null)
+ {
string json_error = GetResponseAsString(wexc.Response);
HttpStatusCode status_code = HttpStatusCode.BadRequest;
HttpWebResponse resp = wexc.Response as HttpWebResponse;
if (resp != null)
status_code = resp.StatusCode;
- if ((int) status_code <= 500)
+ if ((int)status_code <= 500)
throw new ShippoException(json_error, wexc);
}
throw;
@@ -143,7 +152,8 @@ protected virtual StringBuilder UrlEncode(IUrlEncoderInfo infoInstance)
public String generateURLEncodedFromHashmap(Hashtable propertyMap)
{
StringBuilder str = new StringBuilder();
- foreach (DictionaryEntry pair in propertyMap) {
+ foreach (DictionaryEntry pair in propertyMap)
+ {
str.AppendFormat("{0}={1}&", pair.Key, pair.Value);
}
str.Length--;
@@ -237,7 +247,7 @@ public ShippoCollection AllShipments(Hashtable parameters)
public ShippoCollection CreateRate(Hashtable parameters)
{
- string ep = String.Format("{0}/shipments/{1}/rates/{2}", api_endpoint, parameters ["id"], parameters ["currency_code"]);
+ string ep = String.Format("{0}/shipments/{1}/rates/{2}", api_endpoint, parameters["id"], parameters["currency_code"]);
return DoRequest>(ep, "GET");
}
@@ -252,18 +262,20 @@ public ShippoCollection GetShippingRatesSync(String objectId)
public ShippoCollection GetShippingRatesSync(Hashtable parameters)
{
- String object_id = (String) parameters ["id"];
+ String object_id = (String)parameters["id"];
Shipment shipment = RetrieveShipment(object_id);
- String object_status = (String) shipment.Status;
+ String object_status = (String)shipment.Status;
long startTime = DateTimeExtensions.UnixTimeNow();
- while (object_status.Equals("QUEUED", StringComparison.OrdinalIgnoreCase) || object_status.Equals("WAITING", StringComparison.OrdinalIgnoreCase)) {
- if (DateTimeExtensions.UnixTimeNow() - startTime > RatesReqTimeout) {
+ while (object_status.Equals("QUEUED", StringComparison.OrdinalIgnoreCase) || object_status.Equals("WAITING", StringComparison.OrdinalIgnoreCase))
+ {
+ if (DateTimeExtensions.UnixTimeNow() - startTime > RatesReqTimeout)
+ {
throw new RequestTimeoutException(
"A timeout has occured while waiting for your rates to generate. Try retreiving the Shipment object again and check if object_status is updated. If this issue persists, please contact support@goshippo.com");
}
shipment = RetrieveShipment(object_id);
- object_status = (String) shipment.Status;
+ object_status = (String)shipment.Status;
}
return CreateRate(parameters);
@@ -289,17 +301,19 @@ public Transaction CreateTransactionSync(Hashtable parameters)
{
string ep = String.Format("{0}/transactions", api_endpoint);
Transaction transaction = DoRequest(ep, "POST", serialize(parameters));
- String object_id = (String) transaction.ObjectId;
- String object_status = (String) transaction.Status;
+ String object_id = (String)transaction.ObjectId;
+ String object_status = (String)transaction.Status;
long startTime = DateTimeExtensions.UnixTimeNow();
- while (object_status.Equals("QUEUED", StringComparison.OrdinalIgnoreCase) || object_status.Equals("WAITING", StringComparison.OrdinalIgnoreCase)) {
- if (DateTimeExtensions.UnixTimeNow() - startTime > TransactionReqTimeout) {
+ while (object_status.Equals("QUEUED", StringComparison.OrdinalIgnoreCase) || object_status.Equals("WAITING", StringComparison.OrdinalIgnoreCase))
+ {
+ if (DateTimeExtensions.UnixTimeNow() - startTime > TransactionReqTimeout)
+ {
throw new RequestTimeoutException(
"A timeout has occured while waiting for your label to generate. Try retreiving the Transaction object again and check if object_status is updated. If this issue persists, please contact support@goshippo.com");
}
transaction = RetrieveTransaction(object_id);
- object_status = (String) transaction.Status;
+ object_status = (String)transaction.Status;
}
return transaction;
@@ -385,8 +399,8 @@ public CarrierAccount RetrieveCarrierAccount(String object_id)
public ShippoCollection AllCarrierAccount(Hashtable parameters)
{
- string ep = String.Format ("{0}/carrier_accounts?{1}", api_endpoint, generateURLEncodedFromHashmap(parameters));
- return DoRequest> (ep);
+ string ep = String.Format("{0}/carrier_accounts?{1}", api_endpoint, generateURLEncodedFromHashmap(parameters));
+ return DoRequest>(ep);
}
public ShippoCollection AllCarrierAccount()
diff --git a/Shippo/Address.cs b/Shippo_Core/Address.cs
similarity index 100%
rename from Shippo/Address.cs
rename to Shippo_Core/Address.cs
diff --git a/Shippo/AddressValidation/ValidationMessage.cs b/Shippo_Core/AddressValidation/ValidationMessage.cs
similarity index 100%
rename from Shippo/AddressValidation/ValidationMessage.cs
rename to Shippo_Core/AddressValidation/ValidationMessage.cs
diff --git a/Shippo/AddressValidation/ValidationResults.cs b/Shippo_Core/AddressValidation/ValidationResults.cs
similarity index 100%
rename from Shippo/AddressValidation/ValidationResults.cs
rename to Shippo_Core/AddressValidation/ValidationResults.cs
diff --git a/Shippo/Batch.cs b/Shippo_Core/Batch.cs
similarity index 100%
rename from Shippo/Batch.cs
rename to Shippo_Core/Batch.cs
diff --git a/Shippo/BatchShipment.cs b/Shippo_Core/BatchShipment.cs
similarity index 100%
rename from Shippo/BatchShipment.cs
rename to Shippo_Core/BatchShipment.cs
diff --git a/Shippo/BatchShipments.cs b/Shippo_Core/BatchShipments.cs
similarity index 100%
rename from Shippo/BatchShipments.cs
rename to Shippo_Core/BatchShipments.cs
diff --git a/Shippo/CarrierAccount.cs b/Shippo_Core/CarrierAccount.cs
similarity index 100%
rename from Shippo/CarrierAccount.cs
rename to Shippo_Core/CarrierAccount.cs
diff --git a/Shippo/CustomsDeclaration.cs b/Shippo_Core/CustomsDeclaration.cs
similarity index 100%
rename from Shippo/CustomsDeclaration.cs
rename to Shippo_Core/CustomsDeclaration.cs
diff --git a/Shippo/CustomsItem.cs b/Shippo_Core/CustomsItem.cs
similarity index 100%
rename from Shippo/CustomsItem.cs
rename to Shippo_Core/CustomsItem.cs
diff --git a/Shippo/DateTimeExtensions.cs b/Shippo_Core/DateTimeExtensions.cs
old mode 100755
new mode 100644
similarity index 100%
rename from Shippo/DateTimeExtensions.cs
rename to Shippo_Core/DateTimeExtensions.cs
diff --git a/Shippo/IUrlEncoderInfo.cs b/Shippo_Core/IUrlEncoderInfo.cs
similarity index 100%
rename from Shippo/IUrlEncoderInfo.cs
rename to Shippo_Core/IUrlEncoderInfo.cs
diff --git a/Shippo/Manifest.cs b/Shippo_Core/Manifest.cs
similarity index 100%
rename from Shippo/Manifest.cs
rename to Shippo_Core/Manifest.cs
diff --git a/Shippo/ObjectResults.cs b/Shippo_Core/ObjectResults.cs
similarity index 100%
rename from Shippo/ObjectResults.cs
rename to Shippo_Core/ObjectResults.cs
diff --git a/Shippo/Order.cs b/Shippo_Core/Order.cs
similarity index 100%
rename from Shippo/Order.cs
rename to Shippo_Core/Order.cs
diff --git a/Shippo/Parcel.cs b/Shippo_Core/Parcel.cs
similarity index 100%
rename from Shippo/Parcel.cs
rename to Shippo_Core/Parcel.cs
diff --git a/Shippo/Pickup.cs b/Shippo_Core/Pickup.cs
similarity index 100%
rename from Shippo/Pickup.cs
rename to Shippo_Core/Pickup.cs
diff --git a/Shippo/Rate.cs b/Shippo_Core/Rate.cs
similarity index 100%
rename from Shippo/Rate.cs
rename to Shippo_Core/Rate.cs
diff --git a/Shippo/Refund.cs b/Shippo_Core/Refund.cs
similarity index 100%
rename from Shippo/Refund.cs
rename to Shippo_Core/Refund.cs
diff --git a/Shippo/RequestTimeoutException.cs b/Shippo_Core/RequestTimeoutException.cs
similarity index 100%
rename from Shippo/RequestTimeoutException.cs
rename to Shippo_Core/RequestTimeoutException.cs
diff --git a/Shippo/Servicelevel.cs b/Shippo_Core/Servicelevel.cs
similarity index 100%
rename from Shippo/Servicelevel.cs
rename to Shippo_Core/Servicelevel.cs
diff --git a/Shippo/Shipment.cs b/Shippo_Core/Shipment.cs
similarity index 100%
rename from Shippo/Shipment.cs
rename to Shippo_Core/Shipment.cs
diff --git a/Shippo/Shippo.csproj b/Shippo_Core/Shippo.csproj
similarity index 100%
rename from Shippo/Shippo.csproj
rename to Shippo_Core/Shippo.csproj
diff --git a/Shippo/ShippoCollection.cs b/Shippo_Core/ShippoCollection.cs
old mode 100755
new mode 100644
similarity index 100%
rename from Shippo/ShippoCollection.cs
rename to Shippo_Core/ShippoCollection.cs
diff --git a/Shippo/ShippoDateTimeInfo.cs b/Shippo_Core/ShippoDateTimeInfo.cs
old mode 100755
new mode 100644
similarity index 100%
rename from Shippo/ShippoDateTimeInfo.cs
rename to Shippo_Core/ShippoDateTimeInfo.cs
diff --git a/Shippo/ShippoEnumConverter.cs b/Shippo_Core/ShippoEnumConverter.cs
similarity index 100%
rename from Shippo/ShippoEnumConverter.cs
rename to Shippo_Core/ShippoEnumConverter.cs
diff --git a/Shippo/ShippoEnums.cs b/Shippo_Core/ShippoEnums.cs
similarity index 100%
rename from Shippo/ShippoEnums.cs
rename to Shippo_Core/ShippoEnums.cs
diff --git a/Shippo/ShippoError.cs b/Shippo_Core/ShippoError.cs
old mode 100755
new mode 100644
similarity index 100%
rename from Shippo/ShippoError.cs
rename to Shippo_Core/ShippoError.cs
diff --git a/Shippo/ShippoException.cs b/Shippo_Core/ShippoException.cs
old mode 100755
new mode 100644
similarity index 100%
rename from Shippo/ShippoException.cs
rename to Shippo_Core/ShippoException.cs
diff --git a/Shippo/ShippoObject.cs b/Shippo_Core/ShippoObject.cs
similarity index 100%
rename from Shippo/ShippoObject.cs
rename to Shippo_Core/ShippoObject.cs
diff --git a/Shippo/ShippoObjectConverter.cs b/Shippo_Core/ShippoObjectConverter.cs
old mode 100755
new mode 100644
similarity index 100%
rename from Shippo/ShippoObjectConverter.cs
rename to Shippo_Core/ShippoObjectConverter.cs
diff --git a/Shippo_Core/Shippo_Core.csproj b/Shippo_Core/Shippo_Core.csproj
new file mode 100644
index 0000000..f958b97
--- /dev/null
+++ b/Shippo_Core/Shippo_Core.csproj
@@ -0,0 +1,13 @@
+
+
+
+ net6.0
+ enable
+ enable
+
+
+
+
+
+
+
diff --git a/Shippo/ShortAddress.cs b/Shippo_Core/ShortAddress.cs
similarity index 100%
rename from Shippo/ShortAddress.cs
rename to Shippo_Core/ShortAddress.cs
diff --git a/Shippo/Substatus.cs b/Shippo_Core/Substatus.cs
similarity index 100%
rename from Shippo/Substatus.cs
rename to Shippo_Core/Substatus.cs
diff --git a/Shippo/Track.cs b/Shippo_Core/Track.cs
similarity index 100%
rename from Shippo/Track.cs
rename to Shippo_Core/Track.cs
diff --git a/Shippo/TrackingHistory.cs b/Shippo_Core/TrackingHistory.cs
similarity index 100%
rename from Shippo/TrackingHistory.cs
rename to Shippo_Core/TrackingHistory.cs
diff --git a/Shippo/TrackingStatus.cs b/Shippo_Core/TrackingStatus.cs
similarity index 100%
rename from Shippo/TrackingStatus.cs
rename to Shippo_Core/TrackingStatus.cs
diff --git a/Shippo/Transaction.cs b/Shippo_Core/Transaction.cs
similarity index 100%
rename from Shippo/Transaction.cs
rename to Shippo_Core/Transaction.cs
diff --git a/Shippo/UnixDateTimeConverter.cs b/Shippo_Core/UnixDateTimeConverter.cs
old mode 100755
new mode 100644
similarity index 100%
rename from Shippo/UnixDateTimeConverter.cs
rename to Shippo_Core/UnixDateTimeConverter.cs