• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ShipEngine / shipengine-dotnet
84%
main: 83%

Build:
Build:
LAST BUILD BRANCH: ENGINE-7190-funding-sources-wallet-errors
DEFAULT BRANCH: main
Repo Added 11 Aug 2021 05:56PM UTC
Token cpqOE7tmCYr9nDpkBYRmOupfuD7wepQtY regen
Build 242 Last
Files 35
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH string-enum
branch: string-enum
CHANGE BRANCH
x
Reset
Sync Branches
  • string-enum
  • 050c7373
  • 3.0.0
  • ENGINE-7190-funding-sources-wallet-errors
  • KaseyCantu/chore/update-shipengine-error-enum-to-include-recently-added-shipengine-api-errors
  • KaseyCantu/fix/SE-161-add-content-description-to-package-type
  • abenz/add-default-generation-templates
  • abenz/allow-pre-release
  • abenz/autogenerate-sdk
  • abenz/fix-publish-error
  • abenz/revert-2.1-changes
  • abenz/scope-request-modifiers
  • addManifestDocs
  • allow-no-content-response
  • chores
  • configure-fix
  • dependabot/nuget/ShipEngine/Newtonsoft.Json-13.0.1
  • error-handling
  • jpill/ENGINE-6969-no_rates_returned
  • jpill/HttpClient-update
  • jpill/add-advanced-options
  • jpill/bump-to-2.3.2
  • jpill/default-error-code-as-unspecified-on-serialization
  • jpill/include-http-response-with-error
  • jpill/increase-timeout-to-60s
  • jpill/letter-label-layout-enum
  • jpill/modify-request-from-client
  • jpill/sdk-customs-quantity
  • jpill/update-converters
  • jpill/update-error-enum
  • jpill/update-system-text-json
  • jpill/update-system-text-json-version
  • jpill/upgrade-framework-and-nuget-packages
  • main
  • refs/tags/v1.0.5
  • refs/tags/v1.1.2
  • return-headers
  • rkrauskopf/DX-1428-global-method-config
  • rkrauskopf/DX-1432-invalid-timeout
  • rkrauskopf/DX-1510-implement-retries
  • rkrauskopf/DX-2323-create-label-from-rate
  • rkrauskopf/DX-2326-list-carriers
  • rkrauskopf/DX-2327-track-carrier-code-and-num
  • rkrauskopf/DX-2328
  • rkrauskopf/DX-2329-validate-address
  • rkrauskopf/DX-2330-void-label-id-methods
  • rkrauskopf/DX-2331-user-agent-string
  • rkrauskopf/DX-2332-enum-errors
  • rkrauskopf/DX-2345-refactor
  • rkrauskopf/DX-2715-2716-DTO-issues
  • rkrauskopf/DX-923-setup-cd
  • rkrauskopf/DX-924-add-badges-to-readme
  • rkrauskopf/coveralls-troubleshooting
  • rkrauskopf/create-label-from-rate-docs
  • rkrauskopf/create-label-from-shipment
  • rkrauskopf/dx-2325-get-rates
  • rkrauskopf/namespace-refactor
  • rkrauskopf/refactor
  • shipengine-sdk
  • update-nuget-publish-action

25 Jun 2024 10:18PM UTC coverage: 84.271% (-1.1%) from 85.36%
9670357484

Pull #92

github

joshuaflanagan
Demonstrate backward-compatible deprecation of enums

I would like to get rid of using C# enums in the SDK. They unnecessarily constrain the
values that a user can send to the ShipEngine API. The API expects a string, the SDK
should allow the user to specify a string. An enum requires converting values to an integer,
which has no value for our purposes. It also leads to awkwardness when the default is `0`,
which will correspond to an enum value we don't necessarily want. It requires the user
to update their SDK any time there is a new possible value accepted by the API.
We can still provide guidance for valid values via classes that expose static strings.

However, there is likely code in the wild where users are setting properties to an enum value.
This is an experiment to demonstrate using implicit conversion operators, and a custom JsonConverter,
to allow a user to set a "string enum" value using a string or an enum.
Pull Request #92: Demonstrate backward-compatible deprecation of enums

44 of 78 branches covered (56.41%)

Branch coverage included in aggregate %.

46 of 58 new or added lines in 2 files covered. (79.31%)

690 of 793 relevant lines covered (87.01%)

14.79 hits per line

Relevant lines Covered
Build:
Build:
793 RELEVANT LINES 690 COVERED LINES
14.79 HITS PER LINE
Source Files on string-enum
  • Tree
  • List 31
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
9670357484 string-enum Demonstrate backward-compatible deprecation of enums I would like to get rid of using C# enums in the SDK. They unnecessarily constrain the values that a user can send to the ShipEngine API. The API expects a string, the SDK should allow the user... Pull #92 25 Jun 2024 10:19PM UTC joshuaflanagan github
84.27
See All Builds (173)

Badge your Repo: shipengine-dotnet

We detected this repo isn’t badged! Grab the embed code to the right, add it to your repo to show off your code coverage, and when the badge is live hit the refresh button to remove this message.

Could not find badge in README.

Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

Refresh
  • Settings
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc