Class: Orb::Models::BillableMetric

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/orb/models/billable_metric.rb

Overview

Defined Under Namespace

Modules: Status

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(id: , description: , item: , metadata: , name: , status: ) ⇒ Object

Some parameter documentations has been truncated, see Orb::Models::BillableMetric for more details.

The Metric resource represents a calculation of a quantity based on events. Metrics are defined by the query that transforms raw usage events into meaningful values for your customers.

Parameters:

  • id (String) (defaults to: )
  • description (String, nil) (defaults to: )
  • item (Orb::Models::Item) (defaults to: )

    The Item resource represents a sellable product or good. Items are associated wi

  • metadata (Hash{Symbol=>String}) (defaults to: )

    User specified key-value pairs for the resource. If not present, this defaults t

  • name (String) (defaults to: )
  • status (Symbol, Orb::Models::BillableMetric::Status) (defaults to: )


# File 'lib/orb/models/billable_metric.rb', line 44

Instance Attribute Details

#descriptionString?

Returns:

  • (String, nil)


15
# File 'lib/orb/models/billable_metric.rb', line 15

required :description, String, nil?: true

#idString

Returns:

  • (String)


10
# File 'lib/orb/models/billable_metric.rb', line 10

required :id, String

#itemOrb::Models::Item

The Item resource represents a sellable product or good. Items are associated with all line items, billable metrics, and prices and are used for defining external sync behavior for invoices and tax calculation purposes.

Returns:



23
# File 'lib/orb/models/billable_metric.rb', line 23

required :item, -> { Orb::Item }

#metadataHash{Symbol=>String}

User specified key-value pairs for the resource. If not present, this defaults to an empty dictionary. Individual keys can be removed by setting the value to ‘null`, and the entire metadata mapping can be cleared by setting `metadata` to `null`.

Returns:

  • (Hash{Symbol=>String})


32
# File 'lib/orb/models/billable_metric.rb', line 32

required :metadata, Orb::Internal::Type::HashOf[String]

#nameString

Returns:

  • (String)


37
# File 'lib/orb/models/billable_metric.rb', line 37

required :name, String

#statusSymbol, Orb::Models::BillableMetric::Status



42
# File 'lib/orb/models/billable_metric.rb', line 42

required :status, enum: -> { Orb::BillableMetric::Status }