Class: Orb::Models::BillableMetric
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Orb::Models::BillableMetric
- Defined in:
- lib/orb/models/billable_metric.rb,
sig/orb/models/billable_metric.rbs
Overview
Defined Under Namespace
Modules: Status
Instance Attribute Summary collapse
- #description ⇒ String?
- #id ⇒ String
-
#item ⇒ Orb::Models::Item
The Item resource represents a sellable product or good.
-
#metadata ⇒ Hash{Symbol=>String}
User specified key-value pairs for the resource.
- #name ⇒ String
- #parameter_definitions ⇒ Array<Hash{Symbol=>Object}>?
-
#sql ⇒ String
The SQL definition of the metric.
- #status ⇒ Symbol, Orb::Models::BillableMetric::Status
Instance Method Summary collapse
-
#initialize(id:, description:, item:, metadata:, name:, sql:, status:, parameter_definitions: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see BillableMetric for more details.
- #to_hash ⇒ {
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:, sql:, status:, parameter_definitions: nil) ⇒ 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.
|
|
# File 'lib/orb/models/billable_metric.rb', line 58
|
Instance Attribute Details
#description ⇒ String?
15 |
# File 'lib/orb/models/billable_metric.rb', line 15 required :description, String, nil?: true |
#id ⇒ String
10 |
# File 'lib/orb/models/billable_metric.rb', line 10 required :id, String |
#item ⇒ Orb::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.
23 |
# File 'lib/orb/models/billable_metric.rb', line 23 required :item, -> { Orb::Item } |
#metadata ⇒ Hash{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.
32 |
# File 'lib/orb/models/billable_metric.rb', line 32 required :metadata, Orb::Internal::Type::HashOf[String] |
#name ⇒ String
37 |
# File 'lib/orb/models/billable_metric.rb', line 37 required :name, String |
#parameter_definitions ⇒ Array<Hash{Symbol=>Object}>?
54 55 56 |
# File 'lib/orb/models/billable_metric.rb', line 54 optional :parameter_definitions, Orb::Internal::Type::ArrayOf[Orb::Internal::Type::HashOf[Orb::Internal::Type::Unknown]], nil?: true |
#sql ⇒ String
The SQL definition of the metric. For metrics defined via configuration rather than SQL, this is a derived SQL representation.
44 |
# File 'lib/orb/models/billable_metric.rb', line 44 required :sql, String |
#status ⇒ Symbol, Orb::Models::BillableMetric::Status
49 |
# File 'lib/orb/models/billable_metric.rb', line 49 required :status, enum: -> { Orb::BillableMetric::Status } |
Instance Method Details
#to_hash ⇒ {
43 |
# File 'sig/orb/models/billable_metric.rbs', line 43
def to_hash: -> {
|