batchCreateBillingAdjustmentRequest

Allows sellers (proposers) to submit billing adjustment requests for one or more invoices within an agreement. Each entry in the batch specifies an invoice and the adjustment amount. The operation returns successfully created adjustment request IDs and any errors for entries that failed validation.

Each entry requires a unique clientToken for idempotency. A ValidationException is returned if the adjustment amount exceeds the maximum refundable amount for the invoice.

Samples

import aws.sdk.kotlin.services.marketplaceagreement.model.BatchCreateBillingAdjustmentRequestEntry
import aws.sdk.kotlin.services.marketplaceagreement.model.BillingAdjustmentReasonCode

fun main() { 
   //sampleStart 
   // Create billing adjustment requests
val resp = marketplaceAgreementClient.batchCreateBillingAdjustmentRequest {
    billingAdjustmentRequestEntries = listOf<BatchCreateBillingAdjustmentRequestEntry>(
        BatchCreateBillingAdjustmentRequestEntry {
            originalInvoiceId = "E2E20230929a108cfae"
            agreementId = "agmt-SvIzsqYMyQwI3GWgJAe17URx"
            adjustmentAmount = "500.00"
            currencyCode = "USD"
            clientToken = "71a5e82e-a49b-4075-8c7f-52df1d294379"
            adjustmentReasonCode = BillingAdjustmentReasonCode.fromValue("OTHER")
            description = "Customer requested adjustment due to service outage during critical business period."
        }            
    )
} 
   //sampleEnd
}