-
Notifications
You must be signed in to change notification settings - Fork 60
Get-PartnerInvoiceLineItem gives no Error Message #202
Comments
@fjsebk thank you for bring this information. With the upcoming release there have been a number of enhancements that will help address this issue. Also, diagnostic information is being added to each command so if an error is not returned you will be able to actually see the response from the API just by specifying the With all of this in mind the root cause for this particular issue should be addressed with the upcoming release. |
I updated the module to version 3.0.0 and still have the same issue. Or does it not give me an errormessage because it is the same errormessage as the last or the first error? Get-PartnerInvoiceLineItem : Invoice Line Item type is not valid.
PATH2\INVOICEID - OneTime - Billing.xlsx
PATH2\INVOICEID - OneTime - Usage.xlsx
PATH2\INVOICEID - Marketplace - Billing.xlsx
PATH2\INVOICEID - Marketplace - Usage.xlsx
(PATH, INVOICEID and PATH2 was used to blank the data) |
The idea was to get the files and invoices provided through CSP via an API which I wanted to code. The problem here is that I get some but not all files and sometimes not even an errormessage.
Steps to reproduce
Connect-PartnerCenter
$path = "C:\tmp"
$d = Get-PartnerInvoice
$d | ForEach-Object {$ivid = $.InvoiceId
$pathname = $path + $.InvoiceDate.Year + "" + $.InvoiceDate.Year + "" + $_.InvoiceDate.Month
$pathname2 = $pathname + "" + $ivid + " - Azure - Billing" + ".xlsx"
$pathname2
start-sleep 5
Get-PartnerInvoiceStatement -InvoiceId $ivid -OutputPath $pathname -Overwrite
Get-PartnerInvoiceLineItem -BillingProvider Azure -InvoiceId $ivid -LineItemType BillingLineItems -CurrencyCode 'Euro' | Export-Excel $pathname2
$pathname2 = $pathname + "" + $ivid + " - Azure - Usage" + ".xlsx"
$pathname2
start-sleep 5
Get-PartnerInvoiceLineItem -BillingProvider Azure -InvoiceId $ivid -LineItemType UsageLineItems -CurrencyCode 'Euro' | Export-Excel $pathname2
$pathname2 = $pathname + "" + $ivid + " - Office - Billing" + ".xlsx"
$pathname2
start-sleep 5
Get-PartnerInvoiceLineItem -BillingProvider Office -InvoiceId $ivid -LineItemType BillingLineItems -CurrencyCode 'Euro' | Export-Excel $pathname2
$pathname2 = $pathname + "" + $ivid + " - Office - Usage" + ".xlsx"
$pathname2
start-sleep 5
Get-PartnerInvoiceLineItem -BillingProvider Office -InvoiceId $ivid -LineItemType UsageLineItems -CurrencyCode 'Euro' | Export-Excel $pathname2
$pathname2 = $pathname + "" + $ivid + " - OneTime - Billing" + ".xlsx"
$pathname2
start-sleep 5
Get-PartnerInvoiceLineItem -BillingProvider OneTime -InvoiceId $ivid -LineItemType BillingLineItems -CurrencyCode 'Euro' | Export-Excel $pathname2
$pathname2 = $pathname + "" + $ivid + " - OneTime - Usage" + ".xlsx"
$pathname2
start-sleep 5
Get-PartnerInvoiceLineItem -BillingProvider OneTime -InvoiceId $ivid -LineItemType UsageLineItems -CurrencyCode 'Euro' | Export-Excel $pathname2
$pathname2 = $pathname + "" + $ivid + " - Marketplace - Billing" + ".xlsx"
$pathname2
start-sleep 5
Get-PartnerInvoiceLineItem -BillingProvider Marketplace -InvoiceId $ivid -LineItemType BillingLineItems -CurrencyCode 'Euro' | Export-Excel $pathname2
$pathname2 = $pathname + "" + $ivid + " - Marketplace - Usage" + ".xlsx"
$pathname2
start-sleep 5
Get-PartnerInvoiceLineItem -BillingProvider Marketplace -InvoiceId $ivid -LineItemType UsageLineItems -CurrencyCode 'Euro' | Export-Excel $pathname2
Write-Host "-----------------"
start-sleep 5
}
Expected behavior
To get the files / data I needed
Actual behavior
It gives me errors that the 'Invoice Line Item type is not valid.' which is okay for me. But sometimes I get the following:
Get-PartnerInvoiceLineItem :
as you can see it states no error at all or even what's wrong with it. It doesn't matter if it is 'Office', 'OneTime' or something else, I get it on several statements with both (BillingLineItems and UsageLineItems). (The start-sleep-statements were added for debugging reasons and should not be the problem I think)
Environment
Script 2.0.1909.5 PartnerCenter {Add-PartnerCustomerCartLineItem, Add-PartnerCustomerUserRoleMember, Connect-PartnerCenter, Disconnect-PartnerCenter...}
Help is highly appreciated.
Best regards
The text was updated successfully, but these errors were encountered: