listBillingViewSegments

abstract suspend fun listBillingViewSegments(input: ListBillingViewSegmentsRequest = ListBillingViewSegmentsRequest { }): ListBillingViewSegmentsResponse

Lists the segments of a billing view over a given time period. Each segment identifies the billing domain (PRO_FORMA or BILLABLE) and the account relationships that apply during its time range.

If you don't provide an arn, the response includes segments for the caller's PRIMARY billing view.

If a mid-period change occurs, the response includes multiple segments, each with its own time range. The response omits hidden segments, so the segments it returns might not cover the entire requested time period.

Samples

// Invoke ListBillingViewSegments
val resp = billingClient.listBillingViewSegments {
    timeRange = BillingViewSegmentTimeRange {
        beginDateInclusive = Instant.fromEpochSeconds(1719792000, 0)
        endDateExclusive = Instant.fromEpochSeconds(1722470400, 0)
    }
}