Class: Anthropic::Models::Beta::Organization::Analytics::CostReportListParams
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Anthropic::Models::Beta::Organization::Analytics::CostReportListParams
- Extended by:
- Internal::Type::RequestParameters::Converter
- Includes:
- Internal::Type::RequestParameters
- Defined in:
- lib/anthropic/models/beta/organization/analytics/cost_report_list_params.rb,
sig/anthropic/models/beta/organization/analytics/cost_report_list_params.rbs
Overview
Defined Under Namespace
Modules: BucketWidth, GroupBy, Speed
Instance Attribute Summary collapse
-
#bucket_width ⇒ Symbol, ...
Time bucket granularity.
-
#claude_tag_categories ⇒ Array<Symbol, Anthropic::Models::Beta::Organization::BetaAnalyticsClaudeTagCategory>?
Filter to Claude Tag (Claude in Slack) usage in specific spend categories.
-
#claude_tag_user_ids ⇒ Array<String>?
Filter to Claude Tag (Claude in Slack) usage attributed to specific Slack users, by Slack user ID (for example
U0123ABCDEF), not claude.ai user ID. -
#context_windows ⇒ Array<Symbol, Anthropic::Models::Beta::Organization::BetaAnalyticsContextWindow>?
Filter to specific context-window pricing tiers.
-
#ending_at ⇒ Time?
End of range, exclusive.
-
#group_by ⇒ Array<Symbol, Anthropic::Models::Beta::Organization::Analytics::CostReportListParams::GroupBy>?
Dimensions to break each time bucket out by.
-
#inference_geos ⇒ Array<Symbol, Anthropic::Models::Beta::Organization::BetaAnalyticsInferenceGeoFilter>?
Filter to specific inference regions.
-
#limit ⇒ Integer?
Maximum number of time buckets per page.
-
#models ⇒ Array<String>?
Models to include.
-
#page ⇒ String?
Opaque cursor from a previous response's
next_pagefield. -
#products ⇒ Array<Symbol, Anthropic::Models::Beta::Organization::BetaAnalyticsProductFilter>?
Product surfaces to include.
-
#rbac_group_ids ⇒ Array<String>?
Filter to usage attributed to specific RBAC groups.
-
#slack_channel_ids ⇒ Array<String>?
Filter to usage originating from specific Slack channels.
-
#speeds ⇒ Array<Symbol, Anthropic::Models::Beta::Organization::Analytics::CostReportListParams::Speed>?
Filter to fast or standard inference mode.
-
#starting_at ⇒ Time
Start of range, inclusive.
-
#user_ids ⇒ Array<String>?
Filter to specific users by tagged user ID.
Attributes included from Internal::Type::RequestParameters
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(starting_at:, bucket_width: nil, claude_tag_categories: nil, claude_tag_user_ids: nil, context_windows: nil, ending_at: nil, group_by: nil, inference_geos: nil, limit: nil, models: nil, page: nil, products: nil, rbac_group_ids: nil, slack_channel_ids: nil, speeds: nil, user_ids: nil, request_options: {}) ⇒ CostReportListParams
constructor
Some parameter documentations has been truncated, see CostReportListParams for more details.
- #to_hash ⇒ { starting_at: Time, bucket_width: Anthropic::Models::Beta::Organization::Analytics::CostReportListParams::bucket_width, claude_tag_categories: ::Array[Anthropic::Models::Beta::Organization::beta_analytics_claude_tag_category]?, claude_tag_user_ids: ::Array[String]?, context_windows: ::Array[Anthropic::Models::Beta::Organization::beta_analytics_context_window]?, ending_at: Time?, group_by: ::Array[Anthropic::Models::Beta::Organization::Analytics::CostReportListParams::group_by]?, inference_geos: ::Array[Anthropic::Models::Beta::Organization::beta_analytics_inference_geo_filter]?, limit: Integer?, models: ::Array[String]?, page: String?, products: ::Array[Anthropic::Models::Beta::Organization::beta_analytics_product_filter]?, rbac_group_ids: ::Array[String]?, slack_channel_ids: ::Array[String]?, speeds: ::Array[Anthropic::Models::Beta::Organization::Analytics::CostReportListParams::speed]?, user_ids: ::Array[String]?, request_options: Anthropic::RequestOptions }
Methods included from Internal::Type::RequestParameters::Converter
Methods included from Internal::Type::RequestParameters
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(starting_at:, bucket_width: nil, claude_tag_categories: nil, claude_tag_user_ids: nil, context_windows: nil, ending_at: nil, group_by: nil, inference_geos: nil, limit: nil, models: nil, page: nil, products: nil, rbac_group_ids: nil, slack_channel_ids: nil, speeds: nil, user_ids: nil, request_options: {}) ⇒ CostReportListParams
Some parameter documentations has been truncated, see Anthropic::Models::Beta::Organization::Analytics::CostReportListParams for more details.
|
|
# File 'lib/anthropic/models/beta/organization/analytics/cost_report_list_params.rb', line 155
|
Instance Attribute Details
#bucket_width ⇒ Symbol, ...
Time bucket granularity.
24 25 |
# File 'lib/anthropic/models/beta/organization/analytics/cost_report_list_params.rb', line 24 optional :bucket_width, enum: -> { Anthropic::Beta::Organization::Analytics::CostReportListParams::BucketWidth } |
#claude_tag_categories ⇒ Array<Symbol, Anthropic::Models::Beta::Organization::BetaAnalyticsClaudeTagCategory>?
Filter to Claude Tag (Claude in Slack) usage in specific spend categories. Usage
with no category never matches. Use group_by[]=claude_tag_category to break
out per-category values.
33 34 35 36 37 |
# File 'lib/anthropic/models/beta/organization/analytics/cost_report_list_params.rb', line 33 optional :claude_tag_categories, -> { Anthropic::Internal::Type::ArrayOf[enum: Anthropic::Beta::Organization::BetaAnalyticsClaudeTagCategory] }, nil?: true |
#claude_tag_user_ids ⇒ Array<String>?
Filter to Claude Tag (Claude in Slack) usage attributed to specific Slack users,
by Slack user ID (for example U0123ABCDEF), not claude.ai user ID. Usage that
is not Claude Tag, and Claude Tag usage not attributed to a single user, never
matches. Use group_by[]=claude_tag_user_id to break out per-user values.
46 |
# File 'lib/anthropic/models/beta/organization/analytics/cost_report_list_params.rb', line 46 optional :claude_tag_user_ids, Anthropic::Internal::Type::ArrayOf[String], nil?: true |
#context_windows ⇒ Array<Symbol, Anthropic::Models::Beta::Organization::BetaAnalyticsContextWindow>?
Filter to specific context-window pricing tiers. Use group_by[]=context_window
to break out per-tier values.
53 54 55 56 57 |
# File 'lib/anthropic/models/beta/organization/analytics/cost_report_list_params.rb', line 53 optional :context_windows, -> { Anthropic::Internal::Type::ArrayOf[enum: Anthropic::Beta::Organization::BetaAnalyticsContextWindow] }, nil?: true |
#ending_at ⇒ Time?
End of range, exclusive. When omitted, defaults to the earlier of now and
starting_at + 31 days. The range may span at most 31 days.
64 |
# File 'lib/anthropic/models/beta/organization/analytics/cost_report_list_params.rb', line 64 optional :ending_at, Time, nil?: true |
#group_by ⇒ Array<Symbol, Anthropic::Models::Beta::Organization::Analytics::CostReportListParams::GroupBy>?
Dimensions to break each time bucket out by. Defaults to no grouping (one total per bucket). Each bucket reports at most its top 100 groups; a group beyond that cap has no row in that bucket (there is no remainder row), so grouped buckets are not exhaustive when a dimension has more than 100 distinct values.
73 74 75 76 77 |
# File 'lib/anthropic/models/beta/organization/analytics/cost_report_list_params.rb', line 73 optional :group_by, -> { Anthropic::Internal::Type::ArrayOf[enum: Anthropic::Beta::Organization::Analytics::CostReportListParams::GroupBy] }, nil?: true |
#inference_geos ⇒ Array<Symbol, Anthropic::Models::Beta::Organization::BetaAnalyticsInferenceGeoFilter>?
Filter to specific inference regions. not_available matches rows where the
region is unset. Use group_by[]=inference_geo to break out per-region values.
84 85 86 87 88 |
# File 'lib/anthropic/models/beta/organization/analytics/cost_report_list_params.rb', line 84 optional :inference_geos, -> { Anthropic::Internal::Type::ArrayOf[enum: Anthropic::Beta::Organization::BetaAnalyticsInferenceGeoFilter] }, nil?: true |
#limit ⇒ Integer?
Maximum number of time buckets per page. Defaults and caps vary by
bucket_width (1d: default 7, max 31; 1h: default 24, max 168; 1m:
default 60, max 256).
96 |
# File 'lib/anthropic/models/beta/organization/analytics/cost_report_list_params.rb', line 96 optional :limit, Integer, nil?: true |
#models ⇒ Array<String>?
Models to include. Defaults to all models. Use group_by[]=model to break out
per-model values.
103 |
# File 'lib/anthropic/models/beta/organization/analytics/cost_report_list_params.rb', line 103 optional :models, Anthropic::Internal::Type::ArrayOf[String], nil?: true |
#page ⇒ String?
Opaque cursor from a previous response's next_page field.
109 |
# File 'lib/anthropic/models/beta/organization/analytics/cost_report_list_params.rb', line 109 optional :page, String, nil?: true |
#products ⇒ Array<Symbol, Anthropic::Models::Beta::Organization::BetaAnalyticsProductFilter>?
Product surfaces to include. Defaults to all products. Use group_by[]=product
to break out per-product values.
116 117 118 119 120 |
# File 'lib/anthropic/models/beta/organization/analytics/cost_report_list_params.rb', line 116 optional :products, -> { Anthropic::Internal::Type::ArrayOf[enum: Anthropic::Beta::Organization::BetaAnalyticsProductFilter] }, nil?: true |
#rbac_group_ids ⇒ Array<String>?
Filter to usage attributed to specific RBAC groups. Accepts tagged RBAC group
IDs (rbac_group_...) or bare group UUIDs. A row matches when the user belonged
to any of the listed groups on the (UTC) day the usage occurred; usage with no
group attribution never matches.
129 |
# File 'lib/anthropic/models/beta/organization/analytics/cost_report_list_params.rb', line 129 optional :rbac_group_ids, Anthropic::Internal::Type::ArrayOf[String], nil?: true |
#slack_channel_ids ⇒ Array<String>?
Filter to usage originating from specific Slack channels. Use
group_by[]=slack_channel_id to break out per-channel values.
136 |
# File 'lib/anthropic/models/beta/organization/analytics/cost_report_list_params.rb', line 136 optional :slack_channel_ids, Anthropic::Internal::Type::ArrayOf[String], nil?: true |
#speeds ⇒ Array<Symbol, Anthropic::Models::Beta::Organization::Analytics::CostReportListParams::Speed>?
Filter to fast or standard inference mode. Use group_by[]=speed to break out
per-mode values.
143 144 145 146 147 |
# File 'lib/anthropic/models/beta/organization/analytics/cost_report_list_params.rb', line 143 optional :speeds, -> { Anthropic::Internal::Type::ArrayOf[enum: Anthropic::Beta::Organization::Analytics::CostReportListParams::Speed] }, nil?: true |
#starting_at ⇒ Time
Start of range, inclusive. RFC 3339 tz-aware. Must be within the last 365 days and no earlier than 2026-01-01T00:00:00Z.
18 |
# File 'lib/anthropic/models/beta/organization/analytics/cost_report_list_params.rb', line 18 required :starting_at, Time |
#user_ids ⇒ Array<String>?
Filter to specific users by tagged user ID.
153 |
# File 'lib/anthropic/models/beta/organization/analytics/cost_report_list_params.rb', line 153 optional :user_ids, Anthropic::Internal::Type::ArrayOf[String], nil?: true |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/anthropic/models/beta/organization/analytics/cost_report_list_params.rb', line 202
|
Instance Method Details
#to_hash ⇒ { starting_at: Time, bucket_width: Anthropic::Models::Beta::Organization::Analytics::CostReportListParams::bucket_width, claude_tag_categories: ::Array[Anthropic::Models::Beta::Organization::beta_analytics_claude_tag_category]?, claude_tag_user_ids: ::Array[String]?, context_windows: ::Array[Anthropic::Models::Beta::Organization::beta_analytics_context_window]?, ending_at: Time?, group_by: ::Array[Anthropic::Models::Beta::Organization::Analytics::CostReportListParams::group_by]?, inference_geos: ::Array[Anthropic::Models::Beta::Organization::beta_analytics_inference_geo_filter]?, limit: Integer?, models: ::Array[String]?, page: String?, products: ::Array[Anthropic::Models::Beta::Organization::beta_analytics_product_filter]?, rbac_group_ids: ::Array[String]?, slack_channel_ids: ::Array[String]?, speeds: ::Array[Anthropic::Models::Beta::Organization::Analytics::CostReportListParams::speed]?, user_ids: ::Array[String]?, request_options: Anthropic::RequestOptions }
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'sig/anthropic/models/beta/organization/analytics/cost_report_list_params.rbs', line 87
def to_hash: -> {
starting_at: Time,
bucket_width: Anthropic::Models::Beta::Organization::Analytics::CostReportListParams::bucket_width,
claude_tag_categories: ::Array[Anthropic::Models::Beta::Organization::beta_analytics_claude_tag_category]?,
claude_tag_user_ids: ::Array[String]?,
context_windows: ::Array[Anthropic::Models::Beta::Organization::beta_analytics_context_window]?,
ending_at: Time?,
group_by: ::Array[Anthropic::Models::Beta::Organization::Analytics::CostReportListParams::group_by]?,
inference_geos: ::Array[Anthropic::Models::Beta::Organization::beta_analytics_inference_geo_filter]?,
limit: Integer?,
models: ::Array[String]?,
page: String?,
products: ::Array[Anthropic::Models::Beta::Organization::beta_analytics_product_filter]?,
rbac_group_ids: ::Array[String]?,
slack_channel_ids: ::Array[String]?,
speeds: ::Array[Anthropic::Models::Beta::Organization::Analytics::CostReportListParams::speed]?,
user_ids: ::Array[String]?,
request_options: Anthropic::RequestOptions
}
|