shippo-csharp-client icon indicating copy to clipboard operation
shippo-csharp-client copied to clipboard

Poor Design

Open NVentimiglia opened this issue 7 years ago • 2 comments

Here are some problems I ran into trying to do a simple address validation.

  • None of the Shippo properties are typed. This makes basic data entry impossible without referencing the documentation and is very error prone.
  • Examples sometimes use a factory method and sometimes use an object initializer. The first shipment example uses an object intializer while the validation uses a factory method. which one is correct ?
  • Address validation method takes a hashtable argument. Why am I responsible for converting your objects into hashtables ? Why not use an address object ?

NVentimiglia avatar Aug 14 '16 22:08 NVentimiglia

https://github.com/goshippo/shippo-csharp-client/pull/11

NVentimiglia avatar Aug 14 '16 23:08 NVentimiglia

I made a fork where I re-wrote this to use .NET Standard 1.3 and started to clean up the interface as well (not using Hashtables, etc). Check it out: https://github.com/HakanL/shippo-csharp-client

Also uploaded to NuGet: https://www.nuget.org/packages/Haukcode.GoShippo

I'm in the process of testing it out so I'm sure there are a few issues.

HakanL avatar Sep 07 '17 22:09 HakanL