Skip to content

Commit 5fab866

Browse files
authored
Merge pull request #82 from easykeys/version/6.4.1
update rate provider dimensions values
2 parents 0c00f54 + b3ddf9e commit 5fab866

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

GitVersion.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
mode: ContinuousDelivery
2-
next-version: 6.4.0
2+
next-version: 6.4.1
33
increment: Patch
44
major-version-bump-message: '\+semver:\s?(breaking|major|release)'
55
minor-version-bump-message: '\+semver:\s?(feat|feature|minor)'

src/EasyKeys.Shipping.Abstractions/Models/Dimensions.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ public Dimensions(
1818

1919
public decimal Length { get; set; }
2020

21-
public decimal RoundedLength => Math.Ceiling(Length);
21+
public decimal RoundedLength => Math.Max(1, Math.Ceiling(Length));
2222

2323
public decimal Width { get; set; }
2424

25-
public decimal RoundedWidth => Math.Ceiling(Width);
25+
public decimal RoundedWidth => Math.Max(1, Math.Ceiling(Width));
2626

2727
public decimal Height { get; set; }
2828

29-
public decimal RoundedHeight => Math.Ceiling(Height);
29+
public decimal RoundedHeight => Math.Max(1, Math.Ceiling(Height));
3030

3131
/// <summary>
3232
/// Package measurement is (w*2) + (h*2) + l.

src/EasyKeys.Shipping.FedEx.Rates/RestApi/Impl/FedexRateProvider.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ public async Task<Shipment> GetRatesAsync(Shipment shipment, FedExServiceType? s
7676
{
7777
Dimensions = new RequestePackageLineItemDimensions
7878
{
79-
Length = (int)x.Dimensions.Length,
80-
Width = (int)x.Dimensions.Width,
81-
Height = (int)x.Dimensions.Height,
79+
Length = (int)x.Dimensions.RoundedLength,
80+
Width = (int)x.Dimensions.RoundedWidth,
81+
Height = (int)x.Dimensions.RoundedHeight,
8282
Units = "IN"
8383
},
8484
Weight = new Weight_2

0 commit comments

Comments
 (0)