Class: OpenAI::Models::Admin::Organization::UsageFileSearchCallsResponse::Data::Result::OrganizationCostsResult

Inherits:
Internal::Type::BaseModel
  • Object
show all
Defined in:
lib/openai/models/admin/organization/usage_file_search_calls_response.rb,
sig/openai/models/admin/organization/usage_file_search_calls_response.rbs

Defined Under Namespace

Classes: Amount

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], #_request_id, #_set_last_response, coerce, #deconstruct_keys, #deep_to_h, dump, #encode_with, 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, coerce_with_error, 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(amount: nil, api_key_id: nil, line_item: nil, project_id: nil, quantity: nil, quantity_unit: nil, object: :"organization.costs.result") ⇒ Object

Parameters:

  • amount (defaults to: nil)

    The monetary value in its associated currency.

  • api_key_id (defaults to: nil)

    When group_by=api_key_id, this field provides the API Key ID of the grouped costs result.

  • line_item (defaults to: nil)

    When group_by=line_item, this field provides the line item of the grouped costs result.

  • project_id (defaults to: nil)

    When group_by=project_id, this field provides the project ID of the grouped costs result.

  • quantity (defaults to: nil)

    When group_by=line_item, this field provides the quantity of the grouped costs result.

  • quantity_unit (defaults to: nil)

    The unit of the quantity value. If no single supported unit applies to the result, this field is null.



# File 'lib/openai/models/admin/organization/usage_file_search_calls_response.rb', line 1060

Instance Attribute Details

#amountOpenAI::Models::Admin::Organization::UsageFileSearchCallsResponse::Data::Result::OrganizationCostsResult::Amount?

The monetary value in its associated currency.



1012
1013
1014
1015
1016
1017
# File 'lib/openai/models/admin/organization/usage_file_search_calls_response.rb', line 1012

optional(
  :amount,
  -> {
    OpenAI::Models::Admin::Organization::UsageFileSearchCallsResponse::Data::Result::OrganizationCostsResult::Amount
  }
)

#api_key_idString?

When group_by=api_key_id, this field provides the API Key ID of the grouped costs result.

Returns:

  • (String, nil)


1024
# File 'lib/openai/models/admin/organization/usage_file_search_calls_response.rb', line 1024

optional :api_key_id, String, nil?: true

#line_itemString?

When group_by=line_item, this field provides the line item of the grouped costs result.

Returns:

  • (String, nil)


1031
# File 'lib/openai/models/admin/organization/usage_file_search_calls_response.rb', line 1031

optional :line_item, String, nil?: true

#objectSymbol, :"organization.costs.result"

Parameters:

  • value (:"organization.costs.result")

Returns:

  • (Symbol, :"organization.costs.result")


1006
# File 'lib/openai/models/admin/organization/usage_file_search_calls_response.rb', line 1006

required :object, const: :"organization.costs.result"

#project_idString?

When group_by=project_id, this field provides the project ID of the grouped costs result.

Returns:

  • (String, nil)


1038
# File 'lib/openai/models/admin/organization/usage_file_search_calls_response.rb', line 1038

optional :project_id, String, nil?: true

#quantityFloat?

When group_by=line_item, this field provides the quantity of the grouped costs result.

Returns:

  • (Float, nil)


1045
# File 'lib/openai/models/admin/organization/usage_file_search_calls_response.rb', line 1045

optional :quantity, Float, nil?: true

#quantity_unitOpenAI::Models::Admin::Organization::cost_quantity_unit?

The unit of the quantity value. If no single supported unit applies to the result, this field is null.

Returns:

  • (OpenAI::Models::Admin::Organization::cost_quantity_unit, nil)


1052
1053
1054
1055
1056
1057
1058
# File 'lib/openai/models/admin/organization/usage_file_search_calls_response.rb', line 1052

optional(
  :quantity_unit,
  union: -> {
    OpenAI::Admin::Organization::CostQuantityUnit
  },
  nil?: true
)

Instance Method Details

#to_hash{

Returns:

  • ({)


1005
# File 'sig/openai/models/admin/organization/usage_file_search_calls_response.rbs', line 1005

def to_hash: -> {