Skip to content

Commit

Permalink
Merge pull request #107 from ShipEngine/ENGINE-7190-funding-sources-w…
Browse files Browse the repository at this point in the history
…allet-errors

Added error codes for funding sources errors
  • Loading branch information
ChristianCasado authored Jan 9, 2025
2 parents 3c0020e + 91cee04 commit 00642a7
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 14 deletions.
20 changes: 11 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Changelog


## 1.0.0

### Features
Expand All @@ -16,15 +15,13 @@ Implement the following SDK methods.
- `CreateLabelFromRate`
- `GetRatesWithShipmentDetails`


## 1.0.7

### Features

Implement the following SDK methods.
- `CreateImplicitManifest`


- `CreateImplicitManifest`

## 1.1.0

Expand All @@ -41,7 +38,6 @@ Rename LabelDownload method to the more generic Download

Some documentation linking errors and minor typos


## 1.1.1

### Added
Expand All @@ -52,7 +48,6 @@ Some documentation linking errors and minor typos

The Customs Item Quantity type has been changed to integer type for CreateLabelFromShipmentDetails model.


## 1.1.2

### Fixed
Expand Down Expand Up @@ -150,7 +145,7 @@ Updated nuget package dependencies

### Added

- Created new SDK methods for the entire API that sit next to the pre-existing methods. The pre-existing methods will be deprecated eventually.
- Created new SDK methods for the entire API that sit next to the pre-existing methods. The pre-existing methods will be deprecated eventually.

## 2.2.0

Expand All @@ -175,7 +170,7 @@ Fixed handling of No Content responses

- Added ability to scope request modifiers by using the `.WithRequestModifier()` method instead of the `.ModifyRequest` property.
This will allow consumers to modify a single request without affecting any other consumers of the client. It also allows for
multiple modifiers to be added. For example, a modifier could be added at the global level that applies to all requests and then
multiple modifiers to be added. For example, a modifier could be added at the global level that applies to all requests and then
another modifier can be added for a single request.

## 2.3.1
Expand All @@ -200,4 +195,11 @@ Fixed handling of No Content responses

### Added

- Added error code MultipackageNotSupported
- Added error code MultipackageNotSupported

## 2.3.5

### Added

- Added error code FundingSourceMissingConfiguration
- Added error code FundingSourceError
12 changes: 12 additions & 0 deletions ShipEngineSDK/Enums/ErrorCode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,18 @@ public enum ErrorCode
[EnumMember(Value = "webhook_event_type_conflict")]
WebhookEventTypeConflict,

/// <summary>
/// Funding source isnt properly configured and can't be used.
/// </summary>
[EnumMember(Value = "funding_source_missing_configuration")]
FundingSourceMissingConfiguration,

/// <summary>
/// There was an unexpected problem with a funding source.
/// </summary>
[EnumMember(Value = "funding_source_error")]
FundingSourceError,

/// <summary>
/// The attempted operation does not support multiple packages.
/// </summary>
Expand Down
14 changes: 13 additions & 1 deletion ShipEngineSDK/Enums/ErrorType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,18 @@ public enum ErrorType
/// An unknown or unexpected error occurred in our system. Or an error occurred that has not yet been assigned a specific error_type. If you receive persistent system errors, then please contact our support or check our API status page to see if there's a known issue.
/// </summary>/
[EnumMember(Value = "system")]
System
System,

/// <summary>
/// General wallet error type.
/// </summary>/
[EnumMember(Value = "wallet")]
Wallet,

Check warning on line 50 in ShipEngineSDK/Enums/ErrorType.cs

View workflow job for this annotation

GitHub Actions / .Net 8.0 on windows-latest

Check warning on line 50 in ShipEngineSDK/Enums/ErrorType.cs

View workflow job for this annotation

GitHub Actions / nuget-deploy


/// <summary>
/// General funding sources error type.
/// </summary>/
[EnumMember(Value = "funding_sources")]
FundingSources

Check warning on line 56 in ShipEngineSDK/Enums/ErrorType.cs

View workflow job for this annotation

GitHub Actions / .Net 8.0 on windows-latest

Check warning on line 56 in ShipEngineSDK/Enums/ErrorType.cs

View workflow job for this annotation

GitHub Actions / .Net 8.0 on windows-latest

Check warning on line 56 in ShipEngineSDK/Enums/ErrorType.cs

View workflow job for this annotation

