Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fedex/restapi/shippingprovider #47

Merged
merged 6 commits into from
May 15, 2024
Merged

Conversation

ucrengineer
Copy link
Collaborator

Update FedEx rate and shipment provider and related tests

Brandon Moffett added 6 commits May 13, 2024 14:46
… simplicity

Updated various properties in FedExShipmentProvider and related classes for better flexibility and simplicity. Made `FreightOnValue` nullable and changed `EncodedLabel` type to byte[]. Added new enum member to `ShippingDocumentType`. Set `ServiceType` and `PackagingType` dynamically. Added `Dimensions`, `LabelPrintingOrientation`, `LabelRotation`, and `CustomerImageUsages` properties. Simplified `RequestedDocumentTypes` and `Bytes` properties. Changed `PaymentType` from `RECIPIENT` to `SENDER`. Updated `FedExShipmentProviderTests` to save labels as PNG and modified the `international` address.
Added `System.Reflection.Emit` namespace to `FedExShipmentProvider.cs` for metadata and MSIL emission. Introduced `EmailNotificationDetail` object to `FedExShipmentProvider` class for detailed email notifications. Updated `PaymentType` to be dynamic based on `shipmentDetails.PaymentType.Name`. Implemented `CancelShipmentAsync` method in `FedExShipmentProvider` class to handle shipment cancellations and log exceptions. Uncommented test lines in `FedExShipmentProviderTests` to include shipment cancellation tests.
This commit enhances the functionality of the FedEx rate provider and related tests. Changes include setting the `AccountNumber` directly in `FedexRateProvider.cs`, adding `StateOrProvinceCode` and `City` properties for `Shipper` and `Recipient` addresses, and setting `PackageSpecialServices` based on the `SignatureRequiredOnDelivery` flag. A condition is added to check for non-US `DestinationAddress` and set `CustomsClearanceDetail` accordingly. In `FedExShipmentProvider.cs`, the `CommercialInvoice` property is now set with `SpecialInstructions`. Lastly, the output line in `FedExRateProviderTests.cs` now includes the full name of the `rateService` type.
@ucrengineer ucrengineer merged commit 1052186 into master May 15, 2024
1 check passed
@ucrengineer ucrengineer deleted the fedex/restapi/shippingprovider branch May 15, 2024 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant