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

Inherits:
Internal::Type::BaseModel
  • Object
show all
Defined in:
lib/openai/models/admin/organization/usage_moderations_response.rb,
sig/openai/models/admin/organization/usage_moderations_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_moderations_response.rb', line 1058

Instance Attribute Details

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

The monetary value in its associated currency.



1010
1011
1012
1013
1014
1015
# File 'lib/openai/models/admin/organization/usage_moderations_response.rb', line 1010

optional(
  :amount,
  -> {
    OpenAI::Models::Admin::Organization::UsageModerationsResponse::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)


1022
# File 'lib/openai/models/admin/organization/usage_moderations_response.rb', line 1022

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)


1029
# File 'lib/openai/models/admin/organization/usage_moderations_response.rb', line 1029

optional :line_item, String, nil?: true

#objectSymbol, :"organization.costs.result"

Parameters:

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

Returns:

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


1004
# File 'lib/openai/models/admin/organization/usage_moderations_response.rb', line 1004

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)


1036
# File 'lib/openai/models/admin/organization/usage_moderations_response.rb', line 1036

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)


1043
# File 'lib/openai/models/admin/organization/usage_moderations_response.rb', line 1043

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)


1050
1051
1052
1053
1054
1055
1056
# File 'lib/openai/models/admin/organization/usage_moderations_response.rb', line 1050

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

Instance Method Details

#to_hash{

Returns:

  • ({)


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

def to_hash: -> {