Skip to content

Commit

Permalink
Merge pull request #40 from easykeys/feature/fedex/label/memo
Browse files Browse the repository at this point in the history
Feature/fedex/label/memo
  • Loading branch information
ucrengineer committed Aug 4, 2023
2 parents 8ea88db + b1e7514 commit fe3d656
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
2 changes: 1 addition & 1 deletion GitVersion.yml
@@ -1,5 +1,5 @@
mode: Mainline
next-version: 3.8.0
next-version: 3.9.0
branches:
feature:
tag: preview
Expand Down
18 changes: 18 additions & 0 deletions src/EasyKeys.Shipping.FedEx.Shipment/FedExShipmentProvider.cs
Expand Up @@ -478,6 +478,24 @@ private ProcessShipmentRequest CreateProcessShipmentRequest(ShipmentDetails deta
{
Amount = shipment.Packages[sequenceNumber].InsuredValue,
Currency = shipment.Options.GetCurrencyCode()
},
CustomerReferences = new CustomerReference[]
{
new CustomerReference
{
CustomerReferenceType = details.CustomerReferenceType.ToLower() switch
{
"customer_reference" => CustomerReferenceType.CUSTOMER_REFERENCE,
"department_number" => CustomerReferenceType.DEPARTMENT_NUMBER,
"intracountry_regulatory_reference" => CustomerReferenceType.INTRACOUNTRY_REGULATORY_REFERENCE,
"invoice_number" => CustomerReferenceType.INVOICE_NUMBER,
"po_number" => CustomerReferenceType.P_O_NUMBER,
"rma_association" => CustomerReferenceType.RMA_ASSOCIATION,
"shipment_integrity" => CustomerReferenceType.SHIPMENT_INTEGRITY,
_ => CustomerReferenceType.CUSTOMER_REFERENCE
},
Value = request.TransactionDetail.CustomerTransactionId
}
}
};

Expand Down
@@ -1,4 +1,6 @@
using EasyKeys.Shipping.Abstractions.Models;
using System.Collections;

using EasyKeys.Shipping.Abstractions.Models;
using EasyKeys.Shipping.FedEx.Abstractions.Models;
using EasyKeys.Shipping.FedEx.Rates;
using EasyKeys.Shipping.FedEx.Shipment;
Expand Down Expand Up @@ -138,11 +140,9 @@ public async Task CreateDelete_Labels_For_International_Shipments_Async()
});

var label = await _provider.CreateShipmentAsync(stype, shipment, shipmentDetails, CancellationToken.None);

Assert.NotNull(label);

Assert.True(label?.Labels.Any(x => x?.Bytes?.Count > 0));

// sometimes dev env doesnt send documents
// Assert.True(label?.Labels.Count > 1);

Expand Down

0 comments on commit fe3d656

Please sign in to comment.