Class: Anthropic::Models::Beta::Organization::BetaAnalyticsCoreCodeMetrics

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/anthropic/models/beta/organization/beta_analytics_core_code_metrics.rb,
sig/anthropic/models/beta/organization/beta_analytics_core_code_metrics.rbs

Instance Attribute Summary collapse

Instance Method Summary collapse

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(artifacts_created_count:, commit_count:, distinct_session_count:, lines_of_code:, pull_request_count:) ⇒ BetaAnalyticsCoreCodeMetrics

Core Claude Code activity metrics for a single user on a given day.

Some parameter documentations has been truncated, see Anthropic::Models::Beta::Organization::BetaAnalyticsCoreCodeMetrics for more details.

Parameters:

  • artifacts_created_count (Integer) —

    Number of artifacts created in Claude Code sessions: an artifact counts once, on

  • commit_count (Integer) —

    Number of commits made via Claude Code

  • distinct_session_count (Integer, nil) —

    Number of distinct Claude Code sessions. On aggregated rows and in date-range mo

  • lines_of_code (Anthropic::Models::Beta::Organization::BetaAnalyticsLinesOfCode) —

    Lines of code added and removed via Claude Code.

  • pull_request_count (Integer) —

    Number of pull requests created via Claude Code

  • artifacts_created_count: (Integer)
  • commit_count: (Integer)
  • distinct_session_count: (Integer, nil)
  • lines_of_code: (Anthropic::Beta::Organization::BetaAnalyticsLinesOfCode)
  • pull_request_count: (Integer)


# File 'lib/anthropic/models/beta/organization/beta_analytics_core_code_metrics.rb', line 44

Instance Attribute Details

#artifacts_created_count ⇒ Integer

Number of artifacts created in Claude Code sessions: an artifact counts once, on the day a session first saves it. Counted from 2026-08-17; 0 on earlier days. Exact in date-range mode: a creation belongs to exactly one day, so the per-day counts never overlap and their sum over the window is the exact count of distinct creations in it.

Parameters:

  • value (Integer)

Returns:

  • (Integer)


16
# File 'lib/anthropic/models/beta/organization/beta_analytics_core_code_metrics.rb', line 16

required :artifacts_created_count, Integer

#commit_count ⇒ Integer

Number of commits made via Claude Code

Parameters:

  • value (Integer)

Returns:

  • (Integer)


22
# File 'lib/anthropic/models/beta/organization/beta_analytics_core_code_metrics.rb', line 22

required :commit_count, Integer

#distinct_session_count ⇒ Integer?

Number of distinct Claude Code sessions. On aggregated rows and in date-range mode: summed per-day distinct counts. A session essentially never spans a UTC day, so the sum is in practice the true distinct count.

Parameters:

  • value (Integer, nil)

Returns:

  • (Integer, nil)


30
# File 'lib/anthropic/models/beta/organization/beta_analytics_core_code_metrics.rb', line 30

required :distinct_session_count, Integer, nil?: true

#lines_of_code ⇒ Anthropic::Models::Beta::Organization::BetaAnalyticsLinesOfCode

Lines of code added and removed via Claude Code.

Parameters:

  • value (Anthropic::Beta::Organization::BetaAnalyticsLinesOfCode)

Returns:



36
# File 'lib/anthropic/models/beta/organization/beta_analytics_core_code_metrics.rb', line 36

required :lines_of_code, -> { Anthropic::Beta::Organization::BetaAnalyticsLinesOfCode }

#pull_request_count ⇒ Integer

Number of pull requests created via Claude Code

Parameters:

  • value (Integer)

Returns:

  • (Integer)


42
# File 'lib/anthropic/models/beta/organization/beta_analytics_core_code_metrics.rb', line 42

required :pull_request_count, Integer

Instance Method Details

#to_hash ⇒ { artifacts_created_count: Integer, commit_count: Integer, distinct_session_count: Integer?, lines_of_code: Anthropic::Beta::Organization::BetaAnalyticsLinesOfCode, pull_request_count: Integer }

Returns:

  • ({ artifacts_created_count: Integer, commit_count: Integer, distinct_session_count: Integer?, lines_of_code: Anthropic::Beta::Organization::BetaAnalyticsLinesOfCode, pull_request_count: Integer })


33
34
35
36
37
38
39
# File 'sig/anthropic/models/beta/organization/beta_analytics_core_code_metrics.rbs', line 33

def to_hash: -> {
  artifacts_created_count: Integer,
  commit_count: Integer,
  distinct_session_count: Integer?,
  lines_of_code: Anthropic::Beta::Organization::BetaAnalyticsLinesOfCode,
  pull_request_count: Integer
}