Skip to content

Commit cdac264

Browse files
ampravinrVeryEarly
andauthored
Pricesheet sync API next page link fix (Skip token getting trimmed) (#21249)
* Remove trimming of skipToken * Added description to the change logs * Update ChangeLog.md --------- Co-authored-by: Yabo Hu <[email protected]>
1 parent 72f7324 commit cdac264

File tree

2 files changed

+1
-14
lines changed

2 files changed

+1
-14
lines changed

src/Billing/Billing/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- Additional information about change #1
1919
-->
2020
## Upcoming Release
21+
* Fixed pagination for `Get-AzConsumptionPriceSheet` cmdlet
2122

2223
## Version 2.0.0
2324
* Added `Get-AzBillingAccount` cmdlet

src/Billing/Consumption/Cmdlets/GetAzureRmConsumptionPriceSheet.cs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,6 @@ public override void ExecuteCmdlet()
6868
expand, skipToken, numberToFetch);
6969
UpdateResult(result, priceSheet);
7070
nextLink = priceSheet?.NextLink;
71-
if (!string.IsNullOrWhiteSpace(nextLink))
72-
{
73-
skipToken =
74-
nextLink.Substring(
75-
nextLink.LastIndexOf("skiptoken", StringComparison.InvariantCultureIgnoreCase) + 10);
76-
skipToken = skipToken.Substring(0, 12);
77-
}
7871
} while (!this.Top.HasValue && !string.IsNullOrWhiteSpace(nextLink));
7972
}
8073
else
@@ -84,13 +77,6 @@ public override void ExecuteCmdlet()
8477
priceSheet = ConsumptionManagementClient.PriceSheet.Get(expand, skipToken, numberToFetch);
8578
UpdateResult(result, priceSheet);
8679
nextLink = priceSheet?.NextLink;
87-
if (!string.IsNullOrWhiteSpace(nextLink))
88-
{
89-
skipToken =
90-
nextLink.Substring(
91-
nextLink.LastIndexOf("skiptoken", StringComparison.InvariantCultureIgnoreCase) + 10);
92-
skipToken = skipToken.Substring(0, 12);
93-
}
9480
} while (!this.Top.HasValue && !string.IsNullOrWhiteSpace(nextLink));
9581
}
9682
}

0 commit comments

Comments
 (0)