GitHub Actions / nuget-deploy

}
}
2 changes: 2 additions & 0 deletions ShipEngineSDK/PublicAPI.Shipped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -873,6 +873,8 @@ ShipEngineSDK.ErrorCode.Unspecified = 35 -> ShipEngineSDK.ErrorCode
ShipEngineSDK.ErrorCode.VerificationFailure = 36 -> ShipEngineSDK.ErrorCode
ShipEngineSDK.ErrorCode.WarehouseConflict = 37 -> ShipEngineSDK.ErrorCode
ShipEngineSDK.ErrorCode.WebhookEventTypeConflict = 38 -> ShipEngineSDK.ErrorCode
ShipEngineSDK.ErrorCode.FundingSourceMissingConfiguration = 39 -> ShipEngineSDK.ErrorCode
ShipEngineSDK.ErrorCode.FundingSourceError = 40 -> ShipEngineSDK.ErrorCode
ShipEngineSDK.ErrorSource
ShipEngineSDK.ErrorSource.Carrier = 1 -> ShipEngineSDK.ErrorSource
ShipEngineSDK.ErrorSource.OrderSource = 2 -> ShipEngineSDK.ErrorSource
Expand Down
4 changes: 4 additions & 0 deletions ShipEngineSDK/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,8 @@ ShipEngineSDK.Enums.ErrorCode.Unspecified = 35 -> ShipEngineSDK.Enums.ErrorCode
ShipEngineSDK.Enums.ErrorCode.VerificationFailure = 36 -> ShipEngineSDK.Enums.ErrorCode
ShipEngineSDK.Enums.ErrorCode.WarehouseConflict = 37 -> ShipEngineSDK.Enums.ErrorCode
ShipEngineSDK.Enums.ErrorCode.WebhookEventTypeConflict = 38 -> ShipEngineSDK.Enums.ErrorCode
ShipEngineSDK.Enums.ErrorCode.FundingSourceMissingConfiguration = 39 -> ShipEngineSDK.Enums.ErrorCode
ShipEngineSDK.Enums.ErrorCode.FundingSourceError = 40 -> ShipEngineSDK.Enums.ErrorCode
ShipEngineSDK.Enums.ErrorSource
ShipEngineSDK.Enums.ErrorSource.Carrier = 1 -> ShipEngineSDK.Enums.ErrorSource
ShipEngineSDK.Enums.ErrorSource.OrderSource = 2 -> ShipEngineSDK.Enums.ErrorSource
Expand Down Expand Up @@ -5718,6 +5720,8 @@ static ShipEngineSDK.Model.ErrorCode.Unspecified.get -> ShipEngineSDK.Model.Erro
static ShipEngineSDK.Model.ErrorCode.VerificationFailure.get -> ShipEngineSDK.Model.ErrorCode!
static ShipEngineSDK.Model.ErrorCode.WarehouseConflict.get -> ShipEngineSDK.Model.ErrorCode!
static ShipEngineSDK.Model.ErrorCode.WebhookEventTypeConflict.get -> ShipEngineSDK.Model.ErrorCode!
static ShipEngineSDK.Model.ErrorCode.FundingSourceMissingConfiguration.get -> ShipEngineSDK.Model.ErrorCode!
static ShipEngineSDK.Model.ErrorCode.FundingSourceError.get -> ShipEngineSDK.Model.ErrorCode!
static ShipEngineSDK.Model.ErrorSource.Carrier.get -> ShipEngineSDK.Model.ErrorSource!
static ShipEngineSDK.Model.ErrorSource.OrderSource.get -> ShipEngineSDK.Model.ErrorSource!
static ShipEngineSDK.Model.ErrorSource.Shipengine.get -> ShipEngineSDK.Model.ErrorSource!
Expand Down
2 changes: 1 addition & 1 deletion ShipEngineSDK/ShipEngineSDK.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<PackageId>ShipEngine</PackageId>
<PackageTags>sdk;rest;api;shipping;rates;label;tracking;cost;address;validation;normalization;fedex;ups;usps;</PackageTags>

<Version>2.3.4</Version>
<Version>2.3.5</Version>
<Authors>ShipEngine</Authors>
<Company>ShipEngine</Company>
<Summary>The official ShipEngine C# SDK for .NET</Summary>
Expand Down
8 changes: 6 additions & 2 deletions generation/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -5641,7 +5641,9 @@
"validation",
"security",
"system",
"integrations"
"integrations",
"wallet",
"funding_sources"
],
"description": "The type of error\n"
},
Expand Down Expand Up @@ -5691,7 +5693,9 @@
"incompatible_paired_labels",
"invalid_charge_event",
"invalid_object",
"no_rates_returned"
"no_rates_returned",
"funding_source_missing_configuration",
"funding_source_error"
],
"description": "The error code specified for the failed API Call"
},
Expand Down
2 changes: 1 addition & 1 deletion openapitools.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"packageName": "ShipEngineSDK",
"ignoreFileOverride": "./.openapi-generator-ignore",
"additionalProperties": {
"packageVersion": "2.3.4",
"packageVersion": "2.3.5",
"targetFramework": "netstandard2.0",
"validatable": false,
"sourceFolder": "",
Expand Down

0 comments on commit 00642a7

Please sign in to comment.