diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 32e3f314..6992080f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,4 +42,3 @@ jobs: - name: Run tests run: ./scripts/test - diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 315f7d30..7657c56b 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.1.0-alpha.26" + ".": "0.1.0-alpha.27" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index a9fd9444..85c391c8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 103 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-979330185e8fda7b2bc2440075fe81c66132fc87ff3c548e93dd05db35ba3172.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-aeb94d91af916dbff0132ee7c4501df9223609b19fef0398a1a495e7a432ee36.yml diff --git a/.yardopts b/.yardopts index 29c933bc..c7c3301d 100644 --- a/.yardopts +++ b/.yardopts @@ -1 +1,3 @@ --markup markdown +--exclude /rbi +--exclude /sig diff --git a/CHANGELOG.md b/CHANGELOG.md index 866c80e9..24a64993 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,33 @@ # Changelog +## 0.1.0-alpha.27 (2025-03-14) + +Full Changelog: [v0.1.0-alpha.26...v0.1.0-alpha.27](https://github.com/orbcorp/orb-ruby/compare/v0.1.0-alpha.26...v0.1.0-alpha.27) + +### ⚠ BREAKING CHANGES + +* remove unreachable properties ([#159](https://github.com/orbcorp/orb-ruby/issues/159)) + +### Features + +* support jsonl uploads ([#158](https://github.com/orbcorp/orb-ruby/issues/158)) ([1859c05](https://github.com/orbcorp/orb-ruby/commit/1859c05fc738cd31ca79a550c7d62ec2bb75e8ce)) + + +### Bug Fixes + +* remove unreachable properties ([#159](https://github.com/orbcorp/orb-ruby/issues/159)) ([9df3b18](https://github.com/orbcorp/orb-ruby/commit/9df3b182dfdc9182f8b6ea2f9673520f2f9450c1)) + + +### Chores + +* **api:** correctly support ExternalCustomerID array filter on Subscriptions.List ([#157](https://github.com/orbcorp/orb-ruby/issues/157)) ([5eac667](https://github.com/orbcorp/orb-ruby/commit/5eac66704bf01cf68e277eee50ae5ee9d62cc730)) +* improve rbi typedef for page classes ([#154](https://github.com/orbcorp/orb-ruby/issues/154)) ([bfdeb0d](https://github.com/orbcorp/orb-ruby/commit/bfdeb0d60063461b2e4f1e5357a6d1227dfd47e1)) +* **internal:** codegen related update ([#153](https://github.com/orbcorp/orb-ruby/issues/153)) ([9351bfa](https://github.com/orbcorp/orb-ruby/commit/9351bfa48cacf7ee3ba254920d8ba711760b651a)) +* **internal:** codegen related update ([#155](https://github.com/orbcorp/orb-ruby/issues/155)) ([e7a9137](https://github.com/orbcorp/orb-ruby/commit/e7a913713378f7fc95c60c0dae1deebc4aafa137)) +* **internal:** version bump ([#150](https://github.com/orbcorp/orb-ruby/issues/150)) ([db96109](https://github.com/orbcorp/orb-ruby/commit/db96109a5b6d706f6719f3b07e5478d005dcd394)) +* remove stale thread local checks ([#152](https://github.com/orbcorp/orb-ruby/issues/152)) ([ff62da0](https://github.com/orbcorp/orb-ruby/commit/ff62da08426e3d52d7b2b8c602e19c951cf89d8f)) +* sdk internal updates ([#156](https://github.com/orbcorp/orb-ruby/issues/156)) ([1c988cb](https://github.com/orbcorp/orb-ruby/commit/1c988cb0b9c9f687ce9ae7dfaf4865bbbe313a5e)) + ## 0.1.0-alpha.26 (2025-03-12) Full Changelog: [v0.1.0-alpha.25...v0.1.0-alpha.26](https://github.com/orbcorp/orb-ruby/compare/v0.1.0-alpha.25...v0.1.0-alpha.26) diff --git a/Gemfile.lock b/Gemfile.lock index 55be09ac..ca2b65e5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - orb (0.1.0.pre.alpha.26) + orb (0.1.0.pre.alpha.27) connection_pool GEM diff --git a/lib/orb.rb b/lib/orb.rb index 799cf8ca..8062aaf6 100644 --- a/lib/orb.rb +++ b/lib/orb.rb @@ -7,6 +7,7 @@ require "etc" require "json" require "net/http" +require "pathname" require "rbconfig" require "securerandom" require "set" diff --git a/lib/orb/base_client.rb b/lib/orb/base_client.rb index 7234a603..ec9746a0 100644 --- a/lib/orb/base_client.rb +++ b/lib/orb/base_client.rb @@ -1,10 +1,9 @@ # frozen_string_literal: true module Orb - # @private + # @api private # # @abstract - # class BaseClient # from whatwg fetch spec MAX_REDIRECTS = 20 @@ -21,12 +20,11 @@ class BaseClient # rubocop:enable Style/MutableConstant class << self - # @private + # @api private # # @param req [Hash{Symbol=>Object}] # # @raise [ArgumentError] - # def validate!(req) keys = [:method, :path, :query, :headers, :body, :unwrap, :page, :stream, :model, :options] case req @@ -41,13 +39,12 @@ def validate!(req) end end - # @private + # @api private # # @param status [Integer] # @param headers [Hash{String=>String}, Net::HTTPHeader] # # @return [Boolean] - # def should_retry?(status, headers:) coerced = Orb::Util.coerce_boolean(headers["x-should-retry"]) case [coerced, status] @@ -65,7 +62,7 @@ def should_retry?(status, headers:) end end - # @private + # @api private # # @param request [Hash{Symbol=>Object}] . # @@ -86,7 +83,6 @@ def should_retry?(status, headers:) # @param response_headers [Hash{String=>String}, Net::HTTPHeader] # # @return [Hash{Symbol=>Object}] - # def follow_redirect(request, status:, response_headers:) method, url, headers = request.fetch_values(:method, :url, :headers) location = @@ -130,12 +126,11 @@ def follow_redirect(request, status:, response_headers:) end end - # @private - # + # @api private # @return [Orb::PooledNetRequester] attr_accessor :requester - # @private + # @api private # # @param base_url [String] # @param timeout [Float] @@ -144,7 +139,6 @@ def follow_redirect(request, status:, response_headers:) # @param max_retry_delay [Float] # @param headers [Hash{String=>String, Integer, Array, nil}] # @param idempotency_header [String, nil] - # def initialize( base_url:, timeout: 0.0, @@ -171,19 +165,17 @@ def initialize( @max_retry_delay = max_retry_delay end - # @private + # @api private # # @return [Hash{String=>String}] - # private def auth_headers = {} - # @private + # @api private # # @return [String] - # private def generate_idempotency_key = "stainless-ruby-retry-#{SecureRandom.uuid}" - # @private + # @api private # # @param req [Hash{Symbol=>Object}] . # @@ -220,7 +212,6 @@ def initialize( # @option opts [Float, nil] :timeout # # @return [Hash{Symbol=>Object}] - # private def build_request(req, opts) method, uninterpolated_path = req.fetch_values(:method, :path) @@ -271,13 +262,12 @@ def initialize( } end - # @private + # @api private # # @param headers [Hash{String=>String}] # @param retry_count [Integer] # # @return [Float] - # private def retry_delay(headers, retry_count:) # Non-standard extension span = Float(headers["retry-after-ms"], exception: false)&.then { _1 / 1000 } @@ -298,7 +288,7 @@ def initialize( (@initial_retry_delay * scale * jitter).clamp(0, @max_retry_delay) end - # @private + # @api private # # @param request [Hash{Symbol=>Object}] . # @@ -322,7 +312,6 @@ def initialize( # # @raise [Orb::APIError] # @return [Array(Integer, Net::HTTPResponse, Enumerable)] - # private def send_request(request, redirect_count:, retry_count:, send_retry_header:) url, headers, max_retries, timeout = request.fetch_values(:url, :headers, :max_retries, :timeout) input = {**request.except(:timeout), deadline: Orb::Util.monotonic_secs + timeout} @@ -424,7 +413,6 @@ def initialize( # # @raise [Orb::APIError] # @return [Object] - # def request(req) self.class.validate!(req) model = req.fetch(:model) { Orb::Unknown } @@ -455,7 +443,6 @@ def request(req) end # @return [String] - # def inspect # rubocop:disable Layout/LineLength base_url = Orb::Util.unparse_uri(@base_url) diff --git a/lib/orb/base_model.rb b/lib/orb/base_model.rb index 0ca75e22..8489b916 100644 --- a/lib/orb/base_model.rb +++ b/lib/orb/base_model.rb @@ -1,41 +1,37 @@ # frozen_string_literal: true module Orb - # @private + # @api private # # @abstract - # module Converter # rubocop:disable Lint/UnusedMethodArgument - # @private + # @api private # # @param value [Object] # # @return [Object] - # def coerce(value) = value - # @private + # @api private # # @param value [Object] # # @return [Object] - # def dump(value) = value - # @private + # @api private # # @param value [Object] # # @return [Array(true, Object, nil), Array(false, Boolean, Integer)] - # def try_strict_coerce(value) = (raise NotImplementedError) # rubocop:enable Lint/UnusedMethodArgument class << self - # @private + # @api private # # @param spec [Hash{Symbol=>Object}, Proc, Orb::Converter, Class] . # @@ -48,7 +44,6 @@ class << self # @option spec [Boolean] :"nil?" # # @return [Proc] - # def type_info(spec) case spec in Hash @@ -64,7 +59,7 @@ def type_info(spec) end end - # @private + # @api private # # Based on `target`, transform `value` into `target`, to the extent possible: # @@ -77,7 +72,6 @@ def type_info(spec) # @param value [Object] # # @return [Object] - # def coerce(target, value) case target in Orb::Converter @@ -111,13 +105,12 @@ def coerce(target, value) end end - # @private + # @api private # # @param target [Orb::Converter, Class] # @param value [Object] # # @return [Object] - # def dump(target, value) case target in Orb::Converter @@ -127,7 +120,7 @@ def dump(target, value) end end - # @private + # @api private # # The underlying algorithm for computing maximal compatibility is subject to # future improvements. @@ -142,7 +135,6 @@ def dump(target, value) # @param value [Object] # # @return [Object] - # def try_strict_coerce(target, value) case target in Orb::Converter @@ -182,7 +174,7 @@ def try_strict_coerce(target, value) end end - # @private + # @api private # # @abstract # @@ -197,40 +189,35 @@ class Unknown # @param other [Object] # # @return [Boolean] - # def self.===(other) = true # @param other [Object] # # @return [Boolean] - # def self.==(other) = other.is_a?(Class) && other <= Orb::Unknown class << self # @!parse - # # @private + # # @api private # # # # @param value [Object] # # # # @return [Object] - # # # def coerce(value) = super # @!parse - # # @private + # # @api private # # # # @param value [Object] # # # # @return [Object] - # # # def dump(value) = super - # @private + # @api private # # @param value [Object] # # @return [Array(true, Object, nil), Array(false, Boolean, Integer)] - # def try_strict_coerce(value) # prevent unknown variant from being chosen during the first coercion pass [false, true, 0] @@ -240,7 +227,7 @@ def try_strict_coerce(value) # rubocop:enable Lint/UnusedMethodArgument end - # @private + # @api private # # @abstract # @@ -253,40 +240,35 @@ class BooleanModel # @param other [Object] # # @return [Boolean] - # def self.===(other) = other == true || other == false # @param other [Object] # # @return [Boolean] - # def self.==(other) = other.is_a?(Class) && other <= Orb::BooleanModel class << self # @!parse - # # @private + # # @api private # # # # @param value [Boolean, Object] # # # # @return [Boolean, Object] - # # # def coerce(value) = super # @!parse - # # @private + # # @api private # # # # @param value [Boolean, Object] # # # # @return [Boolean, Object] - # # # def dump(value) = super - # @private + # @api private # # @param value [Object] # # @return [Array(true, Object, nil), Array(false, Boolean, Integer)] - # def try_strict_coerce(value) case value in true | false @@ -298,7 +280,7 @@ def try_strict_coerce(value) end end - # @private + # @api private # # @abstract # @@ -322,7 +304,7 @@ def try_strict_coerce(value) # when Orb::Models::BillingCycleRelativeDate::END_OF_TERM # # ... # else - # # ... + # puts(billing_cycle_relative_date) # end # ``` # @@ -334,7 +316,7 @@ def try_strict_coerce(value) # in :end_of_term # # ... # else - # # ... + # puts(billing_cycle_relative_date) # end # ``` class Enum @@ -344,13 +326,11 @@ class << self # All of the valid Symbol values for this enum. # # @return [Array] - # def values = (@values ||= constants.map { const_get(_1) }) - # @private + # @api private # # Guard against thread safety issues by instantiating `@values`. - # private def finalize! = values end @@ -359,24 +339,21 @@ def values = (@values ||= constants.map { const_get(_1) }) # @param other [Object] # # @return [Boolean] - # def self.===(other) = values.include?(other) # @param other [Object] # # @return [Boolean] - # def self.==(other) other.is_a?(Class) && other <= Orb::Enum && other.values.to_set == values.to_set end class << self - # @private + # @api private # # @param value [String, Symbol, Object] # # @return [Symbol, Object] - # def coerce(value) case value in Symbol | String if values.include?(val = value.to_sym) @@ -387,20 +364,18 @@ def coerce(value) end # @!parse - # # @private + # # @api private # # # # @param value [Symbol, Object] # # # # @return [Symbol, Object] - # # # def dump(value) = super - # @private + # @api private # # @param value [Object] # # @return [Array(true, Object, nil), Array(false, Boolean, Integer)] - # def try_strict_coerce(value) return [true, value, 1] if values.include?(value) @@ -419,7 +394,7 @@ def try_strict_coerce(value) end end - # @private + # @api private # # @abstract # @@ -428,13 +403,13 @@ def try_strict_coerce(value) # # `discount` is a `Orb::Models::Discount` # case discount # when Orb::Models::PercentageDiscount - # # ... + # puts(discount.applies_to_price_ids) # when Orb::Models::TrialDiscount - # # ... + # puts(discount.discount_type) # when Orb::Models::UsageDiscount - # # ... + # puts(discount.usage_discount) # else - # # ... + # puts(discount) # end # ``` # @@ -447,58 +422,53 @@ def try_strict_coerce(value) # percentage_discount: percentage_discount, # reason: reason # } - # # ... + # puts(applies_to_price_ids) # in { # discount_type: :trial, # applies_to_price_ids: applies_to_price_ids, # reason: reason, # trial_amount_discount: trial_amount_discount # } - # # ... + # puts(reason) # in { # discount_type: :usage, # applies_to_price_ids: applies_to_price_ids, # usage_discount: usage_discount, # reason: reason # } - # # ... - # in { - # discount_type: :amount, - # amount_discount: amount_discount, - # applies_to_price_ids: applies_to_price_ids, - # reason: reason - # } - # # ... + # puts(usage_discount) # else - # # ... + # puts(discount) # end # ``` class Union extend Orb::Converter class << self - # @private + # @api private # # All of the specified variant info for this union. # # @return [Array] - # private def known_variants = (@known_variants ||= []) - # @private - # - # All of the specified variants for this union. + # @api private # # @return [Array] - # - protected def variants + protected def derefed_variants @known_variants.map { |key, variant_fn| [key, variant_fn.call] } end - # @private + # All of the specified variants for this union. # - # @param property [Symbol] + # @return [Array] + def variants + derefed_variants.map(&:last) + end + + # @api private # + # @param property [Symbol] private def discriminator(property) case property in Symbol @@ -506,7 +476,7 @@ class << self end end - # @private + # @api private # # @param key [Symbol, Hash{Symbol=>Object}, Proc, Orb::Converter, Class] # @@ -519,7 +489,6 @@ class << self # @option spec [Proc] :union # # @option spec [Boolean] :"nil?" - # private def variant(key, spec = nil) variant_info = case key @@ -532,12 +501,11 @@ class << self known_variants << variant_info end - # @private + # @api private # # @param value [Object] # # @return [Orb::Converter, Class, nil] - # private def resolve_variant(value) case [@discriminator, value] in [_, Orb::BaseModel] @@ -567,7 +535,6 @@ class << self # @param other [Object] # # @return [Boolean] - # def self.===(other) known_variants.any? do |_, variant_fn| variant_fn.call === other @@ -577,18 +544,16 @@ def self.===(other) # @param other [Object] # # @return [Boolean] - # def self.==(other) - other.is_a?(Class) && other <= Orb::Union && other.variants == variants + other.is_a?(Class) && other <= Orb::Union && other.derefed_variants == derefed_variants end class << self - # @private + # @api private # # @param value [Object] # # @return [Object] - # def coerce(value) if (variant = resolve_variant(value)) return Orb::Converter.coerce(variant, value) @@ -613,12 +578,11 @@ def coerce(value) variant.nil? ? value : Orb::Converter.coerce(variant, value) end - # @private + # @api private # # @param value [Object] # # @return [Object] - # def dump(value) if (variant = resolve_variant(value)) return Orb::Converter.dump(variant, value) @@ -633,12 +597,11 @@ def dump(value) value end - # @private + # @api private # # @param value [Object] # # @return [Array(true, Object, nil), Array(false, Boolean, Integer)] - # def try_strict_coerce(value) # TODO(ruby) this will result in super linear decoding behaviour for nested unions # follow up with a decoding context that captures current strictness levels @@ -671,7 +634,7 @@ def try_strict_coerce(value) # rubocop:enable Style/HashEachMethods end - # @private + # @api private # # @abstract # @@ -686,7 +649,6 @@ def self.[](...) = new(...) # @param other [Object] # # @return [Boolean] - # def ===(other) type = item_type case other @@ -702,15 +664,13 @@ def ===(other) # @param other [Object] # # @return [Boolean] - # def ==(other) = other.is_a?(Orb::ArrayOf) && other.item_type == item_type - # @private + # @api private # # @param value [Enumerable, Object] # # @return [Array, Object] - # def coerce(value) type = item_type case value @@ -721,12 +681,11 @@ def coerce(value) end end - # @private + # @api private # # @param value [Enumerable, Object] # # @return [Array, Object] - # def dump(value) type = item_type case value @@ -737,12 +696,11 @@ def dump(value) end end - # @private + # @api private # # @param value [Object] # # @return [Array(true, Object, nil), Array(false, Boolean, Integer)] - # def try_strict_coerce(value) case value in Array @@ -776,13 +734,12 @@ def try_strict_coerce(value) end end - # @private + # @api private # # @return [Orb::Converter, Class] - # protected def item_type = @item_type_fn.call - # @private + # @api private # # @param type_info [Hash{Symbol=>Object}, Proc, Orb::Converter, Class] # @@ -795,13 +752,12 @@ def try_strict_coerce(value) # @option spec [Proc] :union # # @option spec [Boolean] :"nil?" - # def initialize(type_info, spec = {}) @item_type_fn = Orb::Converter.type_info(type_info || spec) end end - # @private + # @api private # # @abstract # @@ -816,7 +772,6 @@ def self.[](...) = new(...) # @param other [Object] # # @return [Boolean] - # def ===(other) type = item_type case other @@ -837,15 +792,13 @@ def ===(other) # @param other [Object] # # @return [Boolean] - # def ==(other) = other.is_a?(Orb::HashOf) && other.item_type == item_type - # @private + # @api private # # @param value [Hash{Object=>Object}, Object] # # @return [Hash{Symbol=>Object}, Object] - # def coerce(value) type = item_type case value @@ -859,12 +812,11 @@ def coerce(value) end end - # @private + # @api private # # @param value [Hash{Object=>Object}, Object] # # @return [Hash{Symbol=>Object}, Object] - # def dump(value) type = item_type case value @@ -877,12 +829,11 @@ def dump(value) end end - # @private + # @api private # # @param value [Object] # # @return [Array(true, Object, nil), Array(false, Boolean, Integer)] - # def try_strict_coerce(value) case value in Hash @@ -916,13 +867,12 @@ def try_strict_coerce(value) end end - # @private + # @api private # # @return [Orb::Converter, Class] - # protected def item_type = @item_type_fn.call - # @private + # @api private # # @param type_info [Hash{Symbol=>Object}, Proc, Orb::Converter, Class] # @@ -935,14 +885,11 @@ def try_strict_coerce(value) # @option spec [Proc] :union # # @option spec [Boolean] :"nil?" - # def initialize(type_info, spec = {}) @item_type_fn = Orb::Converter.type_info(type_info || spec) end end - # @private - # # @abstract # # @example @@ -958,32 +905,31 @@ class BaseModel extend Orb::Converter class << self - # @private + # @api private # # Assumes superclass fields are totally defined before fields are accessed / # defined on subclasses. # # @return [Hash{Symbol=>Hash{Symbol=>Object}}] - # def known_fields @known_fields ||= (self < Orb::BaseModel ? superclass.known_fields.dup : {}) end - # @return [Hash{Symbol=>Hash{Symbol=>Object}}] + # @api private # + # @return [Hash{Symbol=>Hash{Symbol=>Object}}] def fields known_fields.transform_values do |field| {**field.except(:type_fn), type: field.fetch(:type_fn).call} end end - # @private + # @api private # # @return [Hash{Symbol=>Proc}] - # def defaults = (@defaults ||= {}) - # @private + # @api private # # @param name_sym [Symbol] # @@ -1000,7 +946,6 @@ def defaults = (@defaults ||= {}) # @option spec [Proc] :union # # @option spec [Boolean] :"nil?" - # private def add_field(name_sym, required:, type_info:, spec:) type_fn, info = case type_info @@ -1039,7 +984,7 @@ def defaults = (@defaults ||= {}) end end - # @private + # @api private # # @param name_sym [Symbol] # @@ -1054,12 +999,11 @@ def defaults = (@defaults ||= {}) # @option spec [Proc] :union # # @option spec [Boolean] :"nil?" - # def required(name_sym, type_info, spec = {}) add_field(name_sym, required: true, type_info: type_info, spec: spec) end - # @private + # @api private # # @param name_sym [Symbol] # @@ -1074,18 +1018,16 @@ def required(name_sym, type_info, spec = {}) # @option spec [Proc] :union # # @option spec [Boolean] :"nil?" - # def optional(name_sym, type_info, spec = {}) add_field(name_sym, required: false, type_info: type_info, spec: spec) end - # @private + # @api private # # `request_only` attributes not excluded from `.#coerce` when receiving responses # even if well behaved servers should not send them # # @param blk [Proc] - # private def request_only(&blk) @mode = :dump blk.call @@ -1093,12 +1035,11 @@ def optional(name_sym, type_info, spec = {}) @mode = nil end - # @private + # @api private # # `response_only` attributes are omitted from `.#dump` when making requests # # @param blk [Proc] - # private def response_only(&blk) @mode = :coerce blk.call @@ -1110,7 +1051,6 @@ def optional(name_sym, type_info, spec = {}) # @param other [Object] # # @return [Boolean] - # def ==(other) case other in Orb::BaseModel @@ -1121,12 +1061,11 @@ def ==(other) end class << self - # @private + # @api private # # @param value [Orb::BaseModel, Hash{Object=>Object}, Object] # # @return [Orb::BaseModel, Object] - # def coerce(value) case Orb::Util.coerce_hash(value) in Hash => coerced @@ -1136,12 +1075,11 @@ def coerce(value) end end - # @private + # @api private # # @param value [Orb::BaseModel, Object] # # @return [Hash{Object=>Object}, Object] - # def dump(value) unless (coerced = Orb::Util.coerce_hash(value)).is_a?(Hash) return value @@ -1173,12 +1111,11 @@ def dump(value) values end - # @private + # @api private # # @param value [Object] # # @return [Array(true, Object, nil), Array(false, Boolean, Integer)] - # def try_strict_coerce(value) case value in Hash | Orb::BaseModel @@ -1236,7 +1173,6 @@ def try_strict_coerce(value) # @param key [Symbol] # # @return [Object, nil] - # def [](key) unless key.instance_of?(Symbol) raise ArgumentError.new("Expected symbol key for lookup, got #{key.inspect}") @@ -1255,7 +1191,6 @@ def [](key) # should not be mutated. # # @return [Hash{Symbol=>Object}] - # def to_h = @data alias_method :to_hash, :to_h @@ -1263,7 +1198,6 @@ def to_h = @data # @param keys [Array, nil] # # @return [Hash{Symbol=>Object}] - # def deconstruct_keys(keys) (keys || self.class.known_fields.keys).filter_map do |k| unless self.class.known_fields.key?(k) @@ -1278,7 +1212,6 @@ def deconstruct_keys(keys) # Create a new instance of a model. # # @param data [Hash{Symbol=>Object}, Orb::BaseModel] - # def initialize(data = {}) case Orb::Util.coerce_hash(data) in Hash => coerced @@ -1289,11 +1222,9 @@ def initialize(data = {}) end # @return [String] - # def to_s = @data.to_s # @return [String] - # def inspect "#<#{self.class.name}:0x#{object_id.to_s(16)} #{deconstruct_keys(nil).map do |k, v| "#{k}=#{v.inspect}" diff --git a/lib/orb/base_page.rb b/lib/orb/base_page.rb index 0ac2c13a..c91278dd 100644 --- a/lib/orb/base_page.rb +++ b/lib/orb/base_page.rb @@ -1,8 +1,6 @@ # frozen_string_literal: true module Orb - # @private - # # @abstract # # @example @@ -21,40 +19,44 @@ module Orb # # @example # ```ruby - # top_levels = page.to_enum.take(2) + # top_levels = page + # .to_enum + # .lazy + # .select { _1.object_id.even? } + # .map(&:itself) + # .take(2) + # .to_a # # top_levels => Array # ``` module BasePage # @return [Boolean] - # def next_page? = (raise NotImplementedError) # @raise [Orb::APIError] # @return [Orb::BasePage] - # def next_page = (raise NotImplementedError) # @param blk [Proc] # # @return [void] - # def auto_paging_each(&) = (raise NotImplementedError) # @return [Enumerable] - # def to_enum = super(:auto_paging_each) alias_method :enum_for, :to_enum - # @!parse - # # @private - # # - # # @param client [Orb::BaseClient] - # # @param req [Hash{Symbol=>Object}] - # # @param headers [Hash{String=>String}, Net::HTTPHeader] - # # @param page_data [Object] - # # - # def initialize(client:, req:, headers:, page_data:); end + # @api private + # + # @param client [Orb::BaseClient] + # @param req [Hash{Symbol=>Object}] + # @param headers [Hash{String=>String}, Net::HTTPHeader] + # @param page_data [Object] + def initialize(client:, req:, headers:, page_data:) + @client = client + @req = req + super() + end end end diff --git a/lib/orb/client.rb b/lib/orb/client.rb index 051d441e..dd7f8043 100644 --- a/lib/orb/client.rb +++ b/lib/orb/client.rb @@ -60,10 +60,9 @@ class Client < Orb::BaseClient # @return [Orb::Resources::DimensionalPriceGroups] attr_reader :dimensional_price_groups - # @private + # @api private # # @return [Hash{String=>String}] - # private def auth_headers return {} if @api_key.nil? @@ -85,7 +84,6 @@ class Client < Orb::BaseClient # @param max_retry_delay [Float] # # @param idempotency_header [String] - # def initialize( base_url: nil, api_key: ENV["ORB_API_KEY"], diff --git a/lib/orb/errors.rb b/lib/orb/errors.rb index 39571013..f936fcea 100644 --- a/lib/orb/errors.rb +++ b/lib/orb/errors.rb @@ -4,7 +4,7 @@ module Orb class Error < StandardError # @!parse # # @return [StandardError, nil] - # attr_reader :cause + # attr_accessor :cause end class ConversionError < Orb::Error @@ -12,15 +12,15 @@ class ConversionError < Orb::Error class APIError < Orb::Error # @return [URI::Generic] - attr_reader :url + attr_accessor :url # @return [Integer, nil] - attr_reader :status + attr_accessor :status # @return [Object, nil] - attr_reader :body + attr_accessor :body - # @private + # @api private # # @param url [URI::Generic] # @param status [Integer, nil] @@ -28,7 +28,6 @@ class APIError < Orb::Error # @param request [nil] # @param response [nil] # @param message [String, nil] - # def initialize(url:, status: nil, body: nil, request: nil, response: nil, message: nil) @url = url @status = status @@ -42,13 +41,13 @@ def initialize(url:, status: nil, body: nil, request: nil, response: nil, messag class APIConnectionError < Orb::APIError # @!parse # # @return [nil] - # attr_reader :status + # attr_accessor :status # @!parse # # @return [nil] - # attr_reader :body + # attr_accessor :body - # @private + # @api private # # @param url [URI::Generic] # @param status [nil] @@ -56,7 +55,6 @@ class APIConnectionError < Orb::APIError # @param request [nil] # @param response [nil] # @param message [String, nil] - # def initialize( url:, status: nil, @@ -70,7 +68,7 @@ def initialize( end class APITimeoutError < Orb::APIConnectionError - # @private + # @api private # # @param url [URI::Generic] # @param status [nil] @@ -78,7 +76,6 @@ class APITimeoutError < Orb::APIConnectionError # @param request [nil] # @param response [nil] # @param message [String, nil] - # def initialize( url:, status: nil, @@ -92,7 +89,7 @@ def initialize( end class APIStatusError < Orb::APIError - # @private + # @api private # # @param url [URI::Generic] # @param status [Integer] @@ -102,7 +99,6 @@ class APIStatusError < Orb::APIError # @param message [String, nil] # # @return [Orb::APIStatusError] - # def self.for(url:, status:, body:, request:, response:, message: nil) key = Orb::Util.dig(body, :type) kwargs = {url: url, status: status, body: body, request: request, response: response, message: message} @@ -155,9 +151,9 @@ def self.for(url:, status:, body:, request:, response:, message: nil) # @!parse # # @return [Integer] - # attr_reader :status + # attr_accessor :status - # @private + # @api private # # @param url [URI::Generic] # @param status [Integer] @@ -165,7 +161,6 @@ def self.for(url:, status:, body:, request:, response:, message: nil) # @param request [nil] # @param response [nil] # @param message [String, nil] - # def initialize(url:, status:, body:, request:, response:, message: nil) message ||= {url: url.to_s, status: status, body: body} super( diff --git a/lib/orb/extern.rb b/lib/orb/extern.rb index 49027e04..e297b44e 100644 --- a/lib/orb/extern.rb +++ b/lib/orb/extern.rb @@ -1,10 +1,9 @@ # frozen_string_literal: true module Orb - # @private + # @api private # # @abstract - # module Extern end end diff --git a/lib/orb/models/amount_discount.rb b/lib/orb/models/amount_discount.rb index 7c7a2edb..8c8fe6d3 100644 --- a/lib/orb/models/amount_discount.rb +++ b/lib/orb/models/amount_discount.rb @@ -37,7 +37,6 @@ class AmountDiscount < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DiscountType < Orb::Enum AMOUNT = :amount diff --git a/lib/orb/models/billable_metric.rb b/lib/orb/models/billable_metric.rb index 1bb2b802..fd8d9d86 100644 --- a/lib/orb/models/billable_metric.rb +++ b/lib/orb/models/billable_metric.rb @@ -57,7 +57,6 @@ class BillableMetric < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class Status < Orb::Enum ACTIVE = :active DRAFT = :draft diff --git a/lib/orb/models/billing_cycle_relative_date.rb b/lib/orb/models/billing_cycle_relative_date.rb index f6cad000..def48522 100644 --- a/lib/orb/models/billing_cycle_relative_date.rb +++ b/lib/orb/models/billing_cycle_relative_date.rb @@ -3,7 +3,6 @@ module Orb module Models # @abstract - # class BillingCycleRelativeDate < Orb::Enum START_OF_TERM = :start_of_term END_OF_TERM = :end_of_term diff --git a/lib/orb/models/coupon.rb b/lib/orb/models/coupon.rb index 4c9266f2..f7a2fe9a 100644 --- a/lib/orb/models/coupon.rb +++ b/lib/orb/models/coupon.rb @@ -67,13 +67,18 @@ class Coupon < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class Discount < Orb::Union discriminator :discount_type variant :percentage, -> { Orb::Models::PercentageDiscount } variant :amount, -> { Orb::Models::AmountDiscount } + + # @!parse + # class << self + # # @return [Array(Orb::Models::PercentageDiscount, Orb::Models::AmountDiscount)] + # def variants; end + # end end end end diff --git a/lib/orb/models/coupon_create_params.rb b/lib/orb/models/coupon_create_params.rb index e31c60e7..50129048 100644 --- a/lib/orb/models/coupon_create_params.rb +++ b/lib/orb/models/coupon_create_params.rb @@ -44,7 +44,6 @@ class CouponCreateParams < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class Discount < Orb::Union discriminator :discount_type @@ -91,6 +90,12 @@ class NewCouponAmountDiscount < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void end + + # @!parse + # class << self + # # @return [Array(Orb::Models::CouponCreateParams::Discount::NewCouponPercentageDiscount, Orb::Models::CouponCreateParams::Discount::NewCouponAmountDiscount)] + # def variants; end + # end end end end diff --git a/lib/orb/models/credit_note.rb b/lib/orb/models/credit_note.rb index 5feacb10..12408ad1 100644 --- a/lib/orb/models/credit_note.rb +++ b/lib/orb/models/credit_note.rb @@ -322,7 +322,6 @@ class Discount < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DiscountType < Orb::Enum PERCENTAGE = :percentage AMOUNT = :amount @@ -374,7 +373,6 @@ class MaximumAmountAdjustment < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DiscountType < Orb::Enum PERCENTAGE = :percentage @@ -403,7 +401,6 @@ class AppliesToPrice < Orb::BaseModel end # @abstract - # class Reason < Orb::Enum DUPLICATE = :Duplicate FRAUDULENT = :Fraudulent @@ -414,7 +411,6 @@ class Reason < Orb::Enum end # @abstract - # class Type < Orb::Enum REFUND = :refund ADJUSTMENT = :adjustment @@ -462,7 +458,6 @@ class Discount < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DiscountType < Orb::Enum PERCENTAGE = :percentage diff --git a/lib/orb/models/credit_note_list_params.rb b/lib/orb/models/credit_note_list_params.rb index f0d3e45f..005be39f 100644 --- a/lib/orb/models/credit_note_list_params.rb +++ b/lib/orb/models/credit_note_list_params.rb @@ -7,6 +7,26 @@ class CreditNoteListParams < Orb::BaseModel # extend Orb::RequestParameters::Converter include Orb::RequestParameters + # @!attribute created_at_gt + # + # @return [Time, nil] + optional :created_at_gt, Time, api_name: :"created_at[gt]", nil?: true + + # @!attribute created_at_gte + # + # @return [Time, nil] + optional :created_at_gte, Time, api_name: :"created_at[gte]", nil?: true + + # @!attribute created_at_lt + # + # @return [Time, nil] + optional :created_at_lt, Time, api_name: :"created_at[lt]", nil?: true + + # @!attribute created_at_lte + # + # @return [Time, nil] + optional :created_at_lte, Time, api_name: :"created_at[lte]", nil?: true + # @!attribute cursor # Cursor for pagination. This can be populated by the `next_cursor` value returned # from the initial request. @@ -25,11 +45,26 @@ class CreditNoteListParams < Orb::BaseModel # attr_writer :limit # @!parse + # # @param created_at_gt [Time, nil] + # # @param created_at_gte [Time, nil] + # # @param created_at_lt [Time, nil] + # # @param created_at_lte [Time, nil] # # @param cursor [String, nil] # # @param limit [Integer] # # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] # # - # def initialize(cursor: nil, limit: nil, request_options: {}, **) = super + # def initialize( + # created_at_gt: nil, + # created_at_gte: nil, + # created_at_lt: nil, + # created_at_lte: nil, + # cursor: nil, + # limit: nil, + # request_options: {}, + # ** + # ) + # super + # end # def initialize: (Hash | Orb::BaseModel) -> void end diff --git a/lib/orb/models/customer.rb b/lib/orb/models/customer.rb index 45a57c73..07d361ef 100644 --- a/lib/orb/models/customer.rb +++ b/lib/orb/models/customer.rb @@ -611,7 +611,6 @@ class TaxID < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class Country < Orb::Enum AD = :AD AE = :AE @@ -696,7 +695,6 @@ class Country < Orb::Enum end # @abstract - # class Type < Orb::Enum AD_NRT = :ad_nrt AE_TRN = :ae_trn @@ -815,7 +813,6 @@ class AccountingProvider < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class ProviderType < Orb::Enum QUICKBOOKS = :quickbooks NETSUITE = :netsuite diff --git a/lib/orb/models/customer_create_params.rb b/lib/orb/models/customer_create_params.rb index 0f808cf4..b6c66837 100644 --- a/lib/orb/models/customer_create_params.rb +++ b/lib/orb/models/customer_create_params.rb @@ -470,7 +470,6 @@ class ShippingAddress < Orb::BaseModel end # @abstract - # class TaxConfiguration < Orb::Union discriminator :tax_provider @@ -523,6 +522,12 @@ class NewTaxJarConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void end + + # @!parse + # class << self + # # @return [Array(Orb::Models::CustomerCreateParams::TaxConfiguration::NewAvalaraTaxConfiguration, Orb::Models::CustomerCreateParams::TaxConfiguration::NewTaxJarConfiguration)] + # def variants; end + # end end class TaxID < Orb::BaseModel @@ -657,7 +662,6 @@ class TaxID < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class Country < Orb::Enum AD = :AD AE = :AE @@ -742,7 +746,6 @@ class Country < Orb::Enum end # @abstract - # class Type < Orb::Enum AD_NRT = :ad_nrt AE_TRN = :ae_trn diff --git a/lib/orb/models/customer_update_by_external_id_params.rb b/lib/orb/models/customer_update_by_external_id_params.rb index 978bbff3..83ee48de 100644 --- a/lib/orb/models/customer_update_by_external_id_params.rb +++ b/lib/orb/models/customer_update_by_external_id_params.rb @@ -473,7 +473,6 @@ class ShippingAddress < Orb::BaseModel end # @abstract - # class TaxConfiguration < Orb::Union discriminator :tax_provider @@ -528,6 +527,12 @@ class NewTaxJarConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void end + + # @!parse + # class << self + # # @return [Array(Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::NewAvalaraTaxConfiguration, Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::NewTaxJarConfiguration)] + # def variants; end + # end end class TaxID < Orb::BaseModel @@ -662,7 +667,6 @@ class TaxID < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class Country < Orb::Enum AD = :AD AE = :AE @@ -747,7 +751,6 @@ class Country < Orb::Enum end # @abstract - # class Type < Orb::Enum AD_NRT = :ad_nrt AE_TRN = :ae_trn diff --git a/lib/orb/models/customer_update_params.rb b/lib/orb/models/customer_update_params.rb index e55e013f..acd2b85c 100644 --- a/lib/orb/models/customer_update_params.rb +++ b/lib/orb/models/customer_update_params.rb @@ -465,7 +465,6 @@ class ShippingAddress < Orb::BaseModel end # @abstract - # class TaxConfiguration < Orb::Union discriminator :tax_provider @@ -518,6 +517,12 @@ class NewTaxJarConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void end + + # @!parse + # class << self + # # @return [Array(Orb::Models::CustomerUpdateParams::TaxConfiguration::NewAvalaraTaxConfiguration, Orb::Models::CustomerUpdateParams::TaxConfiguration::NewTaxJarConfiguration)] + # def variants; end + # end end class TaxID < Orb::BaseModel @@ -652,7 +657,6 @@ class TaxID < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class Country < Orb::Enum AD = :AD AE = :AE @@ -737,7 +741,6 @@ class Country < Orb::Enum end # @abstract - # class Type < Orb::Enum AD_NRT = :ad_nrt AE_TRN = :ae_trn diff --git a/lib/orb/models/customers/balance_transaction_create_params.rb b/lib/orb/models/customers/balance_transaction_create_params.rb index d8a54ca5..1e0a2061 100644 --- a/lib/orb/models/customers/balance_transaction_create_params.rb +++ b/lib/orb/models/customers/balance_transaction_create_params.rb @@ -35,7 +35,6 @@ class BalanceTransactionCreateParams < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class Type < Orb::Enum INCREMENT = :increment DECREMENT = :decrement diff --git a/lib/orb/models/customers/balance_transaction_create_response.rb b/lib/orb/models/customers/balance_transaction_create_response.rb index 7367c232..2bb773a0 100644 --- a/lib/orb/models/customers/balance_transaction_create_response.rb +++ b/lib/orb/models/customers/balance_transaction_create_response.rb @@ -95,7 +95,6 @@ class BalanceTransactionCreateResponse < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class Action < Orb::Enum APPLIED_TO_INVOICE = :applied_to_invoice MANUAL_ADJUSTMENT = :manual_adjustment @@ -141,7 +140,6 @@ class Invoice < Orb::BaseModel end # @abstract - # class Type < Orb::Enum INCREMENT = :increment DECREMENT = :decrement diff --git a/lib/orb/models/customers/balance_transaction_list_response.rb b/lib/orb/models/customers/balance_transaction_list_response.rb index 2f370b61..e0b50cb9 100644 --- a/lib/orb/models/customers/balance_transaction_list_response.rb +++ b/lib/orb/models/customers/balance_transaction_list_response.rb @@ -95,7 +95,6 @@ class BalanceTransactionListResponse < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class Action < Orb::Enum APPLIED_TO_INVOICE = :applied_to_invoice MANUAL_ADJUSTMENT = :manual_adjustment @@ -141,7 +140,6 @@ class Invoice < Orb::BaseModel end # @abstract - # class Type < Orb::Enum INCREMENT = :increment DECREMENT = :decrement diff --git a/lib/orb/models/customers/credit_list_by_external_id_response.rb b/lib/orb/models/customers/credit_list_by_external_id_response.rb index cb254e95..7ff8c472 100644 --- a/lib/orb/models/customers/credit_list_by_external_id_response.rb +++ b/lib/orb/models/customers/credit_list_by_external_id_response.rb @@ -53,7 +53,6 @@ class CreditListByExternalIDResponse < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class Status < Orb::Enum ACTIVE = :active PENDING_PAYMENT = :pending_payment diff --git a/lib/orb/models/customers/credit_list_response.rb b/lib/orb/models/customers/credit_list_response.rb index a81346f3..907bad6d 100644 --- a/lib/orb/models/customers/credit_list_response.rb +++ b/lib/orb/models/customers/credit_list_response.rb @@ -53,7 +53,6 @@ class CreditListResponse < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class Status < Orb::Enum ACTIVE = :active PENDING_PAYMENT = :pending_payment diff --git a/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb b/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb index 1b6ebed5..a8fdde83 100644 --- a/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb +++ b/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb @@ -135,7 +135,6 @@ class LedgerCreateEntryByExternalIDParams < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class EntryType < Orb::Enum AMENDMENT = :amendment diff --git a/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rb b/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rb index 3c54e962..eef004cc 100644 --- a/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rb +++ b/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rb @@ -188,7 +188,6 @@ class Customer < Orb::BaseModel end # @abstract - # class EntryStatus < Orb::Enum COMMITTED = :committed PENDING = :pending @@ -374,7 +373,6 @@ class Customer < Orb::BaseModel end # @abstract - # class EntryStatus < Orb::Enum COMMITTED = :committed PENDING = :pending @@ -546,7 +544,6 @@ class Customer < Orb::BaseModel end # @abstract - # class EntryStatus < Orb::Enum COMMITTED = :committed PENDING = :pending @@ -711,7 +708,6 @@ class Customer < Orb::BaseModel end # @abstract - # class EntryStatus < Orb::Enum COMMITTED = :committed PENDING = :pending @@ -890,7 +886,6 @@ class Customer < Orb::BaseModel end # @abstract - # class EntryStatus < Orb::Enum COMMITTED = :committed PENDING = :pending @@ -1076,7 +1071,6 @@ class Customer < Orb::BaseModel end # @abstract - # class EntryStatus < Orb::Enum COMMITTED = :committed PENDING = :pending @@ -1241,7 +1235,6 @@ class Customer < Orb::BaseModel end # @abstract - # class EntryStatus < Orb::Enum COMMITTED = :committed PENDING = :pending @@ -1249,6 +1242,12 @@ class EntryStatus < Orb::Enum finalize! end end + + # @!parse + # class << self + # # @return [Array(Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::IncrementLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::DecrementLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::ExpirationChangeLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::CreditBlockExpiryLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidInitiatedLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::AmendmentLedgerEntry)] + # def variants; end + # end end end end diff --git a/lib/orb/models/customers/credits/ledger_create_entry_params.rb b/lib/orb/models/customers/credits/ledger_create_entry_params.rb index ec23f06e..6e5569a2 100644 --- a/lib/orb/models/customers/credits/ledger_create_entry_params.rb +++ b/lib/orb/models/customers/credits/ledger_create_entry_params.rb @@ -134,7 +134,6 @@ class LedgerCreateEntryParams < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class EntryType < Orb::Enum AMENDMENT = :amendment diff --git a/lib/orb/models/customers/credits/ledger_create_entry_response.rb b/lib/orb/models/customers/credits/ledger_create_entry_response.rb index e4907bcc..45cf1155 100644 --- a/lib/orb/models/customers/credits/ledger_create_entry_response.rb +++ b/lib/orb/models/customers/credits/ledger_create_entry_response.rb @@ -187,7 +187,6 @@ class Customer < Orb::BaseModel end # @abstract - # class EntryStatus < Orb::Enum COMMITTED = :committed PENDING = :pending @@ -373,7 +372,6 @@ class Customer < Orb::BaseModel end # @abstract - # class EntryStatus < Orb::Enum COMMITTED = :committed PENDING = :pending @@ -545,7 +543,6 @@ class Customer < Orb::BaseModel end # @abstract - # class EntryStatus < Orb::Enum COMMITTED = :committed PENDING = :pending @@ -710,7 +707,6 @@ class Customer < Orb::BaseModel end # @abstract - # class EntryStatus < Orb::Enum COMMITTED = :committed PENDING = :pending @@ -889,7 +885,6 @@ class Customer < Orb::BaseModel end # @abstract - # class EntryStatus < Orb::Enum COMMITTED = :committed PENDING = :pending @@ -1075,7 +1070,6 @@ class Customer < Orb::BaseModel end # @abstract - # class EntryStatus < Orb::Enum COMMITTED = :committed PENDING = :pending @@ -1240,7 +1234,6 @@ class Customer < Orb::BaseModel end # @abstract - # class EntryStatus < Orb::Enum COMMITTED = :committed PENDING = :pending @@ -1248,6 +1241,12 @@ class EntryStatus < Orb::Enum finalize! end end + + # @!parse + # class << self + # # @return [Array(Orb::Models::Customers::Credits::LedgerCreateEntryResponse::IncrementLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::DecrementLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::ExpirationChangeLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::CreditBlockExpiryLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidInitiatedLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::AmendmentLedgerEntry)] + # def variants; end + # end end end end diff --git a/lib/orb/models/customers/credits/ledger_list_by_external_id_params.rb b/lib/orb/models/customers/credits/ledger_list_by_external_id_params.rb index 9d99d748..0a11de2d 100644 --- a/lib/orb/models/customers/credits/ledger_list_by_external_id_params.rb +++ b/lib/orb/models/customers/credits/ledger_list_by_external_id_params.rb @@ -104,7 +104,6 @@ class LedgerListByExternalIDParams < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class EntryStatus < Orb::Enum COMMITTED = :committed PENDING = :pending @@ -113,7 +112,6 @@ class EntryStatus < Orb::Enum end # @abstract - # class EntryType < Orb::Enum INCREMENT = :increment DECREMENT = :decrement diff --git a/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rb b/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rb index 81598950..3cfbbe3e 100644 --- a/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rb +++ b/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rb @@ -187,7 +187,6 @@ class Customer < Orb::BaseModel end # @abstract - # class EntryStatus < Orb::Enum COMMITTED = :committed PENDING = :pending @@ -373,7 +372,6 @@ class Customer < Orb::BaseModel end # @abstract - # class EntryStatus < Orb::Enum COMMITTED = :committed PENDING = :pending @@ -545,7 +543,6 @@ class Customer < Orb::BaseModel end # @abstract - # class EntryStatus < Orb::Enum COMMITTED = :committed PENDING = :pending @@ -710,7 +707,6 @@ class Customer < Orb::BaseModel end # @abstract - # class EntryStatus < Orb::Enum COMMITTED = :committed PENDING = :pending @@ -889,7 +885,6 @@ class Customer < Orb::BaseModel end # @abstract - # class EntryStatus < Orb::Enum COMMITTED = :committed PENDING = :pending @@ -1075,7 +1070,6 @@ class Customer < Orb::BaseModel end # @abstract - # class EntryStatus < Orb::Enum COMMITTED = :committed PENDING = :pending @@ -1240,7 +1234,6 @@ class Customer < Orb::BaseModel end # @abstract - # class EntryStatus < Orb::Enum COMMITTED = :committed PENDING = :pending @@ -1248,6 +1241,12 @@ class EntryStatus < Orb::Enum finalize! end end + + # @!parse + # class << self + # # @return [Array(Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::IncrementLedgerEntry, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::DecrementLedgerEntry, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::ExpirationChangeLedgerEntry, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::CreditBlockExpiryLedgerEntry, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidLedgerEntry, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidInitiatedLedgerEntry, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::AmendmentLedgerEntry)] + # def variants; end + # end end end end diff --git a/lib/orb/models/customers/credits/ledger_list_params.rb b/lib/orb/models/customers/credits/ledger_list_params.rb index f90ceef1..8ecdf7ab 100644 --- a/lib/orb/models/customers/credits/ledger_list_params.rb +++ b/lib/orb/models/customers/credits/ledger_list_params.rb @@ -104,7 +104,6 @@ class LedgerListParams < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class EntryStatus < Orb::Enum COMMITTED = :committed PENDING = :pending @@ -113,7 +112,6 @@ class EntryStatus < Orb::Enum end # @abstract - # class EntryType < Orb::Enum INCREMENT = :increment DECREMENT = :decrement diff --git a/lib/orb/models/customers/credits/ledger_list_response.rb b/lib/orb/models/customers/credits/ledger_list_response.rb index 3ea7da8e..0b6bd6bc 100644 --- a/lib/orb/models/customers/credits/ledger_list_response.rb +++ b/lib/orb/models/customers/credits/ledger_list_response.rb @@ -184,7 +184,6 @@ class Customer < Orb::BaseModel end # @abstract - # class EntryStatus < Orb::Enum COMMITTED = :committed PENDING = :pending @@ -370,7 +369,6 @@ class Customer < Orb::BaseModel end # @abstract - # class EntryStatus < Orb::Enum COMMITTED = :committed PENDING = :pending @@ -542,7 +540,6 @@ class Customer < Orb::BaseModel end # @abstract - # class EntryStatus < Orb::Enum COMMITTED = :committed PENDING = :pending @@ -707,7 +704,6 @@ class Customer < Orb::BaseModel end # @abstract - # class EntryStatus < Orb::Enum COMMITTED = :committed PENDING = :pending @@ -885,7 +881,6 @@ class Customer < Orb::BaseModel end # @abstract - # class EntryStatus < Orb::Enum COMMITTED = :committed PENDING = :pending @@ -1071,7 +1066,6 @@ class Customer < Orb::BaseModel end # @abstract - # class EntryStatus < Orb::Enum COMMITTED = :committed PENDING = :pending @@ -1236,7 +1230,6 @@ class Customer < Orb::BaseModel end # @abstract - # class EntryStatus < Orb::Enum COMMITTED = :committed PENDING = :pending @@ -1244,6 +1237,12 @@ class EntryStatus < Orb::Enum finalize! end end + + # @!parse + # class << self + # # @return [Array(Orb::Models::Customers::Credits::LedgerListResponse::IncrementLedgerEntry, Orb::Models::Customers::Credits::LedgerListResponse::DecrementLedgerEntry, Orb::Models::Customers::Credits::LedgerListResponse::ExpirationChangeLedgerEntry, Orb::Models::Customers::Credits::LedgerListResponse::CreditBlockExpiryLedgerEntry, Orb::Models::Customers::Credits::LedgerListResponse::VoidLedgerEntry, Orb::Models::Customers::Credits::LedgerListResponse::VoidInitiatedLedgerEntry, Orb::Models::Customers::Credits::LedgerListResponse::AmendmentLedgerEntry)] + # def variants; end + # end end end end diff --git a/lib/orb/models/discount.rb b/lib/orb/models/discount.rb index 4fa31b8a..bc978e4f 100644 --- a/lib/orb/models/discount.rb +++ b/lib/orb/models/discount.rb @@ -3,7 +3,6 @@ module Orb module Models # @abstract - # class Discount < Orb::Union discriminator :discount_type @@ -14,6 +13,12 @@ class Discount < Orb::Union variant :usage, -> { Orb::Models::UsageDiscount } variant :amount, -> { Orb::Models::AmountDiscount } + + # @!parse + # class << self + # # @return [Array(Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::UsageDiscount, Orb::Models::AmountDiscount)] + # def variants; end + # end end end end diff --git a/lib/orb/models/evaluate_price_group.rb b/lib/orb/models/evaluate_price_group.rb index 07e9b857..766f46f7 100644 --- a/lib/orb/models/evaluate_price_group.rb +++ b/lib/orb/models/evaluate_price_group.rb @@ -31,13 +31,18 @@ class EvaluatePriceGroup < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class GroupingValue < Orb::Union variant String variant Float variant Orb::BooleanModel + + # @!parse + # class << self + # # @return [Array(String, Float, Boolean)] + # def variants; end + # end end end end diff --git a/lib/orb/models/invoice.rb b/lib/orb/models/invoice.rb index 3535ab8a..24073823 100644 --- a/lib/orb/models/invoice.rb +++ b/lib/orb/models/invoice.rb @@ -711,7 +711,6 @@ class CustomerBalanceTransaction < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class Action < Orb::Enum APPLIED_TO_INVOICE = :applied_to_invoice MANUAL_ADJUSTMENT = :manual_adjustment @@ -757,7 +756,6 @@ class Invoice < Orb::BaseModel end # @abstract - # class Type < Orb::Enum INCREMENT = :increment DECREMENT = :decrement @@ -898,7 +896,6 @@ class CustomerTaxID < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class Country < Orb::Enum AD = :AD AE = :AE @@ -983,7 +980,6 @@ class Country < Orb::Enum end # @abstract - # class Type < Orb::Enum AD_NRT = :ad_nrt AE_TRN = :ae_trn @@ -1062,7 +1058,6 @@ class Type < Orb::Enum end # @abstract - # class InvoiceSource < Orb::Enum SUBSCRIPTION = :subscription PARTIAL = :partial @@ -1275,7 +1270,6 @@ class LineItem < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class Adjustment < Orb::Union discriminator :adjustment_type @@ -1639,10 +1633,15 @@ class MonetaryMaximumAdjustment < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void end + + # @!parse + # class << self + # # @return [Array(Orb::Models::Invoice::LineItem::Adjustment::MonetaryUsageDiscountAdjustment, Orb::Models::Invoice::LineItem::Adjustment::MonetaryAmountDiscountAdjustment, Orb::Models::Invoice::LineItem::Adjustment::MonetaryPercentageDiscountAdjustment, Orb::Models::Invoice::LineItem::Adjustment::MonetaryMinimumAdjustment, Orb::Models::Invoice::LineItem::Adjustment::MonetaryMaximumAdjustment)] + # def variants; end + # end end # @deprecated - # class Maximum < Orb::BaseModel # @!attribute applies_to_price_ids # List of price_ids that this maximum amount applies to. For plan/plan phase @@ -1669,7 +1668,6 @@ class Maximum < Orb::BaseModel end # @deprecated - # class Minimum < Orb::BaseModel # @!attribute applies_to_price_ids # List of price_ids that this minimum amount applies to. For plan/plan phase @@ -1696,7 +1694,6 @@ class Minimum < Orb::BaseModel end # @abstract - # class SubLineItem < Orb::Union discriminator :type @@ -1945,6 +1942,12 @@ class Grouping < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void end end + + # @!parse + # class << self + # # @return [Array(Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem, Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem, Orb::Models::Invoice::LineItem::SubLineItem::OtherSubLineItem)] + # def variants; end + # end end class TaxAmount < Orb::BaseModel @@ -2127,7 +2130,6 @@ class ShippingAddress < Orb::BaseModel end # @abstract - # class Status < Orb::Enum ISSUED = :issued PAID = :paid diff --git a/lib/orb/models/invoice_create_params.rb b/lib/orb/models/invoice_create_params.rb index e4de3bb5..7ab73a98 100644 --- a/lib/orb/models/invoice_create_params.rb +++ b/lib/orb/models/invoice_create_params.rb @@ -166,7 +166,6 @@ class LineItem < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class ModelType < Orb::Enum UNIT = :unit diff --git a/lib/orb/models/invoice_fetch_upcoming_response.rb b/lib/orb/models/invoice_fetch_upcoming_response.rb index de1ba906..49413359 100644 --- a/lib/orb/models/invoice_fetch_upcoming_response.rb +++ b/lib/orb/models/invoice_fetch_upcoming_response.rb @@ -710,7 +710,6 @@ class CustomerBalanceTransaction < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class Action < Orb::Enum APPLIED_TO_INVOICE = :applied_to_invoice MANUAL_ADJUSTMENT = :manual_adjustment @@ -756,7 +755,6 @@ class Invoice < Orb::BaseModel end # @abstract - # class Type < Orb::Enum INCREMENT = :increment DECREMENT = :decrement @@ -897,7 +895,6 @@ class CustomerTaxID < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class Country < Orb::Enum AD = :AD AE = :AE @@ -982,7 +979,6 @@ class Country < Orb::Enum end # @abstract - # class Type < Orb::Enum AD_NRT = :ad_nrt AE_TRN = :ae_trn @@ -1061,7 +1057,6 @@ class Type < Orb::Enum end # @abstract - # class InvoiceSource < Orb::Enum SUBSCRIPTION = :subscription PARTIAL = :partial @@ -1276,7 +1271,6 @@ class LineItem < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class Adjustment < Orb::Union discriminator :adjustment_type @@ -1642,10 +1636,15 @@ class MonetaryMaximumAdjustment < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void end + + # @!parse + # class << self + # # @return [Array(Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryUsageDiscountAdjustment, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryAmountDiscountAdjustment, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryPercentageDiscountAdjustment, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryMinimumAdjustment, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryMaximumAdjustment)] + # def variants; end + # end end # @deprecated - # class Maximum < Orb::BaseModel # @!attribute applies_to_price_ids # List of price_ids that this maximum amount applies to. For plan/plan phase @@ -1672,7 +1671,6 @@ class Maximum < Orb::BaseModel end # @deprecated - # class Minimum < Orb::BaseModel # @!attribute applies_to_price_ids # List of price_ids that this minimum amount applies to. For plan/plan phase @@ -1699,7 +1697,6 @@ class Minimum < Orb::BaseModel end # @abstract - # class SubLineItem < Orb::Union discriminator :type @@ -1951,6 +1948,12 @@ class Grouping < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void end end + + # @!parse + # class << self + # # @return [Array(Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::MatrixSubLineItem, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::TierSubLineItem, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::OtherSubLineItem)] + # def variants; end + # end end class TaxAmount < Orb::BaseModel @@ -2135,7 +2138,6 @@ class ShippingAddress < Orb::BaseModel end # @abstract - # class Status < Orb::Enum ISSUED = :issued PAID = :paid diff --git a/lib/orb/models/invoice_level_discount.rb b/lib/orb/models/invoice_level_discount.rb index b3e63535..5c5da398 100644 --- a/lib/orb/models/invoice_level_discount.rb +++ b/lib/orb/models/invoice_level_discount.rb @@ -3,7 +3,6 @@ module Orb module Models # @abstract - # class InvoiceLevelDiscount < Orb::Union discriminator :discount_type @@ -12,6 +11,12 @@ class InvoiceLevelDiscount < Orb::Union variant :amount, -> { Orb::Models::AmountDiscount } variant :trial, -> { Orb::Models::TrialDiscount } + + # @!parse + # class << self + # # @return [Array(Orb::Models::PercentageDiscount, Orb::Models::AmountDiscount, Orb::Models::TrialDiscount)] + # def variants; end + # end end end end diff --git a/lib/orb/models/invoice_line_item_create_response.rb b/lib/orb/models/invoice_line_item_create_response.rb index 77152c86..184e545a 100644 --- a/lib/orb/models/invoice_line_item_create_response.rb +++ b/lib/orb/models/invoice_line_item_create_response.rb @@ -207,7 +207,6 @@ class InvoiceLineItemCreateResponse < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class Adjustment < Orb::Union discriminator :adjustment_type @@ -571,10 +570,15 @@ class MonetaryMaximumAdjustment < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void end + + # @!parse + # class << self + # # @return [Array(Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryUsageDiscountAdjustment, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryAmountDiscountAdjustment, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryPercentageDiscountAdjustment, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryMinimumAdjustment, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryMaximumAdjustment)] + # def variants; end + # end end # @deprecated - # class Maximum < Orb::BaseModel # @!attribute applies_to_price_ids # List of price_ids that this maximum amount applies to. For plan/plan phase @@ -601,7 +605,6 @@ class Maximum < Orb::BaseModel end # @deprecated - # class Minimum < Orb::BaseModel # @!attribute applies_to_price_ids # List of price_ids that this minimum amount applies to. For plan/plan phase @@ -628,7 +631,6 @@ class Minimum < Orb::BaseModel end # @abstract - # class SubLineItem < Orb::Union discriminator :type @@ -878,6 +880,12 @@ class Grouping < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void end end + + # @!parse + # class << self + # # @return [Array(Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::MatrixSubLineItem, Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::TierSubLineItem, Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::OtherSubLineItem)] + # def variants; end + # end end class TaxAmount < Orb::BaseModel diff --git a/lib/orb/models/invoice_list_params.rb b/lib/orb/models/invoice_list_params.rb index b62f9d3f..1f3fc1b4 100644 --- a/lib/orb/models/invoice_list_params.rb +++ b/lib/orb/models/invoice_list_params.rb @@ -164,7 +164,6 @@ class InvoiceListParams < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DateType < Orb::Enum DUE_DATE = :due_date INVOICE_DATE = :invoice_date @@ -173,7 +172,6 @@ class DateType < Orb::Enum end # @abstract - # class Status < Orb::Enum DRAFT = :draft ISSUED = :issued diff --git a/lib/orb/models/item.rb b/lib/orb/models/item.rb index 1634d12d..719a8bb7 100644 --- a/lib/orb/models/item.rb +++ b/lib/orb/models/item.rb @@ -58,7 +58,6 @@ class ExternalConnection < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class ExternalConnectionName < Orb::Enum STRIPE = :stripe QUICKBOOKS = :quickbooks diff --git a/lib/orb/models/item_update_params.rb b/lib/orb/models/item_update_params.rb index e23fc23d..a6424e56 100644 --- a/lib/orb/models/item_update_params.rb +++ b/lib/orb/models/item_update_params.rb @@ -49,7 +49,6 @@ class ExternalConnection < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class ExternalConnectionName < Orb::Enum STRIPE = :stripe QUICKBOOKS = :quickbooks diff --git a/lib/orb/models/percentage_discount.rb b/lib/orb/models/percentage_discount.rb index 7e0d0509..dcd1f139 100644 --- a/lib/orb/models/percentage_discount.rb +++ b/lib/orb/models/percentage_discount.rb @@ -38,7 +38,6 @@ class PercentageDiscount < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DiscountType < Orb::Enum PERCENTAGE = :percentage diff --git a/lib/orb/models/plan.rb b/lib/orb/models/plan.rb index 6770c51e..7de61165 100644 --- a/lib/orb/models/plan.rb +++ b/lib/orb/models/plan.rb @@ -211,7 +211,6 @@ class Plan < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class Adjustment < Orb::Union discriminator :adjustment_type @@ -572,6 +571,12 @@ class PlanPhaseMaximumAdjustment < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void end + + # @!parse + # class << self + # # @return [Array(Orb::Models::Plan::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::Plan::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::Plan::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::Plan::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::Plan::Adjustment::PlanPhaseMaximumAdjustment)] + # def variants; end + # end end class BasePlan < Orb::BaseModel @@ -741,7 +746,6 @@ class PlanPhase < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DurationUnit < Orb::Enum DAILY = :daily MONTHLY = :monthly @@ -826,7 +830,6 @@ class Product < Orb::BaseModel end # @abstract - # class Status < Orb::Enum ACTIVE = :active ARCHIVED = :archived @@ -855,7 +858,6 @@ class TrialConfig < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class TrialPeriodUnit < Orb::Enum DAYS = :days diff --git a/lib/orb/models/plan_create_params.rb b/lib/orb/models/plan_create_params.rb index f273efc0..ba593e84 100644 --- a/lib/orb/models/plan_create_params.rb +++ b/lib/orb/models/plan_create_params.rb @@ -93,7 +93,6 @@ class PlanCreateParams < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class Price < Orb::Union discriminator :model_type @@ -6168,6 +6167,12 @@ class DurationUnit < Orb::Enum end end end + + # @!parse + # class << self + # # @return [Array(Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice, Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice, Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice, Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice, Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice, Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice, Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice, Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice, Orb::Models::PlanCreateParams::Price::NewPlanThresholdTotalAmountPrice, Orb::Models::PlanCreateParams::Price::NewPlanTieredPackagePrice, Orb::Models::PlanCreateParams::Price::NewPlanTieredWithMinimumPrice, Orb::Models::PlanCreateParams::Price::NewPlanUnitWithPercentPrice, Orb::Models::PlanCreateParams::Price::NewPlanPackageWithAllocationPrice, Orb::Models::PlanCreateParams::Price::NewPlanTierWithProrationPrice, Orb::Models::PlanCreateParams::Price::NewPlanUnitWithProrationPrice, Orb::Models::PlanCreateParams::Price::NewPlanGroupedAllocationPrice, Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::PlanCreateParams::Price::NewPlanMatrixWithDisplayNamePrice, Orb::Models::PlanCreateParams::Price::NewPlanBulkWithProrationPrice, Orb::Models::PlanCreateParams::Price::NewPlanGroupedTieredPackagePrice, Orb::Models::PlanCreateParams::Price::NewPlanMaxGroupTieredPackagePrice, Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::PlanCreateParams::Price::NewPlanCumulativeGroupedBulkPrice)] + # def variants; end + # end end # @abstract diff --git a/lib/orb/models/price.rb b/lib/orb/models/price.rb index 1989b787..2c4b57f6 100644 --- a/lib/orb/models/price.rb +++ b/lib/orb/models/price.rb @@ -296,7 +296,6 @@ class BillingCycleConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DurationUnit < Orb::Enum DAY = :day MONTH = :month @@ -306,7 +305,6 @@ class DurationUnit < Orb::Enum end # @abstract - # class Cadence < Orb::Enum ONE_TIME = :one_time MONTHLY = :monthly @@ -359,7 +357,6 @@ class InvoicingCycleConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DurationUnit < Orb::Enum DAY = :day MONTH = :month @@ -435,7 +432,6 @@ class Minimum < Orb::BaseModel end # @abstract - # class PriceType < Orb::Enum USAGE_PRICE = :usage_price FIXED_PRICE = :fixed_price @@ -701,7 +697,6 @@ class BillingCycleConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DurationUnit < Orb::Enum DAY = :day MONTH = :month @@ -711,7 +706,6 @@ class DurationUnit < Orb::Enum end # @abstract - # class Cadence < Orb::Enum ONE_TIME = :one_time MONTHLY = :monthly @@ -764,7 +758,6 @@ class InvoicingCycleConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DurationUnit < Orb::Enum DAY = :day MONTH = :month @@ -863,7 +856,6 @@ class PackageConfig < Orb::BaseModel end # @abstract - # class PriceType < Orb::Enum USAGE_PRICE = :usage_price FIXED_PRICE = :fixed_price @@ -1114,7 +1106,6 @@ class BillingCycleConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DurationUnit < Orb::Enum DAY = :day MONTH = :month @@ -1124,7 +1115,6 @@ class DurationUnit < Orb::Enum end # @abstract - # class Cadence < Orb::Enum ONE_TIME = :one_time MONTHLY = :monthly @@ -1177,7 +1167,6 @@ class InvoicingCycleConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DurationUnit < Orb::Enum DAY = :day MONTH = :month @@ -1306,7 +1295,6 @@ class Minimum < Orb::BaseModel end # @abstract - # class PriceType < Orb::Enum USAGE_PRICE = :usage_price FIXED_PRICE = :fixed_price @@ -1557,7 +1545,6 @@ class BillingCycleConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DurationUnit < Orb::Enum DAY = :day MONTH = :month @@ -1567,7 +1554,6 @@ class DurationUnit < Orb::Enum end # @abstract - # class Cadence < Orb::Enum ONE_TIME = :one_time MONTHLY = :monthly @@ -1620,7 +1606,6 @@ class InvoicingCycleConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DurationUnit < Orb::Enum DAY = :day MONTH = :month @@ -1696,7 +1681,6 @@ class Minimum < Orb::BaseModel end # @abstract - # class PriceType < Orb::Enum USAGE_PRICE = :usage_price FIXED_PRICE = :fixed_price @@ -1992,7 +1976,6 @@ class BillingCycleConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DurationUnit < Orb::Enum DAY = :day MONTH = :month @@ -2002,7 +1985,6 @@ class DurationUnit < Orb::Enum end # @abstract - # class Cadence < Orb::Enum ONE_TIME = :one_time MONTHLY = :monthly @@ -2055,7 +2037,6 @@ class InvoicingCycleConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DurationUnit < Orb::Enum DAY = :day MONTH = :month @@ -2131,7 +2112,6 @@ class Minimum < Orb::BaseModel end # @abstract - # class PriceType < Orb::Enum USAGE_PRICE = :usage_price FIXED_PRICE = :fixed_price @@ -2434,7 +2414,6 @@ class BillingCycleConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DurationUnit < Orb::Enum DAY = :day MONTH = :month @@ -2466,7 +2445,6 @@ class BpsConfig < Orb::BaseModel end # @abstract - # class Cadence < Orb::Enum ONE_TIME = :one_time MONTHLY = :monthly @@ -2519,7 +2497,6 @@ class InvoicingCycleConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DurationUnit < Orb::Enum DAY = :day MONTH = :month @@ -2595,7 +2572,6 @@ class Minimum < Orb::BaseModel end # @abstract - # class PriceType < Orb::Enum USAGE_PRICE = :usage_price FIXED_PRICE = :fixed_price @@ -2846,7 +2822,6 @@ class BillingCycleConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DurationUnit < Orb::Enum DAY = :day MONTH = :month @@ -2901,7 +2876,6 @@ class Tier < Orb::BaseModel end # @abstract - # class Cadence < Orb::Enum ONE_TIME = :one_time MONTHLY = :monthly @@ -2954,7 +2928,6 @@ class InvoicingCycleConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DurationUnit < Orb::Enum DAY = :day MONTH = :month @@ -3030,7 +3003,6 @@ class Minimum < Orb::BaseModel end # @abstract - # class PriceType < Orb::Enum USAGE_PRICE = :usage_price FIXED_PRICE = :fixed_price @@ -3281,7 +3253,6 @@ class BillingCycleConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DurationUnit < Orb::Enum DAY = :day MONTH = :month @@ -3328,7 +3299,6 @@ class Tier < Orb::BaseModel end # @abstract - # class Cadence < Orb::Enum ONE_TIME = :one_time MONTHLY = :monthly @@ -3381,7 +3351,6 @@ class InvoicingCycleConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DurationUnit < Orb::Enum DAY = :day MONTH = :month @@ -3457,7 +3426,6 @@ class Minimum < Orb::BaseModel end # @abstract - # class PriceType < Orb::Enum USAGE_PRICE = :usage_price FIXED_PRICE = :fixed_price @@ -3713,7 +3681,6 @@ class BillingCycleConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DurationUnit < Orb::Enum DAY = :day MONTH = :month @@ -3723,7 +3690,6 @@ class DurationUnit < Orb::Enum end # @abstract - # class Cadence < Orb::Enum ONE_TIME = :one_time MONTHLY = :monthly @@ -3776,7 +3742,6 @@ class InvoicingCycleConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DurationUnit < Orb::Enum DAY = :day MONTH = :month @@ -3852,7 +3817,6 @@ class Minimum < Orb::BaseModel end # @abstract - # class PriceType < Orb::Enum USAGE_PRICE = :usage_price FIXED_PRICE = :fixed_price @@ -4104,7 +4068,6 @@ class BillingCycleConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DurationUnit < Orb::Enum DAY = :day MONTH = :month @@ -4114,7 +4077,6 @@ class DurationUnit < Orb::Enum end # @abstract - # class Cadence < Orb::Enum ONE_TIME = :one_time MONTHLY = :monthly @@ -4167,7 +4129,6 @@ class InvoicingCycleConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DurationUnit < Orb::Enum DAY = :day MONTH = :month @@ -4243,7 +4204,6 @@ class Minimum < Orb::BaseModel end # @abstract - # class PriceType < Orb::Enum USAGE_PRICE = :usage_price FIXED_PRICE = :fixed_price @@ -4495,7 +4455,6 @@ class BillingCycleConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DurationUnit < Orb::Enum DAY = :day MONTH = :month @@ -4505,7 +4464,6 @@ class DurationUnit < Orb::Enum end # @abstract - # class Cadence < Orb::Enum ONE_TIME = :one_time MONTHLY = :monthly @@ -4558,7 +4516,6 @@ class InvoicingCycleConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DurationUnit < Orb::Enum DAY = :day MONTH = :month @@ -4634,7 +4591,6 @@ class Minimum < Orb::BaseModel end # @abstract - # class PriceType < Orb::Enum USAGE_PRICE = :usage_price FIXED_PRICE = :fixed_price @@ -4888,7 +4844,6 @@ class BillingCycleConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DurationUnit < Orb::Enum DAY = :day MONTH = :month @@ -4898,7 +4853,6 @@ class DurationUnit < Orb::Enum end # @abstract - # class Cadence < Orb::Enum ONE_TIME = :one_time MONTHLY = :monthly @@ -4951,7 +4905,6 @@ class InvoicingCycleConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DurationUnit < Orb::Enum DAY = :day MONTH = :month @@ -5027,7 +4980,6 @@ class Minimum < Orb::BaseModel end # @abstract - # class PriceType < Orb::Enum USAGE_PRICE = :usage_price FIXED_PRICE = :fixed_price @@ -5283,7 +5235,6 @@ class BillingCycleConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DurationUnit < Orb::Enum DAY = :day MONTH = :month @@ -5293,7 +5244,6 @@ class DurationUnit < Orb::Enum end # @abstract - # class Cadence < Orb::Enum ONE_TIME = :one_time MONTHLY = :monthly @@ -5346,7 +5296,6 @@ class InvoicingCycleConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DurationUnit < Orb::Enum DAY = :day MONTH = :month @@ -5422,7 +5371,6 @@ class Minimum < Orb::BaseModel end # @abstract - # class PriceType < Orb::Enum USAGE_PRICE = :usage_price FIXED_PRICE = :fixed_price @@ -5678,7 +5626,6 @@ class BillingCycleConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DurationUnit < Orb::Enum DAY = :day MONTH = :month @@ -5688,7 +5635,6 @@ class DurationUnit < Orb::Enum end # @abstract - # class Cadence < Orb::Enum ONE_TIME = :one_time MONTHLY = :monthly @@ -5741,7 +5687,6 @@ class InvoicingCycleConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DurationUnit < Orb::Enum DAY = :day MONTH = :month @@ -5817,7 +5762,6 @@ class Minimum < Orb::BaseModel end # @abstract - # class PriceType < Orb::Enum USAGE_PRICE = :usage_price FIXED_PRICE = :fixed_price @@ -6069,7 +6013,6 @@ class BillingCycleConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DurationUnit < Orb::Enum DAY = :day MONTH = :month @@ -6079,7 +6022,6 @@ class DurationUnit < Orb::Enum end # @abstract - # class Cadence < Orb::Enum ONE_TIME = :one_time MONTHLY = :monthly @@ -6132,7 +6074,6 @@ class InvoicingCycleConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DurationUnit < Orb::Enum DAY = :day MONTH = :month @@ -6208,7 +6149,6 @@ class Minimum < Orb::BaseModel end # @abstract - # class PriceType < Orb::Enum USAGE_PRICE = :usage_price FIXED_PRICE = :fixed_price @@ -6465,7 +6405,6 @@ class BillingCycleConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DurationUnit < Orb::Enum DAY = :day MONTH = :month @@ -6475,7 +6414,6 @@ class DurationUnit < Orb::Enum end # @abstract - # class Cadence < Orb::Enum ONE_TIME = :one_time MONTHLY = :monthly @@ -6528,7 +6466,6 @@ class InvoicingCycleConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DurationUnit < Orb::Enum DAY = :day MONTH = :month @@ -6665,7 +6602,6 @@ class Minimum < Orb::BaseModel end # @abstract - # class PriceType < Orb::Enum USAGE_PRICE = :usage_price FIXED_PRICE = :fixed_price @@ -6919,7 +6855,6 @@ class BillingCycleConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DurationUnit < Orb::Enum DAY = :day MONTH = :month @@ -6929,7 +6864,6 @@ class DurationUnit < Orb::Enum end # @abstract - # class Cadence < Orb::Enum ONE_TIME = :one_time MONTHLY = :monthly @@ -6982,7 +6916,6 @@ class InvoicingCycleConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DurationUnit < Orb::Enum DAY = :day MONTH = :month @@ -7058,7 +6991,6 @@ class Minimum < Orb::BaseModel end # @abstract - # class PriceType < Orb::Enum USAGE_PRICE = :usage_price FIXED_PRICE = :fixed_price @@ -7312,7 +7244,6 @@ class BillingCycleConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DurationUnit < Orb::Enum DAY = :day MONTH = :month @@ -7322,7 +7253,6 @@ class DurationUnit < Orb::Enum end # @abstract - # class Cadence < Orb::Enum ONE_TIME = :one_time MONTHLY = :monthly @@ -7375,7 +7305,6 @@ class InvoicingCycleConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DurationUnit < Orb::Enum DAY = :day MONTH = :month @@ -7451,7 +7380,6 @@ class Minimum < Orb::BaseModel end # @abstract - # class PriceType < Orb::Enum USAGE_PRICE = :usage_price FIXED_PRICE = :fixed_price @@ -7705,7 +7633,6 @@ class BillingCycleConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DurationUnit < Orb::Enum DAY = :day MONTH = :month @@ -7715,7 +7642,6 @@ class DurationUnit < Orb::Enum end # @abstract - # class Cadence < Orb::Enum ONE_TIME = :one_time MONTHLY = :monthly @@ -7768,7 +7694,6 @@ class InvoicingCycleConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DurationUnit < Orb::Enum DAY = :day MONTH = :month @@ -7844,7 +7769,6 @@ class Minimum < Orb::BaseModel end # @abstract - # class PriceType < Orb::Enum USAGE_PRICE = :usage_price FIXED_PRICE = :fixed_price @@ -8100,7 +8024,6 @@ class BillingCycleConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DurationUnit < Orb::Enum DAY = :day MONTH = :month @@ -8110,7 +8033,6 @@ class DurationUnit < Orb::Enum end # @abstract - # class Cadence < Orb::Enum ONE_TIME = :one_time MONTHLY = :monthly @@ -8163,7 +8085,6 @@ class InvoicingCycleConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DurationUnit < Orb::Enum DAY = :day MONTH = :month @@ -8239,7 +8160,6 @@ class Minimum < Orb::BaseModel end # @abstract - # class PriceType < Orb::Enum USAGE_PRICE = :usage_price FIXED_PRICE = :fixed_price @@ -8495,7 +8415,6 @@ class BillingCycleConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DurationUnit < Orb::Enum DAY = :day MONTH = :month @@ -8505,7 +8424,6 @@ class DurationUnit < Orb::Enum end # @abstract - # class Cadence < Orb::Enum ONE_TIME = :one_time MONTHLY = :monthly @@ -8558,7 +8476,6 @@ class InvoicingCycleConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DurationUnit < Orb::Enum DAY = :day MONTH = :month @@ -8634,7 +8551,6 @@ class Minimum < Orb::BaseModel end # @abstract - # class PriceType < Orb::Enum USAGE_PRICE = :usage_price FIXED_PRICE = :fixed_price @@ -8890,7 +8806,6 @@ class BillingCycleConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DurationUnit < Orb::Enum DAY = :day MONTH = :month @@ -8900,7 +8815,6 @@ class DurationUnit < Orb::Enum end # @abstract - # class Cadence < Orb::Enum ONE_TIME = :one_time MONTHLY = :monthly @@ -8953,7 +8867,6 @@ class InvoicingCycleConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DurationUnit < Orb::Enum DAY = :day MONTH = :month @@ -9029,7 +8942,6 @@ class Minimum < Orb::BaseModel end # @abstract - # class PriceType < Orb::Enum USAGE_PRICE = :usage_price FIXED_PRICE = :fixed_price @@ -9283,7 +9195,6 @@ class BillingCycleConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DurationUnit < Orb::Enum DAY = :day MONTH = :month @@ -9293,7 +9204,6 @@ class DurationUnit < Orb::Enum end # @abstract - # class Cadence < Orb::Enum ONE_TIME = :one_time MONTHLY = :monthly @@ -9346,7 +9256,6 @@ class InvoicingCycleConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DurationUnit < Orb::Enum DAY = :day MONTH = :month @@ -9422,7 +9331,6 @@ class Minimum < Orb::BaseModel end # @abstract - # class PriceType < Orb::Enum USAGE_PRICE = :usage_price FIXED_PRICE = :fixed_price @@ -9678,7 +9586,6 @@ class BillingCycleConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DurationUnit < Orb::Enum DAY = :day MONTH = :month @@ -9688,7 +9595,6 @@ class DurationUnit < Orb::Enum end # @abstract - # class Cadence < Orb::Enum ONE_TIME = :one_time MONTHLY = :monthly @@ -9741,7 +9647,6 @@ class InvoicingCycleConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DurationUnit < Orb::Enum DAY = :day MONTH = :month @@ -9817,7 +9722,6 @@ class Minimum < Orb::BaseModel end # @abstract - # class PriceType < Orb::Enum USAGE_PRICE = :usage_price FIXED_PRICE = :fixed_price @@ -10073,7 +9977,6 @@ class BillingCycleConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DurationUnit < Orb::Enum DAY = :day MONTH = :month @@ -10083,7 +9986,6 @@ class DurationUnit < Orb::Enum end # @abstract - # class Cadence < Orb::Enum ONE_TIME = :one_time MONTHLY = :monthly @@ -10136,7 +10038,6 @@ class InvoicingCycleConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DurationUnit < Orb::Enum DAY = :day MONTH = :month @@ -10212,7 +10113,6 @@ class Minimum < Orb::BaseModel end # @abstract - # class PriceType < Orb::Enum USAGE_PRICE = :usage_price FIXED_PRICE = :fixed_price @@ -10468,7 +10368,6 @@ class BillingCycleConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DurationUnit < Orb::Enum DAY = :day MONTH = :month @@ -10478,7 +10377,6 @@ class DurationUnit < Orb::Enum end # @abstract - # class Cadence < Orb::Enum ONE_TIME = :one_time MONTHLY = :monthly @@ -10531,7 +10429,6 @@ class InvoicingCycleConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DurationUnit < Orb::Enum DAY = :day MONTH = :month @@ -10607,7 +10504,6 @@ class Minimum < Orb::BaseModel end # @abstract - # class PriceType < Orb::Enum USAGE_PRICE = :usage_price FIXED_PRICE = :fixed_price @@ -10863,7 +10759,6 @@ class BillingCycleConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DurationUnit < Orb::Enum DAY = :day MONTH = :month @@ -10873,7 +10768,6 @@ class DurationUnit < Orb::Enum end # @abstract - # class Cadence < Orb::Enum ONE_TIME = :one_time MONTHLY = :monthly @@ -10926,7 +10820,6 @@ class InvoicingCycleConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DurationUnit < Orb::Enum DAY = :day MONTH = :month @@ -11002,7 +10895,6 @@ class Minimum < Orb::BaseModel end # @abstract - # class PriceType < Orb::Enum USAGE_PRICE = :usage_price FIXED_PRICE = :fixed_price @@ -11258,7 +11150,6 @@ class BillingCycleConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DurationUnit < Orb::Enum DAY = :day MONTH = :month @@ -11268,7 +11159,6 @@ class DurationUnit < Orb::Enum end # @abstract - # class Cadence < Orb::Enum ONE_TIME = :one_time MONTHLY = :monthly @@ -11321,7 +11211,6 @@ class InvoicingCycleConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DurationUnit < Orb::Enum DAY = :day MONTH = :month @@ -11397,7 +11286,6 @@ class Minimum < Orb::BaseModel end # @abstract - # class PriceType < Orb::Enum USAGE_PRICE = :usage_price FIXED_PRICE = :fixed_price @@ -11425,6 +11313,12 @@ class DimensionalPriceConfiguration < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void end end + + # @!parse + # class << self + # # @return [Array(Orb::Models::Price::UnitPrice, Orb::Models::Price::PackagePrice, Orb::Models::Price::MatrixPrice, Orb::Models::Price::TieredPrice, Orb::Models::Price::TieredBpsPrice, Orb::Models::Price::BpsPrice, Orb::Models::Price::BulkBpsPrice, Orb::Models::Price::BulkPrice, Orb::Models::Price::ThresholdTotalAmountPrice, Orb::Models::Price::TieredPackagePrice, Orb::Models::Price::GroupedTieredPrice, Orb::Models::Price::TieredWithMinimumPrice, Orb::Models::Price::TieredPackageWithMinimumPrice, Orb::Models::Price::PackageWithAllocationPrice, Orb::Models::Price::UnitWithPercentPrice, Orb::Models::Price::MatrixWithAllocationPrice, Orb::Models::Price::TieredWithProrationPrice, Orb::Models::Price::UnitWithProrationPrice, Orb::Models::Price::GroupedAllocationPrice, Orb::Models::Price::GroupedWithProratedMinimumPrice, Orb::Models::Price::GroupedWithMeteredMinimumPrice, Orb::Models::Price::MatrixWithDisplayNamePrice, Orb::Models::Price::BulkWithProrationPrice, Orb::Models::Price::GroupedTieredPackagePrice, Orb::Models::Price::MaxGroupTieredPackagePrice, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, Orb::Models::Price::CumulativeGroupedBulkPrice)] + # def variants; end + # end end end end diff --git a/lib/orb/models/price_create_params.rb b/lib/orb/models/price_create_params.rb index 00ba7337..b9cf79a0 100644 --- a/lib/orb/models/price_create_params.rb +++ b/lib/orb/models/price_create_params.rb @@ -352,7 +352,6 @@ class Cadence < Orb::Enum end # @abstract - # class ModelType < Orb::Enum CUMULATIVE_GROUPED_BULK = :cumulative_grouped_bulk diff --git a/lib/orb/models/subscription.rb b/lib/orb/models/subscription.rb index 4b5a5a99..0e8f268d 100644 --- a/lib/orb/models/subscription.rb +++ b/lib/orb/models/subscription.rb @@ -306,7 +306,6 @@ class AdjustmentInterval < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class Adjustment < Orb::Union discriminator :adjustment_type @@ -672,6 +671,12 @@ class PlanPhaseMaximumAdjustment < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void end + + # @!parse + # class << self + # # @return [Array(Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment)] + # def variants; end + # end end end @@ -711,7 +716,6 @@ class BillingCycleAnchorConfiguration < Orb::BaseModel end # @abstract - # class DiscountInterval < Orb::Union discriminator :discount_type @@ -899,6 +903,12 @@ class UsageDiscountInterval < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void end + + # @!parse + # class << self + # # @return [Array(Orb::Models::Subscription::DiscountInterval::AmountDiscountInterval, Orb::Models::Subscription::DiscountInterval::PercentageDiscountInterval, Orb::Models::Subscription::DiscountInterval::UsageDiscountInterval)] + # def variants; end + # end end class FixedFeeQuantitySchedule < Orb::BaseModel @@ -1188,7 +1198,6 @@ class RedeemedCoupon < Orb::BaseModel end # @abstract - # class Status < Orb::Enum ACTIVE = :active ENDED = :ended diff --git a/lib/orb/models/subscription_cancel_response.rb b/lib/orb/models/subscription_cancel_response.rb index 7983d9b9..9276795d 100644 --- a/lib/orb/models/subscription_cancel_response.rb +++ b/lib/orb/models/subscription_cancel_response.rb @@ -289,7 +289,6 @@ class AdjustmentInterval < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class Adjustment < Orb::Union discriminator :adjustment_type @@ -655,6 +654,12 @@ class PlanPhaseMaximumAdjustment < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void end + + # @!parse + # class << self + # # @return [Array(Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment)] + # def variants; end + # end end end @@ -694,7 +699,6 @@ class BillingCycleAnchorConfiguration < Orb::BaseModel end # @abstract - # class DiscountInterval < Orb::Union discriminator :discount_type @@ -883,6 +887,12 @@ class UsageDiscountInterval < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void end + + # @!parse + # class << self + # # @return [Array(Orb::Models::SubscriptionCancelResponse::DiscountInterval::AmountDiscountInterval, Orb::Models::SubscriptionCancelResponse::DiscountInterval::PercentageDiscountInterval, Orb::Models::SubscriptionCancelResponse::DiscountInterval::UsageDiscountInterval)] + # def variants; end + # end end class FixedFeeQuantitySchedule < Orb::BaseModel @@ -1172,7 +1182,6 @@ class RedeemedCoupon < Orb::BaseModel end # @abstract - # class Status < Orb::Enum ACTIVE = :active ENDED = :ended diff --git a/lib/orb/models/subscription_create_params.rb b/lib/orb/models/subscription_create_params.rb index 2c6e46c4..61f0b062 100644 --- a/lib/orb/models/subscription_create_params.rb +++ b/lib/orb/models/subscription_create_params.rb @@ -571,6 +571,12 @@ class NewMaximum < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void end + + # @!parse + # class << self + # # @return [Array(Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::NewPercentageDiscount, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::NewUsageDiscount, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::NewAmountDiscount, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::NewMinimum, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::NewMaximum)] + # def variants; end + # end end end @@ -768,7 +774,6 @@ class Discount < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DiscountType < Orb::Enum PERCENTAGE = :percentage USAGE = :usage @@ -7115,6 +7120,12 @@ class DurationUnit < Orb::Enum end end end + + # @!parse + # class << self + # # @return [Array(Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionUnitPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionPackagePrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionMatrixPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionTieredPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionTieredBpsPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionBpsPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionBulkBpsPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionTieredPackagePrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionTieredWithMinimumPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionUnitWithPercentPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionPackageWithAllocationPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionTierWithProrationPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionUnitWithProrationPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionGroupedAllocationPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionBulkWithProrationPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionGroupedTieredPackagePrice)] + # def variants; end + # end end end @@ -7156,7 +7167,6 @@ class BillingCycleAnchorConfiguration < Orb::BaseModel # @abstract # # @deprecated - # class ExternalMarketplace < Orb::Enum GOOGLE = :google AWS = :aws @@ -7451,6 +7461,12 @@ class NewMaximum < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void end + + # @!parse + # class << self + # # @return [Array(Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::NewPercentageDiscount, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::NewUsageDiscount, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::NewAmountDiscount, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::NewMinimum, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::NewMaximum)] + # def variants; end + # end end end @@ -7637,7 +7653,6 @@ class Discount < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DiscountType < Orb::Enum PERCENTAGE = :percentage USAGE = :usage @@ -13990,6 +14005,12 @@ class DurationUnit < Orb::Enum end end end + + # @!parse + # class << self + # # @return [Array(Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionUnitPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionPackagePrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionMatrixPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionTieredPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionTieredBpsPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionBpsPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionBulkBpsPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionTieredPackagePrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionTieredWithMinimumPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionUnitWithPercentPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionPackageWithAllocationPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionTierWithProrationPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionUnitWithProrationPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionGroupedAllocationPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionBulkWithProrationPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionGroupedTieredPackagePrice)] + # def variants; end + # end end end end diff --git a/lib/orb/models/subscription_create_response.rb b/lib/orb/models/subscription_create_response.rb index e9e6a6e7..2d1d2513 100644 --- a/lib/orb/models/subscription_create_response.rb +++ b/lib/orb/models/subscription_create_response.rb @@ -289,7 +289,6 @@ class AdjustmentInterval < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class Adjustment < Orb::Union discriminator :adjustment_type @@ -655,6 +654,12 @@ class PlanPhaseMaximumAdjustment < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void end + + # @!parse + # class << self + # # @return [Array(Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment)] + # def variants; end + # end end end @@ -694,7 +699,6 @@ class BillingCycleAnchorConfiguration < Orb::BaseModel end # @abstract - # class DiscountInterval < Orb::Union discriminator :discount_type @@ -883,6 +887,12 @@ class UsageDiscountInterval < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void end + + # @!parse + # class << self + # # @return [Array(Orb::Models::SubscriptionCreateResponse::DiscountInterval::AmountDiscountInterval, Orb::Models::SubscriptionCreateResponse::DiscountInterval::PercentageDiscountInterval, Orb::Models::SubscriptionCreateResponse::DiscountInterval::UsageDiscountInterval)] + # def variants; end + # end end class FixedFeeQuantitySchedule < Orb::BaseModel @@ -1172,7 +1182,6 @@ class RedeemedCoupon < Orb::BaseModel end # @abstract - # class Status < Orb::Enum ACTIVE = :active ENDED = :ended diff --git a/lib/orb/models/subscription_list_params.rb b/lib/orb/models/subscription_list_params.rb index 603aa7eb..e9ed3c30 100644 --- a/lib/orb/models/subscription_list_params.rb +++ b/lib/orb/models/subscription_list_params.rb @@ -41,8 +41,8 @@ class SubscriptionListParams < Orb::BaseModel # @!attribute external_customer_id # - # @return [String, nil] - optional :external_customer_id, String, nil?: true + # @return [Array, nil] + optional :external_customer_id, Orb::ArrayOf[String], nil?: true # @!attribute [r] limit # The number of items to fetch. Defaults to 20. @@ -66,7 +66,7 @@ class SubscriptionListParams < Orb::BaseModel # # @param created_at_lte [Time, nil] # # @param cursor [String, nil] # # @param customer_id [Array, nil] - # # @param external_customer_id [String, nil] + # # @param external_customer_id [Array, nil] # # @param limit [Integer] # # @param status [Symbol, Orb::Models::SubscriptionListParams::Status, nil] # # @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}] @@ -90,7 +90,6 @@ class SubscriptionListParams < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class Status < Orb::Enum ACTIVE = :active ENDED = :ended diff --git a/lib/orb/models/subscription_price_intervals_params.rb b/lib/orb/models/subscription_price_intervals_params.rb index 49da970e..af2442e3 100644 --- a/lib/orb/models/subscription_price_intervals_params.rb +++ b/lib/orb/models/subscription_price_intervals_params.rb @@ -212,6 +212,12 @@ class StartDate < Orb::Union variant Time variant enum: -> { Orb::Models::BillingCycleRelativeDate } + + # @!parse + # class << self + # # @return [Array(Time, Symbol, Orb::Models::BillingCycleRelativeDate)] + # def variants; end + # end end class AllocationPrice < Orb::BaseModel @@ -270,7 +276,6 @@ class Cadence < Orb::Enum end # @abstract - # class Discount < Orb::Union discriminator :discount_type @@ -347,6 +352,12 @@ class UsageDiscountCreationParams < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void end + + # @!parse + # class << self + # # @return [Array(Orb::Models::SubscriptionPriceIntervalsParams::Add::Discount::AmountDiscountCreationParams, Orb::Models::SubscriptionPriceIntervalsParams::Add::Discount::PercentageDiscountCreationParams, Orb::Models::SubscriptionPriceIntervalsParams::Add::Discount::UsageDiscountCreationParams)] + # def variants; end + # end end # @abstract @@ -357,6 +368,12 @@ class EndDate < Orb::Union variant Time variant enum: -> { Orb::Models::BillingCycleRelativeDate } + + # @!parse + # class << self + # # @return [Array(Time, Symbol, Orb::Models::BillingCycleRelativeDate)] + # def variants; end + # end end class FixedFeeQuantityTransition < Orb::BaseModel @@ -7227,6 +7244,12 @@ class DurationUnit < Orb::Enum end end end + + # @!parse + # class << self + # # @return [Array(Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice)] + # def variants; end + # end end end @@ -7498,6 +7521,12 @@ class NewMaximum < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void end + + # @!parse + # class << self + # # @return [Array(Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewPercentageDiscount, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewUsageDiscount, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewAmountDiscount, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewMinimum, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewMaximum)] + # def variants; end + # end end # @abstract @@ -7510,6 +7539,12 @@ class StartDate < Orb::Union variant Time variant enum: -> { Orb::Models::BillingCycleRelativeDate } + + # @!parse + # class << self + # # @return [Array(Time, Symbol, Orb::Models::BillingCycleRelativeDate)] + # def variants; end + # end end # @abstract @@ -7522,6 +7557,12 @@ class EndDate < Orb::Union variant Time variant enum: -> { Orb::Models::BillingCycleRelativeDate } + + # @!parse + # class << self + # # @return [Array(Time, Symbol, Orb::Models::BillingCycleRelativeDate)] + # def variants; end + # end end end @@ -7620,6 +7661,12 @@ class EndDate < Orb::Union variant Time variant enum: -> { Orb::Models::BillingCycleRelativeDate } + + # @!parse + # class << self + # # @return [Array(Time, Symbol, Orb::Models::BillingCycleRelativeDate)] + # def variants; end + # end end class FixedFeeQuantityTransition < Orb::BaseModel @@ -7652,6 +7699,12 @@ class StartDate < Orb::Union variant Time variant enum: -> { Orb::Models::BillingCycleRelativeDate } + + # @!parse + # class << self + # # @return [Array(Time, Symbol, Orb::Models::BillingCycleRelativeDate)] + # def variants; end + # end end end @@ -7700,6 +7753,12 @@ class EndDate < Orb::Union variant Time variant enum: -> { Orb::Models::BillingCycleRelativeDate } + + # @!parse + # class << self + # # @return [Array(Time, Symbol, Orb::Models::BillingCycleRelativeDate)] + # def variants; end + # end end # @abstract @@ -7710,6 +7769,12 @@ class StartDate < Orb::Union variant Time variant enum: -> { Orb::Models::BillingCycleRelativeDate } + + # @!parse + # class << self + # # @return [Array(Time, Symbol, Orb::Models::BillingCycleRelativeDate)] + # def variants; end + # end end end end diff --git a/lib/orb/models/subscription_price_intervals_response.rb b/lib/orb/models/subscription_price_intervals_response.rb index 9ed2fcda..c670e24e 100644 --- a/lib/orb/models/subscription_price_intervals_response.rb +++ b/lib/orb/models/subscription_price_intervals_response.rb @@ -294,7 +294,6 @@ class AdjustmentInterval < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class Adjustment < Orb::Union discriminator :adjustment_type @@ -660,6 +659,12 @@ class PlanPhaseMaximumAdjustment < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void end + + # @!parse + # class << self + # # @return [Array(Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment)] + # def variants; end + # end end end @@ -699,7 +704,6 @@ class BillingCycleAnchorConfiguration < Orb::BaseModel end # @abstract - # class DiscountInterval < Orb::Union discriminator :discount_type @@ -890,6 +894,12 @@ class UsageDiscountInterval < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void end + + # @!parse + # class << self + # # @return [Array(Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::AmountDiscountInterval, Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::PercentageDiscountInterval, Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::UsageDiscountInterval)] + # def variants; end + # end end class FixedFeeQuantitySchedule < Orb::BaseModel @@ -1179,7 +1189,6 @@ class RedeemedCoupon < Orb::BaseModel end # @abstract - # class Status < Orb::Enum ACTIVE = :active ENDED = :ended diff --git a/lib/orb/models/subscription_schedule_plan_change_params.rb b/lib/orb/models/subscription_schedule_plan_change_params.rb index 0eb85e9c..17d8ebce 100644 --- a/lib/orb/models/subscription_schedule_plan_change_params.rb +++ b/lib/orb/models/subscription_schedule_plan_change_params.rb @@ -274,7 +274,6 @@ class SubscriptionSchedulePlanChangeParams < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class ChangeOption < Orb::Enum REQUESTED_DATE = :requested_date END_OF_SUBSCRIPTION_TERM = :end_of_subscription_term @@ -552,6 +551,12 @@ class NewMaximum < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void end + + # @!parse + # class << self + # # @return [Array(Orb::Models::SubscriptionSchedulePlanChangeParams::AddAdjustment::Adjustment::NewPercentageDiscount, Orb::Models::SubscriptionSchedulePlanChangeParams::AddAdjustment::Adjustment::NewUsageDiscount, Orb::Models::SubscriptionSchedulePlanChangeParams::AddAdjustment::Adjustment::NewAmountDiscount, Orb::Models::SubscriptionSchedulePlanChangeParams::AddAdjustment::Adjustment::NewMinimum, Orb::Models::SubscriptionSchedulePlanChangeParams::AddAdjustment::Adjustment::NewMaximum)] + # def variants; end + # end end end @@ -752,7 +757,6 @@ class Discount < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DiscountType < Orb::Enum PERCENTAGE = :percentage USAGE = :usage @@ -7116,6 +7120,12 @@ class DurationUnit < Orb::Enum end end end + + # @!parse + # class << self + # # @return [Array(Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionUnitPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionPackagePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionMatrixPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionTieredPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionTieredBpsPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionBpsPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionBulkBpsPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionTieredPackagePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionTieredWithMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionUnitWithPercentPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionPackageWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionTierWithProrationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionUnitWithProrationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionGroupedAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionBulkWithProrationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionGroupedTieredPackagePrice)] + # def variants; end + # end end end @@ -7456,6 +7466,12 @@ class NewMaximum < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void end + + # @!parse + # class << self + # # @return [Array(Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::NewPercentageDiscount, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::NewUsageDiscount, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::NewAmountDiscount, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::NewMinimum, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::NewMaximum)] + # def variants; end + # end end end @@ -7644,7 +7660,6 @@ class Discount < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DiscountType < Orb::Enum PERCENTAGE = :percentage USAGE = :usage @@ -14008,6 +14023,12 @@ class DurationUnit < Orb::Enum end end end + + # @!parse + # class << self + # # @return [Array(Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionUnitPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionPackagePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionMatrixPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionTieredPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionTieredBpsPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionBpsPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionBulkBpsPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionTieredPackagePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionTieredWithMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionUnitWithPercentPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionPackageWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionTierWithProrationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionUnitWithProrationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionGroupedAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionBulkWithProrationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionGroupedTieredPackagePrice)] + # def variants; end + # end end end end diff --git a/lib/orb/models/subscription_schedule_plan_change_response.rb b/lib/orb/models/subscription_schedule_plan_change_response.rb index 59c19442..accc0045 100644 --- a/lib/orb/models/subscription_schedule_plan_change_response.rb +++ b/lib/orb/models/subscription_schedule_plan_change_response.rb @@ -294,7 +294,6 @@ class AdjustmentInterval < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class Adjustment < Orb::Union discriminator :adjustment_type @@ -660,6 +659,12 @@ class PlanPhaseMaximumAdjustment < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void end + + # @!parse + # class << self + # # @return [Array(Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment)] + # def variants; end + # end end end @@ -699,7 +704,6 @@ class BillingCycleAnchorConfiguration < Orb::BaseModel end # @abstract - # class DiscountInterval < Orb::Union discriminator :discount_type @@ -890,6 +894,12 @@ class UsageDiscountInterval < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void end + + # @!parse + # class << self + # # @return [Array(Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::AmountDiscountInterval, Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::PercentageDiscountInterval, Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::UsageDiscountInterval)] + # def variants; end + # end end class FixedFeeQuantitySchedule < Orb::BaseModel @@ -1179,7 +1189,6 @@ class RedeemedCoupon < Orb::BaseModel end # @abstract - # class Status < Orb::Enum ACTIVE = :active ENDED = :ended diff --git a/lib/orb/models/subscription_trigger_phase_response.rb b/lib/orb/models/subscription_trigger_phase_response.rb index e60efb37..8b0138a8 100644 --- a/lib/orb/models/subscription_trigger_phase_response.rb +++ b/lib/orb/models/subscription_trigger_phase_response.rb @@ -294,7 +294,6 @@ class AdjustmentInterval < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class Adjustment < Orb::Union discriminator :adjustment_type @@ -660,6 +659,12 @@ class PlanPhaseMaximumAdjustment < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void end + + # @!parse + # class << self + # # @return [Array(Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment)] + # def variants; end + # end end end @@ -699,7 +704,6 @@ class BillingCycleAnchorConfiguration < Orb::BaseModel end # @abstract - # class DiscountInterval < Orb::Union discriminator :discount_type @@ -890,6 +894,12 @@ class UsageDiscountInterval < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void end + + # @!parse + # class << self + # # @return [Array(Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::AmountDiscountInterval, Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::PercentageDiscountInterval, Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::UsageDiscountInterval)] + # def variants; end + # end end class FixedFeeQuantitySchedule < Orb::BaseModel @@ -1179,7 +1189,6 @@ class RedeemedCoupon < Orb::BaseModel end # @abstract - # class Status < Orb::Enum ACTIVE = :active ENDED = :ended diff --git a/lib/orb/models/subscription_unschedule_cancellation_response.rb b/lib/orb/models/subscription_unschedule_cancellation_response.rb index 84a47868..a0e7bb94 100644 --- a/lib/orb/models/subscription_unschedule_cancellation_response.rb +++ b/lib/orb/models/subscription_unschedule_cancellation_response.rb @@ -294,7 +294,6 @@ class AdjustmentInterval < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class Adjustment < Orb::Union discriminator :adjustment_type @@ -660,6 +659,12 @@ class PlanPhaseMaximumAdjustment < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void end + + # @!parse + # class << self + # # @return [Array(Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment)] + # def variants; end + # end end end @@ -699,7 +704,6 @@ class BillingCycleAnchorConfiguration < Orb::BaseModel end # @abstract - # class DiscountInterval < Orb::Union discriminator :discount_type @@ -890,6 +894,12 @@ class UsageDiscountInterval < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void end + + # @!parse + # class << self + # # @return [Array(Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::AmountDiscountInterval, Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::PercentageDiscountInterval, Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::UsageDiscountInterval)] + # def variants; end + # end end class FixedFeeQuantitySchedule < Orb::BaseModel @@ -1179,7 +1189,6 @@ class RedeemedCoupon < Orb::BaseModel end # @abstract - # class Status < Orb::Enum ACTIVE = :active ENDED = :ended diff --git a/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rb b/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rb index c33c1c22..2a6dd49c 100644 --- a/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rb +++ b/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rb @@ -294,7 +294,6 @@ class AdjustmentInterval < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class Adjustment < Orb::Union discriminator :adjustment_type @@ -660,6 +659,12 @@ class PlanPhaseMaximumAdjustment < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void end + + # @!parse + # class << self + # # @return [Array(Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment)] + # def variants; end + # end end end @@ -699,7 +704,6 @@ class BillingCycleAnchorConfiguration < Orb::BaseModel end # @abstract - # class DiscountInterval < Orb::Union discriminator :discount_type @@ -890,6 +894,12 @@ class UsageDiscountInterval < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void end + + # @!parse + # class << self + # # @return [Array(Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::AmountDiscountInterval, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::PercentageDiscountInterval, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::UsageDiscountInterval)] + # def variants; end + # end end class FixedFeeQuantitySchedule < Orb::BaseModel @@ -1183,7 +1193,6 @@ class RedeemedCoupon < Orb::BaseModel end # @abstract - # class Status < Orb::Enum ACTIVE = :active ENDED = :ended diff --git a/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rb b/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rb index 8439ce5c..b21e230a 100644 --- a/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rb +++ b/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rb @@ -294,7 +294,6 @@ class AdjustmentInterval < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class Adjustment < Orb::Union discriminator :adjustment_type @@ -660,6 +659,12 @@ class PlanPhaseMaximumAdjustment < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void end + + # @!parse + # class << self + # # @return [Array(Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment)] + # def variants; end + # end end end @@ -699,7 +704,6 @@ class BillingCycleAnchorConfiguration < Orb::BaseModel end # @abstract - # class DiscountInterval < Orb::Union discriminator :discount_type @@ -890,6 +894,12 @@ class UsageDiscountInterval < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void end + + # @!parse + # class << self + # # @return [Array(Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::AmountDiscountInterval, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::PercentageDiscountInterval, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::UsageDiscountInterval)] + # def variants; end + # end end class FixedFeeQuantitySchedule < Orb::BaseModel @@ -1179,7 +1189,6 @@ class RedeemedCoupon < Orb::BaseModel end # @abstract - # class Status < Orb::Enum ACTIVE = :active ENDED = :ended diff --git a/lib/orb/models/subscription_update_fixed_fee_quantity_response.rb b/lib/orb/models/subscription_update_fixed_fee_quantity_response.rb index 68f07e34..203550eb 100644 --- a/lib/orb/models/subscription_update_fixed_fee_quantity_response.rb +++ b/lib/orb/models/subscription_update_fixed_fee_quantity_response.rb @@ -294,7 +294,6 @@ class AdjustmentInterval < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class Adjustment < Orb::Union discriminator :adjustment_type @@ -660,6 +659,12 @@ class PlanPhaseMaximumAdjustment < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void end + + # @!parse + # class << self + # # @return [Array(Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment)] + # def variants; end + # end end end @@ -699,7 +704,6 @@ class BillingCycleAnchorConfiguration < Orb::BaseModel end # @abstract - # class DiscountInterval < Orb::Union discriminator :discount_type @@ -890,6 +894,12 @@ class UsageDiscountInterval < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void end + + # @!parse + # class << self + # # @return [Array(Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::AmountDiscountInterval, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::PercentageDiscountInterval, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::UsageDiscountInterval)] + # def variants; end + # end end class FixedFeeQuantitySchedule < Orb::BaseModel @@ -1179,7 +1189,6 @@ class RedeemedCoupon < Orb::BaseModel end # @abstract - # class Status < Orb::Enum ACTIVE = :active ENDED = :ended diff --git a/lib/orb/models/subscription_update_trial_params.rb b/lib/orb/models/subscription_update_trial_params.rb index 91e7b12f..2abbe3f1 100644 --- a/lib/orb/models/subscription_update_trial_params.rb +++ b/lib/orb/models/subscription_update_trial_params.rb @@ -44,12 +44,17 @@ class TrialEndDate < Orb::Union variant enum: -> { Orb::Models::SubscriptionUpdateTrialParams::TrialEndDate::UnionMember1 } # @abstract - # class UnionMember1 < Orb::Enum IMMEDIATE = :immediate finalize! end + + # @!parse + # class << self + # # @return [Array(Time, Symbol, Orb::Models::SubscriptionUpdateTrialParams::TrialEndDate::UnionMember1)] + # def variants; end + # end end end end diff --git a/lib/orb/models/subscription_update_trial_response.rb b/lib/orb/models/subscription_update_trial_response.rb index 0fa51d87..26f17746 100644 --- a/lib/orb/models/subscription_update_trial_response.rb +++ b/lib/orb/models/subscription_update_trial_response.rb @@ -292,7 +292,6 @@ class AdjustmentInterval < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class Adjustment < Orb::Union discriminator :adjustment_type @@ -658,6 +657,12 @@ class PlanPhaseMaximumAdjustment < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void end + + # @!parse + # class << self + # # @return [Array(Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment)] + # def variants; end + # end end end @@ -697,7 +702,6 @@ class BillingCycleAnchorConfiguration < Orb::BaseModel end # @abstract - # class DiscountInterval < Orb::Union discriminator :discount_type @@ -888,6 +892,12 @@ class UsageDiscountInterval < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void end + + # @!parse + # class << self + # # @return [Array(Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::AmountDiscountInterval, Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::PercentageDiscountInterval, Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::UsageDiscountInterval)] + # def variants; end + # end end class FixedFeeQuantitySchedule < Orb::BaseModel @@ -1177,7 +1187,6 @@ class RedeemedCoupon < Orb::BaseModel end # @abstract - # class Status < Orb::Enum ACTIVE = :active ENDED = :ended diff --git a/lib/orb/models/subscription_usage.rb b/lib/orb/models/subscription_usage.rb index 2b70253c..72d6b419 100644 --- a/lib/orb/models/subscription_usage.rb +++ b/lib/orb/models/subscription_usage.rb @@ -3,7 +3,6 @@ module Orb module Models # @abstract - # class SubscriptionUsage < Orb::Union variant -> { Orb::Models::SubscriptionUsage::UngroupedSubscriptionUsage } @@ -97,7 +96,6 @@ class Usage < Orb::BaseModel end # @abstract - # class ViewMode < Orb::Enum PERIODIC = :periodic CUMULATIVE = :cumulative @@ -226,7 +224,6 @@ class Usage < Orb::BaseModel end # @abstract - # class ViewMode < Orb::Enum PERIODIC = :periodic CUMULATIVE = :cumulative @@ -235,6 +232,12 @@ class ViewMode < Orb::Enum end end end + + # @!parse + # class << self + # # @return [Array(Orb::Models::SubscriptionUsage::UngroupedSubscriptionUsage, Orb::Models::SubscriptionUsage::GroupedSubscriptionUsage)] + # def variants; end + # end end end end diff --git a/lib/orb/models/trial_discount.rb b/lib/orb/models/trial_discount.rb index 7b70865f..03b3799f 100644 --- a/lib/orb/models/trial_discount.rb +++ b/lib/orb/models/trial_discount.rb @@ -53,7 +53,6 @@ class TrialDiscount < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DiscountType < Orb::Enum TRIAL = :trial diff --git a/lib/orb/models/usage_discount.rb b/lib/orb/models/usage_discount.rb index 541011bb..34024657 100644 --- a/lib/orb/models/usage_discount.rb +++ b/lib/orb/models/usage_discount.rb @@ -38,7 +38,6 @@ class UsageDiscount < Orb::BaseModel # def initialize: (Hash | Orb::BaseModel) -> void # @abstract - # class DiscountType < Orb::Enum USAGE = :usage diff --git a/lib/orb/page.rb b/lib/orb/page.rb index ff42be2a..b510ab73 100644 --- a/lib/orb/page.rb +++ b/lib/orb/page.rb @@ -17,30 +17,33 @@ module Orb # # @example # ```ruby - # coupons = page.to_enum.take(2) + # coupons = page + # .to_enum + # .lazy + # .select { _1.object_id.even? } + # .map(&:itself) + # .take(2) + # .to_a # # coupons => Array # ``` class Page include Orb::BasePage - # @return [Array] + # @return [Array, nil] attr_accessor :data # @return [PaginationMetadata] attr_accessor :pagination_metadata - # rubocop:disable Lint/UnusedMethodArgument - # @private + # @api private # # @param client [Orb::BaseClient] # @param req [Hash{Symbol=>Object}] # @param headers [Hash{String=>String}, Net::HTTPHeader] # @param page_data [Hash{Symbol=>Object}] - # def initialize(client:, req:, headers:, page_data:) - @client = client - @req = req + super model = req.fetch(:model) case page_data @@ -55,17 +58,14 @@ def initialize(client:, req:, headers:, page_data:) else end end - # rubocop:enable Lint/UnusedMethodArgument # @return [Boolean] - # def next_page? !pagination_metadata&.next_cursor.nil? end # @raise [Orb::HTTP::Error] # @return [Orb::Page] - # def next_page unless next_page? raise RuntimeError.new("No more pages available. Please check #next_page? before calling ##{__method__}") @@ -76,7 +76,6 @@ def next_page end # @param blk [Proc] - # def auto_paging_each(&blk) unless block_given? raise ArgumentError.new("A block must be given to ##{__method__}") @@ -90,7 +89,6 @@ def auto_paging_each(&blk) end # @return [String] - # def inspect "#<#{self.class}:0x#{object_id.to_s(16)} data=#{data.inspect} pagination_metadata=#{pagination_metadata.inspect}>" end diff --git a/lib/orb/pooled_net_requester.rb b/lib/orb/pooled_net_requester.rb index 26f1fa90..d908be8d 100644 --- a/lib/orb/pooled_net_requester.rb +++ b/lib/orb/pooled_net_requester.rb @@ -1,16 +1,14 @@ # frozen_string_literal: true module Orb - # @private - # + # @api private class PooledNetRequester class << self - # @private + # @api private # # @param url [URI::Generic] # # @return [Net::HTTP] - # def connect(url) port = case [url.port, url.scheme] @@ -28,17 +26,16 @@ def connect(url) end end - # @private + # @api private # # @param conn [Net::HTTP] # @param deadline [Float] - # def calibrate_socket_timeout(conn, deadline) timeout = deadline - Orb::Util.monotonic_secs conn.open_timeout = conn.read_timeout = conn.write_timeout = conn.continue_timeout = timeout end - # @private + # @api private # # @param request [Hash{Symbol=>Object}] . # @@ -51,7 +48,6 @@ def calibrate_socket_timeout(conn, deadline) # @param blk [Proc] # # @return [Net::HTTPGenericRequest] - # def build_request(request, &) method, url, headers, body = request.fetch_values(:method, :url, :headers, :body) req = Net::HTTPGenericRequest.new( @@ -80,25 +76,12 @@ def build_request(request, &) end end - # @private + # @api private # # @param url [URI::Generic] # @param blk [Proc] - # - private def with_pool(url, &blk) + private def with_pool(url, &) origin = Orb::Util.uri_origin(url) - th = Thread.current - key = :"#{object_id}-#{self.class.name}-connection_in_use_for_#{origin}" - - if th[key] - tap do - conn = self.class.connect(url) - return blk.call(conn) - ensure - conn.finish if conn&.started? - end - end - pool = @mutex.synchronize do @pools[origin] ||= ConnectionPool.new(size: @size) do @@ -106,15 +89,10 @@ def build_request(request, &) end end - pool.with do |conn| - th[key] = true - blk.call(conn) - ensure - th[key] = nil - end + pool.with(&) end - # @private + # @api private # # @param request [Hash{Symbol=>Object}] . # @@ -129,7 +107,6 @@ def build_request(request, &) # @option request [Float] :deadline # # @return [Array(Net::HTTPResponse, Enumerable)] - # def execute(request) url, deadline = request.fetch_values(:url, :deadline) @@ -175,10 +152,9 @@ def execute(request) [response, (response.body = body)] end - # @private + # @api private # # @param size [Integer] - # def initialize(size: Etc.nprocessors) @mutex = Mutex.new @size = size diff --git a/lib/orb/request_options.rb b/lib/orb/request_options.rb index 9e600031..52c91734 100644 --- a/lib/orb/request_options.rb +++ b/lib/orb/request_options.rb @@ -1,10 +1,9 @@ # frozen_string_literal: true module Orb - # @private + # @api private # # @abstract - # module RequestParameters # @!parse # # Options to specify HTTP behaviour for this request. @@ -12,7 +11,6 @@ module RequestParameters # attr_accessor :request_options # @param mod [Module] - # def self.included(mod) return unless mod <= Orb::BaseModel @@ -20,15 +18,13 @@ def self.included(mod) mod.optional(:request_options, Orb::RequestOptions) end - # @private - # + # @api private module Converter - # @private + # @api private # # @param params [Object] # # @return [Array(Object, Hash{Symbol=>Object})] - # def dump_request(params) case (dumped = dump(params)) in Hash @@ -46,12 +42,11 @@ def dump_request(params) # When making a request, you can pass an actual {RequestOptions} instance, or # simply pass a Hash with symbol keys matching the attributes on this class. class RequestOptions < Orb::BaseModel - # @private + # @api private # # @param opts [Orb::RequestOptions, Hash{Symbol=>Object}] # # @raise [ArgumentError] - # def self.validate!(opts) case opts in Orb::RequestOptions | Hash diff --git a/lib/orb/resources/alerts.rb b/lib/orb/resources/alerts.rb index ddcb27f5..7c9081fb 100644 --- a/lib/orb/resources/alerts.rb +++ b/lib/orb/resources/alerts.rb @@ -12,7 +12,6 @@ class Alerts # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::Alert] - # def retrieve(alert_id, params = {}) @client.request( method: :get, @@ -33,7 +32,6 @@ def retrieve(alert_id, params = {}) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::Alert] - # def update(alert_configuration_id, params) parsed, options = Orb::Models::AlertUpdateParams.dump_request(params) @client.request( @@ -81,7 +79,6 @@ def update(alert_configuration_id, params) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Page] - # def list(params = {}) parsed, options = Orb::Models::AlertListParams.dump_request(params) @client.request( @@ -116,7 +113,6 @@ def list(params = {}) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::Alert] - # def create_for_customer(customer_id, params) parsed, options = Orb::Models::AlertCreateForCustomerParams.dump_request(params) @client.request( @@ -150,7 +146,6 @@ def create_for_customer(customer_id, params) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::Alert] - # def create_for_external_customer(external_customer_id, params) parsed, options = Orb::Models::AlertCreateForExternalCustomerParams.dump_request(params) @client.request( @@ -187,7 +182,6 @@ def create_for_external_customer(external_customer_id, params) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::Alert] - # def create_for_subscription(subscription_id, params) parsed, options = Orb::Models::AlertCreateForSubscriptionParams.dump_request(params) @client.request( @@ -212,7 +206,6 @@ def create_for_subscription(subscription_id, params) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::Alert] - # def disable(alert_configuration_id, params = {}) parsed, options = Orb::Models::AlertDisableParams.dump_request(params) @client.request( @@ -237,7 +230,6 @@ def disable(alert_configuration_id, params = {}) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::Alert] - # def enable(alert_configuration_id, params = {}) parsed, options = Orb::Models::AlertEnableParams.dump_request(params) @client.request( @@ -250,7 +242,6 @@ def enable(alert_configuration_id, params = {}) end # @param client [Orb::Client] - # def initialize(client:) @client = client end diff --git a/lib/orb/resources/coupons.rb b/lib/orb/resources/coupons.rb index 4c686392..8bea3964 100644 --- a/lib/orb/resources/coupons.rb +++ b/lib/orb/resources/coupons.rb @@ -24,7 +24,6 @@ class Coupons # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::Coupon] - # def create(params) parsed, options = Orb::Models::CouponCreateParams.dump_request(params) @client.request( @@ -58,7 +57,6 @@ def create(params) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Page] - # def list(params = {}) parsed, options = Orb::Models::CouponListParams.dump_request(params) @client.request( @@ -82,7 +80,6 @@ def list(params = {}) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::Coupon] - # def archive(coupon_id, params = {}) @client.request( method: :post, @@ -103,7 +100,6 @@ def archive(coupon_id, params = {}) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::Coupon] - # def fetch(coupon_id, params = {}) @client.request( method: :get, @@ -114,7 +110,6 @@ def fetch(coupon_id, params = {}) end # @param client [Orb::Client] - # def initialize(client:) @client = client @subscriptions = Orb::Resources::Coupons::Subscriptions.new(client: client) diff --git a/lib/orb/resources/coupons/subscriptions.rb b/lib/orb/resources/coupons/subscriptions.rb index 5b043e53..53bfec00 100644 --- a/lib/orb/resources/coupons/subscriptions.rb +++ b/lib/orb/resources/coupons/subscriptions.rb @@ -21,7 +21,6 @@ class Subscriptions # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Page] - # def list(coupon_id, params = {}) parsed, options = Orb::Models::Coupons::SubscriptionListParams.dump_request(params) @client.request( @@ -35,7 +34,6 @@ def list(coupon_id, params = {}) end # @param client [Orb::Client] - # def initialize(client:) @client = client end diff --git a/lib/orb/resources/credit_notes.rb b/lib/orb/resources/credit_notes.rb index c878be10..5805c742 100644 --- a/lib/orb/resources/credit_notes.rb +++ b/lib/orb/resources/credit_notes.rb @@ -17,7 +17,6 @@ class CreditNotes # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::CreditNote] - # def create(params) parsed, options = Orb::Models::CreditNoteCreateParams.dump_request(params) @client.request( @@ -35,6 +34,14 @@ def create(params) # # @param params [Orb::Models::CreditNoteListParams, Hash{Symbol=>Object}] . # + # @option params [Time, nil] :created_at_gt + # + # @option params [Time, nil] :created_at_gte + # + # @option params [Time, nil] :created_at_lt + # + # @option params [Time, nil] :created_at_lte + # # @option params [String, nil] :cursor Cursor for pagination. This can be populated by the `next_cursor` value returned # from the initial request. # @@ -43,7 +50,6 @@ def create(params) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Page] - # def list(params = {}) parsed, options = Orb::Models::CreditNoteListParams.dump_request(params) @client.request( @@ -66,7 +72,6 @@ def list(params = {}) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::CreditNote] - # def fetch(credit_note_id, params = {}) @client.request( method: :get, @@ -77,7 +82,6 @@ def fetch(credit_note_id, params = {}) end # @param client [Orb::Client] - # def initialize(client:) @client = client end diff --git a/lib/orb/resources/customers.rb b/lib/orb/resources/customers.rb index 7526333d..5137fd7f 100644 --- a/lib/orb/resources/customers.rb +++ b/lib/orb/resources/customers.rb @@ -185,7 +185,6 @@ class Customers # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::Customer] - # def create(params) parsed, options = Orb::Models::CustomerCreateParams.dump_request(params) @client.request( @@ -362,7 +361,6 @@ def create(params) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::Customer] - # def update(customer_id, params = {}) parsed, options = Orb::Models::CustomerUpdateParams.dump_request(params) @client.request( @@ -399,7 +397,6 @@ def update(customer_id, params = {}) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Page] - # def list(params = {}) parsed, options = Orb::Models::CustomerListParams.dump_request(params) @client.request( @@ -435,7 +432,6 @@ def list(params = {}) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [nil] - # def delete(customer_id, params = {}) @client.request( method: :delete, @@ -459,7 +455,6 @@ def delete(customer_id, params = {}) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::Customer] - # def fetch(customer_id, params = {}) @client.request( method: :get, @@ -482,7 +477,6 @@ def fetch(customer_id, params = {}) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::Customer] - # def fetch_by_external_id(external_customer_id, params = {}) @client.request( method: :get, @@ -506,7 +500,6 @@ def fetch_by_external_id(external_customer_id, params = {}) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [nil] - # def sync_payment_methods_from_gateway(external_customer_id, params = {}) @client.request( method: :post, @@ -533,7 +526,6 @@ def sync_payment_methods_from_gateway(external_customer_id, params = {}) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [nil] - # def sync_payment_methods_from_gateway_by_external_customer_id(customer_id, params = {}) @client.request( method: :post, @@ -707,7 +699,6 @@ def sync_payment_methods_from_gateway_by_external_customer_id(customer_id, param # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::Customer] - # def update_by_external_id(id, params = {}) parsed, options = Orb::Models::CustomerUpdateByExternalIDParams.dump_request(params) @client.request( @@ -720,7 +711,6 @@ def update_by_external_id(id, params = {}) end # @param client [Orb::Client] - # def initialize(client:) @client = client @costs = Orb::Resources::Customers::Costs.new(client: client) diff --git a/lib/orb/resources/customers/balance_transactions.rb b/lib/orb/resources/customers/balance_transactions.rb index 1bd48adf..b7bad029 100644 --- a/lib/orb/resources/customers/balance_transactions.rb +++ b/lib/orb/resources/customers/balance_transactions.rb @@ -20,7 +20,6 @@ class BalanceTransactions # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::Customers::BalanceTransactionCreateResponse] - # def create(customer_id, params) parsed, options = Orb::Models::Customers::BalanceTransactionCreateParams.dump_request(params) @client.request( @@ -81,7 +80,6 @@ def create(customer_id, params) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Page] - # def list(customer_id, params = {}) parsed, options = Orb::Models::Customers::BalanceTransactionListParams.dump_request(params) @client.request( @@ -95,7 +93,6 @@ def list(customer_id, params = {}) end # @param client [Orb::Client] - # def initialize(client:) @client = client end diff --git a/lib/orb/resources/customers/costs.rb b/lib/orb/resources/customers/costs.rb index 7ec79799..7e4d20ab 100644 --- a/lib/orb/resources/customers/costs.rb +++ b/lib/orb/resources/customers/costs.rb @@ -140,7 +140,6 @@ class Costs # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::Customers::CostListResponse] - # def list(customer_id, params = {}) parsed, options = Orb::Models::Customers::CostListParams.dump_request(params) @client.request( @@ -288,7 +287,6 @@ def list(customer_id, params = {}) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::Customers::CostListByExternalIDResponse] - # def list_by_external_id(external_customer_id, params = {}) parsed, options = Orb::Models::Customers::CostListByExternalIDParams.dump_request(params) @client.request( @@ -301,7 +299,6 @@ def list_by_external_id(external_customer_id, params = {}) end # @param client [Orb::Client] - # def initialize(client:) @client = client end diff --git a/lib/orb/resources/customers/credits.rb b/lib/orb/resources/customers/credits.rb index eb84ece4..64ec3178 100644 --- a/lib/orb/resources/customers/credits.rb +++ b/lib/orb/resources/customers/credits.rb @@ -35,7 +35,6 @@ class Credits # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Page] - # def list(customer_id, params = {}) parsed, options = Orb::Models::Customers::CreditListParams.dump_request(params) @client.request( @@ -73,7 +72,6 @@ def list(customer_id, params = {}) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Page] - # def list_by_external_id(external_customer_id, params = {}) parsed, options = Orb::Models::Customers::CreditListByExternalIDParams.dump_request(params) @client.request( @@ -87,7 +85,6 @@ def list_by_external_id(external_customer_id, params = {}) end # @param client [Orb::Client] - # def initialize(client:) @client = client @ledger = Orb::Resources::Customers::Credits::Ledger.new(client: client) diff --git a/lib/orb/resources/customers/credits/ledger.rb b/lib/orb/resources/customers/credits/ledger.rb index 61ffcf4c..ed3e6953 100644 --- a/lib/orb/resources/customers/credits/ledger.rb +++ b/lib/orb/resources/customers/credits/ledger.rb @@ -115,7 +115,6 @@ class Ledger # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Page] - # def list(customer_id, params = {}) parsed, options = Orb::Models::Customers::Credits::LedgerListParams.dump_request(params) @client.request( @@ -283,7 +282,6 @@ def list(customer_id, params = {}) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::Customers::Credits::LedgerCreateEntryResponse::IncrementLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::DecrementLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::ExpirationChangeLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::CreditBlockExpiryLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidInitiatedLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::AmendmentLedgerEntry] - # def create_entry(customer_id, params) parsed, options = Orb::Models::Customers::Credits::LedgerCreateEntryParams.dump_request(params) @client.request( @@ -450,7 +448,6 @@ def create_entry(customer_id, params) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::IncrementLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::DecrementLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::ExpirationChangeLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::CreditBlockExpiryLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidInitiatedLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::AmendmentLedgerEntry] - # def create_entry_by_external_id(external_customer_id, params) parsed, options = Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams.dump_request(params) @client.request( @@ -572,7 +569,6 @@ def create_entry_by_external_id(external_customer_id, params) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Page] - # def list_by_external_id(external_customer_id, params = {}) parsed, options = Orb::Models::Customers::Credits::LedgerListByExternalIDParams.dump_request(params) @client.request( @@ -586,7 +582,6 @@ def list_by_external_id(external_customer_id, params = {}) end # @param client [Orb::Client] - # def initialize(client:) @client = client end diff --git a/lib/orb/resources/customers/credits/top_ups.rb b/lib/orb/resources/customers/credits/top_ups.rb index 95eaea34..5c6a9fc6 100644 --- a/lib/orb/resources/customers/credits/top_ups.rb +++ b/lib/orb/resources/customers/credits/top_ups.rb @@ -40,7 +40,6 @@ class TopUps # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::Customers::Credits::TopUpCreateResponse] - # def create(customer_id, params) parsed, options = Orb::Models::Customers::Credits::TopUpCreateParams.dump_request(params) @client.request( @@ -66,7 +65,6 @@ def create(customer_id, params) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Page] - # def list(customer_id, params = {}) parsed, options = Orb::Models::Customers::Credits::TopUpListParams.dump_request(params) @client.request( @@ -91,7 +89,6 @@ def list(customer_id, params = {}) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [nil] - # def delete(top_up_id, params) parsed, options = Orb::Models::Customers::Credits::TopUpDeleteParams.dump_request(params) customer_id = parsed.delete(:customer_id) do @@ -140,7 +137,6 @@ def delete(top_up_id, params) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::Customers::Credits::TopUpCreateByExternalIDResponse] - # def create_by_external_id(external_customer_id, params) parsed, options = Orb::Models::Customers::Credits::TopUpCreateByExternalIDParams.dump_request(params) @client.request( @@ -164,7 +160,6 @@ def create_by_external_id(external_customer_id, params) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [nil] - # def delete_by_external_id(top_up_id, params) parsed, options = Orb::Models::Customers::Credits::TopUpDeleteByExternalIDParams.dump_request(params) external_customer_id = parsed.delete(:external_customer_id) do @@ -196,7 +191,6 @@ def delete_by_external_id(top_up_id, params) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Page] - # def list_by_external_id(external_customer_id, params = {}) parsed, options = Orb::Models::Customers::Credits::TopUpListByExternalIDParams.dump_request(params) @client.request( @@ -210,7 +204,6 @@ def list_by_external_id(external_customer_id, params = {}) end # @param client [Orb::Client] - # def initialize(client:) @client = client end diff --git a/lib/orb/resources/dimensional_price_groups.rb b/lib/orb/resources/dimensional_price_groups.rb index 45589668..46d10f4b 100644 --- a/lib/orb/resources/dimensional_price_groups.rb +++ b/lib/orb/resources/dimensional_price_groups.rb @@ -32,7 +32,6 @@ class DimensionalPriceGroups # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::DimensionalPriceGroup] - # def create(params) parsed, options = Orb::Models::DimensionalPriceGroupCreateParams.dump_request(params) @client.request( @@ -53,7 +52,6 @@ def create(params) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::DimensionalPriceGroup] - # def retrieve(dimensional_price_group_id, params = {}) @client.request( method: :get, @@ -75,7 +73,6 @@ def retrieve(dimensional_price_group_id, params = {}) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Page] - # def list(params = {}) parsed, options = Orb::Models::DimensionalPriceGroupListParams.dump_request(params) @client.request( @@ -89,7 +86,6 @@ def list(params = {}) end # @param client [Orb::Client] - # def initialize(client:) @client = client @external_dimensional_price_group_id = Orb::Resources::DimensionalPriceGroups::ExternalDimensionalPriceGroupID.new(client: client) diff --git a/lib/orb/resources/dimensional_price_groups/external_dimensional_price_group_id.rb b/lib/orb/resources/dimensional_price_groups/external_dimensional_price_group_id.rb index ddcab2a5..de9a51a4 100644 --- a/lib/orb/resources/dimensional_price_groups/external_dimensional_price_group_id.rb +++ b/lib/orb/resources/dimensional_price_groups/external_dimensional_price_group_id.rb @@ -13,7 +13,6 @@ class ExternalDimensionalPriceGroupID # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::DimensionalPriceGroup] - # def retrieve(external_dimensional_price_group_id, params = {}) @client.request( method: :get, @@ -27,7 +26,6 @@ def retrieve(external_dimensional_price_group_id, params = {}) end # @param client [Orb::Client] - # def initialize(client:) @client = client end diff --git a/lib/orb/resources/events.rb b/lib/orb/resources/events.rb index b5ecd52e..01458e74 100644 --- a/lib/orb/resources/events.rb +++ b/lib/orb/resources/events.rb @@ -76,7 +76,6 @@ class Events # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::EventUpdateResponse] - # def update(event_id, params) parsed, options = Orb::Models::EventUpdateParams.dump_request(params) @client.request( @@ -136,7 +135,6 @@ def update(event_id, params) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::EventDeprecateResponse] - # def deprecate(event_id, params = {}) @client.request( method: :put, @@ -364,7 +362,6 @@ def deprecate(event_id, params = {}) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::EventIngestResponse] - # def ingest(params) parsed, options = Orb::Models::EventIngestParams.dump_request(params) query_params = [:backfill_id, :debug] @@ -410,7 +407,6 @@ def ingest(params) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::EventSearchResponse] - # def search(params) parsed, options = Orb::Models::EventSearchParams.dump_request(params) @client.request( @@ -423,7 +419,6 @@ def search(params) end # @param client [Orb::Client] - # def initialize(client:) @client = client @backfills = Orb::Resources::Events::Backfills.new(client: client) diff --git a/lib/orb/resources/events/backfills.rb b/lib/orb/resources/events/backfills.rb index b8cbb7ee..30a2e12d 100644 --- a/lib/orb/resources/events/backfills.rb +++ b/lib/orb/resources/events/backfills.rb @@ -72,7 +72,6 @@ class Backfills # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::Events::BackfillCreateResponse] - # def create(params) parsed, options = Orb::Models::Events::BackfillCreateParams.dump_request(params) @client.request( @@ -102,7 +101,6 @@ def create(params) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Page] - # def list(params = {}) parsed, options = Orb::Models::Events::BackfillListParams.dump_request(params) @client.request( @@ -127,7 +125,6 @@ def list(params = {}) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::Events::BackfillCloseResponse] - # def close(backfill_id, params = {}) @client.request( method: :post, @@ -146,7 +143,6 @@ def close(backfill_id, params = {}) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::Events::BackfillFetchResponse] - # def fetch(backfill_id, params = {}) @client.request( method: :get, @@ -171,7 +167,6 @@ def fetch(backfill_id, params = {}) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::Events::BackfillRevertResponse] - # def revert(backfill_id, params = {}) @client.request( method: :post, @@ -182,7 +177,6 @@ def revert(backfill_id, params = {}) end # @param client [Orb::Client] - # def initialize(client:) @client = client end diff --git a/lib/orb/resources/events/volume.rb b/lib/orb/resources/events/volume.rb index a5050a27..3ef45888 100644 --- a/lib/orb/resources/events/volume.rb +++ b/lib/orb/resources/events/volume.rb @@ -38,7 +38,6 @@ class Volume # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::Events::EventVolumes] - # def list(params) parsed, options = Orb::Models::Events::VolumeListParams.dump_request(params) @client.request( @@ -51,7 +50,6 @@ def list(params) end # @param client [Orb::Client] - # def initialize(client:) @client = client end diff --git a/lib/orb/resources/invoice_line_items.rb b/lib/orb/resources/invoice_line_items.rb index d8c41dd9..2d0c2d9a 100644 --- a/lib/orb/resources/invoice_line_items.rb +++ b/lib/orb/resources/invoice_line_items.rb @@ -24,7 +24,6 @@ class InvoiceLineItems # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::InvoiceLineItemCreateResponse] - # def create(params) parsed, options = Orb::Models::InvoiceLineItemCreateParams.dump_request(params) @client.request( @@ -37,7 +36,6 @@ def create(params) end # @param client [Orb::Client] - # def initialize(client:) @client = client end diff --git a/lib/orb/resources/invoices.rb b/lib/orb/resources/invoices.rb index 3308a12a..834ee4cd 100644 --- a/lib/orb/resources/invoices.rb +++ b/lib/orb/resources/invoices.rb @@ -40,7 +40,6 @@ class Invoices # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::Invoice] - # def create(params) parsed, options = Orb::Models::InvoiceCreateParams.dump_request(params) @client.request( @@ -69,7 +68,6 @@ def create(params) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::Invoice] - # def update(invoice_id, params = {}) parsed, options = Orb::Models::InvoiceUpdateParams.dump_request(params) @client.request( @@ -142,7 +140,6 @@ def update(invoice_id, params = {}) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Page] - # def list(params = {}) parsed, options = Orb::Models::InvoiceListParams.dump_request(params) @client.request( @@ -165,7 +162,6 @@ def list(params = {}) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::Invoice] - # def fetch(invoice_id, params = {}) @client.request( method: :get, @@ -186,7 +182,6 @@ def fetch(invoice_id, params = {}) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::InvoiceFetchUpcomingResponse] - # def fetch_upcoming(params) parsed, options = Orb::Models::InvoiceFetchUpcomingParams.dump_request(params) @client.request( @@ -218,7 +213,6 @@ def fetch_upcoming(params) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::Invoice] - # def issue(invoice_id, params = {}) parsed, options = Orb::Models::InvoiceIssueParams.dump_request(params) @client.request( @@ -246,7 +240,6 @@ def issue(invoice_id, params = {}) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::Invoice] - # def mark_paid(invoice_id, params) parsed, options = Orb::Models::InvoiceMarkPaidParams.dump_request(params) @client.request( @@ -268,7 +261,6 @@ def mark_paid(invoice_id, params) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::Invoice] - # def pay(invoice_id, params = {}) @client.request( method: :post, @@ -297,7 +289,6 @@ def pay(invoice_id, params = {}) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::Invoice] - # def void(invoice_id, params = {}) @client.request( method: :post, @@ -308,7 +299,6 @@ def void(invoice_id, params = {}) end # @param client [Orb::Client] - # def initialize(client:) @client = client end diff --git a/lib/orb/resources/items.rb b/lib/orb/resources/items.rb index ec8ab50f..959a6f32 100644 --- a/lib/orb/resources/items.rb +++ b/lib/orb/resources/items.rb @@ -12,7 +12,6 @@ class Items # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::Item] - # def create(params) parsed, options = Orb::Models::ItemCreateParams.dump_request(params) @client.request(method: :post, path: "items", body: parsed, model: Orb::Models::Item, options: options) @@ -31,7 +30,6 @@ def create(params) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::Item] - # def update(item_id, params = {}) parsed, options = Orb::Models::ItemUpdateParams.dump_request(params) @client.request( @@ -56,7 +54,6 @@ def update(item_id, params = {}) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Page] - # def list(params = {}) parsed, options = Orb::Models::ItemListParams.dump_request(params) @client.request( @@ -78,7 +75,6 @@ def list(params = {}) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::Item] - # def fetch(item_id, params = {}) @client.request( method: :get, @@ -89,7 +85,6 @@ def fetch(item_id, params = {}) end # @param client [Orb::Client] - # def initialize(client:) @client = client end diff --git a/lib/orb/resources/metrics.rb b/lib/orb/resources/metrics.rb index ca842ad7..38b8e4ad 100644 --- a/lib/orb/resources/metrics.rb +++ b/lib/orb/resources/metrics.rb @@ -24,7 +24,6 @@ class Metrics # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::BillableMetric] - # def create(params) parsed, options = Orb::Models::MetricCreateParams.dump_request(params) @client.request( @@ -51,7 +50,6 @@ def create(params) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::BillableMetric] - # def update(metric_id, params = {}) parsed, options = Orb::Models::MetricUpdateParams.dump_request(params) @client.request( @@ -85,7 +83,6 @@ def update(metric_id, params = {}) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Page] - # def list(params = {}) parsed, options = Orb::Models::MetricListParams.dump_request(params) @client.request( @@ -108,7 +105,6 @@ def list(params = {}) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::BillableMetric] - # def fetch(metric_id, params = {}) @client.request( method: :get, @@ -119,7 +115,6 @@ def fetch(metric_id, params = {}) end # @param client [Orb::Client] - # def initialize(client:) @client = client end diff --git a/lib/orb/resources/plans.rb b/lib/orb/resources/plans.rb index bd1b47a1..cbb844ef 100644 --- a/lib/orb/resources/plans.rb +++ b/lib/orb/resources/plans.rb @@ -36,7 +36,6 @@ class Plans # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::Plan] - # def create(params) parsed, options = Orb::Models::PlanCreateParams.dump_request(params) @client.request(method: :post, path: "plans", body: parsed, model: Orb::Models::Plan, options: options) @@ -62,7 +61,6 @@ def create(params) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::Plan] - # def update(plan_id, params = {}) parsed, options = Orb::Models::PlanUpdateParams.dump_request(params) @client.request( @@ -100,7 +98,6 @@ def update(plan_id, params = {}) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Page] - # def list(params = {}) parsed, options = Orb::Models::PlanListParams.dump_request(params) @client.request( @@ -138,7 +135,6 @@ def list(params = {}) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::Plan] - # def fetch(plan_id, params = {}) @client.request( method: :get, @@ -149,7 +145,6 @@ def fetch(plan_id, params = {}) end # @param client [Orb::Client] - # def initialize(client:) @client = client @external_plan_id = Orb::Resources::Plans::ExternalPlanID.new(client: client) diff --git a/lib/orb/resources/plans/external_plan_id.rb b/lib/orb/resources/plans/external_plan_id.rb index 7039999a..9dc9efb2 100644 --- a/lib/orb/resources/plans/external_plan_id.rb +++ b/lib/orb/resources/plans/external_plan_id.rb @@ -24,7 +24,6 @@ class ExternalPlanID # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::Plan] - # def update(other_external_plan_id, params = {}) parsed, options = Orb::Models::Plans::ExternalPlanIDUpdateParams.dump_request(params) @client.request( @@ -60,7 +59,6 @@ def update(other_external_plan_id, params = {}) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::Plan] - # def fetch(external_plan_id, params = {}) @client.request( method: :get, @@ -71,7 +69,6 @@ def fetch(external_plan_id, params = {}) end # @param client [Orb::Client] - # def initialize(client:) @client = client end diff --git a/lib/orb/resources/prices.rb b/lib/orb/resources/prices.rb index 96da7cc2..fb793eb1 100644 --- a/lib/orb/resources/prices.rb +++ b/lib/orb/resources/prices.rb @@ -113,7 +113,6 @@ class Prices # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::Price::UnitPrice, Orb::Models::Price::PackagePrice, Orb::Models::Price::MatrixPrice, Orb::Models::Price::TieredPrice, Orb::Models::Price::TieredBpsPrice, Orb::Models::Price::BpsPrice, Orb::Models::Price::BulkBpsPrice, Orb::Models::Price::BulkPrice, Orb::Models::Price::ThresholdTotalAmountPrice, Orb::Models::Price::TieredPackagePrice, Orb::Models::Price::GroupedTieredPrice, Orb::Models::Price::TieredWithMinimumPrice, Orb::Models::Price::TieredPackageWithMinimumPrice, Orb::Models::Price::PackageWithAllocationPrice, Orb::Models::Price::UnitWithPercentPrice, Orb::Models::Price::MatrixWithAllocationPrice, Orb::Models::Price::TieredWithProrationPrice, Orb::Models::Price::UnitWithProrationPrice, Orb::Models::Price::GroupedAllocationPrice, Orb::Models::Price::GroupedWithProratedMinimumPrice, Orb::Models::Price::GroupedWithMeteredMinimumPrice, Orb::Models::Price::MatrixWithDisplayNamePrice, Orb::Models::Price::BulkWithProrationPrice, Orb::Models::Price::GroupedTieredPackagePrice, Orb::Models::Price::MaxGroupTieredPackagePrice, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, Orb::Models::Price::CumulativeGroupedBulkPrice] - # def create(params) parsed, options = Orb::Models::PriceCreateParams.dump_request(params) @client.request(method: :post, path: "prices", body: parsed, model: Orb::Models::Price, options: options) @@ -134,7 +133,6 @@ def create(params) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::Price::UnitPrice, Orb::Models::Price::PackagePrice, Orb::Models::Price::MatrixPrice, Orb::Models::Price::TieredPrice, Orb::Models::Price::TieredBpsPrice, Orb::Models::Price::BpsPrice, Orb::Models::Price::BulkBpsPrice, Orb::Models::Price::BulkPrice, Orb::Models::Price::ThresholdTotalAmountPrice, Orb::Models::Price::TieredPackagePrice, Orb::Models::Price::GroupedTieredPrice, Orb::Models::Price::TieredWithMinimumPrice, Orb::Models::Price::TieredPackageWithMinimumPrice, Orb::Models::Price::PackageWithAllocationPrice, Orb::Models::Price::UnitWithPercentPrice, Orb::Models::Price::MatrixWithAllocationPrice, Orb::Models::Price::TieredWithProrationPrice, Orb::Models::Price::UnitWithProrationPrice, Orb::Models::Price::GroupedAllocationPrice, Orb::Models::Price::GroupedWithProratedMinimumPrice, Orb::Models::Price::GroupedWithMeteredMinimumPrice, Orb::Models::Price::MatrixWithDisplayNamePrice, Orb::Models::Price::BulkWithProrationPrice, Orb::Models::Price::GroupedTieredPackagePrice, Orb::Models::Price::MaxGroupTieredPackagePrice, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, Orb::Models::Price::CumulativeGroupedBulkPrice] - # def update(price_id, params = {}) parsed, options = Orb::Models::PriceUpdateParams.dump_request(params) @client.request( @@ -159,7 +157,6 @@ def update(price_id, params = {}) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Page] - # def list(params = {}) parsed, options = Orb::Models::PriceListParams.dump_request(params) @client.request( @@ -217,7 +214,6 @@ def list(params = {}) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::PriceEvaluateResponse] - # def evaluate(price_id, params) parsed, options = Orb::Models::PriceEvaluateParams.dump_request(params) @client.request( @@ -238,7 +234,6 @@ def evaluate(price_id, params) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::Price::UnitPrice, Orb::Models::Price::PackagePrice, Orb::Models::Price::MatrixPrice, Orb::Models::Price::TieredPrice, Orb::Models::Price::TieredBpsPrice, Orb::Models::Price::BpsPrice, Orb::Models::Price::BulkBpsPrice, Orb::Models::Price::BulkPrice, Orb::Models::Price::ThresholdTotalAmountPrice, Orb::Models::Price::TieredPackagePrice, Orb::Models::Price::GroupedTieredPrice, Orb::Models::Price::TieredWithMinimumPrice, Orb::Models::Price::TieredPackageWithMinimumPrice, Orb::Models::Price::PackageWithAllocationPrice, Orb::Models::Price::UnitWithPercentPrice, Orb::Models::Price::MatrixWithAllocationPrice, Orb::Models::Price::TieredWithProrationPrice, Orb::Models::Price::UnitWithProrationPrice, Orb::Models::Price::GroupedAllocationPrice, Orb::Models::Price::GroupedWithProratedMinimumPrice, Orb::Models::Price::GroupedWithMeteredMinimumPrice, Orb::Models::Price::MatrixWithDisplayNamePrice, Orb::Models::Price::BulkWithProrationPrice, Orb::Models::Price::GroupedTieredPackagePrice, Orb::Models::Price::MaxGroupTieredPackagePrice, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, Orb::Models::Price::CumulativeGroupedBulkPrice] - # def fetch(price_id, params = {}) @client.request( method: :get, @@ -249,7 +244,6 @@ def fetch(price_id, params = {}) end # @param client [Orb::Client] - # def initialize(client:) @client = client @external_price_id = Orb::Resources::Prices::ExternalPriceID.new(client: client) diff --git a/lib/orb/resources/prices/external_price_id.rb b/lib/orb/resources/prices/external_price_id.rb index fa9e7c6d..7e577b2b 100644 --- a/lib/orb/resources/prices/external_price_id.rb +++ b/lib/orb/resources/prices/external_price_id.rb @@ -19,7 +19,6 @@ class ExternalPriceID # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::Price::UnitPrice, Orb::Models::Price::PackagePrice, Orb::Models::Price::MatrixPrice, Orb::Models::Price::TieredPrice, Orb::Models::Price::TieredBpsPrice, Orb::Models::Price::BpsPrice, Orb::Models::Price::BulkBpsPrice, Orb::Models::Price::BulkPrice, Orb::Models::Price::ThresholdTotalAmountPrice, Orb::Models::Price::TieredPackagePrice, Orb::Models::Price::GroupedTieredPrice, Orb::Models::Price::TieredWithMinimumPrice, Orb::Models::Price::TieredPackageWithMinimumPrice, Orb::Models::Price::PackageWithAllocationPrice, Orb::Models::Price::UnitWithPercentPrice, Orb::Models::Price::MatrixWithAllocationPrice, Orb::Models::Price::TieredWithProrationPrice, Orb::Models::Price::UnitWithProrationPrice, Orb::Models::Price::GroupedAllocationPrice, Orb::Models::Price::GroupedWithProratedMinimumPrice, Orb::Models::Price::GroupedWithMeteredMinimumPrice, Orb::Models::Price::MatrixWithDisplayNamePrice, Orb::Models::Price::BulkWithProrationPrice, Orb::Models::Price::GroupedTieredPackagePrice, Orb::Models::Price::MaxGroupTieredPackagePrice, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, Orb::Models::Price::CumulativeGroupedBulkPrice] - # def update(external_price_id, params = {}) parsed, options = Orb::Models::Prices::ExternalPriceIDUpdateParams.dump_request(params) @client.request( @@ -42,7 +41,6 @@ def update(external_price_id, params = {}) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::Price::UnitPrice, Orb::Models::Price::PackagePrice, Orb::Models::Price::MatrixPrice, Orb::Models::Price::TieredPrice, Orb::Models::Price::TieredBpsPrice, Orb::Models::Price::BpsPrice, Orb::Models::Price::BulkBpsPrice, Orb::Models::Price::BulkPrice, Orb::Models::Price::ThresholdTotalAmountPrice, Orb::Models::Price::TieredPackagePrice, Orb::Models::Price::GroupedTieredPrice, Orb::Models::Price::TieredWithMinimumPrice, Orb::Models::Price::TieredPackageWithMinimumPrice, Orb::Models::Price::PackageWithAllocationPrice, Orb::Models::Price::UnitWithPercentPrice, Orb::Models::Price::MatrixWithAllocationPrice, Orb::Models::Price::TieredWithProrationPrice, Orb::Models::Price::UnitWithProrationPrice, Orb::Models::Price::GroupedAllocationPrice, Orb::Models::Price::GroupedWithProratedMinimumPrice, Orb::Models::Price::GroupedWithMeteredMinimumPrice, Orb::Models::Price::MatrixWithDisplayNamePrice, Orb::Models::Price::BulkWithProrationPrice, Orb::Models::Price::GroupedTieredPackagePrice, Orb::Models::Price::MaxGroupTieredPackagePrice, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, Orb::Models::Price::CumulativeGroupedBulkPrice] - # def fetch(external_price_id, params = {}) @client.request( method: :get, @@ -53,7 +51,6 @@ def fetch(external_price_id, params = {}) end # @param client [Orb::Client] - # def initialize(client:) @client = client end diff --git a/lib/orb/resources/subscriptions.rb b/lib/orb/resources/subscriptions.rb index 92829536..44504039 100644 --- a/lib/orb/resources/subscriptions.rb +++ b/lib/orb/resources/subscriptions.rb @@ -358,7 +358,6 @@ class Subscriptions # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::SubscriptionCreateResponse] - # def create(params = {}) parsed, options = Orb::Models::SubscriptionCreateParams.dump_request(params) @client.request( @@ -401,7 +400,6 @@ def create(params = {}) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::Subscription] - # def update(subscription_id, params = {}) parsed, options = Orb::Models::SubscriptionUpdateParams.dump_request(params) @client.request( @@ -438,7 +436,7 @@ def update(subscription_id, params = {}) # # @option params [Array, nil] :customer_id # - # @option params [String, nil] :external_customer_id + # @option params [Array, nil] :external_customer_id # # @option params [Integer] :limit The number of items to fetch. Defaults to 20. # @@ -447,7 +445,6 @@ def update(subscription_id, params = {}) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Page] - # def list(params = {}) parsed, options = Orb::Models::SubscriptionListParams.dump_request(params) @client.request( @@ -538,7 +535,6 @@ def list(params = {}) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::SubscriptionCancelResponse] - # def cancel(subscription_id, params) parsed, options = Orb::Models::SubscriptionCancelParams.dump_request(params) @client.request( @@ -560,7 +556,6 @@ def cancel(subscription_id, params) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::Subscription] - # def fetch(subscription_id, params = {}) @client.request( method: :get, @@ -599,7 +594,6 @@ def fetch(subscription_id, params = {}) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::SubscriptionFetchCostsResponse] - # def fetch_costs(subscription_id, params = {}) parsed, options = Orb::Models::SubscriptionFetchCostsParams.dump_request(params) @client.request( @@ -636,7 +630,6 @@ def fetch_costs(subscription_id, params = {}) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Page] - # def fetch_schedule(subscription_id, params = {}) parsed, options = Orb::Models::SubscriptionFetchScheduleParams.dump_request(params) @client.request( @@ -876,7 +869,6 @@ def fetch_schedule(subscription_id, params = {}) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::SubscriptionUsage::UngroupedSubscriptionUsage, Orb::Models::SubscriptionUsage::GroupedSubscriptionUsage] - # def fetch_usage(subscription_id, params = {}) parsed, options = Orb::Models::SubscriptionFetchUsageParams.dump_request(params) @client.request( @@ -980,7 +972,6 @@ def fetch_usage(subscription_id, params = {}) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::SubscriptionPriceIntervalsResponse] - # def price_intervals(subscription_id, params = {}) parsed, options = Orb::Models::SubscriptionPriceIntervalsParams.dump_request(params) @client.request( @@ -1269,7 +1260,6 @@ def price_intervals(subscription_id, params = {}) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::SubscriptionSchedulePlanChangeResponse] - # def schedule_plan_change(subscription_id, params) parsed, options = Orb::Models::SubscriptionSchedulePlanChangeParams.dump_request(params) @client.request( @@ -1298,7 +1288,6 @@ def schedule_plan_change(subscription_id, params) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::SubscriptionTriggerPhaseResponse] - # def trigger_phase(subscription_id, params = {}) parsed, options = Orb::Models::SubscriptionTriggerPhaseParams.dump_request(params) @client.request( @@ -1324,7 +1313,6 @@ def trigger_phase(subscription_id, params = {}) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::SubscriptionUnscheduleCancellationResponse] - # def unschedule_cancellation(subscription_id, params = {}) @client.request( method: :post, @@ -1349,7 +1337,6 @@ def unschedule_cancellation(subscription_id, params = {}) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse] - # def unschedule_fixed_fee_quantity_updates(subscription_id, params) parsed, options = Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesParams.dump_request(params) @client.request( @@ -1371,7 +1358,6 @@ def unschedule_fixed_fee_quantity_updates(subscription_id, params) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse] - # def unschedule_pending_plan_changes(subscription_id, params = {}) @client.request( method: :post, @@ -1419,7 +1405,6 @@ def unschedule_pending_plan_changes(subscription_id, params = {}) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse] - # def update_fixed_fee_quantity(subscription_id, params) parsed, options = Orb::Models::SubscriptionUpdateFixedFeeQuantityParams.dump_request(params) @client.request( @@ -1463,7 +1448,6 @@ def update_fixed_fee_quantity(subscription_id, params) # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::SubscriptionUpdateTrialResponse] - # def update_trial(subscription_id, params) parsed, options = Orb::Models::SubscriptionUpdateTrialParams.dump_request(params) @client.request( @@ -1476,7 +1460,6 @@ def update_trial(subscription_id, params) end # @param client [Orb::Client] - # def initialize(client:) @client = client end diff --git a/lib/orb/resources/top_level.rb b/lib/orb/resources/top_level.rb index 79d5f884..ddb12df7 100644 --- a/lib/orb/resources/top_level.rb +++ b/lib/orb/resources/top_level.rb @@ -15,7 +15,6 @@ class TopLevel # @option params [Orb::RequestOptions, Hash{Symbol=>Object}, nil] :request_options # # @return [Orb::Models::TopLevelPingResponse] - # def ping(params = {}) @client.request( method: :get, @@ -26,7 +25,6 @@ def ping(params = {}) end # @param client [Orb::Client] - # def initialize(client:) @client = client end diff --git a/lib/orb/util.rb b/lib/orb/util.rb index 63579b0b..ada3d1fc 100644 --- a/lib/orb/util.rb +++ b/lib/orb/util.rb @@ -3,20 +3,17 @@ module Orb # rubocop:disable Metrics/ModuleLength - # @private - # + # @api private module Util - # @private + # @api private # # @return [Float] - # def self.monotonic_secs = Process.clock_gettime(Process::CLOCK_MONOTONIC) class << self - # @private + # @api private # # @return [String] - # def arch case (arch = RbConfig::CONFIG["arch"])&.downcase in nil @@ -32,10 +29,9 @@ def arch end end - # @private + # @api private # # @return [String] - # def os case (host = RbConfig::CONFIG["host_os"])&.downcase in nil @@ -57,12 +53,11 @@ def os end class << self - # @private + # @api private # # @param input [Object] # # @return [Boolean, Object] - # def primitive?(input) case input in true | false | Integer | Float | Symbol | String @@ -72,12 +67,11 @@ def primitive?(input) end end - # @private + # @api private # # @param input [Object] # # @return [Boolean, Object] - # def coerce_boolean(input) case input.is_a?(String) ? input.downcase : input in Numeric @@ -91,13 +85,12 @@ def coerce_boolean(input) end end - # @private + # @api private # # @param input [Object] # # @raise [ArgumentError] # @return [Boolean, nil] - # def coerce_boolean!(input) case coerce_boolean(input) in true | false | nil => coerced @@ -107,12 +100,11 @@ def coerce_boolean!(input) end end - # @private + # @api private # # @param input [Object] # # @return [Integer, Object] - # def coerce_integer(input) case input in true @@ -124,12 +116,11 @@ def coerce_integer(input) end end - # @private + # @api private # # @param input [Object] # # @return [Float, Object] - # def coerce_float(input) case input in true @@ -141,12 +132,11 @@ def coerce_float(input) end end - # @private + # @api private # # @param input [Object] # # @return [Hash{Object=>Object}, Object] - # def coerce_hash(input) case input in NilClass | Array | Set | Enumerator @@ -165,14 +155,13 @@ def coerce_hash(input) OMIT = Object.new.freeze class << self - # @private + # @api private # # @param lhs [Object] # @param rhs [Object] # @param concat [Boolean] # # @return [Object] - # private def deep_merge_lr(lhs, rhs, concat: false) case [lhs, rhs, concat] in [Hash, Hash, _] @@ -191,7 +180,7 @@ class << self end end - # @private + # @api private # # Recursively merge one hash with another. If the values at a given key are not # both hashes, just take the new value. @@ -203,7 +192,6 @@ class << self # @param concat [Boolean] whether to merge sequences by concatenation. # # @return [Object] - # def deep_merge(*values, sentinel: nil, concat: false) case values in [value, *values] @@ -215,7 +203,7 @@ def deep_merge(*values, sentinel: nil, concat: false) end end - # @private + # @api private # # @param data [Hash{Symbol=>Object}, Array, Object] # @param pick [Symbol, Integer, Array, nil] @@ -223,7 +211,6 @@ def deep_merge(*values, sentinel: nil, concat: false) # @param blk [Proc, nil] # # @return [Object, nil] - # def dig(data, pick, sentinel = nil, &blk) case [data, pick, blk] in [_, nil, nil] @@ -248,22 +235,20 @@ def dig(data, pick, sentinel = nil, &blk) end class << self - # @private + # @api private # # @param uri [URI::Generic] # # @return [String] - # def uri_origin(uri) "#{uri.scheme}://#{uri.host}#{uri.port == uri.default_port ? '' : ":#{uri.port}"}" end - # @private + # @api private # # @param path [String, Array] # # @return [String] - # def interpolate_path(path) case path in String @@ -278,40 +263,37 @@ def interpolate_path(path) end class << self - # @private + # @api private # # @param query [String, nil] # # @return [Hash{String=>Array}] - # def decode_query(query) CGI.parse(query.to_s) end - # @private + # @api private # # @param query [Hash{String=>Array, String, nil}, nil] # # @return [String, nil] - # def encode_query(query) query.to_h.empty? ? nil : URI.encode_www_form(query) end end class << self - # @private + # @api private # # @param url [URI::Generic, String] # # @return [Hash{Symbol=>String, Integer, nil}] - # def parse_uri(url) parsed = URI::Generic.component.zip(URI.split(url)).to_h {**parsed, query: decode_query(parsed.fetch(:query))} end - # @private + # @api private # # @param parsed [Hash{Symbol=>String, Integer, nil}] . # @@ -326,12 +308,11 @@ def parse_uri(url) # @option parsed [Hash{String=>Array}] :query # # @return [URI::Generic] - # def unparse_uri(parsed) URI::Generic.build(**parsed, query: encode_query(parsed.fetch(:query))) end - # @private + # @api private # # @param lhs [Hash{Symbol=>String, Integer, nil}] . # @@ -358,7 +339,6 @@ def unparse_uri(parsed) # @option rhs [Hash{String=>Array}] :query # # @return [URI::Generic] - # def join_parsed_uri(lhs, rhs) base_path, base_query = lhs.fetch_values(:path, :query) slashed = base_path.end_with?("/") ? base_path : "#{base_path}/" @@ -380,12 +360,11 @@ def join_parsed_uri(lhs, rhs) end class << self - # @private + # @api private # # @param headers [Hash{String=>String, Integer, Array, nil}] # # @return [Hash{String=>String}] - # def normalized_headers(*headers) {}.merge(*headers.compact).to_h do |key, val| case val @@ -399,16 +378,15 @@ def normalized_headers(*headers) end end - # @private + # @api private # # An adapter that satisfies the IO interface required by `::IO.copy_stream` class ReadIOAdapter - # @private + # @api private # # @param max_len [Integer, nil] # # @return [String] - # private def read_enum(max_len) case max_len in nil @@ -422,13 +400,12 @@ class ReadIOAdapter @buf.slice!(0..) end - # @private + # @api private # # @param max_len [Integer, nil] # @param out_string [String, nil] # # @return [String, nil] - # def read(max_len = nil, out_string = nil) case @stream in nil @@ -447,11 +424,10 @@ def read(max_len = nil, out_string = nil) .tap(&@blk) end - # @private + # @api private # # @param stream [String, IO, StringIO, Enumerable] # @param blk [Proc] - # def initialize(stream, &blk) @stream = stream.is_a?(String) ? StringIO.new(stream) : stream @buf = String.new.b @@ -463,7 +439,6 @@ class << self # @param blk [Proc] # # @return [Enumerable] - # def string_io(&blk) Enumerator.new do |y| y.define_singleton_method(:write) do @@ -477,13 +452,12 @@ def string_io(&blk) end class << self - # @private + # @api private # # @param y [Enumerator::Yielder] # @param boundary [String] # @param key [Symbol, String] # @param val [Object] - # private def encode_multipart_formdata(y, boundary:, key:, val:) y << "--#{boundary}\r\n" y << "Content-Disposition: form-data" @@ -516,12 +490,11 @@ class << self y << "\r\n" end - # @private + # @api private # # @param body [Object] # # @return [Array(String, Enumerable)] - # private def encode_multipart_streaming(body) boundary = SecureRandom.urlsafe_base64(60) @@ -547,18 +520,19 @@ class << self [boundary, strio] end - # @private + # @api private # # @param headers [Hash{String=>String}] # @param body [Object] # # @return [Object] - # def encode_content(headers, body) content_type = headers["content-type"] case [content_type, body] - in ["application/json", Hash | Array] + in [%r{^application/(?:vnd\.api\+)?json}, Hash | Array] [headers, JSON.fast_generate(body)] + in [%r{^application/(?:x-)?jsonl}, Enumerable] + [headers, body.lazy.map { JSON.fast_generate(_1) }] in [%r{^multipart/form-data}, Hash | IO | StringIO] boundary, strio = encode_multipart_streaming(body) headers = {**headers, "content-type" => "#{content_type}; boundary=#{boundary}"} @@ -570,7 +544,7 @@ def encode_content(headers, body) end end - # @private + # @api private # # @param headers [Hash{String=>String}, Net::HTTPHeader] # @param stream [Enumerable] @@ -578,7 +552,6 @@ def encode_content(headers, body) # # @raise [JSON::ParserError] # @return [Object] - # def decode_content(headers, stream:, suppress_error: false) case headers["content-type"] in %r{^application/(?:vnd\.api\+)?json} @@ -589,11 +562,14 @@ def decode_content(headers, stream:, suppress_error: false) raise e unless suppress_error json end + in %r{^application/(?:x-)?jsonl} + lines = decode_lines(stream) + chain_fused(lines) do |y| + lines.each { y << JSON.parse(_1, symbolize_names: true) } + end in %r{^text/event-stream} lines = decode_lines(stream) decode_sse(lines) - in %r{^application/(?:x-)?jsonl} - decode_lines(stream) in %r{^text/} stream.to_a.join else @@ -604,7 +580,7 @@ def decode_content(headers, stream:, suppress_error: false) end class << self - # @private + # @api private # # https://doc.rust-lang.org/std/iter/trait.FusedIterator.html # @@ -613,7 +589,6 @@ class << self # @param close [Proc] # # @return [Enumerable] - # def fused_enum(enum, external: false, &close) fused = false iter = Enumerator.new do |y| @@ -637,10 +612,9 @@ def fused_enum(enum, external: false, &close) iter end - # @private + # @api private # # @param enum [Enumerable, nil] - # def close_fused!(enum) return unless enum.is_a?(Enumerator) @@ -649,11 +623,10 @@ def close_fused!(enum) # rubocop:enable Lint/UnreachableLoop end - # @private + # @api private # # @param enum [Enumerable, nil] # @param blk [Proc] - # def chain_fused(enum, &blk) iter = Enumerator.new { blk.call(_1) } fused_enum(iter) { close_fused!(enum) } @@ -661,12 +634,11 @@ def chain_fused(enum, &blk) end class << self - # @private + # @api private # # @param enum [Enumerable] # # @return [Enumerable] - # def decode_lines(enum) re = /(\r\n|\r|\n)/ buffer = String.new.b @@ -696,14 +668,13 @@ def decode_lines(enum) end end - # @private + # @api private # # https://html.spec.whatwg.org/multipage/server-sent-events.html#parsing-an-event-stream # # @param lines [Enumerable] # # @return [Hash{Symbol=>Object}] - # def decode_sse(lines) # rubocop:disable Metrics/BlockLength chain_fused(lines) do |y| diff --git a/lib/orb/version.rb b/lib/orb/version.rb index 0c767505..7a09c4b8 100644 --- a/lib/orb/version.rb +++ b/lib/orb/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Orb - VERSION = "0.1.0-alpha.26" + VERSION = "0.1.0-alpha.27" end diff --git a/manifest.yaml b/manifest.yaml index e2306edd..fa9c3e5e 100644 --- a/manifest.yaml +++ b/manifest.yaml @@ -5,6 +5,7 @@ dependencies: - etc - json - net/http + - pathname - rbconfig - securerandom - set diff --git a/rbi/lib/orb/base_client.rbi b/rbi/lib/orb/base_client.rbi index ad42347d..23adb6aa 100644 --- a/rbi/lib/orb/base_client.rbi +++ b/rbi/lib/orb/base_client.rbi @@ -44,16 +44,19 @@ module Orb PLATFORM_HEADERS = T::Hash[String, String] class << self + # @api private sig { params(req: Orb::BaseClient::RequestComponentsShape).void } def validate!(req) end + # @api private sig do params(status: Integer, headers: T.any(T::Hash[String, String], Net::HTTPHeader)).returns(T::Boolean) end def should_retry?(status, headers:) end + # @api private sig do params( request: Orb::BaseClient::RequestInputShape, @@ -74,6 +77,7 @@ module Orb def requester=(_) end + # @api private sig do params( base_url: String, @@ -98,14 +102,17 @@ module Orb ) end + # @api private sig { overridable.returns(T::Hash[String, String]) } private def auth_headers end + # @api private sig { returns(String) } private def generate_idempotency_key end + # @api private sig do overridable .params(req: Orb::BaseClient::RequestComponentsShape, opts: T::Hash[Symbol, T.anything]) @@ -114,10 +121,12 @@ module Orb private def build_request(req, opts) end + # @api private sig { params(headers: T::Hash[String, String], retry_count: Integer).returns(Float) } private def retry_delay(headers, retry_count:) end + # @api private sig do params( request: Orb::BaseClient::RequestInputShape, @@ -130,6 +139,8 @@ module Orb private def send_request(request, redirect_count:, retry_count:, send_retry_header:) end + # Execute the request specified by `req`. This is the method that all resource + # methods call into. sig do params( method: Symbol, diff --git a/rbi/lib/orb/base_model.rbi b/rbi/lib/orb/base_model.rbi index 03671a6e..7888e957 100644 --- a/rbi/lib/orb/base_model.rbi +++ b/rbi/lib/orb/base_model.rbi @@ -1,19 +1,23 @@ # typed: strong module Orb + # @api private module Converter abstract! Input = T.type_alias { T.any(Orb::Converter, T::Class[T.anything]) } + # @api private sig { overridable.params(value: T.anything).returns(T.anything) } def coerce(value) end + # @api private sig { overridable.params(value: T.anything).returns(T.anything) } def dump(value) end + # @api private sig do overridable .params(value: T.anything) @@ -23,6 +27,7 @@ module Orb end class << self + # @api private sig do params( spec: T.any( @@ -40,20 +45,40 @@ module Orb def self.type_info(spec) end + # @api private + # + # Based on `target`, transform `value` into `target`, to the extent possible: + # + # 1. if the given `value` conforms to `target` already, return the given `value` + # 2. if it's possible and safe to convert the given `value` to `target`, then the + # converted value + # 3. otherwise, the given `value` unaltered sig { params(target: Orb::Converter::Input, value: T.anything).returns(T.anything) } def self.coerce(target, value) end + # @api private sig { params(target: Orb::Converter::Input, value: T.anything).returns(T.anything) } def self.dump(target, value) end + # @api private + # + # The underlying algorithm for computing maximal compatibility is subject to + # future improvements. + # + # Similar to `#.coerce`, used to determine the best union variant to decode into. + # + # 1. determine if strict-ish coercion is possible + # 2. return either result of successful coercion or if loose coercion is possible + # 3. return a score for recursively tallied count for fields that can be coerced sig { params(target: Orb::Converter::Input, value: T.anything).returns(T.anything) } def self.try_strict_coerce(target, value) end end end + # When we don't know what to expect for the value. class Unknown abstract! @@ -68,14 +93,17 @@ module Orb end class << self + # @api private sig { override.params(value: T.anything).returns(T.anything) } def coerce(value) end + # @api private sig { override.params(value: T.anything).returns(T.anything) } def dump(value) end + # @api private sig do override .params(value: T.anything) @@ -86,6 +114,7 @@ module Orb end end + # Ruby has no Boolean class; this is something for models to refer to. class BooleanModel abstract! @@ -100,14 +129,17 @@ module Orb end class << self + # @api private sig { override.params(value: T.any(T::Boolean, T.anything)).returns(T.any(T::Boolean, T.anything)) } def coerce(value) end + # @api private sig { override.params(value: T.any(T::Boolean, T.anything)).returns(T.any(T::Boolean, T.anything)) } def dump(value) end + # @api private sig do override .params(value: T.anything) @@ -118,16 +150,30 @@ module Orb end end + # A value from among a specified list of options. OpenAPI enum values map to Ruby + # values in the SDK as follows: + # + # 1. boolean => true | false + # 2. integer => Integer + # 3. float => Float + # 4. string => Symbol + # + # We can therefore convert string values to Symbols, but can't convert other + # values safely. class Enum abstract! extend Orb::Converter class << self + # All of the valid Symbol values for this enum. sig { overridable.returns(T::Array[T.any(NilClass, T::Boolean, Integer, Float, Symbol)]) } def values end + # @api private + # + # Guard against thread safety issues by instantiating `@values`. sig { void } private def finalize! end @@ -142,14 +188,17 @@ module Orb end class << self + # @api private sig { override.params(value: T.any(String, Symbol, T.anything)).returns(T.any(Symbol, T.anything)) } def coerce(value) end + # @api private sig { override.params(value: T.any(Symbol, T.anything)).returns(T.any(Symbol, T.anything)) } def dump(value) end + # @api private sig do override .params(value: T.anything) @@ -166,18 +215,29 @@ module Orb extend Orb::Converter class << self + # @api private + # + # All of the specified variant info for this union. sig { returns(T::Array[[T.nilable(Symbol), Proc]]) } private def known_variants end - sig { overridable.returns(T::Array[[T.nilable(Symbol), T.anything]]) } - protected def variants + # @api private + sig { returns(T::Array[[T.nilable(Symbol), T.anything]]) } + protected def derefed_variants end + # All of the specified variants for this union. + sig { overridable.returns(T::Array[T.anything]) } + def variants + end + + # @api private sig { params(property: Symbol).void } private def discriminator(property) end + # @api private sig do params( key: T.any( @@ -197,6 +257,7 @@ module Orb private def variant(key, spec = nil) end + # @api private sig { params(value: T.anything).returns(T.nilable(Orb::Converter::Input)) } private def resolve_variant(value) end @@ -211,14 +272,17 @@ module Orb end class << self + # @api private sig { override.params(value: T.anything).returns(T.anything) } def coerce(value) end + # @api private sig { override.params(value: T.anything).returns(T.anything) } def dump(value) end + # @api private sig do override .params(value: T.anything) @@ -229,6 +293,7 @@ module Orb end end + # Array of items of a given type. class ArrayOf abstract! @@ -242,6 +307,7 @@ module Orb def ==(other) end + # @api private sig do override .params(value: T.any(T::Enumerable[T.anything], T.anything)) @@ -250,6 +316,7 @@ module Orb def coerce(value) end + # @api private sig do override .params(value: T.any(T::Enumerable[T.anything], T.anything)) @@ -258,6 +325,7 @@ module Orb def dump(value) end + # @api private sig do override .params(value: T.anything) @@ -266,10 +334,12 @@ module Orb def try_strict_coerce(value) end + # @api private sig { returns(Orb::Converter::Input) } protected def item_type end + # @api private sig do params( type_info: T.any( @@ -285,6 +355,7 @@ module Orb end end + # Hash of items of a given type. class HashOf abstract! @@ -298,6 +369,7 @@ module Orb def ==(other) end + # @api private sig do override .params(value: T.any(T::Hash[T.anything, T.anything], T.anything)) @@ -306,6 +378,7 @@ module Orb def coerce(value) end + # @api private sig do override .params(value: T.any(T::Hash[T.anything, T.anything], T.anything)) @@ -314,6 +387,7 @@ module Orb def dump(value) end + # @api private sig do override .params(value: T.anything) @@ -322,10 +396,12 @@ module Orb def try_strict_coerce(value) end + # @api private sig { returns(Orb::Converter::Input) } protected def item_type end + # @api private sig do params( type_info: T.any( @@ -349,6 +425,10 @@ module Orb KnownFieldShape = T.type_alias { {mode: T.nilable(Symbol), required: T::Boolean} } class << self + # @api private + # + # Assumes superclass fields are totally defined before fields are accessed / + # defined on subclasses. sig do returns( T::Hash[Symbol, @@ -358,14 +438,17 @@ module Orb def known_fields end + # @api private sig { returns(T::Hash[Symbol, T.all(Orb::BaseModel::KnownFieldShape, {type: Orb::Converter::Input})]) } def fields end + # @api private sig { returns(T::Hash[Symbol, T.proc.returns(T::Class[T.anything])]) } def defaults end + # @api private sig do params( name_sym: Symbol, @@ -388,6 +471,7 @@ module Orb private def add_field(name_sym, required:, type_info:, spec:) end + # @api private sig do params( name_sym: Symbol, @@ -403,6 +487,7 @@ module Orb def required(name_sym, type_info, spec = {}) end + # @api private sig do params( name_sym: Symbol, @@ -418,10 +503,17 @@ module Orb def optional(name_sym, type_info, spec = {}) end + # @api private + # + # `request_only` attributes not excluded from `.#coerce` when receiving responses + # even if well behaved servers should not send them sig { params(blk: T.proc.void).void } private def request_only(&blk) end + # @api private + # + # `response_only` attributes are omitted from `.#dump` when making requests sig { params(blk: T.proc.void).void } private def response_only(&blk) end @@ -432,6 +524,7 @@ module Orb end class << self + # @api private sig do override .params(value: T.any(Orb::BaseModel, T::Hash[T.anything, T.anything], T.anything)) @@ -440,6 +533,7 @@ module Orb def coerce(value) end + # @api private sig do override .params(value: T.any(T.attached_class, T.anything)) @@ -448,6 +542,7 @@ module Orb def dump(value) end + # @api private sig do override .params(value: T.anything) @@ -457,10 +552,24 @@ module Orb end end + # Returns the raw value associated with the given key, if found. Otherwise, nil is + # returned. + # + # It is valid to lookup keys that are not in the API spec, for example to access + # undocumented features. This method does not parse response data into + # higher-level types. Lookup by anything other than a Symbol is an ArgumentError. sig { params(key: Symbol).returns(T.nilable(T.anything)) } def [](key) end + # Returns a Hash of the data underlying this object. O(1) + # + # Keys are Symbols and values are the raw values from the response. The return + # value indicates which values were ever set on the object. i.e. there will be a + # key in this hash if they ever were, even if the set value was nil. + # + # This method is not recursive. The returned value is shared by the object, so it + # should not be mutated. sig { overridable.returns(T::Hash[Symbol, T.anything]) } def to_h end @@ -471,6 +580,7 @@ module Orb def deconstruct_keys(keys) end + # Create a new instance of a model. sig { params(data: T.any(T::Hash[Symbol, T.anything], T.self_type)).returns(T.attached_class) } def self.new(data = {}) end diff --git a/rbi/lib/orb/base_page.rbi b/rbi/lib/orb/base_page.rbi index 3c60ec23..08da0da4 100644 --- a/rbi/lib/orb/base_page.rbi +++ b/rbi/lib/orb/base_page.rbi @@ -24,6 +24,7 @@ module Orb alias_method :enum_for, :to_enum + # @api private sig do params( client: Orb::BaseClient, diff --git a/rbi/lib/orb/client.rbi b/rbi/lib/orb/client.rbi index 6248d014..5391e471 100644 --- a/rbi/lib/orb/client.rbi +++ b/rbi/lib/orb/client.rbi @@ -70,10 +70,12 @@ module Orb def dimensional_price_groups end + # @api private sig { override.returns(T::Hash[String, String]) } private def auth_headers end + # Creates and returns a new client for interacting with the API. sig do params( base_url: T.nilable(String), @@ -87,8 +89,11 @@ module Orb .returns(T.attached_class) end def self.new( + # Override the default base URL for the API, e.g., `"https://api.example.com/v2/"` base_url: nil, + # Defaults to `ENV["ORB_API_KEY"]` api_key: ENV["ORB_API_KEY"], + # Max number of retries to attempt after a failed retryable request. max_retries: DEFAULT_MAX_RETRIES, timeout: DEFAULT_TIMEOUT_IN_SECONDS, initial_retry_delay: DEFAULT_INITIAL_RETRY_DELAY, diff --git a/rbi/lib/orb/errors.rbi b/rbi/lib/orb/errors.rbi index 9b26d290..0689b357 100644 --- a/rbi/lib/orb/errors.rbi +++ b/rbi/lib/orb/errors.rbi @@ -5,6 +5,10 @@ module Orb sig { returns(T.nilable(StandardError)) } def cause end + + sig { params(_: T.nilable(StandardError)).returns(T.nilable(StandardError)) } + def cause=(_) + end end class ConversionError < Orb::Error @@ -15,14 +19,27 @@ module Orb def url end + sig { params(_: URI::Generic).returns(URI::Generic) } + def url=(_) + end + sig { returns(T.nilable(Integer)) } def status end + sig { params(_: T.nilable(Integer)).returns(T.nilable(Integer)) } + def status=(_) + end + sig { returns(T.nilable(T.anything)) } def body end + sig { params(_: T.nilable(T.anything)).returns(T.nilable(T.anything)) } + def body=(_) + end + + # @api private sig do params( url: URI::Generic, @@ -43,10 +60,19 @@ module Orb def status end + sig { params(_: NilClass).void } + def status=(_) + end + sig { void } def body end + sig { params(_: NilClass).void } + def body=(_) + end + + # @api private sig do params( url: URI::Generic, @@ -63,6 +89,7 @@ module Orb end class APITimeoutError < Orb::APIConnectionError + # @api private sig do params( url: URI::Generic, @@ -79,6 +106,7 @@ module Orb end class APIStatusError < Orb::APIError + # @api private sig do params( url: URI::Generic, @@ -97,6 +125,11 @@ module Orb def status end + sig { params(_: Integer).returns(Integer) } + def status=(_) + end + + # @api private sig do params( url: URI::Generic, diff --git a/rbi/lib/orb/extern.rbi b/rbi/lib/orb/extern.rbi index 648b37ab..dd26464c 100644 --- a/rbi/lib/orb/extern.rbi +++ b/rbi/lib/orb/extern.rbi @@ -1,6 +1,7 @@ # typed: strong module Orb + # @api private module Extern abstract! end diff --git a/rbi/lib/orb/models/alert.rbi b/rbi/lib/orb/models/alert.rbi index 12d6fb3f..76c4c0d5 100644 --- a/rbi/lib/orb/models/alert.rbi +++ b/rbi/lib/orb/models/alert.rbi @@ -3,6 +3,7 @@ module Orb module Models class Alert < Orb::BaseModel + # Also referred to as alert_id in this documentation. sig { returns(String) } def id end @@ -11,6 +12,7 @@ module Orb def id=(_) end + # The creation time of the resource in Orb. sig { returns(Time) } def created_at end @@ -19,6 +21,7 @@ module Orb def created_at=(_) end + # The name of the currency the credit balance or invoice cost is denominated in. sig { returns(T.nilable(String)) } def currency end @@ -27,6 +30,7 @@ module Orb def currency=(_) end + # The customer the alert applies to. sig { returns(T.nilable(Orb::Models::Alert::Customer)) } def customer end @@ -35,6 +39,7 @@ module Orb def customer=(_) end + # Whether the alert is enabled or disabled. sig { returns(T::Boolean) } def enabled end @@ -43,6 +48,7 @@ module Orb def enabled=(_) end + # The metric the alert applies to. sig { returns(T.nilable(Orb::Models::Alert::Metric)) } def metric end @@ -51,6 +57,7 @@ module Orb def metric=(_) end + # The plan the alert applies to. sig { returns(T.nilable(Orb::Models::Alert::Plan)) } def plan end @@ -59,6 +66,7 @@ module Orb def plan=(_) end + # The subscription the alert applies to. sig { returns(T.nilable(Orb::Models::Alert::Subscription)) } def subscription end @@ -69,6 +77,8 @@ module Orb def subscription=(_) end + # The thresholds that define the conditions under which the alert will be + # triggered. sig { returns(T.nilable(T::Array[Orb::Models::Alert::Threshold])) } def thresholds end @@ -80,6 +90,7 @@ module Orb def thresholds=(_) end + # The type of alert. This must be a valid alert type. sig { returns(Symbol) } def type end @@ -88,6 +99,11 @@ module Orb def type=(_) end + # [Alerts within Orb](/product-catalog/configuring-alerts) monitor spending, + # usage, or credit balance and trigger webhooks when a threshold is exceeded. + # + # Alerts created through the API can be scoped to either customers or + # subscriptions. sig do params( id: String, @@ -143,6 +159,7 @@ module Orb def external_customer_id=(_) end + # The customer the alert applies to. sig { params(id: String, external_customer_id: T.nilable(String)).returns(T.attached_class) } def self.new(id:, external_customer_id:) end @@ -161,6 +178,7 @@ module Orb def id=(_) end + # The metric the alert applies to. sig { params(id: String).returns(T.attached_class) } def self.new(id:) end @@ -179,6 +197,9 @@ module Orb def id=(_) end + # An optional user-defined ID for this plan resource, used throughout the system + # as an alias for this Plan. Use this field to identify a plan by an existing + # identifier in your system. sig { returns(T.nilable(String)) } def external_plan_id end @@ -203,6 +224,7 @@ module Orb def plan_version=(_) end + # The plan the alert applies to. sig do params( id: T.nilable(String), @@ -239,6 +261,7 @@ module Orb def id=(_) end + # The subscription the alert applies to. sig { params(id: String).returns(T.attached_class) } def self.new(id:) end @@ -249,6 +272,9 @@ module Orb end class Threshold < Orb::BaseModel + # The value at which an alert will fire. For credit balance alerts, the alert will + # fire at or below this value. For usage and cost alerts, the alert will fire at + # or above this value. sig { returns(Float) } def value end @@ -257,6 +283,8 @@ module Orb def value=(_) end + # Thresholds are used to define the conditions under which an alert will be + # triggered. sig { params(value: Float).returns(T.attached_class) } def self.new(value:) end @@ -266,6 +294,7 @@ module Orb end end + # The type of alert. This must be a valid alert type. class Type < Orb::Enum abstract! diff --git a/rbi/lib/orb/models/alert_create_for_customer_params.rbi b/rbi/lib/orb/models/alert_create_for_customer_params.rbi index da16ba69..a0c70e53 100644 --- a/rbi/lib/orb/models/alert_create_for_customer_params.rbi +++ b/rbi/lib/orb/models/alert_create_for_customer_params.rbi @@ -6,6 +6,7 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters + # The case sensitive currency or custom pricing unit to use for this alert. sig { returns(String) } def currency end @@ -14,6 +15,7 @@ module Orb def currency=(_) end + # The type of alert to create. This must be a valid alert type. sig { returns(Symbol) } def type end @@ -22,6 +24,7 @@ module Orb def type=(_) end + # The thresholds that define the values at which the alert will be triggered. sig { returns(T.nilable(T::Array[Orb::Models::AlertCreateForCustomerParams::Threshold])) } def thresholds end @@ -59,6 +62,7 @@ module Orb def to_hash end + # The type of alert to create. This must be a valid alert type. class Type < Orb::Enum abstract! @@ -74,6 +78,9 @@ module Orb end class Threshold < Orb::BaseModel + # The value at which an alert will fire. For credit balance alerts, the alert will + # fire at or below this value. For usage and cost alerts, the alert will fire at + # or above this value. sig { returns(Float) } def value end @@ -82,6 +89,8 @@ module Orb def value=(_) end + # Thresholds are used to define the conditions under which an alert will be + # triggered. sig { params(value: Float).returns(T.attached_class) } def self.new(value:) end diff --git a/rbi/lib/orb/models/alert_create_for_external_customer_params.rbi b/rbi/lib/orb/models/alert_create_for_external_customer_params.rbi index f73a5857..a18cd4ea 100644 --- a/rbi/lib/orb/models/alert_create_for_external_customer_params.rbi +++ b/rbi/lib/orb/models/alert_create_for_external_customer_params.rbi @@ -6,6 +6,7 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters + # The case sensitive currency or custom pricing unit to use for this alert. sig { returns(String) } def currency end @@ -14,6 +15,7 @@ module Orb def currency=(_) end + # The type of alert to create. This must be a valid alert type. sig { returns(Symbol) } def type end @@ -22,6 +24,7 @@ module Orb def type=(_) end + # The thresholds that define the values at which the alert will be triggered. sig { returns(T.nilable(T::Array[Orb::Models::AlertCreateForExternalCustomerParams::Threshold])) } def thresholds end @@ -59,6 +62,7 @@ module Orb def to_hash end + # The type of alert to create. This must be a valid alert type. class Type < Orb::Enum abstract! @@ -74,6 +78,9 @@ module Orb end class Threshold < Orb::BaseModel + # The value at which an alert will fire. For credit balance alerts, the alert will + # fire at or below this value. For usage and cost alerts, the alert will fire at + # or above this value. sig { returns(Float) } def value end @@ -82,6 +89,8 @@ module Orb def value=(_) end + # Thresholds are used to define the conditions under which an alert will be + # triggered. sig { params(value: Float).returns(T.attached_class) } def self.new(value:) end diff --git a/rbi/lib/orb/models/alert_create_for_subscription_params.rbi b/rbi/lib/orb/models/alert_create_for_subscription_params.rbi index 01d9624e..adb48dc5 100644 --- a/rbi/lib/orb/models/alert_create_for_subscription_params.rbi +++ b/rbi/lib/orb/models/alert_create_for_subscription_params.rbi @@ -6,6 +6,7 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters + # The thresholds that define the values at which the alert will be triggered. sig { returns(T::Array[Orb::Models::AlertCreateForSubscriptionParams::Threshold]) } def thresholds end @@ -17,6 +18,7 @@ module Orb def thresholds=(_) end + # The type of alert to create. This must be a valid alert type. sig { returns(Symbol) } def type end @@ -25,6 +27,7 @@ module Orb def type=(_) end + # The metric to track usage for. sig { returns(T.nilable(String)) } def metric_id end @@ -60,6 +63,9 @@ module Orb end class Threshold < Orb::BaseModel + # The value at which an alert will fire. For credit balance alerts, the alert will + # fire at or below this value. For usage and cost alerts, the alert will fire at + # or above this value. sig { returns(Float) } def value end @@ -68,6 +74,8 @@ module Orb def value=(_) end + # Thresholds are used to define the conditions under which an alert will be + # triggered. sig { params(value: Float).returns(T.attached_class) } def self.new(value:) end @@ -77,6 +85,7 @@ module Orb end end + # The type of alert to create. This must be a valid alert type. class Type < Orb::Enum abstract! diff --git a/rbi/lib/orb/models/alert_disable_params.rbi b/rbi/lib/orb/models/alert_disable_params.rbi index 1ead47cb..ff81e986 100644 --- a/rbi/lib/orb/models/alert_disable_params.rbi +++ b/rbi/lib/orb/models/alert_disable_params.rbi @@ -6,6 +6,7 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters + # Used to update the status of a plan alert scoped to this subscription_id sig { returns(T.nilable(String)) } def subscription_id end diff --git a/rbi/lib/orb/models/alert_enable_params.rbi b/rbi/lib/orb/models/alert_enable_params.rbi index 27a007fe..fbd0f2ec 100644 --- a/rbi/lib/orb/models/alert_enable_params.rbi +++ b/rbi/lib/orb/models/alert_enable_params.rbi @@ -6,6 +6,7 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters + # Used to update the status of a plan alert scoped to this subscription_id sig { returns(T.nilable(String)) } def subscription_id end diff --git a/rbi/lib/orb/models/alert_list_params.rbi b/rbi/lib/orb/models/alert_list_params.rbi index e15bb7cd..cec3e609 100644 --- a/rbi/lib/orb/models/alert_list_params.rbi +++ b/rbi/lib/orb/models/alert_list_params.rbi @@ -38,6 +38,8 @@ module Orb def created_at_lte=(_) end + # Cursor for pagination. This can be populated by the `next_cursor` value returned + # from the initial request. sig { returns(T.nilable(String)) } def cursor end @@ -46,6 +48,7 @@ module Orb def cursor=(_) end + # Fetch alerts scoped to this customer_id sig { returns(T.nilable(String)) } def customer_id end @@ -54,6 +57,7 @@ module Orb def customer_id=(_) end + # Fetch alerts scoped to this external_customer_id sig { returns(T.nilable(String)) } def external_customer_id end @@ -62,6 +66,7 @@ module Orb def external_customer_id=(_) end + # The number of items to fetch. Defaults to 20. sig { returns(T.nilable(Integer)) } def limit end @@ -70,6 +75,7 @@ module Orb def limit=(_) end + # Fetch alerts scoped to this subscription_id sig { returns(T.nilable(String)) } def subscription_id end diff --git a/rbi/lib/orb/models/alert_update_params.rbi b/rbi/lib/orb/models/alert_update_params.rbi index 71447d97..a77509b8 100644 --- a/rbi/lib/orb/models/alert_update_params.rbi +++ b/rbi/lib/orb/models/alert_update_params.rbi @@ -6,6 +6,7 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters + # The thresholds that define the values at which the alert will be triggered. sig { returns(T::Array[Orb::Models::AlertUpdateParams::Threshold]) } def thresholds end @@ -37,6 +38,9 @@ module Orb end class Threshold < Orb::BaseModel + # The value at which an alert will fire. For credit balance alerts, the alert will + # fire at or below this value. For usage and cost alerts, the alert will fire at + # or above this value. sig { returns(Float) } def value end @@ -45,6 +49,8 @@ module Orb def value=(_) end + # Thresholds are used to define the conditions under which an alert will be + # triggered. sig { params(value: Float).returns(T.attached_class) } def self.new(value:) end diff --git a/rbi/lib/orb/models/amount_discount.rbi b/rbi/lib/orb/models/amount_discount.rbi index a875c090..b5700c1f 100644 --- a/rbi/lib/orb/models/amount_discount.rbi +++ b/rbi/lib/orb/models/amount_discount.rbi @@ -3,6 +3,7 @@ module Orb module Models class AmountDiscount < Orb::BaseModel + # Only available if discount_type is `amount`. sig { returns(String) } def amount_discount end @@ -11,6 +12,8 @@ module Orb def amount_discount=(_) end + # List of price_ids that this discount applies to. For plan/plan phase discounts, + # this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end diff --git a/rbi/lib/orb/models/billable_metric.rbi b/rbi/lib/orb/models/billable_metric.rbi index 080986a6..7f2c4081 100644 --- a/rbi/lib/orb/models/billable_metric.rbi +++ b/rbi/lib/orb/models/billable_metric.rbi @@ -19,6 +19,9 @@ module Orb def description=(_) end + # 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. sig { returns(Orb::Models::Item) } def item end @@ -27,6 +30,10 @@ module Orb def item=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -51,6 +58,9 @@ module Orb def status=(_) end + # 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. sig do params( id: String, diff --git a/rbi/lib/orb/models/coupon.rbi b/rbi/lib/orb/models/coupon.rbi index a236737f..9c2ac092 100644 --- a/rbi/lib/orb/models/coupon.rbi +++ b/rbi/lib/orb/models/coupon.rbi @@ -3,6 +3,7 @@ module Orb module Models class Coupon < Orb::BaseModel + # Also referred to as coupon_id in this documentation. sig { returns(String) } def id end @@ -11,6 +12,8 @@ module Orb def id=(_) end + # An archived coupon can no longer be redeemed. Active coupons will have a value + # of null for `archived_at`; this field will be non-null for archived coupons. sig { returns(T.nilable(Time)) } def archived_at end @@ -30,6 +33,8 @@ module Orb def discount=(_) end + # This allows for a coupon's discount to apply for a limited time (determined in + # months); a `null` value here means "unlimited time". sig { returns(T.nilable(Integer)) } def duration_in_months end @@ -38,6 +43,8 @@ module Orb def duration_in_months=(_) end + # The maximum number of redemptions allowed for this coupon before it is + # exhausted; `null` here means "unlimited". sig { returns(T.nilable(Integer)) } def max_redemptions end @@ -46,6 +53,7 @@ module Orb def max_redemptions=(_) end + # This string can be used to redeem this coupon for a given subscription. sig { returns(String) } def redemption_code end @@ -54,6 +62,7 @@ module Orb def redemption_code=(_) end + # The number of times this coupon has been redeemed. sig { returns(Integer) } def times_redeemed end @@ -62,6 +71,11 @@ module Orb def times_redeemed=(_) end + # A coupon represents a reusable discount configuration that can be applied either + # as a fixed or percentage amount to an invoice or subscription. Coupons are + # activated using a redemption code, which applies the discount to a subscription + # or invoice. The duration of a coupon determines how long it remains available + # for use by end users. sig do params( id: String, @@ -98,8 +112,8 @@ module Orb abstract! class << self - sig { override.returns([[Symbol, Orb::Models::PercentageDiscount], [Symbol, Orb::Models::AmountDiscount]]) } - private def variants + sig { override.returns([Orb::Models::PercentageDiscount, Orb::Models::AmountDiscount]) } + def variants end end end diff --git a/rbi/lib/orb/models/coupon_create_params.rbi b/rbi/lib/orb/models/coupon_create_params.rbi index 38a726f1..4178fc40 100644 --- a/rbi/lib/orb/models/coupon_create_params.rbi +++ b/rbi/lib/orb/models/coupon_create_params.rbi @@ -34,6 +34,7 @@ module Orb def discount=(_) end + # This string can be used to redeem this coupon for a given subscription. sig { returns(String) } def redemption_code end @@ -42,6 +43,8 @@ module Orb def redemption_code=(_) end + # This allows for a coupon's discount to apply for a limited time (determined in + # months); a `null` value here means "unlimited time". sig { returns(T.nilable(Integer)) } def duration_in_months end @@ -50,6 +53,8 @@ module Orb def duration_in_months=(_) end + # The maximum number of redemptions allowed for this coupon before it is + # exhausted;`null` here means "unlimited". sig { returns(T.nilable(Integer)) } def max_redemptions end @@ -151,10 +156,10 @@ module Orb sig do override .returns( - [[Symbol, Orb::Models::CouponCreateParams::Discount::NewCouponPercentageDiscount], [Symbol, Orb::Models::CouponCreateParams::Discount::NewCouponAmountDiscount]] + [Orb::Models::CouponCreateParams::Discount::NewCouponPercentageDiscount, Orb::Models::CouponCreateParams::Discount::NewCouponAmountDiscount] ) end - private def variants + def variants end end end diff --git a/rbi/lib/orb/models/coupon_list_params.rbi b/rbi/lib/orb/models/coupon_list_params.rbi index 62fa423d..11e39568 100644 --- a/rbi/lib/orb/models/coupon_list_params.rbi +++ b/rbi/lib/orb/models/coupon_list_params.rbi @@ -6,6 +6,8 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters + # Cursor for pagination. This can be populated by the `next_cursor` value returned + # from the initial request. sig { returns(T.nilable(String)) } def cursor end @@ -14,6 +16,7 @@ module Orb def cursor=(_) end + # The number of items to fetch. Defaults to 20. sig { returns(T.nilable(Integer)) } def limit end @@ -22,6 +25,7 @@ module Orb def limit=(_) end + # Filter to coupons matching this redemption code. sig { returns(T.nilable(String)) } def redemption_code end @@ -30,6 +34,8 @@ module Orb def redemption_code=(_) end + # Show archived coupons as well (by default, this endpoint only returns active + # coupons). sig { returns(T.nilable(T::Boolean)) } def show_archived end diff --git a/rbi/lib/orb/models/coupons/subscription_list_params.rbi b/rbi/lib/orb/models/coupons/subscription_list_params.rbi index f8d8bd56..c389a6b4 100644 --- a/rbi/lib/orb/models/coupons/subscription_list_params.rbi +++ b/rbi/lib/orb/models/coupons/subscription_list_params.rbi @@ -7,6 +7,8 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters + # Cursor for pagination. This can be populated by the `next_cursor` value returned + # from the initial request. sig { returns(T.nilable(String)) } def cursor end @@ -15,6 +17,7 @@ module Orb def cursor=(_) end + # The number of items to fetch. Defaults to 20. sig { returns(T.nilable(Integer)) } def limit end diff --git a/rbi/lib/orb/models/credit_note.rbi b/rbi/lib/orb/models/credit_note.rbi index 0c88e024..b009af67 100644 --- a/rbi/lib/orb/models/credit_note.rbi +++ b/rbi/lib/orb/models/credit_note.rbi @@ -3,6 +3,7 @@ module Orb module Models class CreditNote < Orb::BaseModel + # The Orb id of this credit note. sig { returns(String) } def id end @@ -11,6 +12,7 @@ module Orb def id=(_) end + # The creation time of the resource in Orb. sig { returns(Time) } def created_at end @@ -19,6 +21,7 @@ module Orb def created_at=(_) end + # The unique identifier for credit notes. sig { returns(String) } def credit_note_number end @@ -27,6 +30,7 @@ module Orb def credit_note_number=(_) end + # A URL to a PDF of the credit note. sig { returns(T.nilable(String)) } def credit_note_pdf end @@ -43,6 +47,7 @@ module Orb def customer=(_) end + # The id of the invoice resource that this credit note is applied to. sig { returns(String) } def invoice_id end @@ -51,6 +56,7 @@ module Orb def invoice_id=(_) end + # All of the line items associated with this credit note. sig { returns(T::Array[Orb::Models::CreditNote::LineItem]) } def line_items end @@ -61,6 +67,7 @@ module Orb def line_items=(_) end + # The maximum amount applied on the original invoice sig { returns(T.nilable(Orb::Models::CreditNote::MaximumAmountAdjustment)) } def maximum_amount_adjustment end @@ -72,6 +79,7 @@ module Orb def maximum_amount_adjustment=(_) end + # An optional memo supplied on the credit note. sig { returns(T.nilable(String)) } def memo end @@ -80,6 +88,7 @@ module Orb def memo=(_) end + # Any credited amount from the applied minimum on the invoice. sig { returns(T.nilable(String)) } def minimum_amount_refunded end @@ -96,6 +105,7 @@ module Orb def reason=(_) end + # The total prior to any creditable invoice-level discounts or minimums. sig { returns(String) } def subtotal end @@ -104,6 +114,7 @@ module Orb def subtotal=(_) end + # The total including creditable invoice-level discounts or minimums, and tax. sig { returns(String) } def total end @@ -120,6 +131,7 @@ module Orb def type=(_) end + # The time at which the credit note was voided in Orb, if applicable. sig { returns(T.nilable(Time)) } def voided_at end @@ -128,6 +140,7 @@ module Orb def voided_at=(_) end + # Any discounts applied on the original invoice. sig { returns(T.nilable(T::Array[Orb::Models::CreditNote::Discount])) } def discounts end @@ -138,6 +151,8 @@ module Orb def discounts=(_) end + # The [Credit Note](/invoicing/credit-notes) resource represents a credit that has + # been applied to a particular invoice. sig do params( id: String, @@ -232,6 +247,7 @@ module Orb end class LineItem < Orb::BaseModel + # The Orb id of this resource. sig { returns(String) } def id end @@ -240,6 +256,7 @@ module Orb def id=(_) end + # The amount of the line item, including any line item minimums and discounts. sig { returns(String) } def amount end @@ -248,6 +265,7 @@ module Orb def amount=(_) end + # The id of the item associated with this line item. sig { returns(String) } def item_id end @@ -256,6 +274,7 @@ module Orb def item_id=(_) end + # The name of the corresponding invoice line item. sig { returns(String) } def name end @@ -264,6 +283,7 @@ module Orb def name=(_) end + # An optional quantity credited. sig { returns(T.nilable(Float)) } def quantity end @@ -272,6 +292,7 @@ module Orb def quantity=(_) end + # The amount of the line item, excluding any line item minimums and discounts. sig { returns(String) } def subtotal end @@ -280,6 +301,7 @@ module Orb def subtotal=(_) end + # Any tax amounts applied onto the line item. sig { returns(T::Array[Orb::Models::CreditNote::LineItem::TaxAmount]) } def tax_amounts end @@ -291,6 +313,7 @@ module Orb def tax_amounts=(_) end + # Any line item discounts from the invoice's line item. sig { returns(T.nilable(T::Array[Orb::Models::CreditNote::LineItem::Discount])) } def discounts end @@ -337,6 +360,7 @@ module Orb end class TaxAmount < Orb::BaseModel + # The amount of additional tax incurred by this tax rate. sig { returns(String) } def amount end @@ -345,6 +369,7 @@ module Orb def amount=(_) end + # The human-readable description of the applied tax rate. sig { returns(String) } def tax_rate_description end @@ -353,6 +378,7 @@ module Orb def tax_rate_description=(_) end + # The tax rate percentage, out of 100. sig { returns(T.nilable(String)) } def tax_rate_percentage end @@ -537,6 +563,7 @@ module Orb def reason=(_) end + # The maximum amount applied on the original invoice sig do params( amount_applied: String, diff --git a/rbi/lib/orb/models/credit_note_create_params.rbi b/rbi/lib/orb/models/credit_note_create_params.rbi index 33e90fd4..1d37474a 100644 --- a/rbi/lib/orb/models/credit_note_create_params.rbi +++ b/rbi/lib/orb/models/credit_note_create_params.rbi @@ -17,6 +17,7 @@ module Orb def line_items=(_) end + # An optional memo to attach to the credit note. sig { returns(T.nilable(String)) } def memo end @@ -25,6 +26,7 @@ module Orb def memo=(_) end + # An optional reason for the credit note. sig { returns(T.nilable(Symbol)) } def reason end @@ -60,6 +62,7 @@ module Orb end class LineItem < Orb::BaseModel + # The total amount in the invoice's currency to credit this line item. sig { returns(String) } def amount end @@ -68,6 +71,7 @@ module Orb def amount=(_) end + # The ID of the line item to credit. sig { returns(String) } def invoice_line_item_id end @@ -85,6 +89,7 @@ module Orb end end + # An optional reason for the credit note. class Reason < Orb::Enum abstract! diff --git a/rbi/lib/orb/models/credit_note_list_params.rbi b/rbi/lib/orb/models/credit_note_list_params.rbi index 356f93c7..7162c98d 100644 --- a/rbi/lib/orb/models/credit_note_list_params.rbi +++ b/rbi/lib/orb/models/credit_note_list_params.rbi @@ -6,6 +6,40 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters + sig { returns(T.nilable(Time)) } + def created_at_gt + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def created_at_gt=(_) + end + + sig { returns(T.nilable(Time)) } + def created_at_gte + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def created_at_gte=(_) + end + + sig { returns(T.nilable(Time)) } + def created_at_lt + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def created_at_lt=(_) + end + + sig { returns(T.nilable(Time)) } + def created_at_lte + end + + sig { params(_: T.nilable(Time)).returns(T.nilable(Time)) } + def created_at_lte=(_) + end + + # Cursor for pagination. This can be populated by the `next_cursor` value returned + # from the initial request. sig { returns(T.nilable(String)) } def cursor end @@ -14,6 +48,7 @@ module Orb def cursor=(_) end + # The number of items to fetch. Defaults to 20. sig { returns(T.nilable(Integer)) } def limit end @@ -24,17 +59,40 @@ module Orb sig do params( + created_at_gt: T.nilable(Time), + created_at_gte: T.nilable(Time), + created_at_lt: T.nilable(Time), + created_at_lte: T.nilable(Time), cursor: T.nilable(String), limit: Integer, request_options: T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything]) ) .returns(T.attached_class) end - def self.new(cursor: nil, limit: nil, request_options: {}) + def self.new( + created_at_gt: nil, + created_at_gte: nil, + created_at_lt: nil, + created_at_lte: nil, + cursor: nil, + limit: nil, + request_options: {} + ) end sig do - override.returns({cursor: T.nilable(String), limit: Integer, request_options: Orb::RequestOptions}) + override + .returns( + { + created_at_gt: T.nilable(Time), + created_at_gte: T.nilable(Time), + created_at_lt: T.nilable(Time), + created_at_lte: T.nilable(Time), + cursor: T.nilable(String), + limit: Integer, + request_options: Orb::RequestOptions + } + ) end def to_hash end diff --git a/rbi/lib/orb/models/customer.rbi b/rbi/lib/orb/models/customer.rbi index 7f8703a7..3211538e 100644 --- a/rbi/lib/orb/models/customer.rbi +++ b/rbi/lib/orb/models/customer.rbi @@ -27,6 +27,7 @@ module Orb def auto_collection=(_) end + # The customer's current balance in their currency. sig { returns(String) } def balance end @@ -62,6 +63,9 @@ module Orb def currency=(_) end + # A valid customer email, to be used for notifications. When Orb triggers payment + # through a payment gateway, this email will be used for any automatically issued + # receipts. sig { returns(String) } def email end @@ -86,6 +90,9 @@ module Orb def exempt_from_automated_tax=(_) end + # An optional user-defined ID for this customer resource, used throughout the + # system as an alias for this Customer. Use this field to identify a customer by + # an existing identifier in your system. sig { returns(T.nilable(String)) } def external_customer_id end @@ -94,6 +101,7 @@ module Orb def external_customer_id=(_) end + # The hierarchical relationships for this customer. sig { returns(Orb::Models::Customer::Hierarchy) } def hierarchy end @@ -102,6 +110,10 @@ module Orb def hierarchy=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -110,6 +122,7 @@ module Orb def metadata=(_) end + # The full name of the customer sig { returns(String) } def name end @@ -118,6 +131,9 @@ module Orb def name=(_) end + # This is used for creating charges or invoices in an external system via Orb. + # When not in test mode, the connection must first be configured in the Orb + # webapp. sig { returns(T.nilable(Symbol)) } def payment_provider end @@ -126,6 +142,8 @@ module Orb def payment_provider=(_) end + # The ID of this customer in an external payments solution, such as Stripe. This + # is used for creating charges or invoices in the external system via Orb. sig { returns(T.nilable(String)) } def payment_provider_id end @@ -153,6 +171,111 @@ module Orb def shipping_address=(_) end + # Tax IDs are commonly required to be displayed on customer invoices, which are + # added to the headers of invoices. + # + # ### Supported Tax ID Countries and Types + # + # | Country | Type | Description | + # | -------------------- | ------------ | ------------------------------------------------------------------------------------------------------- | + # | Andorra | `ad_nrt` | Andorran NRT Number | + # | Argentina | `ar_cuit` | Argentinian Tax ID Number | + # | Australia | `au_abn` | Australian Business Number (AU ABN) | + # | Australia | `au_arn` | Australian Taxation Office Reference Number | + # | Austria | `eu_vat` | European VAT Number | + # | Bahrain | `bh_vat` | Bahraini VAT Number | + # | Belgium | `eu_vat` | European VAT Number | + # | Bolivia | `bo_tin` | Bolivian Tax ID | + # | Brazil | `br_cnpj` | Brazilian CNPJ Number | + # | Brazil | `br_cpf` | Brazilian CPF Number | + # | Bulgaria | `bg_uic` | Bulgaria Unified Identification Code | + # | Bulgaria | `eu_vat` | European VAT Number | + # | Canada | `ca_bn` | Canadian BN | + # | Canada | `ca_gst_hst` | Canadian GST/HST Number | + # | Canada | `ca_pst_bc` | Canadian PST Number (British Columbia) | + # | Canada | `ca_pst_mb` | Canadian PST Number (Manitoba) | + # | Canada | `ca_pst_sk` | Canadian PST Number (Saskatchewan) | + # | Canada | `ca_qst` | Canadian QST Number (Québec) | + # | Chile | `cl_tin` | Chilean TIN | + # | China | `cn_tin` | Chinese Tax ID | + # | Colombia | `co_nit` | Colombian NIT Number | + # | Costa Rica | `cr_tin` | Costa Rican Tax ID | + # | Croatia | `eu_vat` | European VAT Number | + # | Cyprus | `eu_vat` | European VAT Number | + # | Czech Republic | `eu_vat` | European VAT Number | + # | Denmark | `eu_vat` | European VAT Number | + # | Dominican Republic | `do_rcn` | Dominican RCN Number | + # | Ecuador | `ec_ruc` | Ecuadorian RUC Number | + # | Egypt | `eg_tin` | Egyptian Tax Identification Number | + # | El Salvador | `sv_nit` | El Salvadorian NIT Number | + # | Estonia | `eu_vat` | European VAT Number | + # | EU | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Finland | `eu_vat` | European VAT Number | + # | France | `eu_vat` | European VAT Number | + # | Georgia | `ge_vat` | Georgian VAT | + # | Germany | `eu_vat` | European VAT Number | + # | Greece | `eu_vat` | European VAT Number | + # | Hong Kong | `hk_br` | Hong Kong BR Number | + # | Hungary | `eu_vat` | European VAT Number | + # | Hungary | `hu_tin` | Hungary Tax Number (adószám) | + # | Iceland | `is_vat` | Icelandic VAT | + # | India | `in_gst` | Indian GST Number | + # | Indonesia | `id_npwp` | Indonesian NPWP Number | + # | Ireland | `eu_vat` | European VAT Number | + # | Israel | `il_vat` | Israel VAT | + # | Italy | `eu_vat` | European VAT Number | + # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | + # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | + # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | + # | Kazakhstan | `kz_bin` | Kazakhstani Business Identification Number | + # | Kenya | `ke_pin` | Kenya Revenue Authority Personal Identification Number | + # | Latvia | `eu_vat` | European VAT Number | + # | Liechtenstein | `li_uid` | Liechtensteinian UID Number | + # | Lithuania | `eu_vat` | European VAT Number | + # | Luxembourg | `eu_vat` | European VAT Number | + # | Malaysia | `my_frp` | Malaysian FRP Number | + # | Malaysia | `my_itn` | Malaysian ITN | + # | Malaysia | `my_sst` | Malaysian SST Number | + # | Malta | `eu_vat ` | European VAT Number | + # | Mexico | `mx_rfc` | Mexican RFC Number | + # | Netherlands | `eu_vat` | European VAT Number | + # | New Zealand | `nz_gst` | New Zealand GST Number | + # | Nigeria | `ng_tin` | Nigerian Tax Identification Number | + # | Norway | `no_vat` | Norwegian VAT Number | + # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | + # | Oman | `om_vat` | Omani VAT Number | + # | Peru | `pe_ruc` | Peruvian RUC Number | + # | Philippines | `ph_tin ` | Philippines Tax Identification Number | + # | Poland | `eu_vat` | European VAT Number | + # | Portugal | `eu_vat` | European VAT Number | + # | Romania | `eu_vat` | European VAT Number | + # | Romania | `ro_tin` | Romanian Tax ID Number | + # | Russia | `ru_inn` | Russian INN | + # | Russia | `ru_kpp` | Russian KPP | + # | Saudi Arabia | `sa_vat` | Saudi Arabia VAT | + # | Serbia | `rs_pib` | Serbian PIB Number | + # | Singapore | `sg_gst` | Singaporean GST | + # | Singapore | `sg_uen` | Singaporean UEN | + # | Slovakia | `eu_vat` | European VAT Number | + # | Slovenia | `eu_vat` | European VAT Number | + # | Slovenia | `si_tin` | Slovenia Tax Number (davčna številka) | + # | South Africa | `za_vat` | South African VAT Number | + # | South Korea | `kr_brn` | Korean BRN | + # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | + # | Spain | `eu_vat` | European VAT Number | + # | Sweden | `eu_vat` | European VAT Number | + # | Switzerland | `ch_vat` | Switzerland VAT Number | + # | Taiwan | `tw_vat` | Taiwanese VAT | + # | Thailand | `th_vat` | Thai VAT | + # | Turkey | `tr_tin` | Turkish Tax Identification Number | + # | Ukraine | `ua_vat` | Ukrainian VAT | + # | United Arab Emirates | `ae_trn` | United Arab Emirates TRN | + # | United Kingdom | `eu_vat` | Northern Ireland VAT Number | + # | United Kingdom | `gb_vat` | United Kingdom VAT Number | + # | United States | `us_ein` | United States EIN | + # | Uruguay | `uy_ruc` | Uruguayan RUC Number | + # | Venezuela | `ve_rif` | Venezuelan RIF Number | + # | Vietnam | `vn_tin` | Vietnamese Tax ID Number | sig { returns(T.nilable(Orb::Models::Customer::TaxID)) } def tax_id end @@ -161,6 +284,9 @@ module Orb def tax_id=(_) end + # A timezone identifier from the IANA timezone database, such as + # "America/Los_Angeles". This "defaults to your account's timezone if not set. + # This cannot be changed after customer creation. sig { returns(String) } def timezone end @@ -191,6 +317,24 @@ module Orb def reporting_configuration=(_) end + # A customer is a buyer of your products, and the other party to the billing + # relationship. + # + # In Orb, customers are assigned system generated identifiers automatically, but + # it's often desirable to have these match existing identifiers in your system. To + # avoid having to denormalize Orb ID information, you can pass in an + # `external_customer_id` with your own identifier. See + # [Customer ID Aliases](/events-and-metrics/customer-aliases) for further + # information about how these aliases work in Orb. + # + # In addition to having an identifier in your system, a customer may exist in a + # payment provider solution like Stripe. Use the `payment_provider_id` and the + # `payment_provider` enum field to express this mapping. + # + # A customer also has a timezone (from the standard + # [IANA timezone database](https://www.iana.org/time-zones)), which defaults to + # your account's timezone. See [Timezone localization](/essentials/timezones) for + # information on what this timezone parameter influences within Orb. sig do params( id: String, @@ -379,6 +523,7 @@ module Orb def parent=(_) end + # The hierarchical relationships for this customer. sig do params( children: T::Array[Orb::Models::Customer::Hierarchy::Child], @@ -454,6 +599,9 @@ module Orb end end + # This is used for creating charges or invoices in an external system via Orb. + # When not in test mode, the connection must first be configured in the Orb + # webapp. class PaymentProvider < Orb::Enum abstract! @@ -575,6 +723,111 @@ module Orb def value=(_) end + # Tax IDs are commonly required to be displayed on customer invoices, which are + # added to the headers of invoices. + # + # ### Supported Tax ID Countries and Types + # + # | Country | Type | Description | + # | -------------------- | ------------ | ------------------------------------------------------------------------------------------------------- | + # | Andorra | `ad_nrt` | Andorran NRT Number | + # | Argentina | `ar_cuit` | Argentinian Tax ID Number | + # | Australia | `au_abn` | Australian Business Number (AU ABN) | + # | Australia | `au_arn` | Australian Taxation Office Reference Number | + # | Austria | `eu_vat` | European VAT Number | + # | Bahrain | `bh_vat` | Bahraini VAT Number | + # | Belgium | `eu_vat` | European VAT Number | + # | Bolivia | `bo_tin` | Bolivian Tax ID | + # | Brazil | `br_cnpj` | Brazilian CNPJ Number | + # | Brazil | `br_cpf` | Brazilian CPF Number | + # | Bulgaria | `bg_uic` | Bulgaria Unified Identification Code | + # | Bulgaria | `eu_vat` | European VAT Number | + # | Canada | `ca_bn` | Canadian BN | + # | Canada | `ca_gst_hst` | Canadian GST/HST Number | + # | Canada | `ca_pst_bc` | Canadian PST Number (British Columbia) | + # | Canada | `ca_pst_mb` | Canadian PST Number (Manitoba) | + # | Canada | `ca_pst_sk` | Canadian PST Number (Saskatchewan) | + # | Canada | `ca_qst` | Canadian QST Number (Québec) | + # | Chile | `cl_tin` | Chilean TIN | + # | China | `cn_tin` | Chinese Tax ID | + # | Colombia | `co_nit` | Colombian NIT Number | + # | Costa Rica | `cr_tin` | Costa Rican Tax ID | + # | Croatia | `eu_vat` | European VAT Number | + # | Cyprus | `eu_vat` | European VAT Number | + # | Czech Republic | `eu_vat` | European VAT Number | + # | Denmark | `eu_vat` | European VAT Number | + # | Dominican Republic | `do_rcn` | Dominican RCN Number | + # | Ecuador | `ec_ruc` | Ecuadorian RUC Number | + # | Egypt | `eg_tin` | Egyptian Tax Identification Number | + # | El Salvador | `sv_nit` | El Salvadorian NIT Number | + # | Estonia | `eu_vat` | European VAT Number | + # | EU | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Finland | `eu_vat` | European VAT Number | + # | France | `eu_vat` | European VAT Number | + # | Georgia | `ge_vat` | Georgian VAT | + # | Germany | `eu_vat` | European VAT Number | + # | Greece | `eu_vat` | European VAT Number | + # | Hong Kong | `hk_br` | Hong Kong BR Number | + # | Hungary | `eu_vat` | European VAT Number | + # | Hungary | `hu_tin` | Hungary Tax Number (adószám) | + # | Iceland | `is_vat` | Icelandic VAT | + # | India | `in_gst` | Indian GST Number | + # | Indonesia | `id_npwp` | Indonesian NPWP Number | + # | Ireland | `eu_vat` | European VAT Number | + # | Israel | `il_vat` | Israel VAT | + # | Italy | `eu_vat` | European VAT Number | + # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | + # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | + # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | + # | Kazakhstan | `kz_bin` | Kazakhstani Business Identification Number | + # | Kenya | `ke_pin` | Kenya Revenue Authority Personal Identification Number | + # | Latvia | `eu_vat` | European VAT Number | + # | Liechtenstein | `li_uid` | Liechtensteinian UID Number | + # | Lithuania | `eu_vat` | European VAT Number | + # | Luxembourg | `eu_vat` | European VAT Number | + # | Malaysia | `my_frp` | Malaysian FRP Number | + # | Malaysia | `my_itn` | Malaysian ITN | + # | Malaysia | `my_sst` | Malaysian SST Number | + # | Malta | `eu_vat ` | European VAT Number | + # | Mexico | `mx_rfc` | Mexican RFC Number | + # | Netherlands | `eu_vat` | European VAT Number | + # | New Zealand | `nz_gst` | New Zealand GST Number | + # | Nigeria | `ng_tin` | Nigerian Tax Identification Number | + # | Norway | `no_vat` | Norwegian VAT Number | + # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | + # | Oman | `om_vat` | Omani VAT Number | + # | Peru | `pe_ruc` | Peruvian RUC Number | + # | Philippines | `ph_tin ` | Philippines Tax Identification Number | + # | Poland | `eu_vat` | European VAT Number | + # | Portugal | `eu_vat` | European VAT Number | + # | Romania | `eu_vat` | European VAT Number | + # | Romania | `ro_tin` | Romanian Tax ID Number | + # | Russia | `ru_inn` | Russian INN | + # | Russia | `ru_kpp` | Russian KPP | + # | Saudi Arabia | `sa_vat` | Saudi Arabia VAT | + # | Serbia | `rs_pib` | Serbian PIB Number | + # | Singapore | `sg_gst` | Singaporean GST | + # | Singapore | `sg_uen` | Singaporean UEN | + # | Slovakia | `eu_vat` | European VAT Number | + # | Slovenia | `eu_vat` | European VAT Number | + # | Slovenia | `si_tin` | Slovenia Tax Number (davčna številka) | + # | South Africa | `za_vat` | South African VAT Number | + # | South Korea | `kr_brn` | Korean BRN | + # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | + # | Spain | `eu_vat` | European VAT Number | + # | Sweden | `eu_vat` | European VAT Number | + # | Switzerland | `ch_vat` | Switzerland VAT Number | + # | Taiwan | `tw_vat` | Taiwanese VAT | + # | Thailand | `th_vat` | Thai VAT | + # | Turkey | `tr_tin` | Turkish Tax Identification Number | + # | Ukraine | `ua_vat` | Ukrainian VAT | + # | United Arab Emirates | `ae_trn` | United Arab Emirates TRN | + # | United Kingdom | `eu_vat` | Northern Ireland VAT Number | + # | United Kingdom | `gb_vat` | United Kingdom VAT Number | + # | United States | `us_ein` | United States EIN | + # | Uruguay | `uy_ruc` | Uruguayan RUC Number | + # | Venezuela | `ve_rif` | Venezuelan RIF Number | + # | Vietnam | `vn_tin` | Vietnamese Tax ID Number | sig { params(country: Symbol, type: Symbol, value: String).returns(T.attached_class) } def self.new(country:, type:, value:) end diff --git a/rbi/lib/orb/models/customer_create_params.rbi b/rbi/lib/orb/models/customer_create_params.rbi index 5150f5ce..99fdf28e 100644 --- a/rbi/lib/orb/models/customer_create_params.rbi +++ b/rbi/lib/orb/models/customer_create_params.rbi @@ -6,6 +6,9 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters + # A valid customer email, to be used for notifications. When Orb triggers payment + # through a payment gateway, this email will be used for any automatically issued + # receipts. sig { returns(String) } def email end @@ -14,6 +17,7 @@ module Orb def email=(_) end + # The full name of the customer sig { returns(String) } def name end @@ -33,6 +37,8 @@ module Orb def accounting_sync_configuration=(_) end + # Additional email addresses for this customer. If populated, these email + # addresses will be CC'd for customer communications. sig { returns(T.nilable(T::Array[String])) } def additional_emails end @@ -41,6 +47,9 @@ module Orb def additional_emails=(_) end + # Used to determine if invoices for this customer will automatically attempt to + # charge a saved payment method, if available. This parameter defaults to `True` + # when a payment provider is provided on customer creation. sig { returns(T.nilable(T::Boolean)) } def auto_collection end @@ -60,6 +69,8 @@ module Orb def billing_address=(_) end + # An ISO 4217 currency string used for the customer's invoices and balance. If not + # set at creation time, will be set at subscription creation time. sig { returns(T.nilable(String)) } def currency end @@ -76,6 +87,9 @@ module Orb def email_delivery=(_) end + # An optional user-defined ID for this customer resource, used throughout the + # system as an alias for this Customer. Use this field to identify a customer by + # an existing identifier in your system. sig { returns(T.nilable(String)) } def external_customer_id end @@ -84,6 +98,7 @@ module Orb def external_customer_id=(_) end + # The hierarchical relationships for this customer. sig { returns(T.nilable(Orb::Models::CustomerCreateParams::Hierarchy)) } def hierarchy end @@ -95,6 +110,9 @@ module Orb def hierarchy=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -106,6 +124,9 @@ module Orb def metadata=(_) end + # This is used for creating charges or invoices in an external system via Orb. + # When not in test mode, the connection must first be configured in the Orb + # webapp. sig { returns(T.nilable(Symbol)) } def payment_provider end @@ -114,6 +135,8 @@ module Orb def payment_provider=(_) end + # The ID of this customer in an external payments solution, such as Stripe. This + # is used for creating charges or invoices in the external system via Orb. sig { returns(T.nilable(String)) } def payment_provider_id end @@ -178,6 +201,111 @@ module Orb def tax_configuration=(_) end + # Tax IDs are commonly required to be displayed on customer invoices, which are + # added to the headers of invoices. + # + # ### Supported Tax ID Countries and Types + # + # | Country | Type | Description | + # | -------------------- | ------------ | ------------------------------------------------------------------------------------------------------- | + # | Andorra | `ad_nrt` | Andorran NRT Number | + # | Argentina | `ar_cuit` | Argentinian Tax ID Number | + # | Australia | `au_abn` | Australian Business Number (AU ABN) | + # | Australia | `au_arn` | Australian Taxation Office Reference Number | + # | Austria | `eu_vat` | European VAT Number | + # | Bahrain | `bh_vat` | Bahraini VAT Number | + # | Belgium | `eu_vat` | European VAT Number | + # | Bolivia | `bo_tin` | Bolivian Tax ID | + # | Brazil | `br_cnpj` | Brazilian CNPJ Number | + # | Brazil | `br_cpf` | Brazilian CPF Number | + # | Bulgaria | `bg_uic` | Bulgaria Unified Identification Code | + # | Bulgaria | `eu_vat` | European VAT Number | + # | Canada | `ca_bn` | Canadian BN | + # | Canada | `ca_gst_hst` | Canadian GST/HST Number | + # | Canada | `ca_pst_bc` | Canadian PST Number (British Columbia) | + # | Canada | `ca_pst_mb` | Canadian PST Number (Manitoba) | + # | Canada | `ca_pst_sk` | Canadian PST Number (Saskatchewan) | + # | Canada | `ca_qst` | Canadian QST Number (Québec) | + # | Chile | `cl_tin` | Chilean TIN | + # | China | `cn_tin` | Chinese Tax ID | + # | Colombia | `co_nit` | Colombian NIT Number | + # | Costa Rica | `cr_tin` | Costa Rican Tax ID | + # | Croatia | `eu_vat` | European VAT Number | + # | Cyprus | `eu_vat` | European VAT Number | + # | Czech Republic | `eu_vat` | European VAT Number | + # | Denmark | `eu_vat` | European VAT Number | + # | Dominican Republic | `do_rcn` | Dominican RCN Number | + # | Ecuador | `ec_ruc` | Ecuadorian RUC Number | + # | Egypt | `eg_tin` | Egyptian Tax Identification Number | + # | El Salvador | `sv_nit` | El Salvadorian NIT Number | + # | Estonia | `eu_vat` | European VAT Number | + # | EU | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Finland | `eu_vat` | European VAT Number | + # | France | `eu_vat` | European VAT Number | + # | Georgia | `ge_vat` | Georgian VAT | + # | Germany | `eu_vat` | European VAT Number | + # | Greece | `eu_vat` | European VAT Number | + # | Hong Kong | `hk_br` | Hong Kong BR Number | + # | Hungary | `eu_vat` | European VAT Number | + # | Hungary | `hu_tin` | Hungary Tax Number (adószám) | + # | Iceland | `is_vat` | Icelandic VAT | + # | India | `in_gst` | Indian GST Number | + # | Indonesia | `id_npwp` | Indonesian NPWP Number | + # | Ireland | `eu_vat` | European VAT Number | + # | Israel | `il_vat` | Israel VAT | + # | Italy | `eu_vat` | European VAT Number | + # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | + # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | + # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | + # | Kazakhstan | `kz_bin` | Kazakhstani Business Identification Number | + # | Kenya | `ke_pin` | Kenya Revenue Authority Personal Identification Number | + # | Latvia | `eu_vat` | European VAT Number | + # | Liechtenstein | `li_uid` | Liechtensteinian UID Number | + # | Lithuania | `eu_vat` | European VAT Number | + # | Luxembourg | `eu_vat` | European VAT Number | + # | Malaysia | `my_frp` | Malaysian FRP Number | + # | Malaysia | `my_itn` | Malaysian ITN | + # | Malaysia | `my_sst` | Malaysian SST Number | + # | Malta | `eu_vat ` | European VAT Number | + # | Mexico | `mx_rfc` | Mexican RFC Number | + # | Netherlands | `eu_vat` | European VAT Number | + # | New Zealand | `nz_gst` | New Zealand GST Number | + # | Nigeria | `ng_tin` | Nigerian Tax Identification Number | + # | Norway | `no_vat` | Norwegian VAT Number | + # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | + # | Oman | `om_vat` | Omani VAT Number | + # | Peru | `pe_ruc` | Peruvian RUC Number | + # | Philippines | `ph_tin ` | Philippines Tax Identification Number | + # | Poland | `eu_vat` | European VAT Number | + # | Portugal | `eu_vat` | European VAT Number | + # | Romania | `eu_vat` | European VAT Number | + # | Romania | `ro_tin` | Romanian Tax ID Number | + # | Russia | `ru_inn` | Russian INN | + # | Russia | `ru_kpp` | Russian KPP | + # | Saudi Arabia | `sa_vat` | Saudi Arabia VAT | + # | Serbia | `rs_pib` | Serbian PIB Number | + # | Singapore | `sg_gst` | Singaporean GST | + # | Singapore | `sg_uen` | Singaporean UEN | + # | Slovakia | `eu_vat` | European VAT Number | + # | Slovenia | `eu_vat` | European VAT Number | + # | Slovenia | `si_tin` | Slovenia Tax Number (davčna številka) | + # | South Africa | `za_vat` | South African VAT Number | + # | South Korea | `kr_brn` | Korean BRN | + # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | + # | Spain | `eu_vat` | European VAT Number | + # | Sweden | `eu_vat` | European VAT Number | + # | Switzerland | `ch_vat` | Switzerland VAT Number | + # | Taiwan | `tw_vat` | Taiwanese VAT | + # | Thailand | `th_vat` | Thai VAT | + # | Turkey | `tr_tin` | Turkish Tax Identification Number | + # | Ukraine | `ua_vat` | Ukrainian VAT | + # | United Arab Emirates | `ae_trn` | United Arab Emirates TRN | + # | United Kingdom | `eu_vat` | Northern Ireland VAT Number | + # | United Kingdom | `gb_vat` | United Kingdom VAT Number | + # | United States | `us_ein` | United States EIN | + # | Uruguay | `uy_ruc` | Uruguayan RUC Number | + # | Venezuela | `ve_rif` | Venezuelan RIF Number | + # | Vietnam | `vn_tin` | Vietnamese Tax ID Number | sig { returns(T.nilable(Orb::Models::CustomerCreateParams::TaxID)) } def tax_id end @@ -189,6 +317,9 @@ module Orb def tax_id=(_) end + # A timezone identifier from the IANA timezone database, such as + # `"America/Los_Angeles"`. This defaults to your account's timezone if not set. + # This cannot be changed after customer creation. sig { returns(T.nilable(String)) } def timezone end @@ -441,6 +572,8 @@ module Orb end class Hierarchy < Orb::BaseModel + # A list of child customer IDs to add to the hierarchy. The desired child + # customers must not already be part of another hierarchy. sig { returns(T.nilable(T::Array[String])) } def child_customer_ids end @@ -449,6 +582,8 @@ module Orb def child_customer_ids=(_) end + # The ID of the parent customer in the hierarchy. The desired parent customer must + # not be a child of another customer. sig { returns(T.nilable(String)) } def parent_customer_id end @@ -457,6 +592,7 @@ module Orb def parent_customer_id=(_) end + # The hierarchical relationships for this customer. sig do params(child_customer_ids: T::Array[String], parent_customer_id: T.nilable(String)) .returns(T.attached_class) @@ -471,6 +607,9 @@ module Orb end end + # This is used for creating charges or invoices in an external system via Orb. + # When not in test mode, the connection must first be configured in the Orb + # webapp. class PaymentProvider < Orb::Enum abstract! @@ -663,10 +802,10 @@ module Orb sig do override .returns( - [[Symbol, Orb::Models::CustomerCreateParams::TaxConfiguration::NewAvalaraTaxConfiguration], [Symbol, Orb::Models::CustomerCreateParams::TaxConfiguration::NewTaxJarConfiguration]] + [Orb::Models::CustomerCreateParams::TaxConfiguration::NewAvalaraTaxConfiguration, Orb::Models::CustomerCreateParams::TaxConfiguration::NewTaxJarConfiguration] ) end - private def variants + def variants end end end @@ -696,6 +835,111 @@ module Orb def value=(_) end + # Tax IDs are commonly required to be displayed on customer invoices, which are + # added to the headers of invoices. + # + # ### Supported Tax ID Countries and Types + # + # | Country | Type | Description | + # | -------------------- | ------------ | ------------------------------------------------------------------------------------------------------- | + # | Andorra | `ad_nrt` | Andorran NRT Number | + # | Argentina | `ar_cuit` | Argentinian Tax ID Number | + # | Australia | `au_abn` | Australian Business Number (AU ABN) | + # | Australia | `au_arn` | Australian Taxation Office Reference Number | + # | Austria | `eu_vat` | European VAT Number | + # | Bahrain | `bh_vat` | Bahraini VAT Number | + # | Belgium | `eu_vat` | European VAT Number | + # | Bolivia | `bo_tin` | Bolivian Tax ID | + # | Brazil | `br_cnpj` | Brazilian CNPJ Number | + # | Brazil | `br_cpf` | Brazilian CPF Number | + # | Bulgaria | `bg_uic` | Bulgaria Unified Identification Code | + # | Bulgaria | `eu_vat` | European VAT Number | + # | Canada | `ca_bn` | Canadian BN | + # | Canada | `ca_gst_hst` | Canadian GST/HST Number | + # | Canada | `ca_pst_bc` | Canadian PST Number (British Columbia) | + # | Canada | `ca_pst_mb` | Canadian PST Number (Manitoba) | + # | Canada | `ca_pst_sk` | Canadian PST Number (Saskatchewan) | + # | Canada | `ca_qst` | Canadian QST Number (Québec) | + # | Chile | `cl_tin` | Chilean TIN | + # | China | `cn_tin` | Chinese Tax ID | + # | Colombia | `co_nit` | Colombian NIT Number | + # | Costa Rica | `cr_tin` | Costa Rican Tax ID | + # | Croatia | `eu_vat` | European VAT Number | + # | Cyprus | `eu_vat` | European VAT Number | + # | Czech Republic | `eu_vat` | European VAT Number | + # | Denmark | `eu_vat` | European VAT Number | + # | Dominican Republic | `do_rcn` | Dominican RCN Number | + # | Ecuador | `ec_ruc` | Ecuadorian RUC Number | + # | Egypt | `eg_tin` | Egyptian Tax Identification Number | + # | El Salvador | `sv_nit` | El Salvadorian NIT Number | + # | Estonia | `eu_vat` | European VAT Number | + # | EU | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Finland | `eu_vat` | European VAT Number | + # | France | `eu_vat` | European VAT Number | + # | Georgia | `ge_vat` | Georgian VAT | + # | Germany | `eu_vat` | European VAT Number | + # | Greece | `eu_vat` | European VAT Number | + # | Hong Kong | `hk_br` | Hong Kong BR Number | + # | Hungary | `eu_vat` | European VAT Number | + # | Hungary | `hu_tin` | Hungary Tax Number (adószám) | + # | Iceland | `is_vat` | Icelandic VAT | + # | India | `in_gst` | Indian GST Number | + # | Indonesia | `id_npwp` | Indonesian NPWP Number | + # | Ireland | `eu_vat` | European VAT Number | + # | Israel | `il_vat` | Israel VAT | + # | Italy | `eu_vat` | European VAT Number | + # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | + # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | + # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | + # | Kazakhstan | `kz_bin` | Kazakhstani Business Identification Number | + # | Kenya | `ke_pin` | Kenya Revenue Authority Personal Identification Number | + # | Latvia | `eu_vat` | European VAT Number | + # | Liechtenstein | `li_uid` | Liechtensteinian UID Number | + # | Lithuania | `eu_vat` | European VAT Number | + # | Luxembourg | `eu_vat` | European VAT Number | + # | Malaysia | `my_frp` | Malaysian FRP Number | + # | Malaysia | `my_itn` | Malaysian ITN | + # | Malaysia | `my_sst` | Malaysian SST Number | + # | Malta | `eu_vat ` | European VAT Number | + # | Mexico | `mx_rfc` | Mexican RFC Number | + # | Netherlands | `eu_vat` | European VAT Number | + # | New Zealand | `nz_gst` | New Zealand GST Number | + # | Nigeria | `ng_tin` | Nigerian Tax Identification Number | + # | Norway | `no_vat` | Norwegian VAT Number | + # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | + # | Oman | `om_vat` | Omani VAT Number | + # | Peru | `pe_ruc` | Peruvian RUC Number | + # | Philippines | `ph_tin ` | Philippines Tax Identification Number | + # | Poland | `eu_vat` | European VAT Number | + # | Portugal | `eu_vat` | European VAT Number | + # | Romania | `eu_vat` | European VAT Number | + # | Romania | `ro_tin` | Romanian Tax ID Number | + # | Russia | `ru_inn` | Russian INN | + # | Russia | `ru_kpp` | Russian KPP | + # | Saudi Arabia | `sa_vat` | Saudi Arabia VAT | + # | Serbia | `rs_pib` | Serbian PIB Number | + # | Singapore | `sg_gst` | Singaporean GST | + # | Singapore | `sg_uen` | Singaporean UEN | + # | Slovakia | `eu_vat` | European VAT Number | + # | Slovenia | `eu_vat` | European VAT Number | + # | Slovenia | `si_tin` | Slovenia Tax Number (davčna številka) | + # | South Africa | `za_vat` | South African VAT Number | + # | South Korea | `kr_brn` | Korean BRN | + # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | + # | Spain | `eu_vat` | European VAT Number | + # | Sweden | `eu_vat` | European VAT Number | + # | Switzerland | `ch_vat` | Switzerland VAT Number | + # | Taiwan | `tw_vat` | Taiwanese VAT | + # | Thailand | `th_vat` | Thai VAT | + # | Turkey | `tr_tin` | Turkish Tax Identification Number | + # | Ukraine | `ua_vat` | Ukrainian VAT | + # | United Arab Emirates | `ae_trn` | United Arab Emirates TRN | + # | United Kingdom | `eu_vat` | Northern Ireland VAT Number | + # | United Kingdom | `gb_vat` | United Kingdom VAT Number | + # | United States | `us_ein` | United States EIN | + # | Uruguay | `uy_ruc` | Uruguayan RUC Number | + # | Venezuela | `ve_rif` | Venezuelan RIF Number | + # | Vietnam | `vn_tin` | Vietnamese Tax ID Number | sig { params(country: Symbol, type: Symbol, value: String).returns(T.attached_class) } def self.new(country:, type:, value:) end diff --git a/rbi/lib/orb/models/customer_list_params.rbi b/rbi/lib/orb/models/customer_list_params.rbi index f69a8a92..765a281d 100644 --- a/rbi/lib/orb/models/customer_list_params.rbi +++ b/rbi/lib/orb/models/customer_list_params.rbi @@ -38,6 +38,8 @@ module Orb def created_at_lte=(_) end + # Cursor for pagination. This can be populated by the `next_cursor` value returned + # from the initial request. sig { returns(T.nilable(String)) } def cursor end @@ -46,6 +48,7 @@ module Orb def cursor=(_) end + # The number of items to fetch. Defaults to 20. sig { returns(T.nilable(Integer)) } def limit end diff --git a/rbi/lib/orb/models/customer_update_by_external_id_params.rbi b/rbi/lib/orb/models/customer_update_by_external_id_params.rbi index a87ab5c7..7ac104c7 100644 --- a/rbi/lib/orb/models/customer_update_by_external_id_params.rbi +++ b/rbi/lib/orb/models/customer_update_by_external_id_params.rbi @@ -17,6 +17,8 @@ module Orb def accounting_sync_configuration=(_) end + # Additional email addresses for this customer. If populated, these email + # addresses will be CC'd for customer communications. sig { returns(T.nilable(T::Array[String])) } def additional_emails end @@ -25,6 +27,9 @@ module Orb def additional_emails=(_) end + # Used to determine if invoices for this customer will automatically attempt to + # charge a saved payment method, if available. This parameter defaults to `True` + # when a payment provider is provided on customer creation. sig { returns(T.nilable(T::Boolean)) } def auto_collection end @@ -44,6 +49,8 @@ module Orb def billing_address=(_) end + # An ISO 4217 currency string used for the customer's invoices and balance. If not + # set at creation time, will be set at subscription creation time. sig { returns(T.nilable(String)) } def currency end @@ -52,6 +59,7 @@ module Orb def currency=(_) end + # A valid customer email, to be used for invoicing and notifications. sig { returns(T.nilable(String)) } def email end @@ -68,6 +76,8 @@ module Orb def email_delivery=(_) end + # The external customer ID. This can only be set if empty and the customer has no + # past or current subscriptions. sig { returns(T.nilable(String)) } def external_customer_id end @@ -76,6 +86,7 @@ module Orb def external_customer_id=(_) end + # The hierarchical relationships for this customer. sig { returns(T.nilable(Orb::Models::CustomerUpdateByExternalIDParams::Hierarchy)) } def hierarchy end @@ -87,6 +98,9 @@ module Orb def hierarchy=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -98,6 +112,7 @@ module Orb def metadata=(_) end + # The full name of the customer sig { returns(T.nilable(String)) } def name end @@ -106,6 +121,13 @@ module Orb def name=(_) end + # This is used for creating charges or invoices in an external system via Orb. + # When not in test mode: + # + # - the connection must first be configured in the Orb webapp. + # - if the provider is an invoicing provider (`stripe_invoice`, `quickbooks`, + # `bill.com`, `netsuite`), any product mappings must first be configured with + # the Orb team. sig { returns(T.nilable(Symbol)) } def payment_provider end @@ -114,6 +136,8 @@ module Orb def payment_provider=(_) end + # The ID of this customer in an external payments solution, such as Stripe. This + # is used for creating charges or invoices in the external system via Orb. sig { returns(T.nilable(String)) } def payment_provider_id end @@ -178,6 +202,111 @@ module Orb def tax_configuration=(_) end + # Tax IDs are commonly required to be displayed on customer invoices, which are + # added to the headers of invoices. + # + # ### Supported Tax ID Countries and Types + # + # | Country | Type | Description | + # | -------------------- | ------------ | ------------------------------------------------------------------------------------------------------- | + # | Andorra | `ad_nrt` | Andorran NRT Number | + # | Argentina | `ar_cuit` | Argentinian Tax ID Number | + # | Australia | `au_abn` | Australian Business Number (AU ABN) | + # | Australia | `au_arn` | Australian Taxation Office Reference Number | + # | Austria | `eu_vat` | European VAT Number | + # | Bahrain | `bh_vat` | Bahraini VAT Number | + # | Belgium | `eu_vat` | European VAT Number | + # | Bolivia | `bo_tin` | Bolivian Tax ID | + # | Brazil | `br_cnpj` | Brazilian CNPJ Number | + # | Brazil | `br_cpf` | Brazilian CPF Number | + # | Bulgaria | `bg_uic` | Bulgaria Unified Identification Code | + # | Bulgaria | `eu_vat` | European VAT Number | + # | Canada | `ca_bn` | Canadian BN | + # | Canada | `ca_gst_hst` | Canadian GST/HST Number | + # | Canada | `ca_pst_bc` | Canadian PST Number (British Columbia) | + # | Canada | `ca_pst_mb` | Canadian PST Number (Manitoba) | + # | Canada | `ca_pst_sk` | Canadian PST Number (Saskatchewan) | + # | Canada | `ca_qst` | Canadian QST Number (Québec) | + # | Chile | `cl_tin` | Chilean TIN | + # | China | `cn_tin` | Chinese Tax ID | + # | Colombia | `co_nit` | Colombian NIT Number | + # | Costa Rica | `cr_tin` | Costa Rican Tax ID | + # | Croatia | `eu_vat` | European VAT Number | + # | Cyprus | `eu_vat` | European VAT Number | + # | Czech Republic | `eu_vat` | European VAT Number | + # | Denmark | `eu_vat` | European VAT Number | + # | Dominican Republic | `do_rcn` | Dominican RCN Number | + # | Ecuador | `ec_ruc` | Ecuadorian RUC Number | + # | Egypt | `eg_tin` | Egyptian Tax Identification Number | + # | El Salvador | `sv_nit` | El Salvadorian NIT Number | + # | Estonia | `eu_vat` | European VAT Number | + # | EU | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Finland | `eu_vat` | European VAT Number | + # | France | `eu_vat` | European VAT Number | + # | Georgia | `ge_vat` | Georgian VAT | + # | Germany | `eu_vat` | European VAT Number | + # | Greece | `eu_vat` | European VAT Number | + # | Hong Kong | `hk_br` | Hong Kong BR Number | + # | Hungary | `eu_vat` | European VAT Number | + # | Hungary | `hu_tin` | Hungary Tax Number (adószám) | + # | Iceland | `is_vat` | Icelandic VAT | + # | India | `in_gst` | Indian GST Number | + # | Indonesia | `id_npwp` | Indonesian NPWP Number | + # | Ireland | `eu_vat` | European VAT Number | + # | Israel | `il_vat` | Israel VAT | + # | Italy | `eu_vat` | European VAT Number | + # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | + # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | + # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | + # | Kazakhstan | `kz_bin` | Kazakhstani Business Identification Number | + # | Kenya | `ke_pin` | Kenya Revenue Authority Personal Identification Number | + # | Latvia | `eu_vat` | European VAT Number | + # | Liechtenstein | `li_uid` | Liechtensteinian UID Number | + # | Lithuania | `eu_vat` | European VAT Number | + # | Luxembourg | `eu_vat` | European VAT Number | + # | Malaysia | `my_frp` | Malaysian FRP Number | + # | Malaysia | `my_itn` | Malaysian ITN | + # | Malaysia | `my_sst` | Malaysian SST Number | + # | Malta | `eu_vat ` | European VAT Number | + # | Mexico | `mx_rfc` | Mexican RFC Number | + # | Netherlands | `eu_vat` | European VAT Number | + # | New Zealand | `nz_gst` | New Zealand GST Number | + # | Nigeria | `ng_tin` | Nigerian Tax Identification Number | + # | Norway | `no_vat` | Norwegian VAT Number | + # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | + # | Oman | `om_vat` | Omani VAT Number | + # | Peru | `pe_ruc` | Peruvian RUC Number | + # | Philippines | `ph_tin ` | Philippines Tax Identification Number | + # | Poland | `eu_vat` | European VAT Number | + # | Portugal | `eu_vat` | European VAT Number | + # | Romania | `eu_vat` | European VAT Number | + # | Romania | `ro_tin` | Romanian Tax ID Number | + # | Russia | `ru_inn` | Russian INN | + # | Russia | `ru_kpp` | Russian KPP | + # | Saudi Arabia | `sa_vat` | Saudi Arabia VAT | + # | Serbia | `rs_pib` | Serbian PIB Number | + # | Singapore | `sg_gst` | Singaporean GST | + # | Singapore | `sg_uen` | Singaporean UEN | + # | Slovakia | `eu_vat` | European VAT Number | + # | Slovenia | `eu_vat` | European VAT Number | + # | Slovenia | `si_tin` | Slovenia Tax Number (davčna številka) | + # | South Africa | `za_vat` | South African VAT Number | + # | South Korea | `kr_brn` | Korean BRN | + # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | + # | Spain | `eu_vat` | European VAT Number | + # | Sweden | `eu_vat` | European VAT Number | + # | Switzerland | `ch_vat` | Switzerland VAT Number | + # | Taiwan | `tw_vat` | Taiwanese VAT | + # | Thailand | `th_vat` | Thai VAT | + # | Turkey | `tr_tin` | Turkish Tax Identification Number | + # | Ukraine | `ua_vat` | Ukrainian VAT | + # | United Arab Emirates | `ae_trn` | United Arab Emirates TRN | + # | United Kingdom | `eu_vat` | Northern Ireland VAT Number | + # | United Kingdom | `gb_vat` | United Kingdom VAT Number | + # | United States | `us_ein` | United States EIN | + # | Uruguay | `uy_ruc` | Uruguayan RUC Number | + # | Venezuela | `ve_rif` | Venezuelan RIF Number | + # | Vietnam | `vn_tin` | Vietnamese Tax ID Number | sig { returns(T.nilable(Orb::Models::CustomerUpdateByExternalIDParams::TaxID)) } def tax_id end @@ -440,6 +569,8 @@ module Orb end class Hierarchy < Orb::BaseModel + # A list of child customer IDs to add to the hierarchy. The desired child + # customers must not already be part of another hierarchy. sig { returns(T.nilable(T::Array[String])) } def child_customer_ids end @@ -448,6 +579,8 @@ module Orb def child_customer_ids=(_) end + # The ID of the parent customer in the hierarchy. The desired parent customer must + # not be a child of another customer. sig { returns(T.nilable(String)) } def parent_customer_id end @@ -456,6 +589,7 @@ module Orb def parent_customer_id=(_) end + # The hierarchical relationships for this customer. sig do params(child_customer_ids: T::Array[String], parent_customer_id: T.nilable(String)) .returns(T.attached_class) @@ -470,6 +604,13 @@ module Orb end end + # This is used for creating charges or invoices in an external system via Orb. + # When not in test mode: + # + # - the connection must first be configured in the Orb webapp. + # - if the provider is an invoicing provider (`stripe_invoice`, `quickbooks`, + # `bill.com`, `netsuite`), any product mappings must first be configured with + # the Orb team. class PaymentProvider < Orb::Enum abstract! @@ -662,10 +803,10 @@ module Orb sig do override .returns( - [[Symbol, Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::NewAvalaraTaxConfiguration], [Symbol, Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::NewTaxJarConfiguration]] + [Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::NewAvalaraTaxConfiguration, Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::NewTaxJarConfiguration] ) end - private def variants + def variants end end end @@ -695,6 +836,111 @@ module Orb def value=(_) end + # Tax IDs are commonly required to be displayed on customer invoices, which are + # added to the headers of invoices. + # + # ### Supported Tax ID Countries and Types + # + # | Country | Type | Description | + # | -------------------- | ------------ | ------------------------------------------------------------------------------------------------------- | + # | Andorra | `ad_nrt` | Andorran NRT Number | + # | Argentina | `ar_cuit` | Argentinian Tax ID Number | + # | Australia | `au_abn` | Australian Business Number (AU ABN) | + # | Australia | `au_arn` | Australian Taxation Office Reference Number | + # | Austria | `eu_vat` | European VAT Number | + # | Bahrain | `bh_vat` | Bahraini VAT Number | + # | Belgium | `eu_vat` | European VAT Number | + # | Bolivia | `bo_tin` | Bolivian Tax ID | + # | Brazil | `br_cnpj` | Brazilian CNPJ Number | + # | Brazil | `br_cpf` | Brazilian CPF Number | + # | Bulgaria | `bg_uic` | Bulgaria Unified Identification Code | + # | Bulgaria | `eu_vat` | European VAT Number | + # | Canada | `ca_bn` | Canadian BN | + # | Canada | `ca_gst_hst` | Canadian GST/HST Number | + # | Canada | `ca_pst_bc` | Canadian PST Number (British Columbia) | + # | Canada | `ca_pst_mb` | Canadian PST Number (Manitoba) | + # | Canada | `ca_pst_sk` | Canadian PST Number (Saskatchewan) | + # | Canada | `ca_qst` | Canadian QST Number (Québec) | + # | Chile | `cl_tin` | Chilean TIN | + # | China | `cn_tin` | Chinese Tax ID | + # | Colombia | `co_nit` | Colombian NIT Number | + # | Costa Rica | `cr_tin` | Costa Rican Tax ID | + # | Croatia | `eu_vat` | European VAT Number | + # | Cyprus | `eu_vat` | European VAT Number | + # | Czech Republic | `eu_vat` | European VAT Number | + # | Denmark | `eu_vat` | European VAT Number | + # | Dominican Republic | `do_rcn` | Dominican RCN Number | + # | Ecuador | `ec_ruc` | Ecuadorian RUC Number | + # | Egypt | `eg_tin` | Egyptian Tax Identification Number | + # | El Salvador | `sv_nit` | El Salvadorian NIT Number | + # | Estonia | `eu_vat` | European VAT Number | + # | EU | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Finland | `eu_vat` | European VAT Number | + # | France | `eu_vat` | European VAT Number | + # | Georgia | `ge_vat` | Georgian VAT | + # | Germany | `eu_vat` | European VAT Number | + # | Greece | `eu_vat` | European VAT Number | + # | Hong Kong | `hk_br` | Hong Kong BR Number | + # | Hungary | `eu_vat` | European VAT Number | + # | Hungary | `hu_tin` | Hungary Tax Number (adószám) | + # | Iceland | `is_vat` | Icelandic VAT | + # | India | `in_gst` | Indian GST Number | + # | Indonesia | `id_npwp` | Indonesian NPWP Number | + # | Ireland | `eu_vat` | European VAT Number | + # | Israel | `il_vat` | Israel VAT | + # | Italy | `eu_vat` | European VAT Number | + # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | + # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | + # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | + # | Kazakhstan | `kz_bin` | Kazakhstani Business Identification Number | + # | Kenya | `ke_pin` | Kenya Revenue Authority Personal Identification Number | + # | Latvia | `eu_vat` | European VAT Number | + # | Liechtenstein | `li_uid` | Liechtensteinian UID Number | + # | Lithuania | `eu_vat` | European VAT Number | + # | Luxembourg | `eu_vat` | European VAT Number | + # | Malaysia | `my_frp` | Malaysian FRP Number | + # | Malaysia | `my_itn` | Malaysian ITN | + # | Malaysia | `my_sst` | Malaysian SST Number | + # | Malta | `eu_vat ` | European VAT Number | + # | Mexico | `mx_rfc` | Mexican RFC Number | + # | Netherlands | `eu_vat` | European VAT Number | + # | New Zealand | `nz_gst` | New Zealand GST Number | + # | Nigeria | `ng_tin` | Nigerian Tax Identification Number | + # | Norway | `no_vat` | Norwegian VAT Number | + # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | + # | Oman | `om_vat` | Omani VAT Number | + # | Peru | `pe_ruc` | Peruvian RUC Number | + # | Philippines | `ph_tin ` | Philippines Tax Identification Number | + # | Poland | `eu_vat` | European VAT Number | + # | Portugal | `eu_vat` | European VAT Number | + # | Romania | `eu_vat` | European VAT Number | + # | Romania | `ro_tin` | Romanian Tax ID Number | + # | Russia | `ru_inn` | Russian INN | + # | Russia | `ru_kpp` | Russian KPP | + # | Saudi Arabia | `sa_vat` | Saudi Arabia VAT | + # | Serbia | `rs_pib` | Serbian PIB Number | + # | Singapore | `sg_gst` | Singaporean GST | + # | Singapore | `sg_uen` | Singaporean UEN | + # | Slovakia | `eu_vat` | European VAT Number | + # | Slovenia | `eu_vat` | European VAT Number | + # | Slovenia | `si_tin` | Slovenia Tax Number (davčna številka) | + # | South Africa | `za_vat` | South African VAT Number | + # | South Korea | `kr_brn` | Korean BRN | + # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | + # | Spain | `eu_vat` | European VAT Number | + # | Sweden | `eu_vat` | European VAT Number | + # | Switzerland | `ch_vat` | Switzerland VAT Number | + # | Taiwan | `tw_vat` | Taiwanese VAT | + # | Thailand | `th_vat` | Thai VAT | + # | Turkey | `tr_tin` | Turkish Tax Identification Number | + # | Ukraine | `ua_vat` | Ukrainian VAT | + # | United Arab Emirates | `ae_trn` | United Arab Emirates TRN | + # | United Kingdom | `eu_vat` | Northern Ireland VAT Number | + # | United Kingdom | `gb_vat` | United Kingdom VAT Number | + # | United States | `us_ein` | United States EIN | + # | Uruguay | `uy_ruc` | Uruguayan RUC Number | + # | Venezuela | `ve_rif` | Venezuelan RIF Number | + # | Vietnam | `vn_tin` | Vietnamese Tax ID Number | sig { params(country: Symbol, type: Symbol, value: String).returns(T.attached_class) } def self.new(country:, type:, value:) end diff --git a/rbi/lib/orb/models/customer_update_params.rbi b/rbi/lib/orb/models/customer_update_params.rbi index 988145a9..4f24b3a8 100644 --- a/rbi/lib/orb/models/customer_update_params.rbi +++ b/rbi/lib/orb/models/customer_update_params.rbi @@ -17,6 +17,8 @@ module Orb def accounting_sync_configuration=(_) end + # Additional email addresses for this customer. If populated, these email + # addresses will be CC'd for customer communications. sig { returns(T.nilable(T::Array[String])) } def additional_emails end @@ -25,6 +27,9 @@ module Orb def additional_emails=(_) end + # Used to determine if invoices for this customer will automatically attempt to + # charge a saved payment method, if available. This parameter defaults to `True` + # when a payment provider is provided on customer creation. sig { returns(T.nilable(T::Boolean)) } def auto_collection end @@ -44,6 +49,8 @@ module Orb def billing_address=(_) end + # An ISO 4217 currency string used for the customer's invoices and balance. If not + # set at creation time, will be set at subscription creation time. sig { returns(T.nilable(String)) } def currency end @@ -52,6 +59,7 @@ module Orb def currency=(_) end + # A valid customer email, to be used for invoicing and notifications. sig { returns(T.nilable(String)) } def email end @@ -68,6 +76,8 @@ module Orb def email_delivery=(_) end + # The external customer ID. This can only be set if empty and the customer has no + # past or current subscriptions. sig { returns(T.nilable(String)) } def external_customer_id end @@ -76,6 +86,7 @@ module Orb def external_customer_id=(_) end + # The hierarchical relationships for this customer. sig { returns(T.nilable(Orb::Models::CustomerUpdateParams::Hierarchy)) } def hierarchy end @@ -87,6 +98,9 @@ module Orb def hierarchy=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -98,6 +112,7 @@ module Orb def metadata=(_) end + # The full name of the customer sig { returns(T.nilable(String)) } def name end @@ -106,6 +121,13 @@ module Orb def name=(_) end + # This is used for creating charges or invoices in an external system via Orb. + # When not in test mode: + # + # - the connection must first be configured in the Orb webapp. + # - if the provider is an invoicing provider (`stripe_invoice`, `quickbooks`, + # `bill.com`, `netsuite`), any product mappings must first be configured with + # the Orb team. sig { returns(T.nilable(Symbol)) } def payment_provider end @@ -114,6 +136,8 @@ module Orb def payment_provider=(_) end + # The ID of this customer in an external payments solution, such as Stripe. This + # is used for creating charges or invoices in the external system via Orb. sig { returns(T.nilable(String)) } def payment_provider_id end @@ -178,6 +202,111 @@ module Orb def tax_configuration=(_) end + # Tax IDs are commonly required to be displayed on customer invoices, which are + # added to the headers of invoices. + # + # ### Supported Tax ID Countries and Types + # + # | Country | Type | Description | + # | -------------------- | ------------ | ------------------------------------------------------------------------------------------------------- | + # | Andorra | `ad_nrt` | Andorran NRT Number | + # | Argentina | `ar_cuit` | Argentinian Tax ID Number | + # | Australia | `au_abn` | Australian Business Number (AU ABN) | + # | Australia | `au_arn` | Australian Taxation Office Reference Number | + # | Austria | `eu_vat` | European VAT Number | + # | Bahrain | `bh_vat` | Bahraini VAT Number | + # | Belgium | `eu_vat` | European VAT Number | + # | Bolivia | `bo_tin` | Bolivian Tax ID | + # | Brazil | `br_cnpj` | Brazilian CNPJ Number | + # | Brazil | `br_cpf` | Brazilian CPF Number | + # | Bulgaria | `bg_uic` | Bulgaria Unified Identification Code | + # | Bulgaria | `eu_vat` | European VAT Number | + # | Canada | `ca_bn` | Canadian BN | + # | Canada | `ca_gst_hst` | Canadian GST/HST Number | + # | Canada | `ca_pst_bc` | Canadian PST Number (British Columbia) | + # | Canada | `ca_pst_mb` | Canadian PST Number (Manitoba) | + # | Canada | `ca_pst_sk` | Canadian PST Number (Saskatchewan) | + # | Canada | `ca_qst` | Canadian QST Number (Québec) | + # | Chile | `cl_tin` | Chilean TIN | + # | China | `cn_tin` | Chinese Tax ID | + # | Colombia | `co_nit` | Colombian NIT Number | + # | Costa Rica | `cr_tin` | Costa Rican Tax ID | + # | Croatia | `eu_vat` | European VAT Number | + # | Cyprus | `eu_vat` | European VAT Number | + # | Czech Republic | `eu_vat` | European VAT Number | + # | Denmark | `eu_vat` | European VAT Number | + # | Dominican Republic | `do_rcn` | Dominican RCN Number | + # | Ecuador | `ec_ruc` | Ecuadorian RUC Number | + # | Egypt | `eg_tin` | Egyptian Tax Identification Number | + # | El Salvador | `sv_nit` | El Salvadorian NIT Number | + # | Estonia | `eu_vat` | European VAT Number | + # | EU | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Finland | `eu_vat` | European VAT Number | + # | France | `eu_vat` | European VAT Number | + # | Georgia | `ge_vat` | Georgian VAT | + # | Germany | `eu_vat` | European VAT Number | + # | Greece | `eu_vat` | European VAT Number | + # | Hong Kong | `hk_br` | Hong Kong BR Number | + # | Hungary | `eu_vat` | European VAT Number | + # | Hungary | `hu_tin` | Hungary Tax Number (adószám) | + # | Iceland | `is_vat` | Icelandic VAT | + # | India | `in_gst` | Indian GST Number | + # | Indonesia | `id_npwp` | Indonesian NPWP Number | + # | Ireland | `eu_vat` | European VAT Number | + # | Israel | `il_vat` | Israel VAT | + # | Italy | `eu_vat` | European VAT Number | + # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | + # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | + # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | + # | Kazakhstan | `kz_bin` | Kazakhstani Business Identification Number | + # | Kenya | `ke_pin` | Kenya Revenue Authority Personal Identification Number | + # | Latvia | `eu_vat` | European VAT Number | + # | Liechtenstein | `li_uid` | Liechtensteinian UID Number | + # | Lithuania | `eu_vat` | European VAT Number | + # | Luxembourg | `eu_vat` | European VAT Number | + # | Malaysia | `my_frp` | Malaysian FRP Number | + # | Malaysia | `my_itn` | Malaysian ITN | + # | Malaysia | `my_sst` | Malaysian SST Number | + # | Malta | `eu_vat ` | European VAT Number | + # | Mexico | `mx_rfc` | Mexican RFC Number | + # | Netherlands | `eu_vat` | European VAT Number | + # | New Zealand | `nz_gst` | New Zealand GST Number | + # | Nigeria | `ng_tin` | Nigerian Tax Identification Number | + # | Norway | `no_vat` | Norwegian VAT Number | + # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | + # | Oman | `om_vat` | Omani VAT Number | + # | Peru | `pe_ruc` | Peruvian RUC Number | + # | Philippines | `ph_tin ` | Philippines Tax Identification Number | + # | Poland | `eu_vat` | European VAT Number | + # | Portugal | `eu_vat` | European VAT Number | + # | Romania | `eu_vat` | European VAT Number | + # | Romania | `ro_tin` | Romanian Tax ID Number | + # | Russia | `ru_inn` | Russian INN | + # | Russia | `ru_kpp` | Russian KPP | + # | Saudi Arabia | `sa_vat` | Saudi Arabia VAT | + # | Serbia | `rs_pib` | Serbian PIB Number | + # | Singapore | `sg_gst` | Singaporean GST | + # | Singapore | `sg_uen` | Singaporean UEN | + # | Slovakia | `eu_vat` | European VAT Number | + # | Slovenia | `eu_vat` | European VAT Number | + # | Slovenia | `si_tin` | Slovenia Tax Number (davčna številka) | + # | South Africa | `za_vat` | South African VAT Number | + # | South Korea | `kr_brn` | Korean BRN | + # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | + # | Spain | `eu_vat` | European VAT Number | + # | Sweden | `eu_vat` | European VAT Number | + # | Switzerland | `ch_vat` | Switzerland VAT Number | + # | Taiwan | `tw_vat` | Taiwanese VAT | + # | Thailand | `th_vat` | Thai VAT | + # | Turkey | `tr_tin` | Turkish Tax Identification Number | + # | Ukraine | `ua_vat` | Ukrainian VAT | + # | United Arab Emirates | `ae_trn` | United Arab Emirates TRN | + # | United Kingdom | `eu_vat` | Northern Ireland VAT Number | + # | United Kingdom | `gb_vat` | United Kingdom VAT Number | + # | United States | `us_ein` | United States EIN | + # | Uruguay | `uy_ruc` | Uruguayan RUC Number | + # | Venezuela | `ve_rif` | Venezuelan RIF Number | + # | Vietnam | `vn_tin` | Vietnamese Tax ID Number | sig { returns(T.nilable(Orb::Models::CustomerUpdateParams::TaxID)) } def tax_id end @@ -430,6 +559,8 @@ module Orb end class Hierarchy < Orb::BaseModel + # A list of child customer IDs to add to the hierarchy. The desired child + # customers must not already be part of another hierarchy. sig { returns(T.nilable(T::Array[String])) } def child_customer_ids end @@ -438,6 +569,8 @@ module Orb def child_customer_ids=(_) end + # The ID of the parent customer in the hierarchy. The desired parent customer must + # not be a child of another customer. sig { returns(T.nilable(String)) } def parent_customer_id end @@ -446,6 +579,7 @@ module Orb def parent_customer_id=(_) end + # The hierarchical relationships for this customer. sig do params(child_customer_ids: T::Array[String], parent_customer_id: T.nilable(String)) .returns(T.attached_class) @@ -460,6 +594,13 @@ module Orb end end + # This is used for creating charges or invoices in an external system via Orb. + # When not in test mode: + # + # - the connection must first be configured in the Orb webapp. + # - if the provider is an invoicing provider (`stripe_invoice`, `quickbooks`, + # `bill.com`, `netsuite`), any product mappings must first be configured with + # the Orb team. class PaymentProvider < Orb::Enum abstract! @@ -652,10 +793,10 @@ module Orb sig do override .returns( - [[Symbol, Orb::Models::CustomerUpdateParams::TaxConfiguration::NewAvalaraTaxConfiguration], [Symbol, Orb::Models::CustomerUpdateParams::TaxConfiguration::NewTaxJarConfiguration]] + [Orb::Models::CustomerUpdateParams::TaxConfiguration::NewAvalaraTaxConfiguration, Orb::Models::CustomerUpdateParams::TaxConfiguration::NewTaxJarConfiguration] ) end - private def variants + def variants end end end @@ -685,6 +826,111 @@ module Orb def value=(_) end + # Tax IDs are commonly required to be displayed on customer invoices, which are + # added to the headers of invoices. + # + # ### Supported Tax ID Countries and Types + # + # | Country | Type | Description | + # | -------------------- | ------------ | ------------------------------------------------------------------------------------------------------- | + # | Andorra | `ad_nrt` | Andorran NRT Number | + # | Argentina | `ar_cuit` | Argentinian Tax ID Number | + # | Australia | `au_abn` | Australian Business Number (AU ABN) | + # | Australia | `au_arn` | Australian Taxation Office Reference Number | + # | Austria | `eu_vat` | European VAT Number | + # | Bahrain | `bh_vat` | Bahraini VAT Number | + # | Belgium | `eu_vat` | European VAT Number | + # | Bolivia | `bo_tin` | Bolivian Tax ID | + # | Brazil | `br_cnpj` | Brazilian CNPJ Number | + # | Brazil | `br_cpf` | Brazilian CPF Number | + # | Bulgaria | `bg_uic` | Bulgaria Unified Identification Code | + # | Bulgaria | `eu_vat` | European VAT Number | + # | Canada | `ca_bn` | Canadian BN | + # | Canada | `ca_gst_hst` | Canadian GST/HST Number | + # | Canada | `ca_pst_bc` | Canadian PST Number (British Columbia) | + # | Canada | `ca_pst_mb` | Canadian PST Number (Manitoba) | + # | Canada | `ca_pst_sk` | Canadian PST Number (Saskatchewan) | + # | Canada | `ca_qst` | Canadian QST Number (Québec) | + # | Chile | `cl_tin` | Chilean TIN | + # | China | `cn_tin` | Chinese Tax ID | + # | Colombia | `co_nit` | Colombian NIT Number | + # | Costa Rica | `cr_tin` | Costa Rican Tax ID | + # | Croatia | `eu_vat` | European VAT Number | + # | Cyprus | `eu_vat` | European VAT Number | + # | Czech Republic | `eu_vat` | European VAT Number | + # | Denmark | `eu_vat` | European VAT Number | + # | Dominican Republic | `do_rcn` | Dominican RCN Number | + # | Ecuador | `ec_ruc` | Ecuadorian RUC Number | + # | Egypt | `eg_tin` | Egyptian Tax Identification Number | + # | El Salvador | `sv_nit` | El Salvadorian NIT Number | + # | Estonia | `eu_vat` | European VAT Number | + # | EU | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Finland | `eu_vat` | European VAT Number | + # | France | `eu_vat` | European VAT Number | + # | Georgia | `ge_vat` | Georgian VAT | + # | Germany | `eu_vat` | European VAT Number | + # | Greece | `eu_vat` | European VAT Number | + # | Hong Kong | `hk_br` | Hong Kong BR Number | + # | Hungary | `eu_vat` | European VAT Number | + # | Hungary | `hu_tin` | Hungary Tax Number (adószám) | + # | Iceland | `is_vat` | Icelandic VAT | + # | India | `in_gst` | Indian GST Number | + # | Indonesia | `id_npwp` | Indonesian NPWP Number | + # | Ireland | `eu_vat` | European VAT Number | + # | Israel | `il_vat` | Israel VAT | + # | Italy | `eu_vat` | European VAT Number | + # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | + # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | + # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | + # | Kazakhstan | `kz_bin` | Kazakhstani Business Identification Number | + # | Kenya | `ke_pin` | Kenya Revenue Authority Personal Identification Number | + # | Latvia | `eu_vat` | European VAT Number | + # | Liechtenstein | `li_uid` | Liechtensteinian UID Number | + # | Lithuania | `eu_vat` | European VAT Number | + # | Luxembourg | `eu_vat` | European VAT Number | + # | Malaysia | `my_frp` | Malaysian FRP Number | + # | Malaysia | `my_itn` | Malaysian ITN | + # | Malaysia | `my_sst` | Malaysian SST Number | + # | Malta | `eu_vat ` | European VAT Number | + # | Mexico | `mx_rfc` | Mexican RFC Number | + # | Netherlands | `eu_vat` | European VAT Number | + # | New Zealand | `nz_gst` | New Zealand GST Number | + # | Nigeria | `ng_tin` | Nigerian Tax Identification Number | + # | Norway | `no_vat` | Norwegian VAT Number | + # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | + # | Oman | `om_vat` | Omani VAT Number | + # | Peru | `pe_ruc` | Peruvian RUC Number | + # | Philippines | `ph_tin ` | Philippines Tax Identification Number | + # | Poland | `eu_vat` | European VAT Number | + # | Portugal | `eu_vat` | European VAT Number | + # | Romania | `eu_vat` | European VAT Number | + # | Romania | `ro_tin` | Romanian Tax ID Number | + # | Russia | `ru_inn` | Russian INN | + # | Russia | `ru_kpp` | Russian KPP | + # | Saudi Arabia | `sa_vat` | Saudi Arabia VAT | + # | Serbia | `rs_pib` | Serbian PIB Number | + # | Singapore | `sg_gst` | Singaporean GST | + # | Singapore | `sg_uen` | Singaporean UEN | + # | Slovakia | `eu_vat` | European VAT Number | + # | Slovenia | `eu_vat` | European VAT Number | + # | Slovenia | `si_tin` | Slovenia Tax Number (davčna številka) | + # | South Africa | `za_vat` | South African VAT Number | + # | South Korea | `kr_brn` | Korean BRN | + # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | + # | Spain | `eu_vat` | European VAT Number | + # | Sweden | `eu_vat` | European VAT Number | + # | Switzerland | `ch_vat` | Switzerland VAT Number | + # | Taiwan | `tw_vat` | Taiwanese VAT | + # | Thailand | `th_vat` | Thai VAT | + # | Turkey | `tr_tin` | Turkish Tax Identification Number | + # | Ukraine | `ua_vat` | Ukrainian VAT | + # | United Arab Emirates | `ae_trn` | United Arab Emirates TRN | + # | United Kingdom | `eu_vat` | Northern Ireland VAT Number | + # | United Kingdom | `gb_vat` | United Kingdom VAT Number | + # | United States | `us_ein` | United States EIN | + # | Uruguay | `uy_ruc` | Uruguayan RUC Number | + # | Venezuela | `ve_rif` | Venezuelan RIF Number | + # | Vietnam | `vn_tin` | Vietnamese Tax ID Number | sig { params(country: Symbol, type: Symbol, value: String).returns(T.attached_class) } def self.new(country:, type:, value:) end diff --git a/rbi/lib/orb/models/customers/balance_transaction_create_params.rbi b/rbi/lib/orb/models/customers/balance_transaction_create_params.rbi index 726b4869..04b5d8f7 100644 --- a/rbi/lib/orb/models/customers/balance_transaction_create_params.rbi +++ b/rbi/lib/orb/models/customers/balance_transaction_create_params.rbi @@ -23,6 +23,7 @@ module Orb def type=(_) end + # An optional description that can be specified around this entry. sig { returns(T.nilable(String)) } def description end diff --git a/rbi/lib/orb/models/customers/balance_transaction_create_response.rbi b/rbi/lib/orb/models/customers/balance_transaction_create_response.rbi index bf6a1e9c..4732159b 100644 --- a/rbi/lib/orb/models/customers/balance_transaction_create_response.rbi +++ b/rbi/lib/orb/models/customers/balance_transaction_create_response.rbi @@ -4,6 +4,7 @@ module Orb module Models module Customers class BalanceTransactionCreateResponse < Orb::BaseModel + # A unique id for this transaction. sig { returns(String) } def id end @@ -20,6 +21,7 @@ module Orb def action=(_) end + # The value of the amount changed in the transaction. sig { returns(String) } def amount end @@ -28,6 +30,7 @@ module Orb def amount=(_) end + # The creation time of this transaction. sig { returns(Time) } def created_at end @@ -47,6 +50,7 @@ module Orb def credit_note=(_) end + # An optional description provided for manual customer balance adjustments. sig { returns(T.nilable(String)) } def description end @@ -55,6 +59,8 @@ module Orb def description=(_) end + # The new value of the customer's balance prior to the transaction, in the + # customer's currency. sig { returns(String) } def ending_balance end @@ -74,6 +80,8 @@ module Orb def invoice=(_) end + # The original value of the customer's balance prior to the transaction, in the + # customer's currency. sig { returns(String) } def starting_balance end @@ -160,6 +168,7 @@ module Orb end class CreditNote < Orb::BaseModel + # The id of the Credit note sig { returns(String) } def id end @@ -178,6 +187,7 @@ module Orb end class Invoice < Orb::BaseModel + # The Invoice id sig { returns(String) } def id end diff --git a/rbi/lib/orb/models/customers/balance_transaction_list_params.rbi b/rbi/lib/orb/models/customers/balance_transaction_list_params.rbi index f74155a3..f2c8375f 100644 --- a/rbi/lib/orb/models/customers/balance_transaction_list_params.rbi +++ b/rbi/lib/orb/models/customers/balance_transaction_list_params.rbi @@ -7,6 +7,8 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters + # Cursor for pagination. This can be populated by the `next_cursor` value returned + # from the initial request. sig { returns(T.nilable(String)) } def cursor end @@ -15,6 +17,7 @@ module Orb def cursor=(_) end + # The number of items to fetch. Defaults to 20. sig { returns(T.nilable(Integer)) } def limit end diff --git a/rbi/lib/orb/models/customers/balance_transaction_list_response.rbi b/rbi/lib/orb/models/customers/balance_transaction_list_response.rbi index ac24264b..8f1630ac 100644 --- a/rbi/lib/orb/models/customers/balance_transaction_list_response.rbi +++ b/rbi/lib/orb/models/customers/balance_transaction_list_response.rbi @@ -4,6 +4,7 @@ module Orb module Models module Customers class BalanceTransactionListResponse < Orb::BaseModel + # A unique id for this transaction. sig { returns(String) } def id end @@ -20,6 +21,7 @@ module Orb def action=(_) end + # The value of the amount changed in the transaction. sig { returns(String) } def amount end @@ -28,6 +30,7 @@ module Orb def amount=(_) end + # The creation time of this transaction. sig { returns(Time) } def created_at end @@ -47,6 +50,7 @@ module Orb def credit_note=(_) end + # An optional description provided for manual customer balance adjustments. sig { returns(T.nilable(String)) } def description end @@ -55,6 +59,8 @@ module Orb def description=(_) end + # The new value of the customer's balance prior to the transaction, in the + # customer's currency. sig { returns(String) } def ending_balance end @@ -74,6 +80,8 @@ module Orb def invoice=(_) end + # The original value of the customer's balance prior to the transaction, in the + # customer's currency. sig { returns(String) } def starting_balance end @@ -160,6 +168,7 @@ module Orb end class CreditNote < Orb::BaseModel + # The id of the Credit note sig { returns(String) } def id end @@ -178,6 +187,7 @@ module Orb end class Invoice < Orb::BaseModel + # The Invoice id sig { returns(String) } def id end diff --git a/rbi/lib/orb/models/customers/cost_list_by_external_id_params.rbi b/rbi/lib/orb/models/customers/cost_list_by_external_id_params.rbi index 03c784da..add70b44 100644 --- a/rbi/lib/orb/models/customers/cost_list_by_external_id_params.rbi +++ b/rbi/lib/orb/models/customers/cost_list_by_external_id_params.rbi @@ -7,6 +7,7 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters + # The currency or custom pricing unit to use. sig { returns(T.nilable(String)) } def currency end @@ -15,6 +16,7 @@ module Orb def currency=(_) end + # Costs returned are exclusive of `timeframe_end`. sig { returns(T.nilable(Time)) } def timeframe_end end @@ -23,6 +25,7 @@ module Orb def timeframe_end=(_) end + # Costs returned are inclusive of `timeframe_start`. sig { returns(T.nilable(Time)) } def timeframe_start end @@ -31,6 +34,10 @@ module Orb def timeframe_start=(_) end + # Controls whether Orb returns cumulative costs since the start of the billing + # period, or incremental day-by-day costs. If your customer has minimums or + # discounts, it's strongly recommended that you use the default cumulative + # behavior. sig { returns(T.nilable(Symbol)) } def view_mode end @@ -67,6 +74,10 @@ module Orb def to_hash end + # Controls whether Orb returns cumulative costs since the start of the billing + # period, or incremental day-by-day costs. If your customer has minimums or + # discounts, it's strongly recommended that you use the default cumulative + # behavior. class ViewMode < Orb::Enum abstract! diff --git a/rbi/lib/orb/models/customers/cost_list_by_external_id_response.rbi b/rbi/lib/orb/models/customers/cost_list_by_external_id_response.rbi index 9325c535..83f9d5ea 100644 --- a/rbi/lib/orb/models/customers/cost_list_by_external_id_response.rbi +++ b/rbi/lib/orb/models/customers/cost_list_by_external_id_response.rbi @@ -38,6 +38,7 @@ module Orb def per_price_costs=(_) end + # Total costs for the timeframe, excluding any minimums and discounts. sig { returns(String) } def subtotal end @@ -62,6 +63,7 @@ module Orb def timeframe_start=(_) end + # Total costs for the timeframe, including any minimums and discounts. sig { returns(String) } def total end @@ -99,6 +101,7 @@ module Orb end class PerPriceCost < Orb::BaseModel + # The price object sig do returns( T.any( @@ -205,6 +208,7 @@ module Orb def price=(_) end + # The price the cost is associated with sig { returns(String) } def price_id end @@ -213,6 +217,7 @@ module Orb def price_id=(_) end + # Price's contributions for the timeframe, excluding any minimums and discounts. sig { returns(String) } def subtotal end @@ -221,6 +226,7 @@ module Orb def subtotal=(_) end + # Price's contributions for the timeframe, including minimums and discounts. sig { returns(String) } def total end @@ -229,6 +235,7 @@ module Orb def total=(_) end + # The price's quantity for the timeframe sig { returns(T.nilable(Float)) } def quantity end diff --git a/rbi/lib/orb/models/customers/cost_list_params.rbi b/rbi/lib/orb/models/customers/cost_list_params.rbi index 118a5b47..b2f27270 100644 --- a/rbi/lib/orb/models/customers/cost_list_params.rbi +++ b/rbi/lib/orb/models/customers/cost_list_params.rbi @@ -7,6 +7,7 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters + # The currency or custom pricing unit to use. sig { returns(T.nilable(String)) } def currency end @@ -15,6 +16,7 @@ module Orb def currency=(_) end + # Costs returned are exclusive of `timeframe_end`. sig { returns(T.nilable(Time)) } def timeframe_end end @@ -23,6 +25,7 @@ module Orb def timeframe_end=(_) end + # Costs returned are inclusive of `timeframe_start`. sig { returns(T.nilable(Time)) } def timeframe_start end @@ -31,6 +34,10 @@ module Orb def timeframe_start=(_) end + # Controls whether Orb returns cumulative costs since the start of the billing + # period, or incremental day-by-day costs. If your customer has minimums or + # discounts, it's strongly recommended that you use the default cumulative + # behavior. sig { returns(T.nilable(Symbol)) } def view_mode end @@ -67,6 +74,10 @@ module Orb def to_hash end + # Controls whether Orb returns cumulative costs since the start of the billing + # period, or incremental day-by-day costs. If your customer has minimums or + # discounts, it's strongly recommended that you use the default cumulative + # behavior. class ViewMode < Orb::Enum abstract! diff --git a/rbi/lib/orb/models/customers/cost_list_response.rbi b/rbi/lib/orb/models/customers/cost_list_response.rbi index dfe00f8b..557ac669 100644 --- a/rbi/lib/orb/models/customers/cost_list_response.rbi +++ b/rbi/lib/orb/models/customers/cost_list_response.rbi @@ -35,6 +35,7 @@ module Orb def per_price_costs=(_) end + # Total costs for the timeframe, excluding any minimums and discounts. sig { returns(String) } def subtotal end @@ -59,6 +60,7 @@ module Orb def timeframe_start=(_) end + # Total costs for the timeframe, including any minimums and discounts. sig { returns(String) } def total end @@ -96,6 +98,7 @@ module Orb end class PerPriceCost < Orb::BaseModel + # The price object sig do returns( T.any( @@ -202,6 +205,7 @@ module Orb def price=(_) end + # The price the cost is associated with sig { returns(String) } def price_id end @@ -210,6 +214,7 @@ module Orb def price_id=(_) end + # Price's contributions for the timeframe, excluding any minimums and discounts. sig { returns(String) } def subtotal end @@ -218,6 +223,7 @@ module Orb def subtotal=(_) end + # Price's contributions for the timeframe, including minimums and discounts. sig { returns(String) } def total end @@ -226,6 +232,7 @@ module Orb def total=(_) end + # The price's quantity for the timeframe sig { returns(T.nilable(Float)) } def quantity end diff --git a/rbi/lib/orb/models/customers/credit_list_by_external_id_params.rbi b/rbi/lib/orb/models/customers/credit_list_by_external_id_params.rbi index 62f6176c..44732388 100644 --- a/rbi/lib/orb/models/customers/credit_list_by_external_id_params.rbi +++ b/rbi/lib/orb/models/customers/credit_list_by_external_id_params.rbi @@ -7,6 +7,7 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters + # The ledger currency or custom pricing unit to use. sig { returns(T.nilable(String)) } def currency end @@ -15,6 +16,8 @@ module Orb def currency=(_) end + # Cursor for pagination. This can be populated by the `next_cursor` value returned + # from the initial request. sig { returns(T.nilable(String)) } def cursor end @@ -23,6 +26,8 @@ module Orb def cursor=(_) end + # If set to True, all expired and depleted blocks, as well as active block will be + # returned. sig { returns(T.nilable(T::Boolean)) } def include_all_blocks end @@ -31,6 +36,7 @@ module Orb def include_all_blocks=(_) end + # The number of items to fetch. Defaults to 20. sig { returns(T.nilable(Integer)) } def limit end diff --git a/rbi/lib/orb/models/customers/credit_list_params.rbi b/rbi/lib/orb/models/customers/credit_list_params.rbi index 4899b93f..043c9823 100644 --- a/rbi/lib/orb/models/customers/credit_list_params.rbi +++ b/rbi/lib/orb/models/customers/credit_list_params.rbi @@ -7,6 +7,7 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters + # The ledger currency or custom pricing unit to use. sig { returns(T.nilable(String)) } def currency end @@ -15,6 +16,8 @@ module Orb def currency=(_) end + # Cursor for pagination. This can be populated by the `next_cursor` value returned + # from the initial request. sig { returns(T.nilable(String)) } def cursor end @@ -23,6 +26,8 @@ module Orb def cursor=(_) end + # If set to True, all expired and depleted blocks, as well as active block will be + # returned. sig { returns(T.nilable(T::Boolean)) } def include_all_blocks end @@ -31,6 +36,7 @@ module Orb def include_all_blocks=(_) end + # The number of items to fetch. Defaults to 20. sig { returns(T.nilable(Integer)) } def limit end diff --git a/rbi/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbi b/rbi/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbi index 0e2190d6..292decb2 100644 --- a/rbi/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbi +++ b/rbi/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbi @@ -8,6 +8,8 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters + # The number of credits to effect. Note that this is required for increment, + # decrement or void operations. sig { returns(Float) } def amount end @@ -24,6 +26,8 @@ module Orb def entry_type=(_) end + # The currency or custom pricing unit to use for this ledger entry. If this is a + # real-world currency, it must match the customer's invoicing currency. sig { returns(T.nilable(String)) } def currency end @@ -32,6 +36,9 @@ module Orb def currency=(_) end + # Optional metadata that can be specified when adding ledger results via the API. + # For example, this can be used to note an increment refers to trial credits, or + # for noting corrections as a result of an incident, etc. sig { returns(T.nilable(String)) } def description end @@ -40,6 +47,8 @@ module Orb def description=(_) end + # An ISO 8601 format date that denotes when this credit balance should become + # available for use. sig { returns(T.nilable(Time)) } def effective_date end @@ -48,6 +57,7 @@ module Orb def effective_date=(_) end + # An ISO 8601 format date that identifies the origination credit block to expire sig { returns(T.nilable(Time)) } def expiry_date end @@ -56,6 +66,10 @@ module Orb def expiry_date=(_) end + # Passing `invoice_settings` automatically generates an invoice for the newly + # added credits. If `invoice_settings` is passed, you must specify + # per_unit_cost_basis, as the calculation of the invoice total is done on that + # basis. sig { returns(T.nilable(Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings)) } def invoice_settings end @@ -69,6 +83,9 @@ module Orb def invoice_settings=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -80,6 +97,8 @@ module Orb def metadata=(_) end + # Can only be specified when entry_type=increment. How much, in the customer's + # currency, a customer paid for a single credit in this block sig { returns(T.nilable(String)) } def per_unit_cost_basis end @@ -88,6 +107,9 @@ module Orb def per_unit_cost_basis=(_) end + # A future date (specified in YYYY-MM-DD format) used for expiration change, + # denoting when credits transferred (as part of a partial block expiration) should + # expire. sig { returns(Date) } def target_expiry_date end @@ -96,6 +118,7 @@ module Orb def target_expiry_date=(_) end + # The ID of the block to reverse a decrement from. sig { returns(String) } def block_id end @@ -104,6 +127,7 @@ module Orb def block_id=(_) end + # Can only be specified when `entry_type=void`. The reason for the void. sig { returns(T.nilable(Symbol)) } def void_reason end @@ -183,6 +207,8 @@ module Orb end class InvoiceSettings < Orb::BaseModel + # Whether the credits purchase invoice should auto collect with the customer's + # saved payment method. sig { returns(T::Boolean) } def auto_collection end @@ -191,6 +217,9 @@ module Orb def auto_collection=(_) end + # The net terms determines the difference between the invoice date and the issue + # date for the invoice. If you intend the invoice to be due on issue, set this + # to 0. sig { returns(Integer) } def net_terms end @@ -199,6 +228,7 @@ module Orb def net_terms=(_) end + # An optional memo to display on the invoice. sig { returns(T.nilable(String)) } def memo end @@ -207,6 +237,8 @@ module Orb def memo=(_) end + # If true, the new credit block will require that the corresponding invoice is + # paid before it can be drawn down from. sig { returns(T.nilable(T::Boolean)) } def require_successful_payment end @@ -215,6 +247,10 @@ module Orb def require_successful_payment=(_) end + # Passing `invoice_settings` automatically generates an invoice for the newly + # added credits. If `invoice_settings` is passed, you must specify + # per_unit_cost_basis, as the calculation of the invoice total is done on that + # basis. sig do params( auto_collection: T::Boolean, @@ -242,6 +278,7 @@ module Orb end end + # Can only be specified when `entry_type=void`. The reason for the void. class VoidReason < Orb::Enum abstract! diff --git a/rbi/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbi b/rbi/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbi index 3569313b..88f5081a 100644 --- a/rbi/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbi +++ b/rbi/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbi @@ -4,6 +4,8 @@ module Orb module Models module Customers module Credits + # The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid + # credits within Orb. class LedgerCreateEntryByExternalIDResponse < Orb::Union abstract! @@ -118,6 +120,10 @@ module Orb def ledger_sequence_number=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -388,6 +394,10 @@ module Orb def ledger_sequence_number=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -691,6 +701,10 @@ module Orb def ledger_sequence_number=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -972,6 +986,10 @@ module Orb def ledger_sequence_number=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -1236,6 +1254,10 @@ module Orb def ledger_sequence_number=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -1528,6 +1550,10 @@ module Orb def ledger_sequence_number=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -1831,6 +1857,10 @@ module Orb def ledger_sequence_number=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -1994,10 +2024,10 @@ module Orb sig do override .returns( - [[Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::IncrementLedgerEntry], [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::DecrementLedgerEntry], [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::ExpirationChangeLedgerEntry], [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::CreditBlockExpiryLedgerEntry], [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidLedgerEntry], [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidInitiatedLedgerEntry], [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::AmendmentLedgerEntry]] + [Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::IncrementLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::DecrementLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::ExpirationChangeLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::CreditBlockExpiryLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidInitiatedLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::AmendmentLedgerEntry] ) end - private def variants + def variants end end end diff --git a/rbi/lib/orb/models/customers/credits/ledger_create_entry_params.rbi b/rbi/lib/orb/models/customers/credits/ledger_create_entry_params.rbi index 551ab9d9..1f4cd257 100644 --- a/rbi/lib/orb/models/customers/credits/ledger_create_entry_params.rbi +++ b/rbi/lib/orb/models/customers/credits/ledger_create_entry_params.rbi @@ -8,6 +8,8 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters + # The number of credits to effect. Note that this is required for increment, + # decrement or void operations. sig { returns(Float) } def amount end @@ -24,6 +26,8 @@ module Orb def entry_type=(_) end + # The currency or custom pricing unit to use for this ledger entry. If this is a + # real-world currency, it must match the customer's invoicing currency. sig { returns(T.nilable(String)) } def currency end @@ -32,6 +36,9 @@ module Orb def currency=(_) end + # Optional metadata that can be specified when adding ledger results via the API. + # For example, this can be used to note an increment refers to trial credits, or + # for noting corrections as a result of an incident, etc. sig { returns(T.nilable(String)) } def description end @@ -40,6 +47,8 @@ module Orb def description=(_) end + # An ISO 8601 format date that denotes when this credit balance should become + # available for use. sig { returns(T.nilable(Time)) } def effective_date end @@ -48,6 +57,7 @@ module Orb def effective_date=(_) end + # An ISO 8601 format date that identifies the origination credit block to expire sig { returns(T.nilable(Time)) } def expiry_date end @@ -56,6 +66,10 @@ module Orb def expiry_date=(_) end + # Passing `invoice_settings` automatically generates an invoice for the newly + # added credits. If `invoice_settings` is passed, you must specify + # per_unit_cost_basis, as the calculation of the invoice total is done on that + # basis. sig { returns(T.nilable(Orb::Models::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings)) } def invoice_settings end @@ -67,6 +81,9 @@ module Orb def invoice_settings=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -78,6 +95,8 @@ module Orb def metadata=(_) end + # Can only be specified when entry_type=increment. How much, in the customer's + # currency, a customer paid for a single credit in this block sig { returns(T.nilable(String)) } def per_unit_cost_basis end @@ -86,6 +105,9 @@ module Orb def per_unit_cost_basis=(_) end + # A future date (specified in YYYY-MM-DD format) used for expiration change, + # denoting when credits transferred (as part of a partial block expiration) should + # expire. sig { returns(Date) } def target_expiry_date end @@ -94,6 +116,7 @@ module Orb def target_expiry_date=(_) end + # The ID of the block to reverse a decrement from. sig { returns(String) } def block_id end @@ -102,6 +125,7 @@ module Orb def block_id=(_) end + # Can only be specified when `entry_type=void`. The reason for the void. sig { returns(T.nilable(Symbol)) } def void_reason end @@ -181,6 +205,8 @@ module Orb end class InvoiceSettings < Orb::BaseModel + # Whether the credits purchase invoice should auto collect with the customer's + # saved payment method. sig { returns(T::Boolean) } def auto_collection end @@ -189,6 +215,9 @@ module Orb def auto_collection=(_) end + # The net terms determines the difference between the invoice date and the issue + # date for the invoice. If you intend the invoice to be due on issue, set this + # to 0. sig { returns(Integer) } def net_terms end @@ -197,6 +226,7 @@ module Orb def net_terms=(_) end + # An optional memo to display on the invoice. sig { returns(T.nilable(String)) } def memo end @@ -205,6 +235,8 @@ module Orb def memo=(_) end + # If true, the new credit block will require that the corresponding invoice is + # paid before it can be drawn down from. sig { returns(T.nilable(T::Boolean)) } def require_successful_payment end @@ -213,6 +245,10 @@ module Orb def require_successful_payment=(_) end + # Passing `invoice_settings` automatically generates an invoice for the newly + # added credits. If `invoice_settings` is passed, you must specify + # per_unit_cost_basis, as the calculation of the invoice total is done on that + # basis. sig do params( auto_collection: T::Boolean, @@ -240,6 +276,7 @@ module Orb end end + # Can only be specified when `entry_type=void`. The reason for the void. class VoidReason < Orb::Enum abstract! diff --git a/rbi/lib/orb/models/customers/credits/ledger_create_entry_response.rbi b/rbi/lib/orb/models/customers/credits/ledger_create_entry_response.rbi index a6989fdf..af9c7af0 100644 --- a/rbi/lib/orb/models/customers/credits/ledger_create_entry_response.rbi +++ b/rbi/lib/orb/models/customers/credits/ledger_create_entry_response.rbi @@ -4,6 +4,8 @@ module Orb module Models module Customers module Credits + # The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid + # credits within Orb. class LedgerCreateEntryResponse < Orb::Union abstract! @@ -102,6 +104,10 @@ module Orb def ledger_sequence_number=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -356,6 +362,10 @@ module Orb def ledger_sequence_number=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -653,6 +663,10 @@ module Orb def ledger_sequence_number=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -934,6 +948,10 @@ module Orb def ledger_sequence_number=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -1188,6 +1206,10 @@ module Orb def ledger_sequence_number=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -1466,6 +1488,10 @@ module Orb def ledger_sequence_number=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -1753,6 +1779,10 @@ module Orb def ledger_sequence_number=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -1916,10 +1946,10 @@ module Orb sig do override .returns( - [[Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::IncrementLedgerEntry], [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::DecrementLedgerEntry], [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::ExpirationChangeLedgerEntry], [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::CreditBlockExpiryLedgerEntry], [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidLedgerEntry], [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidInitiatedLedgerEntry], [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::AmendmentLedgerEntry]] + [Orb::Models::Customers::Credits::LedgerCreateEntryResponse::IncrementLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::DecrementLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::ExpirationChangeLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::CreditBlockExpiryLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidInitiatedLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::AmendmentLedgerEntry] ) end - private def variants + def variants end end end diff --git a/rbi/lib/orb/models/customers/credits/ledger_list_by_external_id_params.rbi b/rbi/lib/orb/models/customers/credits/ledger_list_by_external_id_params.rbi index 9e16f148..5bdebb0d 100644 --- a/rbi/lib/orb/models/customers/credits/ledger_list_by_external_id_params.rbi +++ b/rbi/lib/orb/models/customers/credits/ledger_list_by_external_id_params.rbi @@ -40,6 +40,7 @@ module Orb def created_at_lte=(_) end + # The ledger currency or custom pricing unit to use. sig { returns(T.nilable(String)) } def currency end @@ -48,6 +49,8 @@ module Orb def currency=(_) end + # Cursor for pagination. This can be populated by the `next_cursor` value returned + # from the initial request. sig { returns(T.nilable(String)) } def cursor end @@ -72,6 +75,7 @@ module Orb def entry_type=(_) end + # The number of items to fetch. Defaults to 20. sig { returns(T.nilable(Integer)) } def limit end diff --git a/rbi/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rbi b/rbi/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rbi index 0898f1d8..bb1d109d 100644 --- a/rbi/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rbi +++ b/rbi/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rbi @@ -4,6 +4,8 @@ module Orb module Models module Customers module Credits + # The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid + # credits within Orb. class LedgerListByExternalIDResponse < Orb::Union abstract! @@ -110,6 +112,10 @@ module Orb def ledger_sequence_number=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -372,6 +378,10 @@ module Orb def ledger_sequence_number=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -675,6 +685,10 @@ module Orb def ledger_sequence_number=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -956,6 +970,10 @@ module Orb def ledger_sequence_number=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -1210,6 +1228,10 @@ module Orb def ledger_sequence_number=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -1502,6 +1524,10 @@ module Orb def ledger_sequence_number=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -1797,6 +1823,10 @@ module Orb def ledger_sequence_number=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -1960,10 +1990,10 @@ module Orb sig do override .returns( - [[Symbol, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::IncrementLedgerEntry], [Symbol, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::DecrementLedgerEntry], [Symbol, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::ExpirationChangeLedgerEntry], [Symbol, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::CreditBlockExpiryLedgerEntry], [Symbol, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidLedgerEntry], [Symbol, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidInitiatedLedgerEntry], [Symbol, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::AmendmentLedgerEntry]] + [Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::IncrementLedgerEntry, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::DecrementLedgerEntry, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::ExpirationChangeLedgerEntry, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::CreditBlockExpiryLedgerEntry, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidLedgerEntry, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidInitiatedLedgerEntry, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::AmendmentLedgerEntry] ) end - private def variants + def variants end end end diff --git a/rbi/lib/orb/models/customers/credits/ledger_list_params.rbi b/rbi/lib/orb/models/customers/credits/ledger_list_params.rbi index b48ceed1..d62829f7 100644 --- a/rbi/lib/orb/models/customers/credits/ledger_list_params.rbi +++ b/rbi/lib/orb/models/customers/credits/ledger_list_params.rbi @@ -40,6 +40,7 @@ module Orb def created_at_lte=(_) end + # The ledger currency or custom pricing unit to use. sig { returns(T.nilable(String)) } def currency end @@ -48,6 +49,8 @@ module Orb def currency=(_) end + # Cursor for pagination. This can be populated by the `next_cursor` value returned + # from the initial request. sig { returns(T.nilable(String)) } def cursor end @@ -72,6 +75,7 @@ module Orb def entry_type=(_) end + # The number of items to fetch. Defaults to 20. sig { returns(T.nilable(Integer)) } def limit end diff --git a/rbi/lib/orb/models/customers/credits/ledger_list_response.rbi b/rbi/lib/orb/models/customers/credits/ledger_list_response.rbi index 176eccf8..4f3545c2 100644 --- a/rbi/lib/orb/models/customers/credits/ledger_list_response.rbi +++ b/rbi/lib/orb/models/customers/credits/ledger_list_response.rbi @@ -4,6 +4,8 @@ module Orb module Models module Customers module Credits + # The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid + # credits within Orb. class LedgerListResponse < Orb::Union abstract! @@ -102,6 +104,10 @@ module Orb def ledger_sequence_number=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -356,6 +362,10 @@ module Orb def ledger_sequence_number=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -643,6 +653,10 @@ module Orb def ledger_sequence_number=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -908,6 +922,10 @@ module Orb def ledger_sequence_number=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -1162,6 +1180,10 @@ module Orb def ledger_sequence_number=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -1438,6 +1460,10 @@ module Orb def ledger_sequence_number=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -1725,6 +1751,10 @@ module Orb def ledger_sequence_number=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -1888,10 +1918,10 @@ module Orb sig do override .returns( - [[Symbol, Orb::Models::Customers::Credits::LedgerListResponse::IncrementLedgerEntry], [Symbol, Orb::Models::Customers::Credits::LedgerListResponse::DecrementLedgerEntry], [Symbol, Orb::Models::Customers::Credits::LedgerListResponse::ExpirationChangeLedgerEntry], [Symbol, Orb::Models::Customers::Credits::LedgerListResponse::CreditBlockExpiryLedgerEntry], [Symbol, Orb::Models::Customers::Credits::LedgerListResponse::VoidLedgerEntry], [Symbol, Orb::Models::Customers::Credits::LedgerListResponse::VoidInitiatedLedgerEntry], [Symbol, Orb::Models::Customers::Credits::LedgerListResponse::AmendmentLedgerEntry]] + [Orb::Models::Customers::Credits::LedgerListResponse::IncrementLedgerEntry, Orb::Models::Customers::Credits::LedgerListResponse::DecrementLedgerEntry, Orb::Models::Customers::Credits::LedgerListResponse::ExpirationChangeLedgerEntry, Orb::Models::Customers::Credits::LedgerListResponse::CreditBlockExpiryLedgerEntry, Orb::Models::Customers::Credits::LedgerListResponse::VoidLedgerEntry, Orb::Models::Customers::Credits::LedgerListResponse::VoidInitiatedLedgerEntry, Orb::Models::Customers::Credits::LedgerListResponse::AmendmentLedgerEntry] ) end - private def variants + def variants end end end diff --git a/rbi/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rbi b/rbi/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rbi index 282d9378..2db90a8f 100644 --- a/rbi/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rbi +++ b/rbi/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rbi @@ -8,6 +8,7 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters + # The amount to increment when the threshold is reached. sig { returns(String) } def amount end @@ -16,6 +17,8 @@ module Orb def amount=(_) end + # The currency or custom pricing unit to use for this top-up. If this is a + # real-world currency, it must match the customer's invoicing currency. sig { returns(String) } def currency end @@ -24,6 +27,7 @@ module Orb def currency=(_) end + # Settings for invoices generated by triggered top-ups. sig { returns(Orb::Models::Customers::Credits::TopUpCreateByExternalIDParams::InvoiceSettings) } def invoice_settings end @@ -35,6 +39,7 @@ module Orb def invoice_settings=(_) end + # How much, in the customer's currency, to charge for each unit. sig { returns(String) } def per_unit_cost_basis end @@ -43,6 +48,8 @@ module Orb def per_unit_cost_basis=(_) end + # The threshold at which to trigger the top-up. If the balance is at or below this + # threshold, the top-up will be triggered. sig { returns(String) } def threshold end @@ -51,6 +58,8 @@ module Orb def threshold=(_) end + # The date from which the top-up is active. If unspecified, the top-up is active + # immediately. sig { returns(T.nilable(Time)) } def active_from end @@ -59,6 +68,8 @@ module Orb def active_from=(_) end + # The number of days or months after which the top-up expires. If unspecified, it + # does not expire. sig { returns(T.nilable(Integer)) } def expires_after end @@ -67,6 +78,7 @@ module Orb def expires_after=(_) end + # The unit of expires_after. sig { returns(T.nilable(Symbol)) } def expires_after_unit end @@ -122,6 +134,8 @@ module Orb end class InvoiceSettings < Orb::BaseModel + # Whether the credits purchase invoice should auto collect with the customer's + # saved payment method. sig { returns(T::Boolean) } def auto_collection end @@ -130,6 +144,9 @@ module Orb def auto_collection=(_) end + # The net terms determines the difference between the invoice date and the issue + # date for the invoice. If you intend the invoice to be due on issue, set this + # to 0. sig { returns(Integer) } def net_terms end @@ -138,6 +155,7 @@ module Orb def net_terms=(_) end + # An optional memo to display on the invoice. sig { returns(T.nilable(String)) } def memo end @@ -146,6 +164,8 @@ module Orb def memo=(_) end + # If true, new credit blocks created by this top-up will require that the + # corresponding invoice is paid before they can be drawn down from. sig { returns(T.nilable(T::Boolean)) } def require_successful_payment end @@ -154,6 +174,7 @@ module Orb def require_successful_payment=(_) end + # Settings for invoices generated by triggered top-ups. sig do params( auto_collection: T::Boolean, @@ -181,6 +202,7 @@ module Orb end end + # The unit of expires_after. class ExpiresAfterUnit < Orb::Enum abstract! diff --git a/rbi/lib/orb/models/customers/credits/top_up_create_by_external_id_response.rbi b/rbi/lib/orb/models/customers/credits/top_up_create_by_external_id_response.rbi index af82aadf..86b3dc17 100644 --- a/rbi/lib/orb/models/customers/credits/top_up_create_by_external_id_response.rbi +++ b/rbi/lib/orb/models/customers/credits/top_up_create_by_external_id_response.rbi @@ -13,6 +13,7 @@ module Orb def id=(_) end + # The amount to increment when the threshold is reached. sig { returns(String) } def amount end @@ -21,6 +22,8 @@ module Orb def amount=(_) end + # The currency or custom pricing unit to use for this top-up. If this is a + # real-world currency, it must match the customer's invoicing currency. sig { returns(String) } def currency end @@ -29,6 +32,7 @@ module Orb def currency=(_) end + # Settings for invoices generated by triggered top-ups. sig { returns(Orb::Models::Customers::Credits::TopUpCreateByExternalIDResponse::InvoiceSettings) } def invoice_settings end @@ -40,6 +44,7 @@ module Orb def invoice_settings=(_) end + # How much, in the customer's currency, to charge for each unit. sig { returns(String) } def per_unit_cost_basis end @@ -48,6 +53,8 @@ module Orb def per_unit_cost_basis=(_) end + # The threshold at which to trigger the top-up. If the balance is at or below this + # threshold, the top-up will be triggered. sig { returns(String) } def threshold end @@ -56,6 +63,8 @@ module Orb def threshold=(_) end + # The number of days or months after which the top-up expires. If unspecified, it + # does not expire. sig { returns(T.nilable(Integer)) } def expires_after end @@ -64,6 +73,7 @@ module Orb def expires_after=(_) end + # The unit of expires_after. sig { returns(T.nilable(Symbol)) } def expires_after_unit end @@ -116,6 +126,8 @@ module Orb end class InvoiceSettings < Orb::BaseModel + # Whether the credits purchase invoice should auto collect with the customer's + # saved payment method. sig { returns(T::Boolean) } def auto_collection end @@ -124,6 +136,9 @@ module Orb def auto_collection=(_) end + # The net terms determines the difference between the invoice date and the issue + # date for the invoice. If you intend the invoice to be due on issue, set this + # to 0. sig { returns(Integer) } def net_terms end @@ -132,6 +147,7 @@ module Orb def net_terms=(_) end + # An optional memo to display on the invoice. sig { returns(T.nilable(String)) } def memo end @@ -140,6 +156,8 @@ module Orb def memo=(_) end + # If true, new credit blocks created by this top-up will require that the + # corresponding invoice is paid before they can be drawn down from. sig { returns(T.nilable(T::Boolean)) } def require_successful_payment end @@ -148,6 +166,7 @@ module Orb def require_successful_payment=(_) end + # Settings for invoices generated by triggered top-ups. sig do params( auto_collection: T::Boolean, @@ -175,6 +194,7 @@ module Orb end end + # The unit of expires_after. class ExpiresAfterUnit < Orb::Enum abstract! diff --git a/rbi/lib/orb/models/customers/credits/top_up_create_params.rbi b/rbi/lib/orb/models/customers/credits/top_up_create_params.rbi index 828f9106..d8eca643 100644 --- a/rbi/lib/orb/models/customers/credits/top_up_create_params.rbi +++ b/rbi/lib/orb/models/customers/credits/top_up_create_params.rbi @@ -8,6 +8,7 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters + # The amount to increment when the threshold is reached. sig { returns(String) } def amount end @@ -16,6 +17,8 @@ module Orb def amount=(_) end + # The currency or custom pricing unit to use for this top-up. If this is a + # real-world currency, it must match the customer's invoicing currency. sig { returns(String) } def currency end @@ -24,6 +27,7 @@ module Orb def currency=(_) end + # Settings for invoices generated by triggered top-ups. sig { returns(Orb::Models::Customers::Credits::TopUpCreateParams::InvoiceSettings) } def invoice_settings end @@ -35,6 +39,7 @@ module Orb def invoice_settings=(_) end + # How much, in the customer's currency, to charge for each unit. sig { returns(String) } def per_unit_cost_basis end @@ -43,6 +48,8 @@ module Orb def per_unit_cost_basis=(_) end + # The threshold at which to trigger the top-up. If the balance is at or below this + # threshold, the top-up will be triggered. sig { returns(String) } def threshold end @@ -51,6 +58,8 @@ module Orb def threshold=(_) end + # The date from which the top-up is active. If unspecified, the top-up is active + # immediately. sig { returns(T.nilable(Time)) } def active_from end @@ -59,6 +68,8 @@ module Orb def active_from=(_) end + # The number of days or months after which the top-up expires. If unspecified, it + # does not expire. sig { returns(T.nilable(Integer)) } def expires_after end @@ -67,6 +78,7 @@ module Orb def expires_after=(_) end + # The unit of expires_after. sig { returns(T.nilable(Symbol)) } def expires_after_unit end @@ -122,6 +134,8 @@ module Orb end class InvoiceSettings < Orb::BaseModel + # Whether the credits purchase invoice should auto collect with the customer's + # saved payment method. sig { returns(T::Boolean) } def auto_collection end @@ -130,6 +144,9 @@ module Orb def auto_collection=(_) end + # The net terms determines the difference between the invoice date and the issue + # date for the invoice. If you intend the invoice to be due on issue, set this + # to 0. sig { returns(Integer) } def net_terms end @@ -138,6 +155,7 @@ module Orb def net_terms=(_) end + # An optional memo to display on the invoice. sig { returns(T.nilable(String)) } def memo end @@ -146,6 +164,8 @@ module Orb def memo=(_) end + # If true, new credit blocks created by this top-up will require that the + # corresponding invoice is paid before they can be drawn down from. sig { returns(T.nilable(T::Boolean)) } def require_successful_payment end @@ -154,6 +174,7 @@ module Orb def require_successful_payment=(_) end + # Settings for invoices generated by triggered top-ups. sig do params( auto_collection: T::Boolean, @@ -181,6 +202,7 @@ module Orb end end + # The unit of expires_after. class ExpiresAfterUnit < Orb::Enum abstract! diff --git a/rbi/lib/orb/models/customers/credits/top_up_create_response.rbi b/rbi/lib/orb/models/customers/credits/top_up_create_response.rbi index f6ee64a5..e0719079 100644 --- a/rbi/lib/orb/models/customers/credits/top_up_create_response.rbi +++ b/rbi/lib/orb/models/customers/credits/top_up_create_response.rbi @@ -13,6 +13,7 @@ module Orb def id=(_) end + # The amount to increment when the threshold is reached. sig { returns(String) } def amount end @@ -21,6 +22,8 @@ module Orb def amount=(_) end + # The currency or custom pricing unit to use for this top-up. If this is a + # real-world currency, it must match the customer's invoicing currency. sig { returns(String) } def currency end @@ -29,6 +32,7 @@ module Orb def currency=(_) end + # Settings for invoices generated by triggered top-ups. sig { returns(Orb::Models::Customers::Credits::TopUpCreateResponse::InvoiceSettings) } def invoice_settings end @@ -40,6 +44,7 @@ module Orb def invoice_settings=(_) end + # How much, in the customer's currency, to charge for each unit. sig { returns(String) } def per_unit_cost_basis end @@ -48,6 +53,8 @@ module Orb def per_unit_cost_basis=(_) end + # The threshold at which to trigger the top-up. If the balance is at or below this + # threshold, the top-up will be triggered. sig { returns(String) } def threshold end @@ -56,6 +63,8 @@ module Orb def threshold=(_) end + # The number of days or months after which the top-up expires. If unspecified, it + # does not expire. sig { returns(T.nilable(Integer)) } def expires_after end @@ -64,6 +73,7 @@ module Orb def expires_after=(_) end + # The unit of expires_after. sig { returns(T.nilable(Symbol)) } def expires_after_unit end @@ -116,6 +126,8 @@ module Orb end class InvoiceSettings < Orb::BaseModel + # Whether the credits purchase invoice should auto collect with the customer's + # saved payment method. sig { returns(T::Boolean) } def auto_collection end @@ -124,6 +136,9 @@ module Orb def auto_collection=(_) end + # The net terms determines the difference between the invoice date and the issue + # date for the invoice. If you intend the invoice to be due on issue, set this + # to 0. sig { returns(Integer) } def net_terms end @@ -132,6 +147,7 @@ module Orb def net_terms=(_) end + # An optional memo to display on the invoice. sig { returns(T.nilable(String)) } def memo end @@ -140,6 +156,8 @@ module Orb def memo=(_) end + # If true, new credit blocks created by this top-up will require that the + # corresponding invoice is paid before they can be drawn down from. sig { returns(T.nilable(T::Boolean)) } def require_successful_payment end @@ -148,6 +166,7 @@ module Orb def require_successful_payment=(_) end + # Settings for invoices generated by triggered top-ups. sig do params( auto_collection: T::Boolean, @@ -175,6 +194,7 @@ module Orb end end + # The unit of expires_after. class ExpiresAfterUnit < Orb::Enum abstract! diff --git a/rbi/lib/orb/models/customers/credits/top_up_list_by_external_id_params.rbi b/rbi/lib/orb/models/customers/credits/top_up_list_by_external_id_params.rbi index cd2cd05b..cf7e12fc 100644 --- a/rbi/lib/orb/models/customers/credits/top_up_list_by_external_id_params.rbi +++ b/rbi/lib/orb/models/customers/credits/top_up_list_by_external_id_params.rbi @@ -8,6 +8,8 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters + # Cursor for pagination. This can be populated by the `next_cursor` value returned + # from the initial request. sig { returns(T.nilable(String)) } def cursor end @@ -16,6 +18,7 @@ module Orb def cursor=(_) end + # The number of items to fetch. Defaults to 20. sig { returns(T.nilable(Integer)) } def limit end diff --git a/rbi/lib/orb/models/customers/credits/top_up_list_by_external_id_response.rbi b/rbi/lib/orb/models/customers/credits/top_up_list_by_external_id_response.rbi index d1490631..b1fdddac 100644 --- a/rbi/lib/orb/models/customers/credits/top_up_list_by_external_id_response.rbi +++ b/rbi/lib/orb/models/customers/credits/top_up_list_by_external_id_response.rbi @@ -13,6 +13,7 @@ module Orb def id=(_) end + # The amount to increment when the threshold is reached. sig { returns(String) } def amount end @@ -21,6 +22,8 @@ module Orb def amount=(_) end + # The currency or custom pricing unit to use for this top-up. If this is a + # real-world currency, it must match the customer's invoicing currency. sig { returns(String) } def currency end @@ -29,6 +32,7 @@ module Orb def currency=(_) end + # Settings for invoices generated by triggered top-ups. sig { returns(Orb::Models::Customers::Credits::TopUpListByExternalIDResponse::InvoiceSettings) } def invoice_settings end @@ -40,6 +44,7 @@ module Orb def invoice_settings=(_) end + # How much, in the customer's currency, to charge for each unit. sig { returns(String) } def per_unit_cost_basis end @@ -48,6 +53,8 @@ module Orb def per_unit_cost_basis=(_) end + # The threshold at which to trigger the top-up. If the balance is at or below this + # threshold, the top-up will be triggered. sig { returns(String) } def threshold end @@ -56,6 +63,8 @@ module Orb def threshold=(_) end + # The number of days or months after which the top-up expires. If unspecified, it + # does not expire. sig { returns(T.nilable(Integer)) } def expires_after end @@ -64,6 +73,7 @@ module Orb def expires_after=(_) end + # The unit of expires_after. sig { returns(T.nilable(Symbol)) } def expires_after_unit end @@ -116,6 +126,8 @@ module Orb end class InvoiceSettings < Orb::BaseModel + # Whether the credits purchase invoice should auto collect with the customer's + # saved payment method. sig { returns(T::Boolean) } def auto_collection end @@ -124,6 +136,9 @@ module Orb def auto_collection=(_) end + # The net terms determines the difference between the invoice date and the issue + # date for the invoice. If you intend the invoice to be due on issue, set this + # to 0. sig { returns(Integer) } def net_terms end @@ -132,6 +147,7 @@ module Orb def net_terms=(_) end + # An optional memo to display on the invoice. sig { returns(T.nilable(String)) } def memo end @@ -140,6 +156,8 @@ module Orb def memo=(_) end + # If true, new credit blocks created by this top-up will require that the + # corresponding invoice is paid before they can be drawn down from. sig { returns(T.nilable(T::Boolean)) } def require_successful_payment end @@ -148,6 +166,7 @@ module Orb def require_successful_payment=(_) end + # Settings for invoices generated by triggered top-ups. sig do params( auto_collection: T::Boolean, @@ -175,6 +194,7 @@ module Orb end end + # The unit of expires_after. class ExpiresAfterUnit < Orb::Enum abstract! diff --git a/rbi/lib/orb/models/customers/credits/top_up_list_params.rbi b/rbi/lib/orb/models/customers/credits/top_up_list_params.rbi index e723598b..45c13da8 100644 --- a/rbi/lib/orb/models/customers/credits/top_up_list_params.rbi +++ b/rbi/lib/orb/models/customers/credits/top_up_list_params.rbi @@ -8,6 +8,8 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters + # Cursor for pagination. This can be populated by the `next_cursor` value returned + # from the initial request. sig { returns(T.nilable(String)) } def cursor end @@ -16,6 +18,7 @@ module Orb def cursor=(_) end + # The number of items to fetch. Defaults to 20. sig { returns(T.nilable(Integer)) } def limit end diff --git a/rbi/lib/orb/models/customers/credits/top_up_list_response.rbi b/rbi/lib/orb/models/customers/credits/top_up_list_response.rbi index b2b59e48..6aa0deaa 100644 --- a/rbi/lib/orb/models/customers/credits/top_up_list_response.rbi +++ b/rbi/lib/orb/models/customers/credits/top_up_list_response.rbi @@ -13,6 +13,7 @@ module Orb def id=(_) end + # The amount to increment when the threshold is reached. sig { returns(String) } def amount end @@ -21,6 +22,8 @@ module Orb def amount=(_) end + # The currency or custom pricing unit to use for this top-up. If this is a + # real-world currency, it must match the customer's invoicing currency. sig { returns(String) } def currency end @@ -29,6 +32,7 @@ module Orb def currency=(_) end + # Settings for invoices generated by triggered top-ups. sig { returns(Orb::Models::Customers::Credits::TopUpListResponse::InvoiceSettings) } def invoice_settings end @@ -40,6 +44,7 @@ module Orb def invoice_settings=(_) end + # How much, in the customer's currency, to charge for each unit. sig { returns(String) } def per_unit_cost_basis end @@ -48,6 +53,8 @@ module Orb def per_unit_cost_basis=(_) end + # The threshold at which to trigger the top-up. If the balance is at or below this + # threshold, the top-up will be triggered. sig { returns(String) } def threshold end @@ -56,6 +63,8 @@ module Orb def threshold=(_) end + # The number of days or months after which the top-up expires. If unspecified, it + # does not expire. sig { returns(T.nilable(Integer)) } def expires_after end @@ -64,6 +73,7 @@ module Orb def expires_after=(_) end + # The unit of expires_after. sig { returns(T.nilable(Symbol)) } def expires_after_unit end @@ -116,6 +126,8 @@ module Orb end class InvoiceSettings < Orb::BaseModel + # Whether the credits purchase invoice should auto collect with the customer's + # saved payment method. sig { returns(T::Boolean) } def auto_collection end @@ -124,6 +136,9 @@ module Orb def auto_collection=(_) end + # The net terms determines the difference between the invoice date and the issue + # date for the invoice. If you intend the invoice to be due on issue, set this + # to 0. sig { returns(Integer) } def net_terms end @@ -132,6 +147,7 @@ module Orb def net_terms=(_) end + # An optional memo to display on the invoice. sig { returns(T.nilable(String)) } def memo end @@ -140,6 +156,8 @@ module Orb def memo=(_) end + # If true, new credit blocks created by this top-up will require that the + # corresponding invoice is paid before they can be drawn down from. sig { returns(T.nilable(T::Boolean)) } def require_successful_payment end @@ -148,6 +166,7 @@ module Orb def require_successful_payment=(_) end + # Settings for invoices generated by triggered top-ups. sig do params( auto_collection: T::Boolean, @@ -175,6 +194,7 @@ module Orb end end + # The unit of expires_after. class ExpiresAfterUnit < Orb::Enum abstract! diff --git a/rbi/lib/orb/models/dimensional_price_group.rbi b/rbi/lib/orb/models/dimensional_price_group.rbi index 42afb743..aaf63f54 100644 --- a/rbi/lib/orb/models/dimensional_price_group.rbi +++ b/rbi/lib/orb/models/dimensional_price_group.rbi @@ -11,6 +11,9 @@ module Orb def id=(_) end + # The billable metric associated with this dimensional price group. All prices + # associated with this dimensional price group will be computed using this + # billable metric. sig { returns(String) } def billable_metric_id end @@ -19,6 +22,7 @@ module Orb def billable_metric_id=(_) end + # The dimensions that this dimensional price group is defined over sig { returns(T::Array[String]) } def dimensions end @@ -27,6 +31,7 @@ module Orb def dimensions=(_) end + # An alias for the dimensional price group sig { returns(T.nilable(String)) } def external_dimensional_price_group_id end @@ -35,6 +40,10 @@ module Orb def external_dimensional_price_group_id=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -43,6 +52,7 @@ module Orb def metadata=(_) end + # The name of the dimensional price group sig { returns(String) } def name end @@ -51,6 +61,9 @@ module Orb def name=(_) end + # A dimensional price group is used to partition the result of a billable metric + # by a set of dimensions. Prices in a price group must specify the parition used + # to derive their usage. sig do params( id: String, diff --git a/rbi/lib/orb/models/dimensional_price_group_create_params.rbi b/rbi/lib/orb/models/dimensional_price_group_create_params.rbi index c57f67fc..6b8d00d6 100644 --- a/rbi/lib/orb/models/dimensional_price_group_create_params.rbi +++ b/rbi/lib/orb/models/dimensional_price_group_create_params.rbi @@ -14,6 +14,7 @@ module Orb def billable_metric_id=(_) end + # The set of keys (in order) used to disambiguate prices in the group. sig { returns(T::Array[String]) } def dimensions end @@ -38,6 +39,9 @@ module Orb def external_dimensional_price_group_id=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end diff --git a/rbi/lib/orb/models/dimensional_price_group_list_params.rbi b/rbi/lib/orb/models/dimensional_price_group_list_params.rbi index bc4f039a..1316c4a0 100644 --- a/rbi/lib/orb/models/dimensional_price_group_list_params.rbi +++ b/rbi/lib/orb/models/dimensional_price_group_list_params.rbi @@ -6,6 +6,8 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters + # Cursor for pagination. This can be populated by the `next_cursor` value returned + # from the initial request. sig { returns(T.nilable(String)) } def cursor end @@ -14,6 +16,7 @@ module Orb def cursor=(_) end + # The number of items to fetch. Defaults to 20. sig { returns(T.nilable(Integer)) } def limit end diff --git a/rbi/lib/orb/models/discount.rbi b/rbi/lib/orb/models/discount.rbi index feaafa69..acd4124b 100644 --- a/rbi/lib/orb/models/discount.rbi +++ b/rbi/lib/orb/models/discount.rbi @@ -9,10 +9,10 @@ module Orb sig do override .returns( - [[Symbol, Orb::Models::PercentageDiscount], [Symbol, Orb::Models::TrialDiscount], [Symbol, Orb::Models::UsageDiscount], [Symbol, Orb::Models::AmountDiscount]] + [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::UsageDiscount, Orb::Models::AmountDiscount] ) end - private def variants + def variants end end end diff --git a/rbi/lib/orb/models/evaluate_price_group.rbi b/rbi/lib/orb/models/evaluate_price_group.rbi index 9c5fbc0c..02fccefe 100644 --- a/rbi/lib/orb/models/evaluate_price_group.rbi +++ b/rbi/lib/orb/models/evaluate_price_group.rbi @@ -3,6 +3,7 @@ module Orb module Models class EvaluatePriceGroup < Orb::BaseModel + # The price's output for the group sig { returns(String) } def amount end @@ -11,6 +12,7 @@ module Orb def amount=(_) end + # The values for the group in the order specified by `grouping_keys` sig { returns(T::Array[T.any(String, Float, T::Boolean)]) } def grouping_values end @@ -27,6 +29,7 @@ module Orb def grouping_values=(_) end + # The price's usage quantity for the group sig { returns(Float) } def quantity end @@ -57,8 +60,8 @@ module Orb abstract! class << self - sig { override.returns([[NilClass, String], [NilClass, Float], [NilClass, T::Boolean]]) } - private def variants + sig { override.returns([String, Float, T::Boolean]) } + def variants end end end diff --git a/rbi/lib/orb/models/event_deprecate_response.rbi b/rbi/lib/orb/models/event_deprecate_response.rbi index 70a23041..3ef5841a 100644 --- a/rbi/lib/orb/models/event_deprecate_response.rbi +++ b/rbi/lib/orb/models/event_deprecate_response.rbi @@ -3,6 +3,7 @@ module Orb module Models class EventDeprecateResponse < Orb::BaseModel + # event_id of the deprecated event, if successfully updated sig { returns(String) } def deprecated end diff --git a/rbi/lib/orb/models/event_ingest_params.rbi b/rbi/lib/orb/models/event_ingest_params.rbi index 21bd3a3d..3afd650f 100644 --- a/rbi/lib/orb/models/event_ingest_params.rbi +++ b/rbi/lib/orb/models/event_ingest_params.rbi @@ -17,6 +17,8 @@ module Orb def events=(_) end + # If this ingestion request is part of a backfill, this parameter ties the + # ingested events to the backfill sig { returns(T.nilable(String)) } def backfill_id end @@ -25,6 +27,7 @@ module Orb def backfill_id=(_) end + # Flag to enable additional debug information in the endpoint response sig { returns(T.nilable(T::Boolean)) } def debug end @@ -60,6 +63,7 @@ module Orb end class Event < Orb::BaseModel + # A name to meaningfully identify the action or event type. sig { returns(String) } def event_name end @@ -68,6 +72,9 @@ module Orb def event_name=(_) end + # A unique value, generated by the client, that is used to de-duplicate events. + # Exactly one event with a given idempotency key will be ingested, which allows + # for safe request retries. sig { returns(String) } def idempotency_key end @@ -76,6 +83,8 @@ module Orb def idempotency_key=(_) end + # A dictionary of custom properties. Values in this dictionary must be numeric, + # boolean, or strings. Nested dictionaries are disallowed. sig { returns(T.anything) } def properties end @@ -84,6 +93,9 @@ module Orb def properties=(_) end + # An ISO 8601 format date with no timezone offset (i.e. UTC). This should + # represent the time that usage was recorded, and is particularly important to + # attribute usage to a given billing period. sig { returns(Time) } def timestamp end @@ -92,6 +104,7 @@ module Orb def timestamp=(_) end + # The Orb Customer identifier sig { returns(T.nilable(String)) } def customer_id end @@ -100,6 +113,8 @@ module Orb def customer_id=(_) end + # An alias for the Orb customer, whose mapping is specified when creating the + # customer sig { returns(T.nilable(String)) } def external_customer_id end diff --git a/rbi/lib/orb/models/event_ingest_response.rbi b/rbi/lib/orb/models/event_ingest_response.rbi index 4041a66c..5049aac3 100644 --- a/rbi/lib/orb/models/event_ingest_response.rbi +++ b/rbi/lib/orb/models/event_ingest_response.rbi @@ -3,6 +3,8 @@ module Orb module Models class EventIngestResponse < Orb::BaseModel + # Contains all failing validation events. In the case of a 200, this array will + # always be empty. This field will always be present. sig { returns(T::Array[Orb::Models::EventIngestResponse::ValidationFailed]) } def validation_failed end @@ -14,6 +16,8 @@ module Orb def validation_failed=(_) end + # Optional debug information (only present when debug=true is passed to the + # endpoint). Contains ingested and duplicate event idempotency keys. sig { returns(T.nilable(Orb::Models::EventIngestResponse::Debug)) } def debug end @@ -48,6 +52,7 @@ module Orb end class ValidationFailed < Orb::BaseModel + # The passed idempotency_key corresponding to the validation_errors sig { returns(String) } def idempotency_key end @@ -56,6 +61,8 @@ module Orb def idempotency_key=(_) end + # An array of strings corresponding to validation failures for this + # idempotency_key. sig { returns(T::Array[String]) } def validation_errors end @@ -90,6 +97,8 @@ module Orb def ingested=(_) end + # Optional debug information (only present when debug=true is passed to the + # endpoint). Contains ingested and duplicate event idempotency keys. sig { params(duplicate: T::Array[String], ingested: T::Array[String]).returns(T.attached_class) } def self.new(duplicate:, ingested:) end diff --git a/rbi/lib/orb/models/event_search_params.rbi b/rbi/lib/orb/models/event_search_params.rbi index 8128b00a..bd29a28c 100644 --- a/rbi/lib/orb/models/event_search_params.rbi +++ b/rbi/lib/orb/models/event_search_params.rbi @@ -6,6 +6,10 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters + # This is an explicit array of IDs to filter by. Note that an event's ID is the + # idempotency_key that was originally used for ingestion, and this only supports + # events that have not been amended. Values in this array will be treated case + # sensitively. sig { returns(T::Array[String]) } def event_ids end @@ -14,6 +18,8 @@ module Orb def event_ids=(_) end + # The end of the timeframe, exclusive, in which to search events. If not + # specified, the current time is used. sig { returns(T.nilable(Time)) } def timeframe_end end @@ -22,6 +28,8 @@ module Orb def timeframe_end=(_) end + # The start of the timeframe, inclusive, in which to search events. If not + # specified, the one week ago is used. sig { returns(T.nilable(Time)) } def timeframe_start end diff --git a/rbi/lib/orb/models/event_search_response.rbi b/rbi/lib/orb/models/event_search_response.rbi index 28a860a3..516c65df 100644 --- a/rbi/lib/orb/models/event_search_response.rbi +++ b/rbi/lib/orb/models/event_search_response.rbi @@ -23,6 +23,9 @@ module Orb end class Data < Orb::BaseModel + # A unique value, generated by the client, that is used to de-duplicate events. + # Exactly one event with a given idempotency key will be ingested, which allows + # for safe request retries. sig { returns(String) } def id end @@ -31,6 +34,7 @@ module Orb def id=(_) end + # The Orb Customer identifier sig { returns(T.nilable(String)) } def customer_id end @@ -39,6 +43,7 @@ module Orb def customer_id=(_) end + # A boolean indicating whether the event is currently deprecated. sig { returns(T::Boolean) } def deprecated end @@ -47,6 +52,7 @@ module Orb def deprecated=(_) end + # A name to meaningfully identify the action or event type. sig { returns(String) } def event_name end @@ -55,6 +61,8 @@ module Orb def event_name=(_) end + # An alias for the Orb customer, whose mapping is specified when creating the + # customer sig { returns(T.nilable(String)) } def external_customer_id end @@ -63,6 +71,8 @@ module Orb def external_customer_id=(_) end + # A dictionary of custom properties. Values in this dictionary must be numeric, + # boolean, or strings. Nested dictionaries are disallowed. sig { returns(T.anything) } def properties end @@ -71,6 +81,9 @@ module Orb def properties=(_) end + # An ISO 8601 format date with no timezone offset (i.e. UTC). This should + # represent the time that usage was recorded, and is particularly important to + # attribute usage to a given billing period. sig { returns(Time) } def timestamp end @@ -79,6 +92,9 @@ module Orb def timestamp=(_) end + # The [Event](/core-concepts#event) resource represents a usage event that has + # been created for a customer. Events are the core of Orb's usage-based billing + # model, and are used to calculate the usage charges for a given billing period. sig do params( id: String, diff --git a/rbi/lib/orb/models/event_update_params.rbi b/rbi/lib/orb/models/event_update_params.rbi index b444906a..c700c8c7 100644 --- a/rbi/lib/orb/models/event_update_params.rbi +++ b/rbi/lib/orb/models/event_update_params.rbi @@ -6,6 +6,7 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters + # A name to meaningfully identify the action or event type. sig { returns(String) } def event_name end @@ -14,6 +15,8 @@ module Orb def event_name=(_) end + # A dictionary of custom properties. Values in this dictionary must be numeric, + # boolean, or strings. Nested dictionaries are disallowed. sig { returns(T.anything) } def properties end @@ -22,6 +25,9 @@ module Orb def properties=(_) end + # An ISO 8601 format date with no timezone offset (i.e. UTC). This should + # represent the time that usage was recorded, and is particularly important to + # attribute usage to a given billing period. sig { returns(Time) } def timestamp end @@ -30,6 +36,7 @@ module Orb def timestamp=(_) end + # The Orb Customer identifier sig { returns(T.nilable(String)) } def customer_id end @@ -38,6 +45,8 @@ module Orb def customer_id=(_) end + # An alias for the Orb customer, whose mapping is specified when creating the + # customer sig { returns(T.nilable(String)) } def external_customer_id end diff --git a/rbi/lib/orb/models/event_update_response.rbi b/rbi/lib/orb/models/event_update_response.rbi index 4231fb39..89cf4f8d 100644 --- a/rbi/lib/orb/models/event_update_response.rbi +++ b/rbi/lib/orb/models/event_update_response.rbi @@ -3,6 +3,7 @@ module Orb module Models class EventUpdateResponse < Orb::BaseModel + # event_id of the amended event, if successfully ingested sig { returns(String) } def amended end diff --git a/rbi/lib/orb/models/events/backfill_close_response.rbi b/rbi/lib/orb/models/events/backfill_close_response.rbi index 778ad3a0..48c0dd22 100644 --- a/rbi/lib/orb/models/events/backfill_close_response.rbi +++ b/rbi/lib/orb/models/events/backfill_close_response.rbi @@ -12,6 +12,8 @@ module Orb def id=(_) end + # If in the future, the time at which the backfill will automatically close. If in + # the past, the time at which the backfill was closed. sig { returns(T.nilable(Time)) } def close_time end @@ -28,6 +30,8 @@ module Orb def created_at=(_) end + # The Orb-generated ID of the customer to which this backfill is scoped. If + # `null`, this backfill is scoped to all customers. sig { returns(T.nilable(String)) } def customer_id end @@ -36,6 +40,7 @@ module Orb def customer_id=(_) end + # The number of events ingested in this backfill. sig { returns(Integer) } def events_ingested end @@ -44,6 +49,9 @@ module Orb def events_ingested=(_) end + # If `true`, existing events in the backfill's timeframe will be replaced with the + # newly ingested events associated with the backfill. If `false`, newly ingested + # events will be added to the existing events. sig { returns(T::Boolean) } def replace_existing_events end @@ -52,6 +60,7 @@ module Orb def replace_existing_events=(_) end + # The time at which this backfill was reverted. sig { returns(T.nilable(Time)) } def reverted_at end @@ -60,6 +69,7 @@ module Orb def reverted_at=(_) end + # The status of the backfill. sig { returns(Symbol) } def status end @@ -84,6 +94,9 @@ module Orb def timeframe_start=(_) end + # A boolean + # [computed property](/extensibility/advanced-metrics#computed-properties) used to + # filter the set of events to deprecate sig { returns(T.nilable(String)) } def deprecation_filter end @@ -92,6 +105,8 @@ module Orb def deprecation_filter=(_) end + # A backfill represents an update to historical usage data, adding or replacing + # events in a timeframe. sig do params( id: String, @@ -144,6 +159,7 @@ module Orb def to_hash end + # The status of the backfill. class Status < Orb::Enum abstract! diff --git a/rbi/lib/orb/models/events/backfill_create_params.rbi b/rbi/lib/orb/models/events/backfill_create_params.rbi index c262cdb3..2a82de2a 100644 --- a/rbi/lib/orb/models/events/backfill_create_params.rbi +++ b/rbi/lib/orb/models/events/backfill_create_params.rbi @@ -7,6 +7,9 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters + # The (exclusive) end of the usage timeframe affected by this backfill. By + # default, Orb allows backfills up to 10 days in duration at a time. Reach out to + # discuss extending this limit and your use case. sig { returns(Time) } def timeframe_end end @@ -15,6 +18,9 @@ module Orb def timeframe_end=(_) end + # The (inclusive) start of the usage timeframe affected by this backfill. By + # default, Orb allows backfills up to 10 days in duration at a time. Reach out to + # discuss extending this limit and your use case. sig { returns(Time) } def timeframe_start end @@ -23,6 +29,9 @@ module Orb def timeframe_start=(_) end + # The time at which no more events will be accepted for this backfill. The + # backfill will automatically begin reflecting throughout Orb at the close time. + # If not specified, it will default to 1 day after the creation of the backfill. sig { returns(T.nilable(Time)) } def close_time end @@ -31,6 +40,8 @@ module Orb def close_time=(_) end + # The Orb-generated ID of the customer to which this backfill is scoped. Omitting + # this field will scope the backfill to all customers. sig { returns(T.nilable(String)) } def customer_id end @@ -39,6 +50,9 @@ module Orb def customer_id=(_) end + # A boolean + # [computed property](/extensibility/advanced-metrics#computed-properties) used to + # filter the set of events to deprecate sig { returns(T.nilable(String)) } def deprecation_filter end @@ -47,6 +61,8 @@ module Orb def deprecation_filter=(_) end + # The external customer ID of the customer to which this backfill is scoped. + # Omitting this field will scope the backfill to all customers. sig { returns(T.nilable(String)) } def external_customer_id end @@ -55,6 +71,8 @@ module Orb def external_customer_id=(_) end + # If true, replaces all existing events in the timeframe with the newly ingested + # events. If false, adds the newly ingested events to the existing events. sig { returns(T.nilable(T::Boolean)) } def replace_existing_events end diff --git a/rbi/lib/orb/models/events/backfill_create_response.rbi b/rbi/lib/orb/models/events/backfill_create_response.rbi index 9ebf0b21..afcc3ff3 100644 --- a/rbi/lib/orb/models/events/backfill_create_response.rbi +++ b/rbi/lib/orb/models/events/backfill_create_response.rbi @@ -12,6 +12,8 @@ module Orb def id=(_) end + # If in the future, the time at which the backfill will automatically close. If in + # the past, the time at which the backfill was closed. sig { returns(T.nilable(Time)) } def close_time end @@ -28,6 +30,8 @@ module Orb def created_at=(_) end + # The Orb-generated ID of the customer to which this backfill is scoped. If + # `null`, this backfill is scoped to all customers. sig { returns(T.nilable(String)) } def customer_id end @@ -36,6 +40,7 @@ module Orb def customer_id=(_) end + # The number of events ingested in this backfill. sig { returns(Integer) } def events_ingested end @@ -44,6 +49,9 @@ module Orb def events_ingested=(_) end + # If `true`, existing events in the backfill's timeframe will be replaced with the + # newly ingested events associated with the backfill. If `false`, newly ingested + # events will be added to the existing events. sig { returns(T::Boolean) } def replace_existing_events end @@ -52,6 +60,7 @@ module Orb def replace_existing_events=(_) end + # The time at which this backfill was reverted. sig { returns(T.nilable(Time)) } def reverted_at end @@ -60,6 +69,7 @@ module Orb def reverted_at=(_) end + # The status of the backfill. sig { returns(Symbol) } def status end @@ -84,6 +94,9 @@ module Orb def timeframe_start=(_) end + # A boolean + # [computed property](/extensibility/advanced-metrics#computed-properties) used to + # filter the set of events to deprecate sig { returns(T.nilable(String)) } def deprecation_filter end @@ -92,6 +105,8 @@ module Orb def deprecation_filter=(_) end + # A backfill represents an update to historical usage data, adding or replacing + # events in a timeframe. sig do params( id: String, @@ -144,6 +159,7 @@ module Orb def to_hash end + # The status of the backfill. class Status < Orb::Enum abstract! diff --git a/rbi/lib/orb/models/events/backfill_fetch_response.rbi b/rbi/lib/orb/models/events/backfill_fetch_response.rbi index 2028ab00..f0347db8 100644 --- a/rbi/lib/orb/models/events/backfill_fetch_response.rbi +++ b/rbi/lib/orb/models/events/backfill_fetch_response.rbi @@ -12,6 +12,8 @@ module Orb def id=(_) end + # If in the future, the time at which the backfill will automatically close. If in + # the past, the time at which the backfill was closed. sig { returns(T.nilable(Time)) } def close_time end @@ -28,6 +30,8 @@ module Orb def created_at=(_) end + # The Orb-generated ID of the customer to which this backfill is scoped. If + # `null`, this backfill is scoped to all customers. sig { returns(T.nilable(String)) } def customer_id end @@ -36,6 +40,7 @@ module Orb def customer_id=(_) end + # The number of events ingested in this backfill. sig { returns(Integer) } def events_ingested end @@ -44,6 +49,9 @@ module Orb def events_ingested=(_) end + # If `true`, existing events in the backfill's timeframe will be replaced with the + # newly ingested events associated with the backfill. If `false`, newly ingested + # events will be added to the existing events. sig { returns(T::Boolean) } def replace_existing_events end @@ -52,6 +60,7 @@ module Orb def replace_existing_events=(_) end + # The time at which this backfill was reverted. sig { returns(T.nilable(Time)) } def reverted_at end @@ -60,6 +69,7 @@ module Orb def reverted_at=(_) end + # The status of the backfill. sig { returns(Symbol) } def status end @@ -84,6 +94,9 @@ module Orb def timeframe_start=(_) end + # A boolean + # [computed property](/extensibility/advanced-metrics#computed-properties) used to + # filter the set of events to deprecate sig { returns(T.nilable(String)) } def deprecation_filter end @@ -92,6 +105,8 @@ module Orb def deprecation_filter=(_) end + # A backfill represents an update to historical usage data, adding or replacing + # events in a timeframe. sig do params( id: String, @@ -144,6 +159,7 @@ module Orb def to_hash end + # The status of the backfill. class Status < Orb::Enum abstract! diff --git a/rbi/lib/orb/models/events/backfill_list_params.rbi b/rbi/lib/orb/models/events/backfill_list_params.rbi index e0e3087c..61b8d98c 100644 --- a/rbi/lib/orb/models/events/backfill_list_params.rbi +++ b/rbi/lib/orb/models/events/backfill_list_params.rbi @@ -7,6 +7,8 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters + # Cursor for pagination. This can be populated by the `next_cursor` value returned + # from the initial request. sig { returns(T.nilable(String)) } def cursor end @@ -15,6 +17,7 @@ module Orb def cursor=(_) end + # The number of items to fetch. Defaults to 20. sig { returns(T.nilable(Integer)) } def limit end diff --git a/rbi/lib/orb/models/events/backfill_list_response.rbi b/rbi/lib/orb/models/events/backfill_list_response.rbi index 2d1593e5..e3563b08 100644 --- a/rbi/lib/orb/models/events/backfill_list_response.rbi +++ b/rbi/lib/orb/models/events/backfill_list_response.rbi @@ -12,6 +12,8 @@ module Orb def id=(_) end + # If in the future, the time at which the backfill will automatically close. If in + # the past, the time at which the backfill was closed. sig { returns(T.nilable(Time)) } def close_time end @@ -28,6 +30,8 @@ module Orb def created_at=(_) end + # The Orb-generated ID of the customer to which this backfill is scoped. If + # `null`, this backfill is scoped to all customers. sig { returns(T.nilable(String)) } def customer_id end @@ -36,6 +40,7 @@ module Orb def customer_id=(_) end + # The number of events ingested in this backfill. sig { returns(Integer) } def events_ingested end @@ -44,6 +49,9 @@ module Orb def events_ingested=(_) end + # If `true`, existing events in the backfill's timeframe will be replaced with the + # newly ingested events associated with the backfill. If `false`, newly ingested + # events will be added to the existing events. sig { returns(T::Boolean) } def replace_existing_events end @@ -52,6 +60,7 @@ module Orb def replace_existing_events=(_) end + # The time at which this backfill was reverted. sig { returns(T.nilable(Time)) } def reverted_at end @@ -60,6 +69,7 @@ module Orb def reverted_at=(_) end + # The status of the backfill. sig { returns(Symbol) } def status end @@ -84,6 +94,9 @@ module Orb def timeframe_start=(_) end + # A boolean + # [computed property](/extensibility/advanced-metrics#computed-properties) used to + # filter the set of events to deprecate sig { returns(T.nilable(String)) } def deprecation_filter end @@ -92,6 +105,8 @@ module Orb def deprecation_filter=(_) end + # A backfill represents an update to historical usage data, adding or replacing + # events in a timeframe. sig do params( id: String, @@ -144,6 +159,7 @@ module Orb def to_hash end + # The status of the backfill. class Status < Orb::Enum abstract! diff --git a/rbi/lib/orb/models/events/backfill_revert_response.rbi b/rbi/lib/orb/models/events/backfill_revert_response.rbi index e6751e19..b76f7be9 100644 --- a/rbi/lib/orb/models/events/backfill_revert_response.rbi +++ b/rbi/lib/orb/models/events/backfill_revert_response.rbi @@ -12,6 +12,8 @@ module Orb def id=(_) end + # If in the future, the time at which the backfill will automatically close. If in + # the past, the time at which the backfill was closed. sig { returns(T.nilable(Time)) } def close_time end @@ -28,6 +30,8 @@ module Orb def created_at=(_) end + # The Orb-generated ID of the customer to which this backfill is scoped. If + # `null`, this backfill is scoped to all customers. sig { returns(T.nilable(String)) } def customer_id end @@ -36,6 +40,7 @@ module Orb def customer_id=(_) end + # The number of events ingested in this backfill. sig { returns(Integer) } def events_ingested end @@ -44,6 +49,9 @@ module Orb def events_ingested=(_) end + # If `true`, existing events in the backfill's timeframe will be replaced with the + # newly ingested events associated with the backfill. If `false`, newly ingested + # events will be added to the existing events. sig { returns(T::Boolean) } def replace_existing_events end @@ -52,6 +60,7 @@ module Orb def replace_existing_events=(_) end + # The time at which this backfill was reverted. sig { returns(T.nilable(Time)) } def reverted_at end @@ -60,6 +69,7 @@ module Orb def reverted_at=(_) end + # The status of the backfill. sig { returns(Symbol) } def status end @@ -84,6 +94,9 @@ module Orb def timeframe_start=(_) end + # A boolean + # [computed property](/extensibility/advanced-metrics#computed-properties) used to + # filter the set of events to deprecate sig { returns(T.nilable(String)) } def deprecation_filter end @@ -92,6 +105,8 @@ module Orb def deprecation_filter=(_) end + # A backfill represents an update to historical usage data, adding or replacing + # events in a timeframe. sig do params( id: String, @@ -144,6 +159,7 @@ module Orb def to_hash end + # The status of the backfill. class Status < Orb::Enum abstract! diff --git a/rbi/lib/orb/models/events/event_volumes.rbi b/rbi/lib/orb/models/events/event_volumes.rbi index 2d05d783..1d823baa 100644 --- a/rbi/lib/orb/models/events/event_volumes.rbi +++ b/rbi/lib/orb/models/events/event_volumes.rbi @@ -26,6 +26,7 @@ module Orb end class Data < Orb::BaseModel + # The number of events ingested with a timestamp between the timeframe sig { returns(Integer) } def count end @@ -50,6 +51,8 @@ module Orb def timeframe_start=(_) end + # An EventVolume contains the event volume ingested in an hourly window. The + # timestamp used for the aggregation is the `timestamp` datetime field on events. sig { params(count: Integer, timeframe_end: Time, timeframe_start: Time).returns(T.attached_class) } def self.new(count:, timeframe_end:, timeframe_start:) end diff --git a/rbi/lib/orb/models/events/volume_list_params.rbi b/rbi/lib/orb/models/events/volume_list_params.rbi index 1d389d76..a6c4cbb4 100644 --- a/rbi/lib/orb/models/events/volume_list_params.rbi +++ b/rbi/lib/orb/models/events/volume_list_params.rbi @@ -7,6 +7,10 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters + # The start of the timeframe, inclusive, in which to return event volume. All + # datetime values are converted to UTC time. If the specified time isn't + # hour-aligned, the response includes the event volume count for the hour the time + # falls in. sig { returns(Time) } def timeframe_start end @@ -15,6 +19,8 @@ module Orb def timeframe_start=(_) end + # Cursor for pagination. This can be populated by the `next_cursor` value returned + # from the initial request. sig { returns(T.nilable(String)) } def cursor end @@ -23,6 +29,7 @@ module Orb def cursor=(_) end + # The number of items to fetch. Defaults to 20. sig { returns(T.nilable(Integer)) } def limit end @@ -31,6 +38,10 @@ module Orb def limit=(_) end + # The end of the timeframe, exclusive, in which to return event volume. If not + # specified, the current time is used. All datetime values are converted to UTC + # time.If the specified time isn't hour-aligned, the response includes the event + # volumecount for the hour the time falls in. sig { returns(T.nilable(Time)) } def timeframe_end end diff --git a/rbi/lib/orb/models/invoice.rbi b/rbi/lib/orb/models/invoice.rbi index 6d496468..83e3207b 100644 --- a/rbi/lib/orb/models/invoice.rbi +++ b/rbi/lib/orb/models/invoice.rbi @@ -11,6 +11,8 @@ module Orb def id=(_) end + # This is the final amount required to be charged to the customer and reflects the + # application of the customer balance to the `total` of the invoice. sig { returns(String) } def amount_due end @@ -38,6 +40,7 @@ module Orb def billing_address=(_) end + # The creation time of the resource in Orb. sig { returns(Time) } def created_at end @@ -46,6 +49,7 @@ module Orb def created_at=(_) end + # A list of credit notes associated with the invoice sig { returns(T::Array[Orb::Models::Invoice::CreditNote]) } def credit_notes end @@ -54,6 +58,7 @@ module Orb def credit_notes=(_) end + # An ISO 4217 currency string or `credits` sig { returns(String) } def currency end @@ -81,6 +86,111 @@ module Orb def customer_balance_transactions=(_) end + # Tax IDs are commonly required to be displayed on customer invoices, which are + # added to the headers of invoices. + # + # ### Supported Tax ID Countries and Types + # + # | Country | Type | Description | + # | -------------------- | ------------ | ------------------------------------------------------------------------------------------------------- | + # | Andorra | `ad_nrt` | Andorran NRT Number | + # | Argentina | `ar_cuit` | Argentinian Tax ID Number | + # | Australia | `au_abn` | Australian Business Number (AU ABN) | + # | Australia | `au_arn` | Australian Taxation Office Reference Number | + # | Austria | `eu_vat` | European VAT Number | + # | Bahrain | `bh_vat` | Bahraini VAT Number | + # | Belgium | `eu_vat` | European VAT Number | + # | Bolivia | `bo_tin` | Bolivian Tax ID | + # | Brazil | `br_cnpj` | Brazilian CNPJ Number | + # | Brazil | `br_cpf` | Brazilian CPF Number | + # | Bulgaria | `bg_uic` | Bulgaria Unified Identification Code | + # | Bulgaria | `eu_vat` | European VAT Number | + # | Canada | `ca_bn` | Canadian BN | + # | Canada | `ca_gst_hst` | Canadian GST/HST Number | + # | Canada | `ca_pst_bc` | Canadian PST Number (British Columbia) | + # | Canada | `ca_pst_mb` | Canadian PST Number (Manitoba) | + # | Canada | `ca_pst_sk` | Canadian PST Number (Saskatchewan) | + # | Canada | `ca_qst` | Canadian QST Number (Québec) | + # | Chile | `cl_tin` | Chilean TIN | + # | China | `cn_tin` | Chinese Tax ID | + # | Colombia | `co_nit` | Colombian NIT Number | + # | Costa Rica | `cr_tin` | Costa Rican Tax ID | + # | Croatia | `eu_vat` | European VAT Number | + # | Cyprus | `eu_vat` | European VAT Number | + # | Czech Republic | `eu_vat` | European VAT Number | + # | Denmark | `eu_vat` | European VAT Number | + # | Dominican Republic | `do_rcn` | Dominican RCN Number | + # | Ecuador | `ec_ruc` | Ecuadorian RUC Number | + # | Egypt | `eg_tin` | Egyptian Tax Identification Number | + # | El Salvador | `sv_nit` | El Salvadorian NIT Number | + # | Estonia | `eu_vat` | European VAT Number | + # | EU | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Finland | `eu_vat` | European VAT Number | + # | France | `eu_vat` | European VAT Number | + # | Georgia | `ge_vat` | Georgian VAT | + # | Germany | `eu_vat` | European VAT Number | + # | Greece | `eu_vat` | European VAT Number | + # | Hong Kong | `hk_br` | Hong Kong BR Number | + # | Hungary | `eu_vat` | European VAT Number | + # | Hungary | `hu_tin` | Hungary Tax Number (adószám) | + # | Iceland | `is_vat` | Icelandic VAT | + # | India | `in_gst` | Indian GST Number | + # | Indonesia | `id_npwp` | Indonesian NPWP Number | + # | Ireland | `eu_vat` | European VAT Number | + # | Israel | `il_vat` | Israel VAT | + # | Italy | `eu_vat` | European VAT Number | + # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | + # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | + # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | + # | Kazakhstan | `kz_bin` | Kazakhstani Business Identification Number | + # | Kenya | `ke_pin` | Kenya Revenue Authority Personal Identification Number | + # | Latvia | `eu_vat` | European VAT Number | + # | Liechtenstein | `li_uid` | Liechtensteinian UID Number | + # | Lithuania | `eu_vat` | European VAT Number | + # | Luxembourg | `eu_vat` | European VAT Number | + # | Malaysia | `my_frp` | Malaysian FRP Number | + # | Malaysia | `my_itn` | Malaysian ITN | + # | Malaysia | `my_sst` | Malaysian SST Number | + # | Malta | `eu_vat ` | European VAT Number | + # | Mexico | `mx_rfc` | Mexican RFC Number | + # | Netherlands | `eu_vat` | European VAT Number | + # | New Zealand | `nz_gst` | New Zealand GST Number | + # | Nigeria | `ng_tin` | Nigerian Tax Identification Number | + # | Norway | `no_vat` | Norwegian VAT Number | + # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | + # | Oman | `om_vat` | Omani VAT Number | + # | Peru | `pe_ruc` | Peruvian RUC Number | + # | Philippines | `ph_tin ` | Philippines Tax Identification Number | + # | Poland | `eu_vat` | European VAT Number | + # | Portugal | `eu_vat` | European VAT Number | + # | Romania | `eu_vat` | European VAT Number | + # | Romania | `ro_tin` | Romanian Tax ID Number | + # | Russia | `ru_inn` | Russian INN | + # | Russia | `ru_kpp` | Russian KPP | + # | Saudi Arabia | `sa_vat` | Saudi Arabia VAT | + # | Serbia | `rs_pib` | Serbian PIB Number | + # | Singapore | `sg_gst` | Singaporean GST | + # | Singapore | `sg_uen` | Singaporean UEN | + # | Slovakia | `eu_vat` | European VAT Number | + # | Slovenia | `eu_vat` | European VAT Number | + # | Slovenia | `si_tin` | Slovenia Tax Number (davčna številka) | + # | South Africa | `za_vat` | South African VAT Number | + # | South Korea | `kr_brn` | Korean BRN | + # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | + # | Spain | `eu_vat` | European VAT Number | + # | Sweden | `eu_vat` | European VAT Number | + # | Switzerland | `ch_vat` | Switzerland VAT Number | + # | Taiwan | `tw_vat` | Taiwanese VAT | + # | Thailand | `th_vat` | Thai VAT | + # | Turkey | `tr_tin` | Turkish Tax Identification Number | + # | Ukraine | `ua_vat` | Ukrainian VAT | + # | United Arab Emirates | `ae_trn` | United Arab Emirates TRN | + # | United Kingdom | `eu_vat` | Northern Ireland VAT Number | + # | United Kingdom | `gb_vat` | United Kingdom VAT Number | + # | United States | `us_ein` | United States EIN | + # | Uruguay | `uy_ruc` | Uruguayan RUC Number | + # | Venezuela | `ve_rif` | Venezuelan RIF Number | + # | Vietnam | `vn_tin` | Vietnamese Tax ID Number | sig { returns(T.nilable(Orb::Models::Invoice::CustomerTaxID)) } def customer_tax_id end @@ -92,6 +202,9 @@ module Orb def customer_tax_id=(_) end + # This field is deprecated in favor of `discounts`. If a `discounts` list is + # provided, the first discount in the list will be returned. If the list is empty, + # `None` will be returned. sig { returns(T.anything) } def discount end @@ -119,6 +232,8 @@ module Orb def discounts=(_) end + # When the invoice payment is due. The due date is null if the invoice is not yet + # finalized. sig { returns(T.nilable(Time)) } def due_date end @@ -127,6 +242,9 @@ module Orb def due_date=(_) end + # If the invoice has a status of `draft`, this will be the time that the invoice + # will be eligible to be issued, otherwise it will be `null`. If `auto-issue` is + # true, the invoice will automatically begin issuing at this time. sig { returns(T.nilable(Time)) } def eligible_to_issue_at end @@ -135,6 +253,8 @@ module Orb def eligible_to_issue_at=(_) end + # A URL for the customer-facing invoice portal. This URL expires 30 days after the + # invoice's due date, or 60 days after being re-generated through the UI. sig { returns(T.nilable(String)) } def hosted_invoice_url end @@ -143,6 +263,7 @@ module Orb def hosted_invoice_url=(_) end + # The scheduled date of the invoice sig { returns(Time) } def invoice_date end @@ -151,6 +272,9 @@ module Orb def invoice_date=(_) end + # Automatically generated invoice number to help track and reconcile invoices. + # Invoice numbers have a prefix such as `RFOBWG`. These can be sequential per + # account or customer. sig { returns(String) } def invoice_number end @@ -159,6 +283,7 @@ module Orb def invoice_number=(_) end + # The link to download the PDF representation of the `Invoice`. sig { returns(T.nilable(String)) } def invoice_pdf end @@ -175,6 +300,8 @@ module Orb def invoice_source=(_) end + # If the invoice failed to issue, this will be the last time it failed to issue + # (even if it is now in a different state.) sig { returns(T.nilable(Time)) } def issue_failed_at end @@ -183,6 +310,8 @@ module Orb def issue_failed_at=(_) end + # If the invoice has been issued, this will be the time it transitioned to + # `issued` (even if it is now in a different state.) sig { returns(T.nilable(Time)) } def issued_at end @@ -191,6 +320,7 @@ module Orb def issued_at=(_) end + # The breakdown of prices in this invoice. sig { returns(T::Array[Orb::Models::Invoice::LineItem]) } def line_items end @@ -215,6 +345,7 @@ module Orb def maximum_amount=(_) end + # Free-form text which is available on the invoice PDF and the Orb invoice portal. sig { returns(T.nilable(String)) } def memo end @@ -223,6 +354,10 @@ module Orb def memo=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -247,6 +382,8 @@ module Orb def minimum_amount=(_) end + # If the invoice has a status of `paid`, this gives a timestamp when the invoice + # was paid. sig { returns(T.nilable(Time)) } def paid_at end @@ -255,6 +392,7 @@ module Orb def paid_at=(_) end + # A list of payment attempts associated with the invoice sig { returns(T::Array[Orb::Models::Invoice::PaymentAttempt]) } def payment_attempts end @@ -266,6 +404,8 @@ module Orb def payment_attempts=(_) end + # If payment was attempted on this invoice but failed, this will be the time of + # the most recent attempt. sig { returns(T.nilable(Time)) } def payment_failed_at end @@ -274,6 +414,9 @@ module Orb def payment_failed_at=(_) end + # If payment was attempted on this invoice, this will be the start time of the + # most recent attempt. This field is especially useful for delayed-notification + # payment mechanisms (like bank transfers), where payment can take 3 days or more. sig { returns(T.nilable(Time)) } def payment_started_at end @@ -282,6 +425,8 @@ module Orb def payment_started_at=(_) end + # If the invoice is in draft, this timestamp will reflect when the invoice is + # scheduled to be issued. sig { returns(T.nilable(Time)) } def scheduled_issue_at end @@ -320,6 +465,7 @@ module Orb def subscription=(_) end + # The total before any discounts and minimums are applied. sig { returns(String) } def subtotal end @@ -328,6 +474,9 @@ module Orb def subtotal=(_) end + # If the invoice failed to sync, this will be the last time an external invoicing + # provider sync was attempted. This field will always be `null` for invoices using + # Orb Invoicing. sig { returns(T.nilable(Time)) } def sync_failed_at end @@ -336,6 +485,7 @@ module Orb def sync_failed_at=(_) end + # The total after any minimums and discounts have been applied. sig { returns(String) } def total end @@ -344,6 +494,8 @@ module Orb def total=(_) end + # If the invoice has a status of `void`, this gives a timestamp when the invoice + # was voided. sig { returns(T.nilable(Time)) } def voided_at end @@ -352,6 +504,8 @@ module Orb def voided_at=(_) end + # This is true if the invoice will be automatically issued in the future, and + # false otherwise. sig { returns(T::Boolean) } def will_auto_issue end @@ -360,6 +514,11 @@ module Orb def will_auto_issue=(_) end + # An [`Invoice`](/core-concepts#invoice) is a fundamental billing entity, + # representing the request for payment for a single subscription. This includes a + # set of line items, which correspond to prices in the subscription's plan and can + # represent fixed recurring fees or usage-based fees. They are generated at the + # end of a billing period, or as the result of an action, such as a cancellation. sig do params( id: String, @@ -503,6 +662,7 @@ module Orb end class AutoCollection < Orb::BaseModel + # True only if auto-collection is enabled for this invoice. sig { returns(T.nilable(T::Boolean)) } def enabled end @@ -511,6 +671,9 @@ module Orb def enabled=(_) end + # If the invoice is scheduled for auto-collection, this field will reflect when + # the next attempt will occur. If dunning has been exhausted, or auto-collection + # is not enabled for this invoice, this field will be `null`. sig { returns(T.nilable(Time)) } def next_attempt_at end @@ -519,6 +682,7 @@ module Orb def next_attempt_at=(_) end + # Number of auto-collection payment attempts. sig { returns(T.nilable(Integer)) } def num_attempts end @@ -527,6 +691,12 @@ module Orb def num_attempts=(_) end + # If Orb has ever attempted payment auto-collection for this invoice, this field + # will reflect when that attempt occurred. In conjunction with `next_attempt_at`, + # this can be used to tell whether the invoice is currently in dunning (that is, + # `previously_attempted_at` is non-null, and `next_attempt_time` is non-null), or + # if dunning has been exhausted (`previously_attempted_at` is non-null, but + # `next_attempt_time` is null). sig { returns(T.nilable(Time)) } def previously_attempted_at end @@ -659,6 +829,7 @@ module Orb def credit_note_number=(_) end + # An optional memo supplied on the credit note. sig { returns(T.nilable(String)) } def memo end @@ -691,6 +862,8 @@ module Orb def type=(_) end + # If the credit note has a status of `void`, this gives a timestamp when the + # credit note was voided. sig { returns(T.nilable(Time)) } def voided_at end @@ -759,6 +932,7 @@ module Orb end class CustomerBalanceTransaction < Orb::BaseModel + # A unique id for this transaction. sig { returns(String) } def id end @@ -775,6 +949,7 @@ module Orb def action=(_) end + # The value of the amount changed in the transaction. sig { returns(String) } def amount end @@ -783,6 +958,7 @@ module Orb def amount=(_) end + # The creation time of this transaction. sig { returns(Time) } def created_at end @@ -802,6 +978,7 @@ module Orb def credit_note=(_) end + # An optional description provided for manual customer balance adjustments. sig { returns(T.nilable(String)) } def description end @@ -810,6 +987,8 @@ module Orb def description=(_) end + # The new value of the customer's balance prior to the transaction, in the + # customer's currency. sig { returns(String) } def ending_balance end @@ -829,6 +1008,8 @@ module Orb def invoice=(_) end + # The original value of the customer's balance prior to the transaction, in the + # customer's currency. sig { returns(String) } def starting_balance end @@ -915,6 +1096,7 @@ module Orb end class CreditNote < Orb::BaseModel + # The id of the Credit note sig { returns(String) } def id end @@ -933,6 +1115,7 @@ module Orb end class Invoice < Orb::BaseModel + # The Invoice id sig { returns(String) } def id end @@ -989,6 +1172,111 @@ module Orb def value=(_) end + # Tax IDs are commonly required to be displayed on customer invoices, which are + # added to the headers of invoices. + # + # ### Supported Tax ID Countries and Types + # + # | Country | Type | Description | + # | -------------------- | ------------ | ------------------------------------------------------------------------------------------------------- | + # | Andorra | `ad_nrt` | Andorran NRT Number | + # | Argentina | `ar_cuit` | Argentinian Tax ID Number | + # | Australia | `au_abn` | Australian Business Number (AU ABN) | + # | Australia | `au_arn` | Australian Taxation Office Reference Number | + # | Austria | `eu_vat` | European VAT Number | + # | Bahrain | `bh_vat` | Bahraini VAT Number | + # | Belgium | `eu_vat` | European VAT Number | + # | Bolivia | `bo_tin` | Bolivian Tax ID | + # | Brazil | `br_cnpj` | Brazilian CNPJ Number | + # | Brazil | `br_cpf` | Brazilian CPF Number | + # | Bulgaria | `bg_uic` | Bulgaria Unified Identification Code | + # | Bulgaria | `eu_vat` | European VAT Number | + # | Canada | `ca_bn` | Canadian BN | + # | Canada | `ca_gst_hst` | Canadian GST/HST Number | + # | Canada | `ca_pst_bc` | Canadian PST Number (British Columbia) | + # | Canada | `ca_pst_mb` | Canadian PST Number (Manitoba) | + # | Canada | `ca_pst_sk` | Canadian PST Number (Saskatchewan) | + # | Canada | `ca_qst` | Canadian QST Number (Québec) | + # | Chile | `cl_tin` | Chilean TIN | + # | China | `cn_tin` | Chinese Tax ID | + # | Colombia | `co_nit` | Colombian NIT Number | + # | Costa Rica | `cr_tin` | Costa Rican Tax ID | + # | Croatia | `eu_vat` | European VAT Number | + # | Cyprus | `eu_vat` | European VAT Number | + # | Czech Republic | `eu_vat` | European VAT Number | + # | Denmark | `eu_vat` | European VAT Number | + # | Dominican Republic | `do_rcn` | Dominican RCN Number | + # | Ecuador | `ec_ruc` | Ecuadorian RUC Number | + # | Egypt | `eg_tin` | Egyptian Tax Identification Number | + # | El Salvador | `sv_nit` | El Salvadorian NIT Number | + # | Estonia | `eu_vat` | European VAT Number | + # | EU | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Finland | `eu_vat` | European VAT Number | + # | France | `eu_vat` | European VAT Number | + # | Georgia | `ge_vat` | Georgian VAT | + # | Germany | `eu_vat` | European VAT Number | + # | Greece | `eu_vat` | European VAT Number | + # | Hong Kong | `hk_br` | Hong Kong BR Number | + # | Hungary | `eu_vat` | European VAT Number | + # | Hungary | `hu_tin` | Hungary Tax Number (adószám) | + # | Iceland | `is_vat` | Icelandic VAT | + # | India | `in_gst` | Indian GST Number | + # | Indonesia | `id_npwp` | Indonesian NPWP Number | + # | Ireland | `eu_vat` | European VAT Number | + # | Israel | `il_vat` | Israel VAT | + # | Italy | `eu_vat` | European VAT Number | + # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | + # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | + # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | + # | Kazakhstan | `kz_bin` | Kazakhstani Business Identification Number | + # | Kenya | `ke_pin` | Kenya Revenue Authority Personal Identification Number | + # | Latvia | `eu_vat` | European VAT Number | + # | Liechtenstein | `li_uid` | Liechtensteinian UID Number | + # | Lithuania | `eu_vat` | European VAT Number | + # | Luxembourg | `eu_vat` | European VAT Number | + # | Malaysia | `my_frp` | Malaysian FRP Number | + # | Malaysia | `my_itn` | Malaysian ITN | + # | Malaysia | `my_sst` | Malaysian SST Number | + # | Malta | `eu_vat ` | European VAT Number | + # | Mexico | `mx_rfc` | Mexican RFC Number | + # | Netherlands | `eu_vat` | European VAT Number | + # | New Zealand | `nz_gst` | New Zealand GST Number | + # | Nigeria | `ng_tin` | Nigerian Tax Identification Number | + # | Norway | `no_vat` | Norwegian VAT Number | + # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | + # | Oman | `om_vat` | Omani VAT Number | + # | Peru | `pe_ruc` | Peruvian RUC Number | + # | Philippines | `ph_tin ` | Philippines Tax Identification Number | + # | Poland | `eu_vat` | European VAT Number | + # | Portugal | `eu_vat` | European VAT Number | + # | Romania | `eu_vat` | European VAT Number | + # | Romania | `ro_tin` | Romanian Tax ID Number | + # | Russia | `ru_inn` | Russian INN | + # | Russia | `ru_kpp` | Russian KPP | + # | Saudi Arabia | `sa_vat` | Saudi Arabia VAT | + # | Serbia | `rs_pib` | Serbian PIB Number | + # | Singapore | `sg_gst` | Singaporean GST | + # | Singapore | `sg_uen` | Singaporean UEN | + # | Slovakia | `eu_vat` | European VAT Number | + # | Slovenia | `eu_vat` | European VAT Number | + # | Slovenia | `si_tin` | Slovenia Tax Number (davčna številka) | + # | South Africa | `za_vat` | South African VAT Number | + # | South Korea | `kr_brn` | Korean BRN | + # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | + # | Spain | `eu_vat` | European VAT Number | + # | Sweden | `eu_vat` | European VAT Number | + # | Switzerland | `ch_vat` | Switzerland VAT Number | + # | Taiwan | `tw_vat` | Taiwanese VAT | + # | Thailand | `th_vat` | Thai VAT | + # | Turkey | `tr_tin` | Turkish Tax Identification Number | + # | Ukraine | `ua_vat` | Ukrainian VAT | + # | United Arab Emirates | `ae_trn` | United Arab Emirates TRN | + # | United Kingdom | `eu_vat` | Northern Ireland VAT Number | + # | United Kingdom | `gb_vat` | United Kingdom VAT Number | + # | United States | `us_ein` | United States EIN | + # | Uruguay | `uy_ruc` | Uruguayan RUC Number | + # | Venezuela | `ve_rif` | Venezuelan RIF Number | + # | Vietnam | `vn_tin` | Vietnamese Tax ID Number | sig { params(country: Symbol, type: Symbol, value: String).returns(T.attached_class) } def self.new(country:, type:, value:) end @@ -1184,6 +1472,7 @@ module Orb end class LineItem < Orb::BaseModel + # A unique ID for this line item. sig { returns(String) } def id end @@ -1192,6 +1481,8 @@ module Orb def id=(_) end + # The line amount after any adjustments and before overage conversion, credits and + # partial invoicing. sig { returns(String) } def adjusted_subtotal end @@ -1200,6 +1491,9 @@ module Orb def adjusted_subtotal=(_) end + # All adjustments applied to the line item in the order they were applied based on + # invoice calculations (ie. usage discounts -> amount discounts -> percentage + # discounts -> minimums -> maximums). sig do returns( T::Array[ @@ -1243,6 +1537,8 @@ module Orb def adjustments=(_) end + # The final amount for a line item after all adjustments and pre paid credits have + # been applied. sig { returns(String) } def amount end @@ -1251,6 +1547,7 @@ module Orb def amount=(_) end + # The number of prepaid credits applied. sig { returns(String) } def credits_applied end @@ -1299,6 +1596,7 @@ module Orb def discount=(_) end + # The end date of the range of time applied for this line item's price. sig { returns(Time) } def end_date end @@ -1307,6 +1605,7 @@ module Orb def end_date=(_) end + # An additional filter that was used to calculate the usage for this line item. sig { returns(T.nilable(String)) } def filter end @@ -1315,6 +1614,9 @@ module Orb def filter=(_) end + # [DEPRECATED] For configured prices that are split by a grouping key, this will + # be populated with the key and a value. The `amount` and `subtotal` will be the + # values for this particular grouping. sig { returns(T.nilable(String)) } def grouping end @@ -1323,6 +1625,7 @@ module Orb def grouping=(_) end + # This field is deprecated in favor of `adjustments`. sig { returns(T.nilable(Orb::Models::Invoice::LineItem::Maximum)) } def maximum end @@ -1334,6 +1637,7 @@ module Orb def maximum=(_) end + # This field is deprecated in favor of `adjustments`. sig { returns(T.nilable(String)) } def maximum_amount end @@ -1342,6 +1646,7 @@ module Orb def maximum_amount=(_) end + # This field is deprecated in favor of `adjustments`. sig { returns(T.nilable(Orb::Models::Invoice::LineItem::Minimum)) } def minimum end @@ -1353,6 +1658,7 @@ module Orb def minimum=(_) end + # This field is deprecated in favor of `adjustments`. sig { returns(T.nilable(String)) } def minimum_amount end @@ -1361,6 +1667,7 @@ module Orb def minimum_amount=(_) end + # The name of the price associated with this line item. sig { returns(String) } def name end @@ -1369,6 +1676,7 @@ module Orb def name=(_) end + # Any amount applied from a partial invoice sig { returns(String) } def partially_invoiced_amount end @@ -1377,6 +1685,16 @@ module Orb def partially_invoiced_amount=(_) end + # The Price resource represents a price that can be billed on a subscription, + # resulting in a charge on an invoice in the form of an invoice line item. Prices + # take a quantity and determine an amount to bill. + # + # Orb supports a few different pricing models out of the box. Each of these models + # is serialized differently in a given Price object. The model_type field + # determines the key for the configuration object that is present. + # + # For more on the types of prices, see + # [the core concepts documentation](/core-concepts#plan-and-price) sig do returns( T.nilable( @@ -1489,6 +1807,7 @@ module Orb def price=(_) end + # Either the fixed fee quantity or the usage during the service period. sig { returns(Float) } def quantity end @@ -1497,6 +1816,7 @@ module Orb def quantity=(_) end + # The start date of the range of time applied for this line item's price. sig { returns(Time) } def start_date end @@ -1505,6 +1825,8 @@ module Orb def start_date=(_) end + # For complex pricing structures, the line item can be broken down further in + # `sub_line_items`. sig do returns( T::Array[ @@ -1542,6 +1864,7 @@ module Orb def sub_line_items=(_) end + # The line amount before before any adjustments. sig { returns(String) } def subtotal end @@ -1550,6 +1873,8 @@ module Orb def subtotal=(_) end + # An array of tax rates and their incurred tax amounts. Empty if no tax + # integration is configured. sig { returns(T::Array[Orb::Models::Invoice::LineItem::TaxAmount]) } def tax_amounts end @@ -1561,6 +1886,7 @@ module Orb def tax_amounts=(_) end + # A list of customer ids that were used to calculate the usage for this line item. sig { returns(T.nilable(T::Array[String])) } def usage_customer_ids end @@ -1778,6 +2104,7 @@ module Orb def adjustment_type=(_) end + # The value applied by an adjustment. sig { returns(String) } def amount end @@ -1786,6 +2113,7 @@ module Orb def amount=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1794,6 +2122,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -1802,6 +2132,7 @@ module Orb def is_invoice_level=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -1810,6 +2141,8 @@ module Orb def reason=(_) end + # The number of usage units by which to discount the price this adjustment applies + # to in a given billing period. sig { returns(Float) } def usage_discount end @@ -1876,6 +2209,7 @@ module Orb def adjustment_type=(_) end + # The value applied by an adjustment. sig { returns(String) } def amount end @@ -1884,6 +2218,8 @@ module Orb def amount=(_) end + # The amount by which to discount the prices this adjustment applies to in a given + # billing period. sig { returns(String) } def amount_discount end @@ -1892,6 +2228,7 @@ module Orb def amount_discount=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1900,6 +2237,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -1908,6 +2247,7 @@ module Orb def is_invoice_level=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -1974,6 +2314,7 @@ module Orb def adjustment_type=(_) end + # The value applied by an adjustment. sig { returns(String) } def amount end @@ -1982,6 +2323,7 @@ module Orb def amount=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1990,6 +2332,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -1998,6 +2342,8 @@ module Orb def is_invoice_level=(_) end + # The percentage (as a value between 0 and 1) by which to discount the price + # intervals this adjustment applies to in a given billing period. sig { returns(Float) } def percentage_discount end @@ -2006,6 +2352,7 @@ module Orb def percentage_discount=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -2072,6 +2419,7 @@ module Orb def adjustment_type=(_) end + # The value applied by an adjustment. sig { returns(String) } def amount end @@ -2080,6 +2428,7 @@ module Orb def amount=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -2088,6 +2437,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -2096,6 +2447,7 @@ module Orb def is_invoice_level=(_) end + # The item ID that revenue from this minimum will be attributed to. sig { returns(String) } def item_id end @@ -2104,6 +2456,8 @@ module Orb def item_id=(_) end + # The minimum amount to charge in a given billing period for the prices this + # adjustment applies to. sig { returns(String) } def minimum_amount end @@ -2112,6 +2466,7 @@ module Orb def minimum_amount=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -2181,6 +2536,7 @@ module Orb def adjustment_type=(_) end + # The value applied by an adjustment. sig { returns(String) } def amount end @@ -2189,6 +2545,7 @@ module Orb def amount=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -2197,6 +2554,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -2205,6 +2564,8 @@ module Orb def is_invoice_level=(_) end + # The maximum amount to charge in a given billing period for the prices this + # adjustment applies to. sig { returns(String) } def maximum_amount end @@ -2213,6 +2574,7 @@ module Orb def maximum_amount=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -2266,15 +2628,17 @@ module Orb sig do override .returns( - [[Symbol, Orb::Models::Invoice::LineItem::Adjustment::MonetaryUsageDiscountAdjustment], [Symbol, Orb::Models::Invoice::LineItem::Adjustment::MonetaryAmountDiscountAdjustment], [Symbol, Orb::Models::Invoice::LineItem::Adjustment::MonetaryPercentageDiscountAdjustment], [Symbol, Orb::Models::Invoice::LineItem::Adjustment::MonetaryMinimumAdjustment], [Symbol, Orb::Models::Invoice::LineItem::Adjustment::MonetaryMaximumAdjustment]] + [Orb::Models::Invoice::LineItem::Adjustment::MonetaryUsageDiscountAdjustment, Orb::Models::Invoice::LineItem::Adjustment::MonetaryAmountDiscountAdjustment, Orb::Models::Invoice::LineItem::Adjustment::MonetaryPercentageDiscountAdjustment, Orb::Models::Invoice::LineItem::Adjustment::MonetaryMinimumAdjustment, Orb::Models::Invoice::LineItem::Adjustment::MonetaryMaximumAdjustment] ) end - private def variants + def variants end end end class Maximum < Orb::BaseModel + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -2283,6 +2647,7 @@ module Orb def applies_to_price_ids=(_) end + # Maximum amount applied sig { returns(String) } def maximum_amount end @@ -2291,6 +2656,7 @@ module Orb def maximum_amount=(_) end + # This field is deprecated in favor of `adjustments`. sig do params(applies_to_price_ids: T::Array[String], maximum_amount: String).returns(T.attached_class) end @@ -2303,6 +2669,8 @@ module Orb end class Minimum < Orb::BaseModel + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -2311,6 +2679,7 @@ module Orb def applies_to_price_ids=(_) end + # Minimum amount applied sig { returns(String) } def minimum_amount end @@ -2319,6 +2688,7 @@ module Orb def minimum_amount=(_) end + # This field is deprecated in favor of `adjustments`. sig do params(applies_to_price_ids: T::Array[String], minimum_amount: String).returns(T.attached_class) end @@ -2334,6 +2704,7 @@ module Orb abstract! class MatrixSubLineItem < Orb::BaseModel + # The total amount for this sub line item. sig { returns(String) } def amount end @@ -2427,6 +2798,7 @@ module Orb def key=(_) end + # No value indicates the default group sig { returns(T.nilable(String)) } def value end @@ -2445,6 +2817,7 @@ module Orb end class MatrixConfig < Orb::BaseModel + # The ordered dimension values for this line item. sig { returns(T::Array[T.nilable(String)]) } def dimension_values end @@ -2464,6 +2837,7 @@ module Orb end class TierSubLineItem < Orb::BaseModel + # The total amount for this sub line item. sig { returns(String) } def amount end @@ -2557,6 +2931,7 @@ module Orb def key=(_) end + # No value indicates the default group sig { returns(T.nilable(String)) } def value end @@ -2616,6 +2991,7 @@ module Orb end class OtherSubLineItem < Orb::BaseModel + # The total amount for this sub line item. sig { returns(String) } def amount end @@ -2696,6 +3072,7 @@ module Orb def key=(_) end + # No value indicates the default group sig { returns(T.nilable(String)) } def value end @@ -2718,15 +3095,16 @@ module Orb sig do override .returns( - [[Symbol, Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem], [Symbol, Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem], [Symbol, Orb::Models::Invoice::LineItem::SubLineItem::OtherSubLineItem]] + [Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem, Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem, Orb::Models::Invoice::LineItem::SubLineItem::OtherSubLineItem] ) end - private def variants + def variants end end end class TaxAmount < Orb::BaseModel + # The amount of additional tax incurred by this tax rate. sig { returns(String) } def amount end @@ -2735,6 +3113,7 @@ module Orb def amount=(_) end + # The human-readable description of the applied tax rate. sig { returns(String) } def tax_rate_description end @@ -2743,6 +3122,7 @@ module Orb def tax_rate_description=(_) end + # The tax rate percentage, out of 100. sig { returns(T.nilable(String)) } def tax_rate_percentage end @@ -2773,6 +3153,8 @@ module Orb end class Maximum < Orb::BaseModel + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -2781,6 +3163,7 @@ module Orb def applies_to_price_ids=(_) end + # Maximum amount applied sig { returns(String) } def maximum_amount end @@ -2801,6 +3184,8 @@ module Orb end class Minimum < Orb::BaseModel + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -2809,6 +3194,7 @@ module Orb def applies_to_price_ids=(_) end + # Minimum amount applied sig { returns(String) } def minimum_amount end @@ -2829,6 +3215,7 @@ module Orb end class PaymentAttempt < Orb::BaseModel + # The ID of the payment attempt. sig { returns(String) } def id end @@ -2837,6 +3224,7 @@ module Orb def id=(_) end + # The amount of the payment attempt. sig { returns(String) } def amount end @@ -2845,6 +3233,7 @@ module Orb def amount=(_) end + # The time at which the payment attempt was created. sig { returns(Time) } def created_at end @@ -2853,6 +3242,7 @@ module Orb def created_at=(_) end + # The payment provider that attempted to collect the payment. sig { returns(T.nilable(Symbol)) } def payment_provider end @@ -2861,6 +3251,7 @@ module Orb def payment_provider=(_) end + # The ID of the payment attempt in the payment provider. sig { returns(T.nilable(String)) } def payment_provider_id end @@ -2869,6 +3260,7 @@ module Orb def payment_provider_id=(_) end + # Whether the payment attempt succeeded. sig { returns(T::Boolean) } def succeeded end @@ -2907,6 +3299,7 @@ module Orb def to_hash end + # The payment provider that attempted to collect the payment. class PaymentProvider < Orb::Enum abstract! diff --git a/rbi/lib/orb/models/invoice_create_params.rbi b/rbi/lib/orb/models/invoice_create_params.rbi index 69442809..71d7e3d6 100644 --- a/rbi/lib/orb/models/invoice_create_params.rbi +++ b/rbi/lib/orb/models/invoice_create_params.rbi @@ -6,6 +6,8 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters + # An ISO 4217 currency string. Must be the same as the customer's currency if it + # is set. sig { returns(String) } def currency end @@ -14,6 +16,8 @@ module Orb def currency=(_) end + # Optional invoice date to set. Must be in the past, if not set, `invoice_date` is + # set to the current time in the customer's timezone. sig { returns(Time) } def invoice_date end @@ -33,6 +37,10 @@ module Orb def line_items=(_) end + # Determines the difference between the invoice issue date for subscription + # invoices as the date that they are due. A value of '0' here represents that the + # invoice is due on issue, whereas a value of 30 represents that the customer has + # 30 days to pay the invoice. sig { returns(Integer) } def net_terms end @@ -41,6 +49,8 @@ module Orb def net_terms=(_) end + # The id of the `Customer` to create this invoice for. One of `customer_id` and + # `external_customer_id` are required. sig { returns(T.nilable(String)) } def customer_id end @@ -49,6 +59,7 @@ module Orb def customer_id=(_) end + # An optional discount to attach to the invoice. sig do returns( T.nilable( @@ -89,6 +100,8 @@ module Orb def discount=(_) end + # The `external_customer_id` of the `Customer` to create this invoice for. One of + # `customer_id` and `external_customer_id` are required. sig { returns(T.nilable(String)) } def external_customer_id end @@ -97,6 +110,7 @@ module Orb def external_customer_id=(_) end + # An optional memo to attach to the invoice. sig { returns(T.nilable(String)) } def memo end @@ -105,6 +119,9 @@ module Orb def memo=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -116,6 +133,8 @@ module Orb def metadata=(_) end + # When true, this invoice will automatically be issued upon creation. When false, + # the resulting invoice will require manual review to issue. Defaulted to false. sig { returns(T.nilable(T::Boolean)) } def will_auto_issue end @@ -191,6 +210,7 @@ module Orb end class LineItem < Orb::BaseModel + # A date string to specify the line item's end date in the customer's timezone. sig { returns(Date) } def end_date end @@ -215,6 +235,7 @@ module Orb def model_type=(_) end + # The name of the line item. sig { returns(String) } def name end @@ -223,6 +244,7 @@ module Orb def name=(_) end + # The number of units on the line item sig { returns(Float) } def quantity end @@ -231,6 +253,7 @@ module Orb def quantity=(_) end + # A date string to specify the line item's start date in the customer's timezone. sig { returns(Date) } def start_date end @@ -295,6 +318,7 @@ module Orb end class UnitConfig < Orb::BaseModel + # Rate per unit of usage sig { returns(String) } def unit_amount end diff --git a/rbi/lib/orb/models/invoice_fetch_upcoming_response.rbi b/rbi/lib/orb/models/invoice_fetch_upcoming_response.rbi index fd141197..63592c02 100644 --- a/rbi/lib/orb/models/invoice_fetch_upcoming_response.rbi +++ b/rbi/lib/orb/models/invoice_fetch_upcoming_response.rbi @@ -11,6 +11,8 @@ module Orb def id=(_) end + # This is the final amount required to be charged to the customer and reflects the + # application of the customer balance to the `total` of the invoice. sig { returns(String) } def amount_due end @@ -41,6 +43,7 @@ module Orb def billing_address=(_) end + # The creation time of the resource in Orb. sig { returns(Time) } def created_at end @@ -49,6 +52,7 @@ module Orb def created_at=(_) end + # A list of credit notes associated with the invoice sig { returns(T::Array[Orb::Models::InvoiceFetchUpcomingResponse::CreditNote]) } def credit_notes end @@ -60,6 +64,7 @@ module Orb def credit_notes=(_) end + # An ISO 4217 currency string or `credits` sig { returns(String) } def currency end @@ -90,6 +95,111 @@ module Orb def customer_balance_transactions=(_) end + # Tax IDs are commonly required to be displayed on customer invoices, which are + # added to the headers of invoices. + # + # ### Supported Tax ID Countries and Types + # + # | Country | Type | Description | + # | -------------------- | ------------ | ------------------------------------------------------------------------------------------------------- | + # | Andorra | `ad_nrt` | Andorran NRT Number | + # | Argentina | `ar_cuit` | Argentinian Tax ID Number | + # | Australia | `au_abn` | Australian Business Number (AU ABN) | + # | Australia | `au_arn` | Australian Taxation Office Reference Number | + # | Austria | `eu_vat` | European VAT Number | + # | Bahrain | `bh_vat` | Bahraini VAT Number | + # | Belgium | `eu_vat` | European VAT Number | + # | Bolivia | `bo_tin` | Bolivian Tax ID | + # | Brazil | `br_cnpj` | Brazilian CNPJ Number | + # | Brazil | `br_cpf` | Brazilian CPF Number | + # | Bulgaria | `bg_uic` | Bulgaria Unified Identification Code | + # | Bulgaria | `eu_vat` | European VAT Number | + # | Canada | `ca_bn` | Canadian BN | + # | Canada | `ca_gst_hst` | Canadian GST/HST Number | + # | Canada | `ca_pst_bc` | Canadian PST Number (British Columbia) | + # | Canada | `ca_pst_mb` | Canadian PST Number (Manitoba) | + # | Canada | `ca_pst_sk` | Canadian PST Number (Saskatchewan) | + # | Canada | `ca_qst` | Canadian QST Number (Québec) | + # | Chile | `cl_tin` | Chilean TIN | + # | China | `cn_tin` | Chinese Tax ID | + # | Colombia | `co_nit` | Colombian NIT Number | + # | Costa Rica | `cr_tin` | Costa Rican Tax ID | + # | Croatia | `eu_vat` | European VAT Number | + # | Cyprus | `eu_vat` | European VAT Number | + # | Czech Republic | `eu_vat` | European VAT Number | + # | Denmark | `eu_vat` | European VAT Number | + # | Dominican Republic | `do_rcn` | Dominican RCN Number | + # | Ecuador | `ec_ruc` | Ecuadorian RUC Number | + # | Egypt | `eg_tin` | Egyptian Tax Identification Number | + # | El Salvador | `sv_nit` | El Salvadorian NIT Number | + # | Estonia | `eu_vat` | European VAT Number | + # | EU | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Finland | `eu_vat` | European VAT Number | + # | France | `eu_vat` | European VAT Number | + # | Georgia | `ge_vat` | Georgian VAT | + # | Germany | `eu_vat` | European VAT Number | + # | Greece | `eu_vat` | European VAT Number | + # | Hong Kong | `hk_br` | Hong Kong BR Number | + # | Hungary | `eu_vat` | European VAT Number | + # | Hungary | `hu_tin` | Hungary Tax Number (adószám) | + # | Iceland | `is_vat` | Icelandic VAT | + # | India | `in_gst` | Indian GST Number | + # | Indonesia | `id_npwp` | Indonesian NPWP Number | + # | Ireland | `eu_vat` | European VAT Number | + # | Israel | `il_vat` | Israel VAT | + # | Italy | `eu_vat` | European VAT Number | + # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | + # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | + # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | + # | Kazakhstan | `kz_bin` | Kazakhstani Business Identification Number | + # | Kenya | `ke_pin` | Kenya Revenue Authority Personal Identification Number | + # | Latvia | `eu_vat` | European VAT Number | + # | Liechtenstein | `li_uid` | Liechtensteinian UID Number | + # | Lithuania | `eu_vat` | European VAT Number | + # | Luxembourg | `eu_vat` | European VAT Number | + # | Malaysia | `my_frp` | Malaysian FRP Number | + # | Malaysia | `my_itn` | Malaysian ITN | + # | Malaysia | `my_sst` | Malaysian SST Number | + # | Malta | `eu_vat ` | European VAT Number | + # | Mexico | `mx_rfc` | Mexican RFC Number | + # | Netherlands | `eu_vat` | European VAT Number | + # | New Zealand | `nz_gst` | New Zealand GST Number | + # | Nigeria | `ng_tin` | Nigerian Tax Identification Number | + # | Norway | `no_vat` | Norwegian VAT Number | + # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | + # | Oman | `om_vat` | Omani VAT Number | + # | Peru | `pe_ruc` | Peruvian RUC Number | + # | Philippines | `ph_tin ` | Philippines Tax Identification Number | + # | Poland | `eu_vat` | European VAT Number | + # | Portugal | `eu_vat` | European VAT Number | + # | Romania | `eu_vat` | European VAT Number | + # | Romania | `ro_tin` | Romanian Tax ID Number | + # | Russia | `ru_inn` | Russian INN | + # | Russia | `ru_kpp` | Russian KPP | + # | Saudi Arabia | `sa_vat` | Saudi Arabia VAT | + # | Serbia | `rs_pib` | Serbian PIB Number | + # | Singapore | `sg_gst` | Singaporean GST | + # | Singapore | `sg_uen` | Singaporean UEN | + # | Slovakia | `eu_vat` | European VAT Number | + # | Slovenia | `eu_vat` | European VAT Number | + # | Slovenia | `si_tin` | Slovenia Tax Number (davčna številka) | + # | South Africa | `za_vat` | South African VAT Number | + # | South Korea | `kr_brn` | Korean BRN | + # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | + # | Spain | `eu_vat` | European VAT Number | + # | Sweden | `eu_vat` | European VAT Number | + # | Switzerland | `ch_vat` | Switzerland VAT Number | + # | Taiwan | `tw_vat` | Taiwanese VAT | + # | Thailand | `th_vat` | Thai VAT | + # | Turkey | `tr_tin` | Turkish Tax Identification Number | + # | Ukraine | `ua_vat` | Ukrainian VAT | + # | United Arab Emirates | `ae_trn` | United Arab Emirates TRN | + # | United Kingdom | `eu_vat` | Northern Ireland VAT Number | + # | United Kingdom | `gb_vat` | United Kingdom VAT Number | + # | United States | `us_ein` | United States EIN | + # | Uruguay | `uy_ruc` | Uruguayan RUC Number | + # | Venezuela | `ve_rif` | Venezuelan RIF Number | + # | Vietnam | `vn_tin` | Vietnamese Tax ID Number | sig { returns(T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::CustomerTaxID)) } def customer_tax_id end @@ -101,6 +211,9 @@ module Orb def customer_tax_id=(_) end + # This field is deprecated in favor of `discounts`. If a `discounts` list is + # provided, the first discount in the list will be returned. If the list is empty, + # `None` will be returned. sig { returns(T.anything) } def discount end @@ -128,6 +241,8 @@ module Orb def discounts=(_) end + # When the invoice payment is due. The due date is null if the invoice is not yet + # finalized. sig { returns(T.nilable(Time)) } def due_date end @@ -136,6 +251,9 @@ module Orb def due_date=(_) end + # If the invoice has a status of `draft`, this will be the time that the invoice + # will be eligible to be issued, otherwise it will be `null`. If `auto-issue` is + # true, the invoice will automatically begin issuing at this time. sig { returns(T.nilable(Time)) } def eligible_to_issue_at end @@ -144,6 +262,8 @@ module Orb def eligible_to_issue_at=(_) end + # A URL for the customer-facing invoice portal. This URL expires 30 days after the + # invoice's due date, or 60 days after being re-generated through the UI. sig { returns(T.nilable(String)) } def hosted_invoice_url end @@ -152,6 +272,9 @@ module Orb def hosted_invoice_url=(_) end + # Automatically generated invoice number to help track and reconcile invoices. + # Invoice numbers have a prefix such as `RFOBWG`. These can be sequential per + # account or customer. sig { returns(String) } def invoice_number end @@ -160,6 +283,7 @@ module Orb def invoice_number=(_) end + # The link to download the PDF representation of the `Invoice`. sig { returns(T.nilable(String)) } def invoice_pdf end @@ -176,6 +300,8 @@ module Orb def invoice_source=(_) end + # If the invoice failed to issue, this will be the last time it failed to issue + # (even if it is now in a different state.) sig { returns(T.nilable(Time)) } def issue_failed_at end @@ -184,6 +310,8 @@ module Orb def issue_failed_at=(_) end + # If the invoice has been issued, this will be the time it transitioned to + # `issued` (even if it is now in a different state.) sig { returns(T.nilable(Time)) } def issued_at end @@ -192,6 +320,7 @@ module Orb def issued_at=(_) end + # The breakdown of prices in this invoice. sig { returns(T::Array[Orb::Models::InvoiceFetchUpcomingResponse::LineItem]) } def line_items end @@ -222,6 +351,7 @@ module Orb def maximum_amount=(_) end + # Free-form text which is available on the invoice PDF and the Orb invoice portal. sig { returns(T.nilable(String)) } def memo end @@ -230,6 +360,10 @@ module Orb def memo=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -257,6 +391,8 @@ module Orb def minimum_amount=(_) end + # If the invoice has a status of `paid`, this gives a timestamp when the invoice + # was paid. sig { returns(T.nilable(Time)) } def paid_at end @@ -265,6 +401,7 @@ module Orb def paid_at=(_) end + # A list of payment attempts associated with the invoice sig { returns(T::Array[Orb::Models::InvoiceFetchUpcomingResponse::PaymentAttempt]) } def payment_attempts end @@ -276,6 +413,8 @@ module Orb def payment_attempts=(_) end + # If payment was attempted on this invoice but failed, this will be the time of + # the most recent attempt. sig { returns(T.nilable(Time)) } def payment_failed_at end @@ -284,6 +423,9 @@ module Orb def payment_failed_at=(_) end + # If payment was attempted on this invoice, this will be the start time of the + # most recent attempt. This field is especially useful for delayed-notification + # payment mechanisms (like bank transfers), where payment can take 3 days or more. sig { returns(T.nilable(Time)) } def payment_started_at end @@ -292,6 +434,8 @@ module Orb def payment_started_at=(_) end + # If the invoice is in draft, this timestamp will reflect when the invoice is + # scheduled to be issued. sig { returns(T.nilable(Time)) } def scheduled_issue_at end @@ -330,6 +474,7 @@ module Orb def subscription=(_) end + # The total before any discounts and minimums are applied. sig { returns(String) } def subtotal end @@ -338,6 +483,9 @@ module Orb def subtotal=(_) end + # If the invoice failed to sync, this will be the last time an external invoicing + # provider sync was attempted. This field will always be `null` for invoices using + # Orb Invoicing. sig { returns(T.nilable(Time)) } def sync_failed_at end @@ -346,6 +494,7 @@ module Orb def sync_failed_at=(_) end + # The scheduled date of the invoice sig { returns(Time) } def target_date end @@ -354,6 +503,7 @@ module Orb def target_date=(_) end + # The total after any minimums and discounts have been applied. sig { returns(String) } def total end @@ -362,6 +512,8 @@ module Orb def total=(_) end + # If the invoice has a status of `void`, this gives a timestamp when the invoice + # was voided. sig { returns(T.nilable(Time)) } def voided_at end @@ -370,6 +522,8 @@ module Orb def voided_at=(_) end + # This is true if the invoice will be automatically issued in the future, and + # false otherwise. sig { returns(T::Boolean) } def will_auto_issue end @@ -521,6 +675,7 @@ module Orb end class AutoCollection < Orb::BaseModel + # True only if auto-collection is enabled for this invoice. sig { returns(T.nilable(T::Boolean)) } def enabled end @@ -529,6 +684,9 @@ module Orb def enabled=(_) end + # If the invoice is scheduled for auto-collection, this field will reflect when + # the next attempt will occur. If dunning has been exhausted, or auto-collection + # is not enabled for this invoice, this field will be `null`. sig { returns(T.nilable(Time)) } def next_attempt_at end @@ -537,6 +695,7 @@ module Orb def next_attempt_at=(_) end + # Number of auto-collection payment attempts. sig { returns(T.nilable(Integer)) } def num_attempts end @@ -545,6 +704,12 @@ module Orb def num_attempts=(_) end + # If Orb has ever attempted payment auto-collection for this invoice, this field + # will reflect when that attempt occurred. In conjunction with `next_attempt_at`, + # this can be used to tell whether the invoice is currently in dunning (that is, + # `previously_attempted_at` is non-null, and `next_attempt_time` is non-null), or + # if dunning has been exhausted (`previously_attempted_at` is non-null, but + # `next_attempt_time` is null). sig { returns(T.nilable(Time)) } def previously_attempted_at end @@ -677,6 +842,7 @@ module Orb def credit_note_number=(_) end + # An optional memo supplied on the credit note. sig { returns(T.nilable(String)) } def memo end @@ -709,6 +875,8 @@ module Orb def type=(_) end + # If the credit note has a status of `void`, this gives a timestamp when the + # credit note was voided. sig { returns(T.nilable(Time)) } def voided_at end @@ -777,6 +945,7 @@ module Orb end class CustomerBalanceTransaction < Orb::BaseModel + # A unique id for this transaction. sig { returns(String) } def id end @@ -793,6 +962,7 @@ module Orb def action=(_) end + # The value of the amount changed in the transaction. sig { returns(String) } def amount end @@ -801,6 +971,7 @@ module Orb def amount=(_) end + # The creation time of this transaction. sig { returns(Time) } def created_at end @@ -820,6 +991,7 @@ module Orb def credit_note=(_) end + # An optional description provided for manual customer balance adjustments. sig { returns(T.nilable(String)) } def description end @@ -828,6 +1000,8 @@ module Orb def description=(_) end + # The new value of the customer's balance prior to the transaction, in the + # customer's currency. sig { returns(String) } def ending_balance end @@ -847,6 +1021,8 @@ module Orb def invoice=(_) end + # The original value of the customer's balance prior to the transaction, in the + # customer's currency. sig { returns(String) } def starting_balance end @@ -933,6 +1109,7 @@ module Orb end class CreditNote < Orb::BaseModel + # The id of the Credit note sig { returns(String) } def id end @@ -951,6 +1128,7 @@ module Orb end class Invoice < Orb::BaseModel + # The Invoice id sig { returns(String) } def id end @@ -1007,6 +1185,111 @@ module Orb def value=(_) end + # Tax IDs are commonly required to be displayed on customer invoices, which are + # added to the headers of invoices. + # + # ### Supported Tax ID Countries and Types + # + # | Country | Type | Description | + # | -------------------- | ------------ | ------------------------------------------------------------------------------------------------------- | + # | Andorra | `ad_nrt` | Andorran NRT Number | + # | Argentina | `ar_cuit` | Argentinian Tax ID Number | + # | Australia | `au_abn` | Australian Business Number (AU ABN) | + # | Australia | `au_arn` | Australian Taxation Office Reference Number | + # | Austria | `eu_vat` | European VAT Number | + # | Bahrain | `bh_vat` | Bahraini VAT Number | + # | Belgium | `eu_vat` | European VAT Number | + # | Bolivia | `bo_tin` | Bolivian Tax ID | + # | Brazil | `br_cnpj` | Brazilian CNPJ Number | + # | Brazil | `br_cpf` | Brazilian CPF Number | + # | Bulgaria | `bg_uic` | Bulgaria Unified Identification Code | + # | Bulgaria | `eu_vat` | European VAT Number | + # | Canada | `ca_bn` | Canadian BN | + # | Canada | `ca_gst_hst` | Canadian GST/HST Number | + # | Canada | `ca_pst_bc` | Canadian PST Number (British Columbia) | + # | Canada | `ca_pst_mb` | Canadian PST Number (Manitoba) | + # | Canada | `ca_pst_sk` | Canadian PST Number (Saskatchewan) | + # | Canada | `ca_qst` | Canadian QST Number (Québec) | + # | Chile | `cl_tin` | Chilean TIN | + # | China | `cn_tin` | Chinese Tax ID | + # | Colombia | `co_nit` | Colombian NIT Number | + # | Costa Rica | `cr_tin` | Costa Rican Tax ID | + # | Croatia | `eu_vat` | European VAT Number | + # | Cyprus | `eu_vat` | European VAT Number | + # | Czech Republic | `eu_vat` | European VAT Number | + # | Denmark | `eu_vat` | European VAT Number | + # | Dominican Republic | `do_rcn` | Dominican RCN Number | + # | Ecuador | `ec_ruc` | Ecuadorian RUC Number | + # | Egypt | `eg_tin` | Egyptian Tax Identification Number | + # | El Salvador | `sv_nit` | El Salvadorian NIT Number | + # | Estonia | `eu_vat` | European VAT Number | + # | EU | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Finland | `eu_vat` | European VAT Number | + # | France | `eu_vat` | European VAT Number | + # | Georgia | `ge_vat` | Georgian VAT | + # | Germany | `eu_vat` | European VAT Number | + # | Greece | `eu_vat` | European VAT Number | + # | Hong Kong | `hk_br` | Hong Kong BR Number | + # | Hungary | `eu_vat` | European VAT Number | + # | Hungary | `hu_tin` | Hungary Tax Number (adószám) | + # | Iceland | `is_vat` | Icelandic VAT | + # | India | `in_gst` | Indian GST Number | + # | Indonesia | `id_npwp` | Indonesian NPWP Number | + # | Ireland | `eu_vat` | European VAT Number | + # | Israel | `il_vat` | Israel VAT | + # | Italy | `eu_vat` | European VAT Number | + # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | + # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | + # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | + # | Kazakhstan | `kz_bin` | Kazakhstani Business Identification Number | + # | Kenya | `ke_pin` | Kenya Revenue Authority Personal Identification Number | + # | Latvia | `eu_vat` | European VAT Number | + # | Liechtenstein | `li_uid` | Liechtensteinian UID Number | + # | Lithuania | `eu_vat` | European VAT Number | + # | Luxembourg | `eu_vat` | European VAT Number | + # | Malaysia | `my_frp` | Malaysian FRP Number | + # | Malaysia | `my_itn` | Malaysian ITN | + # | Malaysia | `my_sst` | Malaysian SST Number | + # | Malta | `eu_vat ` | European VAT Number | + # | Mexico | `mx_rfc` | Mexican RFC Number | + # | Netherlands | `eu_vat` | European VAT Number | + # | New Zealand | `nz_gst` | New Zealand GST Number | + # | Nigeria | `ng_tin` | Nigerian Tax Identification Number | + # | Norway | `no_vat` | Norwegian VAT Number | + # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | + # | Oman | `om_vat` | Omani VAT Number | + # | Peru | `pe_ruc` | Peruvian RUC Number | + # | Philippines | `ph_tin ` | Philippines Tax Identification Number | + # | Poland | `eu_vat` | European VAT Number | + # | Portugal | `eu_vat` | European VAT Number | + # | Romania | `eu_vat` | European VAT Number | + # | Romania | `ro_tin` | Romanian Tax ID Number | + # | Russia | `ru_inn` | Russian INN | + # | Russia | `ru_kpp` | Russian KPP | + # | Saudi Arabia | `sa_vat` | Saudi Arabia VAT | + # | Serbia | `rs_pib` | Serbian PIB Number | + # | Singapore | `sg_gst` | Singaporean GST | + # | Singapore | `sg_uen` | Singaporean UEN | + # | Slovakia | `eu_vat` | European VAT Number | + # | Slovenia | `eu_vat` | European VAT Number | + # | Slovenia | `si_tin` | Slovenia Tax Number (davčna številka) | + # | South Africa | `za_vat` | South African VAT Number | + # | South Korea | `kr_brn` | Korean BRN | + # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | + # | Spain | `eu_vat` | European VAT Number | + # | Sweden | `eu_vat` | European VAT Number | + # | Switzerland | `ch_vat` | Switzerland VAT Number | + # | Taiwan | `tw_vat` | Taiwanese VAT | + # | Thailand | `th_vat` | Thai VAT | + # | Turkey | `tr_tin` | Turkish Tax Identification Number | + # | Ukraine | `ua_vat` | Ukrainian VAT | + # | United Arab Emirates | `ae_trn` | United Arab Emirates TRN | + # | United Kingdom | `eu_vat` | Northern Ireland VAT Number | + # | United Kingdom | `gb_vat` | United Kingdom VAT Number | + # | United States | `us_ein` | United States EIN | + # | Uruguay | `uy_ruc` | Uruguayan RUC Number | + # | Venezuela | `ve_rif` | Venezuelan RIF Number | + # | Vietnam | `vn_tin` | Vietnamese Tax ID Number | sig { params(country: Symbol, type: Symbol, value: String).returns(T.attached_class) } def self.new(country:, type:, value:) end @@ -1202,6 +1485,7 @@ module Orb end class LineItem < Orb::BaseModel + # A unique ID for this line item. sig { returns(String) } def id end @@ -1210,6 +1494,8 @@ module Orb def id=(_) end + # The line amount after any adjustments and before overage conversion, credits and + # partial invoicing. sig { returns(String) } def adjusted_subtotal end @@ -1218,6 +1504,9 @@ module Orb def adjusted_subtotal=(_) end + # All adjustments applied to the line item in the order they were applied based on + # invoice calculations (ie. usage discounts -> amount discounts -> percentage + # discounts -> minimums -> maximums). sig do returns( T::Array[ @@ -1261,6 +1550,8 @@ module Orb def adjustments=(_) end + # The final amount for a line item after all adjustments and pre paid credits have + # been applied. sig { returns(String) } def amount end @@ -1269,6 +1560,7 @@ module Orb def amount=(_) end + # The number of prepaid credits applied. sig { returns(String) } def credits_applied end @@ -1317,6 +1609,7 @@ module Orb def discount=(_) end + # The end date of the range of time applied for this line item's price. sig { returns(Time) } def end_date end @@ -1325,6 +1618,7 @@ module Orb def end_date=(_) end + # An additional filter that was used to calculate the usage for this line item. sig { returns(T.nilable(String)) } def filter end @@ -1333,6 +1627,9 @@ module Orb def filter=(_) end + # [DEPRECATED] For configured prices that are split by a grouping key, this will + # be populated with the key and a value. The `amount` and `subtotal` will be the + # values for this particular grouping. sig { returns(T.nilable(String)) } def grouping end @@ -1341,6 +1638,7 @@ module Orb def grouping=(_) end + # This field is deprecated in favor of `adjustments`. sig { returns(T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Maximum)) } def maximum end @@ -1352,6 +1650,7 @@ module Orb def maximum=(_) end + # This field is deprecated in favor of `adjustments`. sig { returns(T.nilable(String)) } def maximum_amount end @@ -1360,6 +1659,7 @@ module Orb def maximum_amount=(_) end + # This field is deprecated in favor of `adjustments`. sig { returns(T.nilable(Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Minimum)) } def minimum end @@ -1371,6 +1671,7 @@ module Orb def minimum=(_) end + # This field is deprecated in favor of `adjustments`. sig { returns(T.nilable(String)) } def minimum_amount end @@ -1379,6 +1680,7 @@ module Orb def minimum_amount=(_) end + # The name of the price associated with this line item. sig { returns(String) } def name end @@ -1387,6 +1689,7 @@ module Orb def name=(_) end + # Any amount applied from a partial invoice sig { returns(String) } def partially_invoiced_amount end @@ -1395,6 +1698,16 @@ module Orb def partially_invoiced_amount=(_) end + # The Price resource represents a price that can be billed on a subscription, + # resulting in a charge on an invoice in the form of an invoice line item. Prices + # take a quantity and determine an amount to bill. + # + # Orb supports a few different pricing models out of the box. Each of these models + # is serialized differently in a given Price object. The model_type field + # determines the key for the configuration object that is present. + # + # For more on the types of prices, see + # [the core concepts documentation](/core-concepts#plan-and-price) sig do returns( T.nilable( @@ -1507,6 +1820,7 @@ module Orb def price=(_) end + # Either the fixed fee quantity or the usage during the service period. sig { returns(Float) } def quantity end @@ -1515,6 +1829,7 @@ module Orb def quantity=(_) end + # The start date of the range of time applied for this line item's price. sig { returns(Time) } def start_date end @@ -1523,6 +1838,8 @@ module Orb def start_date=(_) end + # For complex pricing structures, the line item can be broken down further in + # `sub_line_items`. sig do returns( T::Array[ @@ -1560,6 +1877,7 @@ module Orb def sub_line_items=(_) end + # The line amount before before any adjustments. sig { returns(String) } def subtotal end @@ -1568,6 +1886,8 @@ module Orb def subtotal=(_) end + # An array of tax rates and their incurred tax amounts. Empty if no tax + # integration is configured. sig { returns(T::Array[Orb::Models::InvoiceFetchUpcomingResponse::LineItem::TaxAmount]) } def tax_amounts end @@ -1579,6 +1899,7 @@ module Orb def tax_amounts=(_) end + # A list of customer ids that were used to calculate the usage for this line item. sig { returns(T.nilable(T::Array[String])) } def usage_customer_ids end @@ -1796,6 +2117,7 @@ module Orb def adjustment_type=(_) end + # The value applied by an adjustment. sig { returns(String) } def amount end @@ -1804,6 +2126,7 @@ module Orb def amount=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1812,6 +2135,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -1820,6 +2145,7 @@ module Orb def is_invoice_level=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -1828,6 +2154,8 @@ module Orb def reason=(_) end + # The number of usage units by which to discount the price this adjustment applies + # to in a given billing period. sig { returns(Float) } def usage_discount end @@ -1894,6 +2222,7 @@ module Orb def adjustment_type=(_) end + # The value applied by an adjustment. sig { returns(String) } def amount end @@ -1902,6 +2231,8 @@ module Orb def amount=(_) end + # The amount by which to discount the prices this adjustment applies to in a given + # billing period. sig { returns(String) } def amount_discount end @@ -1910,6 +2241,7 @@ module Orb def amount_discount=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1918,6 +2250,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -1926,6 +2260,7 @@ module Orb def is_invoice_level=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -1992,6 +2327,7 @@ module Orb def adjustment_type=(_) end + # The value applied by an adjustment. sig { returns(String) } def amount end @@ -2000,6 +2336,7 @@ module Orb def amount=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -2008,6 +2345,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -2016,6 +2355,8 @@ module Orb def is_invoice_level=(_) end + # The percentage (as a value between 0 and 1) by which to discount the price + # intervals this adjustment applies to in a given billing period. sig { returns(Float) } def percentage_discount end @@ -2024,6 +2365,7 @@ module Orb def percentage_discount=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -2090,6 +2432,7 @@ module Orb def adjustment_type=(_) end + # The value applied by an adjustment. sig { returns(String) } def amount end @@ -2098,6 +2441,7 @@ module Orb def amount=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -2106,6 +2450,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -2114,6 +2460,7 @@ module Orb def is_invoice_level=(_) end + # The item ID that revenue from this minimum will be attributed to. sig { returns(String) } def item_id end @@ -2122,6 +2469,8 @@ module Orb def item_id=(_) end + # The minimum amount to charge in a given billing period for the prices this + # adjustment applies to. sig { returns(String) } def minimum_amount end @@ -2130,6 +2479,7 @@ module Orb def minimum_amount=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -2199,6 +2549,7 @@ module Orb def adjustment_type=(_) end + # The value applied by an adjustment. sig { returns(String) } def amount end @@ -2207,6 +2558,7 @@ module Orb def amount=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -2215,6 +2567,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -2223,6 +2577,8 @@ module Orb def is_invoice_level=(_) end + # The maximum amount to charge in a given billing period for the prices this + # adjustment applies to. sig { returns(String) } def maximum_amount end @@ -2231,6 +2587,7 @@ module Orb def maximum_amount=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -2284,15 +2641,17 @@ module Orb sig do override .returns( - [[Symbol, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryUsageDiscountAdjustment], [Symbol, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryAmountDiscountAdjustment], [Symbol, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryPercentageDiscountAdjustment], [Symbol, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryMinimumAdjustment], [Symbol, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryMaximumAdjustment]] + [Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryUsageDiscountAdjustment, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryAmountDiscountAdjustment, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryPercentageDiscountAdjustment, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryMinimumAdjustment, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryMaximumAdjustment] ) end - private def variants + def variants end end end class Maximum < Orb::BaseModel + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -2301,6 +2660,7 @@ module Orb def applies_to_price_ids=(_) end + # Maximum amount applied sig { returns(String) } def maximum_amount end @@ -2309,6 +2669,7 @@ module Orb def maximum_amount=(_) end + # This field is deprecated in favor of `adjustments`. sig do params(applies_to_price_ids: T::Array[String], maximum_amount: String).returns(T.attached_class) end @@ -2321,6 +2682,8 @@ module Orb end class Minimum < Orb::BaseModel + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -2329,6 +2692,7 @@ module Orb def applies_to_price_ids=(_) end + # Minimum amount applied sig { returns(String) } def minimum_amount end @@ -2337,6 +2701,7 @@ module Orb def minimum_amount=(_) end + # This field is deprecated in favor of `adjustments`. sig do params(applies_to_price_ids: T::Array[String], minimum_amount: String).returns(T.attached_class) end @@ -2352,6 +2717,7 @@ module Orb abstract! class MatrixSubLineItem < Orb::BaseModel + # The total amount for this sub line item. sig { returns(String) } def amount end @@ -2455,6 +2821,7 @@ module Orb def key=(_) end + # No value indicates the default group sig { returns(T.nilable(String)) } def value end @@ -2473,6 +2840,7 @@ module Orb end class MatrixConfig < Orb::BaseModel + # The ordered dimension values for this line item. sig { returns(T::Array[T.nilable(String)]) } def dimension_values end @@ -2492,6 +2860,7 @@ module Orb end class TierSubLineItem < Orb::BaseModel + # The total amount for this sub line item. sig { returns(String) } def amount end @@ -2593,6 +2962,7 @@ module Orb def key=(_) end + # No value indicates the default group sig { returns(T.nilable(String)) } def value end @@ -2652,6 +3022,7 @@ module Orb end class OtherSubLineItem < Orb::BaseModel + # The total amount for this sub line item. sig { returns(String) } def amount end @@ -2740,6 +3111,7 @@ module Orb def key=(_) end + # No value indicates the default group sig { returns(T.nilable(String)) } def value end @@ -2762,15 +3134,16 @@ module Orb sig do override .returns( - [[Symbol, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::MatrixSubLineItem], [Symbol, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::TierSubLineItem], [Symbol, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::OtherSubLineItem]] + [Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::MatrixSubLineItem, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::TierSubLineItem, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::OtherSubLineItem] ) end - private def variants + def variants end end end class TaxAmount < Orb::BaseModel + # The amount of additional tax incurred by this tax rate. sig { returns(String) } def amount end @@ -2779,6 +3152,7 @@ module Orb def amount=(_) end + # The human-readable description of the applied tax rate. sig { returns(String) } def tax_rate_description end @@ -2787,6 +3161,7 @@ module Orb def tax_rate_description=(_) end + # The tax rate percentage, out of 100. sig { returns(T.nilable(String)) } def tax_rate_percentage end @@ -2817,6 +3192,8 @@ module Orb end class Maximum < Orb::BaseModel + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -2825,6 +3202,7 @@ module Orb def applies_to_price_ids=(_) end + # Maximum amount applied sig { returns(String) } def maximum_amount end @@ -2845,6 +3223,8 @@ module Orb end class Minimum < Orb::BaseModel + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -2853,6 +3233,7 @@ module Orb def applies_to_price_ids=(_) end + # Minimum amount applied sig { returns(String) } def minimum_amount end @@ -2873,6 +3254,7 @@ module Orb end class PaymentAttempt < Orb::BaseModel + # The ID of the payment attempt. sig { returns(String) } def id end @@ -2881,6 +3263,7 @@ module Orb def id=(_) end + # The amount of the payment attempt. sig { returns(String) } def amount end @@ -2889,6 +3272,7 @@ module Orb def amount=(_) end + # The time at which the payment attempt was created. sig { returns(Time) } def created_at end @@ -2897,6 +3281,7 @@ module Orb def created_at=(_) end + # The payment provider that attempted to collect the payment. sig { returns(T.nilable(Symbol)) } def payment_provider end @@ -2905,6 +3290,7 @@ module Orb def payment_provider=(_) end + # The ID of the payment attempt in the payment provider. sig { returns(T.nilable(String)) } def payment_provider_id end @@ -2913,6 +3299,7 @@ module Orb def payment_provider_id=(_) end + # Whether the payment attempt succeeded. sig { returns(T::Boolean) } def succeeded end @@ -2951,6 +3338,7 @@ module Orb def to_hash end + # The payment provider that attempted to collect the payment. class PaymentProvider < Orb::Enum abstract! diff --git a/rbi/lib/orb/models/invoice_issue_params.rbi b/rbi/lib/orb/models/invoice_issue_params.rbi index 21f6da32..a5e5956c 100644 --- a/rbi/lib/orb/models/invoice_issue_params.rbi +++ b/rbi/lib/orb/models/invoice_issue_params.rbi @@ -6,6 +6,11 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters + # If true, the invoice will be issued synchronously. If false, the invoice will be + # issued asynchronously. The synchronous option is only available for invoices + # that have no usage fees. If the invoice is configured to sync to an external + # provider, a successful response from this endpoint guarantees the invoice is + # present in the provider. sig { returns(T.nilable(T::Boolean)) } def synchronous end diff --git a/rbi/lib/orb/models/invoice_level_discount.rbi b/rbi/lib/orb/models/invoice_level_discount.rbi index 77dab074..dc51039e 100644 --- a/rbi/lib/orb/models/invoice_level_discount.rbi +++ b/rbi/lib/orb/models/invoice_level_discount.rbi @@ -8,11 +8,9 @@ module Orb class << self sig do override - .returns( - [[Symbol, Orb::Models::PercentageDiscount], [Symbol, Orb::Models::AmountDiscount], [Symbol, Orb::Models::TrialDiscount]] - ) + .returns([Orb::Models::PercentageDiscount, Orb::Models::AmountDiscount, Orb::Models::TrialDiscount]) end - private def variants + def variants end end end diff --git a/rbi/lib/orb/models/invoice_line_item_create_params.rbi b/rbi/lib/orb/models/invoice_line_item_create_params.rbi index b9ed8a0b..3863d653 100644 --- a/rbi/lib/orb/models/invoice_line_item_create_params.rbi +++ b/rbi/lib/orb/models/invoice_line_item_create_params.rbi @@ -6,6 +6,7 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters + # The total amount in the invoice's currency to add to the line item. sig { returns(String) } def amount end @@ -14,6 +15,7 @@ module Orb def amount=(_) end + # A date string to specify the line item's end date in the customer's timezone. sig { returns(Date) } def end_date end @@ -22,6 +24,7 @@ module Orb def end_date=(_) end + # The id of the Invoice to add this line item. sig { returns(String) } def invoice_id end @@ -30,6 +33,8 @@ module Orb def invoice_id=(_) end + # The item name associated with this line item. If an item with the same name + # exists in Orb, that item will be associated with the line item. sig { returns(String) } def name end @@ -38,6 +43,7 @@ module Orb def name=(_) end + # The number of units on the line item sig { returns(Float) } def quantity end @@ -46,6 +52,7 @@ module Orb def quantity=(_) end + # A date string to specify the line item's start date in the customer's timezone. sig { returns(Date) } def start_date end diff --git a/rbi/lib/orb/models/invoice_line_item_create_response.rbi b/rbi/lib/orb/models/invoice_line_item_create_response.rbi index b585116d..f6e29af2 100644 --- a/rbi/lib/orb/models/invoice_line_item_create_response.rbi +++ b/rbi/lib/orb/models/invoice_line_item_create_response.rbi @@ -3,6 +3,7 @@ module Orb module Models class InvoiceLineItemCreateResponse < Orb::BaseModel + # A unique ID for this line item. sig { returns(String) } def id end @@ -11,6 +12,8 @@ module Orb def id=(_) end + # The line amount after any adjustments and before overage conversion, credits and + # partial invoicing. sig { returns(String) } def adjusted_subtotal end @@ -19,6 +22,9 @@ module Orb def adjusted_subtotal=(_) end + # All adjustments applied to the line item in the order they were applied based on + # invoice calculations (ie. usage discounts -> amount discounts -> percentage + # discounts -> minimums -> maximums). sig do returns( T::Array[ @@ -62,6 +68,8 @@ module Orb def adjustments=(_) end + # The final amount for a line item after all adjustments and pre paid credits have + # been applied. sig { returns(String) } def amount end @@ -70,6 +78,7 @@ module Orb def amount=(_) end + # The number of prepaid credits applied. sig { returns(String) } def credits_applied end @@ -118,6 +127,7 @@ module Orb def discount=(_) end + # The end date of the range of time applied for this line item's price. sig { returns(Time) } def end_date end @@ -126,6 +136,7 @@ module Orb def end_date=(_) end + # An additional filter that was used to calculate the usage for this line item. sig { returns(T.nilable(String)) } def filter end @@ -134,6 +145,9 @@ module Orb def filter=(_) end + # [DEPRECATED] For configured prices that are split by a grouping key, this will + # be populated with the key and a value. The `amount` and `subtotal` will be the + # values for this particular grouping. sig { returns(T.nilable(String)) } def grouping end @@ -142,6 +156,7 @@ module Orb def grouping=(_) end + # This field is deprecated in favor of `adjustments`. sig { returns(T.nilable(Orb::Models::InvoiceLineItemCreateResponse::Maximum)) } def maximum end @@ -153,6 +168,7 @@ module Orb def maximum=(_) end + # This field is deprecated in favor of `adjustments`. sig { returns(T.nilable(String)) } def maximum_amount end @@ -161,6 +177,7 @@ module Orb def maximum_amount=(_) end + # This field is deprecated in favor of `adjustments`. sig { returns(T.nilable(Orb::Models::InvoiceLineItemCreateResponse::Minimum)) } def minimum end @@ -172,6 +189,7 @@ module Orb def minimum=(_) end + # This field is deprecated in favor of `adjustments`. sig { returns(T.nilable(String)) } def minimum_amount end @@ -180,6 +198,7 @@ module Orb def minimum_amount=(_) end + # The name of the price associated with this line item. sig { returns(String) } def name end @@ -188,6 +207,7 @@ module Orb def name=(_) end + # Any amount applied from a partial invoice sig { returns(String) } def partially_invoiced_amount end @@ -196,6 +216,16 @@ module Orb def partially_invoiced_amount=(_) end + # The Price resource represents a price that can be billed on a subscription, + # resulting in a charge on an invoice in the form of an invoice line item. Prices + # take a quantity and determine an amount to bill. + # + # Orb supports a few different pricing models out of the box. Each of these models + # is serialized differently in a given Price object. The model_type field + # determines the key for the configuration object that is present. + # + # For more on the types of prices, see + # [the core concepts documentation](/core-concepts#plan-and-price) sig do returns( T.nilable( @@ -308,6 +338,7 @@ module Orb def price=(_) end + # Either the fixed fee quantity or the usage during the service period. sig { returns(Float) } def quantity end @@ -316,6 +347,7 @@ module Orb def quantity=(_) end + # The start date of the range of time applied for this line item's price. sig { returns(Time) } def start_date end @@ -324,6 +356,8 @@ module Orb def start_date=(_) end + # For complex pricing structures, the line item can be broken down further in + # `sub_line_items`. sig do returns( T::Array[ @@ -361,6 +395,7 @@ module Orb def sub_line_items=(_) end + # The line amount before before any adjustments. sig { returns(String) } def subtotal end @@ -369,6 +404,8 @@ module Orb def subtotal=(_) end + # An array of tax rates and their incurred tax amounts. Empty if no tax + # integration is configured. sig { returns(T::Array[Orb::Models::InvoiceLineItemCreateResponse::TaxAmount]) } def tax_amounts end @@ -380,6 +417,7 @@ module Orb def tax_amounts=(_) end + # A list of customer ids that were used to calculate the usage for this line item. sig { returns(T.nilable(T::Array[String])) } def usage_customer_ids end @@ -597,6 +635,7 @@ module Orb def adjustment_type=(_) end + # The value applied by an adjustment. sig { returns(String) } def amount end @@ -605,6 +644,7 @@ module Orb def amount=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -613,6 +653,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -621,6 +663,7 @@ module Orb def is_invoice_level=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -629,6 +672,8 @@ module Orb def reason=(_) end + # The number of usage units by which to discount the price this adjustment applies + # to in a given billing period. sig { returns(Float) } def usage_discount end @@ -695,6 +740,7 @@ module Orb def adjustment_type=(_) end + # The value applied by an adjustment. sig { returns(String) } def amount end @@ -703,6 +749,8 @@ module Orb def amount=(_) end + # The amount by which to discount the prices this adjustment applies to in a given + # billing period. sig { returns(String) } def amount_discount end @@ -711,6 +759,7 @@ module Orb def amount_discount=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -719,6 +768,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -727,6 +778,7 @@ module Orb def is_invoice_level=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -793,6 +845,7 @@ module Orb def adjustment_type=(_) end + # The value applied by an adjustment. sig { returns(String) } def amount end @@ -801,6 +854,7 @@ module Orb def amount=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -809,6 +863,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -817,6 +873,8 @@ module Orb def is_invoice_level=(_) end + # The percentage (as a value between 0 and 1) by which to discount the price + # intervals this adjustment applies to in a given billing period. sig { returns(Float) } def percentage_discount end @@ -825,6 +883,7 @@ module Orb def percentage_discount=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -891,6 +950,7 @@ module Orb def adjustment_type=(_) end + # The value applied by an adjustment. sig { returns(String) } def amount end @@ -899,6 +959,7 @@ module Orb def amount=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -907,6 +968,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -915,6 +978,7 @@ module Orb def is_invoice_level=(_) end + # The item ID that revenue from this minimum will be attributed to. sig { returns(String) } def item_id end @@ -923,6 +987,8 @@ module Orb def item_id=(_) end + # The minimum amount to charge in a given billing period for the prices this + # adjustment applies to. sig { returns(String) } def minimum_amount end @@ -931,6 +997,7 @@ module Orb def minimum_amount=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -1000,6 +1067,7 @@ module Orb def adjustment_type=(_) end + # The value applied by an adjustment. sig { returns(String) } def amount end @@ -1008,6 +1076,7 @@ module Orb def amount=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1016,6 +1085,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -1024,6 +1095,8 @@ module Orb def is_invoice_level=(_) end + # The maximum amount to charge in a given billing period for the prices this + # adjustment applies to. sig { returns(String) } def maximum_amount end @@ -1032,6 +1105,7 @@ module Orb def maximum_amount=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -1085,15 +1159,17 @@ module Orb sig do override .returns( - [[Symbol, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryUsageDiscountAdjustment], [Symbol, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryAmountDiscountAdjustment], [Symbol, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryPercentageDiscountAdjustment], [Symbol, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryMinimumAdjustment], [Symbol, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryMaximumAdjustment]] + [Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryUsageDiscountAdjustment, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryAmountDiscountAdjustment, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryPercentageDiscountAdjustment, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryMinimumAdjustment, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryMaximumAdjustment] ) end - private def variants + def variants end end end class Maximum < Orb::BaseModel + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1102,6 +1178,7 @@ module Orb def applies_to_price_ids=(_) end + # Maximum amount applied sig { returns(String) } def maximum_amount end @@ -1110,6 +1187,7 @@ module Orb def maximum_amount=(_) end + # This field is deprecated in favor of `adjustments`. sig do params(applies_to_price_ids: T::Array[String], maximum_amount: String).returns(T.attached_class) end @@ -1122,6 +1200,8 @@ module Orb end class Minimum < Orb::BaseModel + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1130,6 +1210,7 @@ module Orb def applies_to_price_ids=(_) end + # Minimum amount applied sig { returns(String) } def minimum_amount end @@ -1138,6 +1219,7 @@ module Orb def minimum_amount=(_) end + # This field is deprecated in favor of `adjustments`. sig do params(applies_to_price_ids: T::Array[String], minimum_amount: String).returns(T.attached_class) end @@ -1153,6 +1235,7 @@ module Orb abstract! class MatrixSubLineItem < Orb::BaseModel + # The total amount for this sub line item. sig { returns(String) } def amount end @@ -1246,6 +1329,7 @@ module Orb def key=(_) end + # No value indicates the default group sig { returns(T.nilable(String)) } def value end @@ -1264,6 +1348,7 @@ module Orb end class MatrixConfig < Orb::BaseModel + # The ordered dimension values for this line item. sig { returns(T::Array[T.nilable(String)]) } def dimension_values end @@ -1283,6 +1368,7 @@ module Orb end class TierSubLineItem < Orb::BaseModel + # The total amount for this sub line item. sig { returns(String) } def amount end @@ -1376,6 +1462,7 @@ module Orb def key=(_) end + # No value indicates the default group sig { returns(T.nilable(String)) } def value end @@ -1435,6 +1522,7 @@ module Orb end class OtherSubLineItem < Orb::BaseModel + # The total amount for this sub line item. sig { returns(String) } def amount end @@ -1515,6 +1603,7 @@ module Orb def key=(_) end + # No value indicates the default group sig { returns(T.nilable(String)) } def value end @@ -1537,15 +1626,16 @@ module Orb sig do override .returns( - [[Symbol, Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::MatrixSubLineItem], [Symbol, Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::TierSubLineItem], [Symbol, Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::OtherSubLineItem]] + [Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::MatrixSubLineItem, Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::TierSubLineItem, Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::OtherSubLineItem] ) end - private def variants + def variants end end end class TaxAmount < Orb::BaseModel + # The amount of additional tax incurred by this tax rate. sig { returns(String) } def amount end @@ -1554,6 +1644,7 @@ module Orb def amount=(_) end + # The human-readable description of the applied tax rate. sig { returns(String) } def tax_rate_description end @@ -1562,6 +1653,7 @@ module Orb def tax_rate_description=(_) end + # The tax rate percentage, out of 100. sig { returns(T.nilable(String)) } def tax_rate_percentage end diff --git a/rbi/lib/orb/models/invoice_list_params.rbi b/rbi/lib/orb/models/invoice_list_params.rbi index 5766ca4a..2f7e9f80 100644 --- a/rbi/lib/orb/models/invoice_list_params.rbi +++ b/rbi/lib/orb/models/invoice_list_params.rbi @@ -30,6 +30,8 @@ module Orb def amount_lt=(_) end + # Cursor for pagination. This can be populated by the `next_cursor` value returned + # from the initial request. sig { returns(T.nilable(String)) } def cursor end @@ -62,6 +64,10 @@ module Orb def due_date=(_) end + # Filters invoices by their due dates within a specific time range in the past. + # Specify the range as a number followed by 'd' (days) or 'm' (months). For + # example, '7d' filters invoices due in the last 7 days, and '2m' filters those + # due in the last 2 months. sig { returns(T.nilable(String)) } def due_date_window end @@ -134,6 +140,7 @@ module Orb def is_recurring=(_) end + # The number of items to fetch. Defaults to 20. sig { returns(T.nilable(Integer)) } def limit end diff --git a/rbi/lib/orb/models/invoice_mark_paid_params.rbi b/rbi/lib/orb/models/invoice_mark_paid_params.rbi index 8649ba72..1624f20c 100644 --- a/rbi/lib/orb/models/invoice_mark_paid_params.rbi +++ b/rbi/lib/orb/models/invoice_mark_paid_params.rbi @@ -6,6 +6,7 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters + # A date string to specify the date of the payment. sig { returns(Date) } def payment_received_date end @@ -14,6 +15,7 @@ module Orb def payment_received_date=(_) end + # An optional external ID to associate with the payment. sig { returns(T.nilable(String)) } def external_id end @@ -22,6 +24,7 @@ module Orb def external_id=(_) end + # An optional note to associate with the payment. sig { returns(T.nilable(String)) } def notes end diff --git a/rbi/lib/orb/models/invoice_update_params.rbi b/rbi/lib/orb/models/invoice_update_params.rbi index 50790758..247b5f42 100644 --- a/rbi/lib/orb/models/invoice_update_params.rbi +++ b/rbi/lib/orb/models/invoice_update_params.rbi @@ -6,6 +6,9 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end diff --git a/rbi/lib/orb/models/item.rbi b/rbi/lib/orb/models/item.rbi index bf75398f..03b1ae5e 100644 --- a/rbi/lib/orb/models/item.rbi +++ b/rbi/lib/orb/models/item.rbi @@ -38,6 +38,9 @@ module Orb def name=(_) end + # 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. sig do params( id: String, diff --git a/rbi/lib/orb/models/item_create_params.rbi b/rbi/lib/orb/models/item_create_params.rbi index 3654d238..62300cd4 100644 --- a/rbi/lib/orb/models/item_create_params.rbi +++ b/rbi/lib/orb/models/item_create_params.rbi @@ -6,6 +6,7 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters + # The name of the item. sig { returns(String) } def name end diff --git a/rbi/lib/orb/models/item_list_params.rbi b/rbi/lib/orb/models/item_list_params.rbi index 49734782..0d2c03cc 100644 --- a/rbi/lib/orb/models/item_list_params.rbi +++ b/rbi/lib/orb/models/item_list_params.rbi @@ -6,6 +6,8 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters + # Cursor for pagination. This can be populated by the `next_cursor` value returned + # from the initial request. sig { returns(T.nilable(String)) } def cursor end @@ -14,6 +16,7 @@ module Orb def cursor=(_) end + # The number of items to fetch. Defaults to 20. sig { returns(T.nilable(Integer)) } def limit end diff --git a/rbi/lib/orb/models/metric_create_params.rbi b/rbi/lib/orb/models/metric_create_params.rbi index fb50e778..895582a7 100644 --- a/rbi/lib/orb/models/metric_create_params.rbi +++ b/rbi/lib/orb/models/metric_create_params.rbi @@ -6,6 +6,7 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters + # A description of the metric. sig { returns(T.nilable(String)) } def description end @@ -14,6 +15,7 @@ module Orb def description=(_) end + # The id of the item sig { returns(String) } def item_id end @@ -22,6 +24,7 @@ module Orb def item_id=(_) end + # The name of the metric. sig { returns(String) } def name end @@ -30,6 +33,7 @@ module Orb def name=(_) end + # A sql string defining the metric. sig { returns(String) } def sql end @@ -38,6 +42,9 @@ module Orb def sql=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end diff --git a/rbi/lib/orb/models/metric_list_params.rbi b/rbi/lib/orb/models/metric_list_params.rbi index 4be3fc82..41d32688 100644 --- a/rbi/lib/orb/models/metric_list_params.rbi +++ b/rbi/lib/orb/models/metric_list_params.rbi @@ -38,6 +38,8 @@ module Orb def created_at_lte=(_) end + # Cursor for pagination. This can be populated by the `next_cursor` value returned + # from the initial request. sig { returns(T.nilable(String)) } def cursor end @@ -46,6 +48,7 @@ module Orb def cursor=(_) end + # The number of items to fetch. Defaults to 20. sig { returns(T.nilable(Integer)) } def limit end diff --git a/rbi/lib/orb/models/metric_update_params.rbi b/rbi/lib/orb/models/metric_update_params.rbi index 470cfa73..aa84573b 100644 --- a/rbi/lib/orb/models/metric_update_params.rbi +++ b/rbi/lib/orb/models/metric_update_params.rbi @@ -6,6 +6,9 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end diff --git a/rbi/lib/orb/models/percentage_discount.rbi b/rbi/lib/orb/models/percentage_discount.rbi index 475e1815..9382d3c3 100644 --- a/rbi/lib/orb/models/percentage_discount.rbi +++ b/rbi/lib/orb/models/percentage_discount.rbi @@ -3,6 +3,8 @@ module Orb module Models class PercentageDiscount < Orb::BaseModel + # List of price_ids that this discount applies to. For plan/plan phase discounts, + # this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -19,6 +21,8 @@ module Orb def discount_type=(_) end + # Only available if discount_type is `percentage`. This is a number between 0 + # and 1. sig { returns(Float) } def percentage_discount end diff --git a/rbi/lib/orb/models/plan.rbi b/rbi/lib/orb/models/plan.rbi index 5962062d..06bc2b39 100644 --- a/rbi/lib/orb/models/plan.rbi +++ b/rbi/lib/orb/models/plan.rbi @@ -11,6 +11,8 @@ module Orb def id=(_) end + # Adjustments for this plan. If the plan has phases, this includes adjustments + # across all phases of the plan. sig do returns( T::Array[ @@ -62,6 +64,8 @@ module Orb def base_plan=(_) end + # The parent plan id if the given plan was created by overriding one or more of + # the parent's prices sig { returns(T.nilable(String)) } def base_plan_id end @@ -78,6 +82,8 @@ module Orb def created_at=(_) end + # An ISO 4217 currency string or custom pricing unit (`credits`) for this plan's + # prices. sig { returns(String) } def currency end @@ -86,6 +92,8 @@ module Orb def currency=(_) end + # The default memo text on the invoices corresponding to subscriptions on this + # plan. Note that each subscription may configure its own memo. sig { returns(T.nilable(String)) } def default_invoice_memo end @@ -142,6 +150,9 @@ module Orb def discount=(_) end + # An optional user-defined ID for this plan resource, used throughout the system + # as an alias for this Plan. Use this field to identify a plan by an existing + # identifier in your system. sig { returns(T.nilable(String)) } def external_plan_id end @@ -150,6 +161,8 @@ module Orb def external_plan_id=(_) end + # An ISO 4217 currency string for which this plan is billed in. Matches `currency` + # unless `currency` is a custom pricing unit. sig { returns(String) } def invoicing_currency end @@ -174,6 +187,10 @@ module Orb def maximum_amount=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -206,6 +223,11 @@ module Orb def name=(_) end + # Determines the difference between the invoice issue date and the due date. A + # value of "0" here signifies that invoices are due on issue, whereas a value of + # "30" means that the customer has a month to pay the invoice before its overdue. + # Note that individual subscriptions or invoices may set a different net terms + # configuration. sig { returns(T.nilable(Integer)) } def net_terms end @@ -225,6 +247,8 @@ module Orb def plan_phases=(_) end + # Prices for this plan. If the plan has phases, this includes prices across all + # phases of the plan. sig do returns( T::Array[ @@ -369,6 +393,10 @@ module Orb def version=(_) end + # The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be + # subscribed to by a customer. Plans define the billing behavior of the + # subscription. You can see more about how to configure prices in the + # [Price resource](/reference/price). sig do params( id: String, @@ -572,6 +600,7 @@ module Orb def adjustment_type=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -580,6 +609,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -588,6 +619,7 @@ module Orb def is_invoice_level=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -596,6 +628,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -604,6 +637,8 @@ module Orb def reason=(_) end + # The number of usage units by which to discount the price this adjustment applies + # to in a given billing period. sig { returns(Float) } def usage_discount end @@ -670,6 +705,8 @@ module Orb def adjustment_type=(_) end + # The amount by which to discount the prices this adjustment applies to in a given + # billing period. sig { returns(String) } def amount_discount end @@ -678,6 +715,7 @@ module Orb def amount_discount=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -686,6 +724,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -694,6 +734,7 @@ module Orb def is_invoice_level=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -702,6 +743,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -768,6 +810,7 @@ module Orb def adjustment_type=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -776,6 +819,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -784,6 +829,8 @@ module Orb def is_invoice_level=(_) end + # The percentage (as a value between 0 and 1) by which to discount the price + # intervals this adjustment applies to in a given billing period. sig { returns(Float) } def percentage_discount end @@ -792,6 +839,7 @@ module Orb def percentage_discount=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -800,6 +848,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -866,6 +915,7 @@ module Orb def adjustment_type=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -874,6 +924,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -882,6 +934,7 @@ module Orb def is_invoice_level=(_) end + # The item ID that revenue from this minimum will be attributed to. sig { returns(String) } def item_id end @@ -890,6 +943,8 @@ module Orb def item_id=(_) end + # The minimum amount to charge in a given billing period for the prices this + # adjustment applies to. sig { returns(String) } def minimum_amount end @@ -898,6 +953,7 @@ module Orb def minimum_amount=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -906,6 +962,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -975,6 +1032,7 @@ module Orb def adjustment_type=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -983,6 +1041,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -991,6 +1051,8 @@ module Orb def is_invoice_level=(_) end + # The maximum amount to charge in a given billing period for the prices this + # adjustment applies to. sig { returns(String) } def maximum_amount end @@ -999,6 +1061,7 @@ module Orb def maximum_amount=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -1007,6 +1070,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -1060,10 +1124,10 @@ module Orb sig do override .returns( - [[Symbol, Orb::Models::Plan::Adjustment::PlanPhaseUsageDiscountAdjustment], [Symbol, Orb::Models::Plan::Adjustment::PlanPhaseAmountDiscountAdjustment], [Symbol, Orb::Models::Plan::Adjustment::PlanPhasePercentageDiscountAdjustment], [Symbol, Orb::Models::Plan::Adjustment::PlanPhaseMinimumAdjustment], [Symbol, Orb::Models::Plan::Adjustment::PlanPhaseMaximumAdjustment]] + [Orb::Models::Plan::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::Plan::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::Plan::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::Plan::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::Plan::Adjustment::PlanPhaseMaximumAdjustment] ) end - private def variants + def variants end end end @@ -1077,6 +1141,9 @@ module Orb def id=(_) end + # An optional user-defined ID for this plan resource, used throughout the system + # as an alias for this Plan. Use this field to identify a plan by an existing + # identifier in your system. sig { returns(T.nilable(String)) } def external_plan_id end @@ -1114,6 +1181,8 @@ module Orb end class Maximum < Orb::BaseModel + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1122,6 +1191,7 @@ module Orb def applies_to_price_ids=(_) end + # Maximum amount applied sig { returns(String) } def maximum_amount end @@ -1142,6 +1212,8 @@ module Orb end class Minimum < Orb::BaseModel + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1150,6 +1222,7 @@ module Orb def applies_to_price_ids=(_) end + # Minimum amount applied sig { returns(String) } def minimum_amount end @@ -1226,6 +1299,8 @@ module Orb def discount=(_) end + # How many terms of length `duration_unit` this phase is active for. If null, this + # phase is evergreen and active indefinitely sig { returns(T.nilable(Integer)) } def duration end @@ -1288,6 +1363,7 @@ module Orb def name=(_) end + # Determines the ordering of the phase in a plan's lifecycle. 1 = first phase. sig { returns(Integer) } def order end @@ -1379,6 +1455,8 @@ module Orb end class Maximum < Orb::BaseModel + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1387,6 +1465,7 @@ module Orb def applies_to_price_ids=(_) end + # Maximum amount applied sig { returns(String) } def maximum_amount end @@ -1407,6 +1486,8 @@ module Orb end class Minimum < Orb::BaseModel + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1415,6 +1496,7 @@ module Orb def applies_to_price_ids=(_) end + # Minimum amount applied sig { returns(String) } def minimum_amount end diff --git a/rbi/lib/orb/models/plan_create_params.rbi b/rbi/lib/orb/models/plan_create_params.rbi index 55a96bf0..c2975b8b 100644 --- a/rbi/lib/orb/models/plan_create_params.rbi +++ b/rbi/lib/orb/models/plan_create_params.rbi @@ -6,6 +6,8 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters + # An ISO 4217 currency string for invoices generated by subscriptions on this + # plan. sig { returns(String) } def currency end @@ -22,6 +24,8 @@ module Orb def name=(_) end + # Prices for this plan. If the plan has phases, this includes prices across all + # phases of the plan. sig do returns( T::Array[ @@ -125,6 +129,7 @@ module Orb def prices=(_) end + # Free-form text which is available on the invoice PDF and the Orb invoice portal. sig { returns(T.nilable(String)) } def default_invoice_memo end @@ -141,6 +146,9 @@ module Orb def external_plan_id=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -152,6 +160,9 @@ module Orb def metadata=(_) end + # The net terms determines the difference between the invoice date and the issue + # date for the invoice. If you intend the invoice to be due on issue, set this + # to 0. sig { returns(T.nilable(Integer)) } def net_terms end @@ -160,6 +171,8 @@ module Orb def net_terms=(_) end + # The status of the plan to create (either active or draft). If not specified, + # this defaults to active. sig { returns(T.nilable(Symbol)) } def status end @@ -274,6 +287,7 @@ module Orb abstract! class NewPlanUnitPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -282,6 +296,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -298,6 +313,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -317,6 +333,8 @@ module Orb def unit_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -325,6 +343,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -333,6 +353,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { returns(T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::BillingCycleConfiguration)) } def billing_cycle_configuration end @@ -344,6 +366,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -352,6 +375,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -360,6 +385,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -368,6 +394,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -376,6 +404,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -384,6 +413,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { returns(T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice::InvoicingCycleConfiguration)) } def invoicing_cycle_configuration end @@ -395,6 +426,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -470,6 +504,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -488,6 +523,7 @@ module Orb end class UnitConfig < Orb::BaseModel + # Rate per unit of usage sig { returns(String) } def unit_amount end @@ -506,6 +542,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -514,6 +551,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -522,6 +560,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -530,6 +570,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -545,6 +586,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -553,6 +595,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -561,6 +604,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -569,6 +614,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -585,6 +631,7 @@ module Orb end class NewPlanPackagePrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -593,6 +640,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -609,6 +657,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -628,6 +677,8 @@ module Orb def package_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -636,6 +687,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -644,6 +697,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { returns(T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::BillingCycleConfiguration)) } def billing_cycle_configuration end @@ -655,6 +710,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -663,6 +719,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -671,6 +729,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -679,6 +738,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -687,6 +748,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -695,6 +757,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { returns(T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice::InvoicingCycleConfiguration)) } def invoicing_cycle_configuration end @@ -708,6 +772,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -783,6 +850,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -801,6 +869,7 @@ module Orb end class PackageConfig < Orb::BaseModel + # A currency amount to rate usage by sig { returns(String) } def package_amount end @@ -809,6 +878,8 @@ module Orb def package_amount=(_) end + # An integer amount to represent package size. For example, 1000 here would divide + # usage by 1000 before multiplying by package_amount in rating sig { returns(Integer) } def package_size end @@ -827,6 +898,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -835,6 +907,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -843,6 +916,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -851,6 +926,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -866,6 +942,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -874,6 +951,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -882,6 +960,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -890,6 +970,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -906,6 +987,7 @@ module Orb end class NewPlanMatrixPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -914,6 +996,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -941,6 +1024,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -949,6 +1033,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -957,6 +1043,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -965,6 +1053,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { returns(T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::BillingCycleConfiguration)) } def billing_cycle_configuration end @@ -976,6 +1066,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -984,6 +1075,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -992,6 +1085,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -1000,6 +1094,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -1008,6 +1104,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -1016,6 +1113,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { returns(T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::InvoicingCycleConfiguration)) } def invoicing_cycle_configuration end @@ -1029,6 +1128,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -1104,6 +1206,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -1122,6 +1225,7 @@ module Orb end class MatrixConfig < Orb::BaseModel + # Default per unit rate for any usage not bucketed into a specified matrix_value sig { returns(String) } def default_unit_amount end @@ -1130,6 +1234,7 @@ module Orb def default_unit_amount=(_) end + # One or two event property values to evaluate matrix groups by sig { returns(T::Array[T.nilable(String)]) } def dimensions end @@ -1138,6 +1243,7 @@ module Orb def dimensions=(_) end + # Matrix values for specified matrix grouping keys sig { returns(T::Array[Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice::MatrixConfig::MatrixValue]) } def matrix_values end @@ -1174,6 +1280,9 @@ module Orb end class MatrixValue < Orb::BaseModel + # One or two matrix keys to filter usage to this Matrix value by. For example, + # ["region", "tier"] could be used to filter cloud usage by a cloud region and an + # instance tier. sig { returns(T::Array[T.nilable(String)]) } def dimension_values end @@ -1182,6 +1291,7 @@ module Orb def dimension_values=(_) end + # Unit price for the specified dimension_values sig { returns(String) } def unit_amount end @@ -1206,6 +1316,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -1214,6 +1325,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -1222,6 +1334,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -1230,6 +1344,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -1245,6 +1360,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -1253,6 +1369,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -1261,6 +1378,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -1269,6 +1388,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -1285,6 +1405,7 @@ module Orb end class NewPlanTieredPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -1293,6 +1414,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -1309,6 +1431,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -1328,6 +1451,8 @@ module Orb def tiered_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -1336,6 +1461,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -1344,6 +1471,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { returns(T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::BillingCycleConfiguration)) } def billing_cycle_configuration end @@ -1355,6 +1484,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -1363,6 +1493,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -1371,6 +1503,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -1379,6 +1512,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -1387,6 +1522,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -1395,6 +1531,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { returns(T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::InvoicingCycleConfiguration)) } def invoicing_cycle_configuration end @@ -1408,6 +1546,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -1483,6 +1624,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -1501,6 +1643,7 @@ module Orb end class TieredConfig < Orb::BaseModel + # Tiers for rating based on total usage quantities into the specified tier sig { returns(T::Array[Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice::TieredConfig::Tier]) } def tiers end @@ -1527,6 +1670,7 @@ module Orb end class Tier < Orb::BaseModel + # Inclusive tier starting value sig { returns(Float) } def first_unit end @@ -1535,6 +1679,7 @@ module Orb def first_unit=(_) end + # Amount per unit sig { returns(String) } def unit_amount end @@ -1543,6 +1688,7 @@ module Orb def unit_amount=(_) end + # Exclusive tier ending value. If null, this is treated as the last tier sig { returns(T.nilable(Float)) } def last_unit end @@ -1568,6 +1714,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -1576,6 +1723,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -1584,6 +1732,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -1592,6 +1742,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -1607,6 +1758,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -1615,6 +1767,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -1623,6 +1776,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -1631,6 +1786,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -1647,6 +1803,7 @@ module Orb end class NewPlanTieredBpsPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -1655,6 +1812,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -1671,6 +1829,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -1690,6 +1849,8 @@ module Orb def tiered_bps_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -1698,6 +1859,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -1706,6 +1869,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { returns(T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::BillingCycleConfiguration)) } def billing_cycle_configuration end @@ -1719,6 +1884,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -1727,6 +1893,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -1735,6 +1903,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -1743,6 +1912,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -1751,6 +1922,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -1759,6 +1931,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::InvoicingCycleConfiguration) @@ -1778,6 +1952,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -1853,6 +2030,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -1871,6 +2049,8 @@ module Orb end class TieredBpsConfig < Orb::BaseModel + # Tiers for a Graduated BPS pricing model, where usage is bucketed into specified + # tiers sig { returns(T::Array[Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice::TieredBpsConfig::Tier]) } def tiers end @@ -1901,6 +2081,7 @@ module Orb end class Tier < Orb::BaseModel + # Per-event basis point rate sig { returns(Float) } def bps end @@ -1909,6 +2090,7 @@ module Orb def bps=(_) end + # Inclusive tier starting value sig { returns(String) } def minimum_amount end @@ -1917,6 +2099,7 @@ module Orb def minimum_amount=(_) end + # Exclusive tier ending value sig { returns(T.nilable(String)) } def maximum_amount end @@ -1925,6 +2108,7 @@ module Orb def maximum_amount=(_) end + # Per unit maximum to charge sig { returns(T.nilable(String)) } def per_unit_maximum end @@ -1962,6 +2146,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -1970,6 +2155,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -1978,6 +2164,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -1986,6 +2174,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -2001,6 +2190,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -2009,6 +2199,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -2017,6 +2208,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -2025,6 +2218,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -2052,6 +2246,7 @@ module Orb def bps_config=(_) end + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -2060,6 +2255,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -2076,6 +2272,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -2084,6 +2281,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -2092,6 +2291,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -2100,6 +2301,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { returns(T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::BillingCycleConfiguration)) } def billing_cycle_configuration end @@ -2111,6 +2314,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -2119,6 +2323,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -2127,6 +2333,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -2135,6 +2342,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -2143,6 +2352,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -2151,6 +2361,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { returns(T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice::InvoicingCycleConfiguration)) } def invoicing_cycle_configuration end @@ -2162,6 +2374,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -2238,6 +2453,7 @@ module Orb end class BpsConfig < Orb::BaseModel + # Basis point take rate per event sig { returns(Float) } def bps end @@ -2246,6 +2462,7 @@ module Orb def bps=(_) end + # Optional currency amount maximum to cap spend per event sig { returns(T.nilable(String)) } def per_unit_maximum end @@ -2263,6 +2480,7 @@ module Orb end end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -2281,6 +2499,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -2289,6 +2508,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -2297,6 +2517,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -2305,6 +2527,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -2320,6 +2543,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -2328,6 +2552,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -2336,6 +2561,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -2344,6 +2571,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -2371,6 +2599,7 @@ module Orb def bulk_bps_config=(_) end + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -2379,6 +2608,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -2395,6 +2625,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -2403,6 +2634,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -2411,6 +2644,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -2419,6 +2654,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { returns(T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::BillingCycleConfiguration)) } def billing_cycle_configuration end @@ -2430,6 +2667,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -2438,6 +2676,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -2446,6 +2686,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -2454,6 +2695,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -2462,6 +2705,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -2470,6 +2714,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { returns(T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::InvoicingCycleConfiguration)) } def invoicing_cycle_configuration end @@ -2483,6 +2729,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -2559,6 +2808,8 @@ module Orb end class BulkBpsConfig < Orb::BaseModel + # Tiers for a bulk BPS pricing model where all usage is aggregated to a single + # tier based on total volume sig { returns(T::Array[Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice::BulkBpsConfig::Tier]) } def tiers end @@ -2585,6 +2836,7 @@ module Orb end class Tier < Orb::BaseModel + # Basis points to rate on sig { returns(Float) } def bps end @@ -2593,6 +2845,7 @@ module Orb def bps=(_) end + # Upper bound for tier sig { returns(T.nilable(String)) } def maximum_amount end @@ -2601,6 +2854,7 @@ module Orb def maximum_amount=(_) end + # The maximum amount to charge for any one event sig { returns(T.nilable(String)) } def per_unit_maximum end @@ -2630,6 +2884,7 @@ module Orb end end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -2648,6 +2903,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -2656,6 +2912,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -2664,6 +2921,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -2672,6 +2931,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -2687,6 +2947,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -2695,6 +2956,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -2703,6 +2965,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -2711,6 +2975,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -2738,6 +3003,7 @@ module Orb def bulk_config=(_) end + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -2746,6 +3012,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -2762,6 +3029,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -2770,6 +3038,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -2778,6 +3048,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -2786,6 +3058,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { returns(T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::BillingCycleConfiguration)) } def billing_cycle_configuration end @@ -2797,6 +3071,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -2805,6 +3080,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -2813,6 +3090,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -2821,6 +3099,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -2829,6 +3109,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -2837,6 +3118,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { returns(T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::InvoicingCycleConfiguration)) } def invoicing_cycle_configuration end @@ -2848,6 +3131,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -2924,6 +3210,7 @@ module Orb end class BulkConfig < Orb::BaseModel + # Bulk tiers for rating based on total usage volume sig { returns(T::Array[Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice::BulkConfig::Tier]) } def tiers end @@ -2950,6 +3237,7 @@ module Orb end class Tier < Orb::BaseModel + # Amount per unit sig { returns(String) } def unit_amount end @@ -2958,6 +3246,7 @@ module Orb def unit_amount=(_) end + # Upper bound for this tier sig { returns(T.nilable(Float)) } def maximum_units end @@ -2976,6 +3265,7 @@ module Orb end end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -2994,6 +3284,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -3002,6 +3293,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -3010,6 +3302,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -3018,6 +3312,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -3033,6 +3328,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -3041,6 +3337,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -3049,6 +3346,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -3057,6 +3356,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -3073,6 +3373,7 @@ module Orb end class NewPlanThresholdTotalAmountPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -3081,6 +3382,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -3097,6 +3399,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -3113,6 +3416,8 @@ module Orb def threshold_total_amount_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -3121,6 +3426,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -3129,6 +3436,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -3154,6 +3463,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -3162,6 +3472,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -3170,6 +3482,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -3178,6 +3491,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -3186,6 +3501,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -3194,6 +3510,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -3219,6 +3537,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -3302,6 +3623,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -3320,6 +3642,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -3328,6 +3651,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -3336,6 +3660,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -3344,6 +3670,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -3359,6 +3686,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -3367,6 +3695,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -3375,6 +3704,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -3383,6 +3714,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -3399,6 +3731,7 @@ module Orb end class NewPlanTieredPackagePrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -3407,6 +3740,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -3423,6 +3757,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -3439,6 +3774,8 @@ module Orb def tiered_package_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -3447,6 +3784,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -3455,6 +3794,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanTieredPackagePrice::BillingCycleConfiguration) @@ -3474,6 +3815,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -3482,6 +3824,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -3490,6 +3834,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -3498,6 +3843,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -3506,6 +3853,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -3514,6 +3862,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanTieredPackagePrice::InvoicingCycleConfiguration) @@ -3533,6 +3883,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -3608,6 +3961,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -3626,6 +3980,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -3634,6 +3989,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -3642,6 +3998,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -3650,6 +4008,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -3665,6 +4024,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -3673,6 +4033,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -3681,6 +4042,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -3689,6 +4052,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -3705,6 +4069,7 @@ module Orb end class NewPlanTieredWithMinimumPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -3713,6 +4078,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -3729,6 +4095,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -3745,6 +4112,8 @@ module Orb def tiered_with_minimum_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -3753,6 +4122,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -3761,6 +4132,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanTieredWithMinimumPrice::BillingCycleConfiguration) @@ -3780,6 +4153,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -3788,6 +4162,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -3796,6 +4172,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -3804,6 +4181,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -3812,6 +4191,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -3820,6 +4200,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -3845,6 +4227,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -3924,6 +4309,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -3942,6 +4328,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -3950,6 +4337,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -3958,6 +4346,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -3966,6 +4356,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -3981,6 +4372,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -3989,6 +4381,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -3997,6 +4390,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -4005,6 +4400,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -4021,6 +4417,7 @@ module Orb end class NewPlanUnitWithPercentPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -4029,6 +4426,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -4045,6 +4443,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -4061,6 +4460,8 @@ module Orb def unit_with_percent_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -4069,6 +4470,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -4077,6 +4480,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanUnitWithPercentPrice::BillingCycleConfiguration) @@ -4096,6 +4501,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -4104,6 +4510,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -4112,6 +4520,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -4120,6 +4529,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -4128,6 +4539,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -4136,6 +4548,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanUnitWithPercentPrice::InvoicingCycleConfiguration) @@ -4155,6 +4569,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -4230,6 +4647,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -4248,6 +4666,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -4256,6 +4675,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -4264,6 +4684,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -4272,6 +4694,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -4287,6 +4710,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -4295,6 +4719,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -4303,6 +4728,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -4311,6 +4738,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -4327,6 +4755,7 @@ module Orb end class NewPlanPackageWithAllocationPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -4335,6 +4764,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -4351,6 +4781,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -4367,6 +4798,8 @@ module Orb def package_with_allocation_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -4375,6 +4808,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -4383,6 +4818,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -4408,6 +4845,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -4416,6 +4854,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -4424,6 +4864,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -4432,6 +4873,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -4440,6 +4883,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -4448,6 +4892,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -4473,6 +4919,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -4556,6 +5005,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -4574,6 +5024,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -4582,6 +5033,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -4590,6 +5042,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -4598,6 +5052,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -4613,6 +5068,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -4621,6 +5077,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -4629,6 +5086,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -4637,6 +5096,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -4653,6 +5113,7 @@ module Orb end class NewPlanTierWithProrationPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -4661,6 +5122,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -4677,6 +5139,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -4693,6 +5156,8 @@ module Orb def tiered_with_proration_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -4701,6 +5166,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -4709,6 +5176,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanTierWithProrationPrice::BillingCycleConfiguration) @@ -4728,6 +5197,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -4736,6 +5206,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -4744,6 +5216,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -4752,6 +5225,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -4760,6 +5235,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -4768,6 +5244,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -4793,6 +5271,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -4872,6 +5353,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -4890,6 +5372,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -4898,6 +5381,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -4906,6 +5390,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -4914,6 +5400,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -4929,6 +5416,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -4937,6 +5425,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -4945,6 +5434,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -4953,6 +5444,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -4969,6 +5461,7 @@ module Orb end class NewPlanUnitWithProrationPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -4977,6 +5470,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -4993,6 +5487,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -5009,6 +5504,8 @@ module Orb def unit_with_proration_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -5017,6 +5514,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -5025,6 +5524,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanUnitWithProrationPrice::BillingCycleConfiguration) @@ -5044,6 +5545,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -5052,6 +5554,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -5060,6 +5564,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -5068,6 +5573,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -5076,6 +5583,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -5084,6 +5592,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -5109,6 +5619,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -5188,6 +5701,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -5206,6 +5720,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -5214,6 +5729,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -5222,6 +5738,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -5230,6 +5748,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -5245,6 +5764,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -5253,6 +5773,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -5261,6 +5782,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -5269,6 +5792,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -5285,6 +5809,7 @@ module Orb end class NewPlanGroupedAllocationPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -5301,6 +5826,7 @@ module Orb def grouped_allocation_config=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -5317,6 +5843,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -5325,6 +5852,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -5333,6 +5862,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -5341,6 +5872,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanGroupedAllocationPrice::BillingCycleConfiguration) @@ -5360,6 +5893,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -5368,6 +5902,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -5376,6 +5912,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -5384,6 +5921,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -5392,6 +5931,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -5400,6 +5940,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -5425,6 +5967,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -5504,6 +6049,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -5522,6 +6068,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -5530,6 +6077,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -5538,6 +6086,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -5546,6 +6096,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -5561,6 +6112,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -5569,6 +6121,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -5577,6 +6130,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -5585,6 +6140,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -5601,6 +6157,7 @@ module Orb end class NewPlanGroupedWithProratedMinimumPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -5617,6 +6174,7 @@ module Orb def grouped_with_prorated_minimum_config=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -5633,6 +6191,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -5641,6 +6200,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -5649,6 +6210,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -5657,6 +6220,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -5682,6 +6247,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -5690,6 +6256,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -5698,6 +6266,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -5706,6 +6275,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -5714,6 +6285,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -5722,6 +6294,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -5747,6 +6321,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -5830,6 +6407,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -5848,6 +6426,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -5856,6 +6435,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -5864,6 +6444,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -5872,6 +6454,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -5887,6 +6470,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -5895,6 +6479,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -5903,6 +6488,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -5911,6 +6498,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -5927,6 +6515,7 @@ module Orb end class NewPlanGroupedWithMeteredMinimumPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -5943,6 +6532,7 @@ module Orb def grouped_with_metered_minimum_config=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -5959,6 +6549,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -5967,6 +6558,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -5975,6 +6568,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -5983,6 +6578,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -6008,6 +6605,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -6016,6 +6614,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -6024,6 +6624,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -6032,6 +6633,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -6040,6 +6643,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -6048,6 +6652,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -6073,6 +6679,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -6156,6 +6765,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -6174,6 +6784,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -6182,6 +6793,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -6190,6 +6802,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -6198,6 +6812,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -6213,6 +6828,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -6221,6 +6837,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -6229,6 +6846,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -6237,6 +6856,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -6253,6 +6873,7 @@ module Orb end class NewPlanMatrixWithDisplayNamePrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -6261,6 +6882,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -6285,6 +6907,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -6293,6 +6916,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -6301,6 +6926,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -6309,6 +6936,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -6334,6 +6963,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -6342,6 +6972,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -6350,6 +6982,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -6358,6 +6991,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -6366,6 +7001,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -6374,6 +7010,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -6399,6 +7037,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -6482,6 +7123,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -6500,6 +7142,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -6508,6 +7151,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -6516,6 +7160,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -6524,6 +7170,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -6539,6 +7186,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -6547,6 +7195,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -6555,6 +7204,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -6563,6 +7214,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -6587,6 +7239,7 @@ module Orb def bulk_with_proration_config=(_) end + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -6595,6 +7248,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -6611,6 +7265,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -6619,6 +7274,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -6627,6 +7284,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -6635,6 +7294,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable(Orb::Models::PlanCreateParams::Price::NewPlanBulkWithProrationPrice::BillingCycleConfiguration) @@ -6654,6 +7315,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -6662,6 +7324,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -6670,6 +7334,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -6678,6 +7343,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -6686,6 +7353,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -6694,6 +7362,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -6719,6 +7389,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -6798,6 +7471,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -6816,6 +7490,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -6824,6 +7499,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -6832,6 +7508,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -6840,6 +7518,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -6855,6 +7534,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -6863,6 +7543,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -6871,6 +7552,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -6879,6 +7562,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -6895,6 +7579,7 @@ module Orb end class NewPlanGroupedTieredPackagePrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -6911,6 +7596,7 @@ module Orb def grouped_tiered_package_config=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -6927,6 +7613,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -6935,6 +7622,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -6943,6 +7632,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -6951,6 +7642,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -6976,6 +7669,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -6984,6 +7678,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -6992,6 +7688,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -7000,6 +7697,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -7008,6 +7707,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -7016,6 +7716,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -7041,6 +7743,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -7124,6 +7829,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -7142,6 +7848,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -7150,6 +7857,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -7158,6 +7866,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -7166,6 +7876,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -7181,6 +7892,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -7189,6 +7901,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -7197,6 +7910,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -7205,6 +7920,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -7221,6 +7937,7 @@ module Orb end class NewPlanMaxGroupTieredPackagePrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -7229,6 +7946,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -7253,6 +7971,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -7261,6 +7980,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -7269,6 +7990,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -7277,6 +8000,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -7302,6 +8027,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -7310,6 +8036,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -7318,6 +8046,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -7326,6 +8055,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -7334,6 +8065,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -7342,6 +8074,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -7367,6 +8101,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -7450,6 +8187,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -7468,6 +8206,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -7476,6 +8215,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -7484,6 +8224,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -7492,6 +8234,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -7507,6 +8250,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -7515,6 +8259,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -7523,6 +8268,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -7531,6 +8278,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -7547,6 +8295,7 @@ module Orb end class NewPlanScalableMatrixWithUnitPricingPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -7555,6 +8304,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -7571,6 +8321,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -7587,6 +8338,8 @@ module Orb def scalable_matrix_with_unit_pricing_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -7595,6 +8348,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -7603,6 +8358,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -7628,6 +8385,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -7636,6 +8394,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -7644,6 +8404,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -7652,6 +8413,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -7660,6 +8423,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -7668,6 +8432,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -7693,6 +8459,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -7776,6 +8545,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -7794,6 +8564,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -7802,6 +8573,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -7810,6 +8582,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -7818,6 +8592,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -7833,6 +8608,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -7841,6 +8617,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -7849,6 +8626,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -7857,6 +8636,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -7873,6 +8653,7 @@ module Orb end class NewPlanScalableMatrixWithTieredPricingPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -7881,6 +8662,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -7897,6 +8679,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -7913,6 +8696,8 @@ module Orb def scalable_matrix_with_tiered_pricing_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -7921,6 +8706,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -7929,6 +8716,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -7954,6 +8743,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -7962,6 +8752,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -7970,6 +8762,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -7978,6 +8771,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -7986,6 +8781,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -7994,6 +8790,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -8019,6 +8817,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -8102,6 +8903,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -8120,6 +8922,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -8128,6 +8931,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -8136,6 +8940,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -8144,6 +8950,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -8159,6 +8966,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -8167,6 +8975,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -8175,6 +8984,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -8183,6 +8994,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -8199,6 +9011,7 @@ module Orb end class NewPlanCumulativeGroupedBulkPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -8215,6 +9028,7 @@ module Orb def cumulative_grouped_bulk_config=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -8231,6 +9045,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -8239,6 +9054,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -8247,6 +9064,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -8255,6 +9074,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -8280,6 +9101,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -8288,6 +9110,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -8296,6 +9120,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -8304,6 +9129,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -8312,6 +9139,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -8320,6 +9148,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -8345,6 +9175,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -8428,6 +9261,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -8446,6 +9280,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -8454,6 +9289,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -8462,6 +9298,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -8470,6 +9308,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -8485,6 +9324,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -8493,6 +9333,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -8501,6 +9342,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -8509,6 +9352,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -8528,14 +9372,16 @@ module Orb sig do override .returns( - [[Symbol, Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice], [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice], [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice], [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice], [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice], [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice], [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice], [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice], [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanThresholdTotalAmountPrice], [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanTieredPackagePrice], [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanTieredWithMinimumPrice], [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanUnitWithPercentPrice], [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanPackageWithAllocationPrice], [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanTierWithProrationPrice], [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanUnitWithProrationPrice], [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanGroupedAllocationPrice], [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithProratedMinimumPrice], [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithMeteredMinimumPrice], [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanMatrixWithDisplayNamePrice], [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanBulkWithProrationPrice], [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanGroupedTieredPackagePrice], [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanMaxGroupTieredPackagePrice], [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithUnitPricingPrice], [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithTieredPricingPrice], [Symbol, Orb::Models::PlanCreateParams::Price::NewPlanCumulativeGroupedBulkPrice]] + [Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice, Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice, Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice, Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice, Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice, Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice, Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice, Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice, Orb::Models::PlanCreateParams::Price::NewPlanThresholdTotalAmountPrice, Orb::Models::PlanCreateParams::Price::NewPlanTieredPackagePrice, Orb::Models::PlanCreateParams::Price::NewPlanTieredWithMinimumPrice, Orb::Models::PlanCreateParams::Price::NewPlanUnitWithPercentPrice, Orb::Models::PlanCreateParams::Price::NewPlanPackageWithAllocationPrice, Orb::Models::PlanCreateParams::Price::NewPlanTierWithProrationPrice, Orb::Models::PlanCreateParams::Price::NewPlanUnitWithProrationPrice, Orb::Models::PlanCreateParams::Price::NewPlanGroupedAllocationPrice, Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::PlanCreateParams::Price::NewPlanMatrixWithDisplayNamePrice, Orb::Models::PlanCreateParams::Price::NewPlanBulkWithProrationPrice, Orb::Models::PlanCreateParams::Price::NewPlanGroupedTieredPackagePrice, Orb::Models::PlanCreateParams::Price::NewPlanMaxGroupTieredPackagePrice, Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::PlanCreateParams::Price::NewPlanCumulativeGroupedBulkPrice] ) end - private def variants + def variants end end end + # The status of the plan to create (either active or draft). If not specified, + # this defaults to active. class Status < Orb::Enum abstract! diff --git a/rbi/lib/orb/models/plan_list_params.rbi b/rbi/lib/orb/models/plan_list_params.rbi index 4e138c85..a21053d8 100644 --- a/rbi/lib/orb/models/plan_list_params.rbi +++ b/rbi/lib/orb/models/plan_list_params.rbi @@ -38,6 +38,8 @@ module Orb def created_at_lte=(_) end + # Cursor for pagination. This can be populated by the `next_cursor` value returned + # from the initial request. sig { returns(T.nilable(String)) } def cursor end @@ -46,6 +48,7 @@ module Orb def cursor=(_) end + # The number of items to fetch. Defaults to 20. sig { returns(T.nilable(Integer)) } def limit end @@ -54,6 +57,7 @@ module Orb def limit=(_) end + # The plan status to filter to ('active', 'archived', or 'draft'). sig { returns(T.nilable(Symbol)) } def status end @@ -105,6 +109,7 @@ module Orb def to_hash end + # The plan status to filter to ('active', 'archived', or 'draft'). class Status < Orb::Enum abstract! diff --git a/rbi/lib/orb/models/plan_update_params.rbi b/rbi/lib/orb/models/plan_update_params.rbi index f591bf4d..92488438 100644 --- a/rbi/lib/orb/models/plan_update_params.rbi +++ b/rbi/lib/orb/models/plan_update_params.rbi @@ -6,6 +6,9 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters + # An optional user-defined ID for this plan resource, used throughout the system + # as an alias for this Plan. Use this field to identify a plan by an existing + # identifier in your system. sig { returns(T.nilable(String)) } def external_plan_id end @@ -14,6 +17,9 @@ module Orb def external_plan_id=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end diff --git a/rbi/lib/orb/models/plans/external_plan_id_update_params.rbi b/rbi/lib/orb/models/plans/external_plan_id_update_params.rbi index cf4c4090..6423f027 100644 --- a/rbi/lib/orb/models/plans/external_plan_id_update_params.rbi +++ b/rbi/lib/orb/models/plans/external_plan_id_update_params.rbi @@ -7,6 +7,9 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters + # An optional user-defined ID for this plan resource, used throughout the system + # as an alias for this Plan. Use this field to identify a plan by an existing + # identifier in your system. sig { returns(T.nilable(String)) } def external_plan_id end @@ -15,6 +18,9 @@ module Orb def external_plan_id=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end diff --git a/rbi/lib/orb/models/price.rbi b/rbi/lib/orb/models/price.rbi index 4ab5b765..07eb864c 100644 --- a/rbi/lib/orb/models/price.rbi +++ b/rbi/lib/orb/models/price.rbi @@ -2,6 +2,16 @@ module Orb module Models + # The Price resource represents a price that can be billed on a subscription, + # resulting in a charge on an invoice in the form of an invoice line item. Prices + # take a quantity and determine an amount to bill. + # + # Orb supports a few different pricing models out of the box. Each of these models + # is serialized differently in a given Price object. The model_type field + # determines the key for the configuration object that is present. + # + # For more on the types of prices, see + # [the core concepts documentation](/core-concepts#plan-and-price) class Price < Orb::Union abstract! @@ -173,6 +183,10 @@ module Orb def maximum_amount=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -522,6 +536,8 @@ module Orb end class Maximum < Orb::BaseModel + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -530,6 +546,7 @@ module Orb def applies_to_price_ids=(_) end + # Maximum amount applied sig { returns(String) } def maximum_amount end @@ -550,6 +567,8 @@ module Orb end class Minimum < Orb::BaseModel + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -558,6 +577,7 @@ module Orb def applies_to_price_ids=(_) end + # Minimum amount applied sig { returns(String) } def minimum_amount end @@ -591,6 +611,7 @@ module Orb end class UnitConfig < Orb::BaseModel + # Rate per unit of usage sig { returns(String) } def unit_amount end @@ -808,6 +829,10 @@ module Orb def maximum_amount=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -1160,6 +1185,8 @@ module Orb end class Maximum < Orb::BaseModel + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1168,6 +1195,7 @@ module Orb def applies_to_price_ids=(_) end + # Maximum amount applied sig { returns(String) } def maximum_amount end @@ -1188,6 +1216,8 @@ module Orb end class Minimum < Orb::BaseModel + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1196,6 +1226,7 @@ module Orb def applies_to_price_ids=(_) end + # Minimum amount applied sig { returns(String) } def minimum_amount end @@ -1216,6 +1247,7 @@ module Orb end class PackageConfig < Orb::BaseModel + # A currency amount to rate usage by sig { returns(String) } def package_amount end @@ -1224,6 +1256,8 @@ module Orb def package_amount=(_) end + # An integer amount to represent package size. For example, 1000 here would divide + # usage by 1000 before multiplying by package_amount in rating sig { returns(Integer) } def package_size end @@ -1465,6 +1499,10 @@ module Orb def maximum_amount=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -1806,6 +1844,7 @@ module Orb end class MatrixConfig < Orb::BaseModel + # Default per unit rate for any usage not bucketed into a specified matrix_value sig { returns(String) } def default_unit_amount end @@ -1814,6 +1853,7 @@ module Orb def default_unit_amount=(_) end + # One or two event property values to evaluate matrix groups by sig { returns(T::Array[T.nilable(String)]) } def dimensions end @@ -1822,6 +1862,7 @@ module Orb def dimensions=(_) end + # Matrix values for specified matrix grouping keys sig { returns(T::Array[Orb::Models::Price::MatrixPrice::MatrixConfig::MatrixValue]) } def matrix_values end @@ -1858,6 +1899,9 @@ module Orb end class MatrixValue < Orb::BaseModel + # One or two matrix keys to filter usage to this Matrix value by. For example, + # ["region", "tier"] could be used to filter cloud usage by a cloud region and an + # instance tier. sig { returns(T::Array[T.nilable(String)]) } def dimension_values end @@ -1866,6 +1910,7 @@ module Orb def dimension_values=(_) end + # Unit price for the specified dimension_values sig { returns(String) } def unit_amount end @@ -1890,6 +1935,8 @@ module Orb end class Maximum < Orb::BaseModel + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1898,6 +1945,7 @@ module Orb def applies_to_price_ids=(_) end + # Maximum amount applied sig { returns(String) } def maximum_amount end @@ -1918,6 +1966,8 @@ module Orb end class Minimum < Orb::BaseModel + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1926,6 +1976,7 @@ module Orb def applies_to_price_ids=(_) end + # Minimum amount applied sig { returns(String) } def minimum_amount end @@ -2158,6 +2209,10 @@ module Orb def maximum_amount=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -2510,6 +2565,8 @@ module Orb end class Maximum < Orb::BaseModel + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -2518,6 +2575,7 @@ module Orb def applies_to_price_ids=(_) end + # Maximum amount applied sig { returns(String) } def maximum_amount end @@ -2538,6 +2596,8 @@ module Orb end class Minimum < Orb::BaseModel + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -2546,6 +2606,7 @@ module Orb def applies_to_price_ids=(_) end + # Minimum amount applied sig { returns(String) } def minimum_amount end @@ -2579,6 +2640,7 @@ module Orb end class TieredConfig < Orb::BaseModel + # Tiers for rating based on total usage quantities into the specified tier sig { returns(T::Array[Orb::Models::Price::TieredPrice::TieredConfig::Tier]) } def tiers end @@ -2599,6 +2661,7 @@ module Orb end class Tier < Orb::BaseModel + # Inclusive tier starting value sig { returns(Float) } def first_unit end @@ -2607,6 +2670,7 @@ module Orb def first_unit=(_) end + # Amount per unit sig { returns(String) } def unit_amount end @@ -2615,6 +2679,7 @@ module Orb def unit_amount=(_) end + # Exclusive tier ending value. If null, this is treated as the last tier sig { returns(T.nilable(Float)) } def last_unit end @@ -2839,6 +2904,10 @@ module Orb def maximum_amount=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -3191,6 +3260,8 @@ module Orb end class Maximum < Orb::BaseModel + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -3199,6 +3270,7 @@ module Orb def applies_to_price_ids=(_) end + # Maximum amount applied sig { returns(String) } def maximum_amount end @@ -3219,6 +3291,8 @@ module Orb end class Minimum < Orb::BaseModel + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -3227,6 +3301,7 @@ module Orb def applies_to_price_ids=(_) end + # Minimum amount applied sig { returns(String) } def minimum_amount end @@ -3260,6 +3335,8 @@ module Orb end class TieredBpsConfig < Orb::BaseModel + # Tiers for a Graduated BPS pricing model, where usage is bucketed into specified + # tiers sig { returns(T::Array[Orb::Models::Price::TieredBpsPrice::TieredBpsConfig::Tier]) } def tiers end @@ -3283,6 +3360,7 @@ module Orb end class Tier < Orb::BaseModel + # Per-event basis point rate sig { returns(Float) } def bps end @@ -3291,6 +3369,7 @@ module Orb def bps=(_) end + # Inclusive tier starting value sig { returns(String) } def minimum_amount end @@ -3299,6 +3378,7 @@ module Orb def minimum_amount=(_) end + # Exclusive tier ending value sig { returns(T.nilable(String)) } def maximum_amount end @@ -3307,6 +3387,7 @@ module Orb def maximum_amount=(_) end + # Per unit maximum to charge sig { returns(T.nilable(String)) } def per_unit_maximum end @@ -3551,6 +3632,10 @@ module Orb def maximum_amount=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -3784,6 +3869,7 @@ module Orb end class BpsConfig < Orb::BaseModel + # Basis point take rate per event sig { returns(Float) } def bps end @@ -3792,6 +3878,7 @@ module Orb def bps=(_) end + # Optional currency amount maximum to cap spend per event sig { returns(T.nilable(String)) } def per_unit_maximum end @@ -3918,6 +4005,8 @@ module Orb end class Maximum < Orb::BaseModel + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -3926,6 +4015,7 @@ module Orb def applies_to_price_ids=(_) end + # Maximum amount applied sig { returns(String) } def maximum_amount end @@ -3946,6 +4036,8 @@ module Orb end class Minimum < Orb::BaseModel + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -3954,6 +4046,7 @@ module Orb def applies_to_price_ids=(_) end + # Minimum amount applied sig { returns(String) } def minimum_amount end @@ -4197,6 +4290,10 @@ module Orb def maximum_amount=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -4430,6 +4527,8 @@ module Orb end class BulkBpsConfig < Orb::BaseModel + # Tiers for a bulk BPS pricing model where all usage is aggregated to a single + # tier based on total volume sig { returns(T::Array[Orb::Models::Price::BulkBpsPrice::BulkBpsConfig::Tier]) } def tiers end @@ -4450,6 +4549,7 @@ module Orb end class Tier < Orb::BaseModel + # Basis points to rate on sig { returns(Float) } def bps end @@ -4458,6 +4558,7 @@ module Orb def bps=(_) end + # Upper bound for tier sig { returns(T.nilable(String)) } def maximum_amount end @@ -4466,6 +4567,7 @@ module Orb def maximum_amount=(_) end + # The maximum amount to charge for any one event sig { returns(T.nilable(String)) } def per_unit_maximum end @@ -4604,6 +4706,8 @@ module Orb end class Maximum < Orb::BaseModel + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -4612,6 +4716,7 @@ module Orb def applies_to_price_ids=(_) end + # Maximum amount applied sig { returns(String) } def maximum_amount end @@ -4632,6 +4737,8 @@ module Orb end class Minimum < Orb::BaseModel + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -4640,6 +4747,7 @@ module Orb def applies_to_price_ids=(_) end + # Minimum amount applied sig { returns(String) } def minimum_amount end @@ -4880,6 +4988,10 @@ module Orb def maximum_amount=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -5113,6 +5225,7 @@ module Orb end class BulkConfig < Orb::BaseModel + # Bulk tiers for rating based on total usage volume sig { returns(T::Array[Orb::Models::Price::BulkPrice::BulkConfig::Tier]) } def tiers end @@ -5133,6 +5246,7 @@ module Orb end class Tier < Orb::BaseModel + # Amount per unit sig { returns(String) } def unit_amount end @@ -5141,6 +5255,7 @@ module Orb def unit_amount=(_) end + # Upper bound for this tier sig { returns(T.nilable(Float)) } def maximum_units end @@ -5268,6 +5383,8 @@ module Orb end class Maximum < Orb::BaseModel + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -5276,6 +5393,7 @@ module Orb def applies_to_price_ids=(_) end + # Maximum amount applied sig { returns(String) } def maximum_amount end @@ -5296,6 +5414,8 @@ module Orb end class Minimum < Orb::BaseModel + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -5304,6 +5424,7 @@ module Orb def applies_to_price_ids=(_) end + # Minimum amount applied sig { returns(String) } def minimum_amount end @@ -5539,6 +5660,10 @@ module Orb def maximum_amount=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -5888,6 +6013,8 @@ module Orb end class Maximum < Orb::BaseModel + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -5896,6 +6023,7 @@ module Orb def applies_to_price_ids=(_) end + # Maximum amount applied sig { returns(String) } def maximum_amount end @@ -5916,6 +6044,8 @@ module Orb end class Minimum < Orb::BaseModel + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -5924,6 +6054,7 @@ module Orb def applies_to_price_ids=(_) end + # Minimum amount applied sig { returns(String) } def minimum_amount end @@ -6159,6 +6290,10 @@ module Orb def maximum_amount=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -6508,6 +6643,8 @@ module Orb end class Maximum < Orb::BaseModel + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -6516,6 +6653,7 @@ module Orb def applies_to_price_ids=(_) end + # Maximum amount applied sig { returns(String) } def maximum_amount end @@ -6536,6 +6674,8 @@ module Orb end class Minimum < Orb::BaseModel + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -6544,6 +6684,7 @@ module Orb def applies_to_price_ids=(_) end + # Minimum amount applied sig { returns(String) } def minimum_amount end @@ -6787,6 +6928,10 @@ module Orb def maximum_amount=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -7128,6 +7273,8 @@ module Orb end class Maximum < Orb::BaseModel + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -7136,6 +7283,7 @@ module Orb def applies_to_price_ids=(_) end + # Maximum amount applied sig { returns(String) } def maximum_amount end @@ -7156,6 +7304,8 @@ module Orb end class Minimum < Orb::BaseModel + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -7164,6 +7314,7 @@ module Orb def applies_to_price_ids=(_) end + # Minimum amount applied sig { returns(String) } def minimum_amount end @@ -7399,6 +7550,10 @@ module Orb def maximum_amount=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -7748,6 +7903,8 @@ module Orb end class Maximum < Orb::BaseModel + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -7756,6 +7913,7 @@ module Orb def applies_to_price_ids=(_) end + # Maximum amount applied sig { returns(String) } def maximum_amount end @@ -7776,6 +7934,8 @@ module Orb end class Minimum < Orb::BaseModel + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -7784,6 +7944,7 @@ module Orb def applies_to_price_ids=(_) end + # Minimum amount applied sig { returns(String) } def minimum_amount end @@ -8019,6 +8180,10 @@ module Orb def maximum_amount=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -8368,6 +8533,8 @@ module Orb end class Maximum < Orb::BaseModel + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -8376,6 +8543,7 @@ module Orb def applies_to_price_ids=(_) end + # Maximum amount applied sig { returns(String) } def maximum_amount end @@ -8396,6 +8564,8 @@ module Orb end class Minimum < Orb::BaseModel + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -8404,6 +8574,7 @@ module Orb def applies_to_price_ids=(_) end + # Minimum amount applied sig { returns(String) } def minimum_amount end @@ -8639,6 +8810,10 @@ module Orb def maximum_amount=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -8988,6 +9163,8 @@ module Orb end class Maximum < Orb::BaseModel + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -8996,6 +9173,7 @@ module Orb def applies_to_price_ids=(_) end + # Maximum amount applied sig { returns(String) } def maximum_amount end @@ -9016,6 +9194,8 @@ module Orb end class Minimum < Orb::BaseModel + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -9024,6 +9204,7 @@ module Orb def applies_to_price_ids=(_) end + # Minimum amount applied sig { returns(String) } def minimum_amount end @@ -9259,6 +9440,10 @@ module Orb def maximum_amount=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -9608,6 +9793,8 @@ module Orb end class Maximum < Orb::BaseModel + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -9616,6 +9803,7 @@ module Orb def applies_to_price_ids=(_) end + # Maximum amount applied sig { returns(String) } def maximum_amount end @@ -9636,6 +9824,8 @@ module Orb end class Minimum < Orb::BaseModel + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -9644,6 +9834,7 @@ module Orb def applies_to_price_ids=(_) end + # Minimum amount applied sig { returns(String) } def minimum_amount end @@ -9890,6 +10081,10 @@ module Orb def maximum_amount=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -10231,6 +10426,7 @@ module Orb end class MatrixWithAllocationConfig < Orb::BaseModel + # Allocation to be used to calculate the price sig { returns(Float) } def allocation end @@ -10239,6 +10435,7 @@ module Orb def allocation=(_) end + # Default per unit rate for any usage not bucketed into a specified matrix_value sig { returns(String) } def default_unit_amount end @@ -10247,6 +10444,7 @@ module Orb def default_unit_amount=(_) end + # One or two event property values to evaluate matrix groups by sig { returns(T::Array[T.nilable(String)]) } def dimensions end @@ -10255,6 +10453,7 @@ module Orb def dimensions=(_) end + # Matrix values for specified matrix grouping keys sig { returns(T::Array[Orb::Models::Price::MatrixWithAllocationPrice::MatrixWithAllocationConfig::MatrixValue]) } def matrix_values end @@ -10295,6 +10494,9 @@ module Orb end class MatrixValue < Orb::BaseModel + # One or two matrix keys to filter usage to this Matrix value by. For example, + # ["region", "tier"] could be used to filter cloud usage by a cloud region and an + # instance tier. sig { returns(T::Array[T.nilable(String)]) } def dimension_values end @@ -10303,6 +10505,7 @@ module Orb def dimension_values=(_) end + # Unit price for the specified dimension_values sig { returns(String) } def unit_amount end @@ -10327,6 +10530,8 @@ module Orb end class Maximum < Orb::BaseModel + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -10335,6 +10540,7 @@ module Orb def applies_to_price_ids=(_) end + # Maximum amount applied sig { returns(String) } def maximum_amount end @@ -10355,6 +10561,8 @@ module Orb end class Minimum < Orb::BaseModel + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -10363,6 +10571,7 @@ module Orb def applies_to_price_ids=(_) end + # Minimum amount applied sig { returns(String) } def minimum_amount end @@ -10598,6 +10807,10 @@ module Orb def maximum_amount=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -10947,6 +11160,8 @@ module Orb end class Maximum < Orb::BaseModel + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -10955,6 +11170,7 @@ module Orb def applies_to_price_ids=(_) end + # Maximum amount applied sig { returns(String) } def maximum_amount end @@ -10975,6 +11191,8 @@ module Orb end class Minimum < Orb::BaseModel + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -10983,6 +11201,7 @@ module Orb def applies_to_price_ids=(_) end + # Minimum amount applied sig { returns(String) } def minimum_amount end @@ -11218,6 +11437,10 @@ module Orb def maximum_amount=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -11567,6 +11790,8 @@ module Orb end class Maximum < Orb::BaseModel + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -11575,6 +11800,7 @@ module Orb def applies_to_price_ids=(_) end + # Maximum amount applied sig { returns(String) } def maximum_amount end @@ -11595,6 +11821,8 @@ module Orb end class Minimum < Orb::BaseModel + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -11603,6 +11831,7 @@ module Orb def applies_to_price_ids=(_) end + # Minimum amount applied sig { returns(String) } def minimum_amount end @@ -11846,6 +12075,10 @@ module Orb def maximum_amount=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -12187,6 +12420,8 @@ module Orb end class Maximum < Orb::BaseModel + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -12195,6 +12430,7 @@ module Orb def applies_to_price_ids=(_) end + # Maximum amount applied sig { returns(String) } def maximum_amount end @@ -12215,6 +12451,8 @@ module Orb end class Minimum < Orb::BaseModel + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -12223,6 +12461,7 @@ module Orb def applies_to_price_ids=(_) end + # Minimum amount applied sig { returns(String) } def minimum_amount end @@ -12466,6 +12705,10 @@ module Orb def maximum_amount=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -12807,6 +13050,8 @@ module Orb end class Maximum < Orb::BaseModel + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -12815,6 +13060,7 @@ module Orb def applies_to_price_ids=(_) end + # Maximum amount applied sig { returns(String) } def maximum_amount end @@ -12835,6 +13081,8 @@ module Orb end class Minimum < Orb::BaseModel + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -12843,6 +13091,7 @@ module Orb def applies_to_price_ids=(_) end + # Minimum amount applied sig { returns(String) } def minimum_amount end @@ -13086,6 +13335,10 @@ module Orb def maximum_amount=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -13427,6 +13680,8 @@ module Orb end class Maximum < Orb::BaseModel + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -13435,6 +13690,7 @@ module Orb def applies_to_price_ids=(_) end + # Maximum amount applied sig { returns(String) } def maximum_amount end @@ -13455,6 +13711,8 @@ module Orb end class Minimum < Orb::BaseModel + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -13463,6 +13721,7 @@ module Orb def applies_to_price_ids=(_) end + # Minimum amount applied sig { returns(String) } def minimum_amount end @@ -13706,6 +13965,10 @@ module Orb def maximum_amount=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -14047,6 +14310,8 @@ module Orb end class Maximum < Orb::BaseModel + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -14055,6 +14320,7 @@ module Orb def applies_to_price_ids=(_) end + # Maximum amount applied sig { returns(String) } def maximum_amount end @@ -14075,6 +14341,8 @@ module Orb end class Minimum < Orb::BaseModel + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -14083,6 +14351,7 @@ module Orb def applies_to_price_ids=(_) end + # Minimum amount applied sig { returns(String) } def minimum_amount end @@ -14326,6 +14595,10 @@ module Orb def maximum_amount=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -14667,6 +14940,8 @@ module Orb end class Maximum < Orb::BaseModel + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -14675,6 +14950,7 @@ module Orb def applies_to_price_ids=(_) end + # Maximum amount applied sig { returns(String) } def maximum_amount end @@ -14695,6 +14971,8 @@ module Orb end class Minimum < Orb::BaseModel + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -14703,6 +14981,7 @@ module Orb def applies_to_price_ids=(_) end + # Minimum amount applied sig { returns(String) } def minimum_amount end @@ -14946,6 +15225,10 @@ module Orb def maximum_amount=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -15287,6 +15570,8 @@ module Orb end class Maximum < Orb::BaseModel + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -15295,6 +15580,7 @@ module Orb def applies_to_price_ids=(_) end + # Maximum amount applied sig { returns(String) } def maximum_amount end @@ -15315,6 +15601,8 @@ module Orb end class Minimum < Orb::BaseModel + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -15323,6 +15611,7 @@ module Orb def applies_to_price_ids=(_) end + # Minimum amount applied sig { returns(String) } def minimum_amount end @@ -15566,6 +15855,10 @@ module Orb def maximum_amount=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -15907,6 +16200,8 @@ module Orb end class Maximum < Orb::BaseModel + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -15915,6 +16210,7 @@ module Orb def applies_to_price_ids=(_) end + # Maximum amount applied sig { returns(String) } def maximum_amount end @@ -15935,6 +16231,8 @@ module Orb end class Minimum < Orb::BaseModel + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -15943,6 +16241,7 @@ module Orb def applies_to_price_ids=(_) end + # Minimum amount applied sig { returns(String) } def minimum_amount end @@ -16178,6 +16477,10 @@ module Orb def maximum_amount=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -16529,6 +16832,8 @@ module Orb end class Maximum < Orb::BaseModel + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -16537,6 +16842,7 @@ module Orb def applies_to_price_ids=(_) end + # Maximum amount applied sig { returns(String) } def maximum_amount end @@ -16557,6 +16863,8 @@ module Orb end class Minimum < Orb::BaseModel + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -16565,6 +16873,7 @@ module Orb def applies_to_price_ids=(_) end + # Minimum amount applied sig { returns(String) } def minimum_amount end @@ -16802,6 +17111,10 @@ module Orb def maximum_amount=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -17159,6 +17472,8 @@ module Orb end class Maximum < Orb::BaseModel + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -17167,6 +17482,7 @@ module Orb def applies_to_price_ids=(_) end + # Maximum amount applied sig { returns(String) } def maximum_amount end @@ -17187,6 +17503,8 @@ module Orb end class Minimum < Orb::BaseModel + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -17195,6 +17513,7 @@ module Orb def applies_to_price_ids=(_) end + # Minimum amount applied sig { returns(String) } def minimum_amount end @@ -17438,6 +17757,10 @@ module Orb def maximum_amount=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -17779,6 +18102,8 @@ module Orb end class Maximum < Orb::BaseModel + # List of price_ids that this maximum amount applies to. For plan/plan phase + # maximums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -17787,6 +18112,7 @@ module Orb def applies_to_price_ids=(_) end + # Maximum amount applied sig { returns(String) } def maximum_amount end @@ -17807,6 +18133,8 @@ module Orb end class Minimum < Orb::BaseModel + # List of price_ids that this minimum amount applies to. For plan/plan phase + # minimums, this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -17815,6 +18143,7 @@ module Orb def applies_to_price_ids=(_) end + # Minimum amount applied sig { returns(String) } def minimum_amount end @@ -17883,10 +18212,10 @@ module Orb sig do override .returns( - [[Symbol, Orb::Models::Price::UnitPrice], [Symbol, Orb::Models::Price::PackagePrice], [Symbol, Orb::Models::Price::MatrixPrice], [Symbol, Orb::Models::Price::TieredPrice], [Symbol, Orb::Models::Price::TieredBpsPrice], [Symbol, Orb::Models::Price::BpsPrice], [Symbol, Orb::Models::Price::BulkBpsPrice], [Symbol, Orb::Models::Price::BulkPrice], [Symbol, Orb::Models::Price::ThresholdTotalAmountPrice], [Symbol, Orb::Models::Price::TieredPackagePrice], [Symbol, Orb::Models::Price::GroupedTieredPrice], [Symbol, Orb::Models::Price::TieredWithMinimumPrice], [Symbol, Orb::Models::Price::TieredPackageWithMinimumPrice], [Symbol, Orb::Models::Price::PackageWithAllocationPrice], [Symbol, Orb::Models::Price::UnitWithPercentPrice], [Symbol, Orb::Models::Price::MatrixWithAllocationPrice], [Symbol, Orb::Models::Price::TieredWithProrationPrice], [Symbol, Orb::Models::Price::UnitWithProrationPrice], [Symbol, Orb::Models::Price::GroupedAllocationPrice], [Symbol, Orb::Models::Price::GroupedWithProratedMinimumPrice], [Symbol, Orb::Models::Price::GroupedWithMeteredMinimumPrice], [Symbol, Orb::Models::Price::MatrixWithDisplayNamePrice], [Symbol, Orb::Models::Price::BulkWithProrationPrice], [Symbol, Orb::Models::Price::GroupedTieredPackagePrice], [Symbol, Orb::Models::Price::MaxGroupTieredPackagePrice], [Symbol, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice], [Symbol, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice], [Symbol, Orb::Models::Price::CumulativeGroupedBulkPrice]] + [Orb::Models::Price::UnitPrice, Orb::Models::Price::PackagePrice, Orb::Models::Price::MatrixPrice, Orb::Models::Price::TieredPrice, Orb::Models::Price::TieredBpsPrice, Orb::Models::Price::BpsPrice, Orb::Models::Price::BulkBpsPrice, Orb::Models::Price::BulkPrice, Orb::Models::Price::ThresholdTotalAmountPrice, Orb::Models::Price::TieredPackagePrice, Orb::Models::Price::GroupedTieredPrice, Orb::Models::Price::TieredWithMinimumPrice, Orb::Models::Price::TieredPackageWithMinimumPrice, Orb::Models::Price::PackageWithAllocationPrice, Orb::Models::Price::UnitWithPercentPrice, Orb::Models::Price::MatrixWithAllocationPrice, Orb::Models::Price::TieredWithProrationPrice, Orb::Models::Price::UnitWithProrationPrice, Orb::Models::Price::GroupedAllocationPrice, Orb::Models::Price::GroupedWithProratedMinimumPrice, Orb::Models::Price::GroupedWithMeteredMinimumPrice, Orb::Models::Price::MatrixWithDisplayNamePrice, Orb::Models::Price::BulkWithProrationPrice, Orb::Models::Price::GroupedTieredPackagePrice, Orb::Models::Price::MaxGroupTieredPackagePrice, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, Orb::Models::Price::CumulativeGroupedBulkPrice] ) end - private def variants + def variants end end end diff --git a/rbi/lib/orb/models/price_create_params.rbi b/rbi/lib/orb/models/price_create_params.rbi index 61aea055..2694a3e6 100644 --- a/rbi/lib/orb/models/price_create_params.rbi +++ b/rbi/lib/orb/models/price_create_params.rbi @@ -6,6 +6,7 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -14,6 +15,7 @@ module Orb def cadence=(_) end + # An ISO 4217 currency string for which this price is billed in. sig { returns(String) } def currency end @@ -22,6 +24,7 @@ module Orb def currency=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -38,6 +41,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -54,6 +58,8 @@ module Orb def unit_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -62,6 +68,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -70,6 +78,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { returns(T.nilable(Orb::Models::PriceCreateParams::BillingCycleConfiguration)) } def billing_cycle_configuration end @@ -81,6 +91,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -89,6 +100,7 @@ module Orb def conversion_rate=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -97,6 +109,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -105,6 +119,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -113,6 +128,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { returns(T.nilable(Orb::Models::PriceCreateParams::InvoicingCycleConfiguration)) } def invoicing_cycle_configuration end @@ -124,6 +141,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -517,6 +537,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -547,6 +568,7 @@ module Orb end class UnitConfig < Orb::BaseModel + # Rate per unit of usage sig { returns(String) } def unit_amount end @@ -565,6 +587,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -573,6 +596,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -581,6 +605,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -589,6 +615,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -604,6 +631,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -612,6 +640,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -620,6 +649,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -628,6 +659,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -643,6 +675,7 @@ module Orb end class PackageConfig < Orb::BaseModel + # A currency amount to rate usage by sig { returns(String) } def package_amount end @@ -651,6 +684,8 @@ module Orb def package_amount=(_) end + # An integer amount to represent package size. For example, 1000 here would divide + # usage by 1000 before multiplying by package_amount in rating sig { returns(Integer) } def package_size end @@ -669,6 +704,7 @@ module Orb end class MatrixConfig < Orb::BaseModel + # Default per unit rate for any usage not bucketed into a specified matrix_value sig { returns(String) } def default_unit_amount end @@ -677,6 +713,7 @@ module Orb def default_unit_amount=(_) end + # One or two event property values to evaluate matrix groups by sig { returns(T::Array[T.nilable(String)]) } def dimensions end @@ -685,6 +722,7 @@ module Orb def dimensions=(_) end + # Matrix values for specified matrix grouping keys sig { returns(T::Array[Orb::Models::PriceCreateParams::MatrixConfig::MatrixValue]) } def matrix_values end @@ -721,6 +759,9 @@ module Orb end class MatrixValue < Orb::BaseModel + # One or two matrix keys to filter usage to this Matrix value by. For example, + # ["region", "tier"] could be used to filter cloud usage by a cloud region and an + # instance tier. sig { returns(T::Array[T.nilable(String)]) } def dimension_values end @@ -729,6 +770,7 @@ module Orb def dimension_values=(_) end + # Unit price for the specified dimension_values sig { returns(String) } def unit_amount end @@ -753,6 +795,7 @@ module Orb end class MatrixWithAllocationConfig < Orb::BaseModel + # Allocation to be used to calculate the price sig { returns(Float) } def allocation end @@ -761,6 +804,7 @@ module Orb def allocation=(_) end + # Default per unit rate for any usage not bucketed into a specified matrix_value sig { returns(String) } def default_unit_amount end @@ -769,6 +813,7 @@ module Orb def default_unit_amount=(_) end + # One or two event property values to evaluate matrix groups by sig { returns(T::Array[T.nilable(String)]) } def dimensions end @@ -777,6 +822,7 @@ module Orb def dimensions=(_) end + # Matrix values for specified matrix grouping keys sig { returns(T::Array[Orb::Models::PriceCreateParams::MatrixWithAllocationConfig::MatrixValue]) } def matrix_values end @@ -815,6 +861,9 @@ module Orb end class MatrixValue < Orb::BaseModel + # One or two matrix keys to filter usage to this Matrix value by. For example, + # ["region", "tier"] could be used to filter cloud usage by a cloud region and an + # instance tier. sig { returns(T::Array[T.nilable(String)]) } def dimension_values end @@ -823,6 +872,7 @@ module Orb def dimension_values=(_) end + # Unit price for the specified dimension_values sig { returns(String) } def unit_amount end @@ -847,6 +897,7 @@ module Orb end class TieredConfig < Orb::BaseModel + # Tiers for rating based on total usage quantities into the specified tier sig { returns(T::Array[Orb::Models::PriceCreateParams::TieredConfig::Tier]) } def tiers end @@ -867,6 +918,7 @@ module Orb end class Tier < Orb::BaseModel + # Inclusive tier starting value sig { returns(Float) } def first_unit end @@ -875,6 +927,7 @@ module Orb def first_unit=(_) end + # Amount per unit sig { returns(String) } def unit_amount end @@ -883,6 +936,7 @@ module Orb def unit_amount=(_) end + # Exclusive tier ending value. If null, this is treated as the last tier sig { returns(T.nilable(Float)) } def last_unit end @@ -908,6 +962,8 @@ module Orb end class TieredBpsConfig < Orb::BaseModel + # Tiers for a Graduated BPS pricing model, where usage is bucketed into specified + # tiers sig { returns(T::Array[Orb::Models::PriceCreateParams::TieredBpsConfig::Tier]) } def tiers end @@ -928,6 +984,7 @@ module Orb end class Tier < Orb::BaseModel + # Per-event basis point rate sig { returns(Float) } def bps end @@ -936,6 +993,7 @@ module Orb def bps=(_) end + # Inclusive tier starting value sig { returns(String) } def minimum_amount end @@ -944,6 +1002,7 @@ module Orb def minimum_amount=(_) end + # Exclusive tier ending value sig { returns(T.nilable(String)) } def maximum_amount end @@ -952,6 +1011,7 @@ module Orb def maximum_amount=(_) end + # Per unit maximum to charge sig { returns(T.nilable(String)) } def per_unit_maximum end @@ -989,6 +1049,7 @@ module Orb end class BpsConfig < Orb::BaseModel + # Basis point take rate per event sig { returns(Float) } def bps end @@ -997,6 +1058,7 @@ module Orb def bps=(_) end + # Optional currency amount maximum to cap spend per event sig { returns(T.nilable(String)) } def per_unit_maximum end @@ -1015,6 +1077,8 @@ module Orb end class BulkBpsConfig < Orb::BaseModel + # Tiers for a bulk BPS pricing model where all usage is aggregated to a single + # tier based on total volume sig { returns(T::Array[Orb::Models::PriceCreateParams::BulkBpsConfig::Tier]) } def tiers end @@ -1035,6 +1099,7 @@ module Orb end class Tier < Orb::BaseModel + # Basis points to rate on sig { returns(Float) } def bps end @@ -1043,6 +1108,7 @@ module Orb def bps=(_) end + # Upper bound for tier sig { returns(T.nilable(String)) } def maximum_amount end @@ -1051,6 +1117,7 @@ module Orb def maximum_amount=(_) end + # The maximum amount to charge for any one event sig { returns(T.nilable(String)) } def per_unit_maximum end @@ -1081,6 +1148,7 @@ module Orb end class BulkConfig < Orb::BaseModel + # Bulk tiers for rating based on total usage volume sig { returns(T::Array[Orb::Models::PriceCreateParams::BulkConfig::Tier]) } def tiers end @@ -1101,6 +1169,7 @@ module Orb end class Tier < Orb::BaseModel + # Amount per unit sig { returns(String) } def unit_amount end @@ -1109,6 +1178,7 @@ module Orb def unit_amount=(_) end + # Upper bound for this tier sig { returns(T.nilable(Float)) } def maximum_units end diff --git a/rbi/lib/orb/models/price_evaluate_params.rbi b/rbi/lib/orb/models/price_evaluate_params.rbi index fadc6d31..15ca6b94 100644 --- a/rbi/lib/orb/models/price_evaluate_params.rbi +++ b/rbi/lib/orb/models/price_evaluate_params.rbi @@ -6,6 +6,7 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters + # The exclusive upper bound for event timestamps sig { returns(Time) } def timeframe_end end @@ -14,6 +15,7 @@ module Orb def timeframe_end=(_) end + # The inclusive lower bound for event timestamps sig { returns(Time) } def timeframe_start end @@ -22,6 +24,7 @@ module Orb def timeframe_start=(_) end + # The ID of the customer to which this evaluation is scoped. sig { returns(T.nilable(String)) } def customer_id end @@ -30,6 +33,7 @@ module Orb def customer_id=(_) end + # The external customer ID of the customer to which this evaluation is scoped. sig { returns(T.nilable(String)) } def external_customer_id end @@ -38,6 +42,9 @@ module Orb def external_customer_id=(_) end + # A boolean + # [computed property](/extensibility/advanced-metrics#computed-properties) used to + # filter the underlying billable metric sig { returns(T.nilable(String)) } def filter end @@ -46,6 +53,9 @@ module Orb def filter=(_) end + # Properties (or + # [computed properties](/extensibility/advanced-metrics#computed-properties)) used + # to group the underlying billable metric sig { returns(T.nilable(T::Array[String])) } def grouping_keys end diff --git a/rbi/lib/orb/models/price_list_params.rbi b/rbi/lib/orb/models/price_list_params.rbi index ee8b8d18..e15322fb 100644 --- a/rbi/lib/orb/models/price_list_params.rbi +++ b/rbi/lib/orb/models/price_list_params.rbi @@ -6,6 +6,8 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters + # Cursor for pagination. This can be populated by the `next_cursor` value returned + # from the initial request. sig { returns(T.nilable(String)) } def cursor end @@ -14,6 +16,7 @@ module Orb def cursor=(_) end + # The number of items to fetch. Defaults to 20. sig { returns(T.nilable(Integer)) } def limit end diff --git a/rbi/lib/orb/models/price_update_params.rbi b/rbi/lib/orb/models/price_update_params.rbi index 7df3f932..f0c1f96e 100644 --- a/rbi/lib/orb/models/price_update_params.rbi +++ b/rbi/lib/orb/models/price_update_params.rbi @@ -6,6 +6,9 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end diff --git a/rbi/lib/orb/models/prices/external_price_id_update_params.rbi b/rbi/lib/orb/models/prices/external_price_id_update_params.rbi index 609fb4cd..5507e3d4 100644 --- a/rbi/lib/orb/models/prices/external_price_id_update_params.rbi +++ b/rbi/lib/orb/models/prices/external_price_id_update_params.rbi @@ -7,6 +7,9 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end diff --git a/rbi/lib/orb/models/subscription.rbi b/rbi/lib/orb/models/subscription.rbi index 49a3625f..9baea345 100644 --- a/rbi/lib/orb/models/subscription.rbi +++ b/rbi/lib/orb/models/subscription.rbi @@ -11,6 +11,8 @@ module Orb def id=(_) end + # The current plan phase that is active, only if the subscription's plan has + # phases. sig { returns(T.nilable(Integer)) } def active_plan_phase_order end @@ -19,6 +21,8 @@ module Orb def active_plan_phase_order=(_) end + # The adjustment intervals for this subscription sorted by the start_date of the + # adjustment interval. sig { returns(T::Array[Orb::Models::Subscription::AdjustmentInterval]) } def adjustment_intervals end @@ -30,6 +34,9 @@ module Orb def adjustment_intervals=(_) end + # Determines whether issued invoices for this subscription will automatically be + # charged with the saved payment method on the due date. This property defaults to + # the plan's behavior. If null, defaults to the customer's setting. sig { returns(T.nilable(T::Boolean)) } def auto_collection end @@ -49,6 +56,10 @@ module Orb def billing_cycle_anchor_configuration=(_) end + # The day of the month on which the billing cycle is anchored. If the maximum + # number of days in a month is greater than this value, the last day of the month + # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing + # period begins on the 30th. sig { returns(Integer) } def billing_cycle_day end @@ -65,6 +76,9 @@ module Orb def created_at=(_) end + # The end of the current billing period. This is an exclusive timestamp, such that + # the instant returned is not part of the billing period. Set to null for + # subscriptions that are not currently active. sig { returns(T.nilable(Time)) } def current_billing_period_end_date end @@ -73,6 +87,9 @@ module Orb def current_billing_period_end_date=(_) end + # The start date of the current billing period. This is an inclusive timestamp; + # the instant returned is exactly the beginning of the billing period. Set to null + # if the subscription is not currently active. sig { returns(T.nilable(Time)) } def current_billing_period_start_date end @@ -81,6 +98,24 @@ module Orb def current_billing_period_start_date=(_) end + # A customer is a buyer of your products, and the other party to the billing + # relationship. + # + # In Orb, customers are assigned system generated identifiers automatically, but + # it's often desirable to have these match existing identifiers in your system. To + # avoid having to denormalize Orb ID information, you can pass in an + # `external_customer_id` with your own identifier. See + # [Customer ID Aliases](/events-and-metrics/customer-aliases) for further + # information about how these aliases work in Orb. + # + # In addition to having an identifier in your system, a customer may exist in a + # payment provider solution like Stripe. Use the `payment_provider_id` and the + # `payment_provider` enum field to express this mapping. + # + # A customer also has a timezone (from the standard + # [IANA timezone database](https://www.iana.org/time-zones)), which defaults to + # your account's timezone. See [Timezone localization](/essentials/timezones) for + # information on what this timezone parameter influences within Orb. sig { returns(Orb::Models::Customer) } def customer end @@ -89,6 +124,8 @@ module Orb def customer=(_) end + # Determines the default memo on this subscriptions' invoices. Note that if this + # is not provided, it is determined by the plan configuration. sig { returns(T.nilable(String)) } def default_invoice_memo end @@ -97,6 +134,7 @@ module Orb def default_invoice_memo=(_) end + # The discount intervals for this subscription sorted by the start_date. sig do returns( T::Array[ @@ -134,6 +172,7 @@ module Orb def discount_intervals=(_) end + # The date Orb stops billing for this subscription. sig { returns(T.nilable(Time)) } def end_date end @@ -161,6 +200,7 @@ module Orb def invoicing_threshold=(_) end + # The maximum intervals for this subscription sorted by the start_date. sig { returns(T::Array[Orb::Models::Subscription::MaximumInterval]) } def maximum_intervals end @@ -172,6 +212,10 @@ module Orb def maximum_intervals=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -180,6 +224,7 @@ module Orb def metadata=(_) end + # The minimum intervals for this subscription sorted by the start_date. sig { returns(T::Array[Orb::Models::Subscription::MinimumInterval]) } def minimum_intervals end @@ -191,6 +236,10 @@ module Orb def minimum_intervals=(_) end + # Determines the difference between the invoice issue date for subscription + # invoices as the date that they are due. A value of `0` here represents that the + # invoice is due on issue, whereas a value of `30` represents that the customer + # has a month to pay the invoice. sig { returns(Integer) } def net_terms end @@ -199,6 +248,10 @@ module Orb def net_terms=(_) end + # The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be + # subscribed to by a customer. Plans define the billing behavior of the + # subscription. You can see more about how to configure prices in the + # [Price resource](/reference/price). sig { returns(Orb::Models::Plan) } def plan end @@ -207,6 +260,7 @@ module Orb def plan=(_) end + # The price intervals for this subscription. sig { returns(T::Array[Orb::Models::Subscription::PriceInterval]) } def price_intervals end @@ -229,6 +283,7 @@ module Orb def redeemed_coupon=(_) end + # The date Orb starts billing for this subscription. sig { returns(Time) } def start_date end @@ -253,6 +308,25 @@ module Orb def trial_info=(_) end + # A [subscription](/core-concepts#subscription) represents the purchase of a plan + # by a customer. + # + # By default, subscriptions begin on the day that they're created and renew + # automatically for each billing cycle at the cadence that's configured in the + # plan definition. + # + # Subscriptions also default to **beginning of month alignment**, which means the + # first invoice issued for the subscription will have pro-rated charges between + # the `start_date` and the first of the following month. Subsequent billing + # periods will always start and end on a month boundary (e.g. subsequent month + # starts for monthly billing). + # + # Depending on the plan configuration, any _flat_ recurring fees will be billed + # either at the beginning (in-advance) or end (in-arrears) of each billing cycle. + # Plans default to **in-advance billing**. Usage-based fees are billed in arrears + # as usage is accumulated. In the normal course of events, you can expect an + # invoice to contain usage-based charges for the previous period, and a recurring + # fee for the following period. sig do params( id: String, @@ -405,6 +479,7 @@ module Orb def adjustment=(_) end + # The price interval IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -413,6 +488,7 @@ module Orb def applies_to_price_interval_ids=(_) end + # The end date of the adjustment interval. sig { returns(T.nilable(Time)) } def end_date end @@ -421,6 +497,7 @@ module Orb def end_date=(_) end + # The start date of the adjustment interval. sig { returns(Time) } def start_date end @@ -489,6 +566,7 @@ module Orb def adjustment_type=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -497,6 +575,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -505,6 +585,7 @@ module Orb def is_invoice_level=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -513,6 +594,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -521,6 +603,8 @@ module Orb def reason=(_) end + # The number of usage units by which to discount the price this adjustment applies + # to in a given billing period. sig { returns(Float) } def usage_discount end @@ -587,6 +671,8 @@ module Orb def adjustment_type=(_) end + # The amount by which to discount the prices this adjustment applies to in a given + # billing period. sig { returns(String) } def amount_discount end @@ -595,6 +681,7 @@ module Orb def amount_discount=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -603,6 +690,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -611,6 +700,7 @@ module Orb def is_invoice_level=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -619,6 +709,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -685,6 +776,7 @@ module Orb def adjustment_type=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -693,6 +785,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -701,6 +795,8 @@ module Orb def is_invoice_level=(_) end + # The percentage (as a value between 0 and 1) by which to discount the price + # intervals this adjustment applies to in a given billing period. sig { returns(Float) } def percentage_discount end @@ -709,6 +805,7 @@ module Orb def percentage_discount=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -717,6 +814,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -783,6 +881,7 @@ module Orb def adjustment_type=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -791,6 +890,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -799,6 +900,7 @@ module Orb def is_invoice_level=(_) end + # The item ID that revenue from this minimum will be attributed to. sig { returns(String) } def item_id end @@ -807,6 +909,8 @@ module Orb def item_id=(_) end + # The minimum amount to charge in a given billing period for the prices this + # adjustment applies to. sig { returns(String) } def minimum_amount end @@ -815,6 +919,7 @@ module Orb def minimum_amount=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -823,6 +928,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -892,6 +998,7 @@ module Orb def adjustment_type=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -900,6 +1007,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -908,6 +1017,8 @@ module Orb def is_invoice_level=(_) end + # The maximum amount to charge in a given billing period for the prices this + # adjustment applies to. sig { returns(String) } def maximum_amount end @@ -916,6 +1027,7 @@ module Orb def maximum_amount=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -924,6 +1036,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -977,16 +1090,20 @@ module Orb sig do override .returns( - [[Symbol, Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment], [Symbol, Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment], [Symbol, Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment], [Symbol, Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment], [Symbol, Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment]] + [Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment] ) end - private def variants + def variants end end end end class BillingCycleAnchorConfiguration < Orb::BaseModel + # The day of the month on which the billing cycle is anchored. If the maximum + # number of days in a month is greater than this value, the last day of the month + # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing + # period begins on the 30th. sig { returns(Integer) } def day end @@ -995,6 +1112,9 @@ module Orb def day=(_) end + # The month on which the billing cycle is anchored (e.g. a quarterly price + # anchored in February would have cycles starting February, May, August, and + # November). sig { returns(T.nilable(Integer)) } def month end @@ -1003,6 +1123,8 @@ module Orb def month=(_) end + # The year on which the billing cycle is anchored (e.g. a 2 year billing cycle + # anchored on 2021 would have cycles starting on 2021, 2023, 2025, etc.). sig { returns(T.nilable(Integer)) } def year end @@ -1026,6 +1148,7 @@ module Orb abstract! class AmountDiscountInterval < Orb::BaseModel + # Only available if discount_type is `amount`. sig { returns(String) } def amount_discount end @@ -1034,6 +1157,7 @@ module Orb def amount_discount=(_) end + # The price ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1042,6 +1166,7 @@ module Orb def applies_to_price_ids=(_) end + # The price interval ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -1058,6 +1183,7 @@ module Orb def discount_type=(_) end + # The end date of the discount interval. sig { returns(T.nilable(Time)) } def end_date end @@ -1066,6 +1192,7 @@ module Orb def end_date=(_) end + # The start date of the discount interval. sig { returns(Time) } def start_date end @@ -1113,6 +1240,7 @@ module Orb end class PercentageDiscountInterval < Orb::BaseModel + # The price ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1121,6 +1249,7 @@ module Orb def applies_to_price_ids=(_) end + # The price interval ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -1137,6 +1266,7 @@ module Orb def discount_type=(_) end + # The end date of the discount interval. sig { returns(T.nilable(Time)) } def end_date end @@ -1145,6 +1275,8 @@ module Orb def end_date=(_) end + # Only available if discount_type is `percentage`.This is a number between 0 + # and 1. sig { returns(Float) } def percentage_discount end @@ -1153,6 +1285,7 @@ module Orb def percentage_discount=(_) end + # The start date of the discount interval. sig { returns(Time) } def start_date end @@ -1200,6 +1333,7 @@ module Orb end class UsageDiscountInterval < Orb::BaseModel + # The price ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1208,6 +1342,7 @@ module Orb def applies_to_price_ids=(_) end + # The price interval ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -1224,6 +1359,7 @@ module Orb def discount_type=(_) end + # The end date of the discount interval. sig { returns(T.nilable(Time)) } def end_date end @@ -1232,6 +1368,7 @@ module Orb def end_date=(_) end + # The start date of the discount interval. sig { returns(Time) } def start_date end @@ -1240,6 +1377,8 @@ module Orb def start_date=(_) end + # Only available if discount_type is `usage`. Number of usage units that this + # discount is for sig { returns(Float) } def usage_discount end @@ -1290,10 +1429,10 @@ module Orb sig do override .returns( - [[Symbol, Orb::Models::Subscription::DiscountInterval::AmountDiscountInterval], [Symbol, Orb::Models::Subscription::DiscountInterval::PercentageDiscountInterval], [Symbol, Orb::Models::Subscription::DiscountInterval::UsageDiscountInterval]] + [Orb::Models::Subscription::DiscountInterval::AmountDiscountInterval, Orb::Models::Subscription::DiscountInterval::PercentageDiscountInterval, Orb::Models::Subscription::DiscountInterval::UsageDiscountInterval] ) end - private def variants + def variants end end end @@ -1346,6 +1485,7 @@ module Orb end class MaximumInterval < Orb::BaseModel + # The price ids that this maximum interval applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1354,6 +1494,7 @@ module Orb def applies_to_price_ids=(_) end + # The price interval ids that this maximum interval applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -1362,6 +1503,7 @@ module Orb def applies_to_price_interval_ids=(_) end + # The end date of the maximum interval. sig { returns(T.nilable(Time)) } def end_date end @@ -1370,6 +1512,8 @@ module Orb def end_date=(_) end + # The maximum amount to charge in a given billing period for the price intervals + # this transform applies to. sig { returns(String) } def maximum_amount end @@ -1378,6 +1522,7 @@ module Orb def maximum_amount=(_) end + # The start date of the maximum interval. sig { returns(Time) } def start_date end @@ -1416,6 +1561,7 @@ module Orb end class MinimumInterval < Orb::BaseModel + # The price ids that this minimum interval applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1424,6 +1570,7 @@ module Orb def applies_to_price_ids=(_) end + # The price interval ids that this minimum interval applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -1432,6 +1579,7 @@ module Orb def applies_to_price_interval_ids=(_) end + # The end date of the minimum interval. sig { returns(T.nilable(Time)) } def end_date end @@ -1440,6 +1588,8 @@ module Orb def end_date=(_) end + # The minimum amount to charge in a given billing period for the price intervals + # this minimum applies to. sig { returns(String) } def minimum_amount end @@ -1448,6 +1598,7 @@ module Orb def minimum_amount=(_) end + # The start date of the minimum interval. sig { returns(Time) } def start_date end @@ -1494,6 +1645,7 @@ module Orb def id=(_) end + # The day of the month that Orb bills for this price sig { returns(Integer) } def billing_cycle_day end @@ -1502,6 +1654,9 @@ module Orb def billing_cycle_day=(_) end + # The end of the current billing period. This is an exclusive timestamp, such that + # the instant returned is exactly the end of the billing period. Set to null if + # this price interval is not currently active. sig { returns(T.nilable(Time)) } def current_billing_period_end_date end @@ -1510,6 +1665,9 @@ module Orb def current_billing_period_end_date=(_) end + # The start date of the current billing period. This is an inclusive timestamp; + # the instant returned is exactly the beginning of the billing period. Set to null + # if this price interval is not currently active. sig { returns(T.nilable(Time)) } def current_billing_period_start_date end @@ -1518,6 +1676,8 @@ module Orb def current_billing_period_start_date=(_) end + # The end date of the price interval. This is the date that Orb stops billing for + # this price. sig { returns(T.nilable(Time)) } def end_date end @@ -1526,6 +1686,7 @@ module Orb def end_date=(_) end + # An additional filter to apply to usage queries. sig { returns(T.nilable(String)) } def filter end @@ -1534,6 +1695,8 @@ module Orb def filter=(_) end + # The fixed fee quantity transitions for this price interval. This is only + # relevant for fixed fees. sig { returns(T.nilable(T::Array[Orb::Models::Subscription::PriceInterval::FixedFeeQuantityTransition])) } def fixed_fee_quantity_transitions end @@ -1545,6 +1708,16 @@ module Orb def fixed_fee_quantity_transitions=(_) end + # The Price resource represents a price that can be billed on a subscription, + # resulting in a charge on an invoice in the form of an invoice line item. Prices + # take a quantity and determine an amount to bill. + # + # Orb supports a few different pricing models out of the box. Each of these models + # is serialized differently in a given Price object. The model_type field + # determines the key for the configuration object that is present. + # + # For more on the types of prices, see + # [the core concepts documentation](/core-concepts#plan-and-price) sig do returns( T.any( @@ -1651,6 +1824,8 @@ module Orb def price=(_) end + # The start date of the price interval. This is the date that Orb starts billing + # for this price. sig { returns(Time) } def start_date end @@ -1659,6 +1834,8 @@ module Orb def start_date=(_) end + # A list of customer IDs whose usage events will be aggregated and billed under + # this price interval. sig { returns(T.nilable(T::Array[String])) } def usage_customer_ids end @@ -1667,6 +1844,9 @@ module Orb def usage_customer_ids=(_) end + # The Price Interval resource represents a period of time for which a price will + # bill on a subscription. A subscription’s price intervals define its billing + # behavior. sig do params( id: String, diff --git a/rbi/lib/orb/models/subscription_cancel_params.rbi b/rbi/lib/orb/models/subscription_cancel_params.rbi index 46436f0a..0f4ab750 100644 --- a/rbi/lib/orb/models/subscription_cancel_params.rbi +++ b/rbi/lib/orb/models/subscription_cancel_params.rbi @@ -6,6 +6,7 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters + # Determines the timing of subscription cancellation sig { returns(Symbol) } def cancel_option end @@ -14,6 +15,9 @@ module Orb def cancel_option=(_) end + # If false, this request will fail if it would void an issued invoice or create a + # credit note. Consider using this as a safety mechanism if you do not expect + # existing invoices to be changed. sig { returns(T.nilable(T::Boolean)) } def allow_invoice_credit_or_void end @@ -22,6 +26,8 @@ module Orb def allow_invoice_credit_or_void=(_) end + # The date that the cancellation should take effect. This parameter can only be + # passed if the `cancel_option` is `requested_date`. sig { returns(T.nilable(Time)) } def cancellation_date end @@ -56,6 +62,7 @@ module Orb def to_hash end + # Determines the timing of subscription cancellation class CancelOption < Orb::Enum abstract! diff --git a/rbi/lib/orb/models/subscription_cancel_response.rbi b/rbi/lib/orb/models/subscription_cancel_response.rbi index 3a710d34..da72fe59 100644 --- a/rbi/lib/orb/models/subscription_cancel_response.rbi +++ b/rbi/lib/orb/models/subscription_cancel_response.rbi @@ -11,6 +11,8 @@ module Orb def id=(_) end + # The current plan phase that is active, only if the subscription's plan has + # phases. sig { returns(T.nilable(Integer)) } def active_plan_phase_order end @@ -19,6 +21,8 @@ module Orb def active_plan_phase_order=(_) end + # The adjustment intervals for this subscription sorted by the start_date of the + # adjustment interval. sig { returns(T::Array[Orb::Models::SubscriptionCancelResponse::AdjustmentInterval]) } def adjustment_intervals end @@ -30,6 +34,9 @@ module Orb def adjustment_intervals=(_) end + # Determines whether issued invoices for this subscription will automatically be + # charged with the saved payment method on the due date. This property defaults to + # the plan's behavior. If null, defaults to the customer's setting. sig { returns(T.nilable(T::Boolean)) } def auto_collection end @@ -49,6 +56,10 @@ module Orb def billing_cycle_anchor_configuration=(_) end + # The day of the month on which the billing cycle is anchored. If the maximum + # number of days in a month is greater than this value, the last day of the month + # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing + # period begins on the 30th. sig { returns(Integer) } def billing_cycle_day end @@ -65,6 +76,9 @@ module Orb def created_at=(_) end + # The end of the current billing period. This is an exclusive timestamp, such that + # the instant returned is not part of the billing period. Set to null for + # subscriptions that are not currently active. sig { returns(T.nilable(Time)) } def current_billing_period_end_date end @@ -73,6 +87,9 @@ module Orb def current_billing_period_end_date=(_) end + # The start date of the current billing period. This is an inclusive timestamp; + # the instant returned is exactly the beginning of the billing period. Set to null + # if the subscription is not currently active. sig { returns(T.nilable(Time)) } def current_billing_period_start_date end @@ -81,6 +98,24 @@ module Orb def current_billing_period_start_date=(_) end + # A customer is a buyer of your products, and the other party to the billing + # relationship. + # + # In Orb, customers are assigned system generated identifiers automatically, but + # it's often desirable to have these match existing identifiers in your system. To + # avoid having to denormalize Orb ID information, you can pass in an + # `external_customer_id` with your own identifier. See + # [Customer ID Aliases](/events-and-metrics/customer-aliases) for further + # information about how these aliases work in Orb. + # + # In addition to having an identifier in your system, a customer may exist in a + # payment provider solution like Stripe. Use the `payment_provider_id` and the + # `payment_provider` enum field to express this mapping. + # + # A customer also has a timezone (from the standard + # [IANA timezone database](https://www.iana.org/time-zones)), which defaults to + # your account's timezone. See [Timezone localization](/essentials/timezones) for + # information on what this timezone parameter influences within Orb. sig { returns(Orb::Models::Customer) } def customer end @@ -89,6 +124,8 @@ module Orb def customer=(_) end + # Determines the default memo on this subscriptions' invoices. Note that if this + # is not provided, it is determined by the plan configuration. sig { returns(T.nilable(String)) } def default_invoice_memo end @@ -97,6 +134,7 @@ module Orb def default_invoice_memo=(_) end + # The discount intervals for this subscription sorted by the start_date. sig do returns( T::Array[ @@ -134,6 +172,7 @@ module Orb def discount_intervals=(_) end + # The date Orb stops billing for this subscription. sig { returns(T.nilable(Time)) } def end_date end @@ -161,6 +200,7 @@ module Orb def invoicing_threshold=(_) end + # The maximum intervals for this subscription sorted by the start_date. sig { returns(T::Array[Orb::Models::SubscriptionCancelResponse::MaximumInterval]) } def maximum_intervals end @@ -172,6 +212,10 @@ module Orb def maximum_intervals=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -180,6 +224,7 @@ module Orb def metadata=(_) end + # The minimum intervals for this subscription sorted by the start_date. sig { returns(T::Array[Orb::Models::SubscriptionCancelResponse::MinimumInterval]) } def minimum_intervals end @@ -191,6 +236,10 @@ module Orb def minimum_intervals=(_) end + # Determines the difference between the invoice issue date for subscription + # invoices as the date that they are due. A value of `0` here represents that the + # invoice is due on issue, whereas a value of `30` represents that the customer + # has a month to pay the invoice. sig { returns(Integer) } def net_terms end @@ -199,6 +248,10 @@ module Orb def net_terms=(_) end + # The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be + # subscribed to by a customer. Plans define the billing behavior of the + # subscription. You can see more about how to configure prices in the + # [Price resource](/reference/price). sig { returns(Orb::Models::Plan) } def plan end @@ -207,6 +260,7 @@ module Orb def plan=(_) end + # The price intervals for this subscription. sig { returns(T::Array[Orb::Models::SubscriptionCancelResponse::PriceInterval]) } def price_intervals end @@ -229,6 +283,7 @@ module Orb def redeemed_coupon=(_) end + # The date Orb starts billing for this subscription. sig { returns(Time) } def start_date end @@ -408,6 +463,7 @@ module Orb def adjustment=(_) end + # The price interval IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -416,6 +472,7 @@ module Orb def applies_to_price_interval_ids=(_) end + # The end date of the adjustment interval. sig { returns(T.nilable(Time)) } def end_date end @@ -424,6 +481,7 @@ module Orb def end_date=(_) end + # The start date of the adjustment interval. sig { returns(Time) } def start_date end @@ -492,6 +550,7 @@ module Orb def adjustment_type=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -500,6 +559,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -508,6 +569,7 @@ module Orb def is_invoice_level=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -516,6 +578,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -524,6 +587,8 @@ module Orb def reason=(_) end + # The number of usage units by which to discount the price this adjustment applies + # to in a given billing period. sig { returns(Float) } def usage_discount end @@ -590,6 +655,8 @@ module Orb def adjustment_type=(_) end + # The amount by which to discount the prices this adjustment applies to in a given + # billing period. sig { returns(String) } def amount_discount end @@ -598,6 +665,7 @@ module Orb def amount_discount=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -606,6 +674,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -614,6 +684,7 @@ module Orb def is_invoice_level=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -622,6 +693,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -688,6 +760,7 @@ module Orb def adjustment_type=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -696,6 +769,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -704,6 +779,8 @@ module Orb def is_invoice_level=(_) end + # The percentage (as a value between 0 and 1) by which to discount the price + # intervals this adjustment applies to in a given billing period. sig { returns(Float) } def percentage_discount end @@ -712,6 +789,7 @@ module Orb def percentage_discount=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -720,6 +798,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -786,6 +865,7 @@ module Orb def adjustment_type=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -794,6 +874,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -802,6 +884,7 @@ module Orb def is_invoice_level=(_) end + # The item ID that revenue from this minimum will be attributed to. sig { returns(String) } def item_id end @@ -810,6 +893,8 @@ module Orb def item_id=(_) end + # The minimum amount to charge in a given billing period for the prices this + # adjustment applies to. sig { returns(String) } def minimum_amount end @@ -818,6 +903,7 @@ module Orb def minimum_amount=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -826,6 +912,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -895,6 +982,7 @@ module Orb def adjustment_type=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -903,6 +991,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -911,6 +1001,8 @@ module Orb def is_invoice_level=(_) end + # The maximum amount to charge in a given billing period for the prices this + # adjustment applies to. sig { returns(String) } def maximum_amount end @@ -919,6 +1011,7 @@ module Orb def maximum_amount=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -927,6 +1020,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -980,16 +1074,20 @@ module Orb sig do override .returns( - [[Symbol, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment], [Symbol, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment], [Symbol, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment], [Symbol, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment], [Symbol, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment]] + [Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment] ) end - private def variants + def variants end end end end class BillingCycleAnchorConfiguration < Orb::BaseModel + # The day of the month on which the billing cycle is anchored. If the maximum + # number of days in a month is greater than this value, the last day of the month + # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing + # period begins on the 30th. sig { returns(Integer) } def day end @@ -998,6 +1096,9 @@ module Orb def day=(_) end + # The month on which the billing cycle is anchored (e.g. a quarterly price + # anchored in February would have cycles starting February, May, August, and + # November). sig { returns(T.nilable(Integer)) } def month end @@ -1006,6 +1107,8 @@ module Orb def month=(_) end + # The year on which the billing cycle is anchored (e.g. a 2 year billing cycle + # anchored on 2021 would have cycles starting on 2021, 2023, 2025, etc.). sig { returns(T.nilable(Integer)) } def year end @@ -1029,6 +1132,7 @@ module Orb abstract! class AmountDiscountInterval < Orb::BaseModel + # Only available if discount_type is `amount`. sig { returns(String) } def amount_discount end @@ -1037,6 +1141,7 @@ module Orb def amount_discount=(_) end + # The price ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1045,6 +1150,7 @@ module Orb def applies_to_price_ids=(_) end + # The price interval ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -1061,6 +1167,7 @@ module Orb def discount_type=(_) end + # The end date of the discount interval. sig { returns(T.nilable(Time)) } def end_date end @@ -1069,6 +1176,7 @@ module Orb def end_date=(_) end + # The start date of the discount interval. sig { returns(Time) } def start_date end @@ -1116,6 +1224,7 @@ module Orb end class PercentageDiscountInterval < Orb::BaseModel + # The price ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1124,6 +1233,7 @@ module Orb def applies_to_price_ids=(_) end + # The price interval ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -1140,6 +1250,7 @@ module Orb def discount_type=(_) end + # The end date of the discount interval. sig { returns(T.nilable(Time)) } def end_date end @@ -1148,6 +1259,8 @@ module Orb def end_date=(_) end + # Only available if discount_type is `percentage`.This is a number between 0 + # and 1. sig { returns(Float) } def percentage_discount end @@ -1156,6 +1269,7 @@ module Orb def percentage_discount=(_) end + # The start date of the discount interval. sig { returns(Time) } def start_date end @@ -1203,6 +1317,7 @@ module Orb end class UsageDiscountInterval < Orb::BaseModel + # The price ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1211,6 +1326,7 @@ module Orb def applies_to_price_ids=(_) end + # The price interval ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -1227,6 +1343,7 @@ module Orb def discount_type=(_) end + # The end date of the discount interval. sig { returns(T.nilable(Time)) } def end_date end @@ -1235,6 +1352,7 @@ module Orb def end_date=(_) end + # The start date of the discount interval. sig { returns(Time) } def start_date end @@ -1243,6 +1361,8 @@ module Orb def start_date=(_) end + # Only available if discount_type is `usage`. Number of usage units that this + # discount is for sig { returns(Float) } def usage_discount end @@ -1293,10 +1413,10 @@ module Orb sig do override .returns( - [[Symbol, Orb::Models::SubscriptionCancelResponse::DiscountInterval::AmountDiscountInterval], [Symbol, Orb::Models::SubscriptionCancelResponse::DiscountInterval::PercentageDiscountInterval], [Symbol, Orb::Models::SubscriptionCancelResponse::DiscountInterval::UsageDiscountInterval]] + [Orb::Models::SubscriptionCancelResponse::DiscountInterval::AmountDiscountInterval, Orb::Models::SubscriptionCancelResponse::DiscountInterval::PercentageDiscountInterval, Orb::Models::SubscriptionCancelResponse::DiscountInterval::UsageDiscountInterval] ) end - private def variants + def variants end end end @@ -1349,6 +1469,7 @@ module Orb end class MaximumInterval < Orb::BaseModel + # The price ids that this maximum interval applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1357,6 +1478,7 @@ module Orb def applies_to_price_ids=(_) end + # The price interval ids that this maximum interval applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -1365,6 +1487,7 @@ module Orb def applies_to_price_interval_ids=(_) end + # The end date of the maximum interval. sig { returns(T.nilable(Time)) } def end_date end @@ -1373,6 +1496,8 @@ module Orb def end_date=(_) end + # The maximum amount to charge in a given billing period for the price intervals + # this transform applies to. sig { returns(String) } def maximum_amount end @@ -1381,6 +1506,7 @@ module Orb def maximum_amount=(_) end + # The start date of the maximum interval. sig { returns(Time) } def start_date end @@ -1419,6 +1545,7 @@ module Orb end class MinimumInterval < Orb::BaseModel + # The price ids that this minimum interval applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1427,6 +1554,7 @@ module Orb def applies_to_price_ids=(_) end + # The price interval ids that this minimum interval applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -1435,6 +1563,7 @@ module Orb def applies_to_price_interval_ids=(_) end + # The end date of the minimum interval. sig { returns(T.nilable(Time)) } def end_date end @@ -1443,6 +1572,8 @@ module Orb def end_date=(_) end + # The minimum amount to charge in a given billing period for the price intervals + # this minimum applies to. sig { returns(String) } def minimum_amount end @@ -1451,6 +1582,7 @@ module Orb def minimum_amount=(_) end + # The start date of the minimum interval. sig { returns(Time) } def start_date end @@ -1497,6 +1629,7 @@ module Orb def id=(_) end + # The day of the month that Orb bills for this price sig { returns(Integer) } def billing_cycle_day end @@ -1505,6 +1638,9 @@ module Orb def billing_cycle_day=(_) end + # The end of the current billing period. This is an exclusive timestamp, such that + # the instant returned is exactly the end of the billing period. Set to null if + # this price interval is not currently active. sig { returns(T.nilable(Time)) } def current_billing_period_end_date end @@ -1513,6 +1649,9 @@ module Orb def current_billing_period_end_date=(_) end + # The start date of the current billing period. This is an inclusive timestamp; + # the instant returned is exactly the beginning of the billing period. Set to null + # if this price interval is not currently active. sig { returns(T.nilable(Time)) } def current_billing_period_start_date end @@ -1521,6 +1660,8 @@ module Orb def current_billing_period_start_date=(_) end + # The end date of the price interval. This is the date that Orb stops billing for + # this price. sig { returns(T.nilable(Time)) } def end_date end @@ -1529,6 +1670,7 @@ module Orb def end_date=(_) end + # An additional filter to apply to usage queries. sig { returns(T.nilable(String)) } def filter end @@ -1537,6 +1679,8 @@ module Orb def filter=(_) end + # The fixed fee quantity transitions for this price interval. This is only + # relevant for fixed fees. sig do returns( T.nilable(T::Array[Orb::Models::SubscriptionCancelResponse::PriceInterval::FixedFeeQuantityTransition]) @@ -1556,6 +1700,16 @@ module Orb def fixed_fee_quantity_transitions=(_) end + # The Price resource represents a price that can be billed on a subscription, + # resulting in a charge on an invoice in the form of an invoice line item. Prices + # take a quantity and determine an amount to bill. + # + # Orb supports a few different pricing models out of the box. Each of these models + # is serialized differently in a given Price object. The model_type field + # determines the key for the configuration object that is present. + # + # For more on the types of prices, see + # [the core concepts documentation](/core-concepts#plan-and-price) sig do returns( T.any( @@ -1662,6 +1816,8 @@ module Orb def price=(_) end + # The start date of the price interval. This is the date that Orb starts billing + # for this price. sig { returns(Time) } def start_date end @@ -1670,6 +1826,8 @@ module Orb def start_date=(_) end + # A list of customer IDs whose usage events will be aggregated and billed under + # this price interval. sig { returns(T.nilable(T::Array[String])) } def usage_customer_ids end @@ -1678,6 +1836,9 @@ module Orb def usage_customer_ids=(_) end + # The Price Interval resource represents a period of time for which a price will + # bill on a subscription. A subscription’s price intervals define its billing + # behavior. sig do params( id: String, diff --git a/rbi/lib/orb/models/subscription_create_params.rbi b/rbi/lib/orb/models/subscription_create_params.rbi index aeb7e5d4..d5250aa3 100644 --- a/rbi/lib/orb/models/subscription_create_params.rbi +++ b/rbi/lib/orb/models/subscription_create_params.rbi @@ -6,6 +6,8 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters + # Additional adjustments to be added to the subscription. (Only available for + # accounts that have migrated off of legacy subscription overrides) sig { returns(T.nilable(T::Array[Orb::Models::SubscriptionCreateParams::AddAdjustment])) } def add_adjustments end @@ -17,6 +19,8 @@ module Orb def add_adjustments=(_) end + # Additional prices to be added to the subscription. (Only available for accounts + # that have migrated off of legacy subscription overrides) sig { returns(T.nilable(T::Array[Orb::Models::SubscriptionCreateParams::AddPrice])) } def add_prices end @@ -36,6 +40,9 @@ module Orb def align_billing_with_subscription_start_date=(_) end + # Determines whether issued invoices for this subscription will automatically be + # charged with the saved payment method on the due date. If not specified, this + # defaults to the behavior configured for this customer. sig { returns(T.nilable(T::Boolean)) } def auto_collection end @@ -63,6 +70,9 @@ module Orb def billing_cycle_anchor_configuration=(_) end + # Redemption code to be used for this subscription. If the coupon cannot be found + # by its redemption code, or cannot be redeemed, an error response will be + # returned and the subscription creation or plan change will not be scheduled. sig { returns(T.nilable(String)) } def coupon_redemption_code end @@ -87,6 +97,8 @@ module Orb def customer_id=(_) end + # Determines the default memo on this subscription's invoices. Note that if this + # is not provided, it is determined by the plan configuration. sig { returns(T.nilable(String)) } def default_invoice_memo end @@ -127,6 +139,8 @@ module Orb def external_marketplace_reporting_id=(_) end + # The external_plan_id of the plan that the given subscription should be switched + # to. Note that either this property or `plan_id` must be specified. sig { returns(T.nilable(String)) } def external_plan_id end @@ -135,6 +149,10 @@ module Orb def external_plan_id=(_) end + # An additional filter to apply to usage queries. This filter must be expressed as + # a boolean + # [computed property](/extensibility/advanced-metrics#computed-properties). If + # null, usage queries will not include any additional filter. sig { returns(T.nilable(String)) } def filter end @@ -143,6 +161,7 @@ module Orb def filter=(_) end + # The phase of the plan to start with sig { returns(T.nilable(Integer)) } def initial_phase_order end @@ -151,6 +170,9 @@ module Orb def initial_phase_order=(_) end + # When this subscription's accrued usage reaches this threshold, an invoice will + # be issued for the subscription. If not specified, invoices will only be issued + # at the end of the billing period. sig { returns(T.nilable(String)) } def invoicing_threshold end @@ -159,6 +181,9 @@ module Orb def invoicing_threshold=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -170,6 +195,9 @@ module Orb def metadata=(_) end + # The net terms determines the difference between the invoice date and the issue + # date for the invoice. If you intend the invoice to be due on issue, set this + # to 0. If not provided, this defaults to the value specified in the plan. sig { returns(T.nilable(Integer)) } def net_terms end @@ -186,6 +214,8 @@ module Orb def per_credit_overage_amount=(_) end + # The plan that the given subscription should be switched to. Note that either + # this property or `external_plan_id` must be specified. sig { returns(T.nilable(String)) } def plan_id end @@ -194,6 +224,8 @@ module Orb def plan_id=(_) end + # Specifies which version of the plan to subscribe to. If null, the default + # version will be used. sig { returns(T.nilable(Integer)) } def plan_version_number end @@ -202,6 +234,7 @@ module Orb def plan_version_number=(_) end + # Optionally provide a list of overrides for prices on the plan sig { returns(T.nilable(T::Array[T.anything])) } def price_overrides end @@ -210,6 +243,8 @@ module Orb def price_overrides=(_) end + # Plan adjustments to be removed from the subscription. (Only available for + # accounts that have migrated off of legacy subscription overrides) sig { returns(T.nilable(T::Array[Orb::Models::SubscriptionCreateParams::RemoveAdjustment])) } def remove_adjustments end @@ -221,6 +256,8 @@ module Orb def remove_adjustments=(_) end + # Plan prices to be removed from the subscription. (Only available for accounts + # that have migrated off of legacy subscription overrides) sig { returns(T.nilable(T::Array[Orb::Models::SubscriptionCreateParams::RemovePrice])) } def remove_prices end @@ -232,6 +269,9 @@ module Orb def remove_prices=(_) end + # Plan adjustments to be replaced with additional adjustments on the subscription. + # (Only available for accounts that have migrated off of legacy subscription + # overrides) sig { returns(T.nilable(T::Array[Orb::Models::SubscriptionCreateParams::ReplaceAdjustment])) } def replace_adjustments end @@ -243,6 +283,8 @@ module Orb def replace_adjustments=(_) end + # Plan prices to be replaced with additional prices on the subscription. (Only + # available for accounts that have migrated off of legacy subscription overrides) sig { returns(T.nilable(T::Array[Orb::Models::SubscriptionCreateParams::ReplacePrice])) } def replace_prices end @@ -262,6 +304,9 @@ module Orb def start_date=(_) end + # The duration of the trial period in days. If not provided, this defaults to the + # value specified in the plan. If `0` is provided, the trial on the plan will be + # skipped. sig { returns(T.nilable(Integer)) } def trial_duration_days end @@ -270,6 +315,12 @@ module Orb def trial_duration_days=(_) end + # A list of customer IDs whose usage events will be aggregated and billed under + # this subscription. By default, a subscription only considers usage events + # associated with its attached customer's customer_id. When usage_customer_ids is + # provided, the subscription includes usage events from the specified customers + # only. Provided usage_customer_ids must be either the customer for this + # subscription itself, or any of that customer's children. sig { returns(T.nilable(T::Array[String])) } def usage_customer_ids end @@ -394,6 +445,7 @@ module Orb end class AddAdjustment < Orb::BaseModel + # The definition of a new adjustment to create and add to the subscription. sig do returns( T.any( @@ -431,6 +483,8 @@ module Orb def adjustment=(_) end + # The end date of the adjustment interval. This is the date that the adjustment + # will stop affecting prices on the subscription. sig { returns(T.nilable(Time)) } def end_date end @@ -439,6 +493,7 @@ module Orb def end_date=(_) end + # The phase to add this adjustment to. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -447,6 +502,9 @@ module Orb def plan_phase_order=(_) end + # The start date of the adjustment interval. This is the date that the adjustment + # will start affecting prices on the subscription. If null, the adjustment will + # start when the phase or subscription starts. sig { returns(T.nilable(Time)) } def start_date end @@ -493,6 +551,7 @@ module Orb def to_hash end + # The definition of a new adjustment to create and add to the subscription. class Adjustment < Orb::Union abstract! @@ -505,6 +564,7 @@ module Orb def adjustment_type=(_) end + # The set of price IDs to which this adjustment applies. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -521,6 +581,8 @@ module Orb def percentage_discount=(_) end + # When false, this adjustment will be applied to a single price. Otherwise, it + # will be applied at the invoice level, possibly to multiple prices. sig { returns(T.nilable(T::Boolean)) } def is_invoice_level end @@ -565,6 +627,7 @@ module Orb def adjustment_type=(_) end + # The set of price IDs to which this adjustment applies. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -581,6 +644,8 @@ module Orb def usage_discount=(_) end + # When false, this adjustment will be applied to a single price. Otherwise, it + # will be applied at the invoice level, possibly to multiple prices. sig { returns(T.nilable(T::Boolean)) } def is_invoice_level end @@ -633,6 +698,7 @@ module Orb def amount_discount=(_) end + # The set of price IDs to which this adjustment applies. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -641,6 +707,8 @@ module Orb def applies_to_price_ids=(_) end + # When false, this adjustment will be applied to a single price. Otherwise, it + # will be applied at the invoice level, possibly to multiple prices. sig { returns(T.nilable(T::Boolean)) } def is_invoice_level end @@ -685,6 +753,7 @@ module Orb def adjustment_type=(_) end + # The set of price IDs to which this adjustment applies. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -693,6 +762,7 @@ module Orb def applies_to_price_ids=(_) end + # The item ID that revenue from this minimum will be attributed to. sig { returns(String) } def item_id end @@ -709,6 +779,8 @@ module Orb def minimum_amount=(_) end + # When false, this adjustment will be applied to a single price. Otherwise, it + # will be applied at the invoice level, possibly to multiple prices. sig { returns(T.nilable(T::Boolean)) } def is_invoice_level end @@ -755,6 +827,7 @@ module Orb def adjustment_type=(_) end + # The set of price IDs to which this adjustment applies. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -771,6 +844,8 @@ module Orb def maximum_amount=(_) end + # When false, this adjustment will be applied to a single price. Otherwise, it + # will be applied at the invoice level, possibly to multiple prices. sig { returns(T.nilable(T::Boolean)) } def is_invoice_level end @@ -810,16 +885,17 @@ module Orb sig do override .returns( - [[Symbol, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::NewPercentageDiscount], [Symbol, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::NewUsageDiscount], [Symbol, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::NewAmountDiscount], [Symbol, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::NewMinimum], [Symbol, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::NewMaximum]] + [Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::NewPercentageDiscount, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::NewUsageDiscount, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::NewAmountDiscount, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::NewMinimum, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::NewMaximum] ) end - private def variants + def variants end end end end class AddPrice < Orb::BaseModel + # The definition of a new allocation price to create and add to the subscription. sig { returns(T.nilable(Orb::Models::SubscriptionCreateParams::AddPrice::AllocationPrice)) } def allocation_price end @@ -831,6 +907,8 @@ module Orb def allocation_price=(_) end + # [DEPRECATED] Use add_adjustments instead. The subscription's discounts for this + # price. sig { returns(T.nilable(T::Array[Orb::Models::SubscriptionCreateParams::AddPrice::Discount])) } def discounts end @@ -842,6 +920,9 @@ module Orb def discounts=(_) end + # The end date of the price interval. This is the date that the price will stop + # billing on the subscription. If null, billing will end when the phase or + # subscription ends. sig { returns(T.nilable(Time)) } def end_date end @@ -850,6 +931,7 @@ module Orb def end_date=(_) end + # The external price id of the price to add to the subscription. sig { returns(T.nilable(String)) } def external_price_id end @@ -858,6 +940,8 @@ module Orb def external_price_id=(_) end + # [DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for + # this price. sig { returns(T.nilable(String)) } def maximum_amount end @@ -866,6 +950,8 @@ module Orb def maximum_amount=(_) end + # [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for + # this price. sig { returns(T.nilable(String)) } def minimum_amount end @@ -874,6 +960,7 @@ module Orb def minimum_amount=(_) end + # The phase to add this price to. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -882,6 +969,7 @@ module Orb def plan_phase_order=(_) end + # The definition of a new price to create and add to the subscription. sig do returns( T.nilable( @@ -985,6 +1073,7 @@ module Orb def price=(_) end + # The id of the price to add to the subscription. sig { returns(T.nilable(String)) } def price_id end @@ -993,6 +1082,9 @@ module Orb def price_id=(_) end + # The start date of the price interval. This is the date that the price will start + # billing on the subscription. If null, billing will start when the phase or + # subscription starts. sig { returns(T.nilable(Time)) } def start_date end @@ -1107,6 +1199,7 @@ module Orb end class AllocationPrice < Orb::BaseModel + # An amount of the currency to allocate to the customer at the specified cadence. sig { returns(String) } def amount end @@ -1115,6 +1208,7 @@ module Orb def amount=(_) end + # The cadence at which to allocate the amount to the customer. sig { returns(Symbol) } def cadence end @@ -1123,6 +1217,8 @@ module Orb def cadence=(_) end + # An ISO 4217 currency string or a custom pricing unit identifier in which to bill + # this price. sig { returns(String) } def currency end @@ -1131,6 +1227,8 @@ module Orb def currency=(_) end + # Whether the allocated amount should expire at the end of the cadence or roll + # over to the next period. sig { returns(T::Boolean) } def expires_at_end_of_cadence end @@ -1139,6 +1237,7 @@ module Orb def expires_at_end_of_cadence=(_) end + # The definition of a new allocation price to create and add to the subscription. sig do params(amount: String, cadence: Symbol, currency: String, expires_at_end_of_cadence: T::Boolean) .returns(T.attached_class) @@ -1158,6 +1257,7 @@ module Orb def to_hash end + # The cadence at which to allocate the amount to the customer. class Cadence < Orb::Enum abstract! @@ -1185,6 +1285,7 @@ module Orb def discount_type=(_) end + # Only available if discount_type is `amount`. sig { returns(T.nilable(String)) } def amount_discount end @@ -1193,6 +1294,8 @@ module Orb def amount_discount=(_) end + # Only available if discount_type is `percentage`. This is a number between 0 + # and 1. sig { returns(T.nilable(Float)) } def percentage_discount end @@ -1201,6 +1304,8 @@ module Orb def percentage_discount=(_) end + # Only available if discount_type is `usage`. Number of usage units that this + # discount is for sig { returns(T.nilable(Float)) } def usage_discount end @@ -1250,10 +1355,12 @@ module Orb end end + # The definition of a new price to create and add to the subscription. class Price < Orb::Union abstract! class NewSubscriptionUnitPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -1262,6 +1369,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -1278,6 +1386,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -1297,6 +1406,8 @@ module Orb def unit_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -1305,6 +1416,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -1313,6 +1426,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -1338,6 +1453,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -1346,6 +1462,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -1354,6 +1472,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -1362,6 +1481,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -1370,6 +1491,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -1378,6 +1500,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -1403,6 +1527,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -1414,6 +1541,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -1497,6 +1626,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -1515,6 +1645,7 @@ module Orb end class UnitConfig < Orb::BaseModel + # Rate per unit of usage sig { returns(String) } def unit_amount end @@ -1533,6 +1664,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -1541,6 +1673,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -1549,6 +1682,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -1557,6 +1692,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -1572,6 +1708,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -1580,6 +1717,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -1588,6 +1726,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -1596,6 +1736,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -1612,6 +1753,7 @@ module Orb end class NewSubscriptionPackagePrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -1620,6 +1762,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -1636,6 +1779,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -1663,6 +1807,8 @@ module Orb def package_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -1671,6 +1817,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -1679,6 +1827,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -1704,6 +1854,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -1712,6 +1863,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -1720,6 +1873,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -1728,6 +1882,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -1736,6 +1892,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -1744,6 +1901,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -1769,6 +1928,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -1780,6 +1942,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -1863,6 +2027,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -1881,6 +2046,7 @@ module Orb end class PackageConfig < Orb::BaseModel + # A currency amount to rate usage by sig { returns(String) } def package_amount end @@ -1889,6 +2055,8 @@ module Orb def package_amount=(_) end + # An integer amount to represent package size. For example, 1000 here would divide + # usage by 1000 before multiplying by package_amount in rating sig { returns(Integer) } def package_size end @@ -1907,6 +2075,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -1915,6 +2084,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -1923,6 +2093,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -1931,6 +2103,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -1946,6 +2119,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -1954,6 +2128,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -1962,6 +2137,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -1970,6 +2147,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -1986,6 +2164,7 @@ module Orb end class NewSubscriptionMatrixPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -1994,6 +2173,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -2023,6 +2203,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -2031,6 +2212,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -2039,6 +2222,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -2047,6 +2232,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -2072,6 +2259,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -2080,6 +2268,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -2088,6 +2278,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -2096,6 +2287,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -2104,6 +2297,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -2112,6 +2306,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -2137,6 +2333,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -2148,6 +2347,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -2231,6 +2432,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -2249,6 +2451,7 @@ module Orb end class MatrixConfig < Orb::BaseModel + # Default per unit rate for any usage not bucketed into a specified matrix_value sig { returns(String) } def default_unit_amount end @@ -2257,6 +2460,7 @@ module Orb def default_unit_amount=(_) end + # One or two event property values to evaluate matrix groups by sig { returns(T::Array[T.nilable(String)]) } def dimensions end @@ -2265,6 +2469,7 @@ module Orb def dimensions=(_) end + # Matrix values for specified matrix grouping keys sig do returns( T::Array[ @@ -2319,6 +2524,9 @@ module Orb end class MatrixValue < Orb::BaseModel + # One or two matrix keys to filter usage to this Matrix value by. For example, + # ["region", "tier"] could be used to filter cloud usage by a cloud region and an + # instance tier. sig { returns(T::Array[T.nilable(String)]) } def dimension_values end @@ -2327,6 +2535,7 @@ module Orb def dimension_values=(_) end + # Unit price for the specified dimension_values sig { returns(String) } def unit_amount end @@ -2351,6 +2560,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -2359,6 +2569,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -2367,6 +2578,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -2375,6 +2588,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -2390,6 +2604,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -2398,6 +2613,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -2406,6 +2622,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -2414,6 +2632,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -2430,6 +2649,7 @@ module Orb end class NewSubscriptionTieredPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -2438,6 +2658,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -2454,6 +2675,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -2475,6 +2697,8 @@ module Orb def tiered_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -2483,6 +2707,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -2491,6 +2717,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -2516,6 +2744,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -2524,6 +2753,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -2532,6 +2763,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -2540,6 +2772,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -2548,6 +2782,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -2556,6 +2791,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -2581,6 +2818,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -2592,6 +2832,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -2675,6 +2917,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -2693,6 +2936,7 @@ module Orb end class TieredConfig < Orb::BaseModel + # Tiers for rating based on total usage quantities into the specified tier sig do returns( T::Array[Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionTieredPrice::TieredConfig::Tier] @@ -2733,6 +2977,7 @@ module Orb end class Tier < Orb::BaseModel + # Inclusive tier starting value sig { returns(Float) } def first_unit end @@ -2741,6 +2986,7 @@ module Orb def first_unit=(_) end + # Amount per unit sig { returns(String) } def unit_amount end @@ -2749,6 +2995,7 @@ module Orb def unit_amount=(_) end + # Exclusive tier ending value. If null, this is treated as the last tier sig { returns(T.nilable(Float)) } def last_unit end @@ -2776,6 +3023,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -2784,6 +3032,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -2792,6 +3041,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -2800,6 +3051,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -2815,6 +3067,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -2823,6 +3076,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -2831,6 +3085,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -2839,6 +3095,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -2855,6 +3112,7 @@ module Orb end class NewSubscriptionTieredBpsPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -2863,6 +3121,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -2879,6 +3138,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -2906,6 +3166,8 @@ module Orb def tiered_bps_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -2914,6 +3176,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -2922,6 +3186,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -2947,6 +3213,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -2955,6 +3222,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -2963,6 +3232,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -2971,6 +3241,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -2979,6 +3251,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -2987,6 +3260,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -3012,6 +3287,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -3023,6 +3301,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -3106,6 +3386,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -3124,6 +3405,8 @@ module Orb end class TieredBpsConfig < Orb::BaseModel + # Tiers for a Graduated BPS pricing model, where usage is bucketed into specified + # tiers sig do returns( T::Array[ @@ -3174,6 +3457,7 @@ module Orb end class Tier < Orb::BaseModel + # Per-event basis point rate sig { returns(Float) } def bps end @@ -3182,6 +3466,7 @@ module Orb def bps=(_) end + # Inclusive tier starting value sig { returns(String) } def minimum_amount end @@ -3190,6 +3475,7 @@ module Orb def minimum_amount=(_) end + # Exclusive tier ending value sig { returns(T.nilable(String)) } def maximum_amount end @@ -3198,6 +3484,7 @@ module Orb def maximum_amount=(_) end + # Per unit maximum to charge sig { returns(T.nilable(String)) } def per_unit_maximum end @@ -3235,6 +3522,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -3243,6 +3531,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -3251,6 +3540,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -3259,6 +3550,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -3274,6 +3566,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -3282,6 +3575,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -3290,6 +3584,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -3298,6 +3594,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -3325,6 +3622,7 @@ module Orb def bps_config=(_) end + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -3333,6 +3631,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -3349,6 +3648,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -3357,6 +3657,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -3365,6 +3667,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -3373,6 +3677,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -3398,6 +3704,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -3406,6 +3713,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -3414,6 +3723,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -3422,6 +3732,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -3430,6 +3742,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -3438,6 +3751,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -3463,6 +3778,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -3474,6 +3792,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -3558,6 +3878,7 @@ module Orb end class BpsConfig < Orb::BaseModel + # Basis point take rate per event sig { returns(Float) } def bps end @@ -3566,6 +3887,7 @@ module Orb def bps=(_) end + # Optional currency amount maximum to cap spend per event sig { returns(T.nilable(String)) } def per_unit_maximum end @@ -3583,6 +3905,7 @@ module Orb end end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -3601,6 +3924,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -3609,6 +3933,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -3617,6 +3942,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -3625,6 +3952,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -3640,6 +3968,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -3648,6 +3977,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -3656,6 +3986,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -3664,6 +3996,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -3699,6 +4032,7 @@ module Orb def bulk_bps_config=(_) end + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -3707,6 +4041,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -3723,6 +4058,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -3731,6 +4067,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -3739,6 +4077,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -3747,6 +4087,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -3772,6 +4114,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -3780,6 +4123,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -3788,6 +4133,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -3796,6 +4142,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -3804,6 +4152,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -3812,6 +4161,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -3837,6 +4188,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -3848,6 +4202,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -3932,6 +4288,8 @@ module Orb end class BulkBpsConfig < Orb::BaseModel + # Tiers for a bulk BPS pricing model where all usage is aggregated to a single + # tier based on total volume sig do returns( T::Array[Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionBulkBpsPrice::BulkBpsConfig::Tier] @@ -3972,6 +4330,7 @@ module Orb end class Tier < Orb::BaseModel + # Basis points to rate on sig { returns(Float) } def bps end @@ -3980,6 +4339,7 @@ module Orb def bps=(_) end + # Upper bound for tier sig { returns(T.nilable(String)) } def maximum_amount end @@ -3988,6 +4348,7 @@ module Orb def maximum_amount=(_) end + # The maximum amount to charge for any one event sig { returns(T.nilable(String)) } def per_unit_maximum end @@ -4017,6 +4378,7 @@ module Orb end end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -4035,6 +4397,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -4043,6 +4406,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -4051,6 +4415,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -4059,6 +4425,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -4074,6 +4441,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -4082,6 +4450,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -4090,6 +4459,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -4098,6 +4469,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -4125,6 +4497,7 @@ module Orb def bulk_config=(_) end + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -4133,6 +4506,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -4149,6 +4523,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -4157,6 +4532,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -4165,6 +4542,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -4173,6 +4552,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -4198,6 +4579,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -4206,6 +4588,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -4214,6 +4598,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -4222,6 +4607,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -4230,6 +4617,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -4238,6 +4626,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -4263,6 +4653,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -4274,6 +4667,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -4358,6 +4753,7 @@ module Orb end class BulkConfig < Orb::BaseModel + # Bulk tiers for rating based on total usage volume sig do returns( T::Array[Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionBulkPrice::BulkConfig::Tier] @@ -4398,6 +4794,7 @@ module Orb end class Tier < Orb::BaseModel + # Amount per unit sig { returns(String) } def unit_amount end @@ -4406,6 +4803,7 @@ module Orb def unit_amount=(_) end + # Upper bound for this tier sig { returns(T.nilable(Float)) } def maximum_units end @@ -4424,6 +4822,7 @@ module Orb end end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -4442,6 +4841,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -4450,6 +4850,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -4458,6 +4859,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -4466,6 +4869,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -4481,6 +4885,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -4489,6 +4894,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -4497,6 +4903,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -4505,6 +4913,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -4521,6 +4930,7 @@ module Orb end class NewSubscriptionThresholdTotalAmountPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -4529,6 +4939,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -4545,6 +4956,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -4561,6 +4973,8 @@ module Orb def threshold_total_amount_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -4569,6 +4983,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -4577,6 +4993,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -4602,6 +5020,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -4610,6 +5029,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -4618,6 +5039,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -4626,6 +5048,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -4634,6 +5058,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -4642,6 +5067,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -4667,6 +5094,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -4678,6 +5108,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -4761,6 +5193,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -4779,6 +5212,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -4787,6 +5221,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -4795,6 +5230,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -4803,6 +5240,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -4818,6 +5256,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -4826,6 +5265,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -4834,6 +5274,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -4842,6 +5284,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -4858,6 +5301,7 @@ module Orb end class NewSubscriptionTieredPackagePrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -4866,6 +5310,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -4882,6 +5327,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -4898,6 +5344,8 @@ module Orb def tiered_package_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -4906,6 +5354,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -4914,6 +5364,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -4939,6 +5391,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -4947,6 +5400,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -4955,6 +5410,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -4963,6 +5419,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -4971,6 +5429,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -4979,6 +5438,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -5004,6 +5465,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -5015,6 +5479,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -5098,6 +5564,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -5116,6 +5583,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -5124,6 +5592,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -5132,6 +5601,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -5140,6 +5611,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -5155,6 +5627,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -5163,6 +5636,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -5171,6 +5645,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -5179,6 +5655,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -5195,6 +5672,7 @@ module Orb end class NewSubscriptionTieredWithMinimumPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -5203,6 +5681,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -5219,6 +5698,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -5235,6 +5715,8 @@ module Orb def tiered_with_minimum_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -5243,6 +5725,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -5251,6 +5735,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -5276,6 +5762,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -5284,6 +5771,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -5292,6 +5781,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -5300,6 +5790,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -5308,6 +5800,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -5316,6 +5809,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -5341,6 +5836,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -5352,6 +5850,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -5435,6 +5935,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -5453,6 +5954,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -5461,6 +5963,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -5469,6 +5972,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -5477,6 +5982,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -5492,6 +5998,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -5500,6 +6007,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -5508,6 +6016,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -5516,6 +6026,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -5532,6 +6043,7 @@ module Orb end class NewSubscriptionUnitWithPercentPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -5540,6 +6052,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -5556,6 +6069,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -5572,6 +6086,8 @@ module Orb def unit_with_percent_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -5580,6 +6096,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -5588,6 +6106,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -5613,6 +6133,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -5621,6 +6142,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -5629,6 +6152,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -5637,6 +6161,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -5645,6 +6171,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -5653,6 +6180,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -5678,6 +6207,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -5689,6 +6221,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -5772,6 +6306,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -5790,6 +6325,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -5798,6 +6334,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -5806,6 +6343,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -5814,6 +6353,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -5829,6 +6369,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -5837,6 +6378,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -5845,6 +6387,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -5853,6 +6397,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -5869,6 +6414,7 @@ module Orb end class NewSubscriptionPackageWithAllocationPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -5877,6 +6423,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -5893,6 +6440,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -5909,6 +6457,8 @@ module Orb def package_with_allocation_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -5917,6 +6467,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -5925,6 +6477,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -5950,6 +6504,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -5958,6 +6513,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -5966,6 +6523,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -5974,6 +6532,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -5982,6 +6542,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -5990,6 +6551,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -6015,6 +6578,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -6026,6 +6592,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -6109,6 +6677,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -6127,6 +6696,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -6135,6 +6705,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -6143,6 +6714,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -6151,6 +6724,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -6166,6 +6740,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -6174,6 +6749,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -6182,6 +6758,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -6190,6 +6768,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -6206,6 +6785,7 @@ module Orb end class NewSubscriptionTierWithProrationPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -6214,6 +6794,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -6230,6 +6811,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -6246,6 +6828,8 @@ module Orb def tiered_with_proration_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -6254,6 +6838,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -6262,6 +6848,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -6287,6 +6875,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -6295,6 +6884,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -6303,6 +6894,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -6311,6 +6903,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -6319,6 +6913,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -6327,6 +6922,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -6352,6 +6949,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -6363,6 +6963,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -6446,6 +7048,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -6464,6 +7067,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -6472,6 +7076,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -6480,6 +7085,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -6488,6 +7095,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -6503,6 +7111,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -6511,6 +7120,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -6519,6 +7129,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -6527,6 +7139,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -6543,6 +7156,7 @@ module Orb end class NewSubscriptionUnitWithProrationPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -6551,6 +7165,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -6567,6 +7182,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -6583,6 +7199,8 @@ module Orb def unit_with_proration_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -6591,6 +7209,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -6599,6 +7219,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -6624,6 +7246,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -6632,6 +7255,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -6640,6 +7265,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -6648,6 +7274,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -6656,6 +7284,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -6664,6 +7293,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -6689,6 +7320,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -6700,6 +7334,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -6783,6 +7419,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -6801,6 +7438,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -6809,6 +7447,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -6817,6 +7456,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -6825,6 +7466,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -6840,6 +7482,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -6848,6 +7491,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -6856,6 +7500,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -6864,6 +7510,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -6880,6 +7527,7 @@ module Orb end class NewSubscriptionGroupedAllocationPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -6896,6 +7544,7 @@ module Orb def grouped_allocation_config=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -6912,6 +7561,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -6920,6 +7570,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -6928,6 +7580,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -6936,6 +7590,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -6961,6 +7617,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -6969,6 +7626,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -6977,6 +7636,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -6985,6 +7645,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -6993,6 +7655,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -7001,6 +7664,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -7026,6 +7691,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -7037,6 +7705,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -7120,6 +7790,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -7138,6 +7809,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -7146,6 +7818,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -7154,6 +7827,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -7162,6 +7837,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -7177,6 +7853,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -7185,6 +7862,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -7193,6 +7871,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -7201,6 +7881,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -7217,6 +7898,7 @@ module Orb end class NewSubscriptionGroupedWithProratedMinimumPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -7233,6 +7915,7 @@ module Orb def grouped_with_prorated_minimum_config=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -7249,6 +7932,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -7257,6 +7941,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -7265,6 +7951,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -7273,6 +7961,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -7298,6 +7988,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -7306,6 +7997,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -7314,6 +8007,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -7322,6 +8016,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -7330,6 +8026,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -7338,6 +8035,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -7363,6 +8062,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -7374,6 +8076,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -7457,6 +8161,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -7475,6 +8180,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -7483,6 +8189,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -7491,6 +8198,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -7499,6 +8208,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -7514,6 +8224,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -7522,6 +8233,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -7530,6 +8242,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -7538,6 +8252,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -7562,6 +8277,7 @@ module Orb def bulk_with_proration_config=(_) end + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -7570,6 +8286,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -7586,6 +8303,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -7594,6 +8312,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -7602,6 +8322,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -7610,6 +8332,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -7635,6 +8359,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -7643,6 +8368,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -7651,6 +8378,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -7659,6 +8387,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -7667,6 +8397,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -7675,6 +8406,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -7700,6 +8433,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -7711,6 +8447,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -7794,6 +8532,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -7812,6 +8551,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -7820,6 +8560,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -7828,6 +8569,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -7836,6 +8579,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -7851,6 +8595,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -7859,6 +8604,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -7867,6 +8613,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -7875,6 +8623,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -7891,6 +8640,7 @@ module Orb end class NewSubscriptionScalableMatrixWithUnitPricingPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -7899,6 +8649,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -7915,6 +8666,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -7931,6 +8683,8 @@ module Orb def scalable_matrix_with_unit_pricing_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -7939,6 +8693,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -7947,6 +8703,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -7972,6 +8730,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -7980,6 +8739,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -7988,6 +8749,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -7996,6 +8758,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -8004,6 +8768,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -8012,6 +8777,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -8037,6 +8804,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -8048,6 +8818,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -8131,6 +8903,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -8149,6 +8922,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -8157,6 +8931,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -8165,6 +8940,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -8173,6 +8950,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -8188,6 +8966,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -8196,6 +8975,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -8204,6 +8984,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -8212,6 +8994,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -8228,6 +9011,7 @@ module Orb end class NewSubscriptionScalableMatrixWithTieredPricingPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -8236,6 +9020,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -8252,6 +9037,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -8268,6 +9054,8 @@ module Orb def scalable_matrix_with_tiered_pricing_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -8276,6 +9064,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -8284,6 +9074,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -8309,6 +9101,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -8317,6 +9110,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -8325,6 +9120,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -8333,6 +9129,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -8341,6 +9139,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -8349,6 +9148,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -8374,6 +9175,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -8385,6 +9189,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -8468,6 +9274,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -8486,6 +9293,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -8494,6 +9302,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -8502,6 +9311,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -8510,6 +9321,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -8525,6 +9337,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -8533,6 +9346,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -8541,6 +9355,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -8549,6 +9365,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -8565,6 +9382,7 @@ module Orb end class NewSubscriptionCumulativeGroupedBulkPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -8581,6 +9399,7 @@ module Orb def cumulative_grouped_bulk_config=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -8597,6 +9416,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -8605,6 +9425,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -8613,6 +9435,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -8621,6 +9445,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -8646,6 +9472,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -8654,6 +9481,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -8662,6 +9491,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -8670,6 +9500,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -8678,6 +9510,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -8686,6 +9519,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -8711,6 +9546,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -8722,6 +9560,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -8805,6 +9645,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -8823,6 +9664,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -8831,6 +9673,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -8839,6 +9682,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -8847,6 +9692,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -8862,6 +9708,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -8870,6 +9717,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -8878,6 +9726,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -8886,6 +9736,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -8902,6 +9753,7 @@ module Orb end class NewSubscriptionMaxGroupTieredPackagePrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -8910,6 +9762,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -8934,6 +9787,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -8942,6 +9796,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -8950,6 +9806,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -8958,6 +9816,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -8983,6 +9843,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -8991,6 +9852,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -8999,6 +9862,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -9007,6 +9871,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -9015,6 +9881,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -9023,6 +9890,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -9048,6 +9917,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -9059,6 +9931,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -9142,6 +10016,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -9160,6 +10035,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -9168,6 +10044,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -9176,6 +10053,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -9184,6 +10063,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -9199,6 +10079,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -9207,6 +10088,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -9215,6 +10097,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -9223,6 +10107,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -9239,6 +10124,7 @@ module Orb end class NewSubscriptionGroupedWithMeteredMinimumPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -9255,6 +10141,7 @@ module Orb def grouped_with_metered_minimum_config=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -9271,6 +10158,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -9279,6 +10167,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -9287,6 +10177,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -9295,6 +10187,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -9320,6 +10214,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -9328,6 +10223,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -9336,6 +10233,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -9344,6 +10242,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -9352,6 +10252,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -9360,6 +10261,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -9385,6 +10288,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -9396,6 +10302,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -9479,6 +10387,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -9497,6 +10406,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -9505,6 +10415,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -9513,6 +10424,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -9521,6 +10434,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -9536,6 +10450,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -9544,6 +10459,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -9552,6 +10468,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -9560,6 +10478,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -9576,6 +10495,7 @@ module Orb end class NewSubscriptionMatrixWithDisplayNamePrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -9584,6 +10504,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -9608,6 +10529,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -9616,6 +10538,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -9624,6 +10548,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -9632,6 +10558,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -9657,6 +10585,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -9665,6 +10594,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -9673,6 +10604,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -9681,6 +10613,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -9689,6 +10623,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -9697,6 +10632,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -9722,6 +10659,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -9733,6 +10673,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -9816,6 +10758,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -9834,6 +10777,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -9842,6 +10786,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -9850,6 +10795,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -9858,6 +10805,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -9873,6 +10821,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -9881,6 +10830,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -9889,6 +10839,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -9897,6 +10849,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -9913,6 +10866,7 @@ module Orb end class NewSubscriptionGroupedTieredPackagePrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -9929,6 +10883,7 @@ module Orb def grouped_tiered_package_config=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -9945,6 +10900,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -9953,6 +10909,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -9961,6 +10919,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -9969,6 +10929,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -9994,6 +10956,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -10002,6 +10965,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -10010,6 +10975,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -10018,6 +10984,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -10026,6 +10994,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -10034,6 +11003,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -10059,6 +11030,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -10070,6 +11044,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -10153,6 +11129,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -10171,6 +11148,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -10179,6 +11157,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -10187,6 +11166,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -10195,6 +11176,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -10210,6 +11192,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -10218,6 +11201,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -10226,6 +11210,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -10234,6 +11220,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -10253,16 +11240,20 @@ module Orb sig do override .returns( - [[Symbol, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionUnitPrice], [Symbol, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionPackagePrice], [Symbol, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionMatrixPrice], [Symbol, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionTieredPrice], [Symbol, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionTieredBpsPrice], [Symbol, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionBpsPrice], [Symbol, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionBulkBpsPrice], [Symbol, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionBulkPrice], [Symbol, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionThresholdTotalAmountPrice], [Symbol, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionTieredPackagePrice], [Symbol, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionTieredWithMinimumPrice], [Symbol, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionUnitWithPercentPrice], [Symbol, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionPackageWithAllocationPrice], [Symbol, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionTierWithProrationPrice], [Symbol, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionUnitWithProrationPrice], [Symbol, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionGroupedAllocationPrice], [Symbol, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionGroupedWithProratedMinimumPrice], [Symbol, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionBulkWithProrationPrice], [Symbol, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice], [Symbol, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice], [Symbol, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionCumulativeGroupedBulkPrice], [Symbol, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionMaxGroupTieredPackagePrice], [Symbol, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionGroupedWithMeteredMinimumPrice], [Symbol, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionMatrixWithDisplayNamePrice], [Symbol, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionGroupedTieredPackagePrice]] + [Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionUnitPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionPackagePrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionMatrixPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionTieredPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionTieredBpsPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionBpsPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionBulkBpsPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionTieredPackagePrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionTieredWithMinimumPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionUnitWithPercentPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionPackageWithAllocationPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionTierWithProrationPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionUnitWithProrationPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionGroupedAllocationPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionBulkWithProrationPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionGroupedTieredPackagePrice] ) end - private def variants + def variants end end end end class BillingCycleAnchorConfiguration < Orb::BaseModel + # The day of the month on which the billing cycle is anchored. If the maximum + # number of days in a month is greater than this value, the last day of the month + # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing + # period begins on the 30th. sig { returns(Integer) } def day end @@ -10271,6 +11262,9 @@ module Orb def day=(_) end + # The month on which the billing cycle is anchored (e.g. a quarterly price + # anchored in February would have cycles starting February, May, August, and + # November). sig { returns(T.nilable(Integer)) } def month end @@ -10279,6 +11273,8 @@ module Orb def month=(_) end + # The year on which the billing cycle is anchored (e.g. a 2 year billing cycle + # anchored on 2021 would have cycles starting on 2021, 2023, 2025, etc.). sig { returns(T.nilable(Integer)) } def year end @@ -10313,6 +11309,7 @@ module Orb end class RemoveAdjustment < Orb::BaseModel + # The id of the adjustment to remove on the subscription. sig { returns(String) } def adjustment_id end @@ -10331,6 +11328,7 @@ module Orb end class RemovePrice < Orb::BaseModel + # The external price id of the price to remove on the subscription. sig { returns(T.nilable(String)) } def external_price_id end @@ -10339,6 +11337,7 @@ module Orb def external_price_id=(_) end + # The id of the price to remove on the subscription. sig { returns(T.nilable(String)) } def price_id end @@ -10359,6 +11358,7 @@ module Orb end class ReplaceAdjustment < Orb::BaseModel + # The definition of a new adjustment to create and add to the subscription. sig do returns( T.any( @@ -10396,6 +11396,7 @@ module Orb def adjustment=(_) end + # The id of the adjustment on the plan to replace in the subscription. sig { returns(String) } def replaces_adjustment_id end @@ -10438,6 +11439,7 @@ module Orb def to_hash end + # The definition of a new adjustment to create and add to the subscription. class Adjustment < Orb::Union abstract! @@ -10450,6 +11452,7 @@ module Orb def adjustment_type=(_) end + # The set of price IDs to which this adjustment applies. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -10466,6 +11469,8 @@ module Orb def percentage_discount=(_) end + # When false, this adjustment will be applied to a single price. Otherwise, it + # will be applied at the invoice level, possibly to multiple prices. sig { returns(T.nilable(T::Boolean)) } def is_invoice_level end @@ -10510,6 +11515,7 @@ module Orb def adjustment_type=(_) end + # The set of price IDs to which this adjustment applies. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -10526,6 +11532,8 @@ module Orb def usage_discount=(_) end + # When false, this adjustment will be applied to a single price. Otherwise, it + # will be applied at the invoice level, possibly to multiple prices. sig { returns(T.nilable(T::Boolean)) } def is_invoice_level end @@ -10578,6 +11586,7 @@ module Orb def amount_discount=(_) end + # The set of price IDs to which this adjustment applies. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -10586,6 +11595,8 @@ module Orb def applies_to_price_ids=(_) end + # When false, this adjustment will be applied to a single price. Otherwise, it + # will be applied at the invoice level, possibly to multiple prices. sig { returns(T.nilable(T::Boolean)) } def is_invoice_level end @@ -10630,6 +11641,7 @@ module Orb def adjustment_type=(_) end + # The set of price IDs to which this adjustment applies. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -10638,6 +11650,7 @@ module Orb def applies_to_price_ids=(_) end + # The item ID that revenue from this minimum will be attributed to. sig { returns(String) } def item_id end @@ -10654,6 +11667,8 @@ module Orb def minimum_amount=(_) end + # When false, this adjustment will be applied to a single price. Otherwise, it + # will be applied at the invoice level, possibly to multiple prices. sig { returns(T.nilable(T::Boolean)) } def is_invoice_level end @@ -10700,6 +11715,7 @@ module Orb def adjustment_type=(_) end + # The set of price IDs to which this adjustment applies. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -10716,6 +11732,8 @@ module Orb def maximum_amount=(_) end + # When false, this adjustment will be applied to a single price. Otherwise, it + # will be applied at the invoice level, possibly to multiple prices. sig { returns(T.nilable(T::Boolean)) } def is_invoice_level end @@ -10755,16 +11773,17 @@ module Orb sig do override .returns( - [[Symbol, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::NewPercentageDiscount], [Symbol, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::NewUsageDiscount], [Symbol, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::NewAmountDiscount], [Symbol, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::NewMinimum], [Symbol, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::NewMaximum]] + [Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::NewPercentageDiscount, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::NewUsageDiscount, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::NewAmountDiscount, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::NewMinimum, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::NewMaximum] ) end - private def variants + def variants end end end end class ReplacePrice < Orb::BaseModel + # The id of the price on the plan to replace in the subscription. sig { returns(String) } def replaces_price_id end @@ -10773,6 +11792,7 @@ module Orb def replaces_price_id=(_) end + # The definition of a new allocation price to create and add to the subscription. sig { returns(T.nilable(Orb::Models::SubscriptionCreateParams::ReplacePrice::AllocationPrice)) } def allocation_price end @@ -10784,6 +11804,8 @@ module Orb def allocation_price=(_) end + # [DEPRECATED] Use add_adjustments instead. The subscription's discounts for the + # replacement price. sig { returns(T.nilable(T::Array[Orb::Models::SubscriptionCreateParams::ReplacePrice::Discount])) } def discounts end @@ -10795,6 +11817,7 @@ module Orb def discounts=(_) end + # The external price id of the price to add to the subscription. sig { returns(T.nilable(String)) } def external_price_id end @@ -10803,6 +11826,7 @@ module Orb def external_price_id=(_) end + # The new quantity of the price, if the price is a fixed price. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -10811,6 +11835,8 @@ module Orb def fixed_price_quantity=(_) end + # [DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for + # the replacement price. sig { returns(T.nilable(String)) } def maximum_amount end @@ -10819,6 +11845,8 @@ module Orb def maximum_amount=(_) end + # [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for + # the replacement price. sig { returns(T.nilable(String)) } def minimum_amount end @@ -10827,6 +11855,7 @@ module Orb def minimum_amount=(_) end + # The definition of a new price to create and add to the subscription. sig do returns( T.nilable( @@ -10930,6 +11959,7 @@ module Orb def price=(_) end + # The id of the price to add to the subscription. sig { returns(T.nilable(String)) } def price_id end @@ -11041,6 +12071,7 @@ module Orb end class AllocationPrice < Orb::BaseModel + # An amount of the currency to allocate to the customer at the specified cadence. sig { returns(String) } def amount end @@ -11049,6 +12080,7 @@ module Orb def amount=(_) end + # The cadence at which to allocate the amount to the customer. sig { returns(Symbol) } def cadence end @@ -11057,6 +12089,8 @@ module Orb def cadence=(_) end + # An ISO 4217 currency string or a custom pricing unit identifier in which to bill + # this price. sig { returns(String) } def currency end @@ -11065,6 +12099,8 @@ module Orb def currency=(_) end + # Whether the allocated amount should expire at the end of the cadence or roll + # over to the next period. sig { returns(T::Boolean) } def expires_at_end_of_cadence end @@ -11073,6 +12109,7 @@ module Orb def expires_at_end_of_cadence=(_) end + # The definition of a new allocation price to create and add to the subscription. sig do params(amount: String, cadence: Symbol, currency: String, expires_at_end_of_cadence: T::Boolean) .returns(T.attached_class) @@ -11092,6 +12129,7 @@ module Orb def to_hash end + # The cadence at which to allocate the amount to the customer. class Cadence < Orb::Enum abstract! @@ -11119,6 +12157,7 @@ module Orb def discount_type=(_) end + # Only available if discount_type is `amount`. sig { returns(T.nilable(String)) } def amount_discount end @@ -11127,6 +12166,8 @@ module Orb def amount_discount=(_) end + # Only available if discount_type is `percentage`. This is a number between 0 + # and 1. sig { returns(T.nilable(Float)) } def percentage_discount end @@ -11135,6 +12176,8 @@ module Orb def percentage_discount=(_) end + # Only available if discount_type is `usage`. Number of usage units that this + # discount is for sig { returns(T.nilable(Float)) } def usage_discount end @@ -11184,10 +12227,12 @@ module Orb end end + # The definition of a new price to create and add to the subscription. class Price < Orb::Union abstract! class NewSubscriptionUnitPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -11196,6 +12241,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -11212,6 +12258,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -11233,6 +12280,8 @@ module Orb def unit_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -11241,6 +12290,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -11249,6 +12300,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -11274,6 +12327,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -11282,6 +12336,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -11290,6 +12346,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -11298,6 +12355,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -11306,6 +12365,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -11314,6 +12374,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -11339,6 +12401,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -11350,6 +12415,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -11433,6 +12500,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -11451,6 +12519,7 @@ module Orb end class UnitConfig < Orb::BaseModel + # Rate per unit of usage sig { returns(String) } def unit_amount end @@ -11469,6 +12538,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -11477,6 +12547,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -11485,6 +12556,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -11493,6 +12566,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -11508,6 +12582,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -11516,6 +12591,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -11524,6 +12600,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -11532,6 +12610,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -11548,6 +12627,7 @@ module Orb end class NewSubscriptionPackagePrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -11556,6 +12636,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -11572,6 +12653,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -11599,6 +12681,8 @@ module Orb def package_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -11607,6 +12691,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -11615,6 +12701,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -11640,6 +12728,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -11648,6 +12737,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -11656,6 +12747,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -11664,6 +12756,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -11672,6 +12766,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -11680,6 +12775,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -11705,6 +12802,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -11716,6 +12816,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -11799,6 +12901,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -11817,6 +12920,7 @@ module Orb end class PackageConfig < Orb::BaseModel + # A currency amount to rate usage by sig { returns(String) } def package_amount end @@ -11825,6 +12929,8 @@ module Orb def package_amount=(_) end + # An integer amount to represent package size. For example, 1000 here would divide + # usage by 1000 before multiplying by package_amount in rating sig { returns(Integer) } def package_size end @@ -11843,6 +12949,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -11851,6 +12958,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -11859,6 +12967,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -11867,6 +12977,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -11882,6 +12993,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -11890,6 +13002,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -11898,6 +13011,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -11906,6 +13021,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -11922,6 +13038,7 @@ module Orb end class NewSubscriptionMatrixPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -11930,6 +13047,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -11965,6 +13083,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -11973,6 +13092,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -11981,6 +13102,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -11989,6 +13112,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -12014,6 +13139,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -12022,6 +13148,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -12030,6 +13158,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -12038,6 +13167,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -12046,6 +13177,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -12054,6 +13186,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -12079,6 +13213,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -12090,6 +13227,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -12173,6 +13312,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -12191,6 +13331,7 @@ module Orb end class MatrixConfig < Orb::BaseModel + # Default per unit rate for any usage not bucketed into a specified matrix_value sig { returns(String) } def default_unit_amount end @@ -12199,6 +13340,7 @@ module Orb def default_unit_amount=(_) end + # One or two event property values to evaluate matrix groups by sig { returns(T::Array[T.nilable(String)]) } def dimensions end @@ -12207,6 +13349,7 @@ module Orb def dimensions=(_) end + # Matrix values for specified matrix grouping keys sig do returns( T::Array[ @@ -12261,6 +13404,9 @@ module Orb end class MatrixValue < Orb::BaseModel + # One or two matrix keys to filter usage to this Matrix value by. For example, + # ["region", "tier"] could be used to filter cloud usage by a cloud region and an + # instance tier. sig { returns(T::Array[T.nilable(String)]) } def dimension_values end @@ -12269,6 +13415,7 @@ module Orb def dimension_values=(_) end + # Unit price for the specified dimension_values sig { returns(String) } def unit_amount end @@ -12293,6 +13440,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -12301,6 +13449,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -12309,6 +13458,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -12317,6 +13468,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -12332,6 +13484,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -12340,6 +13493,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -12348,6 +13502,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -12356,6 +13512,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -12372,6 +13529,7 @@ module Orb end class NewSubscriptionTieredPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -12380,6 +13538,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -12396,6 +13555,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -12423,6 +13583,8 @@ module Orb def tiered_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -12431,6 +13593,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -12439,6 +13603,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -12464,6 +13630,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -12472,6 +13639,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -12480,6 +13649,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -12488,6 +13658,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -12496,6 +13668,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -12504,6 +13677,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -12529,6 +13704,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -12540,6 +13718,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -12623,6 +13803,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -12641,6 +13822,7 @@ module Orb end class TieredConfig < Orb::BaseModel + # Tiers for rating based on total usage quantities into the specified tier sig do returns( T::Array[Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionTieredPrice::TieredConfig::Tier] @@ -12681,6 +13863,7 @@ module Orb end class Tier < Orb::BaseModel + # Inclusive tier starting value sig { returns(Float) } def first_unit end @@ -12689,6 +13872,7 @@ module Orb def first_unit=(_) end + # Amount per unit sig { returns(String) } def unit_amount end @@ -12697,6 +13881,7 @@ module Orb def unit_amount=(_) end + # Exclusive tier ending value. If null, this is treated as the last tier sig { returns(T.nilable(Float)) } def last_unit end @@ -12724,6 +13909,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -12732,6 +13918,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -12740,6 +13927,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -12748,6 +13937,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -12763,6 +13953,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -12771,6 +13962,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -12779,6 +13971,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -12787,6 +13981,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -12803,6 +13998,7 @@ module Orb end class NewSubscriptionTieredBpsPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -12811,6 +14007,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -12827,6 +14024,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -12854,6 +14052,8 @@ module Orb def tiered_bps_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -12862,6 +14062,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -12870,6 +14072,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -12895,6 +14099,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -12903,6 +14108,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -12911,6 +14118,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -12919,6 +14127,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -12927,6 +14137,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -12935,6 +14146,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -12960,6 +14173,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -12971,6 +14187,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -13054,6 +14272,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -13072,6 +14291,8 @@ module Orb end class TieredBpsConfig < Orb::BaseModel + # Tiers for a Graduated BPS pricing model, where usage is bucketed into specified + # tiers sig do returns( T::Array[ @@ -13122,6 +14343,7 @@ module Orb end class Tier < Orb::BaseModel + # Per-event basis point rate sig { returns(Float) } def bps end @@ -13130,6 +14352,7 @@ module Orb def bps=(_) end + # Inclusive tier starting value sig { returns(String) } def minimum_amount end @@ -13138,6 +14361,7 @@ module Orb def minimum_amount=(_) end + # Exclusive tier ending value sig { returns(T.nilable(String)) } def maximum_amount end @@ -13146,6 +14370,7 @@ module Orb def maximum_amount=(_) end + # Per unit maximum to charge sig { returns(T.nilable(String)) } def per_unit_maximum end @@ -13183,6 +14408,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -13191,6 +14417,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -13199,6 +14426,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -13207,6 +14436,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -13222,6 +14452,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -13230,6 +14461,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -13238,6 +14470,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -13246,6 +14480,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -13273,6 +14508,7 @@ module Orb def bps_config=(_) end + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -13281,6 +14517,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -13297,6 +14534,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -13305,6 +14543,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -13313,6 +14553,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -13321,6 +14563,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -13346,6 +14590,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -13354,6 +14599,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -13362,6 +14609,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -13370,6 +14618,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -13378,6 +14628,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -13386,6 +14637,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -13411,6 +14664,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -13422,6 +14678,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -13506,6 +14764,7 @@ module Orb end class BpsConfig < Orb::BaseModel + # Basis point take rate per event sig { returns(Float) } def bps end @@ -13514,6 +14773,7 @@ module Orb def bps=(_) end + # Optional currency amount maximum to cap spend per event sig { returns(T.nilable(String)) } def per_unit_maximum end @@ -13531,6 +14791,7 @@ module Orb end end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -13549,6 +14810,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -13557,6 +14819,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -13565,6 +14828,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -13573,6 +14838,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -13588,6 +14854,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -13596,6 +14863,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -13604,6 +14872,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -13612,6 +14882,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -13647,6 +14918,7 @@ module Orb def bulk_bps_config=(_) end + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -13655,6 +14927,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -13671,6 +14944,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -13679,6 +14953,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -13687,6 +14963,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -13695,6 +14973,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -13720,6 +15000,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -13728,6 +15009,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -13736,6 +15019,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -13744,6 +15028,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -13752,6 +15038,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -13760,6 +15047,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -13785,6 +15074,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -13796,6 +15088,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -13880,6 +15174,8 @@ module Orb end class BulkBpsConfig < Orb::BaseModel + # Tiers for a bulk BPS pricing model where all usage is aggregated to a single + # tier based on total volume sig do returns( T::Array[ @@ -13930,6 +15226,7 @@ module Orb end class Tier < Orb::BaseModel + # Basis points to rate on sig { returns(Float) } def bps end @@ -13938,6 +15235,7 @@ module Orb def bps=(_) end + # Upper bound for tier sig { returns(T.nilable(String)) } def maximum_amount end @@ -13946,6 +15244,7 @@ module Orb def maximum_amount=(_) end + # The maximum amount to charge for any one event sig { returns(T.nilable(String)) } def per_unit_maximum end @@ -13975,6 +15274,7 @@ module Orb end end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -13993,6 +15293,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -14001,6 +15302,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -14009,6 +15311,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -14017,6 +15321,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -14032,6 +15337,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -14040,6 +15346,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -14048,6 +15355,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -14056,6 +15365,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -14085,6 +15395,7 @@ module Orb def bulk_config=(_) end + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -14093,6 +15404,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -14109,6 +15421,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -14117,6 +15430,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -14125,6 +15440,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -14133,6 +15450,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -14158,6 +15477,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -14166,6 +15486,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -14174,6 +15496,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -14182,6 +15505,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -14190,6 +15515,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -14198,6 +15524,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -14223,6 +15551,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -14234,6 +15565,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -14318,6 +15651,7 @@ module Orb end class BulkConfig < Orb::BaseModel + # Bulk tiers for rating based on total usage volume sig do returns( T::Array[Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionBulkPrice::BulkConfig::Tier] @@ -14358,6 +15692,7 @@ module Orb end class Tier < Orb::BaseModel + # Amount per unit sig { returns(String) } def unit_amount end @@ -14366,6 +15701,7 @@ module Orb def unit_amount=(_) end + # Upper bound for this tier sig { returns(T.nilable(Float)) } def maximum_units end @@ -14384,6 +15720,7 @@ module Orb end end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -14402,6 +15739,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -14410,6 +15748,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -14418,6 +15757,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -14426,6 +15767,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -14441,6 +15783,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -14449,6 +15792,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -14457,6 +15801,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -14465,6 +15811,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -14481,6 +15828,7 @@ module Orb end class NewSubscriptionThresholdTotalAmountPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -14489,6 +15837,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -14505,6 +15854,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -14521,6 +15871,8 @@ module Orb def threshold_total_amount_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -14529,6 +15881,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -14537,6 +15891,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -14562,6 +15918,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -14570,6 +15927,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -14578,6 +15937,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -14586,6 +15946,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -14594,6 +15956,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -14602,6 +15965,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -14627,6 +15992,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -14638,6 +16006,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -14721,6 +16091,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -14739,6 +16110,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -14747,6 +16119,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -14755,6 +16128,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -14763,6 +16138,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -14778,6 +16154,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -14786,6 +16163,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -14794,6 +16172,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -14802,6 +16182,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -14818,6 +16199,7 @@ module Orb end class NewSubscriptionTieredPackagePrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -14826,6 +16208,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -14842,6 +16225,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -14858,6 +16242,8 @@ module Orb def tiered_package_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -14866,6 +16252,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -14874,6 +16262,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -14899,6 +16289,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -14907,6 +16298,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -14915,6 +16308,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -14923,6 +16317,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -14931,6 +16327,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -14939,6 +16336,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -14964,6 +16363,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -14975,6 +16377,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -15058,6 +16462,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -15076,6 +16481,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -15084,6 +16490,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -15092,6 +16499,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -15100,6 +16509,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -15115,6 +16525,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -15123,6 +16534,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -15131,6 +16543,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -15139,6 +16553,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -15155,6 +16570,7 @@ module Orb end class NewSubscriptionTieredWithMinimumPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -15163,6 +16579,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -15179,6 +16596,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -15195,6 +16613,8 @@ module Orb def tiered_with_minimum_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -15203,6 +16623,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -15211,6 +16633,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -15236,6 +16660,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -15244,6 +16669,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -15252,6 +16679,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -15260,6 +16688,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -15268,6 +16698,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -15276,6 +16707,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -15301,6 +16734,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -15312,6 +16748,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -15395,6 +16833,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -15413,6 +16852,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -15421,6 +16861,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -15429,6 +16870,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -15437,6 +16880,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -15452,6 +16896,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -15460,6 +16905,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -15468,6 +16914,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -15476,6 +16924,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -15492,6 +16941,7 @@ module Orb end class NewSubscriptionUnitWithPercentPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -15500,6 +16950,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -15516,6 +16967,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -15532,6 +16984,8 @@ module Orb def unit_with_percent_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -15540,6 +16994,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -15548,6 +17004,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -15573,6 +17031,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -15581,6 +17040,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -15589,6 +17050,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -15597,6 +17059,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -15605,6 +17069,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -15613,6 +17078,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -15638,6 +17105,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -15649,6 +17119,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -15732,6 +17204,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -15750,6 +17223,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -15758,6 +17232,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -15766,6 +17241,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -15774,6 +17251,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -15789,6 +17267,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -15797,6 +17276,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -15805,6 +17285,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -15813,6 +17295,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -15829,6 +17312,7 @@ module Orb end class NewSubscriptionPackageWithAllocationPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -15837,6 +17321,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -15853,6 +17338,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -15869,6 +17355,8 @@ module Orb def package_with_allocation_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -15877,6 +17365,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -15885,6 +17375,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -15910,6 +17402,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -15918,6 +17411,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -15926,6 +17421,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -15934,6 +17430,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -15942,6 +17440,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -15950,6 +17449,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -15975,6 +17476,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -15986,6 +17490,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -16069,6 +17575,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -16087,6 +17594,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -16095,6 +17603,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -16103,6 +17612,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -16111,6 +17622,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -16126,6 +17638,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -16134,6 +17647,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -16142,6 +17656,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -16150,6 +17666,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -16166,6 +17683,7 @@ module Orb end class NewSubscriptionTierWithProrationPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -16174,6 +17692,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -16190,6 +17709,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -16206,6 +17726,8 @@ module Orb def tiered_with_proration_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -16214,6 +17736,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -16222,6 +17746,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -16247,6 +17773,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -16255,6 +17782,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -16263,6 +17792,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -16271,6 +17801,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -16279,6 +17811,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -16287,6 +17820,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -16312,6 +17847,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -16323,6 +17861,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -16406,6 +17946,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -16424,6 +17965,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -16432,6 +17974,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -16440,6 +17983,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -16448,6 +17993,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -16463,6 +18009,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -16471,6 +18018,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -16479,6 +18027,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -16487,6 +18037,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -16503,6 +18054,7 @@ module Orb end class NewSubscriptionUnitWithProrationPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -16511,6 +18063,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -16527,6 +18080,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -16543,6 +18097,8 @@ module Orb def unit_with_proration_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -16551,6 +18107,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -16559,6 +18117,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -16584,6 +18144,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -16592,6 +18153,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -16600,6 +18163,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -16608,6 +18172,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -16616,6 +18182,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -16624,6 +18191,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -16649,6 +18218,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -16660,6 +18232,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -16743,6 +18317,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -16761,6 +18336,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -16769,6 +18345,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -16777,6 +18354,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -16785,6 +18364,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -16800,6 +18380,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -16808,6 +18389,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -16816,6 +18398,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -16824,6 +18408,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -16840,6 +18425,7 @@ module Orb end class NewSubscriptionGroupedAllocationPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -16856,6 +18442,7 @@ module Orb def grouped_allocation_config=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -16872,6 +18459,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -16880,6 +18468,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -16888,6 +18478,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -16896,6 +18488,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -16921,6 +18515,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -16929,6 +18524,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -16937,6 +18534,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -16945,6 +18543,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -16953,6 +18553,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -16961,6 +18562,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -16986,6 +18589,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -16997,6 +18603,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -17080,6 +18688,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -17098,6 +18707,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -17106,6 +18716,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -17114,6 +18725,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -17122,6 +18735,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -17137,6 +18751,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -17145,6 +18760,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -17153,6 +18769,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -17161,6 +18779,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -17177,6 +18796,7 @@ module Orb end class NewSubscriptionGroupedWithProratedMinimumPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -17193,6 +18813,7 @@ module Orb def grouped_with_prorated_minimum_config=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -17209,6 +18830,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -17217,6 +18839,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -17225,6 +18849,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -17233,6 +18859,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -17258,6 +18886,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -17266,6 +18895,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -17274,6 +18905,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -17282,6 +18914,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -17290,6 +18924,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -17298,6 +18933,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -17323,6 +18960,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -17334,6 +18974,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -17417,6 +19059,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -17435,6 +19078,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -17443,6 +19087,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -17451,6 +19096,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -17459,6 +19106,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -17474,6 +19122,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -17482,6 +19131,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -17490,6 +19140,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -17498,6 +19150,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -17522,6 +19175,7 @@ module Orb def bulk_with_proration_config=(_) end + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -17530,6 +19184,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -17546,6 +19201,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -17554,6 +19210,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -17562,6 +19220,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -17570,6 +19230,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -17595,6 +19257,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -17603,6 +19266,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -17611,6 +19276,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -17619,6 +19285,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -17627,6 +19295,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -17635,6 +19304,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -17660,6 +19331,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -17671,6 +19345,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -17754,6 +19430,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -17772,6 +19449,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -17780,6 +19458,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -17788,6 +19467,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -17796,6 +19477,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -17811,6 +19493,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -17819,6 +19502,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -17827,6 +19511,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -17835,6 +19521,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -17851,6 +19538,7 @@ module Orb end class NewSubscriptionScalableMatrixWithUnitPricingPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -17859,6 +19547,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -17875,6 +19564,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -17891,6 +19581,8 @@ module Orb def scalable_matrix_with_unit_pricing_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -17899,6 +19591,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -17907,6 +19601,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -17932,6 +19628,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -17940,6 +19637,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -17948,6 +19647,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -17956,6 +19656,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -17964,6 +19666,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -17972,6 +19675,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -17997,6 +19702,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -18008,6 +19716,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -18091,6 +19801,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -18109,6 +19820,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -18117,6 +19829,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -18125,6 +19838,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -18133,6 +19848,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -18148,6 +19864,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -18156,6 +19873,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -18164,6 +19882,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -18172,6 +19892,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -18188,6 +19909,7 @@ module Orb end class NewSubscriptionScalableMatrixWithTieredPricingPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -18196,6 +19918,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -18212,6 +19935,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -18228,6 +19952,8 @@ module Orb def scalable_matrix_with_tiered_pricing_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -18236,6 +19962,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -18244,6 +19972,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -18269,6 +19999,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -18277,6 +20008,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -18285,6 +20018,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -18293,6 +20027,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -18301,6 +20037,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -18309,6 +20046,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -18334,6 +20073,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -18345,6 +20087,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -18428,6 +20172,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -18446,6 +20191,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -18454,6 +20200,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -18462,6 +20209,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -18470,6 +20219,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -18485,6 +20235,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -18493,6 +20244,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -18501,6 +20253,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -18509,6 +20263,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -18525,6 +20280,7 @@ module Orb end class NewSubscriptionCumulativeGroupedBulkPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -18541,6 +20297,7 @@ module Orb def cumulative_grouped_bulk_config=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -18557,6 +20314,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -18565,6 +20323,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -18573,6 +20333,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -18581,6 +20343,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -18606,6 +20370,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -18614,6 +20379,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -18622,6 +20389,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -18630,6 +20398,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -18638,6 +20408,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -18646,6 +20417,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -18671,6 +20444,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -18682,6 +20458,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -18765,6 +20543,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -18783,6 +20562,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -18791,6 +20571,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -18799,6 +20580,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -18807,6 +20590,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -18822,6 +20606,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -18830,6 +20615,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -18838,6 +20624,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -18846,6 +20634,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -18862,6 +20651,7 @@ module Orb end class NewSubscriptionMaxGroupTieredPackagePrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -18870,6 +20660,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -18894,6 +20685,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -18902,6 +20694,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -18910,6 +20704,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -18918,6 +20714,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -18943,6 +20741,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -18951,6 +20750,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -18959,6 +20760,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -18967,6 +20769,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -18975,6 +20779,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -18983,6 +20788,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -19008,6 +20815,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -19019,6 +20829,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -19102,6 +20914,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -19120,6 +20933,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -19128,6 +20942,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -19136,6 +20951,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -19144,6 +20961,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -19159,6 +20977,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -19167,6 +20986,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -19175,6 +20995,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -19183,6 +21005,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -19199,6 +21022,7 @@ module Orb end class NewSubscriptionGroupedWithMeteredMinimumPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -19215,6 +21039,7 @@ module Orb def grouped_with_metered_minimum_config=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -19231,6 +21056,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -19239,6 +21065,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -19247,6 +21075,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -19255,6 +21085,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -19280,6 +21112,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -19288,6 +21121,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -19296,6 +21131,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -19304,6 +21140,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -19312,6 +21150,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -19320,6 +21159,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -19345,6 +21186,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -19356,6 +21200,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -19439,6 +21285,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -19457,6 +21304,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -19465,6 +21313,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -19473,6 +21322,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -19481,6 +21332,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -19496,6 +21348,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -19504,6 +21357,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -19512,6 +21366,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -19520,6 +21376,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -19536,6 +21393,7 @@ module Orb end class NewSubscriptionMatrixWithDisplayNamePrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -19544,6 +21402,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -19568,6 +21427,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -19576,6 +21436,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -19584,6 +21446,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -19592,6 +21456,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -19617,6 +21483,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -19625,6 +21492,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -19633,6 +21502,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -19641,6 +21511,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -19649,6 +21521,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -19657,6 +21530,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -19682,6 +21557,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -19693,6 +21571,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -19776,6 +21656,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -19794,6 +21675,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -19802,6 +21684,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -19810,6 +21693,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -19818,6 +21703,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -19833,6 +21719,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -19841,6 +21728,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -19849,6 +21737,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -19857,6 +21747,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -19873,6 +21764,7 @@ module Orb end class NewSubscriptionGroupedTieredPackagePrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -19889,6 +21781,7 @@ module Orb def grouped_tiered_package_config=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -19905,6 +21798,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -19913,6 +21807,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -19921,6 +21817,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -19929,6 +21827,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -19954,6 +21854,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -19962,6 +21863,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -19970,6 +21873,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -19978,6 +21882,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -19986,6 +21892,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -19994,6 +21901,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -20019,6 +21928,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -20030,6 +21942,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -20113,6 +22027,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -20131,6 +22046,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -20139,6 +22055,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -20147,6 +22064,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -20155,6 +22074,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -20170,6 +22090,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -20178,6 +22099,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -20186,6 +22108,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -20194,6 +22118,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -20213,10 +22138,10 @@ module Orb sig do override .returns( - [[Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionUnitPrice], [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionPackagePrice], [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionMatrixPrice], [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionTieredPrice], [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionTieredBpsPrice], [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionBpsPrice], [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionBulkBpsPrice], [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionBulkPrice], [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionThresholdTotalAmountPrice], [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionTieredPackagePrice], [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionTieredWithMinimumPrice], [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionUnitWithPercentPrice], [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionPackageWithAllocationPrice], [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionTierWithProrationPrice], [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionUnitWithProrationPrice], [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionGroupedAllocationPrice], [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionGroupedWithProratedMinimumPrice], [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionBulkWithProrationPrice], [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice], [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice], [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionCumulativeGroupedBulkPrice], [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionMaxGroupTieredPackagePrice], [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionGroupedWithMeteredMinimumPrice], [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionMatrixWithDisplayNamePrice], [Symbol, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionGroupedTieredPackagePrice]] + [Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionUnitPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionPackagePrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionMatrixPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionTieredPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionTieredBpsPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionBpsPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionBulkBpsPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionTieredPackagePrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionTieredWithMinimumPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionUnitWithPercentPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionPackageWithAllocationPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionTierWithProrationPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionUnitWithProrationPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionGroupedAllocationPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionBulkWithProrationPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionGroupedTieredPackagePrice] ) end - private def variants + def variants end end end diff --git a/rbi/lib/orb/models/subscription_create_response.rbi b/rbi/lib/orb/models/subscription_create_response.rbi index 08dae2d2..7aa3dc74 100644 --- a/rbi/lib/orb/models/subscription_create_response.rbi +++ b/rbi/lib/orb/models/subscription_create_response.rbi @@ -11,6 +11,8 @@ module Orb def id=(_) end + # The current plan phase that is active, only if the subscription's plan has + # phases. sig { returns(T.nilable(Integer)) } def active_plan_phase_order end @@ -19,6 +21,8 @@ module Orb def active_plan_phase_order=(_) end + # The adjustment intervals for this subscription sorted by the start_date of the + # adjustment interval. sig { returns(T::Array[Orb::Models::SubscriptionCreateResponse::AdjustmentInterval]) } def adjustment_intervals end @@ -30,6 +34,9 @@ module Orb def adjustment_intervals=(_) end + # Determines whether issued invoices for this subscription will automatically be + # charged with the saved payment method on the due date. This property defaults to + # the plan's behavior. If null, defaults to the customer's setting. sig { returns(T.nilable(T::Boolean)) } def auto_collection end @@ -49,6 +56,10 @@ module Orb def billing_cycle_anchor_configuration=(_) end + # The day of the month on which the billing cycle is anchored. If the maximum + # number of days in a month is greater than this value, the last day of the month + # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing + # period begins on the 30th. sig { returns(Integer) } def billing_cycle_day end @@ -65,6 +76,9 @@ module Orb def created_at=(_) end + # The end of the current billing period. This is an exclusive timestamp, such that + # the instant returned is not part of the billing period. Set to null for + # subscriptions that are not currently active. sig { returns(T.nilable(Time)) } def current_billing_period_end_date end @@ -73,6 +87,9 @@ module Orb def current_billing_period_end_date=(_) end + # The start date of the current billing period. This is an inclusive timestamp; + # the instant returned is exactly the beginning of the billing period. Set to null + # if the subscription is not currently active. sig { returns(T.nilable(Time)) } def current_billing_period_start_date end @@ -81,6 +98,24 @@ module Orb def current_billing_period_start_date=(_) end + # A customer is a buyer of your products, and the other party to the billing + # relationship. + # + # In Orb, customers are assigned system generated identifiers automatically, but + # it's often desirable to have these match existing identifiers in your system. To + # avoid having to denormalize Orb ID information, you can pass in an + # `external_customer_id` with your own identifier. See + # [Customer ID Aliases](/events-and-metrics/customer-aliases) for further + # information about how these aliases work in Orb. + # + # In addition to having an identifier in your system, a customer may exist in a + # payment provider solution like Stripe. Use the `payment_provider_id` and the + # `payment_provider` enum field to express this mapping. + # + # A customer also has a timezone (from the standard + # [IANA timezone database](https://www.iana.org/time-zones)), which defaults to + # your account's timezone. See [Timezone localization](/essentials/timezones) for + # information on what this timezone parameter influences within Orb. sig { returns(Orb::Models::Customer) } def customer end @@ -89,6 +124,8 @@ module Orb def customer=(_) end + # Determines the default memo on this subscriptions' invoices. Note that if this + # is not provided, it is determined by the plan configuration. sig { returns(T.nilable(String)) } def default_invoice_memo end @@ -97,6 +134,7 @@ module Orb def default_invoice_memo=(_) end + # The discount intervals for this subscription sorted by the start_date. sig do returns( T::Array[ @@ -134,6 +172,7 @@ module Orb def discount_intervals=(_) end + # The date Orb stops billing for this subscription. sig { returns(T.nilable(Time)) } def end_date end @@ -161,6 +200,7 @@ module Orb def invoicing_threshold=(_) end + # The maximum intervals for this subscription sorted by the start_date. sig { returns(T::Array[Orb::Models::SubscriptionCreateResponse::MaximumInterval]) } def maximum_intervals end @@ -172,6 +212,10 @@ module Orb def maximum_intervals=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -180,6 +224,7 @@ module Orb def metadata=(_) end + # The minimum intervals for this subscription sorted by the start_date. sig { returns(T::Array[Orb::Models::SubscriptionCreateResponse::MinimumInterval]) } def minimum_intervals end @@ -191,6 +236,10 @@ module Orb def minimum_intervals=(_) end + # Determines the difference between the invoice issue date for subscription + # invoices as the date that they are due. A value of `0` here represents that the + # invoice is due on issue, whereas a value of `30` represents that the customer + # has a month to pay the invoice. sig { returns(Integer) } def net_terms end @@ -199,6 +248,10 @@ module Orb def net_terms=(_) end + # The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be + # subscribed to by a customer. Plans define the billing behavior of the + # subscription. You can see more about how to configure prices in the + # [Price resource](/reference/price). sig { returns(Orb::Models::Plan) } def plan end @@ -207,6 +260,7 @@ module Orb def plan=(_) end + # The price intervals for this subscription. sig { returns(T::Array[Orb::Models::SubscriptionCreateResponse::PriceInterval]) } def price_intervals end @@ -229,6 +283,7 @@ module Orb def redeemed_coupon=(_) end + # The date Orb starts billing for this subscription. sig { returns(Time) } def start_date end @@ -408,6 +463,7 @@ module Orb def adjustment=(_) end + # The price interval IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -416,6 +472,7 @@ module Orb def applies_to_price_interval_ids=(_) end + # The end date of the adjustment interval. sig { returns(T.nilable(Time)) } def end_date end @@ -424,6 +481,7 @@ module Orb def end_date=(_) end + # The start date of the adjustment interval. sig { returns(Time) } def start_date end @@ -492,6 +550,7 @@ module Orb def adjustment_type=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -500,6 +559,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -508,6 +569,7 @@ module Orb def is_invoice_level=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -516,6 +578,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -524,6 +587,8 @@ module Orb def reason=(_) end + # The number of usage units by which to discount the price this adjustment applies + # to in a given billing period. sig { returns(Float) } def usage_discount end @@ -590,6 +655,8 @@ module Orb def adjustment_type=(_) end + # The amount by which to discount the prices this adjustment applies to in a given + # billing period. sig { returns(String) } def amount_discount end @@ -598,6 +665,7 @@ module Orb def amount_discount=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -606,6 +674,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -614,6 +684,7 @@ module Orb def is_invoice_level=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -622,6 +693,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -688,6 +760,7 @@ module Orb def adjustment_type=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -696,6 +769,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -704,6 +779,8 @@ module Orb def is_invoice_level=(_) end + # The percentage (as a value between 0 and 1) by which to discount the price + # intervals this adjustment applies to in a given billing period. sig { returns(Float) } def percentage_discount end @@ -712,6 +789,7 @@ module Orb def percentage_discount=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -720,6 +798,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -786,6 +865,7 @@ module Orb def adjustment_type=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -794,6 +874,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -802,6 +884,7 @@ module Orb def is_invoice_level=(_) end + # The item ID that revenue from this minimum will be attributed to. sig { returns(String) } def item_id end @@ -810,6 +893,8 @@ module Orb def item_id=(_) end + # The minimum amount to charge in a given billing period for the prices this + # adjustment applies to. sig { returns(String) } def minimum_amount end @@ -818,6 +903,7 @@ module Orb def minimum_amount=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -826,6 +912,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -895,6 +982,7 @@ module Orb def adjustment_type=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -903,6 +991,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -911,6 +1001,8 @@ module Orb def is_invoice_level=(_) end + # The maximum amount to charge in a given billing period for the prices this + # adjustment applies to. sig { returns(String) } def maximum_amount end @@ -919,6 +1011,7 @@ module Orb def maximum_amount=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -927,6 +1020,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -980,16 +1074,20 @@ module Orb sig do override .returns( - [[Symbol, Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment], [Symbol, Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment], [Symbol, Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment], [Symbol, Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment], [Symbol, Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment]] + [Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment] ) end - private def variants + def variants end end end end class BillingCycleAnchorConfiguration < Orb::BaseModel + # The day of the month on which the billing cycle is anchored. If the maximum + # number of days in a month is greater than this value, the last day of the month + # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing + # period begins on the 30th. sig { returns(Integer) } def day end @@ -998,6 +1096,9 @@ module Orb def day=(_) end + # The month on which the billing cycle is anchored (e.g. a quarterly price + # anchored in February would have cycles starting February, May, August, and + # November). sig { returns(T.nilable(Integer)) } def month end @@ -1006,6 +1107,8 @@ module Orb def month=(_) end + # The year on which the billing cycle is anchored (e.g. a 2 year billing cycle + # anchored on 2021 would have cycles starting on 2021, 2023, 2025, etc.). sig { returns(T.nilable(Integer)) } def year end @@ -1029,6 +1132,7 @@ module Orb abstract! class AmountDiscountInterval < Orb::BaseModel + # Only available if discount_type is `amount`. sig { returns(String) } def amount_discount end @@ -1037,6 +1141,7 @@ module Orb def amount_discount=(_) end + # The price ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1045,6 +1150,7 @@ module Orb def applies_to_price_ids=(_) end + # The price interval ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -1061,6 +1167,7 @@ module Orb def discount_type=(_) end + # The end date of the discount interval. sig { returns(T.nilable(Time)) } def end_date end @@ -1069,6 +1176,7 @@ module Orb def end_date=(_) end + # The start date of the discount interval. sig { returns(Time) } def start_date end @@ -1116,6 +1224,7 @@ module Orb end class PercentageDiscountInterval < Orb::BaseModel + # The price ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1124,6 +1233,7 @@ module Orb def applies_to_price_ids=(_) end + # The price interval ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -1140,6 +1250,7 @@ module Orb def discount_type=(_) end + # The end date of the discount interval. sig { returns(T.nilable(Time)) } def end_date end @@ -1148,6 +1259,8 @@ module Orb def end_date=(_) end + # Only available if discount_type is `percentage`.This is a number between 0 + # and 1. sig { returns(Float) } def percentage_discount end @@ -1156,6 +1269,7 @@ module Orb def percentage_discount=(_) end + # The start date of the discount interval. sig { returns(Time) } def start_date end @@ -1203,6 +1317,7 @@ module Orb end class UsageDiscountInterval < Orb::BaseModel + # The price ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1211,6 +1326,7 @@ module Orb def applies_to_price_ids=(_) end + # The price interval ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -1227,6 +1343,7 @@ module Orb def discount_type=(_) end + # The end date of the discount interval. sig { returns(T.nilable(Time)) } def end_date end @@ -1235,6 +1352,7 @@ module Orb def end_date=(_) end + # The start date of the discount interval. sig { returns(Time) } def start_date end @@ -1243,6 +1361,8 @@ module Orb def start_date=(_) end + # Only available if discount_type is `usage`. Number of usage units that this + # discount is for sig { returns(Float) } def usage_discount end @@ -1293,10 +1413,10 @@ module Orb sig do override .returns( - [[Symbol, Orb::Models::SubscriptionCreateResponse::DiscountInterval::AmountDiscountInterval], [Symbol, Orb::Models::SubscriptionCreateResponse::DiscountInterval::PercentageDiscountInterval], [Symbol, Orb::Models::SubscriptionCreateResponse::DiscountInterval::UsageDiscountInterval]] + [Orb::Models::SubscriptionCreateResponse::DiscountInterval::AmountDiscountInterval, Orb::Models::SubscriptionCreateResponse::DiscountInterval::PercentageDiscountInterval, Orb::Models::SubscriptionCreateResponse::DiscountInterval::UsageDiscountInterval] ) end - private def variants + def variants end end end @@ -1349,6 +1469,7 @@ module Orb end class MaximumInterval < Orb::BaseModel + # The price ids that this maximum interval applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1357,6 +1478,7 @@ module Orb def applies_to_price_ids=(_) end + # The price interval ids that this maximum interval applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -1365,6 +1487,7 @@ module Orb def applies_to_price_interval_ids=(_) end + # The end date of the maximum interval. sig { returns(T.nilable(Time)) } def end_date end @@ -1373,6 +1496,8 @@ module Orb def end_date=(_) end + # The maximum amount to charge in a given billing period for the price intervals + # this transform applies to. sig { returns(String) } def maximum_amount end @@ -1381,6 +1506,7 @@ module Orb def maximum_amount=(_) end + # The start date of the maximum interval. sig { returns(Time) } def start_date end @@ -1419,6 +1545,7 @@ module Orb end class MinimumInterval < Orb::BaseModel + # The price ids that this minimum interval applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1427,6 +1554,7 @@ module Orb def applies_to_price_ids=(_) end + # The price interval ids that this minimum interval applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -1435,6 +1563,7 @@ module Orb def applies_to_price_interval_ids=(_) end + # The end date of the minimum interval. sig { returns(T.nilable(Time)) } def end_date end @@ -1443,6 +1572,8 @@ module Orb def end_date=(_) end + # The minimum amount to charge in a given billing period for the price intervals + # this minimum applies to. sig { returns(String) } def minimum_amount end @@ -1451,6 +1582,7 @@ module Orb def minimum_amount=(_) end + # The start date of the minimum interval. sig { returns(Time) } def start_date end @@ -1497,6 +1629,7 @@ module Orb def id=(_) end + # The day of the month that Orb bills for this price sig { returns(Integer) } def billing_cycle_day end @@ -1505,6 +1638,9 @@ module Orb def billing_cycle_day=(_) end + # The end of the current billing period. This is an exclusive timestamp, such that + # the instant returned is exactly the end of the billing period. Set to null if + # this price interval is not currently active. sig { returns(T.nilable(Time)) } def current_billing_period_end_date end @@ -1513,6 +1649,9 @@ module Orb def current_billing_period_end_date=(_) end + # The start date of the current billing period. This is an inclusive timestamp; + # the instant returned is exactly the beginning of the billing period. Set to null + # if this price interval is not currently active. sig { returns(T.nilable(Time)) } def current_billing_period_start_date end @@ -1521,6 +1660,8 @@ module Orb def current_billing_period_start_date=(_) end + # The end date of the price interval. This is the date that Orb stops billing for + # this price. sig { returns(T.nilable(Time)) } def end_date end @@ -1529,6 +1670,7 @@ module Orb def end_date=(_) end + # An additional filter to apply to usage queries. sig { returns(T.nilable(String)) } def filter end @@ -1537,6 +1679,8 @@ module Orb def filter=(_) end + # The fixed fee quantity transitions for this price interval. This is only + # relevant for fixed fees. sig do returns( T.nilable(T::Array[Orb::Models::SubscriptionCreateResponse::PriceInterval::FixedFeeQuantityTransition]) @@ -1556,6 +1700,16 @@ module Orb def fixed_fee_quantity_transitions=(_) end + # The Price resource represents a price that can be billed on a subscription, + # resulting in a charge on an invoice in the form of an invoice line item. Prices + # take a quantity and determine an amount to bill. + # + # Orb supports a few different pricing models out of the box. Each of these models + # is serialized differently in a given Price object. The model_type field + # determines the key for the configuration object that is present. + # + # For more on the types of prices, see + # [the core concepts documentation](/core-concepts#plan-and-price) sig do returns( T.any( @@ -1662,6 +1816,8 @@ module Orb def price=(_) end + # The start date of the price interval. This is the date that Orb starts billing + # for this price. sig { returns(Time) } def start_date end @@ -1670,6 +1826,8 @@ module Orb def start_date=(_) end + # A list of customer IDs whose usage events will be aggregated and billed under + # this price interval. sig { returns(T.nilable(T::Array[String])) } def usage_customer_ids end @@ -1678,6 +1836,9 @@ module Orb def usage_customer_ids=(_) end + # The Price Interval resource represents a period of time for which a price will + # bill on a subscription. A subscription’s price intervals define its billing + # behavior. sig do params( id: String, diff --git a/rbi/lib/orb/models/subscription_fetch_costs_params.rbi b/rbi/lib/orb/models/subscription_fetch_costs_params.rbi index 53b3dc52..cf1a4014 100644 --- a/rbi/lib/orb/models/subscription_fetch_costs_params.rbi +++ b/rbi/lib/orb/models/subscription_fetch_costs_params.rbi @@ -6,6 +6,7 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters + # The currency or custom pricing unit to use. sig { returns(T.nilable(String)) } def currency end @@ -14,6 +15,7 @@ module Orb def currency=(_) end + # Costs returned are exclusive of `timeframe_end`. sig { returns(T.nilable(Time)) } def timeframe_end end @@ -22,6 +24,7 @@ module Orb def timeframe_end=(_) end + # Costs returned are inclusive of `timeframe_start`. sig { returns(T.nilable(Time)) } def timeframe_start end @@ -30,6 +33,10 @@ module Orb def timeframe_start=(_) end + # Controls whether Orb returns cumulative costs since the start of the billing + # period, or incremental day-by-day costs. If your customer has minimums or + # discounts, it's strongly recommended that you use the default cumulative + # behavior. sig { returns(T.nilable(Symbol)) } def view_mode end @@ -66,6 +73,10 @@ module Orb def to_hash end + # Controls whether Orb returns cumulative costs since the start of the billing + # period, or incremental day-by-day costs. If your customer has minimums or + # discounts, it's strongly recommended that you use the default cumulative + # behavior. class ViewMode < Orb::Enum abstract! diff --git a/rbi/lib/orb/models/subscription_fetch_costs_response.rbi b/rbi/lib/orb/models/subscription_fetch_costs_response.rbi index bb797283..bd02279b 100644 --- a/rbi/lib/orb/models/subscription_fetch_costs_response.rbi +++ b/rbi/lib/orb/models/subscription_fetch_costs_response.rbi @@ -34,6 +34,7 @@ module Orb def per_price_costs=(_) end + # Total costs for the timeframe, excluding any minimums and discounts. sig { returns(String) } def subtotal end @@ -58,6 +59,7 @@ module Orb def timeframe_start=(_) end + # Total costs for the timeframe, including any minimums and discounts. sig { returns(String) } def total end @@ -95,6 +97,7 @@ module Orb end class PerPriceCost < Orb::BaseModel + # The price object sig do returns( T.any( @@ -201,6 +204,7 @@ module Orb def price=(_) end + # The price the cost is associated with sig { returns(String) } def price_id end @@ -209,6 +213,7 @@ module Orb def price_id=(_) end + # Price's contributions for the timeframe, excluding any minimums and discounts. sig { returns(String) } def subtotal end @@ -217,6 +222,7 @@ module Orb def subtotal=(_) end + # Price's contributions for the timeframe, including minimums and discounts. sig { returns(String) } def total end @@ -225,6 +231,7 @@ module Orb def total=(_) end + # The price's quantity for the timeframe sig { returns(T.nilable(Float)) } def quantity end diff --git a/rbi/lib/orb/models/subscription_fetch_schedule_params.rbi b/rbi/lib/orb/models/subscription_fetch_schedule_params.rbi index 04145cdb..927d70f0 100644 --- a/rbi/lib/orb/models/subscription_fetch_schedule_params.rbi +++ b/rbi/lib/orb/models/subscription_fetch_schedule_params.rbi @@ -6,6 +6,8 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters + # Cursor for pagination. This can be populated by the `next_cursor` value returned + # from the initial request. sig { returns(T.nilable(String)) } def cursor end @@ -14,6 +16,7 @@ module Orb def cursor=(_) end + # The number of items to fetch. Defaults to 20. sig { returns(T.nilable(Integer)) } def limit end diff --git a/rbi/lib/orb/models/subscription_fetch_schedule_response.rbi b/rbi/lib/orb/models/subscription_fetch_schedule_response.rbi index 6f656363..a76df9ce 100644 --- a/rbi/lib/orb/models/subscription_fetch_schedule_response.rbi +++ b/rbi/lib/orb/models/subscription_fetch_schedule_response.rbi @@ -73,6 +73,9 @@ module Orb def id=(_) end + # An optional user-defined ID for this plan resource, used throughout the system + # as an alias for this Plan. Use this field to identify a plan by an existing + # identifier in your system. sig { returns(T.nilable(String)) } def external_plan_id end diff --git a/rbi/lib/orb/models/subscription_fetch_usage_params.rbi b/rbi/lib/orb/models/subscription_fetch_usage_params.rbi index 1f2cb60f..908e9b9b 100644 --- a/rbi/lib/orb/models/subscription_fetch_usage_params.rbi +++ b/rbi/lib/orb/models/subscription_fetch_usage_params.rbi @@ -6,6 +6,9 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters + # When specified in conjunction with `group_by`, this parameter filters usage to a + # single billable metric. Note that both `group_by` and `billable_metric_id` must + # be specified together. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -30,6 +33,7 @@ module Orb def first_dimension_value=(_) end + # This determines the windowing of usage reporting. sig { returns(T.nilable(Symbol)) } def granularity end @@ -38,6 +42,7 @@ module Orb def granularity=(_) end + # Groups per-price usage by the key provided. sig { returns(T.nilable(String)) } def group_by end @@ -62,6 +67,7 @@ module Orb def second_dimension_value=(_) end + # Usage returned is exclusive of `timeframe_end`. sig { returns(T.nilable(Time)) } def timeframe_end end @@ -70,6 +76,7 @@ module Orb def timeframe_end=(_) end + # Usage returned is inclusive of `timeframe_start`. sig { returns(T.nilable(Time)) } def timeframe_start end @@ -78,6 +85,10 @@ module Orb def timeframe_start=(_) end + # Controls whether Orb returns cumulative usage since the start of the billing + # period, or incremental day-by-day usage. If your customer has minimums or + # discounts, it's strongly recommended that you use the default cumulative + # behavior. sig { returns(T.nilable(Symbol)) } def view_mode end @@ -138,6 +149,7 @@ module Orb def to_hash end + # This determines the windowing of usage reporting. class Granularity < Orb::Enum abstract! @@ -150,6 +162,10 @@ module Orb end end + # Controls whether Orb returns cumulative usage since the start of the billing + # period, or incremental day-by-day usage. If your customer has minimums or + # discounts, it's strongly recommended that you use the default cumulative + # behavior. class ViewMode < Orb::Enum abstract! diff --git a/rbi/lib/orb/models/subscription_list_params.rbi b/rbi/lib/orb/models/subscription_list_params.rbi index 61478f50..5dd1bed9 100644 --- a/rbi/lib/orb/models/subscription_list_params.rbi +++ b/rbi/lib/orb/models/subscription_list_params.rbi @@ -38,6 +38,8 @@ module Orb def created_at_lte=(_) end + # Cursor for pagination. This can be populated by the `next_cursor` value returned + # from the initial request. sig { returns(T.nilable(String)) } def cursor end @@ -54,14 +56,15 @@ module Orb def customer_id=(_) end - sig { returns(T.nilable(String)) } + sig { returns(T.nilable(T::Array[String])) } def external_customer_id end - sig { params(_: T.nilable(String)).returns(T.nilable(String)) } + sig { params(_: T.nilable(T::Array[String])).returns(T.nilable(T::Array[String])) } def external_customer_id=(_) end + # The number of items to fetch. Defaults to 20. sig { returns(T.nilable(Integer)) } def limit end @@ -86,7 +89,7 @@ module Orb created_at_lte: T.nilable(Time), cursor: T.nilable(String), customer_id: T.nilable(T::Array[String]), - external_customer_id: T.nilable(String), + external_customer_id: T.nilable(T::Array[String]), limit: Integer, status: T.nilable(Symbol), request_options: T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything]) @@ -117,7 +120,7 @@ module Orb created_at_lte: T.nilable(Time), cursor: T.nilable(String), customer_id: T.nilable(T::Array[String]), - external_customer_id: T.nilable(String), + external_customer_id: T.nilable(T::Array[String]), limit: Integer, status: T.nilable(Symbol), request_options: Orb::RequestOptions diff --git a/rbi/lib/orb/models/subscription_price_intervals_params.rbi b/rbi/lib/orb/models/subscription_price_intervals_params.rbi index 75e09b80..89129e6e 100644 --- a/rbi/lib/orb/models/subscription_price_intervals_params.rbi +++ b/rbi/lib/orb/models/subscription_price_intervals_params.rbi @@ -6,6 +6,7 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters + # A list of price intervals to add to the subscription. sig { returns(T.nilable(T::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add])) } def add end @@ -17,6 +18,7 @@ module Orb def add=(_) end + # A list of adjustments to add to the subscription. sig { returns(T.nilable(T::Array[Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment])) } def add_adjustments end @@ -28,6 +30,9 @@ module Orb def add_adjustments=(_) end + # If false, this request will fail if it would void an issued invoice or create a + # credit note. Consider using this as a safety mechanism if you do not expect + # existing invoices to be changed. sig { returns(T.nilable(T::Boolean)) } def allow_invoice_credit_or_void end @@ -36,6 +41,7 @@ module Orb def allow_invoice_credit_or_void=(_) end + # A list of price intervals to edit on the subscription. sig { returns(T.nilable(T::Array[Orb::Models::SubscriptionPriceIntervalsParams::Edit])) } def edit end @@ -47,6 +53,7 @@ module Orb def edit=(_) end + # A list of adjustments to edit on the subscription. sig { returns(T.nilable(T::Array[Orb::Models::SubscriptionPriceIntervalsParams::EditAdjustment])) } def edit_adjustments end @@ -96,6 +103,8 @@ module Orb end class Add < Orb::BaseModel + # The start date of the price interval. This is the date that the price will start + # billing on the subscription. sig { returns(T.any(Time, Symbol)) } def start_date end @@ -104,6 +113,7 @@ module Orb def start_date=(_) end + # The definition of a new allocation price to create and add to the subscription. sig { returns(T.nilable(Orb::Models::SubscriptionPriceIntervalsParams::Add::AllocationPrice)) } def allocation_price end @@ -115,6 +125,7 @@ module Orb def allocation_price=(_) end + # A list of discounts to initialize on the price interval. sig do returns( T.nilable( @@ -158,6 +169,8 @@ module Orb def discounts=(_) end + # The end date of the price interval. This is the date that the price will stop + # billing on the subscription. sig { returns(T.nilable(T.any(Time, Symbol))) } def end_date end @@ -166,6 +179,7 @@ module Orb def end_date=(_) end + # The external price id of the price to add to the subscription. sig { returns(T.nilable(String)) } def external_price_id end @@ -174,6 +188,10 @@ module Orb def external_price_id=(_) end + # An additional filter to apply to usage queries. This filter must be expressed as + # a boolean + # [computed property](/extensibility/advanced-metrics#computed-properties). If + # null, usage queries will not include any additional filter. sig { returns(T.nilable(String)) } def filter end @@ -182,6 +200,7 @@ module Orb def filter=(_) end + # A list of fixed fee quantity transitions to initialize on the price interval. sig do returns( T.nilable(T::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::FixedFeeQuantityTransition]) @@ -201,6 +220,8 @@ module Orb def fixed_fee_quantity_transitions=(_) end + # The maximum amount that will be billed for this price interval for a given + # billing period. sig { returns(T.nilable(Float)) } def maximum_amount end @@ -209,6 +230,8 @@ module Orb def maximum_amount=(_) end + # The minimum amount that will be billed for this price interval for a given + # billing period. sig { returns(T.nilable(Float)) } def minimum_amount end @@ -217,6 +240,7 @@ module Orb def minimum_amount=(_) end + # The definition of a new price to create and add to the subscription. sig do returns( T.nilable( @@ -329,6 +353,7 @@ module Orb def price=(_) end + # The id of the price to add to the subscription. sig { returns(T.nilable(String)) } def price_id end @@ -337,6 +362,12 @@ module Orb def price_id=(_) end + # A list of customer IDs whose usage events will be aggregated and billed under + # this subscription. By default, a subscription only considers usage events + # associated with its attached customer's customer_id. When usage_customer_ids is + # provided, the subscription includes usage events from the specified customers + # only. Provided usage_customer_ids must be either the customer for this + # subscription itself, or any of that customer's children. sig { returns(T.nilable(T::Array[String])) } def usage_customer_ids end @@ -478,17 +509,20 @@ module Orb def to_hash end + # The start date of the price interval. This is the date that the price will start + # billing on the subscription. class StartDate < Orb::Union abstract! class << self - sig { override.returns([[NilClass, Time], [NilClass, Symbol]]) } - private def variants + sig { override.returns([Time, Symbol]) } + def variants end end end class AllocationPrice < Orb::BaseModel + # An amount of the currency to allocate to the customer at the specified cadence. sig { returns(String) } def amount end @@ -497,6 +531,7 @@ module Orb def amount=(_) end + # The cadence at which to allocate the amount to the customer. sig { returns(Symbol) } def cadence end @@ -505,6 +540,8 @@ module Orb def cadence=(_) end + # An ISO 4217 currency string or a custom pricing unit identifier in which to bill + # this price. sig { returns(String) } def currency end @@ -513,6 +550,8 @@ module Orb def currency=(_) end + # Whether the allocated amount should expire at the end of the cadence or roll + # over to the next period. sig { returns(T::Boolean) } def expires_at_end_of_cadence end @@ -521,6 +560,7 @@ module Orb def expires_at_end_of_cadence=(_) end + # The definition of a new allocation price to create and add to the subscription. sig do params(amount: String, cadence: Symbol, currency: String, expires_at_end_of_cadence: T::Boolean) .returns(T.attached_class) @@ -540,6 +580,7 @@ module Orb def to_hash end + # The cadence at which to allocate the amount to the customer. class Cadence < Orb::Enum abstract! @@ -562,6 +603,7 @@ module Orb abstract! class AmountDiscountCreationParams < Orb::BaseModel + # Only available if discount_type is `amount`. sig { returns(Float) } def amount_discount end @@ -596,6 +638,8 @@ module Orb def discount_type=(_) end + # Only available if discount_type is `percentage`. This is a number between 0 + # and 1. sig { returns(Float) } def percentage_discount end @@ -622,6 +666,8 @@ module Orb def discount_type=(_) end + # Only available if discount_type is `usage`. Number of usage units that this + # discount is for. sig { returns(Float) } def usage_discount end @@ -643,25 +689,28 @@ module Orb sig do override .returns( - [[Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Discount::AmountDiscountCreationParams], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Discount::PercentageDiscountCreationParams], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Discount::UsageDiscountCreationParams]] + [Orb::Models::SubscriptionPriceIntervalsParams::Add::Discount::AmountDiscountCreationParams, Orb::Models::SubscriptionPriceIntervalsParams::Add::Discount::PercentageDiscountCreationParams, Orb::Models::SubscriptionPriceIntervalsParams::Add::Discount::UsageDiscountCreationParams] ) end - private def variants + def variants end end end + # The end date of the price interval. This is the date that the price will stop + # billing on the subscription. class EndDate < Orb::Union abstract! class << self - sig { override.returns([[NilClass, Time], [NilClass, Symbol]]) } - private def variants + sig { override.returns([Time, Symbol]) } + def variants end end end class FixedFeeQuantityTransition < Orb::BaseModel + # The date that the fixed fee quantity transition should take effect. sig { returns(Time) } def effective_date end @@ -670,6 +719,7 @@ module Orb def effective_date=(_) end + # The quantity of the fixed fee quantity transition. sig { returns(Integer) } def quantity end @@ -687,10 +737,12 @@ module Orb end end + # The definition of a new price to create and add to the subscription. class Price < Orb::Union abstract! class NewFloatingUnitPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -699,6 +751,7 @@ module Orb def cadence=(_) end + # An ISO 4217 currency string for which this price is billed in. sig { returns(String) } def currency end @@ -707,6 +760,7 @@ module Orb def currency=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -723,6 +777,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -742,6 +797,8 @@ module Orb def unit_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -750,6 +807,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -758,6 +817,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -783,6 +844,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -791,6 +853,7 @@ module Orb def conversion_rate=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -799,6 +862,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -807,6 +872,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -815,6 +881,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -840,6 +908,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -923,6 +994,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -941,6 +1013,7 @@ module Orb end class UnitConfig < Orb::BaseModel + # Rate per unit of usage sig { returns(String) } def unit_amount end @@ -959,6 +1032,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -967,6 +1041,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -975,6 +1050,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -983,6 +1060,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -998,6 +1076,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -1006,6 +1085,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -1014,6 +1094,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -1022,6 +1104,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -1038,6 +1121,7 @@ module Orb end class NewFloatingPackagePrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -1046,6 +1130,7 @@ module Orb def cadence=(_) end + # An ISO 4217 currency string for which this price is billed in. sig { returns(String) } def currency end @@ -1054,6 +1139,7 @@ module Orb def currency=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -1070,6 +1156,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -1091,6 +1178,8 @@ module Orb def package_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -1099,6 +1188,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -1107,6 +1198,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -1132,6 +1225,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -1140,6 +1234,7 @@ module Orb def conversion_rate=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -1148,6 +1243,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -1156,6 +1253,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -1164,6 +1262,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -1189,6 +1289,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -1272,6 +1375,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -1290,6 +1394,7 @@ module Orb end class PackageConfig < Orb::BaseModel + # A currency amount to rate usage by sig { returns(String) } def package_amount end @@ -1298,6 +1403,8 @@ module Orb def package_amount=(_) end + # An integer amount to represent package size. For example, 1000 here would divide + # usage by 1000 before multiplying by package_amount in rating sig { returns(Integer) } def package_size end @@ -1316,6 +1423,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -1324,6 +1432,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -1332,6 +1441,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -1340,6 +1451,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -1355,6 +1467,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -1363,6 +1476,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -1371,6 +1485,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -1379,6 +1495,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -1395,6 +1512,7 @@ module Orb end class NewFloatingMatrixPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -1403,6 +1521,7 @@ module Orb def cadence=(_) end + # An ISO 4217 currency string for which this price is billed in. sig { returns(String) } def currency end @@ -1411,6 +1530,7 @@ module Orb def currency=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -1438,6 +1558,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -1446,6 +1567,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -1454,6 +1577,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -1462,6 +1587,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -1487,6 +1614,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -1495,6 +1623,7 @@ module Orb def conversion_rate=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -1503,6 +1632,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -1511,6 +1642,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -1519,6 +1651,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -1544,6 +1678,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -1627,6 +1764,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -1645,6 +1783,7 @@ module Orb end class MatrixConfig < Orb::BaseModel + # Default per unit rate for any usage not bucketed into a specified matrix_value sig { returns(String) } def default_unit_amount end @@ -1653,6 +1792,7 @@ module Orb def default_unit_amount=(_) end + # One or two event property values to evaluate matrix groups by sig { returns(T::Array[T.nilable(String)]) } def dimensions end @@ -1661,6 +1801,7 @@ module Orb def dimensions=(_) end + # Matrix values for specified matrix grouping keys sig do returns( T::Array[ @@ -1715,6 +1856,9 @@ module Orb end class MatrixValue < Orb::BaseModel + # One or two matrix keys to filter usage to this Matrix value by. For example, + # ["region", "tier"] could be used to filter cloud usage by a cloud region and an + # instance tier. sig { returns(T::Array[T.nilable(String)]) } def dimension_values end @@ -1723,6 +1867,7 @@ module Orb def dimension_values=(_) end + # Unit price for the specified dimension_values sig { returns(String) } def unit_amount end @@ -1747,6 +1892,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -1755,6 +1901,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -1763,6 +1910,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -1771,6 +1920,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -1786,6 +1936,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -1794,6 +1945,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -1802,6 +1954,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -1810,6 +1964,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -1826,6 +1981,7 @@ module Orb end class NewFloatingMatrixWithAllocationPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -1834,6 +1990,7 @@ module Orb def cadence=(_) end + # An ISO 4217 currency string for which this price is billed in. sig { returns(String) } def currency end @@ -1842,6 +1999,7 @@ module Orb def currency=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -1877,6 +2035,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -1885,6 +2044,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -1893,6 +2054,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -1901,6 +2064,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -1926,6 +2091,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -1934,6 +2100,7 @@ module Orb def conversion_rate=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -1942,6 +2109,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -1950,6 +2119,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -1958,6 +2128,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -1983,6 +2155,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -2066,6 +2241,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -2084,6 +2260,7 @@ module Orb end class MatrixWithAllocationConfig < Orb::BaseModel + # Allocation to be used to calculate the price sig { returns(Float) } def allocation end @@ -2092,6 +2269,7 @@ module Orb def allocation=(_) end + # Default per unit rate for any usage not bucketed into a specified matrix_value sig { returns(String) } def default_unit_amount end @@ -2100,6 +2278,7 @@ module Orb def default_unit_amount=(_) end + # One or two event property values to evaluate matrix groups by sig { returns(T::Array[T.nilable(String)]) } def dimensions end @@ -2108,6 +2287,7 @@ module Orb def dimensions=(_) end + # Matrix values for specified matrix grouping keys sig do returns( T::Array[ @@ -2164,6 +2344,9 @@ module Orb end class MatrixValue < Orb::BaseModel + # One or two matrix keys to filter usage to this Matrix value by. For example, + # ["region", "tier"] could be used to filter cloud usage by a cloud region and an + # instance tier. sig { returns(T::Array[T.nilable(String)]) } def dimension_values end @@ -2172,6 +2355,7 @@ module Orb def dimension_values=(_) end + # Unit price for the specified dimension_values sig { returns(String) } def unit_amount end @@ -2196,6 +2380,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -2204,6 +2389,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -2212,6 +2398,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -2220,6 +2408,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -2235,6 +2424,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -2243,6 +2433,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -2251,6 +2442,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -2259,6 +2452,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -2275,6 +2469,7 @@ module Orb end class NewFloatingTieredPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -2283,6 +2478,7 @@ module Orb def cadence=(_) end + # An ISO 4217 currency string for which this price is billed in. sig { returns(String) } def currency end @@ -2291,6 +2487,7 @@ module Orb def currency=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -2307,6 +2504,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -2326,6 +2524,8 @@ module Orb def tiered_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -2334,6 +2534,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -2342,6 +2544,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -2367,6 +2571,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -2375,6 +2580,7 @@ module Orb def conversion_rate=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -2383,6 +2589,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -2391,6 +2599,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -2399,6 +2608,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -2424,6 +2635,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -2507,6 +2721,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -2525,6 +2740,7 @@ module Orb end class TieredConfig < Orb::BaseModel + # Tiers for rating based on total usage quantities into the specified tier sig do returns( T::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice::TieredConfig::Tier] @@ -2565,6 +2781,7 @@ module Orb end class Tier < Orb::BaseModel + # Inclusive tier starting value sig { returns(Float) } def first_unit end @@ -2573,6 +2790,7 @@ module Orb def first_unit=(_) end + # Amount per unit sig { returns(String) } def unit_amount end @@ -2581,6 +2799,7 @@ module Orb def unit_amount=(_) end + # Exclusive tier ending value. If null, this is treated as the last tier sig { returns(T.nilable(Float)) } def last_unit end @@ -2608,6 +2827,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -2616,6 +2836,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -2624,6 +2845,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -2632,6 +2855,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -2647,6 +2871,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -2655,6 +2880,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -2663,6 +2889,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -2671,6 +2899,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -2687,6 +2916,7 @@ module Orb end class NewFloatingTieredBpsPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -2695,6 +2925,7 @@ module Orb def cadence=(_) end + # An ISO 4217 currency string for which this price is billed in. sig { returns(String) } def currency end @@ -2703,6 +2934,7 @@ module Orb def currency=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -2719,6 +2951,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -2746,6 +2979,8 @@ module Orb def tiered_bps_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -2754,6 +2989,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -2762,6 +2999,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -2787,6 +3026,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -2795,6 +3035,7 @@ module Orb def conversion_rate=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -2803,6 +3044,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -2811,6 +3054,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -2819,6 +3063,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -2844,6 +3090,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -2927,6 +3176,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -2945,6 +3195,8 @@ module Orb end class TieredBpsConfig < Orb::BaseModel + # Tiers for a Graduated BPS pricing model, where usage is bucketed into specified + # tiers sig do returns( T::Array[ @@ -2995,6 +3247,7 @@ module Orb end class Tier < Orb::BaseModel + # Per-event basis point rate sig { returns(Float) } def bps end @@ -3003,6 +3256,7 @@ module Orb def bps=(_) end + # Inclusive tier starting value sig { returns(String) } def minimum_amount end @@ -3011,6 +3265,7 @@ module Orb def minimum_amount=(_) end + # Exclusive tier ending value sig { returns(T.nilable(String)) } def maximum_amount end @@ -3019,6 +3274,7 @@ module Orb def maximum_amount=(_) end + # Per unit maximum to charge sig { returns(T.nilable(String)) } def per_unit_maximum end @@ -3056,6 +3312,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -3064,6 +3321,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -3072,6 +3330,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -3080,6 +3340,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -3095,6 +3356,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -3103,6 +3365,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -3111,6 +3374,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -3119,6 +3384,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -3146,6 +3412,7 @@ module Orb def bps_config=(_) end + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -3154,6 +3421,7 @@ module Orb def cadence=(_) end + # An ISO 4217 currency string for which this price is billed in. sig { returns(String) } def currency end @@ -3162,6 +3430,7 @@ module Orb def currency=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -3178,6 +3447,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -3186,6 +3456,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -3194,6 +3466,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -3202,6 +3476,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -3227,6 +3503,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -3235,6 +3512,7 @@ module Orb def conversion_rate=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -3243,6 +3521,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -3251,6 +3531,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -3259,6 +3540,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -3284,6 +3567,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -3368,6 +3654,7 @@ module Orb end class BpsConfig < Orb::BaseModel + # Basis point take rate per event sig { returns(Float) } def bps end @@ -3376,6 +3663,7 @@ module Orb def bps=(_) end + # Optional currency amount maximum to cap spend per event sig { returns(T.nilable(String)) } def per_unit_maximum end @@ -3393,6 +3681,7 @@ module Orb end end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -3411,6 +3700,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -3419,6 +3709,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -3427,6 +3718,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -3435,6 +3728,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -3450,6 +3744,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -3458,6 +3753,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -3466,6 +3762,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -3474,6 +3772,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -3503,6 +3802,7 @@ module Orb def bulk_bps_config=(_) end + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -3511,6 +3811,7 @@ module Orb def cadence=(_) end + # An ISO 4217 currency string for which this price is billed in. sig { returns(String) } def currency end @@ -3519,6 +3820,7 @@ module Orb def currency=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -3535,6 +3837,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -3543,6 +3846,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -3551,6 +3856,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -3559,6 +3866,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -3584,6 +3893,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -3592,6 +3902,7 @@ module Orb def conversion_rate=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -3600,6 +3911,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -3608,6 +3921,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -3616,6 +3930,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -3641,6 +3957,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -3725,6 +4044,8 @@ module Orb end class BulkBpsConfig < Orb::BaseModel + # Tiers for a bulk BPS pricing model where all usage is aggregated to a single + # tier based on total volume sig do returns( T::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice::BulkBpsConfig::Tier] @@ -3765,6 +4086,7 @@ module Orb end class Tier < Orb::BaseModel + # Basis points to rate on sig { returns(Float) } def bps end @@ -3773,6 +4095,7 @@ module Orb def bps=(_) end + # Upper bound for tier sig { returns(T.nilable(String)) } def maximum_amount end @@ -3781,6 +4104,7 @@ module Orb def maximum_amount=(_) end + # The maximum amount to charge for any one event sig { returns(T.nilable(String)) } def per_unit_maximum end @@ -3810,6 +4134,7 @@ module Orb end end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -3828,6 +4153,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -3836,6 +4162,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -3844,6 +4171,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -3852,6 +4181,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -3867,6 +4197,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -3875,6 +4206,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -3883,6 +4215,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -3891,6 +4225,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -3918,6 +4253,7 @@ module Orb def bulk_config=(_) end + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -3926,6 +4262,7 @@ module Orb def cadence=(_) end + # An ISO 4217 currency string for which this price is billed in. sig { returns(String) } def currency end @@ -3934,6 +4271,7 @@ module Orb def currency=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -3950,6 +4288,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -3958,6 +4297,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -3966,6 +4307,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -3974,6 +4317,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -3999,6 +4344,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -4007,6 +4353,7 @@ module Orb def conversion_rate=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -4015,6 +4362,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -4023,6 +4372,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -4031,6 +4381,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -4056,6 +4408,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -4140,6 +4495,7 @@ module Orb end class BulkConfig < Orb::BaseModel + # Bulk tiers for rating based on total usage volume sig do returns( T::Array[Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice::BulkConfig::Tier] @@ -4180,6 +4536,7 @@ module Orb end class Tier < Orb::BaseModel + # Amount per unit sig { returns(String) } def unit_amount end @@ -4188,6 +4545,7 @@ module Orb def unit_amount=(_) end + # Upper bound for this tier sig { returns(T.nilable(Float)) } def maximum_units end @@ -4206,6 +4564,7 @@ module Orb end end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -4224,6 +4583,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -4232,6 +4592,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -4240,6 +4601,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -4248,6 +4611,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -4263,6 +4627,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -4271,6 +4636,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -4279,6 +4645,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -4287,6 +4655,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -4303,6 +4672,7 @@ module Orb end class NewFloatingThresholdTotalAmountPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -4311,6 +4681,7 @@ module Orb def cadence=(_) end + # An ISO 4217 currency string for which this price is billed in. sig { returns(String) } def currency end @@ -4319,6 +4690,7 @@ module Orb def currency=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -4335,6 +4707,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -4351,6 +4724,8 @@ module Orb def threshold_total_amount_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -4359,6 +4734,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -4367,6 +4744,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -4392,6 +4771,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -4400,6 +4780,7 @@ module Orb def conversion_rate=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -4408,6 +4789,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -4416,6 +4799,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -4424,6 +4808,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -4449,6 +4835,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -4532,6 +4921,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -4550,6 +4940,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -4558,6 +4949,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -4566,6 +4958,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -4574,6 +4968,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -4589,6 +4984,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -4597,6 +4993,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -4605,6 +5002,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -4613,6 +5012,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -4629,6 +5029,7 @@ module Orb end class NewFloatingTieredPackagePrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -4637,6 +5038,7 @@ module Orb def cadence=(_) end + # An ISO 4217 currency string for which this price is billed in. sig { returns(String) } def currency end @@ -4645,6 +5047,7 @@ module Orb def currency=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -4661,6 +5064,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -4677,6 +5081,8 @@ module Orb def tiered_package_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -4685,6 +5091,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -4693,6 +5101,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -4718,6 +5128,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -4726,6 +5137,7 @@ module Orb def conversion_rate=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -4734,6 +5146,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -4742,6 +5156,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -4750,6 +5165,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -4775,6 +5192,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -4858,6 +5278,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -4876,6 +5297,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -4884,6 +5306,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -4892,6 +5315,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -4900,6 +5325,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -4915,6 +5341,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -4923,6 +5350,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -4931,6 +5359,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -4939,6 +5369,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -4955,6 +5386,7 @@ module Orb end class NewFloatingGroupedTieredPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -4963,6 +5395,7 @@ module Orb def cadence=(_) end + # An ISO 4217 currency string for which this price is billed in. sig { returns(String) } def currency end @@ -4979,6 +5412,7 @@ module Orb def grouped_tiered_config=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -4995,6 +5429,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -5003,6 +5438,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -5011,6 +5448,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -5019,6 +5458,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -5044,6 +5485,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -5052,6 +5494,7 @@ module Orb def conversion_rate=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -5060,6 +5503,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -5068,6 +5513,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -5076,6 +5522,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -5101,6 +5549,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -5184,6 +5635,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -5202,6 +5654,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -5210,6 +5663,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -5218,6 +5672,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -5226,6 +5682,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -5241,6 +5698,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -5249,6 +5707,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -5257,6 +5716,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -5265,6 +5726,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -5281,6 +5743,7 @@ module Orb end class NewFloatingMaxGroupTieredPackagePrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -5289,6 +5752,7 @@ module Orb def cadence=(_) end + # An ISO 4217 currency string for which this price is billed in. sig { returns(String) } def currency end @@ -5297,6 +5761,7 @@ module Orb def currency=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -5321,6 +5786,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -5329,6 +5795,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -5337,6 +5805,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -5345,6 +5815,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -5370,6 +5842,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -5378,6 +5851,7 @@ module Orb def conversion_rate=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -5386,6 +5860,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -5394,6 +5870,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -5402,6 +5879,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -5427,6 +5906,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -5510,6 +5992,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -5528,6 +6011,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -5536,6 +6020,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -5544,6 +6029,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -5552,6 +6039,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -5567,6 +6055,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -5575,6 +6064,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -5583,6 +6073,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -5591,6 +6083,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -5607,6 +6100,7 @@ module Orb end class NewFloatingTieredWithMinimumPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -5615,6 +6109,7 @@ module Orb def cadence=(_) end + # An ISO 4217 currency string for which this price is billed in. sig { returns(String) } def currency end @@ -5623,6 +6118,7 @@ module Orb def currency=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -5639,6 +6135,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -5655,6 +6152,8 @@ module Orb def tiered_with_minimum_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -5663,6 +6162,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -5671,6 +6172,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -5696,6 +6199,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -5704,6 +6208,7 @@ module Orb def conversion_rate=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -5712,6 +6217,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -5720,6 +6227,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -5728,6 +6236,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -5753,6 +6263,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -5836,6 +6349,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -5854,6 +6368,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -5862,6 +6377,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -5870,6 +6386,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -5878,6 +6396,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -5893,6 +6412,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -5901,6 +6421,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -5909,6 +6430,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -5917,6 +6440,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -5933,6 +6457,7 @@ module Orb end class NewFloatingPackageWithAllocationPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -5941,6 +6466,7 @@ module Orb def cadence=(_) end + # An ISO 4217 currency string for which this price is billed in. sig { returns(String) } def currency end @@ -5949,6 +6475,7 @@ module Orb def currency=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -5965,6 +6492,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -5981,6 +6509,8 @@ module Orb def package_with_allocation_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -5989,6 +6519,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -5997,6 +6529,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -6022,6 +6556,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -6030,6 +6565,7 @@ module Orb def conversion_rate=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -6038,6 +6574,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -6046,6 +6584,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -6054,6 +6593,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -6079,6 +6620,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -6162,6 +6706,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -6180,6 +6725,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -6188,6 +6734,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -6196,6 +6743,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -6204,6 +6753,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -6219,6 +6769,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -6227,6 +6778,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -6235,6 +6787,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -6243,6 +6797,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -6259,6 +6814,7 @@ module Orb end class NewFloatingTieredPackageWithMinimumPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -6267,6 +6823,7 @@ module Orb def cadence=(_) end + # An ISO 4217 currency string for which this price is billed in. sig { returns(String) } def currency end @@ -6275,6 +6832,7 @@ module Orb def currency=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -6291,6 +6849,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -6307,6 +6866,8 @@ module Orb def tiered_package_with_minimum_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -6315,6 +6876,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -6323,6 +6886,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -6348,6 +6913,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -6356,6 +6922,7 @@ module Orb def conversion_rate=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -6364,6 +6931,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -6372,6 +6941,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -6380,6 +6950,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -6405,6 +6977,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -6488,6 +7063,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -6506,6 +7082,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -6514,6 +7091,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -6522,6 +7100,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -6530,6 +7110,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -6545,6 +7126,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -6553,6 +7135,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -6561,6 +7144,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -6569,6 +7154,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -6585,6 +7171,7 @@ module Orb end class NewFloatingUnitWithPercentPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -6593,6 +7180,7 @@ module Orb def cadence=(_) end + # An ISO 4217 currency string for which this price is billed in. sig { returns(String) } def currency end @@ -6601,6 +7189,7 @@ module Orb def currency=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -6617,6 +7206,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -6633,6 +7223,8 @@ module Orb def unit_with_percent_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -6641,6 +7233,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -6649,6 +7243,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -6674,6 +7270,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -6682,6 +7279,7 @@ module Orb def conversion_rate=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -6690,6 +7288,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -6698,6 +7298,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -6706,6 +7307,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -6731,6 +7334,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -6814,6 +7420,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -6832,6 +7439,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -6840,6 +7448,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -6848,6 +7457,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -6856,6 +7467,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -6871,6 +7483,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -6879,6 +7492,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -6887,6 +7501,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -6895,6 +7511,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -6911,6 +7528,7 @@ module Orb end class NewFloatingTieredWithProrationPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -6919,6 +7537,7 @@ module Orb def cadence=(_) end + # An ISO 4217 currency string for which this price is billed in. sig { returns(String) } def currency end @@ -6927,6 +7546,7 @@ module Orb def currency=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -6943,6 +7563,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -6959,6 +7580,8 @@ module Orb def tiered_with_proration_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -6967,6 +7590,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -6975,6 +7600,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -7000,6 +7627,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -7008,6 +7636,7 @@ module Orb def conversion_rate=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -7016,6 +7645,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -7024,6 +7655,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -7032,6 +7664,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -7057,6 +7691,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -7140,6 +7777,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -7158,6 +7796,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -7166,6 +7805,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -7174,6 +7814,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -7182,6 +7824,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -7197,6 +7840,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -7205,6 +7849,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -7213,6 +7858,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -7221,6 +7868,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -7237,6 +7885,7 @@ module Orb end class NewFloatingUnitWithProrationPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -7245,6 +7894,7 @@ module Orb def cadence=(_) end + # An ISO 4217 currency string for which this price is billed in. sig { returns(String) } def currency end @@ -7253,6 +7903,7 @@ module Orb def currency=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -7269,6 +7920,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -7285,6 +7937,8 @@ module Orb def unit_with_proration_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -7293,6 +7947,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -7301,6 +7957,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -7326,6 +7984,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -7334,6 +7993,7 @@ module Orb def conversion_rate=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -7342,6 +8002,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -7350,6 +8012,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -7358,6 +8021,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -7383,6 +8048,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -7466,6 +8134,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -7484,6 +8153,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -7492,6 +8162,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -7500,6 +8171,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -7508,6 +8181,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -7523,6 +8197,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -7531,6 +8206,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -7539,6 +8215,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -7547,6 +8225,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -7563,6 +8242,7 @@ module Orb end class NewFloatingGroupedAllocationPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -7571,6 +8251,7 @@ module Orb def cadence=(_) end + # An ISO 4217 currency string for which this price is billed in. sig { returns(String) } def currency end @@ -7587,6 +8268,7 @@ module Orb def grouped_allocation_config=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -7603,6 +8285,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -7611,6 +8294,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -7619,6 +8304,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -7627,6 +8314,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -7652,6 +8341,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -7660,6 +8350,7 @@ module Orb def conversion_rate=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -7668,6 +8359,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -7676,6 +8369,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -7684,6 +8378,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -7709,6 +8405,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -7792,6 +8491,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -7810,6 +8510,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -7818,6 +8519,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -7826,6 +8528,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -7834,6 +8538,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -7849,6 +8554,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -7857,6 +8563,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -7865,6 +8572,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -7873,6 +8582,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -7889,6 +8599,7 @@ module Orb end class NewFloatingGroupedWithProratedMinimumPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -7897,6 +8608,7 @@ module Orb def cadence=(_) end + # An ISO 4217 currency string for which this price is billed in. sig { returns(String) } def currency end @@ -7913,6 +8625,7 @@ module Orb def grouped_with_prorated_minimum_config=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -7929,6 +8642,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -7937,6 +8651,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -7945,6 +8661,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -7953,6 +8671,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -7978,6 +8698,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -7986,6 +8707,7 @@ module Orb def conversion_rate=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -7994,6 +8716,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -8002,6 +8726,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -8010,6 +8735,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -8035,6 +8762,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -8118,6 +8848,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -8136,6 +8867,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -8144,6 +8876,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -8152,6 +8885,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -8160,6 +8895,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -8175,6 +8911,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -8183,6 +8920,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -8191,6 +8929,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -8199,6 +8939,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -8215,6 +8956,7 @@ module Orb end class NewFloatingGroupedWithMeteredMinimumPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -8223,6 +8965,7 @@ module Orb def cadence=(_) end + # An ISO 4217 currency string for which this price is billed in. sig { returns(String) } def currency end @@ -8239,6 +8982,7 @@ module Orb def grouped_with_metered_minimum_config=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -8255,6 +8999,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -8263,6 +9008,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -8271,6 +9018,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -8279,6 +9028,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -8304,6 +9055,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -8312,6 +9064,7 @@ module Orb def conversion_rate=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -8320,6 +9073,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -8328,6 +9083,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -8336,6 +9092,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -8361,6 +9119,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -8444,6 +9205,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -8462,6 +9224,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -8470,6 +9233,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -8478,6 +9242,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -8486,6 +9252,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -8501,6 +9268,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -8509,6 +9277,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -8517,6 +9286,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -8525,6 +9296,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -8541,6 +9313,7 @@ module Orb end class NewFloatingMatrixWithDisplayNamePrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -8549,6 +9322,7 @@ module Orb def cadence=(_) end + # An ISO 4217 currency string for which this price is billed in. sig { returns(String) } def currency end @@ -8557,6 +9331,7 @@ module Orb def currency=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -8581,6 +9356,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -8589,6 +9365,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -8597,6 +9375,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -8605,6 +9385,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -8630,6 +9412,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -8638,6 +9421,7 @@ module Orb def conversion_rate=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -8646,6 +9430,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -8654,6 +9440,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -8662,6 +9449,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -8687,6 +9476,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -8770,6 +9562,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -8788,6 +9581,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -8796,6 +9590,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -8804,6 +9599,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -8812,6 +9609,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -8827,6 +9625,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -8835,6 +9634,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -8843,6 +9643,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -8851,6 +9653,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -8875,6 +9678,7 @@ module Orb def bulk_with_proration_config=(_) end + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -8883,6 +9687,7 @@ module Orb def cadence=(_) end + # An ISO 4217 currency string for which this price is billed in. sig { returns(String) } def currency end @@ -8891,6 +9696,7 @@ module Orb def currency=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -8907,6 +9713,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -8915,6 +9722,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -8923,6 +9732,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -8931,6 +9742,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -8956,6 +9769,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -8964,6 +9778,7 @@ module Orb def conversion_rate=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -8972,6 +9787,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -8980,6 +9797,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -8988,6 +9806,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -9013,6 +9833,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -9096,6 +9919,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -9114,6 +9938,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -9122,6 +9947,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -9130,6 +9956,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -9138,6 +9966,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -9153,6 +9982,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -9161,6 +9991,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -9169,6 +10000,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -9177,6 +10010,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -9193,6 +10027,7 @@ module Orb end class NewFloatingGroupedTieredPackagePrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -9201,6 +10036,7 @@ module Orb def cadence=(_) end + # An ISO 4217 currency string for which this price is billed in. sig { returns(String) } def currency end @@ -9217,6 +10053,7 @@ module Orb def grouped_tiered_package_config=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -9233,6 +10070,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -9241,6 +10079,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -9249,6 +10089,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -9257,6 +10099,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -9282,6 +10126,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -9290,6 +10135,7 @@ module Orb def conversion_rate=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -9298,6 +10144,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -9306,6 +10154,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -9314,6 +10163,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -9339,6 +10190,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -9422,6 +10276,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -9440,6 +10295,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -9448,6 +10304,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -9456,6 +10313,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -9464,6 +10323,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -9479,6 +10339,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -9487,6 +10348,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -9495,6 +10357,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -9503,6 +10367,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -9519,6 +10384,7 @@ module Orb end class NewFloatingScalableMatrixWithUnitPricingPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -9527,6 +10393,7 @@ module Orb def cadence=(_) end + # An ISO 4217 currency string for which this price is billed in. sig { returns(String) } def currency end @@ -9535,6 +10402,7 @@ module Orb def currency=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -9551,6 +10419,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -9567,6 +10436,8 @@ module Orb def scalable_matrix_with_unit_pricing_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -9575,6 +10446,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -9583,6 +10456,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -9608,6 +10483,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -9616,6 +10492,7 @@ module Orb def conversion_rate=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -9624,6 +10501,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -9632,6 +10511,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -9640,6 +10520,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -9665,6 +10547,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -9748,6 +10633,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -9766,6 +10652,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -9774,6 +10661,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -9782,6 +10670,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -9790,6 +10680,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -9805,6 +10696,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -9813,6 +10705,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -9821,6 +10714,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -9829,6 +10724,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -9845,6 +10741,7 @@ module Orb end class NewFloatingScalableMatrixWithTieredPricingPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -9853,6 +10750,7 @@ module Orb def cadence=(_) end + # An ISO 4217 currency string for which this price is billed in. sig { returns(String) } def currency end @@ -9861,6 +10759,7 @@ module Orb def currency=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -9877,6 +10776,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -9893,6 +10793,8 @@ module Orb def scalable_matrix_with_tiered_pricing_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -9901,6 +10803,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -9909,6 +10813,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -9934,6 +10840,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -9942,6 +10849,7 @@ module Orb def conversion_rate=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -9950,6 +10858,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -9958,6 +10868,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -9966,6 +10877,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -9991,6 +10904,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -10074,6 +10990,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -10092,6 +11009,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -10100,6 +11018,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -10108,6 +11027,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -10116,6 +11037,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -10131,6 +11053,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -10139,6 +11062,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -10147,6 +11071,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -10155,6 +11081,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -10171,6 +11098,7 @@ module Orb end class NewFloatingCumulativeGroupedBulkPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -10187,6 +11115,7 @@ module Orb def cumulative_grouped_bulk_config=(_) end + # An ISO 4217 currency string for which this price is billed in. sig { returns(String) } def currency end @@ -10195,6 +11124,7 @@ module Orb def currency=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -10211,6 +11141,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -10219,6 +11150,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -10227,6 +11160,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -10235,6 +11170,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -10260,6 +11197,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -10268,6 +11206,7 @@ module Orb def conversion_rate=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -10276,6 +11215,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -10284,6 +11225,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -10292,6 +11234,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -10317,6 +11261,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -10400,6 +11347,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -10418,6 +11366,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -10426,6 +11375,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -10434,6 +11384,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -10442,6 +11394,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -10457,6 +11410,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -10465,6 +11419,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -10473,6 +11428,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -10481,6 +11438,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -10500,16 +11458,17 @@ module Orb sig do override .returns( - [[Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice]] + [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice] ) end - private def variants + def variants end end end end class AddAdjustment < Orb::BaseModel + # The definition of a new adjustment to create and add to the subscription. sig do returns( T.any( @@ -10547,6 +11506,10 @@ module Orb def adjustment=(_) end + # The start date of the adjustment interval. This is the date that the adjustment + # will start affecting prices on the subscription. The adjustment will apply to + # invoice dates that overlap with this `start_date`. This `start_date` is treated + # as inclusive for in-advance prices, and exclusive for in-arrears prices. sig { returns(T.any(Time, Symbol)) } def start_date end @@ -10555,6 +11518,10 @@ module Orb def start_date=(_) end + # The end date of the adjustment interval. This is the date that the adjustment + # will stop affecting prices on the subscription. The adjustment will apply to + # invoice dates that overlap with this `end_date`.This `end_date` is treated as + # exclusive for in-advance prices, and inclusive for in-arrears prices. sig { returns(T.nilable(T.any(Time, Symbol))) } def end_date end @@ -10599,6 +11566,7 @@ module Orb def to_hash end + # The definition of a new adjustment to create and add to the subscription. class Adjustment < Orb::Union abstract! @@ -10611,6 +11579,7 @@ module Orb def adjustment_type=(_) end + # The set of price IDs to which this adjustment applies. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -10627,6 +11596,8 @@ module Orb def percentage_discount=(_) end + # When false, this adjustment will be applied to a single price. Otherwise, it + # will be applied at the invoice level, possibly to multiple prices. sig { returns(T.nilable(T::Boolean)) } def is_invoice_level end @@ -10671,6 +11642,7 @@ module Orb def adjustment_type=(_) end + # The set of price IDs to which this adjustment applies. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -10687,6 +11659,8 @@ module Orb def usage_discount=(_) end + # When false, this adjustment will be applied to a single price. Otherwise, it + # will be applied at the invoice level, possibly to multiple prices. sig { returns(T.nilable(T::Boolean)) } def is_invoice_level end @@ -10739,6 +11713,7 @@ module Orb def amount_discount=(_) end + # The set of price IDs to which this adjustment applies. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -10747,6 +11722,8 @@ module Orb def applies_to_price_ids=(_) end + # When false, this adjustment will be applied to a single price. Otherwise, it + # will be applied at the invoice level, possibly to multiple prices. sig { returns(T.nilable(T::Boolean)) } def is_invoice_level end @@ -10791,6 +11768,7 @@ module Orb def adjustment_type=(_) end + # The set of price IDs to which this adjustment applies. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -10799,6 +11777,7 @@ module Orb def applies_to_price_ids=(_) end + # The item ID that revenue from this minimum will be attributed to. sig { returns(String) } def item_id end @@ -10815,6 +11794,8 @@ module Orb def minimum_amount=(_) end + # When false, this adjustment will be applied to a single price. Otherwise, it + # will be applied at the invoice level, possibly to multiple prices. sig { returns(T.nilable(T::Boolean)) } def is_invoice_level end @@ -10861,6 +11842,7 @@ module Orb def adjustment_type=(_) end + # The set of price IDs to which this adjustment applies. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -10877,6 +11859,8 @@ module Orb def maximum_amount=(_) end + # When false, this adjustment will be applied to a single price. Otherwise, it + # will be applied at the invoice level, possibly to multiple prices. sig { returns(T.nilable(T::Boolean)) } def is_invoice_level end @@ -10916,36 +11900,45 @@ module Orb sig do override .returns( - [[Symbol, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewPercentageDiscount], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewUsageDiscount], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewAmountDiscount], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewMinimum], [Symbol, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewMaximum]] + [Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewPercentageDiscount, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewUsageDiscount, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewAmountDiscount, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewMinimum, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewMaximum] ) end - private def variants + def variants end end end + # The start date of the adjustment interval. This is the date that the adjustment + # will start affecting prices on the subscription. The adjustment will apply to + # invoice dates that overlap with this `start_date`. This `start_date` is treated + # as inclusive for in-advance prices, and exclusive for in-arrears prices. class StartDate < Orb::Union abstract! class << self - sig { override.returns([[NilClass, Time], [NilClass, Symbol]]) } - private def variants + sig { override.returns([Time, Symbol]) } + def variants end end end + # The end date of the adjustment interval. This is the date that the adjustment + # will stop affecting prices on the subscription. The adjustment will apply to + # invoice dates that overlap with this `end_date`.This `end_date` is treated as + # exclusive for in-advance prices, and inclusive for in-arrears prices. class EndDate < Orb::Union abstract! class << self - sig { override.returns([[NilClass, Time], [NilClass, Symbol]]) } - private def variants + sig { override.returns([Time, Symbol]) } + def variants end end end end class Edit < Orb::BaseModel + # The id of the price interval to edit. sig { returns(String) } def price_interval_id end @@ -10954,6 +11947,9 @@ module Orb def price_interval_id=(_) end + # The updated billing cycle day for this price interval. If not specified, the + # billing cycle day will not be updated. Note that overlapping price intervals + # must have the same billing cycle day. sig { returns(T.nilable(Integer)) } def billing_cycle_day end @@ -10962,6 +11958,8 @@ module Orb def billing_cycle_day=(_) end + # The updated end date of this price interval. If not specified, the start date + # will not be updated. sig { returns(T.nilable(T.any(Time, Symbol))) } def end_date end @@ -10970,6 +11968,10 @@ module Orb def end_date=(_) end + # An additional filter to apply to usage queries. This filter must be expressed as + # a boolean + # [computed property](/extensibility/advanced-metrics#computed-properties). If + # null, usage queries will not include any additional filter. sig { returns(T.nilable(String)) } def filter end @@ -10978,6 +11980,9 @@ module Orb def filter=(_) end + # A list of fixed fee quantity transitions to use for this price interval. Note + # that this list will overwrite all existing fixed fee quantity transitions on the + # price interval. sig do returns( T.nilable(T::Array[Orb::Models::SubscriptionPriceIntervalsParams::Edit::FixedFeeQuantityTransition]) @@ -10997,6 +12002,8 @@ module Orb def fixed_fee_quantity_transitions=(_) end + # The updated start date of this price interval. If not specified, the start date + # will not be updated. sig { returns(T.nilable(T.any(Time, Symbol))) } def start_date end @@ -11005,6 +12012,12 @@ module Orb def start_date=(_) end + # A list of customer IDs whose usage events will be aggregated and billed under + # this subscription. By default, a subscription only considers usage events + # associated with its attached customer's customer_id. When usage_customer_ids is + # provided, the subscription includes usage events from the specified customers + # only. Provided usage_customer_ids must be either the customer for this + # subscription itself, or any of that customer's children. sig { returns(T.nilable(T::Array[String])) } def usage_customer_ids end @@ -11053,17 +12066,20 @@ module Orb def to_hash end + # The updated end date of this price interval. If not specified, the start date + # will not be updated. class EndDate < Orb::Union abstract! class << self - sig { override.returns([[NilClass, Time], [NilClass, Symbol]]) } - private def variants + sig { override.returns([Time, Symbol]) } + def variants end end end class FixedFeeQuantityTransition < Orb::BaseModel + # The date that the fixed fee quantity transition should take effect. sig { returns(Time) } def effective_date end @@ -11072,6 +12088,7 @@ module Orb def effective_date=(_) end + # The quantity of the fixed fee quantity transition. sig { returns(Integer) } def quantity end @@ -11089,18 +12106,21 @@ module Orb end end + # The updated start date of this price interval. If not specified, the start date + # will not be updated. class StartDate < Orb::Union abstract! class << self - sig { override.returns([[NilClass, Time], [NilClass, Symbol]]) } - private def variants + sig { override.returns([Time, Symbol]) } + def variants end end end end class EditAdjustment < Orb::BaseModel + # The id of the adjustment interval to edit. sig { returns(String) } def adjustment_interval_id end @@ -11109,6 +12129,8 @@ module Orb def adjustment_interval_id=(_) end + # The updated end date of this adjustment interval. If not specified, the start + # date will not be updated. sig { returns(T.nilable(T.any(Time, Symbol))) } def end_date end @@ -11117,6 +12139,8 @@ module Orb def end_date=(_) end + # The updated start date of this adjustment interval. If not specified, the start + # date will not be updated. sig { returns(T.nilable(T.any(Time, Symbol))) } def start_date end @@ -11149,22 +12173,26 @@ module Orb def to_hash end + # The updated end date of this adjustment interval. If not specified, the start + # date will not be updated. class EndDate < Orb::Union abstract! class << self - sig { override.returns([[NilClass, Time], [NilClass, Symbol]]) } - private def variants + sig { override.returns([Time, Symbol]) } + def variants end end end + # The updated start date of this adjustment interval. If not specified, the start + # date will not be updated. class StartDate < Orb::Union abstract! class << self - sig { override.returns([[NilClass, Time], [NilClass, Symbol]]) } - private def variants + sig { override.returns([Time, Symbol]) } + def variants end end end diff --git a/rbi/lib/orb/models/subscription_price_intervals_response.rbi b/rbi/lib/orb/models/subscription_price_intervals_response.rbi index 10bf8b48..00c13926 100644 --- a/rbi/lib/orb/models/subscription_price_intervals_response.rbi +++ b/rbi/lib/orb/models/subscription_price_intervals_response.rbi @@ -11,6 +11,8 @@ module Orb def id=(_) end + # The current plan phase that is active, only if the subscription's plan has + # phases. sig { returns(T.nilable(Integer)) } def active_plan_phase_order end @@ -19,6 +21,8 @@ module Orb def active_plan_phase_order=(_) end + # The adjustment intervals for this subscription sorted by the start_date of the + # adjustment interval. sig { returns(T::Array[Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval]) } def adjustment_intervals end @@ -30,6 +34,9 @@ module Orb def adjustment_intervals=(_) end + # Determines whether issued invoices for this subscription will automatically be + # charged with the saved payment method on the due date. This property defaults to + # the plan's behavior. If null, defaults to the customer's setting. sig { returns(T.nilable(T::Boolean)) } def auto_collection end @@ -49,6 +56,10 @@ module Orb def billing_cycle_anchor_configuration=(_) end + # The day of the month on which the billing cycle is anchored. If the maximum + # number of days in a month is greater than this value, the last day of the month + # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing + # period begins on the 30th. sig { returns(Integer) } def billing_cycle_day end @@ -65,6 +76,9 @@ module Orb def created_at=(_) end + # The end of the current billing period. This is an exclusive timestamp, such that + # the instant returned is not part of the billing period. Set to null for + # subscriptions that are not currently active. sig { returns(T.nilable(Time)) } def current_billing_period_end_date end @@ -73,6 +87,9 @@ module Orb def current_billing_period_end_date=(_) end + # The start date of the current billing period. This is an inclusive timestamp; + # the instant returned is exactly the beginning of the billing period. Set to null + # if the subscription is not currently active. sig { returns(T.nilable(Time)) } def current_billing_period_start_date end @@ -81,6 +98,24 @@ module Orb def current_billing_period_start_date=(_) end + # A customer is a buyer of your products, and the other party to the billing + # relationship. + # + # In Orb, customers are assigned system generated identifiers automatically, but + # it's often desirable to have these match existing identifiers in your system. To + # avoid having to denormalize Orb ID information, you can pass in an + # `external_customer_id` with your own identifier. See + # [Customer ID Aliases](/events-and-metrics/customer-aliases) for further + # information about how these aliases work in Orb. + # + # In addition to having an identifier in your system, a customer may exist in a + # payment provider solution like Stripe. Use the `payment_provider_id` and the + # `payment_provider` enum field to express this mapping. + # + # A customer also has a timezone (from the standard + # [IANA timezone database](https://www.iana.org/time-zones)), which defaults to + # your account's timezone. See [Timezone localization](/essentials/timezones) for + # information on what this timezone parameter influences within Orb. sig { returns(Orb::Models::Customer) } def customer end @@ -89,6 +124,8 @@ module Orb def customer=(_) end + # Determines the default memo on this subscriptions' invoices. Note that if this + # is not provided, it is determined by the plan configuration. sig { returns(T.nilable(String)) } def default_invoice_memo end @@ -97,6 +134,7 @@ module Orb def default_invoice_memo=(_) end + # The discount intervals for this subscription sorted by the start_date. sig do returns( T::Array[ @@ -134,6 +172,7 @@ module Orb def discount_intervals=(_) end + # The date Orb stops billing for this subscription. sig { returns(T.nilable(Time)) } def end_date end @@ -161,6 +200,7 @@ module Orb def invoicing_threshold=(_) end + # The maximum intervals for this subscription sorted by the start_date. sig { returns(T::Array[Orb::Models::SubscriptionPriceIntervalsResponse::MaximumInterval]) } def maximum_intervals end @@ -172,6 +212,10 @@ module Orb def maximum_intervals=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -180,6 +224,7 @@ module Orb def metadata=(_) end + # The minimum intervals for this subscription sorted by the start_date. sig { returns(T::Array[Orb::Models::SubscriptionPriceIntervalsResponse::MinimumInterval]) } def minimum_intervals end @@ -191,6 +236,10 @@ module Orb def minimum_intervals=(_) end + # Determines the difference between the invoice issue date for subscription + # invoices as the date that they are due. A value of `0` here represents that the + # invoice is due on issue, whereas a value of `30` represents that the customer + # has a month to pay the invoice. sig { returns(Integer) } def net_terms end @@ -199,6 +248,10 @@ module Orb def net_terms=(_) end + # The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be + # subscribed to by a customer. Plans define the billing behavior of the + # subscription. You can see more about how to configure prices in the + # [Price resource](/reference/price). sig { returns(Orb::Models::Plan) } def plan end @@ -207,6 +260,7 @@ module Orb def plan=(_) end + # The price intervals for this subscription. sig { returns(T::Array[Orb::Models::SubscriptionPriceIntervalsResponse::PriceInterval]) } def price_intervals end @@ -229,6 +283,7 @@ module Orb def redeemed_coupon=(_) end + # The date Orb starts billing for this subscription. sig { returns(Time) } def start_date end @@ -408,6 +463,7 @@ module Orb def adjustment=(_) end + # The price interval IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -416,6 +472,7 @@ module Orb def applies_to_price_interval_ids=(_) end + # The end date of the adjustment interval. sig { returns(T.nilable(Time)) } def end_date end @@ -424,6 +481,7 @@ module Orb def end_date=(_) end + # The start date of the adjustment interval. sig { returns(Time) } def start_date end @@ -492,6 +550,7 @@ module Orb def adjustment_type=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -500,6 +559,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -508,6 +569,7 @@ module Orb def is_invoice_level=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -516,6 +578,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -524,6 +587,8 @@ module Orb def reason=(_) end + # The number of usage units by which to discount the price this adjustment applies + # to in a given billing period. sig { returns(Float) } def usage_discount end @@ -590,6 +655,8 @@ module Orb def adjustment_type=(_) end + # The amount by which to discount the prices this adjustment applies to in a given + # billing period. sig { returns(String) } def amount_discount end @@ -598,6 +665,7 @@ module Orb def amount_discount=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -606,6 +674,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -614,6 +684,7 @@ module Orb def is_invoice_level=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -622,6 +693,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -688,6 +760,7 @@ module Orb def adjustment_type=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -696,6 +769,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -704,6 +779,8 @@ module Orb def is_invoice_level=(_) end + # The percentage (as a value between 0 and 1) by which to discount the price + # intervals this adjustment applies to in a given billing period. sig { returns(Float) } def percentage_discount end @@ -712,6 +789,7 @@ module Orb def percentage_discount=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -720,6 +798,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -786,6 +865,7 @@ module Orb def adjustment_type=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -794,6 +874,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -802,6 +884,7 @@ module Orb def is_invoice_level=(_) end + # The item ID that revenue from this minimum will be attributed to. sig { returns(String) } def item_id end @@ -810,6 +893,8 @@ module Orb def item_id=(_) end + # The minimum amount to charge in a given billing period for the prices this + # adjustment applies to. sig { returns(String) } def minimum_amount end @@ -818,6 +903,7 @@ module Orb def minimum_amount=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -826,6 +912,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -895,6 +982,7 @@ module Orb def adjustment_type=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -903,6 +991,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -911,6 +1001,8 @@ module Orb def is_invoice_level=(_) end + # The maximum amount to charge in a given billing period for the prices this + # adjustment applies to. sig { returns(String) } def maximum_amount end @@ -919,6 +1011,7 @@ module Orb def maximum_amount=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -927,6 +1020,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -980,16 +1074,20 @@ module Orb sig do override .returns( - [[Symbol, Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment], [Symbol, Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment], [Symbol, Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment], [Symbol, Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment], [Symbol, Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment]] + [Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment] ) end - private def variants + def variants end end end end class BillingCycleAnchorConfiguration < Orb::BaseModel + # The day of the month on which the billing cycle is anchored. If the maximum + # number of days in a month is greater than this value, the last day of the month + # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing + # period begins on the 30th. sig { returns(Integer) } def day end @@ -998,6 +1096,9 @@ module Orb def day=(_) end + # The month on which the billing cycle is anchored (e.g. a quarterly price + # anchored in February would have cycles starting February, May, August, and + # November). sig { returns(T.nilable(Integer)) } def month end @@ -1006,6 +1107,8 @@ module Orb def month=(_) end + # The year on which the billing cycle is anchored (e.g. a 2 year billing cycle + # anchored on 2021 would have cycles starting on 2021, 2023, 2025, etc.). sig { returns(T.nilable(Integer)) } def year end @@ -1029,6 +1132,7 @@ module Orb abstract! class AmountDiscountInterval < Orb::BaseModel + # Only available if discount_type is `amount`. sig { returns(String) } def amount_discount end @@ -1037,6 +1141,7 @@ module Orb def amount_discount=(_) end + # The price ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1045,6 +1150,7 @@ module Orb def applies_to_price_ids=(_) end + # The price interval ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -1061,6 +1167,7 @@ module Orb def discount_type=(_) end + # The end date of the discount interval. sig { returns(T.nilable(Time)) } def end_date end @@ -1069,6 +1176,7 @@ module Orb def end_date=(_) end + # The start date of the discount interval. sig { returns(Time) } def start_date end @@ -1116,6 +1224,7 @@ module Orb end class PercentageDiscountInterval < Orb::BaseModel + # The price ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1124,6 +1233,7 @@ module Orb def applies_to_price_ids=(_) end + # The price interval ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -1140,6 +1250,7 @@ module Orb def discount_type=(_) end + # The end date of the discount interval. sig { returns(T.nilable(Time)) } def end_date end @@ -1148,6 +1259,8 @@ module Orb def end_date=(_) end + # Only available if discount_type is `percentage`.This is a number between 0 + # and 1. sig { returns(Float) } def percentage_discount end @@ -1156,6 +1269,7 @@ module Orb def percentage_discount=(_) end + # The start date of the discount interval. sig { returns(Time) } def start_date end @@ -1203,6 +1317,7 @@ module Orb end class UsageDiscountInterval < Orb::BaseModel + # The price ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1211,6 +1326,7 @@ module Orb def applies_to_price_ids=(_) end + # The price interval ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -1227,6 +1343,7 @@ module Orb def discount_type=(_) end + # The end date of the discount interval. sig { returns(T.nilable(Time)) } def end_date end @@ -1235,6 +1352,7 @@ module Orb def end_date=(_) end + # The start date of the discount interval. sig { returns(Time) } def start_date end @@ -1243,6 +1361,8 @@ module Orb def start_date=(_) end + # Only available if discount_type is `usage`. Number of usage units that this + # discount is for sig { returns(Float) } def usage_discount end @@ -1293,10 +1413,10 @@ module Orb sig do override .returns( - [[Symbol, Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::AmountDiscountInterval], [Symbol, Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::PercentageDiscountInterval], [Symbol, Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::UsageDiscountInterval]] + [Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::AmountDiscountInterval, Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::PercentageDiscountInterval, Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::UsageDiscountInterval] ) end - private def variants + def variants end end end @@ -1349,6 +1469,7 @@ module Orb end class MaximumInterval < Orb::BaseModel + # The price ids that this maximum interval applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1357,6 +1478,7 @@ module Orb def applies_to_price_ids=(_) end + # The price interval ids that this maximum interval applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -1365,6 +1487,7 @@ module Orb def applies_to_price_interval_ids=(_) end + # The end date of the maximum interval. sig { returns(T.nilable(Time)) } def end_date end @@ -1373,6 +1496,8 @@ module Orb def end_date=(_) end + # The maximum amount to charge in a given billing period for the price intervals + # this transform applies to. sig { returns(String) } def maximum_amount end @@ -1381,6 +1506,7 @@ module Orb def maximum_amount=(_) end + # The start date of the maximum interval. sig { returns(Time) } def start_date end @@ -1419,6 +1545,7 @@ module Orb end class MinimumInterval < Orb::BaseModel + # The price ids that this minimum interval applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1427,6 +1554,7 @@ module Orb def applies_to_price_ids=(_) end + # The price interval ids that this minimum interval applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -1435,6 +1563,7 @@ module Orb def applies_to_price_interval_ids=(_) end + # The end date of the minimum interval. sig { returns(T.nilable(Time)) } def end_date end @@ -1443,6 +1572,8 @@ module Orb def end_date=(_) end + # The minimum amount to charge in a given billing period for the price intervals + # this minimum applies to. sig { returns(String) } def minimum_amount end @@ -1451,6 +1582,7 @@ module Orb def minimum_amount=(_) end + # The start date of the minimum interval. sig { returns(Time) } def start_date end @@ -1497,6 +1629,7 @@ module Orb def id=(_) end + # The day of the month that Orb bills for this price sig { returns(Integer) } def billing_cycle_day end @@ -1505,6 +1638,9 @@ module Orb def billing_cycle_day=(_) end + # The end of the current billing period. This is an exclusive timestamp, such that + # the instant returned is exactly the end of the billing period. Set to null if + # this price interval is not currently active. sig { returns(T.nilable(Time)) } def current_billing_period_end_date end @@ -1513,6 +1649,9 @@ module Orb def current_billing_period_end_date=(_) end + # The start date of the current billing period. This is an inclusive timestamp; + # the instant returned is exactly the beginning of the billing period. Set to null + # if this price interval is not currently active. sig { returns(T.nilable(Time)) } def current_billing_period_start_date end @@ -1521,6 +1660,8 @@ module Orb def current_billing_period_start_date=(_) end + # The end date of the price interval. This is the date that Orb stops billing for + # this price. sig { returns(T.nilable(Time)) } def end_date end @@ -1529,6 +1670,7 @@ module Orb def end_date=(_) end + # An additional filter to apply to usage queries. sig { returns(T.nilable(String)) } def filter end @@ -1537,6 +1679,8 @@ module Orb def filter=(_) end + # The fixed fee quantity transitions for this price interval. This is only + # relevant for fixed fees. sig do returns( T.nilable( @@ -1562,6 +1706,16 @@ module Orb def fixed_fee_quantity_transitions=(_) end + # The Price resource represents a price that can be billed on a subscription, + # resulting in a charge on an invoice in the form of an invoice line item. Prices + # take a quantity and determine an amount to bill. + # + # Orb supports a few different pricing models out of the box. Each of these models + # is serialized differently in a given Price object. The model_type field + # determines the key for the configuration object that is present. + # + # For more on the types of prices, see + # [the core concepts documentation](/core-concepts#plan-and-price) sig do returns( T.any( @@ -1668,6 +1822,8 @@ module Orb def price=(_) end + # The start date of the price interval. This is the date that Orb starts billing + # for this price. sig { returns(Time) } def start_date end @@ -1676,6 +1832,8 @@ module Orb def start_date=(_) end + # A list of customer IDs whose usage events will be aggregated and billed under + # this price interval. sig { returns(T.nilable(T::Array[String])) } def usage_customer_ids end @@ -1684,6 +1842,9 @@ module Orb def usage_customer_ids=(_) end + # The Price Interval resource represents a period of time for which a price will + # bill on a subscription. A subscription’s price intervals define its billing + # behavior. sig do params( id: String, diff --git a/rbi/lib/orb/models/subscription_schedule_plan_change_params.rbi b/rbi/lib/orb/models/subscription_schedule_plan_change_params.rbi index a14bf172..5e27cd04 100644 --- a/rbi/lib/orb/models/subscription_schedule_plan_change_params.rbi +++ b/rbi/lib/orb/models/subscription_schedule_plan_change_params.rbi @@ -14,6 +14,8 @@ module Orb def change_option=(_) end + # Additional adjustments to be added to the subscription. (Only available for + # accounts that have migrated off of legacy subscription overrides) sig { returns(T.nilable(T::Array[Orb::Models::SubscriptionSchedulePlanChangeParams::AddAdjustment])) } def add_adjustments end @@ -25,6 +27,8 @@ module Orb def add_adjustments=(_) end + # Additional prices to be added to the subscription. (Only available for accounts + # that have migrated off of legacy subscription overrides) sig { returns(T.nilable(T::Array[Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice])) } def add_prices end @@ -36,6 +40,8 @@ module Orb def add_prices=(_) end + # [DEPRECATED] Use billing_cycle_alignment instead. Reset billing periods to be + # aligned with the plan change's effective date. sig { returns(T.nilable(T::Boolean)) } def align_billing_with_plan_change_date end @@ -44,6 +50,9 @@ module Orb def align_billing_with_plan_change_date=(_) end + # Determines whether issued invoices for this subscription will automatically be + # charged with the saved payment method on the due date. If not specified, this + # defaults to the behavior configured for this customer. sig { returns(T.nilable(T::Boolean)) } def auto_collection end @@ -52,6 +61,9 @@ module Orb def auto_collection=(_) end + # Reset billing periods to be aligned with the plan change's effective date or + # start of the month. Defaults to `unchanged` which keeps subscription's existing + # billing cycle alignment. sig { returns(T.nilable(Symbol)) } def billing_cycle_alignment end @@ -71,6 +83,9 @@ module Orb def billing_cycle_anchor_configuration=(_) end + # The date that the plan change should take effect. This parameter can only be + # passed if the `change_option` is `requested_date`. If a date with no time is + # passed, the plan change will happen at midnight in the customer's timezone. sig { returns(T.nilable(Time)) } def change_date end @@ -79,6 +94,9 @@ module Orb def change_date=(_) end + # Redemption code to be used for this subscription. If the coupon cannot be found + # by its redemption code, or cannot be redeemed, an error response will be + # returned and the subscription creation or plan change will not be scheduled. sig { returns(T.nilable(String)) } def coupon_redemption_code end @@ -95,6 +113,8 @@ module Orb def credits_overage_rate=(_) end + # Determines the default memo on this subscription's invoices. Note that if this + # is not provided, it is determined by the plan configuration. sig { returns(T.nilable(String)) } def default_invoice_memo end @@ -103,6 +123,8 @@ module Orb def default_invoice_memo=(_) end + # The external_plan_id of the plan that the given subscription should be switched + # to. Note that either this property or `plan_id` must be specified. sig { returns(T.nilable(String)) } def external_plan_id end @@ -111,6 +133,10 @@ module Orb def external_plan_id=(_) end + # An additional filter to apply to usage queries. This filter must be expressed as + # a boolean + # [computed property](/extensibility/advanced-metrics#computed-properties). If + # null, usage queries will not include any additional filter. sig { returns(T.nilable(String)) } def filter end @@ -119,6 +145,7 @@ module Orb def filter=(_) end + # The phase of the plan to start with sig { returns(T.nilable(Integer)) } def initial_phase_order end @@ -127,6 +154,9 @@ module Orb def initial_phase_order=(_) end + # When this subscription's accrued usage reaches this threshold, an invoice will + # be issued for the subscription. If not specified, invoices will only be issued + # at the end of the billing period. sig { returns(T.nilable(String)) } def invoicing_threshold end @@ -135,6 +165,9 @@ module Orb def invoicing_threshold=(_) end + # The net terms determines the difference between the invoice date and the issue + # date for the invoice. If you intend the invoice to be due on issue, set this + # to 0. If not provided, this defaults to the value specified in the plan. sig { returns(T.nilable(Integer)) } def net_terms end @@ -151,6 +184,8 @@ module Orb def per_credit_overage_amount=(_) end + # The plan that the given subscription should be switched to. Note that either + # this property or `external_plan_id` must be specified. sig { returns(T.nilable(String)) } def plan_id end @@ -159,6 +194,8 @@ module Orb def plan_id=(_) end + # Specifies which version of the plan to change to. If null, the default version + # will be used. sig { returns(T.nilable(Integer)) } def plan_version_number end @@ -167,6 +204,7 @@ module Orb def plan_version_number=(_) end + # Optionally provide a list of overrides for prices on the plan sig { returns(T.nilable(T::Array[T.anything])) } def price_overrides end @@ -175,6 +213,8 @@ module Orb def price_overrides=(_) end + # Plan adjustments to be removed from the subscription. (Only available for + # accounts that have migrated off of legacy subscription overrides) sig { returns(T.nilable(T::Array[Orb::Models::SubscriptionSchedulePlanChangeParams::RemoveAdjustment])) } def remove_adjustments end @@ -186,6 +226,8 @@ module Orb def remove_adjustments=(_) end + # Plan prices to be removed from the subscription. (Only available for accounts + # that have migrated off of legacy subscription overrides) sig { returns(T.nilable(T::Array[Orb::Models::SubscriptionSchedulePlanChangeParams::RemovePrice])) } def remove_prices end @@ -197,6 +239,9 @@ module Orb def remove_prices=(_) end + # Plan adjustments to be replaced with additional adjustments on the subscription. + # (Only available for accounts that have migrated off of legacy subscription + # overrides) sig { returns(T.nilable(T::Array[Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment])) } def replace_adjustments end @@ -208,6 +253,8 @@ module Orb def replace_adjustments=(_) end + # Plan prices to be replaced with additional prices on the subscription. (Only + # available for accounts that have migrated off of legacy subscription overrides) sig { returns(T.nilable(T::Array[Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice])) } def replace_prices end @@ -219,6 +266,9 @@ module Orb def replace_prices=(_) end + # The duration of the trial period in days. If not provided, this defaults to the + # value specified in the plan. If `0` is provided, the trial on the plan will be + # skipped. sig { returns(T.nilable(Integer)) } def trial_duration_days end @@ -227,6 +277,12 @@ module Orb def trial_duration_days=(_) end + # A list of customer IDs whose usage events will be aggregated and billed under + # this subscription. By default, a subscription only considers usage events + # associated with its attached customer's customer_id. When usage_customer_ids is + # provided, the subscription includes usage events from the specified customers + # only. Provided usage_customer_ids must be either the customer for this + # subscription itself, or any of that customer's children. sig { returns(T.nilable(T::Array[String])) } def usage_customer_ids end @@ -350,6 +406,7 @@ module Orb end class AddAdjustment < Orb::BaseModel + # The definition of a new adjustment to create and add to the subscription. sig do returns( T.any( @@ -387,6 +444,8 @@ module Orb def adjustment=(_) end + # The end date of the adjustment interval. This is the date that the adjustment + # will stop affecting prices on the subscription. sig { returns(T.nilable(Time)) } def end_date end @@ -395,6 +454,7 @@ module Orb def end_date=(_) end + # The phase to add this adjustment to. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -403,6 +463,9 @@ module Orb def plan_phase_order=(_) end + # The start date of the adjustment interval. This is the date that the adjustment + # will start affecting prices on the subscription. If null, the adjustment will + # start when the phase or subscription starts. sig { returns(T.nilable(Time)) } def start_date end @@ -449,6 +512,7 @@ module Orb def to_hash end + # The definition of a new adjustment to create and add to the subscription. class Adjustment < Orb::Union abstract! @@ -461,6 +525,7 @@ module Orb def adjustment_type=(_) end + # The set of price IDs to which this adjustment applies. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -477,6 +542,8 @@ module Orb def percentage_discount=(_) end + # When false, this adjustment will be applied to a single price. Otherwise, it + # will be applied at the invoice level, possibly to multiple prices. sig { returns(T.nilable(T::Boolean)) } def is_invoice_level end @@ -521,6 +588,7 @@ module Orb def adjustment_type=(_) end + # The set of price IDs to which this adjustment applies. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -537,6 +605,8 @@ module Orb def usage_discount=(_) end + # When false, this adjustment will be applied to a single price. Otherwise, it + # will be applied at the invoice level, possibly to multiple prices. sig { returns(T.nilable(T::Boolean)) } def is_invoice_level end @@ -589,6 +659,7 @@ module Orb def amount_discount=(_) end + # The set of price IDs to which this adjustment applies. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -597,6 +668,8 @@ module Orb def applies_to_price_ids=(_) end + # When false, this adjustment will be applied to a single price. Otherwise, it + # will be applied at the invoice level, possibly to multiple prices. sig { returns(T.nilable(T::Boolean)) } def is_invoice_level end @@ -641,6 +714,7 @@ module Orb def adjustment_type=(_) end + # The set of price IDs to which this adjustment applies. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -649,6 +723,7 @@ module Orb def applies_to_price_ids=(_) end + # The item ID that revenue from this minimum will be attributed to. sig { returns(String) } def item_id end @@ -665,6 +740,8 @@ module Orb def minimum_amount=(_) end + # When false, this adjustment will be applied to a single price. Otherwise, it + # will be applied at the invoice level, possibly to multiple prices. sig { returns(T.nilable(T::Boolean)) } def is_invoice_level end @@ -711,6 +788,7 @@ module Orb def adjustment_type=(_) end + # The set of price IDs to which this adjustment applies. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -727,6 +805,8 @@ module Orb def maximum_amount=(_) end + # When false, this adjustment will be applied to a single price. Otherwise, it + # will be applied at the invoice level, possibly to multiple prices. sig { returns(T.nilable(T::Boolean)) } def is_invoice_level end @@ -766,16 +846,17 @@ module Orb sig do override .returns( - [[Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddAdjustment::Adjustment::NewPercentageDiscount], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddAdjustment::Adjustment::NewUsageDiscount], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddAdjustment::Adjustment::NewAmountDiscount], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddAdjustment::Adjustment::NewMinimum], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddAdjustment::Adjustment::NewMaximum]] + [Orb::Models::SubscriptionSchedulePlanChangeParams::AddAdjustment::Adjustment::NewPercentageDiscount, Orb::Models::SubscriptionSchedulePlanChangeParams::AddAdjustment::Adjustment::NewUsageDiscount, Orb::Models::SubscriptionSchedulePlanChangeParams::AddAdjustment::Adjustment::NewAmountDiscount, Orb::Models::SubscriptionSchedulePlanChangeParams::AddAdjustment::Adjustment::NewMinimum, Orb::Models::SubscriptionSchedulePlanChangeParams::AddAdjustment::Adjustment::NewMaximum] ) end - private def variants + def variants end end end end class AddPrice < Orb::BaseModel + # The definition of a new allocation price to create and add to the subscription. sig { returns(T.nilable(Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::AllocationPrice)) } def allocation_price end @@ -787,6 +868,8 @@ module Orb def allocation_price=(_) end + # [DEPRECATED] Use add_adjustments instead. The subscription's discounts for this + # price. sig { returns(T.nilable(T::Array[Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Discount])) } def discounts end @@ -798,6 +881,9 @@ module Orb def discounts=(_) end + # The end date of the price interval. This is the date that the price will stop + # billing on the subscription. If null, billing will end when the phase or + # subscription ends. sig { returns(T.nilable(Time)) } def end_date end @@ -806,6 +892,7 @@ module Orb def end_date=(_) end + # The external price id of the price to add to the subscription. sig { returns(T.nilable(String)) } def external_price_id end @@ -814,6 +901,8 @@ module Orb def external_price_id=(_) end + # [DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for + # this price. sig { returns(T.nilable(String)) } def maximum_amount end @@ -822,6 +911,8 @@ module Orb def maximum_amount=(_) end + # [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for + # this price. sig { returns(T.nilable(String)) } def minimum_amount end @@ -830,6 +921,7 @@ module Orb def minimum_amount=(_) end + # The phase to add this price to. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -838,6 +930,7 @@ module Orb def plan_phase_order=(_) end + # The definition of a new price to create and add to the subscription. sig do returns( T.nilable( @@ -941,6 +1034,7 @@ module Orb def price=(_) end + # The id of the price to add to the subscription. sig { returns(T.nilable(String)) } def price_id end @@ -949,6 +1043,9 @@ module Orb def price_id=(_) end + # The start date of the price interval. This is the date that the price will start + # billing on the subscription. If null, billing will start when the phase or + # subscription starts. sig { returns(T.nilable(Time)) } def start_date end @@ -1063,6 +1160,7 @@ module Orb end class AllocationPrice < Orb::BaseModel + # An amount of the currency to allocate to the customer at the specified cadence. sig { returns(String) } def amount end @@ -1071,6 +1169,7 @@ module Orb def amount=(_) end + # The cadence at which to allocate the amount to the customer. sig { returns(Symbol) } def cadence end @@ -1079,6 +1178,8 @@ module Orb def cadence=(_) end + # An ISO 4217 currency string or a custom pricing unit identifier in which to bill + # this price. sig { returns(String) } def currency end @@ -1087,6 +1188,8 @@ module Orb def currency=(_) end + # Whether the allocated amount should expire at the end of the cadence or roll + # over to the next period. sig { returns(T::Boolean) } def expires_at_end_of_cadence end @@ -1095,6 +1198,7 @@ module Orb def expires_at_end_of_cadence=(_) end + # The definition of a new allocation price to create and add to the subscription. sig do params(amount: String, cadence: Symbol, currency: String, expires_at_end_of_cadence: T::Boolean) .returns(T.attached_class) @@ -1114,6 +1218,7 @@ module Orb def to_hash end + # The cadence at which to allocate the amount to the customer. class Cadence < Orb::Enum abstract! @@ -1141,6 +1246,7 @@ module Orb def discount_type=(_) end + # Only available if discount_type is `amount`. sig { returns(T.nilable(String)) } def amount_discount end @@ -1149,6 +1255,8 @@ module Orb def amount_discount=(_) end + # Only available if discount_type is `percentage`. This is a number between 0 + # and 1. sig { returns(T.nilable(Float)) } def percentage_discount end @@ -1157,6 +1265,8 @@ module Orb def percentage_discount=(_) end + # Only available if discount_type is `usage`. Number of usage units that this + # discount is for sig { returns(T.nilable(Float)) } def usage_discount end @@ -1206,10 +1316,12 @@ module Orb end end + # The definition of a new price to create and add to the subscription. class Price < Orb::Union abstract! class NewSubscriptionUnitPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -1218,6 +1330,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -1234,6 +1347,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -1261,6 +1375,8 @@ module Orb def unit_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -1269,6 +1385,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -1277,6 +1395,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -1302,6 +1422,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -1310,6 +1431,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -1318,6 +1441,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -1326,6 +1450,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -1334,6 +1460,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -1342,6 +1469,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -1367,6 +1496,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -1378,6 +1510,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -1461,6 +1595,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -1479,6 +1614,7 @@ module Orb end class UnitConfig < Orb::BaseModel + # Rate per unit of usage sig { returns(String) } def unit_amount end @@ -1497,6 +1633,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -1505,6 +1642,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -1513,6 +1651,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -1521,6 +1661,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -1536,6 +1677,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -1544,6 +1686,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -1552,6 +1695,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -1560,6 +1705,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -1576,6 +1722,7 @@ module Orb end class NewSubscriptionPackagePrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -1584,6 +1731,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -1600,6 +1748,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -1627,6 +1776,8 @@ module Orb def package_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -1635,6 +1786,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -1643,6 +1796,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -1668,6 +1823,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -1676,6 +1832,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -1684,6 +1842,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -1692,6 +1851,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -1700,6 +1861,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -1708,6 +1870,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -1733,6 +1897,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -1744,6 +1911,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -1827,6 +1996,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -1845,6 +2015,7 @@ module Orb end class PackageConfig < Orb::BaseModel + # A currency amount to rate usage by sig { returns(String) } def package_amount end @@ -1853,6 +2024,8 @@ module Orb def package_amount=(_) end + # An integer amount to represent package size. For example, 1000 here would divide + # usage by 1000 before multiplying by package_amount in rating sig { returns(Integer) } def package_size end @@ -1871,6 +2044,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -1879,6 +2053,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -1887,6 +2062,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -1895,6 +2072,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -1910,6 +2088,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -1918,6 +2097,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -1926,6 +2106,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -1934,6 +2116,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -1950,6 +2133,7 @@ module Orb end class NewSubscriptionMatrixPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -1958,6 +2142,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -1993,6 +2178,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -2001,6 +2187,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -2009,6 +2197,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -2017,6 +2207,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -2042,6 +2234,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -2050,6 +2243,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -2058,6 +2253,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -2066,6 +2262,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -2074,6 +2272,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -2082,6 +2281,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -2107,6 +2308,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -2118,6 +2322,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -2201,6 +2407,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -2219,6 +2426,7 @@ module Orb end class MatrixConfig < Orb::BaseModel + # Default per unit rate for any usage not bucketed into a specified matrix_value sig { returns(String) } def default_unit_amount end @@ -2227,6 +2435,7 @@ module Orb def default_unit_amount=(_) end + # One or two event property values to evaluate matrix groups by sig { returns(T::Array[T.nilable(String)]) } def dimensions end @@ -2235,6 +2444,7 @@ module Orb def dimensions=(_) end + # Matrix values for specified matrix grouping keys sig do returns( T::Array[ @@ -2289,6 +2499,9 @@ module Orb end class MatrixValue < Orb::BaseModel + # One or two matrix keys to filter usage to this Matrix value by. For example, + # ["region", "tier"] could be used to filter cloud usage by a cloud region and an + # instance tier. sig { returns(T::Array[T.nilable(String)]) } def dimension_values end @@ -2297,6 +2510,7 @@ module Orb def dimension_values=(_) end + # Unit price for the specified dimension_values sig { returns(String) } def unit_amount end @@ -2321,6 +2535,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -2329,6 +2544,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -2337,6 +2553,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -2345,6 +2563,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -2360,6 +2579,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -2368,6 +2588,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -2376,6 +2597,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -2384,6 +2607,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -2400,6 +2624,7 @@ module Orb end class NewSubscriptionTieredPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -2408,6 +2633,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -2424,6 +2650,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -2451,6 +2678,8 @@ module Orb def tiered_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -2459,6 +2688,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -2467,6 +2698,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -2492,6 +2725,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -2500,6 +2734,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -2508,6 +2744,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -2516,6 +2753,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -2524,6 +2763,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -2532,6 +2772,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -2557,6 +2799,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -2568,6 +2813,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -2651,6 +2898,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -2669,6 +2917,7 @@ module Orb end class TieredConfig < Orb::BaseModel + # Tiers for rating based on total usage quantities into the specified tier sig do returns( T::Array[ @@ -2719,6 +2968,7 @@ module Orb end class Tier < Orb::BaseModel + # Inclusive tier starting value sig { returns(Float) } def first_unit end @@ -2727,6 +2977,7 @@ module Orb def first_unit=(_) end + # Amount per unit sig { returns(String) } def unit_amount end @@ -2735,6 +2986,7 @@ module Orb def unit_amount=(_) end + # Exclusive tier ending value. If null, this is treated as the last tier sig { returns(T.nilable(Float)) } def last_unit end @@ -2762,6 +3014,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -2770,6 +3023,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -2778,6 +3032,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -2786,6 +3042,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -2801,6 +3058,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -2809,6 +3067,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -2817,6 +3076,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -2825,6 +3086,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -2841,6 +3103,7 @@ module Orb end class NewSubscriptionTieredBpsPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -2849,6 +3112,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -2865,6 +3129,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -2892,6 +3157,8 @@ module Orb def tiered_bps_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -2900,6 +3167,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -2908,6 +3177,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -2933,6 +3204,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -2941,6 +3213,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -2949,6 +3223,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -2957,6 +3232,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -2965,6 +3242,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -2973,6 +3251,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -2998,6 +3278,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -3009,6 +3292,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -3092,6 +3377,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -3110,6 +3396,8 @@ module Orb end class TieredBpsConfig < Orb::BaseModel + # Tiers for a Graduated BPS pricing model, where usage is bucketed into specified + # tiers sig do returns( T::Array[ @@ -3160,6 +3448,7 @@ module Orb end class Tier < Orb::BaseModel + # Per-event basis point rate sig { returns(Float) } def bps end @@ -3168,6 +3457,7 @@ module Orb def bps=(_) end + # Inclusive tier starting value sig { returns(String) } def minimum_amount end @@ -3176,6 +3466,7 @@ module Orb def minimum_amount=(_) end + # Exclusive tier ending value sig { returns(T.nilable(String)) } def maximum_amount end @@ -3184,6 +3475,7 @@ module Orb def maximum_amount=(_) end + # Per unit maximum to charge sig { returns(T.nilable(String)) } def per_unit_maximum end @@ -3221,6 +3513,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -3229,6 +3522,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -3237,6 +3531,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -3245,6 +3541,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -3260,6 +3557,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -3268,6 +3566,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -3276,6 +3575,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -3284,6 +3585,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -3319,6 +3621,7 @@ module Orb def bps_config=(_) end + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -3327,6 +3630,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -3343,6 +3647,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -3351,6 +3656,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -3359,6 +3666,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -3367,6 +3676,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -3392,6 +3703,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -3400,6 +3712,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -3408,6 +3722,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -3416,6 +3731,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -3424,6 +3741,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -3432,6 +3750,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -3457,6 +3777,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -3468,6 +3791,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -3552,6 +3877,7 @@ module Orb end class BpsConfig < Orb::BaseModel + # Basis point take rate per event sig { returns(Float) } def bps end @@ -3560,6 +3886,7 @@ module Orb def bps=(_) end + # Optional currency amount maximum to cap spend per event sig { returns(T.nilable(String)) } def per_unit_maximum end @@ -3577,6 +3904,7 @@ module Orb end end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -3595,6 +3923,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -3603,6 +3932,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -3611,6 +3941,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -3619,6 +3951,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -3634,6 +3967,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -3642,6 +3976,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -3650,6 +3985,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -3658,6 +3995,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -3693,6 +4031,7 @@ module Orb def bulk_bps_config=(_) end + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -3701,6 +4040,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -3717,6 +4057,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -3725,6 +4066,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -3733,6 +4076,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -3741,6 +4086,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -3766,6 +4113,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -3774,6 +4122,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -3782,6 +4132,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -3790,6 +4141,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -3798,6 +4151,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -3806,6 +4160,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -3831,6 +4187,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -3842,6 +4201,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -3926,6 +4287,8 @@ module Orb end class BulkBpsConfig < Orb::BaseModel + # Tiers for a bulk BPS pricing model where all usage is aggregated to a single + # tier based on total volume sig do returns( T::Array[ @@ -3976,6 +4339,7 @@ module Orb end class Tier < Orb::BaseModel + # Basis points to rate on sig { returns(Float) } def bps end @@ -3984,6 +4348,7 @@ module Orb def bps=(_) end + # Upper bound for tier sig { returns(T.nilable(String)) } def maximum_amount end @@ -3992,6 +4357,7 @@ module Orb def maximum_amount=(_) end + # The maximum amount to charge for any one event sig { returns(T.nilable(String)) } def per_unit_maximum end @@ -4021,6 +4387,7 @@ module Orb end end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -4039,6 +4406,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -4047,6 +4415,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -4055,6 +4424,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -4063,6 +4434,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -4078,6 +4450,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -4086,6 +4459,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -4094,6 +4468,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -4102,6 +4478,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -4137,6 +4514,7 @@ module Orb def bulk_config=(_) end + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -4145,6 +4523,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -4161,6 +4540,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -4169,6 +4549,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -4177,6 +4559,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -4185,6 +4569,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -4210,6 +4596,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -4218,6 +4605,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -4226,6 +4615,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -4234,6 +4624,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -4242,6 +4634,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -4250,6 +4643,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -4275,6 +4670,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -4286,6 +4684,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -4370,6 +4770,7 @@ module Orb end class BulkConfig < Orb::BaseModel + # Bulk tiers for rating based on total usage volume sig do returns( T::Array[ @@ -4420,6 +4821,7 @@ module Orb end class Tier < Orb::BaseModel + # Amount per unit sig { returns(String) } def unit_amount end @@ -4428,6 +4830,7 @@ module Orb def unit_amount=(_) end + # Upper bound for this tier sig { returns(T.nilable(Float)) } def maximum_units end @@ -4446,6 +4849,7 @@ module Orb end end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -4464,6 +4868,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -4472,6 +4877,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -4480,6 +4886,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -4488,6 +4896,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -4503,6 +4912,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -4511,6 +4921,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -4519,6 +4930,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -4527,6 +4940,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -4543,6 +4957,7 @@ module Orb end class NewSubscriptionThresholdTotalAmountPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -4551,6 +4966,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -4567,6 +4983,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -4583,6 +5000,8 @@ module Orb def threshold_total_amount_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -4591,6 +5010,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -4599,6 +5020,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -4624,6 +5047,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -4632,6 +5056,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -4640,6 +5066,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -4648,6 +5075,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -4656,6 +5085,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -4664,6 +5094,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -4689,6 +5121,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -4700,6 +5135,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -4783,6 +5220,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -4801,6 +5239,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -4809,6 +5248,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -4817,6 +5257,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -4825,6 +5267,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -4840,6 +5283,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -4848,6 +5292,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -4856,6 +5301,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -4864,6 +5311,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -4880,6 +5328,7 @@ module Orb end class NewSubscriptionTieredPackagePrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -4888,6 +5337,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -4904,6 +5354,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -4920,6 +5371,8 @@ module Orb def tiered_package_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -4928,6 +5381,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -4936,6 +5391,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -4961,6 +5418,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -4969,6 +5427,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -4977,6 +5437,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -4985,6 +5446,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -4993,6 +5456,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -5001,6 +5465,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -5026,6 +5492,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -5037,6 +5506,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -5120,6 +5591,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -5138,6 +5610,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -5146,6 +5619,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -5154,6 +5628,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -5162,6 +5638,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -5177,6 +5654,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -5185,6 +5663,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -5193,6 +5672,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -5201,6 +5682,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -5217,6 +5699,7 @@ module Orb end class NewSubscriptionTieredWithMinimumPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -5225,6 +5708,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -5241,6 +5725,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -5257,6 +5742,8 @@ module Orb def tiered_with_minimum_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -5265,6 +5752,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -5273,6 +5762,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -5298,6 +5789,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -5306,6 +5798,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -5314,6 +5808,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -5322,6 +5817,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -5330,6 +5827,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -5338,6 +5836,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -5363,6 +5863,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -5374,6 +5877,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -5457,6 +5962,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -5475,6 +5981,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -5483,6 +5990,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -5491,6 +5999,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -5499,6 +6009,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -5514,6 +6025,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -5522,6 +6034,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -5530,6 +6043,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -5538,6 +6053,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -5554,6 +6070,7 @@ module Orb end class NewSubscriptionUnitWithPercentPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -5562,6 +6079,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -5578,6 +6096,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -5594,6 +6113,8 @@ module Orb def unit_with_percent_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -5602,6 +6123,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -5610,6 +6133,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -5635,6 +6160,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -5643,6 +6169,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -5651,6 +6179,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -5659,6 +6188,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -5667,6 +6198,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -5675,6 +6207,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -5700,6 +6234,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -5711,6 +6248,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -5794,6 +6333,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -5812,6 +6352,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -5820,6 +6361,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -5828,6 +6370,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -5836,6 +6380,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -5851,6 +6396,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -5859,6 +6405,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -5867,6 +6414,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -5875,6 +6424,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -5891,6 +6441,7 @@ module Orb end class NewSubscriptionPackageWithAllocationPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -5899,6 +6450,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -5915,6 +6467,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -5931,6 +6484,8 @@ module Orb def package_with_allocation_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -5939,6 +6494,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -5947,6 +6504,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -5972,6 +6531,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -5980,6 +6540,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -5988,6 +6550,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -5996,6 +6559,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -6004,6 +6569,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -6012,6 +6578,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -6037,6 +6605,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -6048,6 +6619,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -6131,6 +6704,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -6149,6 +6723,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -6157,6 +6732,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -6165,6 +6741,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -6173,6 +6751,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -6188,6 +6767,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -6196,6 +6776,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -6204,6 +6785,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -6212,6 +6795,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -6228,6 +6812,7 @@ module Orb end class NewSubscriptionTierWithProrationPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -6236,6 +6821,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -6252,6 +6838,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -6268,6 +6855,8 @@ module Orb def tiered_with_proration_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -6276,6 +6865,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -6284,6 +6875,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -6309,6 +6902,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -6317,6 +6911,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -6325,6 +6921,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -6333,6 +6930,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -6341,6 +6940,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -6349,6 +6949,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -6374,6 +6976,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -6385,6 +6990,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -6468,6 +7075,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -6486,6 +7094,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -6494,6 +7103,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -6502,6 +7112,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -6510,6 +7122,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -6525,6 +7138,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -6533,6 +7147,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -6541,6 +7156,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -6549,6 +7166,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -6565,6 +7183,7 @@ module Orb end class NewSubscriptionUnitWithProrationPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -6573,6 +7192,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -6589,6 +7209,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -6605,6 +7226,8 @@ module Orb def unit_with_proration_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -6613,6 +7236,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -6621,6 +7246,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -6646,6 +7273,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -6654,6 +7282,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -6662,6 +7292,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -6670,6 +7301,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -6678,6 +7311,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -6686,6 +7320,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -6711,6 +7347,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -6722,6 +7361,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -6805,6 +7446,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -6823,6 +7465,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -6831,6 +7474,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -6839,6 +7483,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -6847,6 +7493,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -6862,6 +7509,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -6870,6 +7518,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -6878,6 +7527,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -6886,6 +7537,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -6902,6 +7554,7 @@ module Orb end class NewSubscriptionGroupedAllocationPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -6918,6 +7571,7 @@ module Orb def grouped_allocation_config=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -6934,6 +7588,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -6942,6 +7597,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -6950,6 +7607,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -6958,6 +7617,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -6983,6 +7644,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -6991,6 +7653,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -6999,6 +7663,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -7007,6 +7672,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -7015,6 +7682,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -7023,6 +7691,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -7048,6 +7718,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -7059,6 +7732,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -7142,6 +7817,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -7160,6 +7836,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -7168,6 +7845,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -7176,6 +7854,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -7184,6 +7864,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -7199,6 +7880,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -7207,6 +7889,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -7215,6 +7898,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -7223,6 +7908,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -7239,6 +7925,7 @@ module Orb end class NewSubscriptionGroupedWithProratedMinimumPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -7255,6 +7942,7 @@ module Orb def grouped_with_prorated_minimum_config=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -7271,6 +7959,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -7279,6 +7968,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -7287,6 +7978,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -7295,6 +7988,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -7320,6 +8015,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -7328,6 +8024,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -7336,6 +8034,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -7344,6 +8043,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -7352,6 +8053,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -7360,6 +8062,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -7385,6 +8089,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -7396,6 +8103,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -7479,6 +8188,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -7497,6 +8207,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -7505,6 +8216,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -7513,6 +8225,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -7521,6 +8235,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -7536,6 +8251,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -7544,6 +8260,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -7552,6 +8269,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -7560,6 +8279,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -7584,6 +8304,7 @@ module Orb def bulk_with_proration_config=(_) end + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -7592,6 +8313,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -7608,6 +8330,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -7616,6 +8339,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -7624,6 +8349,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -7632,6 +8359,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -7657,6 +8386,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -7665,6 +8395,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -7673,6 +8405,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -7681,6 +8414,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -7689,6 +8424,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -7697,6 +8433,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -7722,6 +8460,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -7733,6 +8474,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -7816,6 +8559,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -7834,6 +8578,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -7842,6 +8587,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -7850,6 +8596,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -7858,6 +8606,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -7873,6 +8622,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -7881,6 +8631,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -7889,6 +8640,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -7897,6 +8650,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -7913,6 +8667,7 @@ module Orb end class NewSubscriptionScalableMatrixWithUnitPricingPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -7921,6 +8676,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -7937,6 +8693,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -7953,6 +8710,8 @@ module Orb def scalable_matrix_with_unit_pricing_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -7961,6 +8720,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -7969,6 +8730,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -7994,6 +8757,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -8002,6 +8766,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -8010,6 +8776,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -8018,6 +8785,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -8026,6 +8795,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -8034,6 +8804,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -8059,6 +8831,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -8070,6 +8845,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -8153,6 +8930,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -8171,6 +8949,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -8179,6 +8958,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -8187,6 +8967,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -8195,6 +8977,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -8210,6 +8993,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -8218,6 +9002,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -8226,6 +9011,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -8234,6 +9021,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -8250,6 +9038,7 @@ module Orb end class NewSubscriptionScalableMatrixWithTieredPricingPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -8258,6 +9047,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -8274,6 +9064,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -8290,6 +9081,8 @@ module Orb def scalable_matrix_with_tiered_pricing_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -8298,6 +9091,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -8306,6 +9101,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -8331,6 +9128,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -8339,6 +9137,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -8347,6 +9147,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -8355,6 +9156,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -8363,6 +9166,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -8371,6 +9175,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -8396,6 +9202,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -8407,6 +9216,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -8490,6 +9301,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -8508,6 +9320,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -8516,6 +9329,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -8524,6 +9338,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -8532,6 +9348,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -8547,6 +9364,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -8555,6 +9373,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -8563,6 +9382,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -8571,6 +9392,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -8587,6 +9409,7 @@ module Orb end class NewSubscriptionCumulativeGroupedBulkPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -8603,6 +9426,7 @@ module Orb def cumulative_grouped_bulk_config=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -8619,6 +9443,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -8627,6 +9452,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -8635,6 +9462,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -8643,6 +9472,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -8668,6 +9499,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -8676,6 +9508,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -8684,6 +9518,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -8692,6 +9527,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -8700,6 +9537,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -8708,6 +9546,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -8733,6 +9573,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -8744,6 +9587,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -8827,6 +9672,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -8845,6 +9691,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -8853,6 +9700,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -8861,6 +9709,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -8869,6 +9719,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -8884,6 +9735,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -8892,6 +9744,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -8900,6 +9753,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -8908,6 +9763,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -8924,6 +9780,7 @@ module Orb end class NewSubscriptionMaxGroupTieredPackagePrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -8932,6 +9789,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -8956,6 +9814,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -8964,6 +9823,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -8972,6 +9833,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -8980,6 +9843,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -9005,6 +9870,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -9013,6 +9879,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -9021,6 +9889,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -9029,6 +9898,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -9037,6 +9908,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -9045,6 +9917,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -9070,6 +9944,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -9081,6 +9958,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -9164,6 +10043,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -9182,6 +10062,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -9190,6 +10071,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -9198,6 +10080,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -9206,6 +10090,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -9221,6 +10106,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -9229,6 +10115,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -9237,6 +10124,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -9245,6 +10134,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -9261,6 +10151,7 @@ module Orb end class NewSubscriptionGroupedWithMeteredMinimumPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -9277,6 +10168,7 @@ module Orb def grouped_with_metered_minimum_config=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -9293,6 +10185,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -9301,6 +10194,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -9309,6 +10204,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -9317,6 +10214,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -9342,6 +10241,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -9350,6 +10250,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -9358,6 +10260,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -9366,6 +10269,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -9374,6 +10279,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -9382,6 +10288,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -9407,6 +10315,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -9418,6 +10329,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -9501,6 +10414,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -9519,6 +10433,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -9527,6 +10442,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -9535,6 +10451,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -9543,6 +10461,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -9558,6 +10477,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -9566,6 +10486,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -9574,6 +10495,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -9582,6 +10505,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -9598,6 +10522,7 @@ module Orb end class NewSubscriptionMatrixWithDisplayNamePrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -9606,6 +10531,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -9630,6 +10556,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -9638,6 +10565,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -9646,6 +10575,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -9654,6 +10585,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -9679,6 +10612,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -9687,6 +10621,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -9695,6 +10631,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -9703,6 +10640,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -9711,6 +10650,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -9719,6 +10659,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -9744,6 +10686,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -9755,6 +10700,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -9838,6 +10785,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -9856,6 +10804,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -9864,6 +10813,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -9872,6 +10822,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -9880,6 +10832,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -9895,6 +10848,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -9903,6 +10857,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -9911,6 +10866,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -9919,6 +10876,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -9935,6 +10893,7 @@ module Orb end class NewSubscriptionGroupedTieredPackagePrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -9951,6 +10910,7 @@ module Orb def grouped_tiered_package_config=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -9967,6 +10927,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -9975,6 +10936,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -9983,6 +10946,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -9991,6 +10956,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -10016,6 +10983,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -10024,6 +10992,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -10032,6 +11002,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -10040,6 +11011,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -10048,6 +11021,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -10056,6 +11030,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -10081,6 +11057,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -10092,6 +11071,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -10175,6 +11156,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -10193,6 +11175,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -10201,6 +11184,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -10209,6 +11193,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -10217,6 +11203,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -10232,6 +11219,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -10240,6 +11228,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -10248,6 +11237,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -10256,6 +11247,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -10275,15 +11267,18 @@ module Orb sig do override .returns( - [[Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionUnitPrice], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionPackagePrice], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionMatrixPrice], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionTieredPrice], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionTieredBpsPrice], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionBpsPrice], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionBulkBpsPrice], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionBulkPrice], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionThresholdTotalAmountPrice], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionTieredPackagePrice], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionTieredWithMinimumPrice], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionUnitWithPercentPrice], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionPackageWithAllocationPrice], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionTierWithProrationPrice], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionUnitWithProrationPrice], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionGroupedAllocationPrice], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionGroupedWithProratedMinimumPrice], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionBulkWithProrationPrice], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionCumulativeGroupedBulkPrice], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionMaxGroupTieredPackagePrice], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionGroupedWithMeteredMinimumPrice], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionMatrixWithDisplayNamePrice], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionGroupedTieredPackagePrice]] + [Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionUnitPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionPackagePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionMatrixPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionTieredPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionTieredBpsPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionBpsPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionBulkBpsPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionTieredPackagePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionTieredWithMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionUnitWithPercentPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionPackageWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionTierWithProrationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionUnitWithProrationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionGroupedAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionBulkWithProrationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionGroupedTieredPackagePrice] ) end - private def variants + def variants end end end end + # Reset billing periods to be aligned with the plan change's effective date or + # start of the month. Defaults to `unchanged` which keeps subscription's existing + # billing cycle alignment. class BillingCycleAlignment < Orb::Enum abstract! @@ -10299,6 +11294,10 @@ module Orb end class BillingCycleAnchorConfiguration < Orb::BaseModel + # The day of the month on which the billing cycle is anchored. If the maximum + # number of days in a month is greater than this value, the last day of the month + # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing + # period begins on the 30th. sig { returns(Integer) } def day end @@ -10307,6 +11306,9 @@ module Orb def day=(_) end + # The month on which the billing cycle is anchored (e.g. a quarterly price + # anchored in February would have cycles starting February, May, August, and + # November). sig { returns(T.nilable(Integer)) } def month end @@ -10315,6 +11317,8 @@ module Orb def month=(_) end + # The year on which the billing cycle is anchored (e.g. a 2 year billing cycle + # anchored on 2021 would have cycles starting on 2021, 2023, 2025, etc.). sig { returns(T.nilable(Integer)) } def year end @@ -10335,6 +11339,7 @@ module Orb end class RemoveAdjustment < Orb::BaseModel + # The id of the adjustment to remove on the subscription. sig { returns(String) } def adjustment_id end @@ -10353,6 +11358,7 @@ module Orb end class RemovePrice < Orb::BaseModel + # The external price id of the price to remove on the subscription. sig { returns(T.nilable(String)) } def external_price_id end @@ -10361,6 +11367,7 @@ module Orb def external_price_id=(_) end + # The id of the price to remove on the subscription. sig { returns(T.nilable(String)) } def price_id end @@ -10381,6 +11388,7 @@ module Orb end class ReplaceAdjustment < Orb::BaseModel + # The definition of a new adjustment to create and add to the subscription. sig do returns( T.any( @@ -10418,6 +11426,7 @@ module Orb def adjustment=(_) end + # The id of the adjustment on the plan to replace in the subscription. sig { returns(String) } def replaces_adjustment_id end @@ -10460,6 +11469,7 @@ module Orb def to_hash end + # The definition of a new adjustment to create and add to the subscription. class Adjustment < Orb::Union abstract! @@ -10472,6 +11482,7 @@ module Orb def adjustment_type=(_) end + # The set of price IDs to which this adjustment applies. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -10488,6 +11499,8 @@ module Orb def percentage_discount=(_) end + # When false, this adjustment will be applied to a single price. Otherwise, it + # will be applied at the invoice level, possibly to multiple prices. sig { returns(T.nilable(T::Boolean)) } def is_invoice_level end @@ -10532,6 +11545,7 @@ module Orb def adjustment_type=(_) end + # The set of price IDs to which this adjustment applies. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -10548,6 +11562,8 @@ module Orb def usage_discount=(_) end + # When false, this adjustment will be applied to a single price. Otherwise, it + # will be applied at the invoice level, possibly to multiple prices. sig { returns(T.nilable(T::Boolean)) } def is_invoice_level end @@ -10600,6 +11616,7 @@ module Orb def amount_discount=(_) end + # The set of price IDs to which this adjustment applies. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -10608,6 +11625,8 @@ module Orb def applies_to_price_ids=(_) end + # When false, this adjustment will be applied to a single price. Otherwise, it + # will be applied at the invoice level, possibly to multiple prices. sig { returns(T.nilable(T::Boolean)) } def is_invoice_level end @@ -10652,6 +11671,7 @@ module Orb def adjustment_type=(_) end + # The set of price IDs to which this adjustment applies. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -10660,6 +11680,7 @@ module Orb def applies_to_price_ids=(_) end + # The item ID that revenue from this minimum will be attributed to. sig { returns(String) } def item_id end @@ -10676,6 +11697,8 @@ module Orb def minimum_amount=(_) end + # When false, this adjustment will be applied to a single price. Otherwise, it + # will be applied at the invoice level, possibly to multiple prices. sig { returns(T.nilable(T::Boolean)) } def is_invoice_level end @@ -10722,6 +11745,7 @@ module Orb def adjustment_type=(_) end + # The set of price IDs to which this adjustment applies. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -10738,6 +11762,8 @@ module Orb def maximum_amount=(_) end + # When false, this adjustment will be applied to a single price. Otherwise, it + # will be applied at the invoice level, possibly to multiple prices. sig { returns(T.nilable(T::Boolean)) } def is_invoice_level end @@ -10777,16 +11803,17 @@ module Orb sig do override .returns( - [[Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::NewPercentageDiscount], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::NewUsageDiscount], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::NewAmountDiscount], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::NewMinimum], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::NewMaximum]] + [Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::NewPercentageDiscount, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::NewUsageDiscount, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::NewAmountDiscount, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::NewMinimum, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::NewMaximum] ) end - private def variants + def variants end end end end class ReplacePrice < Orb::BaseModel + # The id of the price on the plan to replace in the subscription. sig { returns(String) } def replaces_price_id end @@ -10795,6 +11822,7 @@ module Orb def replaces_price_id=(_) end + # The definition of a new allocation price to create and add to the subscription. sig { returns(T.nilable(Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::AllocationPrice)) } def allocation_price end @@ -10806,6 +11834,8 @@ module Orb def allocation_price=(_) end + # [DEPRECATED] Use add_adjustments instead. The subscription's discounts for the + # replacement price. sig { returns(T.nilable(T::Array[Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Discount])) } def discounts end @@ -10817,6 +11847,7 @@ module Orb def discounts=(_) end + # The external price id of the price to add to the subscription. sig { returns(T.nilable(String)) } def external_price_id end @@ -10825,6 +11856,7 @@ module Orb def external_price_id=(_) end + # The new quantity of the price, if the price is a fixed price. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -10833,6 +11865,8 @@ module Orb def fixed_price_quantity=(_) end + # [DEPRECATED] Use add_adjustments instead. The subscription's maximum amount for + # the replacement price. sig { returns(T.nilable(String)) } def maximum_amount end @@ -10841,6 +11875,8 @@ module Orb def maximum_amount=(_) end + # [DEPRECATED] Use add_adjustments instead. The subscription's minimum amount for + # the replacement price. sig { returns(T.nilable(String)) } def minimum_amount end @@ -10849,6 +11885,7 @@ module Orb def minimum_amount=(_) end + # The definition of a new price to create and add to the subscription. sig do returns( T.nilable( @@ -10952,6 +11989,7 @@ module Orb def price=(_) end + # The id of the price to add to the subscription. sig { returns(T.nilable(String)) } def price_id end @@ -11063,6 +12101,7 @@ module Orb end class AllocationPrice < Orb::BaseModel + # An amount of the currency to allocate to the customer at the specified cadence. sig { returns(String) } def amount end @@ -11071,6 +12110,7 @@ module Orb def amount=(_) end + # The cadence at which to allocate the amount to the customer. sig { returns(Symbol) } def cadence end @@ -11079,6 +12119,8 @@ module Orb def cadence=(_) end + # An ISO 4217 currency string or a custom pricing unit identifier in which to bill + # this price. sig { returns(String) } def currency end @@ -11087,6 +12129,8 @@ module Orb def currency=(_) end + # Whether the allocated amount should expire at the end of the cadence or roll + # over to the next period. sig { returns(T::Boolean) } def expires_at_end_of_cadence end @@ -11095,6 +12139,7 @@ module Orb def expires_at_end_of_cadence=(_) end + # The definition of a new allocation price to create and add to the subscription. sig do params(amount: String, cadence: Symbol, currency: String, expires_at_end_of_cadence: T::Boolean) .returns(T.attached_class) @@ -11114,6 +12159,7 @@ module Orb def to_hash end + # The cadence at which to allocate the amount to the customer. class Cadence < Orb::Enum abstract! @@ -11141,6 +12187,7 @@ module Orb def discount_type=(_) end + # Only available if discount_type is `amount`. sig { returns(T.nilable(String)) } def amount_discount end @@ -11149,6 +12196,8 @@ module Orb def amount_discount=(_) end + # Only available if discount_type is `percentage`. This is a number between 0 + # and 1. sig { returns(T.nilable(Float)) } def percentage_discount end @@ -11157,6 +12206,8 @@ module Orb def percentage_discount=(_) end + # Only available if discount_type is `usage`. Number of usage units that this + # discount is for sig { returns(T.nilable(Float)) } def usage_discount end @@ -11206,10 +12257,12 @@ module Orb end end + # The definition of a new price to create and add to the subscription. class Price < Orb::Union abstract! class NewSubscriptionUnitPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -11218,6 +12271,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -11234,6 +12288,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -11261,6 +12316,8 @@ module Orb def unit_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -11269,6 +12326,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -11277,6 +12336,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -11302,6 +12363,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -11310,6 +12372,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -11318,6 +12382,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -11326,6 +12391,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -11334,6 +12401,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -11342,6 +12410,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -11367,6 +12437,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -11378,6 +12451,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -11461,6 +12536,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -11479,6 +12555,7 @@ module Orb end class UnitConfig < Orb::BaseModel + # Rate per unit of usage sig { returns(String) } def unit_amount end @@ -11497,6 +12574,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -11505,6 +12583,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -11513,6 +12592,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -11521,6 +12602,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -11536,6 +12618,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -11544,6 +12627,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -11552,6 +12636,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -11560,6 +12646,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -11576,6 +12663,7 @@ module Orb end class NewSubscriptionPackagePrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -11584,6 +12672,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -11600,6 +12689,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -11627,6 +12717,8 @@ module Orb def package_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -11635,6 +12727,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -11643,6 +12737,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -11668,6 +12764,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -11676,6 +12773,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -11684,6 +12783,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -11692,6 +12792,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -11700,6 +12802,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -11708,6 +12811,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -11733,6 +12838,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -11744,6 +12852,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -11827,6 +12937,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -11845,6 +12956,7 @@ module Orb end class PackageConfig < Orb::BaseModel + # A currency amount to rate usage by sig { returns(String) } def package_amount end @@ -11853,6 +12965,8 @@ module Orb def package_amount=(_) end + # An integer amount to represent package size. For example, 1000 here would divide + # usage by 1000 before multiplying by package_amount in rating sig { returns(Integer) } def package_size end @@ -11871,6 +12985,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -11879,6 +12994,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -11887,6 +13003,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -11895,6 +13013,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -11910,6 +13029,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -11918,6 +13038,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -11926,6 +13047,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -11934,6 +13057,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -11950,6 +13074,7 @@ module Orb end class NewSubscriptionMatrixPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -11958,6 +13083,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -11993,6 +13119,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -12001,6 +13128,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -12009,6 +13138,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -12017,6 +13148,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -12042,6 +13175,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -12050,6 +13184,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -12058,6 +13194,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -12066,6 +13203,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -12074,6 +13213,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -12082,6 +13222,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -12107,6 +13249,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -12118,6 +13263,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -12201,6 +13348,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -12219,6 +13367,7 @@ module Orb end class MatrixConfig < Orb::BaseModel + # Default per unit rate for any usage not bucketed into a specified matrix_value sig { returns(String) } def default_unit_amount end @@ -12227,6 +13376,7 @@ module Orb def default_unit_amount=(_) end + # One or two event property values to evaluate matrix groups by sig { returns(T::Array[T.nilable(String)]) } def dimensions end @@ -12235,6 +13385,7 @@ module Orb def dimensions=(_) end + # Matrix values for specified matrix grouping keys sig do returns( T::Array[ @@ -12289,6 +13440,9 @@ module Orb end class MatrixValue < Orb::BaseModel + # One or two matrix keys to filter usage to this Matrix value by. For example, + # ["region", "tier"] could be used to filter cloud usage by a cloud region and an + # instance tier. sig { returns(T::Array[T.nilable(String)]) } def dimension_values end @@ -12297,6 +13451,7 @@ module Orb def dimension_values=(_) end + # Unit price for the specified dimension_values sig { returns(String) } def unit_amount end @@ -12321,6 +13476,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -12329,6 +13485,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -12337,6 +13494,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -12345,6 +13504,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -12360,6 +13520,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -12368,6 +13529,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -12376,6 +13538,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -12384,6 +13548,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -12400,6 +13565,7 @@ module Orb end class NewSubscriptionTieredPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -12408,6 +13574,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -12424,6 +13591,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -12451,6 +13619,8 @@ module Orb def tiered_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -12459,6 +13629,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -12467,6 +13639,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -12492,6 +13666,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -12500,6 +13675,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -12508,6 +13685,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -12516,6 +13694,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -12524,6 +13704,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -12532,6 +13713,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -12557,6 +13740,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -12568,6 +13754,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -12651,6 +13839,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -12669,6 +13858,7 @@ module Orb end class TieredConfig < Orb::BaseModel + # Tiers for rating based on total usage quantities into the specified tier sig do returns( T::Array[ @@ -12719,6 +13909,7 @@ module Orb end class Tier < Orb::BaseModel + # Inclusive tier starting value sig { returns(Float) } def first_unit end @@ -12727,6 +13918,7 @@ module Orb def first_unit=(_) end + # Amount per unit sig { returns(String) } def unit_amount end @@ -12735,6 +13927,7 @@ module Orb def unit_amount=(_) end + # Exclusive tier ending value. If null, this is treated as the last tier sig { returns(T.nilable(Float)) } def last_unit end @@ -12762,6 +13955,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -12770,6 +13964,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -12778,6 +13973,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -12786,6 +13983,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -12801,6 +13999,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -12809,6 +14008,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -12817,6 +14017,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -12825,6 +14027,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -12841,6 +14044,7 @@ module Orb end class NewSubscriptionTieredBpsPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -12849,6 +14053,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -12865,6 +14070,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -12892,6 +14098,8 @@ module Orb def tiered_bps_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -12900,6 +14108,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -12908,6 +14118,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -12933,6 +14145,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -12941,6 +14154,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -12949,6 +14164,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -12957,6 +14173,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -12965,6 +14183,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -12973,6 +14192,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -12998,6 +14219,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -13009,6 +14233,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -13092,6 +14318,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -13110,6 +14337,8 @@ module Orb end class TieredBpsConfig < Orb::BaseModel + # Tiers for a Graduated BPS pricing model, where usage is bucketed into specified + # tiers sig do returns( T::Array[ @@ -13160,6 +14389,7 @@ module Orb end class Tier < Orb::BaseModel + # Per-event basis point rate sig { returns(Float) } def bps end @@ -13168,6 +14398,7 @@ module Orb def bps=(_) end + # Inclusive tier starting value sig { returns(String) } def minimum_amount end @@ -13176,6 +14407,7 @@ module Orb def minimum_amount=(_) end + # Exclusive tier ending value sig { returns(T.nilable(String)) } def maximum_amount end @@ -13184,6 +14416,7 @@ module Orb def maximum_amount=(_) end + # Per unit maximum to charge sig { returns(T.nilable(String)) } def per_unit_maximum end @@ -13221,6 +14454,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -13229,6 +14463,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -13237,6 +14472,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -13245,6 +14482,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -13260,6 +14498,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -13268,6 +14507,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -13276,6 +14516,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -13284,6 +14526,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -13319,6 +14562,7 @@ module Orb def bps_config=(_) end + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -13327,6 +14571,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -13343,6 +14588,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -13351,6 +14597,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -13359,6 +14607,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -13367,6 +14617,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -13392,6 +14644,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -13400,6 +14653,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -13408,6 +14663,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -13416,6 +14672,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -13424,6 +14682,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -13432,6 +14691,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -13457,6 +14718,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -13468,6 +14732,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -13552,6 +14818,7 @@ module Orb end class BpsConfig < Orb::BaseModel + # Basis point take rate per event sig { returns(Float) } def bps end @@ -13560,6 +14827,7 @@ module Orb def bps=(_) end + # Optional currency amount maximum to cap spend per event sig { returns(T.nilable(String)) } def per_unit_maximum end @@ -13577,6 +14845,7 @@ module Orb end end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -13595,6 +14864,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -13603,6 +14873,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -13611,6 +14882,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -13619,6 +14892,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -13634,6 +14908,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -13642,6 +14917,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -13650,6 +14926,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -13658,6 +14936,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -13693,6 +14972,7 @@ module Orb def bulk_bps_config=(_) end + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -13701,6 +14981,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -13717,6 +14998,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -13725,6 +15007,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -13733,6 +15017,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -13741,6 +15027,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -13766,6 +15054,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -13774,6 +15063,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -13782,6 +15073,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -13790,6 +15082,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -13798,6 +15092,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -13806,6 +15101,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -13831,6 +15128,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -13842,6 +15142,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -13926,6 +15228,8 @@ module Orb end class BulkBpsConfig < Orb::BaseModel + # Tiers for a bulk BPS pricing model where all usage is aggregated to a single + # tier based on total volume sig do returns( T::Array[ @@ -13976,6 +15280,7 @@ module Orb end class Tier < Orb::BaseModel + # Basis points to rate on sig { returns(Float) } def bps end @@ -13984,6 +15289,7 @@ module Orb def bps=(_) end + # Upper bound for tier sig { returns(T.nilable(String)) } def maximum_amount end @@ -13992,6 +15298,7 @@ module Orb def maximum_amount=(_) end + # The maximum amount to charge for any one event sig { returns(T.nilable(String)) } def per_unit_maximum end @@ -14021,6 +15328,7 @@ module Orb end end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -14039,6 +15347,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -14047,6 +15356,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -14055,6 +15365,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -14063,6 +15375,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -14078,6 +15391,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -14086,6 +15400,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -14094,6 +15409,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -14102,6 +15419,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -14137,6 +15455,7 @@ module Orb def bulk_config=(_) end + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -14145,6 +15464,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -14161,6 +15481,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -14169,6 +15490,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -14177,6 +15500,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -14185,6 +15510,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -14210,6 +15537,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -14218,6 +15546,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -14226,6 +15556,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -14234,6 +15565,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -14242,6 +15575,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -14250,6 +15584,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -14275,6 +15611,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -14286,6 +15625,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -14370,6 +15711,7 @@ module Orb end class BulkConfig < Orb::BaseModel + # Bulk tiers for rating based on total usage volume sig do returns( T::Array[ @@ -14420,6 +15762,7 @@ module Orb end class Tier < Orb::BaseModel + # Amount per unit sig { returns(String) } def unit_amount end @@ -14428,6 +15771,7 @@ module Orb def unit_amount=(_) end + # Upper bound for this tier sig { returns(T.nilable(Float)) } def maximum_units end @@ -14446,6 +15790,7 @@ module Orb end end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -14464,6 +15809,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -14472,6 +15818,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -14480,6 +15827,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -14488,6 +15837,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -14503,6 +15853,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -14511,6 +15862,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -14519,6 +15871,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -14527,6 +15881,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -14543,6 +15898,7 @@ module Orb end class NewSubscriptionThresholdTotalAmountPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -14551,6 +15907,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -14567,6 +15924,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -14583,6 +15941,8 @@ module Orb def threshold_total_amount_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -14591,6 +15951,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -14599,6 +15961,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -14624,6 +15988,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -14632,6 +15997,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -14640,6 +16007,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -14648,6 +16016,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -14656,6 +16026,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -14664,6 +16035,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -14689,6 +16062,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -14700,6 +16076,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -14783,6 +16161,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -14801,6 +16180,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -14809,6 +16189,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -14817,6 +16198,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -14825,6 +16208,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -14840,6 +16224,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -14848,6 +16233,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -14856,6 +16242,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -14864,6 +16252,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -14880,6 +16269,7 @@ module Orb end class NewSubscriptionTieredPackagePrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -14888,6 +16278,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -14904,6 +16295,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -14920,6 +16312,8 @@ module Orb def tiered_package_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -14928,6 +16322,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -14936,6 +16332,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -14961,6 +16359,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -14969,6 +16368,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -14977,6 +16378,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -14985,6 +16387,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -14993,6 +16397,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -15001,6 +16406,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -15026,6 +16433,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -15037,6 +16447,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -15120,6 +16532,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -15138,6 +16551,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -15146,6 +16560,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -15154,6 +16569,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -15162,6 +16579,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -15177,6 +16595,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -15185,6 +16604,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -15193,6 +16613,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -15201,6 +16623,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -15217,6 +16640,7 @@ module Orb end class NewSubscriptionTieredWithMinimumPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -15225,6 +16649,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -15241,6 +16666,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -15257,6 +16683,8 @@ module Orb def tiered_with_minimum_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -15265,6 +16693,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -15273,6 +16703,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -15298,6 +16730,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -15306,6 +16739,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -15314,6 +16749,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -15322,6 +16758,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -15330,6 +16768,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -15338,6 +16777,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -15363,6 +16804,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -15374,6 +16818,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -15457,6 +16903,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -15475,6 +16922,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -15483,6 +16931,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -15491,6 +16940,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -15499,6 +16950,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -15514,6 +16966,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -15522,6 +16975,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -15530,6 +16984,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -15538,6 +16994,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -15554,6 +17011,7 @@ module Orb end class NewSubscriptionUnitWithPercentPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -15562,6 +17020,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -15578,6 +17037,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -15594,6 +17054,8 @@ module Orb def unit_with_percent_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -15602,6 +17064,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -15610,6 +17074,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -15635,6 +17101,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -15643,6 +17110,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -15651,6 +17120,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -15659,6 +17129,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -15667,6 +17139,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -15675,6 +17148,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -15700,6 +17175,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -15711,6 +17189,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -15794,6 +17274,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -15812,6 +17293,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -15820,6 +17302,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -15828,6 +17311,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -15836,6 +17321,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -15851,6 +17337,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -15859,6 +17346,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -15867,6 +17355,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -15875,6 +17365,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -15891,6 +17382,7 @@ module Orb end class NewSubscriptionPackageWithAllocationPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -15899,6 +17391,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -15915,6 +17408,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -15931,6 +17425,8 @@ module Orb def package_with_allocation_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -15939,6 +17435,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -15947,6 +17445,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -15972,6 +17472,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -15980,6 +17481,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -15988,6 +17491,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -15996,6 +17500,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -16004,6 +17510,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -16012,6 +17519,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -16037,6 +17546,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -16048,6 +17560,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -16131,6 +17645,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -16149,6 +17664,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -16157,6 +17673,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -16165,6 +17682,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -16173,6 +17692,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -16188,6 +17708,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -16196,6 +17717,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -16204,6 +17726,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -16212,6 +17736,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -16228,6 +17753,7 @@ module Orb end class NewSubscriptionTierWithProrationPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -16236,6 +17762,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -16252,6 +17779,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -16268,6 +17796,8 @@ module Orb def tiered_with_proration_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -16276,6 +17806,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -16284,6 +17816,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -16309,6 +17843,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -16317,6 +17852,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -16325,6 +17862,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -16333,6 +17871,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -16341,6 +17881,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -16349,6 +17890,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -16374,6 +17917,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -16385,6 +17931,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -16468,6 +18016,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -16486,6 +18035,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -16494,6 +18044,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -16502,6 +18053,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -16510,6 +18063,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -16525,6 +18079,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -16533,6 +18088,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -16541,6 +18097,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -16549,6 +18107,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -16565,6 +18124,7 @@ module Orb end class NewSubscriptionUnitWithProrationPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -16573,6 +18133,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -16589,6 +18150,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -16605,6 +18167,8 @@ module Orb def unit_with_proration_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -16613,6 +18177,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -16621,6 +18187,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -16646,6 +18214,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -16654,6 +18223,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -16662,6 +18233,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -16670,6 +18242,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -16678,6 +18252,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -16686,6 +18261,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -16711,6 +18288,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -16722,6 +18302,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -16805,6 +18387,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -16823,6 +18406,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -16831,6 +18415,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -16839,6 +18424,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -16847,6 +18434,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -16862,6 +18450,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -16870,6 +18459,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -16878,6 +18468,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -16886,6 +18478,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -16902,6 +18495,7 @@ module Orb end class NewSubscriptionGroupedAllocationPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -16918,6 +18512,7 @@ module Orb def grouped_allocation_config=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -16934,6 +18529,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -16942,6 +18538,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -16950,6 +18548,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -16958,6 +18558,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -16983,6 +18585,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -16991,6 +18594,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -16999,6 +18604,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -17007,6 +18613,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -17015,6 +18623,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -17023,6 +18632,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -17048,6 +18659,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -17059,6 +18673,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -17142,6 +18758,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -17160,6 +18777,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -17168,6 +18786,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -17176,6 +18795,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -17184,6 +18805,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -17199,6 +18821,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -17207,6 +18830,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -17215,6 +18839,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -17223,6 +18849,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -17239,6 +18866,7 @@ module Orb end class NewSubscriptionGroupedWithProratedMinimumPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -17255,6 +18883,7 @@ module Orb def grouped_with_prorated_minimum_config=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -17271,6 +18900,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -17279,6 +18909,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -17287,6 +18919,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -17295,6 +18929,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -17320,6 +18956,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -17328,6 +18965,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -17336,6 +18975,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -17344,6 +18984,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -17352,6 +18994,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -17360,6 +19003,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -17385,6 +19030,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -17396,6 +19044,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -17479,6 +19129,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -17497,6 +19148,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -17505,6 +19157,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -17513,6 +19166,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -17521,6 +19176,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -17536,6 +19192,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -17544,6 +19201,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -17552,6 +19210,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -17560,6 +19220,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -17584,6 +19245,7 @@ module Orb def bulk_with_proration_config=(_) end + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -17592,6 +19254,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -17608,6 +19271,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -17616,6 +19280,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -17624,6 +19290,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -17632,6 +19300,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -17657,6 +19327,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -17665,6 +19336,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -17673,6 +19346,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -17681,6 +19355,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -17689,6 +19365,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -17697,6 +19374,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -17722,6 +19401,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -17733,6 +19415,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -17816,6 +19500,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -17834,6 +19519,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -17842,6 +19528,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -17850,6 +19537,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -17858,6 +19547,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -17873,6 +19563,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -17881,6 +19572,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -17889,6 +19581,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -17897,6 +19591,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -17913,6 +19608,7 @@ module Orb end class NewSubscriptionScalableMatrixWithUnitPricingPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -17921,6 +19617,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -17937,6 +19634,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -17953,6 +19651,8 @@ module Orb def scalable_matrix_with_unit_pricing_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -17961,6 +19661,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -17969,6 +19671,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -17994,6 +19698,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -18002,6 +19707,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -18010,6 +19717,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -18018,6 +19726,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -18026,6 +19736,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -18034,6 +19745,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -18059,6 +19772,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -18070,6 +19786,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -18153,6 +19871,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -18171,6 +19890,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -18179,6 +19899,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -18187,6 +19908,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -18195,6 +19918,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -18210,6 +19934,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -18218,6 +19943,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -18226,6 +19952,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -18234,6 +19962,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -18250,6 +19979,7 @@ module Orb end class NewSubscriptionScalableMatrixWithTieredPricingPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -18258,6 +19988,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -18274,6 +20005,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -18290,6 +20022,8 @@ module Orb def scalable_matrix_with_tiered_pricing_config=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -18298,6 +20032,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -18306,6 +20042,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -18331,6 +20069,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -18339,6 +20078,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -18347,6 +20088,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -18355,6 +20097,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -18363,6 +20107,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -18371,6 +20116,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -18396,6 +20143,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -18407,6 +20157,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -18490,6 +20242,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -18508,6 +20261,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -18516,6 +20270,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -18524,6 +20279,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -18532,6 +20289,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -18547,6 +20305,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -18555,6 +20314,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -18563,6 +20323,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -18571,6 +20333,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -18587,6 +20350,7 @@ module Orb end class NewSubscriptionCumulativeGroupedBulkPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -18603,6 +20367,7 @@ module Orb def cumulative_grouped_bulk_config=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -18619,6 +20384,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -18627,6 +20393,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -18635,6 +20403,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -18643,6 +20413,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -18668,6 +20440,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -18676,6 +20449,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -18684,6 +20459,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -18692,6 +20468,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -18700,6 +20478,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -18708,6 +20487,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -18733,6 +20514,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -18744,6 +20528,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -18827,6 +20613,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -18845,6 +20632,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -18853,6 +20641,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -18861,6 +20650,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -18869,6 +20660,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -18884,6 +20676,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -18892,6 +20685,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -18900,6 +20694,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -18908,6 +20704,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -18924,6 +20721,7 @@ module Orb end class NewSubscriptionMaxGroupTieredPackagePrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -18932,6 +20730,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -18956,6 +20755,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -18964,6 +20764,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -18972,6 +20774,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -18980,6 +20784,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -19005,6 +20811,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -19013,6 +20820,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -19021,6 +20830,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -19029,6 +20839,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -19037,6 +20849,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -19045,6 +20858,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -19070,6 +20885,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -19081,6 +20899,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -19164,6 +20984,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -19182,6 +21003,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -19190,6 +21012,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -19198,6 +21021,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -19206,6 +21031,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -19221,6 +21047,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -19229,6 +21056,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -19237,6 +21065,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -19245,6 +21075,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -19261,6 +21092,7 @@ module Orb end class NewSubscriptionGroupedWithMeteredMinimumPrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -19277,6 +21109,7 @@ module Orb def grouped_with_metered_minimum_config=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -19293,6 +21126,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -19301,6 +21135,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -19309,6 +21145,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -19317,6 +21155,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -19342,6 +21182,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -19350,6 +21191,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -19358,6 +21201,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -19366,6 +21210,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -19374,6 +21220,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -19382,6 +21229,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -19407,6 +21256,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -19418,6 +21270,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -19501,6 +21355,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -19519,6 +21374,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -19527,6 +21383,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -19535,6 +21392,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -19543,6 +21402,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -19558,6 +21418,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -19566,6 +21427,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -19574,6 +21436,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -19582,6 +21446,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -19598,6 +21463,7 @@ module Orb end class NewSubscriptionMatrixWithDisplayNamePrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -19606,6 +21472,7 @@ module Orb def cadence=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -19630,6 +21497,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -19638,6 +21506,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -19646,6 +21516,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -19654,6 +21526,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -19679,6 +21553,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -19687,6 +21562,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -19695,6 +21572,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -19703,6 +21581,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -19711,6 +21591,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -19719,6 +21600,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -19744,6 +21627,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -19755,6 +21641,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -19838,6 +21726,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -19856,6 +21745,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -19864,6 +21754,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -19872,6 +21763,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -19880,6 +21773,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -19895,6 +21789,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -19903,6 +21798,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -19911,6 +21807,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -19919,6 +21817,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -19935,6 +21834,7 @@ module Orb end class NewSubscriptionGroupedTieredPackagePrice < Orb::BaseModel + # The cadence to bill for this price on. sig { returns(Symbol) } def cadence end @@ -19951,6 +21851,7 @@ module Orb def grouped_tiered_package_config=(_) end + # The id of the item the price will be associated with. sig { returns(String) } def item_id end @@ -19967,6 +21868,7 @@ module Orb def model_type=(_) end + # The name of the price. sig { returns(String) } def name end @@ -19975,6 +21877,8 @@ module Orb def name=(_) end + # The id of the billable metric for the price. Only needed if the price is + # usage-based. sig { returns(T.nilable(String)) } def billable_metric_id end @@ -19983,6 +21887,8 @@ module Orb def billable_metric_id=(_) end + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. sig { returns(T.nilable(T::Boolean)) } def billed_in_advance end @@ -19991,6 +21897,8 @@ module Orb def billed_in_advance=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig do returns( T.nilable( @@ -20016,6 +21924,7 @@ module Orb def billing_cycle_configuration=(_) end + # The per unit conversion rate of the price currency to the invoicing currency. sig { returns(T.nilable(Float)) } def conversion_rate end @@ -20024,6 +21933,8 @@ module Orb def conversion_rate=(_) end + # An ISO 4217 currency string, or custom pricing unit identifier, in which this + # price is billed. sig { returns(T.nilable(String)) } def currency end @@ -20032,6 +21943,7 @@ module Orb def currency=(_) end + # An alias for the price. sig { returns(T.nilable(String)) } def external_price_id end @@ -20040,6 +21952,8 @@ module Orb def external_price_id=(_) end + # If the Price represents a fixed cost, this represents the quantity of units + # applied. sig { returns(T.nilable(Float)) } def fixed_price_quantity end @@ -20048,6 +21962,7 @@ module Orb def fixed_price_quantity=(_) end + # The property used to group this price on an invoice sig { returns(T.nilable(String)) } def invoice_grouping_key end @@ -20056,6 +21971,8 @@ module Orb def invoice_grouping_key=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig do returns( T.nilable( @@ -20081,6 +21998,9 @@ module Orb def invoicing_cycle_configuration=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -20092,6 +22012,8 @@ module Orb def metadata=(_) end + # A transient ID that can be used to reference this price when adding adjustments + # in the same API call. sig { returns(T.nilable(String)) } def reference_id end @@ -20175,6 +22097,7 @@ module Orb def to_hash end + # The cadence to bill for this price on. class Cadence < Orb::Enum abstract! @@ -20193,6 +22116,7 @@ module Orb end class BillingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -20201,6 +22125,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -20209,6 +22134,8 @@ module Orb def duration_unit=(_) end + # For custom cadence: specifies the duration of the billing period in days or + # months. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -20217,6 +22144,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -20232,6 +22160,7 @@ module Orb end class InvoicingCycleConfiguration < Orb::BaseModel + # The duration of the billing period. sig { returns(Integer) } def duration end @@ -20240,6 +22169,7 @@ module Orb def duration=(_) end + # The unit of billing period duration. sig { returns(Symbol) } def duration_unit end @@ -20248,6 +22178,8 @@ module Orb def duration_unit=(_) end + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. sig { params(duration: Integer, duration_unit: Symbol).returns(T.attached_class) } def self.new(duration:, duration_unit:) end @@ -20256,6 +22188,7 @@ module Orb def to_hash end + # The unit of billing period duration. class DurationUnit < Orb::Enum abstract! @@ -20275,10 +22208,10 @@ module Orb sig do override .returns( - [[Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionUnitPrice], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionPackagePrice], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionMatrixPrice], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionTieredPrice], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionTieredBpsPrice], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionBpsPrice], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionBulkBpsPrice], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionBulkPrice], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionThresholdTotalAmountPrice], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionTieredPackagePrice], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionTieredWithMinimumPrice], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionUnitWithPercentPrice], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionPackageWithAllocationPrice], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionTierWithProrationPrice], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionUnitWithProrationPrice], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionGroupedAllocationPrice], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionGroupedWithProratedMinimumPrice], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionBulkWithProrationPrice], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionCumulativeGroupedBulkPrice], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionMaxGroupTieredPackagePrice], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionGroupedWithMeteredMinimumPrice], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionMatrixWithDisplayNamePrice], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionGroupedTieredPackagePrice]] + [Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionUnitPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionPackagePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionMatrixPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionTieredPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionTieredBpsPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionBpsPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionBulkBpsPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionTieredPackagePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionTieredWithMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionUnitWithPercentPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionPackageWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionTierWithProrationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionUnitWithProrationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionGroupedAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionBulkWithProrationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionGroupedTieredPackagePrice] ) end - private def variants + def variants end end end diff --git a/rbi/lib/orb/models/subscription_schedule_plan_change_response.rbi b/rbi/lib/orb/models/subscription_schedule_plan_change_response.rbi index a8443d36..cbd275cb 100644 --- a/rbi/lib/orb/models/subscription_schedule_plan_change_response.rbi +++ b/rbi/lib/orb/models/subscription_schedule_plan_change_response.rbi @@ -11,6 +11,8 @@ module Orb def id=(_) end + # The current plan phase that is active, only if the subscription's plan has + # phases. sig { returns(T.nilable(Integer)) } def active_plan_phase_order end @@ -19,6 +21,8 @@ module Orb def active_plan_phase_order=(_) end + # The adjustment intervals for this subscription sorted by the start_date of the + # adjustment interval. sig { returns(T::Array[Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval]) } def adjustment_intervals end @@ -30,6 +34,9 @@ module Orb def adjustment_intervals=(_) end + # Determines whether issued invoices for this subscription will automatically be + # charged with the saved payment method on the due date. This property defaults to + # the plan's behavior. If null, defaults to the customer's setting. sig { returns(T.nilable(T::Boolean)) } def auto_collection end @@ -49,6 +56,10 @@ module Orb def billing_cycle_anchor_configuration=(_) end + # The day of the month on which the billing cycle is anchored. If the maximum + # number of days in a month is greater than this value, the last day of the month + # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing + # period begins on the 30th. sig { returns(Integer) } def billing_cycle_day end @@ -65,6 +76,9 @@ module Orb def created_at=(_) end + # The end of the current billing period. This is an exclusive timestamp, such that + # the instant returned is not part of the billing period. Set to null for + # subscriptions that are not currently active. sig { returns(T.nilable(Time)) } def current_billing_period_end_date end @@ -73,6 +87,9 @@ module Orb def current_billing_period_end_date=(_) end + # The start date of the current billing period. This is an inclusive timestamp; + # the instant returned is exactly the beginning of the billing period. Set to null + # if the subscription is not currently active. sig { returns(T.nilable(Time)) } def current_billing_period_start_date end @@ -81,6 +98,24 @@ module Orb def current_billing_period_start_date=(_) end + # A customer is a buyer of your products, and the other party to the billing + # relationship. + # + # In Orb, customers are assigned system generated identifiers automatically, but + # it's often desirable to have these match existing identifiers in your system. To + # avoid having to denormalize Orb ID information, you can pass in an + # `external_customer_id` with your own identifier. See + # [Customer ID Aliases](/events-and-metrics/customer-aliases) for further + # information about how these aliases work in Orb. + # + # In addition to having an identifier in your system, a customer may exist in a + # payment provider solution like Stripe. Use the `payment_provider_id` and the + # `payment_provider` enum field to express this mapping. + # + # A customer also has a timezone (from the standard + # [IANA timezone database](https://www.iana.org/time-zones)), which defaults to + # your account's timezone. See [Timezone localization](/essentials/timezones) for + # information on what this timezone parameter influences within Orb. sig { returns(Orb::Models::Customer) } def customer end @@ -89,6 +124,8 @@ module Orb def customer=(_) end + # Determines the default memo on this subscriptions' invoices. Note that if this + # is not provided, it is determined by the plan configuration. sig { returns(T.nilable(String)) } def default_invoice_memo end @@ -97,6 +134,7 @@ module Orb def default_invoice_memo=(_) end + # The discount intervals for this subscription sorted by the start_date. sig do returns( T::Array[ @@ -134,6 +172,7 @@ module Orb def discount_intervals=(_) end + # The date Orb stops billing for this subscription. sig { returns(T.nilable(Time)) } def end_date end @@ -161,6 +200,7 @@ module Orb def invoicing_threshold=(_) end + # The maximum intervals for this subscription sorted by the start_date. sig { returns(T::Array[Orb::Models::SubscriptionSchedulePlanChangeResponse::MaximumInterval]) } def maximum_intervals end @@ -172,6 +212,10 @@ module Orb def maximum_intervals=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -180,6 +224,7 @@ module Orb def metadata=(_) end + # The minimum intervals for this subscription sorted by the start_date. sig { returns(T::Array[Orb::Models::SubscriptionSchedulePlanChangeResponse::MinimumInterval]) } def minimum_intervals end @@ -191,6 +236,10 @@ module Orb def minimum_intervals=(_) end + # Determines the difference between the invoice issue date for subscription + # invoices as the date that they are due. A value of `0` here represents that the + # invoice is due on issue, whereas a value of `30` represents that the customer + # has a month to pay the invoice. sig { returns(Integer) } def net_terms end @@ -199,6 +248,10 @@ module Orb def net_terms=(_) end + # The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be + # subscribed to by a customer. Plans define the billing behavior of the + # subscription. You can see more about how to configure prices in the + # [Price resource](/reference/price). sig { returns(Orb::Models::Plan) } def plan end @@ -207,6 +260,7 @@ module Orb def plan=(_) end + # The price intervals for this subscription. sig { returns(T::Array[Orb::Models::SubscriptionSchedulePlanChangeResponse::PriceInterval]) } def price_intervals end @@ -229,6 +283,7 @@ module Orb def redeemed_coupon=(_) end + # The date Orb starts billing for this subscription. sig { returns(Time) } def start_date end @@ -408,6 +463,7 @@ module Orb def adjustment=(_) end + # The price interval IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -416,6 +472,7 @@ module Orb def applies_to_price_interval_ids=(_) end + # The end date of the adjustment interval. sig { returns(T.nilable(Time)) } def end_date end @@ -424,6 +481,7 @@ module Orb def end_date=(_) end + # The start date of the adjustment interval. sig { returns(Time) } def start_date end @@ -492,6 +550,7 @@ module Orb def adjustment_type=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -500,6 +559,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -508,6 +569,7 @@ module Orb def is_invoice_level=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -516,6 +578,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -524,6 +587,8 @@ module Orb def reason=(_) end + # The number of usage units by which to discount the price this adjustment applies + # to in a given billing period. sig { returns(Float) } def usage_discount end @@ -590,6 +655,8 @@ module Orb def adjustment_type=(_) end + # The amount by which to discount the prices this adjustment applies to in a given + # billing period. sig { returns(String) } def amount_discount end @@ -598,6 +665,7 @@ module Orb def amount_discount=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -606,6 +674,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -614,6 +684,7 @@ module Orb def is_invoice_level=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -622,6 +693,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -688,6 +760,7 @@ module Orb def adjustment_type=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -696,6 +769,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -704,6 +779,8 @@ module Orb def is_invoice_level=(_) end + # The percentage (as a value between 0 and 1) by which to discount the price + # intervals this adjustment applies to in a given billing period. sig { returns(Float) } def percentage_discount end @@ -712,6 +789,7 @@ module Orb def percentage_discount=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -720,6 +798,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -786,6 +865,7 @@ module Orb def adjustment_type=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -794,6 +874,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -802,6 +884,7 @@ module Orb def is_invoice_level=(_) end + # The item ID that revenue from this minimum will be attributed to. sig { returns(String) } def item_id end @@ -810,6 +893,8 @@ module Orb def item_id=(_) end + # The minimum amount to charge in a given billing period for the prices this + # adjustment applies to. sig { returns(String) } def minimum_amount end @@ -818,6 +903,7 @@ module Orb def minimum_amount=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -826,6 +912,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -895,6 +982,7 @@ module Orb def adjustment_type=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -903,6 +991,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -911,6 +1001,8 @@ module Orb def is_invoice_level=(_) end + # The maximum amount to charge in a given billing period for the prices this + # adjustment applies to. sig { returns(String) } def maximum_amount end @@ -919,6 +1011,7 @@ module Orb def maximum_amount=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -927,6 +1020,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -980,16 +1074,20 @@ module Orb sig do override .returns( - [[Symbol, Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment]] + [Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment] ) end - private def variants + def variants end end end end class BillingCycleAnchorConfiguration < Orb::BaseModel + # The day of the month on which the billing cycle is anchored. If the maximum + # number of days in a month is greater than this value, the last day of the month + # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing + # period begins on the 30th. sig { returns(Integer) } def day end @@ -998,6 +1096,9 @@ module Orb def day=(_) end + # The month on which the billing cycle is anchored (e.g. a quarterly price + # anchored in February would have cycles starting February, May, August, and + # November). sig { returns(T.nilable(Integer)) } def month end @@ -1006,6 +1107,8 @@ module Orb def month=(_) end + # The year on which the billing cycle is anchored (e.g. a 2 year billing cycle + # anchored on 2021 would have cycles starting on 2021, 2023, 2025, etc.). sig { returns(T.nilable(Integer)) } def year end @@ -1029,6 +1132,7 @@ module Orb abstract! class AmountDiscountInterval < Orb::BaseModel + # Only available if discount_type is `amount`. sig { returns(String) } def amount_discount end @@ -1037,6 +1141,7 @@ module Orb def amount_discount=(_) end + # The price ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1045,6 +1150,7 @@ module Orb def applies_to_price_ids=(_) end + # The price interval ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -1061,6 +1167,7 @@ module Orb def discount_type=(_) end + # The end date of the discount interval. sig { returns(T.nilable(Time)) } def end_date end @@ -1069,6 +1176,7 @@ module Orb def end_date=(_) end + # The start date of the discount interval. sig { returns(Time) } def start_date end @@ -1116,6 +1224,7 @@ module Orb end class PercentageDiscountInterval < Orb::BaseModel + # The price ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1124,6 +1233,7 @@ module Orb def applies_to_price_ids=(_) end + # The price interval ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -1140,6 +1250,7 @@ module Orb def discount_type=(_) end + # The end date of the discount interval. sig { returns(T.nilable(Time)) } def end_date end @@ -1148,6 +1259,8 @@ module Orb def end_date=(_) end + # Only available if discount_type is `percentage`.This is a number between 0 + # and 1. sig { returns(Float) } def percentage_discount end @@ -1156,6 +1269,7 @@ module Orb def percentage_discount=(_) end + # The start date of the discount interval. sig { returns(Time) } def start_date end @@ -1203,6 +1317,7 @@ module Orb end class UsageDiscountInterval < Orb::BaseModel + # The price ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1211,6 +1326,7 @@ module Orb def applies_to_price_ids=(_) end + # The price interval ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -1227,6 +1343,7 @@ module Orb def discount_type=(_) end + # The end date of the discount interval. sig { returns(T.nilable(Time)) } def end_date end @@ -1235,6 +1352,7 @@ module Orb def end_date=(_) end + # The start date of the discount interval. sig { returns(Time) } def start_date end @@ -1243,6 +1361,8 @@ module Orb def start_date=(_) end + # Only available if discount_type is `usage`. Number of usage units that this + # discount is for sig { returns(Float) } def usage_discount end @@ -1293,10 +1413,10 @@ module Orb sig do override .returns( - [[Symbol, Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::AmountDiscountInterval], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::PercentageDiscountInterval], [Symbol, Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::UsageDiscountInterval]] + [Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::AmountDiscountInterval, Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::PercentageDiscountInterval, Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::UsageDiscountInterval] ) end - private def variants + def variants end end end @@ -1349,6 +1469,7 @@ module Orb end class MaximumInterval < Orb::BaseModel + # The price ids that this maximum interval applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1357,6 +1478,7 @@ module Orb def applies_to_price_ids=(_) end + # The price interval ids that this maximum interval applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -1365,6 +1487,7 @@ module Orb def applies_to_price_interval_ids=(_) end + # The end date of the maximum interval. sig { returns(T.nilable(Time)) } def end_date end @@ -1373,6 +1496,8 @@ module Orb def end_date=(_) end + # The maximum amount to charge in a given billing period for the price intervals + # this transform applies to. sig { returns(String) } def maximum_amount end @@ -1381,6 +1506,7 @@ module Orb def maximum_amount=(_) end + # The start date of the maximum interval. sig { returns(Time) } def start_date end @@ -1419,6 +1545,7 @@ module Orb end class MinimumInterval < Orb::BaseModel + # The price ids that this minimum interval applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1427,6 +1554,7 @@ module Orb def applies_to_price_ids=(_) end + # The price interval ids that this minimum interval applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -1435,6 +1563,7 @@ module Orb def applies_to_price_interval_ids=(_) end + # The end date of the minimum interval. sig { returns(T.nilable(Time)) } def end_date end @@ -1443,6 +1572,8 @@ module Orb def end_date=(_) end + # The minimum amount to charge in a given billing period for the price intervals + # this minimum applies to. sig { returns(String) } def minimum_amount end @@ -1451,6 +1582,7 @@ module Orb def minimum_amount=(_) end + # The start date of the minimum interval. sig { returns(Time) } def start_date end @@ -1497,6 +1629,7 @@ module Orb def id=(_) end + # The day of the month that Orb bills for this price sig { returns(Integer) } def billing_cycle_day end @@ -1505,6 +1638,9 @@ module Orb def billing_cycle_day=(_) end + # The end of the current billing period. This is an exclusive timestamp, such that + # the instant returned is exactly the end of the billing period. Set to null if + # this price interval is not currently active. sig { returns(T.nilable(Time)) } def current_billing_period_end_date end @@ -1513,6 +1649,9 @@ module Orb def current_billing_period_end_date=(_) end + # The start date of the current billing period. This is an inclusive timestamp; + # the instant returned is exactly the beginning of the billing period. Set to null + # if this price interval is not currently active. sig { returns(T.nilable(Time)) } def current_billing_period_start_date end @@ -1521,6 +1660,8 @@ module Orb def current_billing_period_start_date=(_) end + # The end date of the price interval. This is the date that Orb stops billing for + # this price. sig { returns(T.nilable(Time)) } def end_date end @@ -1529,6 +1670,7 @@ module Orb def end_date=(_) end + # An additional filter to apply to usage queries. sig { returns(T.nilable(String)) } def filter end @@ -1537,6 +1679,8 @@ module Orb def filter=(_) end + # The fixed fee quantity transitions for this price interval. This is only + # relevant for fixed fees. sig do returns( T.nilable( @@ -1562,6 +1706,16 @@ module Orb def fixed_fee_quantity_transitions=(_) end + # The Price resource represents a price that can be billed on a subscription, + # resulting in a charge on an invoice in the form of an invoice line item. Prices + # take a quantity and determine an amount to bill. + # + # Orb supports a few different pricing models out of the box. Each of these models + # is serialized differently in a given Price object. The model_type field + # determines the key for the configuration object that is present. + # + # For more on the types of prices, see + # [the core concepts documentation](/core-concepts#plan-and-price) sig do returns( T.any( @@ -1668,6 +1822,8 @@ module Orb def price=(_) end + # The start date of the price interval. This is the date that Orb starts billing + # for this price. sig { returns(Time) } def start_date end @@ -1676,6 +1832,8 @@ module Orb def start_date=(_) end + # A list of customer IDs whose usage events will be aggregated and billed under + # this price interval. sig { returns(T.nilable(T::Array[String])) } def usage_customer_ids end @@ -1684,6 +1842,9 @@ module Orb def usage_customer_ids=(_) end + # The Price Interval resource represents a period of time for which a price will + # bill on a subscription. A subscription’s price intervals define its billing + # behavior. sig do params( id: String, diff --git a/rbi/lib/orb/models/subscription_trigger_phase_params.rbi b/rbi/lib/orb/models/subscription_trigger_phase_params.rbi index 8d50a659..60e78a95 100644 --- a/rbi/lib/orb/models/subscription_trigger_phase_params.rbi +++ b/rbi/lib/orb/models/subscription_trigger_phase_params.rbi @@ -6,6 +6,9 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters + # If false, this request will fail if it would void an issued invoice or create a + # credit note. Consider using this as a safety mechanism if you do not expect + # existing invoices to be changed. sig { returns(T.nilable(T::Boolean)) } def allow_invoice_credit_or_void end @@ -14,6 +17,8 @@ module Orb def allow_invoice_credit_or_void=(_) end + # The date on which the phase change should take effect. If not provided, defaults + # to today in the customer's timezone. sig { returns(T.nilable(Date)) } def effective_date end diff --git a/rbi/lib/orb/models/subscription_trigger_phase_response.rbi b/rbi/lib/orb/models/subscription_trigger_phase_response.rbi index cda5bbc1..79c25f07 100644 --- a/rbi/lib/orb/models/subscription_trigger_phase_response.rbi +++ b/rbi/lib/orb/models/subscription_trigger_phase_response.rbi @@ -11,6 +11,8 @@ module Orb def id=(_) end + # The current plan phase that is active, only if the subscription's plan has + # phases. sig { returns(T.nilable(Integer)) } def active_plan_phase_order end @@ -19,6 +21,8 @@ module Orb def active_plan_phase_order=(_) end + # The adjustment intervals for this subscription sorted by the start_date of the + # adjustment interval. sig { returns(T::Array[Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval]) } def adjustment_intervals end @@ -30,6 +34,9 @@ module Orb def adjustment_intervals=(_) end + # Determines whether issued invoices for this subscription will automatically be + # charged with the saved payment method on the due date. This property defaults to + # the plan's behavior. If null, defaults to the customer's setting. sig { returns(T.nilable(T::Boolean)) } def auto_collection end @@ -49,6 +56,10 @@ module Orb def billing_cycle_anchor_configuration=(_) end + # The day of the month on which the billing cycle is anchored. If the maximum + # number of days in a month is greater than this value, the last day of the month + # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing + # period begins on the 30th. sig { returns(Integer) } def billing_cycle_day end @@ -65,6 +76,9 @@ module Orb def created_at=(_) end + # The end of the current billing period. This is an exclusive timestamp, such that + # the instant returned is not part of the billing period. Set to null for + # subscriptions that are not currently active. sig { returns(T.nilable(Time)) } def current_billing_period_end_date end @@ -73,6 +87,9 @@ module Orb def current_billing_period_end_date=(_) end + # The start date of the current billing period. This is an inclusive timestamp; + # the instant returned is exactly the beginning of the billing period. Set to null + # if the subscription is not currently active. sig { returns(T.nilable(Time)) } def current_billing_period_start_date end @@ -81,6 +98,24 @@ module Orb def current_billing_period_start_date=(_) end + # A customer is a buyer of your products, and the other party to the billing + # relationship. + # + # In Orb, customers are assigned system generated identifiers automatically, but + # it's often desirable to have these match existing identifiers in your system. To + # avoid having to denormalize Orb ID information, you can pass in an + # `external_customer_id` with your own identifier. See + # [Customer ID Aliases](/events-and-metrics/customer-aliases) for further + # information about how these aliases work in Orb. + # + # In addition to having an identifier in your system, a customer may exist in a + # payment provider solution like Stripe. Use the `payment_provider_id` and the + # `payment_provider` enum field to express this mapping. + # + # A customer also has a timezone (from the standard + # [IANA timezone database](https://www.iana.org/time-zones)), which defaults to + # your account's timezone. See [Timezone localization](/essentials/timezones) for + # information on what this timezone parameter influences within Orb. sig { returns(Orb::Models::Customer) } def customer end @@ -89,6 +124,8 @@ module Orb def customer=(_) end + # Determines the default memo on this subscriptions' invoices. Note that if this + # is not provided, it is determined by the plan configuration. sig { returns(T.nilable(String)) } def default_invoice_memo end @@ -97,6 +134,7 @@ module Orb def default_invoice_memo=(_) end + # The discount intervals for this subscription sorted by the start_date. sig do returns( T::Array[ @@ -134,6 +172,7 @@ module Orb def discount_intervals=(_) end + # The date Orb stops billing for this subscription. sig { returns(T.nilable(Time)) } def end_date end @@ -161,6 +200,7 @@ module Orb def invoicing_threshold=(_) end + # The maximum intervals for this subscription sorted by the start_date. sig { returns(T::Array[Orb::Models::SubscriptionTriggerPhaseResponse::MaximumInterval]) } def maximum_intervals end @@ -172,6 +212,10 @@ module Orb def maximum_intervals=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -180,6 +224,7 @@ module Orb def metadata=(_) end + # The minimum intervals for this subscription sorted by the start_date. sig { returns(T::Array[Orb::Models::SubscriptionTriggerPhaseResponse::MinimumInterval]) } def minimum_intervals end @@ -191,6 +236,10 @@ module Orb def minimum_intervals=(_) end + # Determines the difference between the invoice issue date for subscription + # invoices as the date that they are due. A value of `0` here represents that the + # invoice is due on issue, whereas a value of `30` represents that the customer + # has a month to pay the invoice. sig { returns(Integer) } def net_terms end @@ -199,6 +248,10 @@ module Orb def net_terms=(_) end + # The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be + # subscribed to by a customer. Plans define the billing behavior of the + # subscription. You can see more about how to configure prices in the + # [Price resource](/reference/price). sig { returns(Orb::Models::Plan) } def plan end @@ -207,6 +260,7 @@ module Orb def plan=(_) end + # The price intervals for this subscription. sig { returns(T::Array[Orb::Models::SubscriptionTriggerPhaseResponse::PriceInterval]) } def price_intervals end @@ -229,6 +283,7 @@ module Orb def redeemed_coupon=(_) end + # The date Orb starts billing for this subscription. sig { returns(Time) } def start_date end @@ -408,6 +463,7 @@ module Orb def adjustment=(_) end + # The price interval IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -416,6 +472,7 @@ module Orb def applies_to_price_interval_ids=(_) end + # The end date of the adjustment interval. sig { returns(T.nilable(Time)) } def end_date end @@ -424,6 +481,7 @@ module Orb def end_date=(_) end + # The start date of the adjustment interval. sig { returns(Time) } def start_date end @@ -492,6 +550,7 @@ module Orb def adjustment_type=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -500,6 +559,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -508,6 +569,7 @@ module Orb def is_invoice_level=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -516,6 +578,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -524,6 +587,8 @@ module Orb def reason=(_) end + # The number of usage units by which to discount the price this adjustment applies + # to in a given billing period. sig { returns(Float) } def usage_discount end @@ -590,6 +655,8 @@ module Orb def adjustment_type=(_) end + # The amount by which to discount the prices this adjustment applies to in a given + # billing period. sig { returns(String) } def amount_discount end @@ -598,6 +665,7 @@ module Orb def amount_discount=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -606,6 +674,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -614,6 +684,7 @@ module Orb def is_invoice_level=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -622,6 +693,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -688,6 +760,7 @@ module Orb def adjustment_type=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -696,6 +769,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -704,6 +779,8 @@ module Orb def is_invoice_level=(_) end + # The percentage (as a value between 0 and 1) by which to discount the price + # intervals this adjustment applies to in a given billing period. sig { returns(Float) } def percentage_discount end @@ -712,6 +789,7 @@ module Orb def percentage_discount=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -720,6 +798,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -786,6 +865,7 @@ module Orb def adjustment_type=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -794,6 +874,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -802,6 +884,7 @@ module Orb def is_invoice_level=(_) end + # The item ID that revenue from this minimum will be attributed to. sig { returns(String) } def item_id end @@ -810,6 +893,8 @@ module Orb def item_id=(_) end + # The minimum amount to charge in a given billing period for the prices this + # adjustment applies to. sig { returns(String) } def minimum_amount end @@ -818,6 +903,7 @@ module Orb def minimum_amount=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -826,6 +912,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -895,6 +982,7 @@ module Orb def adjustment_type=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -903,6 +991,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -911,6 +1001,8 @@ module Orb def is_invoice_level=(_) end + # The maximum amount to charge in a given billing period for the prices this + # adjustment applies to. sig { returns(String) } def maximum_amount end @@ -919,6 +1011,7 @@ module Orb def maximum_amount=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -927,6 +1020,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -980,16 +1074,20 @@ module Orb sig do override .returns( - [[Symbol, Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment], [Symbol, Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment], [Symbol, Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment], [Symbol, Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment], [Symbol, Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment]] + [Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment] ) end - private def variants + def variants end end end end class BillingCycleAnchorConfiguration < Orb::BaseModel + # The day of the month on which the billing cycle is anchored. If the maximum + # number of days in a month is greater than this value, the last day of the month + # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing + # period begins on the 30th. sig { returns(Integer) } def day end @@ -998,6 +1096,9 @@ module Orb def day=(_) end + # The month on which the billing cycle is anchored (e.g. a quarterly price + # anchored in February would have cycles starting February, May, August, and + # November). sig { returns(T.nilable(Integer)) } def month end @@ -1006,6 +1107,8 @@ module Orb def month=(_) end + # The year on which the billing cycle is anchored (e.g. a 2 year billing cycle + # anchored on 2021 would have cycles starting on 2021, 2023, 2025, etc.). sig { returns(T.nilable(Integer)) } def year end @@ -1029,6 +1132,7 @@ module Orb abstract! class AmountDiscountInterval < Orb::BaseModel + # Only available if discount_type is `amount`. sig { returns(String) } def amount_discount end @@ -1037,6 +1141,7 @@ module Orb def amount_discount=(_) end + # The price ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1045,6 +1150,7 @@ module Orb def applies_to_price_ids=(_) end + # The price interval ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -1061,6 +1167,7 @@ module Orb def discount_type=(_) end + # The end date of the discount interval. sig { returns(T.nilable(Time)) } def end_date end @@ -1069,6 +1176,7 @@ module Orb def end_date=(_) end + # The start date of the discount interval. sig { returns(Time) } def start_date end @@ -1116,6 +1224,7 @@ module Orb end class PercentageDiscountInterval < Orb::BaseModel + # The price ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1124,6 +1233,7 @@ module Orb def applies_to_price_ids=(_) end + # The price interval ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -1140,6 +1250,7 @@ module Orb def discount_type=(_) end + # The end date of the discount interval. sig { returns(T.nilable(Time)) } def end_date end @@ -1148,6 +1259,8 @@ module Orb def end_date=(_) end + # Only available if discount_type is `percentage`.This is a number between 0 + # and 1. sig { returns(Float) } def percentage_discount end @@ -1156,6 +1269,7 @@ module Orb def percentage_discount=(_) end + # The start date of the discount interval. sig { returns(Time) } def start_date end @@ -1203,6 +1317,7 @@ module Orb end class UsageDiscountInterval < Orb::BaseModel + # The price ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1211,6 +1326,7 @@ module Orb def applies_to_price_ids=(_) end + # The price interval ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -1227,6 +1343,7 @@ module Orb def discount_type=(_) end + # The end date of the discount interval. sig { returns(T.nilable(Time)) } def end_date end @@ -1235,6 +1352,7 @@ module Orb def end_date=(_) end + # The start date of the discount interval. sig { returns(Time) } def start_date end @@ -1243,6 +1361,8 @@ module Orb def start_date=(_) end + # Only available if discount_type is `usage`. Number of usage units that this + # discount is for sig { returns(Float) } def usage_discount end @@ -1293,10 +1413,10 @@ module Orb sig do override .returns( - [[Symbol, Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::AmountDiscountInterval], [Symbol, Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::PercentageDiscountInterval], [Symbol, Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::UsageDiscountInterval]] + [Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::AmountDiscountInterval, Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::PercentageDiscountInterval, Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::UsageDiscountInterval] ) end - private def variants + def variants end end end @@ -1349,6 +1469,7 @@ module Orb end class MaximumInterval < Orb::BaseModel + # The price ids that this maximum interval applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1357,6 +1478,7 @@ module Orb def applies_to_price_ids=(_) end + # The price interval ids that this maximum interval applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -1365,6 +1487,7 @@ module Orb def applies_to_price_interval_ids=(_) end + # The end date of the maximum interval. sig { returns(T.nilable(Time)) } def end_date end @@ -1373,6 +1496,8 @@ module Orb def end_date=(_) end + # The maximum amount to charge in a given billing period for the price intervals + # this transform applies to. sig { returns(String) } def maximum_amount end @@ -1381,6 +1506,7 @@ module Orb def maximum_amount=(_) end + # The start date of the maximum interval. sig { returns(Time) } def start_date end @@ -1419,6 +1545,7 @@ module Orb end class MinimumInterval < Orb::BaseModel + # The price ids that this minimum interval applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1427,6 +1554,7 @@ module Orb def applies_to_price_ids=(_) end + # The price interval ids that this minimum interval applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -1435,6 +1563,7 @@ module Orb def applies_to_price_interval_ids=(_) end + # The end date of the minimum interval. sig { returns(T.nilable(Time)) } def end_date end @@ -1443,6 +1572,8 @@ module Orb def end_date=(_) end + # The minimum amount to charge in a given billing period for the price intervals + # this minimum applies to. sig { returns(String) } def minimum_amount end @@ -1451,6 +1582,7 @@ module Orb def minimum_amount=(_) end + # The start date of the minimum interval. sig { returns(Time) } def start_date end @@ -1497,6 +1629,7 @@ module Orb def id=(_) end + # The day of the month that Orb bills for this price sig { returns(Integer) } def billing_cycle_day end @@ -1505,6 +1638,9 @@ module Orb def billing_cycle_day=(_) end + # The end of the current billing period. This is an exclusive timestamp, such that + # the instant returned is exactly the end of the billing period. Set to null if + # this price interval is not currently active. sig { returns(T.nilable(Time)) } def current_billing_period_end_date end @@ -1513,6 +1649,9 @@ module Orb def current_billing_period_end_date=(_) end + # The start date of the current billing period. This is an inclusive timestamp; + # the instant returned is exactly the beginning of the billing period. Set to null + # if this price interval is not currently active. sig { returns(T.nilable(Time)) } def current_billing_period_start_date end @@ -1521,6 +1660,8 @@ module Orb def current_billing_period_start_date=(_) end + # The end date of the price interval. This is the date that Orb stops billing for + # this price. sig { returns(T.nilable(Time)) } def end_date end @@ -1529,6 +1670,7 @@ module Orb def end_date=(_) end + # An additional filter to apply to usage queries. sig { returns(T.nilable(String)) } def filter end @@ -1537,6 +1679,8 @@ module Orb def filter=(_) end + # The fixed fee quantity transitions for this price interval. This is only + # relevant for fixed fees. sig do returns( T.nilable( @@ -1562,6 +1706,16 @@ module Orb def fixed_fee_quantity_transitions=(_) end + # The Price resource represents a price that can be billed on a subscription, + # resulting in a charge on an invoice in the form of an invoice line item. Prices + # take a quantity and determine an amount to bill. + # + # Orb supports a few different pricing models out of the box. Each of these models + # is serialized differently in a given Price object. The model_type field + # determines the key for the configuration object that is present. + # + # For more on the types of prices, see + # [the core concepts documentation](/core-concepts#plan-and-price) sig do returns( T.any( @@ -1668,6 +1822,8 @@ module Orb def price=(_) end + # The start date of the price interval. This is the date that Orb starts billing + # for this price. sig { returns(Time) } def start_date end @@ -1676,6 +1832,8 @@ module Orb def start_date=(_) end + # A list of customer IDs whose usage events will be aggregated and billed under + # this price interval. sig { returns(T.nilable(T::Array[String])) } def usage_customer_ids end @@ -1684,6 +1842,9 @@ module Orb def usage_customer_ids=(_) end + # The Price Interval resource represents a period of time for which a price will + # bill on a subscription. A subscription’s price intervals define its billing + # behavior. sig do params( id: String, diff --git a/rbi/lib/orb/models/subscription_unschedule_cancellation_response.rbi b/rbi/lib/orb/models/subscription_unschedule_cancellation_response.rbi index 22c8b2fb..21d576e1 100644 --- a/rbi/lib/orb/models/subscription_unschedule_cancellation_response.rbi +++ b/rbi/lib/orb/models/subscription_unschedule_cancellation_response.rbi @@ -11,6 +11,8 @@ module Orb def id=(_) end + # The current plan phase that is active, only if the subscription's plan has + # phases. sig { returns(T.nilable(Integer)) } def active_plan_phase_order end @@ -19,6 +21,8 @@ module Orb def active_plan_phase_order=(_) end + # The adjustment intervals for this subscription sorted by the start_date of the + # adjustment interval. sig { returns(T::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval]) } def adjustment_intervals end @@ -30,6 +34,9 @@ module Orb def adjustment_intervals=(_) end + # Determines whether issued invoices for this subscription will automatically be + # charged with the saved payment method on the due date. This property defaults to + # the plan's behavior. If null, defaults to the customer's setting. sig { returns(T.nilable(T::Boolean)) } def auto_collection end @@ -49,6 +56,10 @@ module Orb def billing_cycle_anchor_configuration=(_) end + # The day of the month on which the billing cycle is anchored. If the maximum + # number of days in a month is greater than this value, the last day of the month + # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing + # period begins on the 30th. sig { returns(Integer) } def billing_cycle_day end @@ -65,6 +76,9 @@ module Orb def created_at=(_) end + # The end of the current billing period. This is an exclusive timestamp, such that + # the instant returned is not part of the billing period. Set to null for + # subscriptions that are not currently active. sig { returns(T.nilable(Time)) } def current_billing_period_end_date end @@ -73,6 +87,9 @@ module Orb def current_billing_period_end_date=(_) end + # The start date of the current billing period. This is an inclusive timestamp; + # the instant returned is exactly the beginning of the billing period. Set to null + # if the subscription is not currently active. sig { returns(T.nilable(Time)) } def current_billing_period_start_date end @@ -81,6 +98,24 @@ module Orb def current_billing_period_start_date=(_) end + # A customer is a buyer of your products, and the other party to the billing + # relationship. + # + # In Orb, customers are assigned system generated identifiers automatically, but + # it's often desirable to have these match existing identifiers in your system. To + # avoid having to denormalize Orb ID information, you can pass in an + # `external_customer_id` with your own identifier. See + # [Customer ID Aliases](/events-and-metrics/customer-aliases) for further + # information about how these aliases work in Orb. + # + # In addition to having an identifier in your system, a customer may exist in a + # payment provider solution like Stripe. Use the `payment_provider_id` and the + # `payment_provider` enum field to express this mapping. + # + # A customer also has a timezone (from the standard + # [IANA timezone database](https://www.iana.org/time-zones)), which defaults to + # your account's timezone. See [Timezone localization](/essentials/timezones) for + # information on what this timezone parameter influences within Orb. sig { returns(Orb::Models::Customer) } def customer end @@ -89,6 +124,8 @@ module Orb def customer=(_) end + # Determines the default memo on this subscriptions' invoices. Note that if this + # is not provided, it is determined by the plan configuration. sig { returns(T.nilable(String)) } def default_invoice_memo end @@ -97,6 +134,7 @@ module Orb def default_invoice_memo=(_) end + # The discount intervals for this subscription sorted by the start_date. sig do returns( T::Array[ @@ -134,6 +172,7 @@ module Orb def discount_intervals=(_) end + # The date Orb stops billing for this subscription. sig { returns(T.nilable(Time)) } def end_date end @@ -161,6 +200,7 @@ module Orb def invoicing_threshold=(_) end + # The maximum intervals for this subscription sorted by the start_date. sig { returns(T::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::MaximumInterval]) } def maximum_intervals end @@ -172,6 +212,10 @@ module Orb def maximum_intervals=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -180,6 +224,7 @@ module Orb def metadata=(_) end + # The minimum intervals for this subscription sorted by the start_date. sig { returns(T::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::MinimumInterval]) } def minimum_intervals end @@ -191,6 +236,10 @@ module Orb def minimum_intervals=(_) end + # Determines the difference between the invoice issue date for subscription + # invoices as the date that they are due. A value of `0` here represents that the + # invoice is due on issue, whereas a value of `30` represents that the customer + # has a month to pay the invoice. sig { returns(Integer) } def net_terms end @@ -199,6 +248,10 @@ module Orb def net_terms=(_) end + # The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be + # subscribed to by a customer. Plans define the billing behavior of the + # subscription. You can see more about how to configure prices in the + # [Price resource](/reference/price). sig { returns(Orb::Models::Plan) } def plan end @@ -207,6 +260,7 @@ module Orb def plan=(_) end + # The price intervals for this subscription. sig { returns(T::Array[Orb::Models::SubscriptionUnscheduleCancellationResponse::PriceInterval]) } def price_intervals end @@ -229,6 +283,7 @@ module Orb def redeemed_coupon=(_) end + # The date Orb starts billing for this subscription. sig { returns(Time) } def start_date end @@ -408,6 +463,7 @@ module Orb def adjustment=(_) end + # The price interval IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -416,6 +472,7 @@ module Orb def applies_to_price_interval_ids=(_) end + # The end date of the adjustment interval. sig { returns(T.nilable(Time)) } def end_date end @@ -424,6 +481,7 @@ module Orb def end_date=(_) end + # The start date of the adjustment interval. sig { returns(Time) } def start_date end @@ -492,6 +550,7 @@ module Orb def adjustment_type=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -500,6 +559,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -508,6 +569,7 @@ module Orb def is_invoice_level=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -516,6 +578,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -524,6 +587,8 @@ module Orb def reason=(_) end + # The number of usage units by which to discount the price this adjustment applies + # to in a given billing period. sig { returns(Float) } def usage_discount end @@ -590,6 +655,8 @@ module Orb def adjustment_type=(_) end + # The amount by which to discount the prices this adjustment applies to in a given + # billing period. sig { returns(String) } def amount_discount end @@ -598,6 +665,7 @@ module Orb def amount_discount=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -606,6 +674,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -614,6 +684,7 @@ module Orb def is_invoice_level=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -622,6 +693,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -688,6 +760,7 @@ module Orb def adjustment_type=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -696,6 +769,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -704,6 +779,8 @@ module Orb def is_invoice_level=(_) end + # The percentage (as a value between 0 and 1) by which to discount the price + # intervals this adjustment applies to in a given billing period. sig { returns(Float) } def percentage_discount end @@ -712,6 +789,7 @@ module Orb def percentage_discount=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -720,6 +798,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -786,6 +865,7 @@ module Orb def adjustment_type=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -794,6 +874,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -802,6 +884,7 @@ module Orb def is_invoice_level=(_) end + # The item ID that revenue from this minimum will be attributed to. sig { returns(String) } def item_id end @@ -810,6 +893,8 @@ module Orb def item_id=(_) end + # The minimum amount to charge in a given billing period for the prices this + # adjustment applies to. sig { returns(String) } def minimum_amount end @@ -818,6 +903,7 @@ module Orb def minimum_amount=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -826,6 +912,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -895,6 +982,7 @@ module Orb def adjustment_type=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -903,6 +991,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -911,6 +1001,8 @@ module Orb def is_invoice_level=(_) end + # The maximum amount to charge in a given billing period for the prices this + # adjustment applies to. sig { returns(String) } def maximum_amount end @@ -919,6 +1011,7 @@ module Orb def maximum_amount=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -927,6 +1020,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -980,16 +1074,20 @@ module Orb sig do override .returns( - [[Symbol, Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment], [Symbol, Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment], [Symbol, Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment], [Symbol, Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment], [Symbol, Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment]] + [Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment] ) end - private def variants + def variants end end end end class BillingCycleAnchorConfiguration < Orb::BaseModel + # The day of the month on which the billing cycle is anchored. If the maximum + # number of days in a month is greater than this value, the last day of the month + # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing + # period begins on the 30th. sig { returns(Integer) } def day end @@ -998,6 +1096,9 @@ module Orb def day=(_) end + # The month on which the billing cycle is anchored (e.g. a quarterly price + # anchored in February would have cycles starting February, May, August, and + # November). sig { returns(T.nilable(Integer)) } def month end @@ -1006,6 +1107,8 @@ module Orb def month=(_) end + # The year on which the billing cycle is anchored (e.g. a 2 year billing cycle + # anchored on 2021 would have cycles starting on 2021, 2023, 2025, etc.). sig { returns(T.nilable(Integer)) } def year end @@ -1029,6 +1132,7 @@ module Orb abstract! class AmountDiscountInterval < Orb::BaseModel + # Only available if discount_type is `amount`. sig { returns(String) } def amount_discount end @@ -1037,6 +1141,7 @@ module Orb def amount_discount=(_) end + # The price ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1045,6 +1150,7 @@ module Orb def applies_to_price_ids=(_) end + # The price interval ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -1061,6 +1167,7 @@ module Orb def discount_type=(_) end + # The end date of the discount interval. sig { returns(T.nilable(Time)) } def end_date end @@ -1069,6 +1176,7 @@ module Orb def end_date=(_) end + # The start date of the discount interval. sig { returns(Time) } def start_date end @@ -1116,6 +1224,7 @@ module Orb end class PercentageDiscountInterval < Orb::BaseModel + # The price ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1124,6 +1233,7 @@ module Orb def applies_to_price_ids=(_) end + # The price interval ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -1140,6 +1250,7 @@ module Orb def discount_type=(_) end + # The end date of the discount interval. sig { returns(T.nilable(Time)) } def end_date end @@ -1148,6 +1259,8 @@ module Orb def end_date=(_) end + # Only available if discount_type is `percentage`.This is a number between 0 + # and 1. sig { returns(Float) } def percentage_discount end @@ -1156,6 +1269,7 @@ module Orb def percentage_discount=(_) end + # The start date of the discount interval. sig { returns(Time) } def start_date end @@ -1203,6 +1317,7 @@ module Orb end class UsageDiscountInterval < Orb::BaseModel + # The price ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1211,6 +1326,7 @@ module Orb def applies_to_price_ids=(_) end + # The price interval ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -1227,6 +1343,7 @@ module Orb def discount_type=(_) end + # The end date of the discount interval. sig { returns(T.nilable(Time)) } def end_date end @@ -1235,6 +1352,7 @@ module Orb def end_date=(_) end + # The start date of the discount interval. sig { returns(Time) } def start_date end @@ -1243,6 +1361,8 @@ module Orb def start_date=(_) end + # Only available if discount_type is `usage`. Number of usage units that this + # discount is for sig { returns(Float) } def usage_discount end @@ -1293,10 +1413,10 @@ module Orb sig do override .returns( - [[Symbol, Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::AmountDiscountInterval], [Symbol, Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::PercentageDiscountInterval], [Symbol, Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::UsageDiscountInterval]] + [Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::AmountDiscountInterval, Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::PercentageDiscountInterval, Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::UsageDiscountInterval] ) end - private def variants + def variants end end end @@ -1349,6 +1469,7 @@ module Orb end class MaximumInterval < Orb::BaseModel + # The price ids that this maximum interval applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1357,6 +1478,7 @@ module Orb def applies_to_price_ids=(_) end + # The price interval ids that this maximum interval applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -1365,6 +1487,7 @@ module Orb def applies_to_price_interval_ids=(_) end + # The end date of the maximum interval. sig { returns(T.nilable(Time)) } def end_date end @@ -1373,6 +1496,8 @@ module Orb def end_date=(_) end + # The maximum amount to charge in a given billing period for the price intervals + # this transform applies to. sig { returns(String) } def maximum_amount end @@ -1381,6 +1506,7 @@ module Orb def maximum_amount=(_) end + # The start date of the maximum interval. sig { returns(Time) } def start_date end @@ -1419,6 +1545,7 @@ module Orb end class MinimumInterval < Orb::BaseModel + # The price ids that this minimum interval applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1427,6 +1554,7 @@ module Orb def applies_to_price_ids=(_) end + # The price interval ids that this minimum interval applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -1435,6 +1563,7 @@ module Orb def applies_to_price_interval_ids=(_) end + # The end date of the minimum interval. sig { returns(T.nilable(Time)) } def end_date end @@ -1443,6 +1572,8 @@ module Orb def end_date=(_) end + # The minimum amount to charge in a given billing period for the price intervals + # this minimum applies to. sig { returns(String) } def minimum_amount end @@ -1451,6 +1582,7 @@ module Orb def minimum_amount=(_) end + # The start date of the minimum interval. sig { returns(Time) } def start_date end @@ -1497,6 +1629,7 @@ module Orb def id=(_) end + # The day of the month that Orb bills for this price sig { returns(Integer) } def billing_cycle_day end @@ -1505,6 +1638,9 @@ module Orb def billing_cycle_day=(_) end + # The end of the current billing period. This is an exclusive timestamp, such that + # the instant returned is exactly the end of the billing period. Set to null if + # this price interval is not currently active. sig { returns(T.nilable(Time)) } def current_billing_period_end_date end @@ -1513,6 +1649,9 @@ module Orb def current_billing_period_end_date=(_) end + # The start date of the current billing period. This is an inclusive timestamp; + # the instant returned is exactly the beginning of the billing period. Set to null + # if this price interval is not currently active. sig { returns(T.nilable(Time)) } def current_billing_period_start_date end @@ -1521,6 +1660,8 @@ module Orb def current_billing_period_start_date=(_) end + # The end date of the price interval. This is the date that Orb stops billing for + # this price. sig { returns(T.nilable(Time)) } def end_date end @@ -1529,6 +1670,7 @@ module Orb def end_date=(_) end + # An additional filter to apply to usage queries. sig { returns(T.nilable(String)) } def filter end @@ -1537,6 +1679,8 @@ module Orb def filter=(_) end + # The fixed fee quantity transitions for this price interval. This is only + # relevant for fixed fees. sig do returns( T.nilable( @@ -1562,6 +1706,16 @@ module Orb def fixed_fee_quantity_transitions=(_) end + # The Price resource represents a price that can be billed on a subscription, + # resulting in a charge on an invoice in the form of an invoice line item. Prices + # take a quantity and determine an amount to bill. + # + # Orb supports a few different pricing models out of the box. Each of these models + # is serialized differently in a given Price object. The model_type field + # determines the key for the configuration object that is present. + # + # For more on the types of prices, see + # [the core concepts documentation](/core-concepts#plan-and-price) sig do returns( T.any( @@ -1668,6 +1822,8 @@ module Orb def price=(_) end + # The start date of the price interval. This is the date that Orb starts billing + # for this price. sig { returns(Time) } def start_date end @@ -1676,6 +1832,8 @@ module Orb def start_date=(_) end + # A list of customer IDs whose usage events will be aggregated and billed under + # this price interval. sig { returns(T.nilable(T::Array[String])) } def usage_customer_ids end @@ -1684,6 +1842,9 @@ module Orb def usage_customer_ids=(_) end + # The Price Interval resource represents a period of time for which a price will + # bill on a subscription. A subscription’s price intervals define its billing + # behavior. sig do params( id: String, diff --git a/rbi/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbi b/rbi/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbi index b1a644e7..8e24e278 100644 --- a/rbi/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbi +++ b/rbi/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbi @@ -6,6 +6,7 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters + # Price for which the updates should be cleared. Must be a fixed fee. sig { returns(String) } def price_id end diff --git a/rbi/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbi b/rbi/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbi index 292455aa..d4097ecf 100644 --- a/rbi/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbi +++ b/rbi/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbi @@ -11,6 +11,8 @@ module Orb def id=(_) end + # The current plan phase that is active, only if the subscription's plan has + # phases. sig { returns(T.nilable(Integer)) } def active_plan_phase_order end @@ -19,6 +21,8 @@ module Orb def active_plan_phase_order=(_) end + # The adjustment intervals for this subscription sorted by the start_date of the + # adjustment interval. sig { returns(T::Array[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval]) } def adjustment_intervals end @@ -32,6 +36,9 @@ module Orb def adjustment_intervals=(_) end + # Determines whether issued invoices for this subscription will automatically be + # charged with the saved payment method on the due date. This property defaults to + # the plan's behavior. If null, defaults to the customer's setting. sig { returns(T.nilable(T::Boolean)) } def auto_collection end @@ -59,6 +66,10 @@ module Orb def billing_cycle_anchor_configuration=(_) end + # The day of the month on which the billing cycle is anchored. If the maximum + # number of days in a month is greater than this value, the last day of the month + # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing + # period begins on the 30th. sig { returns(Integer) } def billing_cycle_day end @@ -75,6 +86,9 @@ module Orb def created_at=(_) end + # The end of the current billing period. This is an exclusive timestamp, such that + # the instant returned is not part of the billing period. Set to null for + # subscriptions that are not currently active. sig { returns(T.nilable(Time)) } def current_billing_period_end_date end @@ -83,6 +97,9 @@ module Orb def current_billing_period_end_date=(_) end + # The start date of the current billing period. This is an inclusive timestamp; + # the instant returned is exactly the beginning of the billing period. Set to null + # if the subscription is not currently active. sig { returns(T.nilable(Time)) } def current_billing_period_start_date end @@ -91,6 +108,24 @@ module Orb def current_billing_period_start_date=(_) end + # A customer is a buyer of your products, and the other party to the billing + # relationship. + # + # In Orb, customers are assigned system generated identifiers automatically, but + # it's often desirable to have these match existing identifiers in your system. To + # avoid having to denormalize Orb ID information, you can pass in an + # `external_customer_id` with your own identifier. See + # [Customer ID Aliases](/events-and-metrics/customer-aliases) for further + # information about how these aliases work in Orb. + # + # In addition to having an identifier in your system, a customer may exist in a + # payment provider solution like Stripe. Use the `payment_provider_id` and the + # `payment_provider` enum field to express this mapping. + # + # A customer also has a timezone (from the standard + # [IANA timezone database](https://www.iana.org/time-zones)), which defaults to + # your account's timezone. See [Timezone localization](/essentials/timezones) for + # information on what this timezone parameter influences within Orb. sig { returns(Orb::Models::Customer) } def customer end @@ -99,6 +134,8 @@ module Orb def customer=(_) end + # Determines the default memo on this subscriptions' invoices. Note that if this + # is not provided, it is determined by the plan configuration. sig { returns(T.nilable(String)) } def default_invoice_memo end @@ -107,6 +144,7 @@ module Orb def default_invoice_memo=(_) end + # The discount intervals for this subscription sorted by the start_date. sig do returns( T::Array[ @@ -144,6 +182,7 @@ module Orb def discount_intervals=(_) end + # The date Orb stops billing for this subscription. sig { returns(T.nilable(Time)) } def end_date end @@ -179,6 +218,7 @@ module Orb def invoicing_threshold=(_) end + # The maximum intervals for this subscription sorted by the start_date. sig { returns(T::Array[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::MaximumInterval]) } def maximum_intervals end @@ -190,6 +230,10 @@ module Orb def maximum_intervals=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -198,6 +242,7 @@ module Orb def metadata=(_) end + # The minimum intervals for this subscription sorted by the start_date. sig { returns(T::Array[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::MinimumInterval]) } def minimum_intervals end @@ -209,6 +254,10 @@ module Orb def minimum_intervals=(_) end + # Determines the difference between the invoice issue date for subscription + # invoices as the date that they are due. A value of `0` here represents that the + # invoice is due on issue, whereas a value of `30` represents that the customer + # has a month to pay the invoice. sig { returns(Integer) } def net_terms end @@ -217,6 +266,10 @@ module Orb def net_terms=(_) end + # The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be + # subscribed to by a customer. Plans define the billing behavior of the + # subscription. You can see more about how to configure prices in the + # [Price resource](/reference/price). sig { returns(Orb::Models::Plan) } def plan end @@ -225,6 +278,7 @@ module Orb def plan=(_) end + # The price intervals for this subscription. sig { returns(T::Array[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::PriceInterval]) } def price_intervals end @@ -247,6 +301,7 @@ module Orb def redeemed_coupon=(_) end + # The date Orb starts billing for this subscription. sig { returns(Time) } def start_date end @@ -426,6 +481,7 @@ module Orb def adjustment=(_) end + # The price interval IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -434,6 +490,7 @@ module Orb def applies_to_price_interval_ids=(_) end + # The end date of the adjustment interval. sig { returns(T.nilable(Time)) } def end_date end @@ -442,6 +499,7 @@ module Orb def end_date=(_) end + # The start date of the adjustment interval. sig { returns(Time) } def start_date end @@ -510,6 +568,7 @@ module Orb def adjustment_type=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -518,6 +577,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -526,6 +587,7 @@ module Orb def is_invoice_level=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -534,6 +596,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -542,6 +605,8 @@ module Orb def reason=(_) end + # The number of usage units by which to discount the price this adjustment applies + # to in a given billing period. sig { returns(Float) } def usage_discount end @@ -608,6 +673,8 @@ module Orb def adjustment_type=(_) end + # The amount by which to discount the prices this adjustment applies to in a given + # billing period. sig { returns(String) } def amount_discount end @@ -616,6 +683,7 @@ module Orb def amount_discount=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -624,6 +692,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -632,6 +702,7 @@ module Orb def is_invoice_level=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -640,6 +711,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -706,6 +778,7 @@ module Orb def adjustment_type=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -714,6 +787,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -722,6 +797,8 @@ module Orb def is_invoice_level=(_) end + # The percentage (as a value between 0 and 1) by which to discount the price + # intervals this adjustment applies to in a given billing period. sig { returns(Float) } def percentage_discount end @@ -730,6 +807,7 @@ module Orb def percentage_discount=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -738,6 +816,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -804,6 +883,7 @@ module Orb def adjustment_type=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -812,6 +892,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -820,6 +902,7 @@ module Orb def is_invoice_level=(_) end + # The item ID that revenue from this minimum will be attributed to. sig { returns(String) } def item_id end @@ -828,6 +911,8 @@ module Orb def item_id=(_) end + # The minimum amount to charge in a given billing period for the prices this + # adjustment applies to. sig { returns(String) } def minimum_amount end @@ -836,6 +921,7 @@ module Orb def minimum_amount=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -844,6 +930,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -913,6 +1000,7 @@ module Orb def adjustment_type=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -921,6 +1009,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -929,6 +1019,8 @@ module Orb def is_invoice_level=(_) end + # The maximum amount to charge in a given billing period for the prices this + # adjustment applies to. sig { returns(String) } def maximum_amount end @@ -937,6 +1029,7 @@ module Orb def maximum_amount=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -945,6 +1038,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -998,16 +1092,20 @@ module Orb sig do override .returns( - [[Symbol, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment], [Symbol, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment], [Symbol, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment], [Symbol, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment], [Symbol, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment]] + [Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment] ) end - private def variants + def variants end end end end class BillingCycleAnchorConfiguration < Orb::BaseModel + # The day of the month on which the billing cycle is anchored. If the maximum + # number of days in a month is greater than this value, the last day of the month + # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing + # period begins on the 30th. sig { returns(Integer) } def day end @@ -1016,6 +1114,9 @@ module Orb def day=(_) end + # The month on which the billing cycle is anchored (e.g. a quarterly price + # anchored in February would have cycles starting February, May, August, and + # November). sig { returns(T.nilable(Integer)) } def month end @@ -1024,6 +1125,8 @@ module Orb def month=(_) end + # The year on which the billing cycle is anchored (e.g. a 2 year billing cycle + # anchored on 2021 would have cycles starting on 2021, 2023, 2025, etc.). sig { returns(T.nilable(Integer)) } def year end @@ -1047,6 +1150,7 @@ module Orb abstract! class AmountDiscountInterval < Orb::BaseModel + # Only available if discount_type is `amount`. sig { returns(String) } def amount_discount end @@ -1055,6 +1159,7 @@ module Orb def amount_discount=(_) end + # The price ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1063,6 +1168,7 @@ module Orb def applies_to_price_ids=(_) end + # The price interval ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -1079,6 +1185,7 @@ module Orb def discount_type=(_) end + # The end date of the discount interval. sig { returns(T.nilable(Time)) } def end_date end @@ -1087,6 +1194,7 @@ module Orb def end_date=(_) end + # The start date of the discount interval. sig { returns(Time) } def start_date end @@ -1134,6 +1242,7 @@ module Orb end class PercentageDiscountInterval < Orb::BaseModel + # The price ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1142,6 +1251,7 @@ module Orb def applies_to_price_ids=(_) end + # The price interval ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -1158,6 +1268,7 @@ module Orb def discount_type=(_) end + # The end date of the discount interval. sig { returns(T.nilable(Time)) } def end_date end @@ -1166,6 +1277,8 @@ module Orb def end_date=(_) end + # Only available if discount_type is `percentage`.This is a number between 0 + # and 1. sig { returns(Float) } def percentage_discount end @@ -1174,6 +1287,7 @@ module Orb def percentage_discount=(_) end + # The start date of the discount interval. sig { returns(Time) } def start_date end @@ -1221,6 +1335,7 @@ module Orb end class UsageDiscountInterval < Orb::BaseModel + # The price ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1229,6 +1344,7 @@ module Orb def applies_to_price_ids=(_) end + # The price interval ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -1245,6 +1361,7 @@ module Orb def discount_type=(_) end + # The end date of the discount interval. sig { returns(T.nilable(Time)) } def end_date end @@ -1253,6 +1370,7 @@ module Orb def end_date=(_) end + # The start date of the discount interval. sig { returns(Time) } def start_date end @@ -1261,6 +1379,8 @@ module Orb def start_date=(_) end + # Only available if discount_type is `usage`. Number of usage units that this + # discount is for sig { returns(Float) } def usage_discount end @@ -1311,10 +1431,10 @@ module Orb sig do override .returns( - [[Symbol, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::AmountDiscountInterval], [Symbol, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::PercentageDiscountInterval], [Symbol, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::UsageDiscountInterval]] + [Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::AmountDiscountInterval, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::PercentageDiscountInterval, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::UsageDiscountInterval] ) end - private def variants + def variants end end end @@ -1367,6 +1487,7 @@ module Orb end class MaximumInterval < Orb::BaseModel + # The price ids that this maximum interval applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1375,6 +1496,7 @@ module Orb def applies_to_price_ids=(_) end + # The price interval ids that this maximum interval applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -1383,6 +1505,7 @@ module Orb def applies_to_price_interval_ids=(_) end + # The end date of the maximum interval. sig { returns(T.nilable(Time)) } def end_date end @@ -1391,6 +1514,8 @@ module Orb def end_date=(_) end + # The maximum amount to charge in a given billing period for the price intervals + # this transform applies to. sig { returns(String) } def maximum_amount end @@ -1399,6 +1524,7 @@ module Orb def maximum_amount=(_) end + # The start date of the maximum interval. sig { returns(Time) } def start_date end @@ -1437,6 +1563,7 @@ module Orb end class MinimumInterval < Orb::BaseModel + # The price ids that this minimum interval applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1445,6 +1572,7 @@ module Orb def applies_to_price_ids=(_) end + # The price interval ids that this minimum interval applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -1453,6 +1581,7 @@ module Orb def applies_to_price_interval_ids=(_) end + # The end date of the minimum interval. sig { returns(T.nilable(Time)) } def end_date end @@ -1461,6 +1590,8 @@ module Orb def end_date=(_) end + # The minimum amount to charge in a given billing period for the price intervals + # this minimum applies to. sig { returns(String) } def minimum_amount end @@ -1469,6 +1600,7 @@ module Orb def minimum_amount=(_) end + # The start date of the minimum interval. sig { returns(Time) } def start_date end @@ -1515,6 +1647,7 @@ module Orb def id=(_) end + # The day of the month that Orb bills for this price sig { returns(Integer) } def billing_cycle_day end @@ -1523,6 +1656,9 @@ module Orb def billing_cycle_day=(_) end + # The end of the current billing period. This is an exclusive timestamp, such that + # the instant returned is exactly the end of the billing period. Set to null if + # this price interval is not currently active. sig { returns(T.nilable(Time)) } def current_billing_period_end_date end @@ -1531,6 +1667,9 @@ module Orb def current_billing_period_end_date=(_) end + # The start date of the current billing period. This is an inclusive timestamp; + # the instant returned is exactly the beginning of the billing period. Set to null + # if this price interval is not currently active. sig { returns(T.nilable(Time)) } def current_billing_period_start_date end @@ -1539,6 +1678,8 @@ module Orb def current_billing_period_start_date=(_) end + # The end date of the price interval. This is the date that Orb stops billing for + # this price. sig { returns(T.nilable(Time)) } def end_date end @@ -1547,6 +1688,7 @@ module Orb def end_date=(_) end + # An additional filter to apply to usage queries. sig { returns(T.nilable(String)) } def filter end @@ -1555,6 +1697,8 @@ module Orb def filter=(_) end + # The fixed fee quantity transitions for this price interval. This is only + # relevant for fixed fees. sig do returns( T.nilable( @@ -1586,6 +1730,16 @@ module Orb def fixed_fee_quantity_transitions=(_) end + # The Price resource represents a price that can be billed on a subscription, + # resulting in a charge on an invoice in the form of an invoice line item. Prices + # take a quantity and determine an amount to bill. + # + # Orb supports a few different pricing models out of the box. Each of these models + # is serialized differently in a given Price object. The model_type field + # determines the key for the configuration object that is present. + # + # For more on the types of prices, see + # [the core concepts documentation](/core-concepts#plan-and-price) sig do returns( T.any( @@ -1692,6 +1846,8 @@ module Orb def price=(_) end + # The start date of the price interval. This is the date that Orb starts billing + # for this price. sig { returns(Time) } def start_date end @@ -1700,6 +1856,8 @@ module Orb def start_date=(_) end + # A list of customer IDs whose usage events will be aggregated and billed under + # this price interval. sig { returns(T.nilable(T::Array[String])) } def usage_customer_ids end @@ -1708,6 +1866,9 @@ module Orb def usage_customer_ids=(_) end + # The Price Interval resource represents a period of time for which a price will + # bill on a subscription. A subscription’s price intervals define its billing + # behavior. sig do params( id: String, diff --git a/rbi/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rbi b/rbi/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rbi index 755aa546..c10ea81a 100644 --- a/rbi/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rbi +++ b/rbi/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rbi @@ -11,6 +11,8 @@ module Orb def id=(_) end + # The current plan phase that is active, only if the subscription's plan has + # phases. sig { returns(T.nilable(Integer)) } def active_plan_phase_order end @@ -19,6 +21,8 @@ module Orb def active_plan_phase_order=(_) end + # The adjustment intervals for this subscription sorted by the start_date of the + # adjustment interval. sig { returns(T::Array[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval]) } def adjustment_intervals end @@ -30,6 +34,9 @@ module Orb def adjustment_intervals=(_) end + # Determines whether issued invoices for this subscription will automatically be + # charged with the saved payment method on the due date. This property defaults to + # the plan's behavior. If null, defaults to the customer's setting. sig { returns(T.nilable(T::Boolean)) } def auto_collection end @@ -49,6 +56,10 @@ module Orb def billing_cycle_anchor_configuration=(_) end + # The day of the month on which the billing cycle is anchored. If the maximum + # number of days in a month is greater than this value, the last day of the month + # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing + # period begins on the 30th. sig { returns(Integer) } def billing_cycle_day end @@ -65,6 +76,9 @@ module Orb def created_at=(_) end + # The end of the current billing period. This is an exclusive timestamp, such that + # the instant returned is not part of the billing period. Set to null for + # subscriptions that are not currently active. sig { returns(T.nilable(Time)) } def current_billing_period_end_date end @@ -73,6 +87,9 @@ module Orb def current_billing_period_end_date=(_) end + # The start date of the current billing period. This is an inclusive timestamp; + # the instant returned is exactly the beginning of the billing period. Set to null + # if the subscription is not currently active. sig { returns(T.nilable(Time)) } def current_billing_period_start_date end @@ -81,6 +98,24 @@ module Orb def current_billing_period_start_date=(_) end + # A customer is a buyer of your products, and the other party to the billing + # relationship. + # + # In Orb, customers are assigned system generated identifiers automatically, but + # it's often desirable to have these match existing identifiers in your system. To + # avoid having to denormalize Orb ID information, you can pass in an + # `external_customer_id` with your own identifier. See + # [Customer ID Aliases](/events-and-metrics/customer-aliases) for further + # information about how these aliases work in Orb. + # + # In addition to having an identifier in your system, a customer may exist in a + # payment provider solution like Stripe. Use the `payment_provider_id` and the + # `payment_provider` enum field to express this mapping. + # + # A customer also has a timezone (from the standard + # [IANA timezone database](https://www.iana.org/time-zones)), which defaults to + # your account's timezone. See [Timezone localization](/essentials/timezones) for + # information on what this timezone parameter influences within Orb. sig { returns(Orb::Models::Customer) } def customer end @@ -89,6 +124,8 @@ module Orb def customer=(_) end + # Determines the default memo on this subscriptions' invoices. Note that if this + # is not provided, it is determined by the plan configuration. sig { returns(T.nilable(String)) } def default_invoice_memo end @@ -97,6 +134,7 @@ module Orb def default_invoice_memo=(_) end + # The discount intervals for this subscription sorted by the start_date. sig do returns( T::Array[ @@ -134,6 +172,7 @@ module Orb def discount_intervals=(_) end + # The date Orb stops billing for this subscription. sig { returns(T.nilable(Time)) } def end_date end @@ -163,6 +202,7 @@ module Orb def invoicing_threshold=(_) end + # The maximum intervals for this subscription sorted by the start_date. sig { returns(T::Array[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::MaximumInterval]) } def maximum_intervals end @@ -174,6 +214,10 @@ module Orb def maximum_intervals=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -182,6 +226,7 @@ module Orb def metadata=(_) end + # The minimum intervals for this subscription sorted by the start_date. sig { returns(T::Array[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::MinimumInterval]) } def minimum_intervals end @@ -193,6 +238,10 @@ module Orb def minimum_intervals=(_) end + # Determines the difference between the invoice issue date for subscription + # invoices as the date that they are due. A value of `0` here represents that the + # invoice is due on issue, whereas a value of `30` represents that the customer + # has a month to pay the invoice. sig { returns(Integer) } def net_terms end @@ -201,6 +250,10 @@ module Orb def net_terms=(_) end + # The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be + # subscribed to by a customer. Plans define the billing behavior of the + # subscription. You can see more about how to configure prices in the + # [Price resource](/reference/price). sig { returns(Orb::Models::Plan) } def plan end @@ -209,6 +262,7 @@ module Orb def plan=(_) end + # The price intervals for this subscription. sig { returns(T::Array[Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::PriceInterval]) } def price_intervals end @@ -231,6 +285,7 @@ module Orb def redeemed_coupon=(_) end + # The date Orb starts billing for this subscription. sig { returns(Time) } def start_date end @@ -410,6 +465,7 @@ module Orb def adjustment=(_) end + # The price interval IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -418,6 +474,7 @@ module Orb def applies_to_price_interval_ids=(_) end + # The end date of the adjustment interval. sig { returns(T.nilable(Time)) } def end_date end @@ -426,6 +483,7 @@ module Orb def end_date=(_) end + # The start date of the adjustment interval. sig { returns(Time) } def start_date end @@ -494,6 +552,7 @@ module Orb def adjustment_type=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -502,6 +561,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -510,6 +571,7 @@ module Orb def is_invoice_level=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -518,6 +580,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -526,6 +589,8 @@ module Orb def reason=(_) end + # The number of usage units by which to discount the price this adjustment applies + # to in a given billing period. sig { returns(Float) } def usage_discount end @@ -592,6 +657,8 @@ module Orb def adjustment_type=(_) end + # The amount by which to discount the prices this adjustment applies to in a given + # billing period. sig { returns(String) } def amount_discount end @@ -600,6 +667,7 @@ module Orb def amount_discount=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -608,6 +676,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -616,6 +686,7 @@ module Orb def is_invoice_level=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -624,6 +695,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -690,6 +762,7 @@ module Orb def adjustment_type=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -698,6 +771,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -706,6 +781,8 @@ module Orb def is_invoice_level=(_) end + # The percentage (as a value between 0 and 1) by which to discount the price + # intervals this adjustment applies to in a given billing period. sig { returns(Float) } def percentage_discount end @@ -714,6 +791,7 @@ module Orb def percentage_discount=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -722,6 +800,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -788,6 +867,7 @@ module Orb def adjustment_type=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -796,6 +876,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -804,6 +886,7 @@ module Orb def is_invoice_level=(_) end + # The item ID that revenue from this minimum will be attributed to. sig { returns(String) } def item_id end @@ -812,6 +895,8 @@ module Orb def item_id=(_) end + # The minimum amount to charge in a given billing period for the prices this + # adjustment applies to. sig { returns(String) } def minimum_amount end @@ -820,6 +905,7 @@ module Orb def minimum_amount=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -828,6 +914,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -897,6 +984,7 @@ module Orb def adjustment_type=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -905,6 +993,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -913,6 +1003,8 @@ module Orb def is_invoice_level=(_) end + # The maximum amount to charge in a given billing period for the prices this + # adjustment applies to. sig { returns(String) } def maximum_amount end @@ -921,6 +1013,7 @@ module Orb def maximum_amount=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -929,6 +1022,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -982,16 +1076,20 @@ module Orb sig do override .returns( - [[Symbol, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment], [Symbol, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment], [Symbol, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment], [Symbol, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment], [Symbol, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment]] + [Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment] ) end - private def variants + def variants end end end end class BillingCycleAnchorConfiguration < Orb::BaseModel + # The day of the month on which the billing cycle is anchored. If the maximum + # number of days in a month is greater than this value, the last day of the month + # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing + # period begins on the 30th. sig { returns(Integer) } def day end @@ -1000,6 +1098,9 @@ module Orb def day=(_) end + # The month on which the billing cycle is anchored (e.g. a quarterly price + # anchored in February would have cycles starting February, May, August, and + # November). sig { returns(T.nilable(Integer)) } def month end @@ -1008,6 +1109,8 @@ module Orb def month=(_) end + # The year on which the billing cycle is anchored (e.g. a 2 year billing cycle + # anchored on 2021 would have cycles starting on 2021, 2023, 2025, etc.). sig { returns(T.nilable(Integer)) } def year end @@ -1031,6 +1134,7 @@ module Orb abstract! class AmountDiscountInterval < Orb::BaseModel + # Only available if discount_type is `amount`. sig { returns(String) } def amount_discount end @@ -1039,6 +1143,7 @@ module Orb def amount_discount=(_) end + # The price ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1047,6 +1152,7 @@ module Orb def applies_to_price_ids=(_) end + # The price interval ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -1063,6 +1169,7 @@ module Orb def discount_type=(_) end + # The end date of the discount interval. sig { returns(T.nilable(Time)) } def end_date end @@ -1071,6 +1178,7 @@ module Orb def end_date=(_) end + # The start date of the discount interval. sig { returns(Time) } def start_date end @@ -1118,6 +1226,7 @@ module Orb end class PercentageDiscountInterval < Orb::BaseModel + # The price ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1126,6 +1235,7 @@ module Orb def applies_to_price_ids=(_) end + # The price interval ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -1142,6 +1252,7 @@ module Orb def discount_type=(_) end + # The end date of the discount interval. sig { returns(T.nilable(Time)) } def end_date end @@ -1150,6 +1261,8 @@ module Orb def end_date=(_) end + # Only available if discount_type is `percentage`.This is a number between 0 + # and 1. sig { returns(Float) } def percentage_discount end @@ -1158,6 +1271,7 @@ module Orb def percentage_discount=(_) end + # The start date of the discount interval. sig { returns(Time) } def start_date end @@ -1205,6 +1319,7 @@ module Orb end class UsageDiscountInterval < Orb::BaseModel + # The price ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1213,6 +1328,7 @@ module Orb def applies_to_price_ids=(_) end + # The price interval ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -1229,6 +1345,7 @@ module Orb def discount_type=(_) end + # The end date of the discount interval. sig { returns(T.nilable(Time)) } def end_date end @@ -1237,6 +1354,7 @@ module Orb def end_date=(_) end + # The start date of the discount interval. sig { returns(Time) } def start_date end @@ -1245,6 +1363,8 @@ module Orb def start_date=(_) end + # Only available if discount_type is `usage`. Number of usage units that this + # discount is for sig { returns(Float) } def usage_discount end @@ -1295,10 +1415,10 @@ module Orb sig do override .returns( - [[Symbol, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::AmountDiscountInterval], [Symbol, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::PercentageDiscountInterval], [Symbol, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::UsageDiscountInterval]] + [Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::AmountDiscountInterval, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::PercentageDiscountInterval, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::UsageDiscountInterval] ) end - private def variants + def variants end end end @@ -1351,6 +1471,7 @@ module Orb end class MaximumInterval < Orb::BaseModel + # The price ids that this maximum interval applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1359,6 +1480,7 @@ module Orb def applies_to_price_ids=(_) end + # The price interval ids that this maximum interval applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -1367,6 +1489,7 @@ module Orb def applies_to_price_interval_ids=(_) end + # The end date of the maximum interval. sig { returns(T.nilable(Time)) } def end_date end @@ -1375,6 +1498,8 @@ module Orb def end_date=(_) end + # The maximum amount to charge in a given billing period for the price intervals + # this transform applies to. sig { returns(String) } def maximum_amount end @@ -1383,6 +1508,7 @@ module Orb def maximum_amount=(_) end + # The start date of the maximum interval. sig { returns(Time) } def start_date end @@ -1421,6 +1547,7 @@ module Orb end class MinimumInterval < Orb::BaseModel + # The price ids that this minimum interval applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1429,6 +1556,7 @@ module Orb def applies_to_price_ids=(_) end + # The price interval ids that this minimum interval applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -1437,6 +1565,7 @@ module Orb def applies_to_price_interval_ids=(_) end + # The end date of the minimum interval. sig { returns(T.nilable(Time)) } def end_date end @@ -1445,6 +1574,8 @@ module Orb def end_date=(_) end + # The minimum amount to charge in a given billing period for the price intervals + # this minimum applies to. sig { returns(String) } def minimum_amount end @@ -1453,6 +1584,7 @@ module Orb def minimum_amount=(_) end + # The start date of the minimum interval. sig { returns(Time) } def start_date end @@ -1499,6 +1631,7 @@ module Orb def id=(_) end + # The day of the month that Orb bills for this price sig { returns(Integer) } def billing_cycle_day end @@ -1507,6 +1640,9 @@ module Orb def billing_cycle_day=(_) end + # The end of the current billing period. This is an exclusive timestamp, such that + # the instant returned is exactly the end of the billing period. Set to null if + # this price interval is not currently active. sig { returns(T.nilable(Time)) } def current_billing_period_end_date end @@ -1515,6 +1651,9 @@ module Orb def current_billing_period_end_date=(_) end + # The start date of the current billing period. This is an inclusive timestamp; + # the instant returned is exactly the beginning of the billing period. Set to null + # if this price interval is not currently active. sig { returns(T.nilable(Time)) } def current_billing_period_start_date end @@ -1523,6 +1662,8 @@ module Orb def current_billing_period_start_date=(_) end + # The end date of the price interval. This is the date that Orb stops billing for + # this price. sig { returns(T.nilable(Time)) } def end_date end @@ -1531,6 +1672,7 @@ module Orb def end_date=(_) end + # An additional filter to apply to usage queries. sig { returns(T.nilable(String)) } def filter end @@ -1539,6 +1681,8 @@ module Orb def filter=(_) end + # The fixed fee quantity transitions for this price interval. This is only + # relevant for fixed fees. sig do returns( T.nilable( @@ -1564,6 +1708,16 @@ module Orb def fixed_fee_quantity_transitions=(_) end + # The Price resource represents a price that can be billed on a subscription, + # resulting in a charge on an invoice in the form of an invoice line item. Prices + # take a quantity and determine an amount to bill. + # + # Orb supports a few different pricing models out of the box. Each of these models + # is serialized differently in a given Price object. The model_type field + # determines the key for the configuration object that is present. + # + # For more on the types of prices, see + # [the core concepts documentation](/core-concepts#plan-and-price) sig do returns( T.any( @@ -1670,6 +1824,8 @@ module Orb def price=(_) end + # The start date of the price interval. This is the date that Orb starts billing + # for this price. sig { returns(Time) } def start_date end @@ -1678,6 +1834,8 @@ module Orb def start_date=(_) end + # A list of customer IDs whose usage events will be aggregated and billed under + # this price interval. sig { returns(T.nilable(T::Array[String])) } def usage_customer_ids end @@ -1686,6 +1844,9 @@ module Orb def usage_customer_ids=(_) end + # The Price Interval resource represents a period of time for which a price will + # bill on a subscription. A subscription’s price intervals define its billing + # behavior. sig do params( id: String, diff --git a/rbi/lib/orb/models/subscription_update_fixed_fee_quantity_params.rbi b/rbi/lib/orb/models/subscription_update_fixed_fee_quantity_params.rbi index e4e1af74..d83ac29d 100644 --- a/rbi/lib/orb/models/subscription_update_fixed_fee_quantity_params.rbi +++ b/rbi/lib/orb/models/subscription_update_fixed_fee_quantity_params.rbi @@ -6,6 +6,7 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters + # Price for which the quantity should be updated. Must be a fixed fee. sig { returns(String) } def price_id end @@ -22,6 +23,9 @@ module Orb def quantity=(_) end + # If false, this request will fail if it would void an issued invoice or create a + # credit note. Consider using this as a safety mechanism if you do not expect + # existing invoices to be changed. sig { returns(T.nilable(T::Boolean)) } def allow_invoice_credit_or_void end @@ -30,6 +34,9 @@ module Orb def allow_invoice_credit_or_void=(_) end + # Determines when the change takes effect. Note that if `effective_date` is + # specified, this defaults to `effective_date`. Otherwise, this defaults to + # `immediate` unless it's explicitly set to `upcoming_invoice`. sig { returns(T.nilable(Symbol)) } def change_option end @@ -38,6 +45,9 @@ module Orb def change_option=(_) end + # The date that the quantity change should take effect, localized to the + # customer's timezone. Ifthis parameter is not passed in, the quantity change is + # effective according to `change_option`. sig { returns(T.nilable(Date)) } def effective_date end @@ -83,6 +93,9 @@ module Orb def to_hash end + # Determines when the change takes effect. Note that if `effective_date` is + # specified, this defaults to `effective_date`. Otherwise, this defaults to + # `immediate` unless it's explicitly set to `upcoming_invoice`. class ChangeOption < Orb::Enum abstract! diff --git a/rbi/lib/orb/models/subscription_update_fixed_fee_quantity_response.rbi b/rbi/lib/orb/models/subscription_update_fixed_fee_quantity_response.rbi index c4eed622..53778d98 100644 --- a/rbi/lib/orb/models/subscription_update_fixed_fee_quantity_response.rbi +++ b/rbi/lib/orb/models/subscription_update_fixed_fee_quantity_response.rbi @@ -11,6 +11,8 @@ module Orb def id=(_) end + # The current plan phase that is active, only if the subscription's plan has + # phases. sig { returns(T.nilable(Integer)) } def active_plan_phase_order end @@ -19,6 +21,8 @@ module Orb def active_plan_phase_order=(_) end + # The adjustment intervals for this subscription sorted by the start_date of the + # adjustment interval. sig { returns(T::Array[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval]) } def adjustment_intervals end @@ -30,6 +34,9 @@ module Orb def adjustment_intervals=(_) end + # Determines whether issued invoices for this subscription will automatically be + # charged with the saved payment method on the due date. This property defaults to + # the plan's behavior. If null, defaults to the customer's setting. sig { returns(T.nilable(T::Boolean)) } def auto_collection end @@ -49,6 +56,10 @@ module Orb def billing_cycle_anchor_configuration=(_) end + # The day of the month on which the billing cycle is anchored. If the maximum + # number of days in a month is greater than this value, the last day of the month + # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing + # period begins on the 30th. sig { returns(Integer) } def billing_cycle_day end @@ -65,6 +76,9 @@ module Orb def created_at=(_) end + # The end of the current billing period. This is an exclusive timestamp, such that + # the instant returned is not part of the billing period. Set to null for + # subscriptions that are not currently active. sig { returns(T.nilable(Time)) } def current_billing_period_end_date end @@ -73,6 +87,9 @@ module Orb def current_billing_period_end_date=(_) end + # The start date of the current billing period. This is an inclusive timestamp; + # the instant returned is exactly the beginning of the billing period. Set to null + # if the subscription is not currently active. sig { returns(T.nilable(Time)) } def current_billing_period_start_date end @@ -81,6 +98,24 @@ module Orb def current_billing_period_start_date=(_) end + # A customer is a buyer of your products, and the other party to the billing + # relationship. + # + # In Orb, customers are assigned system generated identifiers automatically, but + # it's often desirable to have these match existing identifiers in your system. To + # avoid having to denormalize Orb ID information, you can pass in an + # `external_customer_id` with your own identifier. See + # [Customer ID Aliases](/events-and-metrics/customer-aliases) for further + # information about how these aliases work in Orb. + # + # In addition to having an identifier in your system, a customer may exist in a + # payment provider solution like Stripe. Use the `payment_provider_id` and the + # `payment_provider` enum field to express this mapping. + # + # A customer also has a timezone (from the standard + # [IANA timezone database](https://www.iana.org/time-zones)), which defaults to + # your account's timezone. See [Timezone localization](/essentials/timezones) for + # information on what this timezone parameter influences within Orb. sig { returns(Orb::Models::Customer) } def customer end @@ -89,6 +124,8 @@ module Orb def customer=(_) end + # Determines the default memo on this subscriptions' invoices. Note that if this + # is not provided, it is determined by the plan configuration. sig { returns(T.nilable(String)) } def default_invoice_memo end @@ -97,6 +134,7 @@ module Orb def default_invoice_memo=(_) end + # The discount intervals for this subscription sorted by the start_date. sig do returns( T::Array[ @@ -134,6 +172,7 @@ module Orb def discount_intervals=(_) end + # The date Orb stops billing for this subscription. sig { returns(T.nilable(Time)) } def end_date end @@ -161,6 +200,7 @@ module Orb def invoicing_threshold=(_) end + # The maximum intervals for this subscription sorted by the start_date. sig { returns(T::Array[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::MaximumInterval]) } def maximum_intervals end @@ -172,6 +212,10 @@ module Orb def maximum_intervals=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -180,6 +224,7 @@ module Orb def metadata=(_) end + # The minimum intervals for this subscription sorted by the start_date. sig { returns(T::Array[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::MinimumInterval]) } def minimum_intervals end @@ -191,6 +236,10 @@ module Orb def minimum_intervals=(_) end + # Determines the difference between the invoice issue date for subscription + # invoices as the date that they are due. A value of `0` here represents that the + # invoice is due on issue, whereas a value of `30` represents that the customer + # has a month to pay the invoice. sig { returns(Integer) } def net_terms end @@ -199,6 +248,10 @@ module Orb def net_terms=(_) end + # The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be + # subscribed to by a customer. Plans define the billing behavior of the + # subscription. You can see more about how to configure prices in the + # [Price resource](/reference/price). sig { returns(Orb::Models::Plan) } def plan end @@ -207,6 +260,7 @@ module Orb def plan=(_) end + # The price intervals for this subscription. sig { returns(T::Array[Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::PriceInterval]) } def price_intervals end @@ -229,6 +283,7 @@ module Orb def redeemed_coupon=(_) end + # The date Orb starts billing for this subscription. sig { returns(Time) } def start_date end @@ -408,6 +463,7 @@ module Orb def adjustment=(_) end + # The price interval IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -416,6 +472,7 @@ module Orb def applies_to_price_interval_ids=(_) end + # The end date of the adjustment interval. sig { returns(T.nilable(Time)) } def end_date end @@ -424,6 +481,7 @@ module Orb def end_date=(_) end + # The start date of the adjustment interval. sig { returns(Time) } def start_date end @@ -492,6 +550,7 @@ module Orb def adjustment_type=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -500,6 +559,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -508,6 +569,7 @@ module Orb def is_invoice_level=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -516,6 +578,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -524,6 +587,8 @@ module Orb def reason=(_) end + # The number of usage units by which to discount the price this adjustment applies + # to in a given billing period. sig { returns(Float) } def usage_discount end @@ -590,6 +655,8 @@ module Orb def adjustment_type=(_) end + # The amount by which to discount the prices this adjustment applies to in a given + # billing period. sig { returns(String) } def amount_discount end @@ -598,6 +665,7 @@ module Orb def amount_discount=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -606,6 +674,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -614,6 +684,7 @@ module Orb def is_invoice_level=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -622,6 +693,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -688,6 +760,7 @@ module Orb def adjustment_type=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -696,6 +769,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -704,6 +779,8 @@ module Orb def is_invoice_level=(_) end + # The percentage (as a value between 0 and 1) by which to discount the price + # intervals this adjustment applies to in a given billing period. sig { returns(Float) } def percentage_discount end @@ -712,6 +789,7 @@ module Orb def percentage_discount=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -720,6 +798,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -786,6 +865,7 @@ module Orb def adjustment_type=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -794,6 +874,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -802,6 +884,7 @@ module Orb def is_invoice_level=(_) end + # The item ID that revenue from this minimum will be attributed to. sig { returns(String) } def item_id end @@ -810,6 +893,8 @@ module Orb def item_id=(_) end + # The minimum amount to charge in a given billing period for the prices this + # adjustment applies to. sig { returns(String) } def minimum_amount end @@ -818,6 +903,7 @@ module Orb def minimum_amount=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -826,6 +912,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -895,6 +982,7 @@ module Orb def adjustment_type=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -903,6 +991,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -911,6 +1001,8 @@ module Orb def is_invoice_level=(_) end + # The maximum amount to charge in a given billing period for the prices this + # adjustment applies to. sig { returns(String) } def maximum_amount end @@ -919,6 +1011,7 @@ module Orb def maximum_amount=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -927,6 +1020,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -980,16 +1074,20 @@ module Orb sig do override .returns( - [[Symbol, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment], [Symbol, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment], [Symbol, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment], [Symbol, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment], [Symbol, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment]] + [Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment] ) end - private def variants + def variants end end end end class BillingCycleAnchorConfiguration < Orb::BaseModel + # The day of the month on which the billing cycle is anchored. If the maximum + # number of days in a month is greater than this value, the last day of the month + # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing + # period begins on the 30th. sig { returns(Integer) } def day end @@ -998,6 +1096,9 @@ module Orb def day=(_) end + # The month on which the billing cycle is anchored (e.g. a quarterly price + # anchored in February would have cycles starting February, May, August, and + # November). sig { returns(T.nilable(Integer)) } def month end @@ -1006,6 +1107,8 @@ module Orb def month=(_) end + # The year on which the billing cycle is anchored (e.g. a 2 year billing cycle + # anchored on 2021 would have cycles starting on 2021, 2023, 2025, etc.). sig { returns(T.nilable(Integer)) } def year end @@ -1029,6 +1132,7 @@ module Orb abstract! class AmountDiscountInterval < Orb::BaseModel + # Only available if discount_type is `amount`. sig { returns(String) } def amount_discount end @@ -1037,6 +1141,7 @@ module Orb def amount_discount=(_) end + # The price ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1045,6 +1150,7 @@ module Orb def applies_to_price_ids=(_) end + # The price interval ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -1061,6 +1167,7 @@ module Orb def discount_type=(_) end + # The end date of the discount interval. sig { returns(T.nilable(Time)) } def end_date end @@ -1069,6 +1176,7 @@ module Orb def end_date=(_) end + # The start date of the discount interval. sig { returns(Time) } def start_date end @@ -1116,6 +1224,7 @@ module Orb end class PercentageDiscountInterval < Orb::BaseModel + # The price ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1124,6 +1233,7 @@ module Orb def applies_to_price_ids=(_) end + # The price interval ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -1140,6 +1250,7 @@ module Orb def discount_type=(_) end + # The end date of the discount interval. sig { returns(T.nilable(Time)) } def end_date end @@ -1148,6 +1259,8 @@ module Orb def end_date=(_) end + # Only available if discount_type is `percentage`.This is a number between 0 + # and 1. sig { returns(Float) } def percentage_discount end @@ -1156,6 +1269,7 @@ module Orb def percentage_discount=(_) end + # The start date of the discount interval. sig { returns(Time) } def start_date end @@ -1203,6 +1317,7 @@ module Orb end class UsageDiscountInterval < Orb::BaseModel + # The price ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1211,6 +1326,7 @@ module Orb def applies_to_price_ids=(_) end + # The price interval ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -1227,6 +1343,7 @@ module Orb def discount_type=(_) end + # The end date of the discount interval. sig { returns(T.nilable(Time)) } def end_date end @@ -1235,6 +1352,7 @@ module Orb def end_date=(_) end + # The start date of the discount interval. sig { returns(Time) } def start_date end @@ -1243,6 +1361,8 @@ module Orb def start_date=(_) end + # Only available if discount_type is `usage`. Number of usage units that this + # discount is for sig { returns(Float) } def usage_discount end @@ -1293,10 +1413,10 @@ module Orb sig do override .returns( - [[Symbol, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::AmountDiscountInterval], [Symbol, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::PercentageDiscountInterval], [Symbol, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::UsageDiscountInterval]] + [Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::AmountDiscountInterval, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::PercentageDiscountInterval, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::UsageDiscountInterval] ) end - private def variants + def variants end end end @@ -1349,6 +1469,7 @@ module Orb end class MaximumInterval < Orb::BaseModel + # The price ids that this maximum interval applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1357,6 +1478,7 @@ module Orb def applies_to_price_ids=(_) end + # The price interval ids that this maximum interval applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -1365,6 +1487,7 @@ module Orb def applies_to_price_interval_ids=(_) end + # The end date of the maximum interval. sig { returns(T.nilable(Time)) } def end_date end @@ -1373,6 +1496,8 @@ module Orb def end_date=(_) end + # The maximum amount to charge in a given billing period for the price intervals + # this transform applies to. sig { returns(String) } def maximum_amount end @@ -1381,6 +1506,7 @@ module Orb def maximum_amount=(_) end + # The start date of the maximum interval. sig { returns(Time) } def start_date end @@ -1419,6 +1545,7 @@ module Orb end class MinimumInterval < Orb::BaseModel + # The price ids that this minimum interval applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1427,6 +1554,7 @@ module Orb def applies_to_price_ids=(_) end + # The price interval ids that this minimum interval applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -1435,6 +1563,7 @@ module Orb def applies_to_price_interval_ids=(_) end + # The end date of the minimum interval. sig { returns(T.nilable(Time)) } def end_date end @@ -1443,6 +1572,8 @@ module Orb def end_date=(_) end + # The minimum amount to charge in a given billing period for the price intervals + # this minimum applies to. sig { returns(String) } def minimum_amount end @@ -1451,6 +1582,7 @@ module Orb def minimum_amount=(_) end + # The start date of the minimum interval. sig { returns(Time) } def start_date end @@ -1497,6 +1629,7 @@ module Orb def id=(_) end + # The day of the month that Orb bills for this price sig { returns(Integer) } def billing_cycle_day end @@ -1505,6 +1638,9 @@ module Orb def billing_cycle_day=(_) end + # The end of the current billing period. This is an exclusive timestamp, such that + # the instant returned is exactly the end of the billing period. Set to null if + # this price interval is not currently active. sig { returns(T.nilable(Time)) } def current_billing_period_end_date end @@ -1513,6 +1649,9 @@ module Orb def current_billing_period_end_date=(_) end + # The start date of the current billing period. This is an inclusive timestamp; + # the instant returned is exactly the beginning of the billing period. Set to null + # if this price interval is not currently active. sig { returns(T.nilable(Time)) } def current_billing_period_start_date end @@ -1521,6 +1660,8 @@ module Orb def current_billing_period_start_date=(_) end + # The end date of the price interval. This is the date that Orb stops billing for + # this price. sig { returns(T.nilable(Time)) } def end_date end @@ -1529,6 +1670,7 @@ module Orb def end_date=(_) end + # An additional filter to apply to usage queries. sig { returns(T.nilable(String)) } def filter end @@ -1537,6 +1679,8 @@ module Orb def filter=(_) end + # The fixed fee quantity transitions for this price interval. This is only + # relevant for fixed fees. sig do returns( T.nilable( @@ -1562,6 +1706,16 @@ module Orb def fixed_fee_quantity_transitions=(_) end + # The Price resource represents a price that can be billed on a subscription, + # resulting in a charge on an invoice in the form of an invoice line item. Prices + # take a quantity and determine an amount to bill. + # + # Orb supports a few different pricing models out of the box. Each of these models + # is serialized differently in a given Price object. The model_type field + # determines the key for the configuration object that is present. + # + # For more on the types of prices, see + # [the core concepts documentation](/core-concepts#plan-and-price) sig do returns( T.any( @@ -1668,6 +1822,8 @@ module Orb def price=(_) end + # The start date of the price interval. This is the date that Orb starts billing + # for this price. sig { returns(Time) } def start_date end @@ -1676,6 +1832,8 @@ module Orb def start_date=(_) end + # A list of customer IDs whose usage events will be aggregated and billed under + # this price interval. sig { returns(T.nilable(T::Array[String])) } def usage_customer_ids end @@ -1684,6 +1842,9 @@ module Orb def usage_customer_ids=(_) end + # The Price Interval resource represents a period of time for which a price will + # bill on a subscription. A subscription’s price intervals define its billing + # behavior. sig do params( id: String, diff --git a/rbi/lib/orb/models/subscription_update_params.rbi b/rbi/lib/orb/models/subscription_update_params.rbi index 2a42dee9..32083d1f 100644 --- a/rbi/lib/orb/models/subscription_update_params.rbi +++ b/rbi/lib/orb/models/subscription_update_params.rbi @@ -6,6 +6,9 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters + # Determines whether issued invoices for this subscription will automatically be + # charged with the saved payment method on the due date. This property defaults to + # the plan's behavior. sig { returns(T.nilable(T::Boolean)) } def auto_collection end @@ -14,6 +17,8 @@ module Orb def auto_collection=(_) end + # Determines the default memo on this subscription's invoices. Note that if this + # is not provided, it is determined by the plan configuration. sig { returns(T.nilable(String)) } def default_invoice_memo end @@ -22,6 +27,9 @@ module Orb def default_invoice_memo=(_) end + # When this subscription's accrued usage reaches this threshold, an invoice will + # be issued for the subscription. If not specified, invoices will only be issued + # at the end of the billing period. sig { returns(T.nilable(String)) } def invoicing_threshold end @@ -30,6 +38,9 @@ module Orb def invoicing_threshold=(_) end + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) } def metadata end @@ -41,6 +52,10 @@ module Orb def metadata=(_) end + # Determines the difference between the invoice issue date for subscription + # invoices as the date that they are due. A value of `0` here represents that the + # invoice is due on issue, whereas a value of `30` represents that the customer + # has a month to pay the invoice. sig { returns(T.nilable(Integer)) } def net_terms end diff --git a/rbi/lib/orb/models/subscription_update_trial_params.rbi b/rbi/lib/orb/models/subscription_update_trial_params.rbi index b64fa5b7..0654a4cd 100644 --- a/rbi/lib/orb/models/subscription_update_trial_params.rbi +++ b/rbi/lib/orb/models/subscription_update_trial_params.rbi @@ -6,6 +6,8 @@ module Orb extend Orb::RequestParameters::Converter include Orb::RequestParameters + # The new date that the trial should end, or the literal string `immediate` to end + # the trial immediately. sig { returns(T.any(Time, Symbol)) } def trial_end_date end @@ -14,6 +16,8 @@ module Orb def trial_end_date=(_) end + # If true, shifts subsequent price and adjustment intervals (preserving their + # durations, but adjusting their absolute dates). sig { returns(T.nilable(T::Boolean)) } def shift end @@ -44,6 +48,8 @@ module Orb def to_hash end + # The new date that the trial should end, or the literal string `immediate` to end + # the trial immediately. class TrialEndDate < Orb::Union abstract! @@ -60,8 +66,8 @@ module Orb end class << self - sig { override.returns([[NilClass, Time], [NilClass, Symbol]]) } - private def variants + sig { override.returns([Time, Symbol]) } + def variants end end end diff --git a/rbi/lib/orb/models/subscription_update_trial_response.rbi b/rbi/lib/orb/models/subscription_update_trial_response.rbi index 02aa7e30..73622ce3 100644 --- a/rbi/lib/orb/models/subscription_update_trial_response.rbi +++ b/rbi/lib/orb/models/subscription_update_trial_response.rbi @@ -11,6 +11,8 @@ module Orb def id=(_) end + # The current plan phase that is active, only if the subscription's plan has + # phases. sig { returns(T.nilable(Integer)) } def active_plan_phase_order end @@ -19,6 +21,8 @@ module Orb def active_plan_phase_order=(_) end + # The adjustment intervals for this subscription sorted by the start_date of the + # adjustment interval. sig { returns(T::Array[Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval]) } def adjustment_intervals end @@ -30,6 +34,9 @@ module Orb def adjustment_intervals=(_) end + # Determines whether issued invoices for this subscription will automatically be + # charged with the saved payment method on the due date. This property defaults to + # the plan's behavior. If null, defaults to the customer's setting. sig { returns(T.nilable(T::Boolean)) } def auto_collection end @@ -49,6 +56,10 @@ module Orb def billing_cycle_anchor_configuration=(_) end + # The day of the month on which the billing cycle is anchored. If the maximum + # number of days in a month is greater than this value, the last day of the month + # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing + # period begins on the 30th. sig { returns(Integer) } def billing_cycle_day end @@ -65,6 +76,9 @@ module Orb def created_at=(_) end + # The end of the current billing period. This is an exclusive timestamp, such that + # the instant returned is not part of the billing period. Set to null for + # subscriptions that are not currently active. sig { returns(T.nilable(Time)) } def current_billing_period_end_date end @@ -73,6 +87,9 @@ module Orb def current_billing_period_end_date=(_) end + # The start date of the current billing period. This is an inclusive timestamp; + # the instant returned is exactly the beginning of the billing period. Set to null + # if the subscription is not currently active. sig { returns(T.nilable(Time)) } def current_billing_period_start_date end @@ -81,6 +98,24 @@ module Orb def current_billing_period_start_date=(_) end + # A customer is a buyer of your products, and the other party to the billing + # relationship. + # + # In Orb, customers are assigned system generated identifiers automatically, but + # it's often desirable to have these match existing identifiers in your system. To + # avoid having to denormalize Orb ID information, you can pass in an + # `external_customer_id` with your own identifier. See + # [Customer ID Aliases](/events-and-metrics/customer-aliases) for further + # information about how these aliases work in Orb. + # + # In addition to having an identifier in your system, a customer may exist in a + # payment provider solution like Stripe. Use the `payment_provider_id` and the + # `payment_provider` enum field to express this mapping. + # + # A customer also has a timezone (from the standard + # [IANA timezone database](https://www.iana.org/time-zones)), which defaults to + # your account's timezone. See [Timezone localization](/essentials/timezones) for + # information on what this timezone parameter influences within Orb. sig { returns(Orb::Models::Customer) } def customer end @@ -89,6 +124,8 @@ module Orb def customer=(_) end + # Determines the default memo on this subscriptions' invoices. Note that if this + # is not provided, it is determined by the plan configuration. sig { returns(T.nilable(String)) } def default_invoice_memo end @@ -97,6 +134,7 @@ module Orb def default_invoice_memo=(_) end + # The discount intervals for this subscription sorted by the start_date. sig do returns( T::Array[ @@ -134,6 +172,7 @@ module Orb def discount_intervals=(_) end + # The date Orb stops billing for this subscription. sig { returns(T.nilable(Time)) } def end_date end @@ -161,6 +200,7 @@ module Orb def invoicing_threshold=(_) end + # The maximum intervals for this subscription sorted by the start_date. sig { returns(T::Array[Orb::Models::SubscriptionUpdateTrialResponse::MaximumInterval]) } def maximum_intervals end @@ -172,6 +212,10 @@ module Orb def maximum_intervals=(_) end + # 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`. sig { returns(T::Hash[Symbol, String]) } def metadata end @@ -180,6 +224,7 @@ module Orb def metadata=(_) end + # The minimum intervals for this subscription sorted by the start_date. sig { returns(T::Array[Orb::Models::SubscriptionUpdateTrialResponse::MinimumInterval]) } def minimum_intervals end @@ -191,6 +236,10 @@ module Orb def minimum_intervals=(_) end + # Determines the difference between the invoice issue date for subscription + # invoices as the date that they are due. A value of `0` here represents that the + # invoice is due on issue, whereas a value of `30` represents that the customer + # has a month to pay the invoice. sig { returns(Integer) } def net_terms end @@ -199,6 +248,10 @@ module Orb def net_terms=(_) end + # The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be + # subscribed to by a customer. Plans define the billing behavior of the + # subscription. You can see more about how to configure prices in the + # [Price resource](/reference/price). sig { returns(Orb::Models::Plan) } def plan end @@ -207,6 +260,7 @@ module Orb def plan=(_) end + # The price intervals for this subscription. sig { returns(T::Array[Orb::Models::SubscriptionUpdateTrialResponse::PriceInterval]) } def price_intervals end @@ -229,6 +283,7 @@ module Orb def redeemed_coupon=(_) end + # The date Orb starts billing for this subscription. sig { returns(Time) } def start_date end @@ -408,6 +463,7 @@ module Orb def adjustment=(_) end + # The price interval IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -416,6 +472,7 @@ module Orb def applies_to_price_interval_ids=(_) end + # The end date of the adjustment interval. sig { returns(T.nilable(Time)) } def end_date end @@ -424,6 +481,7 @@ module Orb def end_date=(_) end + # The start date of the adjustment interval. sig { returns(Time) } def start_date end @@ -492,6 +550,7 @@ module Orb def adjustment_type=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -500,6 +559,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -508,6 +569,7 @@ module Orb def is_invoice_level=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -516,6 +578,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -524,6 +587,8 @@ module Orb def reason=(_) end + # The number of usage units by which to discount the price this adjustment applies + # to in a given billing period. sig { returns(Float) } def usage_discount end @@ -590,6 +655,8 @@ module Orb def adjustment_type=(_) end + # The amount by which to discount the prices this adjustment applies to in a given + # billing period. sig { returns(String) } def amount_discount end @@ -598,6 +665,7 @@ module Orb def amount_discount=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -606,6 +674,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -614,6 +684,7 @@ module Orb def is_invoice_level=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -622,6 +693,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -688,6 +760,7 @@ module Orb def adjustment_type=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -696,6 +769,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -704,6 +779,8 @@ module Orb def is_invoice_level=(_) end + # The percentage (as a value between 0 and 1) by which to discount the price + # intervals this adjustment applies to in a given billing period. sig { returns(Float) } def percentage_discount end @@ -712,6 +789,7 @@ module Orb def percentage_discount=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -720,6 +798,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -786,6 +865,7 @@ module Orb def adjustment_type=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -794,6 +874,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -802,6 +884,7 @@ module Orb def is_invoice_level=(_) end + # The item ID that revenue from this minimum will be attributed to. sig { returns(String) } def item_id end @@ -810,6 +893,8 @@ module Orb def item_id=(_) end + # The minimum amount to charge in a given billing period for the prices this + # adjustment applies to. sig { returns(String) } def minimum_amount end @@ -818,6 +903,7 @@ module Orb def minimum_amount=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -826,6 +912,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -895,6 +982,7 @@ module Orb def adjustment_type=(_) end + # The price IDs that this adjustment applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -903,6 +991,8 @@ module Orb def applies_to_price_ids=(_) end + # True for adjustments that apply to an entire invocice, false for adjustments + # that apply to only one price. sig { returns(T::Boolean) } def is_invoice_level end @@ -911,6 +1001,8 @@ module Orb def is_invoice_level=(_) end + # The maximum amount to charge in a given billing period for the prices this + # adjustment applies to. sig { returns(String) } def maximum_amount end @@ -919,6 +1011,7 @@ module Orb def maximum_amount=(_) end + # The plan phase in which this adjustment is active. sig { returns(T.nilable(Integer)) } def plan_phase_order end @@ -927,6 +1020,7 @@ module Orb def plan_phase_order=(_) end + # The reason for the adjustment. sig { returns(T.nilable(String)) } def reason end @@ -980,16 +1074,20 @@ module Orb sig do override .returns( - [[Symbol, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment], [Symbol, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment], [Symbol, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment], [Symbol, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment], [Symbol, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment]] + [Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment] ) end - private def variants + def variants end end end end class BillingCycleAnchorConfiguration < Orb::BaseModel + # The day of the month on which the billing cycle is anchored. If the maximum + # number of days in a month is greater than this value, the last day of the month + # is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing + # period begins on the 30th. sig { returns(Integer) } def day end @@ -998,6 +1096,9 @@ module Orb def day=(_) end + # The month on which the billing cycle is anchored (e.g. a quarterly price + # anchored in February would have cycles starting February, May, August, and + # November). sig { returns(T.nilable(Integer)) } def month end @@ -1006,6 +1107,8 @@ module Orb def month=(_) end + # The year on which the billing cycle is anchored (e.g. a 2 year billing cycle + # anchored on 2021 would have cycles starting on 2021, 2023, 2025, etc.). sig { returns(T.nilable(Integer)) } def year end @@ -1029,6 +1132,7 @@ module Orb abstract! class AmountDiscountInterval < Orb::BaseModel + # Only available if discount_type is `amount`. sig { returns(String) } def amount_discount end @@ -1037,6 +1141,7 @@ module Orb def amount_discount=(_) end + # The price ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1045,6 +1150,7 @@ module Orb def applies_to_price_ids=(_) end + # The price interval ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -1061,6 +1167,7 @@ module Orb def discount_type=(_) end + # The end date of the discount interval. sig { returns(T.nilable(Time)) } def end_date end @@ -1069,6 +1176,7 @@ module Orb def end_date=(_) end + # The start date of the discount interval. sig { returns(Time) } def start_date end @@ -1116,6 +1224,7 @@ module Orb end class PercentageDiscountInterval < Orb::BaseModel + # The price ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1124,6 +1233,7 @@ module Orb def applies_to_price_ids=(_) end + # The price interval ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -1140,6 +1250,7 @@ module Orb def discount_type=(_) end + # The end date of the discount interval. sig { returns(T.nilable(Time)) } def end_date end @@ -1148,6 +1259,8 @@ module Orb def end_date=(_) end + # Only available if discount_type is `percentage`.This is a number between 0 + # and 1. sig { returns(Float) } def percentage_discount end @@ -1156,6 +1269,7 @@ module Orb def percentage_discount=(_) end + # The start date of the discount interval. sig { returns(Time) } def start_date end @@ -1203,6 +1317,7 @@ module Orb end class UsageDiscountInterval < Orb::BaseModel + # The price ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1211,6 +1326,7 @@ module Orb def applies_to_price_ids=(_) end + # The price interval ids that this discount interval applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -1227,6 +1343,7 @@ module Orb def discount_type=(_) end + # The end date of the discount interval. sig { returns(T.nilable(Time)) } def end_date end @@ -1235,6 +1352,7 @@ module Orb def end_date=(_) end + # The start date of the discount interval. sig { returns(Time) } def start_date end @@ -1243,6 +1361,8 @@ module Orb def start_date=(_) end + # Only available if discount_type is `usage`. Number of usage units that this + # discount is for sig { returns(Float) } def usage_discount end @@ -1293,10 +1413,10 @@ module Orb sig do override .returns( - [[Symbol, Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::AmountDiscountInterval], [Symbol, Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::PercentageDiscountInterval], [Symbol, Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::UsageDiscountInterval]] + [Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::AmountDiscountInterval, Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::PercentageDiscountInterval, Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::UsageDiscountInterval] ) end - private def variants + def variants end end end @@ -1349,6 +1469,7 @@ module Orb end class MaximumInterval < Orb::BaseModel + # The price ids that this maximum interval applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1357,6 +1478,7 @@ module Orb def applies_to_price_ids=(_) end + # The price interval ids that this maximum interval applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -1365,6 +1487,7 @@ module Orb def applies_to_price_interval_ids=(_) end + # The end date of the maximum interval. sig { returns(T.nilable(Time)) } def end_date end @@ -1373,6 +1496,8 @@ module Orb def end_date=(_) end + # The maximum amount to charge in a given billing period for the price intervals + # this transform applies to. sig { returns(String) } def maximum_amount end @@ -1381,6 +1506,7 @@ module Orb def maximum_amount=(_) end + # The start date of the maximum interval. sig { returns(Time) } def start_date end @@ -1419,6 +1545,7 @@ module Orb end class MinimumInterval < Orb::BaseModel + # The price ids that this minimum interval applies to. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -1427,6 +1554,7 @@ module Orb def applies_to_price_ids=(_) end + # The price interval ids that this minimum interval applies to. sig { returns(T::Array[String]) } def applies_to_price_interval_ids end @@ -1435,6 +1563,7 @@ module Orb def applies_to_price_interval_ids=(_) end + # The end date of the minimum interval. sig { returns(T.nilable(Time)) } def end_date end @@ -1443,6 +1572,8 @@ module Orb def end_date=(_) end + # The minimum amount to charge in a given billing period for the price intervals + # this minimum applies to. sig { returns(String) } def minimum_amount end @@ -1451,6 +1582,7 @@ module Orb def minimum_amount=(_) end + # The start date of the minimum interval. sig { returns(Time) } def start_date end @@ -1497,6 +1629,7 @@ module Orb def id=(_) end + # The day of the month that Orb bills for this price sig { returns(Integer) } def billing_cycle_day end @@ -1505,6 +1638,9 @@ module Orb def billing_cycle_day=(_) end + # The end of the current billing period. This is an exclusive timestamp, such that + # the instant returned is exactly the end of the billing period. Set to null if + # this price interval is not currently active. sig { returns(T.nilable(Time)) } def current_billing_period_end_date end @@ -1513,6 +1649,9 @@ module Orb def current_billing_period_end_date=(_) end + # The start date of the current billing period. This is an inclusive timestamp; + # the instant returned is exactly the beginning of the billing period. Set to null + # if this price interval is not currently active. sig { returns(T.nilable(Time)) } def current_billing_period_start_date end @@ -1521,6 +1660,8 @@ module Orb def current_billing_period_start_date=(_) end + # The end date of the price interval. This is the date that Orb stops billing for + # this price. sig { returns(T.nilable(Time)) } def end_date end @@ -1529,6 +1670,7 @@ module Orb def end_date=(_) end + # An additional filter to apply to usage queries. sig { returns(T.nilable(String)) } def filter end @@ -1537,6 +1679,8 @@ module Orb def filter=(_) end + # The fixed fee quantity transitions for this price interval. This is only + # relevant for fixed fees. sig do returns( T.nilable( @@ -1562,6 +1706,16 @@ module Orb def fixed_fee_quantity_transitions=(_) end + # The Price resource represents a price that can be billed on a subscription, + # resulting in a charge on an invoice in the form of an invoice line item. Prices + # take a quantity and determine an amount to bill. + # + # Orb supports a few different pricing models out of the box. Each of these models + # is serialized differently in a given Price object. The model_type field + # determines the key for the configuration object that is present. + # + # For more on the types of prices, see + # [the core concepts documentation](/core-concepts#plan-and-price) sig do returns( T.any( @@ -1668,6 +1822,8 @@ module Orb def price=(_) end + # The start date of the price interval. This is the date that Orb starts billing + # for this price. sig { returns(Time) } def start_date end @@ -1676,6 +1832,8 @@ module Orb def start_date=(_) end + # A list of customer IDs whose usage events will be aggregated and billed under + # this price interval. sig { returns(T.nilable(T::Array[String])) } def usage_customer_ids end @@ -1684,6 +1842,9 @@ module Orb def usage_customer_ids=(_) end + # The Price Interval resource represents a period of time for which a price will + # bill on a subscription. A subscription’s price intervals define its billing + # behavior. sig do params( id: String, diff --git a/rbi/lib/orb/models/subscription_usage.rbi b/rbi/lib/orb/models/subscription_usage.rbi index 06976204..e4a31210 100644 --- a/rbi/lib/orb/models/subscription_usage.rbi +++ b/rbi/lib/orb/models/subscription_usage.rbi @@ -377,10 +377,10 @@ module Orb sig do override .returns( - [[NilClass, Orb::Models::SubscriptionUsage::UngroupedSubscriptionUsage], [NilClass, Orb::Models::SubscriptionUsage::GroupedSubscriptionUsage]] + [Orb::Models::SubscriptionUsage::UngroupedSubscriptionUsage, Orb::Models::SubscriptionUsage::GroupedSubscriptionUsage] ) end - private def variants + def variants end end end diff --git a/rbi/lib/orb/models/trial_discount.rbi b/rbi/lib/orb/models/trial_discount.rbi index 8e5efc16..0da4d99c 100644 --- a/rbi/lib/orb/models/trial_discount.rbi +++ b/rbi/lib/orb/models/trial_discount.rbi @@ -3,6 +3,8 @@ module Orb module Models class TrialDiscount < Orb::BaseModel + # List of price_ids that this discount applies to. For plan/plan phase discounts, + # this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -27,6 +29,7 @@ module Orb def reason=(_) end + # Only available if discount_type is `trial` sig { returns(T.nilable(String)) } def trial_amount_discount end @@ -35,6 +38,7 @@ module Orb def trial_amount_discount=(_) end + # Only available if discount_type is `trial` sig { returns(T.nilable(Float)) } def trial_percentage_discount end diff --git a/rbi/lib/orb/models/usage_discount.rbi b/rbi/lib/orb/models/usage_discount.rbi index 347e6216..0b52b0f1 100644 --- a/rbi/lib/orb/models/usage_discount.rbi +++ b/rbi/lib/orb/models/usage_discount.rbi @@ -3,6 +3,8 @@ module Orb module Models class UsageDiscount < Orb::BaseModel + # List of price_ids that this discount applies to. For plan/plan phase discounts, + # this can be a subset of prices. sig { returns(T::Array[String]) } def applies_to_price_ids end @@ -19,6 +21,8 @@ module Orb def discount_type=(_) end + # Only available if discount_type is `usage`. Number of usage units that this + # discount is for sig { returns(Float) } def usage_discount end diff --git a/rbi/lib/orb/page.rbi b/rbi/lib/orb/page.rbi index f3602d54..f0498a6c 100644 --- a/rbi/lib/orb/page.rbi +++ b/rbi/lib/orb/page.rbi @@ -6,11 +6,11 @@ module Orb Elem = type_member - sig { returns(T::Array[Elem]) } + sig { returns(T.nilable(T::Array[Elem])) } def data end - sig { params(_: T::Array[Elem]).returns(T::Array[Elem]) } + sig { params(_: T.nilable(T::Array[Elem])).returns(T.nilable(T::Array[Elem])) } def data=(_) end @@ -22,18 +22,6 @@ module Orb def pagination_metadata=(_) end - sig do - params( - client: Orb::BaseClient, - req: Orb::BaseClient::RequestComponentsShape, - headers: T.any(T::Hash[String, String], Net::HTTPHeader), - page_data: T::Hash[Symbol, T.anything] - ) - .void - end - def initialize(client:, req:, headers:, page_data:) - end - class PaginationMetadata < Orb::BaseModel sig { returns(T::Boolean) } def has_more diff --git a/rbi/lib/orb/pooled_net_requester.rbi b/rbi/lib/orb/pooled_net_requester.rbi index 31877131..85bf511e 100644 --- a/rbi/lib/orb/pooled_net_requester.rbi +++ b/rbi/lib/orb/pooled_net_requester.rbi @@ -7,14 +7,17 @@ module Orb end class << self + # @api private sig { params(url: URI::Generic).returns(Net::HTTP) } def connect(url) end + # @api private sig { params(conn: Net::HTTP, deadline: Float).void } def calibrate_socket_timeout(conn, deadline) end + # @api private sig do params(request: Orb::PooledNetRequester::RequestShape, blk: T.proc.params(arg0: String).void) .returns(Net::HTTPGenericRequest) @@ -23,10 +26,12 @@ module Orb end end + # @api private sig { params(url: URI::Generic, blk: T.proc.params(arg0: Net::HTTP).void).void } private def with_pool(url, &blk) end + # @api private sig do params(request: Orb::PooledNetRequester::RequestShape).returns( [ @@ -38,6 +43,7 @@ module Orb def execute(request) end + # @api private sig { params(size: Integer).returns(T.attached_class) } def self.new(size: Etc.nprocessors) end diff --git a/rbi/lib/orb/request_options.rbi b/rbi/lib/orb/request_options.rbi index 1462bbe6..a132a0b0 100644 --- a/rbi/lib/orb/request_options.rbi +++ b/rbi/lib/orb/request_options.rbi @@ -1,9 +1,11 @@ # typed: strong module Orb + # @api private module RequestParameters abstract! + # Options to specify HTTP behaviour for this request. sig { returns(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) } def request_options end @@ -15,18 +17,28 @@ module Orb def request_options=(_) end + # @api private module Converter + # @api private sig { params(params: T.anything).returns([T.anything, T::Hash[Symbol, T.anything]]) } def dump_request(params) end end end + # Specify HTTP behaviour to use for a specific request. These options supplement + # or override those provided at the client level. + # + # When making a request, you can pass an actual {RequestOptions} instance, or + # simply pass a Hash with symbol keys matching the attributes on this class. class RequestOptions < Orb::BaseModel + # @api private sig { params(opts: T.any(T.self_type, T::Hash[Symbol, T.anything])).void } def self.validate!(opts) end + # Idempotency key to send with request and all associated retries. Will only be + # sent for write requests. sig { returns(T.nilable(String)) } def idempotency_key end @@ -35,6 +47,8 @@ module Orb def idempotency_key=(_) end + # Extra query params to send with the request. These are `.merge`’d into any + # `query` given at the client level. sig { returns(T.nilable(T::Hash[String, T.nilable(T.any(T::Array[String], String))])) } def extra_query end @@ -46,6 +60,8 @@ module Orb def extra_query=(_) end + # Extra headers to send with the request. These are `.merged`’d into any + # `extra_headers` given at the client level. sig { returns(T.nilable(T::Hash[String, T.nilable(String)])) } def extra_headers end @@ -57,6 +73,8 @@ module Orb def extra_headers=(_) end + # Extra data to send with the request. These are deep merged into any data + # generated as part of the normal request. sig { returns(T.nilable(T::Hash[Symbol, T.anything])) } def extra_body end @@ -65,6 +83,7 @@ module Orb def extra_body=(_) end + # Maximum number of retries to attempt after a failed initial request. sig { returns(T.nilable(Integer)) } def max_retries end @@ -73,6 +92,7 @@ module Orb def max_retries=(_) end + # Request timeout in seconds. sig { returns(T.nilable(Float)) } def timeout end @@ -81,6 +101,7 @@ module Orb def timeout=(_) end + # Returns a new instance of RequestOptions. sig { params(values: T::Hash[Symbol, T.anything]).returns(T.attached_class) } def self.new(values = {}) end diff --git a/rbi/lib/orb/resources/alerts.rbi b/rbi/lib/orb/resources/alerts.rbi index 2dee8960..d2293b52 100644 --- a/rbi/lib/orb/resources/alerts.rbi +++ b/rbi/lib/orb/resources/alerts.rbi @@ -3,6 +3,7 @@ module Orb module Resources class Alerts + # This endpoint retrieves an alert by its ID. sig do params( alert_id: String, @@ -13,6 +14,7 @@ module Orb def retrieve(alert_id, request_options: {}) end + # This endpoint updates the thresholds of an alert. sig do params( alert_configuration_id: String, @@ -21,9 +23,25 @@ module Orb ) .returns(Orb::Models::Alert) end - def update(alert_configuration_id, thresholds:, request_options: {}) + def update( + alert_configuration_id, + # The thresholds that define the values at which the alert will be triggered. + thresholds:, + request_options: {} + ) end + # This endpoint returns a list of alerts within Orb. + # + # The request must specify one of `customer_id`, `external_customer_id`, or + # `subscription_id`. + # + # If querying by subscripion_id, the endpoint will return the subscription level + # alerts as well as the plan level alerts associated with the subscription. + # + # The list of alerts is ordered starting from the most recently created alert. + # This endpoint follows Orb's + # [standardized pagination format](/api-reference/pagination). sig do params( created_at_gt: T.nilable(Time), @@ -44,15 +62,29 @@ module Orb created_at_gte: nil, created_at_lt: nil, created_at_lte: nil, + # Cursor for pagination. This can be populated by the `next_cursor` value returned + # from the initial request. cursor: nil, + # Fetch alerts scoped to this customer_id customer_id: nil, + # Fetch alerts scoped to this external_customer_id external_customer_id: nil, + # The number of items to fetch. Defaults to 20. limit: nil, + # Fetch alerts scoped to this subscription_id subscription_id: nil, request_options: {} ) end + # This endpoint creates a new alert to monitor a customer's credit balance. There + # are three types of alerts that can be scoped to customers: + # `credit_balance_depleted`, `credit_balance_dropped`, and + # `credit_balance_recovered`. Customers can have a maximum of one of each type of + # alert per [credit balance currency](/product-catalog/prepurchase). + # `credit_balance_dropped` alerts require a list of thresholds to be provided + # while `credit_balance_depleted` and `credit_balance_recovered` alerts do not + # require thresholds. sig do params( customer_id: String, @@ -63,9 +95,26 @@ module Orb ) .returns(Orb::Models::Alert) end - def create_for_customer(customer_id, currency:, type:, thresholds: nil, request_options: {}) + def create_for_customer( + customer_id, + # The case sensitive currency or custom pricing unit to use for this alert. + currency:, + # The type of alert to create. This must be a valid alert type. + type:, + # The thresholds that define the values at which the alert will be triggered. + thresholds: nil, + request_options: {} + ) end + # This endpoint creates a new alert to monitor a customer's credit balance. There + # are three types of alerts that can be scoped to customers: + # `credit_balance_depleted`, `credit_balance_dropped`, and + # `credit_balance_recovered`. Customers can have a maximum of one of each type of + # alert per [credit balance currency](/product-catalog/prepurchase). + # `credit_balance_dropped` alerts require a list of thresholds to be provided + # while `credit_balance_depleted` and `credit_balance_recovered` alerts do not + # require thresholds. sig do params( external_customer_id: String, @@ -78,13 +127,27 @@ module Orb end def create_for_external_customer( external_customer_id, + # The case sensitive currency or custom pricing unit to use for this alert. currency:, + # The type of alert to create. This must be a valid alert type. type:, + # The thresholds that define the values at which the alert will be triggered. thresholds: nil, request_options: {} ) end + # This endpoint is used to create alerts at the subscription level. + # + # Subscription level alerts can be one of two types: `usage_exceeded` or + # `cost_exceeded`. A `usage_exceeded` alert is scoped to a particular metric and + # is triggered when the usage of that metric exceeds predefined thresholds during + # the current billing cycle. A `cost_exceeded` alert is triggered when the total + # amount due during the current billing cycle surpasses predefined thresholds. + # `cost_exceeded` alerts do not include burndown of pre-purchase credits. Each + # subscription can have one `cost_exceeded` alert and one `usage_exceeded` alert + # per metric that is a part of the subscription. Alerts are triggered based on + # usage or cost conditions met during the current billing cycle. sig do params( subscription_id: String, @@ -95,9 +158,21 @@ module Orb ) .returns(Orb::Models::Alert) end - def create_for_subscription(subscription_id, thresholds:, type:, metric_id: nil, request_options: {}) + def create_for_subscription( + subscription_id, + # The thresholds that define the values at which the alert will be triggered. + thresholds:, + # The type of alert to create. This must be a valid alert type. + type:, + # The metric to track usage for. + metric_id: nil, + request_options: {} + ) end + # This endpoint allows you to disable an alert. To disable a plan-level alert for + # a specific subscription, you must include the `subscription_id`. The + # `subscription_id` is not required for customer or subscription level alerts. sig do params( alert_configuration_id: String, @@ -106,9 +181,17 @@ module Orb ) .returns(Orb::Models::Alert) end - def disable(alert_configuration_id, subscription_id: nil, request_options: {}) + def disable( + alert_configuration_id, + # Used to update the status of a plan alert scoped to this subscription_id + subscription_id: nil, + request_options: {} + ) end + # This endpoint allows you to enable an alert. To enable a plan-level alert for a + # specific subscription, you must include the `subscription_id`. The + # `subscription_id` is not required for customer or subscription level alerts. sig do params( alert_configuration_id: String, @@ -117,7 +200,12 @@ module Orb ) .returns(Orb::Models::Alert) end - def enable(alert_configuration_id, subscription_id: nil, request_options: {}) + def enable( + alert_configuration_id, + # Used to update the status of a plan alert scoped to this subscription_id + subscription_id: nil, + request_options: {} + ) end sig { params(client: Orb::Client).returns(T.attached_class) } diff --git a/rbi/lib/orb/resources/coupons.rbi b/rbi/lib/orb/resources/coupons.rbi index 1bc043b8..f4e13bb5 100644 --- a/rbi/lib/orb/resources/coupons.rbi +++ b/rbi/lib/orb/resources/coupons.rbi @@ -7,6 +7,8 @@ module Orb def subscriptions end + # This endpoint allows the creation of coupons, which can then be redeemed at + # subscription creation or plan change. sig do params( discount: T.any( @@ -22,13 +24,24 @@ module Orb end def create( discount:, + # This string can be used to redeem this coupon for a given subscription. redemption_code:, + # This allows for a coupon's discount to apply for a limited time (determined in + # months); a `null` value here means "unlimited time". duration_in_months: nil, + # The maximum number of redemptions allowed for this coupon before it is + # exhausted;`null` here means "unlimited". max_redemptions: nil, request_options: {} ) end + # This endpoint returns a list of all coupons for an account in a list format. + # + # The list of coupons is ordered starting from the most recently created coupon. + # The response also includes `pagination_metadata`, which lets the caller retrieve + # the next page of results if they exist. More information about pagination can be + # found in the Pagination-metadata schema. sig do params( cursor: T.nilable(String), @@ -39,9 +52,24 @@ module Orb ) .returns(Orb::Page[Orb::Models::Coupon]) end - def list(cursor: nil, limit: nil, redemption_code: nil, show_archived: nil, request_options: {}) + def list( + # Cursor for pagination. This can be populated by the `next_cursor` value returned + # from the initial request. + cursor: nil, + # The number of items to fetch. Defaults to 20. + limit: nil, + # Filter to coupons matching this redemption code. + redemption_code: nil, + # Show archived coupons as well (by default, this endpoint only returns active + # coupons). + show_archived: nil, + request_options: {} + ) end + # This endpoint allows a coupon to be archived. Archived coupons can no longer be + # redeemed, and will be hidden from lists of active coupons. Additionally, once a + # coupon is archived, its redemption code can be reused for a different coupon. sig do params( coupon_id: String, @@ -52,6 +80,9 @@ module Orb def archive(coupon_id, request_options: {}) end + # This endpoint retrieves a coupon by its ID. To fetch coupons by their redemption + # code, use the [List coupons](list-coupons) endpoint with the redemption_code + # parameter. sig do params( coupon_id: String, diff --git a/rbi/lib/orb/resources/coupons/subscriptions.rbi b/rbi/lib/orb/resources/coupons/subscriptions.rbi index 8b882ce5..b15f851f 100644 --- a/rbi/lib/orb/resources/coupons/subscriptions.rbi +++ b/rbi/lib/orb/resources/coupons/subscriptions.rbi @@ -4,6 +4,10 @@ module Orb module Resources class Coupons class Subscriptions + # This endpoint returns a list of all subscriptions that have redeemed a given + # coupon as a [paginated](/api-reference/pagination) list, ordered starting from + # the most recently created subscription. For a full discussion of the + # subscription resource, see [Subscription](/core-concepts#subscription). sig do params( coupon_id: String, @@ -13,7 +17,15 @@ module Orb ) .returns(Orb::Page[Orb::Models::Subscription]) end - def list(coupon_id, cursor: nil, limit: nil, request_options: {}) + def list( + coupon_id, + # Cursor for pagination. This can be populated by the `next_cursor` value returned + # from the initial request. + cursor: nil, + # The number of items to fetch. Defaults to 20. + limit: nil, + request_options: {} + ) end sig { params(client: Orb::Client).returns(T.attached_class) } diff --git a/rbi/lib/orb/resources/credit_notes.rbi b/rbi/lib/orb/resources/credit_notes.rbi index 9b9e5a94..c64b7bb5 100644 --- a/rbi/lib/orb/resources/credit_notes.rbi +++ b/rbi/lib/orb/resources/credit_notes.rbi @@ -3,6 +3,8 @@ module Orb module Resources class CreditNotes + # This endpoint is used to create a single + # [`Credit Note`](/invoicing/credit-notes). sig do params( line_items: T::Array[Orb::Models::CreditNoteCreateParams::LineItem], @@ -12,20 +14,47 @@ module Orb ) .returns(Orb::Models::CreditNote) end - def create(line_items:, memo: nil, reason: nil, request_options: {}) + def create( + line_items:, + # An optional memo to attach to the credit note. + memo: nil, + # An optional reason for the credit note. + reason: nil, + request_options: {} + ) end + # Get a paginated list of CreditNotes. Users can also filter by customer_id, + # subscription_id, or external_customer_id. The credit notes will be returned in + # reverse chronological order by `creation_time`. sig do params( + created_at_gt: T.nilable(Time), + created_at_gte: T.nilable(Time), + created_at_lt: T.nilable(Time), + created_at_lte: T.nilable(Time), cursor: T.nilable(String), limit: Integer, request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) ) .returns(Orb::Page[Orb::Models::CreditNote]) end - def list(cursor: nil, limit: nil, request_options: {}) + def list( + created_at_gt: nil, + created_at_gte: nil, + created_at_lt: nil, + created_at_lte: nil, + # Cursor for pagination. This can be populated by the `next_cursor` value returned + # from the initial request. + cursor: nil, + # The number of items to fetch. Defaults to 20. + limit: nil, + request_options: {} + ) end + # This endpoint is used to fetch a single [`Credit Note`](/invoicing/credit-notes) + # given an identifier. sig do params( credit_note_id: String, diff --git a/rbi/lib/orb/resources/customers.rbi b/rbi/lib/orb/resources/customers.rbi index 7c7d0b66..ac6620fc 100644 --- a/rbi/lib/orb/resources/customers.rbi +++ b/rbi/lib/orb/resources/customers.rbi @@ -15,6 +15,18 @@ module Orb def balance_transactions end + # This operation is used to create an Orb customer, who is party to the core + # billing relationship. See [Customer](/core-concepts##customer) for an overview + # of the customer resource. + # + # This endpoint is critical in the following Orb functionality: + # + # - Automated charges can be configured by setting `payment_provider` and + # `payment_provider_id` to automatically issue invoices + # - [Customer ID Aliases](/events-and-metrics/customer-aliases) can be configured + # by setting `external_customer_id` + # - [Timezone localization](/essentials/timezones) can be configured on a + # per-customer basis by setting the `timezone` parameter sig do params( email: String, @@ -45,28 +57,164 @@ module Orb .returns(Orb::Models::Customer) end def create( + # A valid customer email, to be used for notifications. When Orb triggers payment + # through a payment gateway, this email will be used for any automatically issued + # receipts. email:, + # The full name of the customer name:, accounting_sync_configuration: nil, + # Additional email addresses for this customer. If populated, these email + # addresses will be CC'd for customer communications. additional_emails: nil, + # Used to determine if invoices for this customer will automatically attempt to + # charge a saved payment method, if available. This parameter defaults to `True` + # when a payment provider is provided on customer creation. auto_collection: nil, billing_address: nil, + # An ISO 4217 currency string used for the customer's invoices and balance. If not + # set at creation time, will be set at subscription creation time. currency: nil, email_delivery: nil, + # An optional user-defined ID for this customer resource, used throughout the + # system as an alias for this Customer. Use this field to identify a customer by + # an existing identifier in your system. external_customer_id: nil, + # The hierarchical relationships for this customer. hierarchy: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. metadata: nil, + # This is used for creating charges or invoices in an external system via Orb. + # When not in test mode, the connection must first be configured in the Orb + # webapp. payment_provider: nil, + # The ID of this customer in an external payments solution, such as Stripe. This + # is used for creating charges or invoices in the external system via Orb. payment_provider_id: nil, reporting_configuration: nil, shipping_address: nil, tax_configuration: nil, + # Tax IDs are commonly required to be displayed on customer invoices, which are + # added to the headers of invoices. + # + # ### Supported Tax ID Countries and Types + # + # | Country | Type | Description | + # | -------------------- | ------------ | ------------------------------------------------------------------------------------------------------- | + # | Andorra | `ad_nrt` | Andorran NRT Number | + # | Argentina | `ar_cuit` | Argentinian Tax ID Number | + # | Australia | `au_abn` | Australian Business Number (AU ABN) | + # | Australia | `au_arn` | Australian Taxation Office Reference Number | + # | Austria | `eu_vat` | European VAT Number | + # | Bahrain | `bh_vat` | Bahraini VAT Number | + # | Belgium | `eu_vat` | European VAT Number | + # | Bolivia | `bo_tin` | Bolivian Tax ID | + # | Brazil | `br_cnpj` | Brazilian CNPJ Number | + # | Brazil | `br_cpf` | Brazilian CPF Number | + # | Bulgaria | `bg_uic` | Bulgaria Unified Identification Code | + # | Bulgaria | `eu_vat` | European VAT Number | + # | Canada | `ca_bn` | Canadian BN | + # | Canada | `ca_gst_hst` | Canadian GST/HST Number | + # | Canada | `ca_pst_bc` | Canadian PST Number (British Columbia) | + # | Canada | `ca_pst_mb` | Canadian PST Number (Manitoba) | + # | Canada | `ca_pst_sk` | Canadian PST Number (Saskatchewan) | + # | Canada | `ca_qst` | Canadian QST Number (Québec) | + # | Chile | `cl_tin` | Chilean TIN | + # | China | `cn_tin` | Chinese Tax ID | + # | Colombia | `co_nit` | Colombian NIT Number | + # | Costa Rica | `cr_tin` | Costa Rican Tax ID | + # | Croatia | `eu_vat` | European VAT Number | + # | Cyprus | `eu_vat` | European VAT Number | + # | Czech Republic | `eu_vat` | European VAT Number | + # | Denmark | `eu_vat` | European VAT Number | + # | Dominican Republic | `do_rcn` | Dominican RCN Number | + # | Ecuador | `ec_ruc` | Ecuadorian RUC Number | + # | Egypt | `eg_tin` | Egyptian Tax Identification Number | + # | El Salvador | `sv_nit` | El Salvadorian NIT Number | + # | Estonia | `eu_vat` | European VAT Number | + # | EU | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Finland | `eu_vat` | European VAT Number | + # | France | `eu_vat` | European VAT Number | + # | Georgia | `ge_vat` | Georgian VAT | + # | Germany | `eu_vat` | European VAT Number | + # | Greece | `eu_vat` | European VAT Number | + # | Hong Kong | `hk_br` | Hong Kong BR Number | + # | Hungary | `eu_vat` | European VAT Number | + # | Hungary | `hu_tin` | Hungary Tax Number (adószám) | + # | Iceland | `is_vat` | Icelandic VAT | + # | India | `in_gst` | Indian GST Number | + # | Indonesia | `id_npwp` | Indonesian NPWP Number | + # | Ireland | `eu_vat` | European VAT Number | + # | Israel | `il_vat` | Israel VAT | + # | Italy | `eu_vat` | European VAT Number | + # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | + # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | + # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | + # | Kazakhstan | `kz_bin` | Kazakhstani Business Identification Number | + # | Kenya | `ke_pin` | Kenya Revenue Authority Personal Identification Number | + # | Latvia | `eu_vat` | European VAT Number | + # | Liechtenstein | `li_uid` | Liechtensteinian UID Number | + # | Lithuania | `eu_vat` | European VAT Number | + # | Luxembourg | `eu_vat` | European VAT Number | + # | Malaysia | `my_frp` | Malaysian FRP Number | + # | Malaysia | `my_itn` | Malaysian ITN | + # | Malaysia | `my_sst` | Malaysian SST Number | + # | Malta | `eu_vat ` | European VAT Number | + # | Mexico | `mx_rfc` | Mexican RFC Number | + # | Netherlands | `eu_vat` | European VAT Number | + # | New Zealand | `nz_gst` | New Zealand GST Number | + # | Nigeria | `ng_tin` | Nigerian Tax Identification Number | + # | Norway | `no_vat` | Norwegian VAT Number | + # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | + # | Oman | `om_vat` | Omani VAT Number | + # | Peru | `pe_ruc` | Peruvian RUC Number | + # | Philippines | `ph_tin ` | Philippines Tax Identification Number | + # | Poland | `eu_vat` | European VAT Number | + # | Portugal | `eu_vat` | European VAT Number | + # | Romania | `eu_vat` | European VAT Number | + # | Romania | `ro_tin` | Romanian Tax ID Number | + # | Russia | `ru_inn` | Russian INN | + # | Russia | `ru_kpp` | Russian KPP | + # | Saudi Arabia | `sa_vat` | Saudi Arabia VAT | + # | Serbia | `rs_pib` | Serbian PIB Number | + # | Singapore | `sg_gst` | Singaporean GST | + # | Singapore | `sg_uen` | Singaporean UEN | + # | Slovakia | `eu_vat` | European VAT Number | + # | Slovenia | `eu_vat` | European VAT Number | + # | Slovenia | `si_tin` | Slovenia Tax Number (davčna številka) | + # | South Africa | `za_vat` | South African VAT Number | + # | South Korea | `kr_brn` | Korean BRN | + # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | + # | Spain | `eu_vat` | European VAT Number | + # | Sweden | `eu_vat` | European VAT Number | + # | Switzerland | `ch_vat` | Switzerland VAT Number | + # | Taiwan | `tw_vat` | Taiwanese VAT | + # | Thailand | `th_vat` | Thai VAT | + # | Turkey | `tr_tin` | Turkish Tax Identification Number | + # | Ukraine | `ua_vat` | Ukrainian VAT | + # | United Arab Emirates | `ae_trn` | United Arab Emirates TRN | + # | United Kingdom | `eu_vat` | Northern Ireland VAT Number | + # | United Kingdom | `gb_vat` | United Kingdom VAT Number | + # | United States | `us_ein` | United States EIN | + # | Uruguay | `uy_ruc` | Uruguayan RUC Number | + # | Venezuela | `ve_rif` | Venezuelan RIF Number | + # | Vietnam | `vn_tin` | Vietnamese Tax ID Number | tax_id: nil, + # A timezone identifier from the IANA timezone database, such as + # `"America/Los_Angeles"`. This defaults to your account's timezone if not set. + # This cannot be changed after customer creation. timezone: nil, request_options: {} ) end + # This endpoint can be used to update the `payment_provider`, + # `payment_provider_id`, `name`, `email`, `email_delivery`, `tax_id`, + # `auto_collection`, `metadata`, `shipping_address`, `billing_address`, and + # `additional_emails` of an existing customer. Other fields on a customer are + # currently immutable. sig do params( customer_id: String, @@ -99,26 +247,161 @@ module Orb def update( customer_id, accounting_sync_configuration: nil, + # Additional email addresses for this customer. If populated, these email + # addresses will be CC'd for customer communications. additional_emails: nil, + # Used to determine if invoices for this customer will automatically attempt to + # charge a saved payment method, if available. This parameter defaults to `True` + # when a payment provider is provided on customer creation. auto_collection: nil, billing_address: nil, + # An ISO 4217 currency string used for the customer's invoices and balance. If not + # set at creation time, will be set at subscription creation time. currency: nil, + # A valid customer email, to be used for invoicing and notifications. email: nil, email_delivery: nil, + # The external customer ID. This can only be set if empty and the customer has no + # past or current subscriptions. external_customer_id: nil, + # The hierarchical relationships for this customer. hierarchy: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. metadata: nil, + # The full name of the customer name: nil, + # This is used for creating charges or invoices in an external system via Orb. + # When not in test mode: + # + # - the connection must first be configured in the Orb webapp. + # - if the provider is an invoicing provider (`stripe_invoice`, `quickbooks`, + # `bill.com`, `netsuite`), any product mappings must first be configured with + # the Orb team. payment_provider: nil, + # The ID of this customer in an external payments solution, such as Stripe. This + # is used for creating charges or invoices in the external system via Orb. payment_provider_id: nil, reporting_configuration: nil, shipping_address: nil, tax_configuration: nil, + # Tax IDs are commonly required to be displayed on customer invoices, which are + # added to the headers of invoices. + # + # ### Supported Tax ID Countries and Types + # + # | Country | Type | Description | + # | -------------------- | ------------ | ------------------------------------------------------------------------------------------------------- | + # | Andorra | `ad_nrt` | Andorran NRT Number | + # | Argentina | `ar_cuit` | Argentinian Tax ID Number | + # | Australia | `au_abn` | Australian Business Number (AU ABN) | + # | Australia | `au_arn` | Australian Taxation Office Reference Number | + # | Austria | `eu_vat` | European VAT Number | + # | Bahrain | `bh_vat` | Bahraini VAT Number | + # | Belgium | `eu_vat` | European VAT Number | + # | Bolivia | `bo_tin` | Bolivian Tax ID | + # | Brazil | `br_cnpj` | Brazilian CNPJ Number | + # | Brazil | `br_cpf` | Brazilian CPF Number | + # | Bulgaria | `bg_uic` | Bulgaria Unified Identification Code | + # | Bulgaria | `eu_vat` | European VAT Number | + # | Canada | `ca_bn` | Canadian BN | + # | Canada | `ca_gst_hst` | Canadian GST/HST Number | + # | Canada | `ca_pst_bc` | Canadian PST Number (British Columbia) | + # | Canada | `ca_pst_mb` | Canadian PST Number (Manitoba) | + # | Canada | `ca_pst_sk` | Canadian PST Number (Saskatchewan) | + # | Canada | `ca_qst` | Canadian QST Number (Québec) | + # | Chile | `cl_tin` | Chilean TIN | + # | China | `cn_tin` | Chinese Tax ID | + # | Colombia | `co_nit` | Colombian NIT Number | + # | Costa Rica | `cr_tin` | Costa Rican Tax ID | + # | Croatia | `eu_vat` | European VAT Number | + # | Cyprus | `eu_vat` | European VAT Number | + # | Czech Republic | `eu_vat` | European VAT Number | + # | Denmark | `eu_vat` | European VAT Number | + # | Dominican Republic | `do_rcn` | Dominican RCN Number | + # | Ecuador | `ec_ruc` | Ecuadorian RUC Number | + # | Egypt | `eg_tin` | Egyptian Tax Identification Number | + # | El Salvador | `sv_nit` | El Salvadorian NIT Number | + # | Estonia | `eu_vat` | European VAT Number | + # | EU | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Finland | `eu_vat` | European VAT Number | + # | France | `eu_vat` | European VAT Number | + # | Georgia | `ge_vat` | Georgian VAT | + # | Germany | `eu_vat` | European VAT Number | + # | Greece | `eu_vat` | European VAT Number | + # | Hong Kong | `hk_br` | Hong Kong BR Number | + # | Hungary | `eu_vat` | European VAT Number | + # | Hungary | `hu_tin` | Hungary Tax Number (adószám) | + # | Iceland | `is_vat` | Icelandic VAT | + # | India | `in_gst` | Indian GST Number | + # | Indonesia | `id_npwp` | Indonesian NPWP Number | + # | Ireland | `eu_vat` | European VAT Number | + # | Israel | `il_vat` | Israel VAT | + # | Italy | `eu_vat` | European VAT Number | + # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | + # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | + # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | + # | Kazakhstan | `kz_bin` | Kazakhstani Business Identification Number | + # | Kenya | `ke_pin` | Kenya Revenue Authority Personal Identification Number | + # | Latvia | `eu_vat` | European VAT Number | + # | Liechtenstein | `li_uid` | Liechtensteinian UID Number | + # | Lithuania | `eu_vat` | European VAT Number | + # | Luxembourg | `eu_vat` | European VAT Number | + # | Malaysia | `my_frp` | Malaysian FRP Number | + # | Malaysia | `my_itn` | Malaysian ITN | + # | Malaysia | `my_sst` | Malaysian SST Number | + # | Malta | `eu_vat ` | European VAT Number | + # | Mexico | `mx_rfc` | Mexican RFC Number | + # | Netherlands | `eu_vat` | European VAT Number | + # | New Zealand | `nz_gst` | New Zealand GST Number | + # | Nigeria | `ng_tin` | Nigerian Tax Identification Number | + # | Norway | `no_vat` | Norwegian VAT Number | + # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | + # | Oman | `om_vat` | Omani VAT Number | + # | Peru | `pe_ruc` | Peruvian RUC Number | + # | Philippines | `ph_tin ` | Philippines Tax Identification Number | + # | Poland | `eu_vat` | European VAT Number | + # | Portugal | `eu_vat` | European VAT Number | + # | Romania | `eu_vat` | European VAT Number | + # | Romania | `ro_tin` | Romanian Tax ID Number | + # | Russia | `ru_inn` | Russian INN | + # | Russia | `ru_kpp` | Russian KPP | + # | Saudi Arabia | `sa_vat` | Saudi Arabia VAT | + # | Serbia | `rs_pib` | Serbian PIB Number | + # | Singapore | `sg_gst` | Singaporean GST | + # | Singapore | `sg_uen` | Singaporean UEN | + # | Slovakia | `eu_vat` | European VAT Number | + # | Slovenia | `eu_vat` | European VAT Number | + # | Slovenia | `si_tin` | Slovenia Tax Number (davčna številka) | + # | South Africa | `za_vat` | South African VAT Number | + # | South Korea | `kr_brn` | Korean BRN | + # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | + # | Spain | `eu_vat` | European VAT Number | + # | Sweden | `eu_vat` | European VAT Number | + # | Switzerland | `ch_vat` | Switzerland VAT Number | + # | Taiwan | `tw_vat` | Taiwanese VAT | + # | Thailand | `th_vat` | Thai VAT | + # | Turkey | `tr_tin` | Turkish Tax Identification Number | + # | Ukraine | `ua_vat` | Ukrainian VAT | + # | United Arab Emirates | `ae_trn` | United Arab Emirates TRN | + # | United Kingdom | `eu_vat` | Northern Ireland VAT Number | + # | United Kingdom | `gb_vat` | United Kingdom VAT Number | + # | United States | `us_ein` | United States EIN | + # | Uruguay | `uy_ruc` | Uruguayan RUC Number | + # | Venezuela | `ve_rif` | Venezuelan RIF Number | + # | Vietnam | `vn_tin` | Vietnamese Tax ID Number | tax_id: nil, request_options: {} ) end + # This endpoint returns a list of all customers for an account. The list of + # customers is ordered starting from the most recently created customer. This + # endpoint follows Orb's + # [standardized pagination format](/api-reference/pagination). + # + # See [Customer](/core-concepts##customer) for an overview of the customer model. sig do params( created_at_gt: T.nilable(Time), @@ -136,12 +419,30 @@ module Orb created_at_gte: nil, created_at_lt: nil, created_at_lte: nil, + # Cursor for pagination. This can be populated by the `next_cursor` value returned + # from the initial request. cursor: nil, + # The number of items to fetch. Defaults to 20. limit: nil, request_options: {} ) end + # This performs a deletion of this customer, its subscriptions, and its invoices, + # provided the customer does not have any issued invoices. Customers with issued + # invoices cannot be deleted. This operation is irreversible. Note that this is a + # _soft_ deletion, but the data will be inaccessible through the API and Orb + # dashboard. + # + # For a hard-deletion, please reach out to the Orb team directly. + # + # **Note**: This operation happens asynchronously and can be expected to take a + # few minutes to propagate to related resources. However, querying for the + # customer on subsequent GET requests while deletion is in process will reflect + # its deletion with a `deleted: true` property. Once the customer deletion has + # been fully processed, the customer will not be returned in the API. + # + # On successful processing, this returns an empty dictionary (`{}`) in the API. sig do params( customer_id: String, @@ -152,6 +453,12 @@ module Orb def delete(customer_id, request_options: {}) end + # This endpoint is used to fetch customer details given an identifier. If the + # `Customer` is in the process of being deleted, only the properties `id` and + # `deleted: true` will be returned. + # + # See the [Customer resource](/core-concepts#customer) for a full discussion of + # the Customer model. sig do params( customer_id: String, @@ -162,6 +469,11 @@ module Orb def fetch(customer_id, request_options: {}) end + # This endpoint is used to fetch customer details given an `external_customer_id` + # (see [Customer ID Aliases](/events-and-metrics/customer-aliases)). + # + # Note that the resource and semantics of this endpoint exactly mirror + # [Get Customer](fetch-customer). sig do params( external_customer_id: String, @@ -172,6 +484,12 @@ module Orb def fetch_by_external_id(external_customer_id, request_options: {}) end + # Sync Orb's payment methods for the customer with their gateway. + # + # This method can be called before taking an action that may cause the customer to + # be charged, ensuring that the most up-to-date payment method is charged. + # + # **Note**: This functionality is currently only available for Stripe. sig do params( external_customer_id: String, @@ -182,6 +500,12 @@ module Orb def sync_payment_methods_from_gateway(external_customer_id, request_options: {}) end + # Sync Orb's payment methods for the customer with their gateway. + # + # This method can be called before taking an action that may cause the customer to + # be charged, ensuring that the most up-to-date payment method is charged. + # + # **Note**: This functionality is currently only available for Stripe. sig do params( customer_id: String, @@ -192,6 +516,10 @@ module Orb def sync_payment_methods_from_gateway_by_external_customer_id(customer_id, request_options: {}) end + # This endpoint is used to update customer details given an `external_customer_id` + # (see [Customer ID Aliases](/events-and-metrics/customer-aliases)). Note that the + # resource and semantics of this endpoint exactly mirror + # [Update Customer](update-customer). sig do params( id: String, @@ -224,21 +552,150 @@ module Orb def update_by_external_id( id, accounting_sync_configuration: nil, + # Additional email addresses for this customer. If populated, these email + # addresses will be CC'd for customer communications. additional_emails: nil, + # Used to determine if invoices for this customer will automatically attempt to + # charge a saved payment method, if available. This parameter defaults to `True` + # when a payment provider is provided on customer creation. auto_collection: nil, billing_address: nil, + # An ISO 4217 currency string used for the customer's invoices and balance. If not + # set at creation time, will be set at subscription creation time. currency: nil, + # A valid customer email, to be used for invoicing and notifications. email: nil, email_delivery: nil, + # The external customer ID. This can only be set if empty and the customer has no + # past or current subscriptions. external_customer_id: nil, + # The hierarchical relationships for this customer. hierarchy: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. metadata: nil, + # The full name of the customer name: nil, + # This is used for creating charges or invoices in an external system via Orb. + # When not in test mode: + # + # - the connection must first be configured in the Orb webapp. + # - if the provider is an invoicing provider (`stripe_invoice`, `quickbooks`, + # `bill.com`, `netsuite`), any product mappings must first be configured with + # the Orb team. payment_provider: nil, + # The ID of this customer in an external payments solution, such as Stripe. This + # is used for creating charges or invoices in the external system via Orb. payment_provider_id: nil, reporting_configuration: nil, shipping_address: nil, tax_configuration: nil, + # Tax IDs are commonly required to be displayed on customer invoices, which are + # added to the headers of invoices. + # + # ### Supported Tax ID Countries and Types + # + # | Country | Type | Description | + # | -------------------- | ------------ | ------------------------------------------------------------------------------------------------------- | + # | Andorra | `ad_nrt` | Andorran NRT Number | + # | Argentina | `ar_cuit` | Argentinian Tax ID Number | + # | Australia | `au_abn` | Australian Business Number (AU ABN) | + # | Australia | `au_arn` | Australian Taxation Office Reference Number | + # | Austria | `eu_vat` | European VAT Number | + # | Bahrain | `bh_vat` | Bahraini VAT Number | + # | Belgium | `eu_vat` | European VAT Number | + # | Bolivia | `bo_tin` | Bolivian Tax ID | + # | Brazil | `br_cnpj` | Brazilian CNPJ Number | + # | Brazil | `br_cpf` | Brazilian CPF Number | + # | Bulgaria | `bg_uic` | Bulgaria Unified Identification Code | + # | Bulgaria | `eu_vat` | European VAT Number | + # | Canada | `ca_bn` | Canadian BN | + # | Canada | `ca_gst_hst` | Canadian GST/HST Number | + # | Canada | `ca_pst_bc` | Canadian PST Number (British Columbia) | + # | Canada | `ca_pst_mb` | Canadian PST Number (Manitoba) | + # | Canada | `ca_pst_sk` | Canadian PST Number (Saskatchewan) | + # | Canada | `ca_qst` | Canadian QST Number (Québec) | + # | Chile | `cl_tin` | Chilean TIN | + # | China | `cn_tin` | Chinese Tax ID | + # | Colombia | `co_nit` | Colombian NIT Number | + # | Costa Rica | `cr_tin` | Costa Rican Tax ID | + # | Croatia | `eu_vat` | European VAT Number | + # | Cyprus | `eu_vat` | European VAT Number | + # | Czech Republic | `eu_vat` | European VAT Number | + # | Denmark | `eu_vat` | European VAT Number | + # | Dominican Republic | `do_rcn` | Dominican RCN Number | + # | Ecuador | `ec_ruc` | Ecuadorian RUC Number | + # | Egypt | `eg_tin` | Egyptian Tax Identification Number | + # | El Salvador | `sv_nit` | El Salvadorian NIT Number | + # | Estonia | `eu_vat` | European VAT Number | + # | EU | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme | + # | Finland | `eu_vat` | European VAT Number | + # | France | `eu_vat` | European VAT Number | + # | Georgia | `ge_vat` | Georgian VAT | + # | Germany | `eu_vat` | European VAT Number | + # | Greece | `eu_vat` | European VAT Number | + # | Hong Kong | `hk_br` | Hong Kong BR Number | + # | Hungary | `eu_vat` | European VAT Number | + # | Hungary | `hu_tin` | Hungary Tax Number (adószám) | + # | Iceland | `is_vat` | Icelandic VAT | + # | India | `in_gst` | Indian GST Number | + # | Indonesia | `id_npwp` | Indonesian NPWP Number | + # | Ireland | `eu_vat` | European VAT Number | + # | Israel | `il_vat` | Israel VAT | + # | Italy | `eu_vat` | European VAT Number | + # | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) | + # | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) | + # | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) | + # | Kazakhstan | `kz_bin` | Kazakhstani Business Identification Number | + # | Kenya | `ke_pin` | Kenya Revenue Authority Personal Identification Number | + # | Latvia | `eu_vat` | European VAT Number | + # | Liechtenstein | `li_uid` | Liechtensteinian UID Number | + # | Lithuania | `eu_vat` | European VAT Number | + # | Luxembourg | `eu_vat` | European VAT Number | + # | Malaysia | `my_frp` | Malaysian FRP Number | + # | Malaysia | `my_itn` | Malaysian ITN | + # | Malaysia | `my_sst` | Malaysian SST Number | + # | Malta | `eu_vat ` | European VAT Number | + # | Mexico | `mx_rfc` | Mexican RFC Number | + # | Netherlands | `eu_vat` | European VAT Number | + # | New Zealand | `nz_gst` | New Zealand GST Number | + # | Nigeria | `ng_tin` | Nigerian Tax Identification Number | + # | Norway | `no_vat` | Norwegian VAT Number | + # | Norway | `no_voec` | Norwegian VAT on e-commerce Number | + # | Oman | `om_vat` | Omani VAT Number | + # | Peru | `pe_ruc` | Peruvian RUC Number | + # | Philippines | `ph_tin ` | Philippines Tax Identification Number | + # | Poland | `eu_vat` | European VAT Number | + # | Portugal | `eu_vat` | European VAT Number | + # | Romania | `eu_vat` | European VAT Number | + # | Romania | `ro_tin` | Romanian Tax ID Number | + # | Russia | `ru_inn` | Russian INN | + # | Russia | `ru_kpp` | Russian KPP | + # | Saudi Arabia | `sa_vat` | Saudi Arabia VAT | + # | Serbia | `rs_pib` | Serbian PIB Number | + # | Singapore | `sg_gst` | Singaporean GST | + # | Singapore | `sg_uen` | Singaporean UEN | + # | Slovakia | `eu_vat` | European VAT Number | + # | Slovenia | `eu_vat` | European VAT Number | + # | Slovenia | `si_tin` | Slovenia Tax Number (davčna številka) | + # | South Africa | `za_vat` | South African VAT Number | + # | South Korea | `kr_brn` | Korean BRN | + # | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) | + # | Spain | `eu_vat` | European VAT Number | + # | Sweden | `eu_vat` | European VAT Number | + # | Switzerland | `ch_vat` | Switzerland VAT Number | + # | Taiwan | `tw_vat` | Taiwanese VAT | + # | Thailand | `th_vat` | Thai VAT | + # | Turkey | `tr_tin` | Turkish Tax Identification Number | + # | Ukraine | `ua_vat` | Ukrainian VAT | + # | United Arab Emirates | `ae_trn` | United Arab Emirates TRN | + # | United Kingdom | `eu_vat` | Northern Ireland VAT Number | + # | United Kingdom | `gb_vat` | United Kingdom VAT Number | + # | United States | `us_ein` | United States EIN | + # | Uruguay | `uy_ruc` | Uruguayan RUC Number | + # | Venezuela | `ve_rif` | Venezuelan RIF Number | + # | Vietnam | `vn_tin` | Vietnamese Tax ID Number | tax_id: nil, request_options: {} ) diff --git a/rbi/lib/orb/resources/customers/balance_transactions.rbi b/rbi/lib/orb/resources/customers/balance_transactions.rbi index 404415e3..92b5541b 100644 --- a/rbi/lib/orb/resources/customers/balance_transactions.rbi +++ b/rbi/lib/orb/resources/customers/balance_transactions.rbi @@ -4,6 +4,8 @@ module Orb module Resources class Customers class BalanceTransactions + # Creates an immutable balance transaction that updates the customer's balance and + # returns back the newly created transaction. sig do params( customer_id: String, @@ -14,9 +16,44 @@ module Orb ) .returns(Orb::Models::Customers::BalanceTransactionCreateResponse) end - def create(customer_id, amount:, type:, description: nil, request_options: {}) + def create( + customer_id, + amount:, + type:, + # An optional description that can be specified around this entry. + description: nil, + request_options: {} + ) end + # ## The customer balance + # + # The customer balance is an amount in the customer's currency, which Orb + # automatically applies to subsequent invoices. This balance can be adjusted + # manually via Orb's webapp on the customer details page. You can use this balance + # to provide a fixed mid-period credit to the customer. Commonly, this is done due + # to system downtime/SLA violation, or an adhoc adjustment discussed with the + # customer. + # + # If the balance is a positive value at the time of invoicing, it represents that + # the customer has credit that should be used to offset the amount due on the next + # issued invoice. In this case, Orb will automatically reduce the next invoice by + # the balance amount, and roll over any remaining balance if the invoice is fully + # discounted. + # + # If the balance is a negative value at the time of invoicing, Orb will increase + # the invoice's amount due with a positive adjustment, and reset the balance to 0. + # + # This endpoint retrieves all customer balance transactions in reverse + # chronological order for a single customer, providing a complete audit trail of + # all adjustments and invoice applications. + # + # ## Eligibility + # + # The customer balance can only be applied to invoices or adjusted manually if + # invoices are not synced to a separate invoicing provider. If a payment gateway + # such as Stripe is used, the balance will be applied to the invoice before + # forwarding payment to the gateway. sig do params( customer_id: String, @@ -32,7 +69,10 @@ module Orb end def list( customer_id, + # Cursor for pagination. This can be populated by the `next_cursor` value returned + # from the initial request. cursor: nil, + # The number of items to fetch. Defaults to 20. limit: nil, operation_time_gt: nil, operation_time_gte: nil, diff --git a/rbi/lib/orb/resources/customers/costs.rbi b/rbi/lib/orb/resources/customers/costs.rbi index ab47af0f..360b4fae 100644 --- a/rbi/lib/orb/resources/customers/costs.rbi +++ b/rbi/lib/orb/resources/customers/costs.rbi @@ -4,6 +4,123 @@ module Orb module Resources class Customers class Costs + # This endpoint is used to fetch a day-by-day snapshot of a customer's costs in + # Orb, calculated by applying pricing information to the underlying usage (see the + # [subscription usage endpoint](/api-reference/subscription/fetch-subscription-usage) + # to fetch usage per metric, in usage units rather than a currency). + # + # This endpoint can be leveraged for internal tooling and to provide a more + # transparent billing experience for your end users: + # + # 1. Understand the cost breakdown per line item historically and in real-time for + # the current billing period. + # 2. Provide customer visibility into how different services are contributing to + # the overall invoice with a per-day timeseries (as compared to the + # [upcoming invoice](/api-reference/invoice/fetch-upcoming-invoice) resource, + # which represents a snapshot for the current period). + # 3. Assess how minimums and discounts affect your customers by teasing apart + # costs directly as a result of usage, as opposed to minimums and discounts at + # the plan and price level. + # 4. Gain insight into key customer health metrics, such as the percent + # utilization of the minimum committed spend. + # + # ## Fetching subscriptions + # + # By default, this endpoint fetches the currently active subscription for the + # customer, and returns cost information for the subscription's current billing + # period, broken down by each participating price. If there are no currently + # active subscriptions, this will instead default to the most recently active + # subscription or return an empty series if none are found. For example, if your + # plan charges for compute hours, job runs, and data syncs, then this endpoint + # would provide a daily breakdown of your customer's cost for each of those axes. + # + # If timeframe bounds are specified, Orb fetches all subscriptions that were + # active in that timeframe. If two subscriptions overlap on a single day, costs + # from each price will be summed, and prices for both subscriptions will be + # included in the breakdown. + # + # ## Prepaid plans + # + # For plans that include prices which deduct credits rather than accrue in-arrears + # charges in a billable currency, this endpoint will return the total deduction + # amount, in credits, for the specified timeframe. + # + # ## Cumulative subtotals and totals + # + # Since the subtotal and total must factor in any billing-period level discounts + # and minimums, it's most meaningful to consider costs relative to the start of + # the subscription's billing period. As a result, by default this endpoint returns + # cumulative totals since the beginning of the billing period. In particular, the + # `timeframe_start` of a returned timeframe window is _always_ the beginning of + # the billing period and `timeframe_end` is incremented one day at a time to build + # the result. + # + # A customer that uses a few API calls a day but has a minimum commitment might + # exhibit the following pattern for their subtotal and total in the first few days + # of the month. Here, we assume that each API call is $2.50, the customer's plan + # has a monthly minimum of $50 for this price, and that the subscription's billing + # period bounds are aligned to the first of the month: + # + # | timeframe_start | timeframe_end | Cumulative usage | Subtotal | Total (incl. commitment) | + # | --------------- | ------------- | ---------------- | -------- | ------------------------ | + # | 2023-02-01 | 2023-02-02 | 9 | $22.50 | $50.00 | + # | 2023-02-01 | 2023-02-03 | 19 | $47.50 | $50.00 | + # | 2023-02-01 | 2023-02-04 | 20 | $50.00 | $50.00 | + # | 2023-02-01 | 2023-02-05 | 28 | $70.00 | $70.00 | + # | 2023-02-01 | 2023-02-06 | 36 | $90.00 | $90.00 | + # + # ### Periodic values + # + # When the query parameter `view_mode=periodic` is specified, Orb will return an + # incremental day-by-day view of costs. In this case, there will always be a + # one-day difference between `timeframe_start` and `timeframe_end` for the + # timeframes returned. This is a transform on top of the cumulative costs, + # calculated by taking the difference of each timeframe with the last. Note that + # in the above example, the `Total` value would be 0 for the second two data + # points, since the minimum commitment has not yet been hit and each day is not + # contributing anything to the total cost. + # + # ## Timeframe bounds + # + # For an active subscription, both timeframes should be specified in the request. + # If a subscription starts or ends within the timeframe, the response will only + # include windows where the subscription is active. If a subscription has ended, + # no timeframe bounds need to be specified and the response will default to the + # billing period when the subscription was last active. + # + # As noted above, `timeframe_start` for a given cumulative datapoint is always the + # beginning of the billing period, and `timeframe_end` is incremented one day at a + # time to construct the response. When a timeframe is passed in that is not + # aligned to the current subscription's billing period, the response will contain + # cumulative totals from multiple billing periods. + # + # Suppose the queried customer has a subscription aligned to the 15th of every + # month. If this endpoint is queried with the date range `2023-06-01` - + # `2023-07-01`, the first data point will represent about half a billing period's + # worth of costs, accounting for accruals from the start of the billing period and + # inclusive of the first day of the timeframe + # (`timeframe_start = 2023-05-15 00:00:00`, `timeframe_end = 2023-06-02 00:00:00`) + # + # | datapoint index | timeframe_start | timeframe_end | + # | --------------- | --------------- | ------------- | + # | 0 | 2023-05-15 | 2023-06-02 | + # | 1 | 2023-05-15 | 2023-06-03 | + # | 2 | ... | ... | + # | 3 | 2023-05-15 | 2023-06-14 | + # | 4 | 2023-06-15 | 2023-06-16 | + # | 5 | 2023-06-15 | 2023-06-17 | + # | 6 | ... | ... | + # | 7 | 2023-06-15 | 2023-07-01 | + # + # You can see this sliced timeframe visualized + # [here](https://i.imgur.com/TXhYgme.png). + # + # ### Matrix prices + # + # When a price uses matrix pricing, it's important to view costs grouped by those + # matrix dimensions. Orb will return `price_groups` with the `grouping_key` and + # `secondary_grouping_key` based on the matrix price definition, for each + # `grouping_value` and `secondary_grouping_value` available. sig do params( customer_id: String, @@ -17,14 +134,138 @@ module Orb end def list( customer_id, + # The currency or custom pricing unit to use. currency: nil, + # Costs returned are exclusive of `timeframe_end`. timeframe_end: nil, + # Costs returned are inclusive of `timeframe_start`. timeframe_start: nil, + # Controls whether Orb returns cumulative costs since the start of the billing + # period, or incremental day-by-day costs. If your customer has minimums or + # discounts, it's strongly recommended that you use the default cumulative + # behavior. view_mode: nil, request_options: {} ) end + # This endpoint is used to fetch a day-by-day snapshot of a customer's costs in + # Orb, calculated by applying pricing information to the underlying usage (see the + # [subscription usage endpoint](/api-reference/subscription/fetch-subscription-usage) + # to fetch usage per metric, in usage units rather than a currency). + # + # This endpoint can be leveraged for internal tooling and to provide a more + # transparent billing experience for your end users: + # + # 1. Understand the cost breakdown per line item historically and in real-time for + # the current billing period. + # 2. Provide customer visibility into how different services are contributing to + # the overall invoice with a per-day timeseries (as compared to the + # [upcoming invoice](/api-reference/invoice/fetch-upcoming-invoice) resource, + # which represents a snapshot for the current period). + # 3. Assess how minimums and discounts affect your customers by teasing apart + # costs directly as a result of usage, as opposed to minimums and discounts at + # the plan and price level. + # 4. Gain insight into key customer health metrics, such as the percent + # utilization of the minimum committed spend. + # + # ## Fetching subscriptions + # + # By default, this endpoint fetches the currently active subscription for the + # customer, and returns cost information for the subscription's current billing + # period, broken down by each participating price. If there are no currently + # active subscriptions, this will instead default to the most recently active + # subscription or return an empty series if none are found. For example, if your + # plan charges for compute hours, job runs, and data syncs, then this endpoint + # would provide a daily breakdown of your customer's cost for each of those axes. + # + # If timeframe bounds are specified, Orb fetches all subscriptions that were + # active in that timeframe. If two subscriptions overlap on a single day, costs + # from each price will be summed, and prices for both subscriptions will be + # included in the breakdown. + # + # ## Prepaid plans + # + # For plans that include prices which deduct credits rather than accrue in-arrears + # charges in a billable currency, this endpoint will return the total deduction + # amount, in credits, for the specified timeframe. + # + # ## Cumulative subtotals and totals + # + # Since the subtotal and total must factor in any billing-period level discounts + # and minimums, it's most meaningful to consider costs relative to the start of + # the subscription's billing period. As a result, by default this endpoint returns + # cumulative totals since the beginning of the billing period. In particular, the + # `timeframe_start` of a returned timeframe window is _always_ the beginning of + # the billing period and `timeframe_end` is incremented one day at a time to build + # the result. + # + # A customer that uses a few API calls a day but has a minimum commitment might + # exhibit the following pattern for their subtotal and total in the first few days + # of the month. Here, we assume that each API call is $2.50, the customer's plan + # has a monthly minimum of $50 for this price, and that the subscription's billing + # period bounds are aligned to the first of the month: + # + # | timeframe_start | timeframe_end | Cumulative usage | Subtotal | Total (incl. commitment) | + # | --------------- | ------------- | ---------------- | -------- | ------------------------ | + # | 2023-02-01 | 2023-02-02 | 9 | $22.50 | $50.00 | + # | 2023-02-01 | 2023-02-03 | 19 | $47.50 | $50.00 | + # | 2023-02-01 | 2023-02-04 | 20 | $50.00 | $50.00 | + # | 2023-02-01 | 2023-02-05 | 28 | $70.00 | $70.00 | + # | 2023-02-01 | 2023-02-06 | 36 | $90.00 | $90.00 | + # + # ### Periodic values + # + # When the query parameter `view_mode=periodic` is specified, Orb will return an + # incremental day-by-day view of costs. In this case, there will always be a + # one-day difference between `timeframe_start` and `timeframe_end` for the + # timeframes returned. This is a transform on top of the cumulative costs, + # calculated by taking the difference of each timeframe with the last. Note that + # in the above example, the `Total` value would be 0 for the second two data + # points, since the minimum commitment has not yet been hit and each day is not + # contributing anything to the total cost. + # + # ## Timeframe bounds + # + # For an active subscription, both timeframes should be specified in the request. + # If a subscription starts or ends within the timeframe, the response will only + # include windows where the subscription is active. If a subscription has ended, + # no timeframe bounds need to be specified and the response will default to the + # billing period when the subscription was last active. + # + # As noted above, `timeframe_start` for a given cumulative datapoint is always the + # beginning of the billing period, and `timeframe_end` is incremented one day at a + # time to construct the response. When a timeframe is passed in that is not + # aligned to the current subscription's billing period, the response will contain + # cumulative totals from multiple billing periods. + # + # Suppose the queried customer has a subscription aligned to the 15th of every + # month. If this endpoint is queried with the date range `2023-06-01` - + # `2023-07-01`, the first data point will represent about half a billing period's + # worth of costs, accounting for accruals from the start of the billing period and + # inclusive of the first day of the timeframe + # (`timeframe_start = 2023-05-15 00:00:00`, `timeframe_end = 2023-06-02 00:00:00`) + # + # | datapoint index | timeframe_start | timeframe_end | + # | --------------- | --------------- | ------------- | + # | 0 | 2023-05-15 | 2023-06-02 | + # | 1 | 2023-05-15 | 2023-06-03 | + # | 2 | ... | ... | + # | 3 | 2023-05-15 | 2023-06-14 | + # | 4 | 2023-06-15 | 2023-06-16 | + # | 5 | 2023-06-15 | 2023-06-17 | + # | 6 | ... | ... | + # | 7 | 2023-06-15 | 2023-07-01 | + # + # You can see this sliced timeframe visualized + # [here](https://i.imgur.com/TXhYgme.png). + # + # ### Matrix prices + # + # When a price uses matrix pricing, it's important to view costs grouped by those + # matrix dimensions. Orb will return `price_groups` with the `grouping_key` and + # `secondary_grouping_key` based on the matrix price definition, for each + # `grouping_value` and `secondary_grouping_value` available. sig do params( external_customer_id: String, @@ -38,9 +279,16 @@ module Orb end def list_by_external_id( external_customer_id, + # The currency or custom pricing unit to use. currency: nil, + # Costs returned are exclusive of `timeframe_end`. timeframe_end: nil, + # Costs returned are inclusive of `timeframe_start`. timeframe_start: nil, + # Controls whether Orb returns cumulative costs since the start of the billing + # period, or incremental day-by-day costs. If your customer has minimums or + # discounts, it's strongly recommended that you use the default cumulative + # behavior. view_mode: nil, request_options: {} ) diff --git a/rbi/lib/orb/resources/customers/credits.rbi b/rbi/lib/orb/resources/customers/credits.rbi index 1e6cd94b..a20dd1a7 100644 --- a/rbi/lib/orb/resources/customers/credits.rbi +++ b/rbi/lib/orb/resources/customers/credits.rbi @@ -12,6 +12,13 @@ module Orb def top_ups end + # Returns a paginated list of unexpired, non-zero credit blocks for a customer. + # + # If `include_all_blocks` is set to `true`, all credit blocks (including expired + # and depleted blocks) will be included in the response. + # + # Note that `currency` defaults to credits if not specified. To use a real world + # currency, set `currency` to an ISO 4217 string. sig do params( customer_id: String, @@ -25,14 +32,27 @@ module Orb end def list( customer_id, + # The ledger currency or custom pricing unit to use. currency: nil, + # Cursor for pagination. This can be populated by the `next_cursor` value returned + # from the initial request. cursor: nil, + # If set to True, all expired and depleted blocks, as well as active block will be + # returned. include_all_blocks: nil, + # The number of items to fetch. Defaults to 20. limit: nil, request_options: {} ) end + # Returns a paginated list of unexpired, non-zero credit blocks for a customer. + # + # If `include_all_blocks` is set to `true`, all credit blocks (including expired + # and depleted blocks) will be included in the response. + # + # Note that `currency` defaults to credits if not specified. To use a real world + # currency, set `currency` to an ISO 4217 string. sig do params( external_customer_id: String, @@ -46,9 +66,15 @@ module Orb end def list_by_external_id( external_customer_id, + # The ledger currency or custom pricing unit to use. currency: nil, + # Cursor for pagination. This can be populated by the `next_cursor` value returned + # from the initial request. cursor: nil, + # If set to True, all expired and depleted blocks, as well as active block will be + # returned. include_all_blocks: nil, + # The number of items to fetch. Defaults to 20. limit: nil, request_options: {} ) diff --git a/rbi/lib/orb/resources/customers/credits/ledger.rbi b/rbi/lib/orb/resources/customers/credits/ledger.rbi index 19731f10..8df68064 100644 --- a/rbi/lib/orb/resources/customers/credits/ledger.rbi +++ b/rbi/lib/orb/resources/customers/credits/ledger.rbi @@ -5,6 +5,87 @@ module Orb class Customers class Credits class Ledger + # The credits ledger provides _auditing_ functionality over Orb's credits system + # with a list of actions that have taken place to modify a customer's credit + # balance. This [paginated endpoint](/api-reference/pagination) lists these + # entries, starting from the most recent ledger entry. + # + # More details on using Orb's real-time credit feature are + # [here](/product-catalog/prepurchase). + # + # There are four major types of modifications to credit balance, detailed below. + # + # ## Increment + # + # Credits (which optionally expire on a future date) can be added via the API + # ([Add Ledger Entry](create-ledger-entry)). The ledger entry for such an action + # will always contain the total eligible starting and ending balance for the + # customer at the time the entry was added to the ledger. + # + # ## Decrement + # + # Deductions can occur as a result of an API call to create a ledger entry (see + # [Add Ledger Entry](create-ledger-entry)), or automatically as a result of + # incurring usage. Both ledger entries present the `decrement` entry type. + # + # As usage for a customer is reported into Orb, credits may be deducted according + # to the customer's plan configuration. An automated deduction of this type will + # result in a ledger entry, also with a starting and ending balance. In order to + # provide better tracing capabilities for automatic deductions, Orb always + # associates each automatic deduction with the `event_id` at the time of + # ingestion, used to pinpoint _why_ credit deduction took place and to ensure that + # credits are never deducted without an associated usage event. + # + # By default, Orb uses an algorithm that automatically deducts from the _soonest + # expiring credit block_ first in order to ensure that all credits are utilized + # appropriately. As an example, if trial credits with an expiration date of 2 + # weeks from now are present for a customer, they will be used before any + # deductions take place from a non-expiring credit block. + # + # If there are multiple blocks with the same expiration date, Orb will deduct from + # the block with the _lower cost basis_ first (e.g. trial credits with a $0 cost + # basis before paid credits with a $5.00 cost basis). + # + # It's also possible for a single usage event's deduction to _span_ credit blocks. + # In this case, Orb will deduct from the next block, ending at the credit block + # which consists of unexpiring credits. Each of these deductions will lead to a + # _separate_ ledger entry, one per credit block that is deducted from. By default, + # the customer's total credit balance in Orb can be negative as a result of a + # decrement. + # + # ## Expiration change + # + # The expiry of credits can be changed as a result of the API (See + # [Add Ledger Entry](create-ledger-entry)). This will create a ledger entry that + # specifies the balance as well as the initial and target expiry dates. + # + # Note that for this entry type, `starting_balance` will equal `ending_balance`, + # and the `amount` represents the balance transferred. The credit block linked to + # the ledger entry is the source credit block from which there was an expiration + # change + # + # ## Credits expiry + # + # When a set of credits expire on pre-set expiration date, the customer's balance + # automatically reflects this change and adds an entry to the ledger indicating + # this event. Note that credit expiry should always happen close to a date + # boundary in the customer's timezone. + # + # ## Void initiated + # + # Credit blocks can be voided via the API. The `amount` on this entry corresponds + # to the number of credits that were remaining in the block at time of void. + # `void_reason` will be populated if the void is created with a reason. + # + # ## Void + # + # When a set of credits is voided, the customer's balance automatically reflects + # this change and adds an entry to the ledger indicating this event. + # + # ## Amendment + # + # When credits are added to a customer's balance as a result of a correction, this + # entry will be added to the ledger to indicate the adjustment of credits. sig do params( customer_id: String, @@ -40,16 +121,130 @@ module Orb created_at_gte: nil, created_at_lt: nil, created_at_lte: nil, + # The ledger currency or custom pricing unit to use. currency: nil, + # Cursor for pagination. This can be populated by the `next_cursor` value returned + # from the initial request. cursor: nil, entry_status: nil, entry_type: nil, + # The number of items to fetch. Defaults to 20. limit: nil, minimum_amount: nil, request_options: {} ) end + # This endpoint allows you to create a new ledger entry for a specified customer's + # balance. This can be used to increment balance, deduct credits, and change the + # expiry date of existing credits. + # + # ## Effects of adding a ledger entry + # + # 1. After calling this endpoint, [Fetch Credit Balance](fetch-customer-credits) + # will return a credit block that represents the changes (i.e. balance changes + # or transfers). + # 2. A ledger entry will be added to the credits ledger for this customer, and + # therefore returned in the + # [View Credits Ledger](fetch-customer-credits-ledger) response as well as + # serialized in the response to this request. In the case of deductions without + # a specified block, multiple ledger entries may be created if the deduction + # spans credit blocks. + # 3. If `invoice_settings` is specified, an invoice will be created that reflects + # the cost of the credits (based on `amount` and `per_unit_cost_basis`). + # + # ## Adding credits + # + # Adding credits is done by creating an entry of type `increment`. This requires + # the caller to specify a number of credits as well as an optional expiry date in + # `YYYY-MM-DD` format. Orb also recommends specifying a description to assist with + # auditing. When adding credits, the caller can also specify a cost basis + # per-credit, to indicate how much in USD a customer paid for a single credit in a + # block. This can later be used for revenue recognition. + # + # The following snippet illustrates a sample request body to increment credits + # which will expire in January of 2022. + # + # ```json + # { + # "entry_type": "increment", + # "amount": 100, + # "expiry_date": "2022-12-28", + # "per_unit_cost_basis": "0.20", + # "description": "Purchased 100 credits" + # } + # ``` + # + # Note that by default, Orb will always first increment any _negative_ balance in + # existing blocks before adding the remaining amount to the desired credit block. + # + # ### Invoicing for credits + # + # By default, Orb manipulates the credit ledger but does not charge for credits. + # However, if you pass `invoice_settings` in the body of this request, Orb will + # also generate a one-off invoice for the customer for the credits pre-purchase. + # Note that you _must_ provide the `per_unit_cost_basis`, since the total charges + # on the invoice are calculated by multiplying the cost basis with the number of + # credit units added. + # + # ## Deducting Credits + # + # Orb allows you to deduct credits from a customer by creating an entry of type + # `decrement`. Orb matches the algorithm for automatic deductions for determining + # which credit blocks to decrement from. In the case that the deduction leads to + # multiple ledger entries, the response from this endpoint will be the final + # deduction. Orb also optionally allows specifying a description to assist with + # auditing. + # + # The following snippet illustrates a sample request body to decrement credits. + # + # ```json + # { + # "entry_type": "decrement", + # "amount": 20, + # "description": "Removing excess credits" + # } + # ``` + # + # ## Changing credits expiry + # + # If you'd like to change when existing credits expire, you should create a ledger + # entry of type `expiration_change`. For this entry, the required parameter + # `expiry_date` identifies the _originating_ block, and the required parameter + # `target_expiry_date` identifies when the transferred credits should now expire. + # A new credit block will be created with expiry date `target_expiry_date`, with + # the same cost basis data as the original credit block, if present. + # + # Note that the balance of the block with the given `expiry_date` must be at least + # equal to the desired transfer amount determined by the `amount` parameter. + # + # The following snippet illustrates a sample request body to extend the expiration + # date of credits by one year: + # + # ```json + # { + # "entry_type": "expiration_change", + # "amount": 10, + # "expiry_date": "2022-12-28", + # "block_id": "UiUhFWeLHPrBY4Ad", + # "target_expiry_date": "2023-12-28", + # "description": "Extending credit validity" + # } + # ``` + # + # ## Voiding credits + # + # If you'd like to void a credit block, create a ledger entry of type `void`. For + # this entry, `block_id` is required to identify the block, and `amount` indicates + # how many credits to void, up to the block's initial balance. Pass in a + # `void_reason` of `refund` if the void is due to a refund. + # + # ## Amendment + # + # If you'd like to undo a decrement on a credit block, create a ledger entry of + # type `amendment`. For this entry, `block_id` is required to identify the block + # that was originally decremented from, and `amount` indicates how many credits to + # return to the customer, up to the block's initial balance. sig do params( customer_id: String, @@ -81,22 +276,156 @@ module Orb end def create_entry( customer_id, + # The number of credits to effect. Note that this is required for increment, + # decrement or void operations. amount:, entry_type:, + # An ISO 8601 format date that identifies the origination credit block to expire expiry_date:, + # A future date (specified in YYYY-MM-DD format) used for expiration change, + # denoting when credits transferred (as part of a partial block expiration) should + # expire. target_expiry_date:, + # The ID of the block to reverse a decrement from. block_id:, + # The currency or custom pricing unit to use for this ledger entry. If this is a + # real-world currency, it must match the customer's invoicing currency. currency: nil, + # Optional metadata that can be specified when adding ledger results via the API. + # For example, this can be used to note an increment refers to trial credits, or + # for noting corrections as a result of an incident, etc. description: nil, + # An ISO 8601 format date that denotes when this credit balance should become + # available for use. effective_date: nil, + # Passing `invoice_settings` automatically generates an invoice for the newly + # added credits. If `invoice_settings` is passed, you must specify + # per_unit_cost_basis, as the calculation of the invoice total is done on that + # basis. invoice_settings: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. metadata: nil, + # Can only be specified when entry_type=increment. How much, in the customer's + # currency, a customer paid for a single credit in this block per_unit_cost_basis: nil, + # Can only be specified when `entry_type=void`. The reason for the void. void_reason: nil, request_options: {} ) end + # This endpoint allows you to create a new ledger entry for a specified customer's + # balance. This can be used to increment balance, deduct credits, and change the + # expiry date of existing credits. + # + # ## Effects of adding a ledger entry + # + # 1. After calling this endpoint, [Fetch Credit Balance](fetch-customer-credits) + # will return a credit block that represents the changes (i.e. balance changes + # or transfers). + # 2. A ledger entry will be added to the credits ledger for this customer, and + # therefore returned in the + # [View Credits Ledger](fetch-customer-credits-ledger) response as well as + # serialized in the response to this request. In the case of deductions without + # a specified block, multiple ledger entries may be created if the deduction + # spans credit blocks. + # 3. If `invoice_settings` is specified, an invoice will be created that reflects + # the cost of the credits (based on `amount` and `per_unit_cost_basis`). + # + # ## Adding credits + # + # Adding credits is done by creating an entry of type `increment`. This requires + # the caller to specify a number of credits as well as an optional expiry date in + # `YYYY-MM-DD` format. Orb also recommends specifying a description to assist with + # auditing. When adding credits, the caller can also specify a cost basis + # per-credit, to indicate how much in USD a customer paid for a single credit in a + # block. This can later be used for revenue recognition. + # + # The following snippet illustrates a sample request body to increment credits + # which will expire in January of 2022. + # + # ```json + # { + # "entry_type": "increment", + # "amount": 100, + # "expiry_date": "2022-12-28", + # "per_unit_cost_basis": "0.20", + # "description": "Purchased 100 credits" + # } + # ``` + # + # Note that by default, Orb will always first increment any _negative_ balance in + # existing blocks before adding the remaining amount to the desired credit block. + # + # ### Invoicing for credits + # + # By default, Orb manipulates the credit ledger but does not charge for credits. + # However, if you pass `invoice_settings` in the body of this request, Orb will + # also generate a one-off invoice for the customer for the credits pre-purchase. + # Note that you _must_ provide the `per_unit_cost_basis`, since the total charges + # on the invoice are calculated by multiplying the cost basis with the number of + # credit units added. + # + # ## Deducting Credits + # + # Orb allows you to deduct credits from a customer by creating an entry of type + # `decrement`. Orb matches the algorithm for automatic deductions for determining + # which credit blocks to decrement from. In the case that the deduction leads to + # multiple ledger entries, the response from this endpoint will be the final + # deduction. Orb also optionally allows specifying a description to assist with + # auditing. + # + # The following snippet illustrates a sample request body to decrement credits. + # + # ```json + # { + # "entry_type": "decrement", + # "amount": 20, + # "description": "Removing excess credits" + # } + # ``` + # + # ## Changing credits expiry + # + # If you'd like to change when existing credits expire, you should create a ledger + # entry of type `expiration_change`. For this entry, the required parameter + # `expiry_date` identifies the _originating_ block, and the required parameter + # `target_expiry_date` identifies when the transferred credits should now expire. + # A new credit block will be created with expiry date `target_expiry_date`, with + # the same cost basis data as the original credit block, if present. + # + # Note that the balance of the block with the given `expiry_date` must be at least + # equal to the desired transfer amount determined by the `amount` parameter. + # + # The following snippet illustrates a sample request body to extend the expiration + # date of credits by one year: + # + # ```json + # { + # "entry_type": "expiration_change", + # "amount": 10, + # "expiry_date": "2022-12-28", + # "block_id": "UiUhFWeLHPrBY4Ad", + # "target_expiry_date": "2023-12-28", + # "description": "Extending credit validity" + # } + # ``` + # + # ## Voiding credits + # + # If you'd like to void a credit block, create a ledger entry of type `void`. For + # this entry, `block_id` is required to identify the block, and `amount` indicates + # how many credits to void, up to the block's initial balance. Pass in a + # `void_reason` of `refund` if the void is due to a refund. + # + # ## Amendment + # + # If you'd like to undo a decrement on a credit block, create a ledger entry of + # type `amendment`. For this entry, `block_id` is required to identify the block + # that was originally decremented from, and `amount` indicates how many credits to + # return to the customer, up to the block's initial balance. sig do params( external_customer_id: String, @@ -128,22 +457,127 @@ module Orb end def create_entry_by_external_id( external_customer_id, + # The number of credits to effect. Note that this is required for increment, + # decrement or void operations. amount:, entry_type:, + # An ISO 8601 format date that identifies the origination credit block to expire expiry_date:, + # A future date (specified in YYYY-MM-DD format) used for expiration change, + # denoting when credits transferred (as part of a partial block expiration) should + # expire. target_expiry_date:, + # The ID of the block to reverse a decrement from. block_id:, + # The currency or custom pricing unit to use for this ledger entry. If this is a + # real-world currency, it must match the customer's invoicing currency. currency: nil, + # Optional metadata that can be specified when adding ledger results via the API. + # For example, this can be used to note an increment refers to trial credits, or + # for noting corrections as a result of an incident, etc. description: nil, + # An ISO 8601 format date that denotes when this credit balance should become + # available for use. effective_date: nil, + # Passing `invoice_settings` automatically generates an invoice for the newly + # added credits. If `invoice_settings` is passed, you must specify + # per_unit_cost_basis, as the calculation of the invoice total is done on that + # basis. invoice_settings: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. metadata: nil, + # Can only be specified when entry_type=increment. How much, in the customer's + # currency, a customer paid for a single credit in this block per_unit_cost_basis: nil, + # Can only be specified when `entry_type=void`. The reason for the void. void_reason: nil, request_options: {} ) end + # The credits ledger provides _auditing_ functionality over Orb's credits system + # with a list of actions that have taken place to modify a customer's credit + # balance. This [paginated endpoint](/api-reference/pagination) lists these + # entries, starting from the most recent ledger entry. + # + # More details on using Orb's real-time credit feature are + # [here](/product-catalog/prepurchase). + # + # There are four major types of modifications to credit balance, detailed below. + # + # ## Increment + # + # Credits (which optionally expire on a future date) can be added via the API + # ([Add Ledger Entry](create-ledger-entry)). The ledger entry for such an action + # will always contain the total eligible starting and ending balance for the + # customer at the time the entry was added to the ledger. + # + # ## Decrement + # + # Deductions can occur as a result of an API call to create a ledger entry (see + # [Add Ledger Entry](create-ledger-entry)), or automatically as a result of + # incurring usage. Both ledger entries present the `decrement` entry type. + # + # As usage for a customer is reported into Orb, credits may be deducted according + # to the customer's plan configuration. An automated deduction of this type will + # result in a ledger entry, also with a starting and ending balance. In order to + # provide better tracing capabilities for automatic deductions, Orb always + # associates each automatic deduction with the `event_id` at the time of + # ingestion, used to pinpoint _why_ credit deduction took place and to ensure that + # credits are never deducted without an associated usage event. + # + # By default, Orb uses an algorithm that automatically deducts from the _soonest + # expiring credit block_ first in order to ensure that all credits are utilized + # appropriately. As an example, if trial credits with an expiration date of 2 + # weeks from now are present for a customer, they will be used before any + # deductions take place from a non-expiring credit block. + # + # If there are multiple blocks with the same expiration date, Orb will deduct from + # the block with the _lower cost basis_ first (e.g. trial credits with a $0 cost + # basis before paid credits with a $5.00 cost basis). + # + # It's also possible for a single usage event's deduction to _span_ credit blocks. + # In this case, Orb will deduct from the next block, ending at the credit block + # which consists of unexpiring credits. Each of these deductions will lead to a + # _separate_ ledger entry, one per credit block that is deducted from. By default, + # the customer's total credit balance in Orb can be negative as a result of a + # decrement. + # + # ## Expiration change + # + # The expiry of credits can be changed as a result of the API (See + # [Add Ledger Entry](create-ledger-entry)). This will create a ledger entry that + # specifies the balance as well as the initial and target expiry dates. + # + # Note that for this entry type, `starting_balance` will equal `ending_balance`, + # and the `amount` represents the balance transferred. The credit block linked to + # the ledger entry is the source credit block from which there was an expiration + # change + # + # ## Credits expiry + # + # When a set of credits expire on pre-set expiration date, the customer's balance + # automatically reflects this change and adds an entry to the ledger indicating + # this event. Note that credit expiry should always happen close to a date + # boundary in the customer's timezone. + # + # ## Void initiated + # + # Credit blocks can be voided via the API. The `amount` on this entry corresponds + # to the number of credits that were remaining in the block at time of void. + # `void_reason` will be populated if the void is created with a reason. + # + # ## Void + # + # When a set of credits is voided, the customer's balance automatically reflects + # this change and adds an entry to the ledger indicating this event. + # + # ## Amendment + # + # When credits are added to a customer's balance as a result of a correction, this + # entry will be added to the ledger to indicate the adjustment of credits. sig do params( external_customer_id: String, @@ -179,10 +613,14 @@ module Orb created_at_gte: nil, created_at_lt: nil, created_at_lte: nil, + # The ledger currency or custom pricing unit to use. currency: nil, + # Cursor for pagination. This can be populated by the `next_cursor` value returned + # from the initial request. cursor: nil, entry_status: nil, entry_type: nil, + # The number of items to fetch. Defaults to 20. limit: nil, minimum_amount: nil, request_options: {} diff --git a/rbi/lib/orb/resources/customers/credits/top_ups.rbi b/rbi/lib/orb/resources/customers/credits/top_ups.rbi index 35920de1..d7aa4c80 100644 --- a/rbi/lib/orb/resources/customers/credits/top_ups.rbi +++ b/rbi/lib/orb/resources/customers/credits/top_ups.rbi @@ -5,6 +5,13 @@ module Orb class Customers class Credits class TopUps + # This endpoint allows you to create a new top-up for a specified customer's + # balance. While this top-up is active, the customer's balance will added in + # increments of the specified amount whenever the balance reaches the specified + # threshold. + # + # If a top-up already exists for this customer in the same currency, the existing + # top-up will be replaced. sig do params( customer_id: String, @@ -22,18 +29,31 @@ module Orb end def create( customer_id, + # The amount to increment when the threshold is reached. amount:, + # The currency or custom pricing unit to use for this top-up. If this is a + # real-world currency, it must match the customer's invoicing currency. currency:, + # Settings for invoices generated by triggered top-ups. invoice_settings:, + # How much, in the customer's currency, to charge for each unit. per_unit_cost_basis:, + # The threshold at which to trigger the top-up. If the balance is at or below this + # threshold, the top-up will be triggered. threshold:, + # The date from which the top-up is active. If unspecified, the top-up is active + # immediately. active_from: nil, + # The number of days or months after which the top-up expires. If unspecified, it + # does not expire. expires_after: nil, + # The unit of expires_after. expires_after_unit: nil, request_options: {} ) end + # List top-ups sig do params( customer_id: String, @@ -43,9 +63,19 @@ module Orb ) .returns(Orb::Page[Orb::Models::Customers::Credits::TopUpListResponse]) end - def list(customer_id, cursor: nil, limit: nil, request_options: {}) + def list( + customer_id, + # Cursor for pagination. This can be populated by the `next_cursor` value returned + # from the initial request. + cursor: nil, + # The number of items to fetch. Defaults to 20. + limit: nil, + request_options: {} + ) end + # This deactivates the top-up and voids any invoices associated with pending + # credit blocks purchased through the top-up. sig do params( top_up_id: String, @@ -57,6 +87,13 @@ module Orb def delete(top_up_id, customer_id:, request_options: {}) end + # This endpoint allows you to create a new top-up for a specified customer's + # balance. While this top-up is active, the customer's balance will added in + # increments of the specified amount whenever the balance reaches the specified + # threshold. + # + # If a top-up already exists for this customer in the same currency, the existing + # top-up will be replaced. sig do params( external_customer_id: String, @@ -74,18 +111,32 @@ module Orb end def create_by_external_id( external_customer_id, + # The amount to increment when the threshold is reached. amount:, + # The currency or custom pricing unit to use for this top-up. If this is a + # real-world currency, it must match the customer's invoicing currency. currency:, + # Settings for invoices generated by triggered top-ups. invoice_settings:, + # How much, in the customer's currency, to charge for each unit. per_unit_cost_basis:, + # The threshold at which to trigger the top-up. If the balance is at or below this + # threshold, the top-up will be triggered. threshold:, + # The date from which the top-up is active. If unspecified, the top-up is active + # immediately. active_from: nil, + # The number of days or months after which the top-up expires. If unspecified, it + # does not expire. expires_after: nil, + # The unit of expires_after. expires_after_unit: nil, request_options: {} ) end + # This deactivates the top-up and voids any invoices associated with pending + # credit blocks purchased through the top-up. sig do params( top_up_id: String, @@ -97,6 +148,7 @@ module Orb def delete_by_external_id(top_up_id, external_customer_id:, request_options: {}) end + # List top-ups by external ID sig do params( external_customer_id: String, @@ -106,7 +158,15 @@ module Orb ) .returns(Orb::Page[Orb::Models::Customers::Credits::TopUpListByExternalIDResponse]) end - def list_by_external_id(external_customer_id, cursor: nil, limit: nil, request_options: {}) + def list_by_external_id( + external_customer_id, + # Cursor for pagination. This can be populated by the `next_cursor` value returned + # from the initial request. + cursor: nil, + # The number of items to fetch. Defaults to 20. + limit: nil, + request_options: {} + ) end sig { params(client: Orb::Client).returns(T.attached_class) } diff --git a/rbi/lib/orb/resources/dimensional_price_groups.rbi b/rbi/lib/orb/resources/dimensional_price_groups.rbi index 55fb33cd..e39ecae2 100644 --- a/rbi/lib/orb/resources/dimensional_price_groups.rbi +++ b/rbi/lib/orb/resources/dimensional_price_groups.rbi @@ -7,6 +7,14 @@ module Orb def external_dimensional_price_group_id end + # A dimensional price group is used to partition the result of a billable metric + # by a set of dimensions. Prices in a price group must specify the parition used + # to derive their usage. + # + # For example, suppose we have a billable metric that measures the number of + # widgets used and we want to charge differently depending on the color of the + # widget. We can create a price group with a dimension "color" and two prices: one + # that charges $10 per red widget and one that charges $20 per blue widget. sig do params( billable_metric_id: String, @@ -20,14 +28,19 @@ module Orb end def create( billable_metric_id:, + # The set of keys (in order) used to disambiguate prices in the group. dimensions:, name:, external_dimensional_price_group_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. metadata: nil, request_options: {} ) end + # Fetch dimensional price group sig do params( dimensional_price_group_id: String, @@ -38,6 +51,7 @@ module Orb def retrieve(dimensional_price_group_id, request_options: {}) end + # List dimensional price groups sig do params( cursor: T.nilable(String), @@ -46,7 +60,14 @@ module Orb ) .returns(Orb::Page[Orb::Models::DimensionalPriceGroup]) end - def list(cursor: nil, limit: nil, request_options: {}) + def list( + # Cursor for pagination. This can be populated by the `next_cursor` value returned + # from the initial request. + cursor: nil, + # The number of items to fetch. Defaults to 20. + limit: nil, + request_options: {} + ) end sig { params(client: Orb::Client).returns(T.attached_class) } diff --git a/rbi/lib/orb/resources/dimensional_price_groups/external_dimensional_price_group_id.rbi b/rbi/lib/orb/resources/dimensional_price_groups/external_dimensional_price_group_id.rbi index ce300b6b..e2fb7899 100644 --- a/rbi/lib/orb/resources/dimensional_price_groups/external_dimensional_price_group_id.rbi +++ b/rbi/lib/orb/resources/dimensional_price_groups/external_dimensional_price_group_id.rbi @@ -4,6 +4,7 @@ module Orb module Resources class DimensionalPriceGroups class ExternalDimensionalPriceGroupID + # Fetch dimensional price group by external ID sig do params( external_dimensional_price_group_id: String, diff --git a/rbi/lib/orb/resources/events.rbi b/rbi/lib/orb/resources/events.rbi index ec38d575..d3cb5876 100644 --- a/rbi/lib/orb/resources/events.rbi +++ b/rbi/lib/orb/resources/events.rbi @@ -11,6 +11,51 @@ module Orb def volume end + # This endpoint is used to amend a single usage event with a given `event_id`. + # `event_id` refers to the `idempotency_key` passed in during ingestion. The event + # will maintain its existing `event_id` after the amendment. + # + # This endpoint will mark the existing event as ignored, and Orb will only use the + # new event passed in the body of this request as the source of truth for that + # `event_id`. Note that a single event can be amended any number of times, so the + # same event can be overwritten in subsequent calls to this endpoint. Only a + # single event with a given `event_id` will be considered the source of truth at + # any given time. + # + # This is a powerful and audit-safe mechanism to retroactively update a single + # event in cases where you need to: + # + # - update an event with new metadata as you iterate on your pricing model + # - update an event based on the result of an external API call (e.g. call to a + # payment gateway succeeded or failed) + # + # This amendment API is always audit-safe. The process will still retain the + # original event, though it will be ignored for billing calculations. For auditing + # and data fidelity purposes, Orb never overwrites or permanently deletes ingested + # usage data. + # + # ## Request validation + # + # - The `timestamp` of the new event must match the `timestamp` of the existing + # event already ingested. As with ingestion, all timestamps must be sent in + # ISO8601 format with UTC timezone offset. + # - The `customer_id` or `external_customer_id` of the new event must match the + # `customer_id` or `external_customer_id` of the existing event already + # ingested. Exactly one of `customer_id` and `external_customer_id` should be + # specified, and similar to ingestion, the ID must identify a Customer resource + # within Orb. Unlike ingestion, for event amendment, we strictly enforce that + # the Customer must be in the Orb system, even during the initial integration + # period. We do not allow updating the `Customer` an event is associated with. + # - Orb does not accept an `idempotency_key` with the event in this endpoint, + # since this request is by design idempotent. On retryable errors, you should + # retry the request and assume the amendment operation has not succeeded until + # receipt of a 2xx. + # - The event's `timestamp` must fall within the customer's current subscription's + # billing period, or within the grace period of the customer's current + # subscription's previous billing period. + # - By default, no more than 100 events can be amended for a single customer in a + # 100 day period. For higher volume updates, consider using the + # [event backfill](create-backfill) endpoint. sig do params( event_id: String, @@ -25,15 +70,64 @@ module Orb end def update( event_id, + # A name to meaningfully identify the action or event type. event_name:, + # A dictionary of custom properties. Values in this dictionary must be numeric, + # boolean, or strings. Nested dictionaries are disallowed. properties:, + # An ISO 8601 format date with no timezone offset (i.e. UTC). This should + # represent the time that usage was recorded, and is particularly important to + # attribute usage to a given billing period. timestamp:, + # The Orb Customer identifier customer_id: nil, + # An alias for the Orb customer, whose mapping is specified when creating the + # customer external_customer_id: nil, request_options: {} ) end + # This endpoint is used to deprecate a single usage event with a given `event_id`. + # `event_id` refers to the `idempotency_key` passed in during ingestion. + # + # This endpoint will mark the existing event as ignored. Note that if you attempt + # to re-ingest an event with the same `event_id` as a deprecated event, Orb will + # return an error. + # + # This is a powerful and audit-safe mechanism to retroactively deprecate a single + # event in cases where you need to: + # + # - no longer bill for an event that was improperly reported + # - no longer bill for an event based on the result of an external API call (e.g. + # call to a payment gateway failed and the user should not be billed) + # + # If you want to only change specific properties of an event, but keep the event + # as part of the billing calculation, use the [Amend event](amend-event) endpoint + # instead. + # + # This API is always audit-safe. The process will still retain the deprecated + # event, though it will be ignored for billing calculations. For auditing and data + # fidelity purposes, Orb never overwrites or permanently deletes ingested usage + # data. + # + # ## Request validation + # + # - Orb does not accept an `idempotency_key` with the event in this endpoint, + # since this request is by design idempotent. On retryable errors, you should + # retry the request and assume the deprecation operation has not succeeded until + # receipt of a 2xx. + # - The event's `timestamp` must fall within the customer's current subscription's + # billing period, or within the grace period of the customer's current + # subscription's previous billing period. Orb does not allow deprecating events + # for billing periods that have already invoiced customers. + # - The `customer_id` or the `external_customer_id` of the original event + # ingestion request must identify a Customer resource within Orb, even if this + # event was ingested during the initial integration period. We do not allow + # deprecating events for customers not in the Orb system. + # - By default, no more than 100 events can be deprecated for a single customer in + # a 100 day period. For higher volume updates, consider using the + # [event backfill](create-backfill) endpoint. sig do params( event_id: String, @@ -44,6 +138,210 @@ module Orb def deprecate(event_id, request_options: {}) end + # Orb's event ingestion model and API is designed around two core principles: + # + # 1. **Data fidelity**: The accuracy of your billing model depends on a robust + # foundation of events. Orb's API protocol encourages usage patterns that + # ensure that your data is consistently complete and correct. + # 2. **Fast integration**: Sending events into Orb requires no tedious setup steps + # or explicit field schema for your event shape, making it instant to start + # streaming in usage in real-time. + # + # ## Event shape + # + # Events are the starting point for all usage calculations in the system, and are + # simple at their core: + # + # ```ts + # { + # // customer_id and external_customer_id are used to + # // attribute usage to a given Customer. Exactly one of these + # // should be specified in a given ingestion event. + # + # // `customer_id` is the Orb generated identifier for the Customer, + # // which is returned from the Create customer API call. + # customer_id: string, + # + # // external_customer_id is an alternate identifier which is associated + # // with a Customer at creation time. This is treated as an alias for + # // customer_id, and is usually set to an identifier native to your system. + # external_customer_id: string, + # + # // A string name identifying the event, usually a usage + # // action. By convention, this should not contain any whitespace. + # event_name: string, + # + # // An ISO 8601 format date with no timezone offset. + # // This should represent the time that usage occurred + # // and is important to attribute usage to a given + # // billing period. See the notes below on determining the timestamp. + # // e.g. 2020-12-09T16:09:53Z + # timestamp: string, + # + # // A unique value, generated by the client, that is + # // used to de-duplicate events. + # // Exactly one event with a given + # // idempotency key will be ingested, which allows for + # // safe request retries. + # idempotency_key: string + # + # // Optional custom metadata to attach to the event. + # // This might include a numeric value used for aggregation, + # // or a string/boolean value used for filtering. + # // The schema of this dictionary need not be pre-declared, and + # // properties can be added at any time. + # properties: { + # [key: string]?: string | number | boolean, + # }, + # } + # ``` + # + # ## Required fields + # + # Because events streamed to Orb are meant to be as flexible as possible, there + # are only a few required fields in every event. + # + # - We recommend that `idempotency_key` are unique strings that you generated with + # V4 UUIDs, but only require that they uniquely identify an event (i.e. don’t + # collide). + # - The `timestamp` field in the event body will be used to determine which + # billable period a given event falls into. For example, with a monthly billing + # cycle starting from the first of December, Orb will calculate metrics based on + # events that fall into the range + # `12-01 00:00:00 <= timestamp < 01-01 00:00:00`. + # + # ## Logging metadata + # + # Orb allows tagging events with metadata using a flexible properties dictionary. + # Since Orb does not enforce a rigid schema for this field-set, key-value pairs + # can be added dynamically as your events evolve. + # + # This dictionary can be helpful for a wide variety of use cases: + # + # - Numeric properties on events like `compute_time_ms` can later be inputs to our + # flexible query engine to determine usage. + # - Logging a region or cluster with each event can help you provide customers + # more granular visibility into their usage. + # - If you are using matrix pricing and matching a matrix price key with a + # property, you should ensure the value for that property is sent as a string. + # + # We encourage logging this metadata with an eye towards future use cases to + # ensure full coverage for historical data. The datatype of the value in the + # properties dictionary is important for metric creation from an event source. + # Values that you wish to numerically aggregate should be of numeric type in the + # event. + # + # ## Determining event timestamp + # + # For cases where usage is being reported in real time as it is occurring, + # timestamp should correspond to the time that usage occurred. + # + # In cases where usage is reported in aggregate for a historical timeframe at a + # regular interval, we recommend setting the event `timestamp` to the midpoint of + # the interval. As an example, if you have an hourly reporter that sends data once + # an hour for the previous hour of usage, setting the `timestamp` to the half-hour + # mark will ensure that the usage is counted within the correct period. + # + # Note that other time-related fields (e.g. time elapsed) can be added to the + # properties dictionary as necessary. + # + # In cases where usage is reported in aggregate for a historical timeframe, the + # timestamp must be within the grace period set for your account. Events with + # `timestamp < current_time - grace_period` will not be accepted as a valid event, + # and will throw validation errors. Enforcing the grace period enables Orb to + # accurately map usage to the correct billing cycle and ensure that all usage is + # billed for in the corresponding billing period. + # + # In general, Orb does not expect events with future dated timestamps. In cases + # where the timestamp is at least 24 hours ahead of the current time, the event + # will not be accepted as a valid event, and will throw validation errors. + # + # ## Event validation + # + # Orb’s validation ensures that you recognize errors in your events as quickly as + # possible, and the API provides informative error messages to help you fix + # problems quickly. + # + # We validate the following: + # + # - Exactly one of `customer_id` and `external_customer_id` should be specified. + # - If the `customer_id` is specified, the customer in Orb must exist. + # - If the `external_customer_id` is specified, the customer in Orb does not need + # to exist. Events will be attributed to any future customers with the + # `external_customer_id` on subscription creation. + # - `timestamp` must conform to ISO 8601 and represent a timestamp at most 1 hour + # in the future. This timestamp should be sent in UTC timezone (no timezone + # offset). + # + # ## Idempotency and retry semantics + # + # Orb's idempotency guarantees allow you to implement safe retry logic in the + # event of network or machine failures, ensuring data fidelity. Each event in the + # request payload is associated with an idempotency key, and Orb guarantees that a + # single idempotency key will be successfully ingested at most once. Note that + # when Orb encounters events with duplicate idempotency keys and differing event + # bodies in a batch of events, the entire batch will be rejected. + # + # - Successful responses return a 200 HTTP status code. The response contains + # information about previously processed events. + # - Requests that return a `4xx` HTTP status code indicate a payload error and + # contain at least one event with a validation failure. An event with a + # validation failure can be re-sent to the ingestion endpoint (after the payload + # is fixed) with the original idempotency key since that key is not marked as + # processed. + # - Requests that return a `5xx` HTTP status code indicate a server-side failure. + # These requests should be retried in their entirety. + # + # ## API usage and limits + # + # The ingestion API is designed made for real-time streaming ingestion and + # architected for high throughput. Even if events are later deemed unnecessary or + # filtered out, we encourage you to log them to Orb if they may be relevant to + # billing calculations in the future. + # + # To take advantage of the real-time features of the Orb platform and avoid any + # chance of dropped events by producers, we recommend reporting events to Orb + # frequently. Optionally, events can also be briefly aggregated at the source, as + # this API accepts an array of event bodies. + # + # Orb does not currently enforce a hard rate-limit for API usage or a maximum + # request payload size, but please give us a heads up if you’re changing either of + # these factors by an order of magnitude from initial setup. + # + # ## Testing in debug mode + # + # The ingestion API supports a debug mode, which returns additional verbose output + # to indicate which event idempotency keys were newly ingested or duplicates from + # previous requests. To enable this mode, mark `debug=true` as a query parameter. + # + # If `debug=true` is not specified, the response will only contain + # `validation_failed`. Orb will still honor the idempotency guarantees set + # [here](/events-and-metrics/event-ingestion#event-volume-and-concurrency) in all + # cases. + # + # We strongly recommend that you only use debug mode as part of testing your + # initial Orb integration. Once you're ready to switch to production, disable + # debug mode to take advantage of improved performance and maximal throughput. + # + # #### Example: ingestion response with `debug=true` + # + # ```json + # { + # "debug": { + # "duplicate": [], + # "ingested": ["B7E83HDMfJPAunXW", "SJs5DQJ3TnwSqEZE", "8SivfDsNKwCeAXim"] + # }, + # "validation_failed": [] + # } + # ``` + # + # #### Example: ingestion response with `debug=false` + # + # ```json + # { + # "validation_failed": [] + # } + # ``` sig do params( events: T::Array[Orb::Models::EventIngestParams::Event], @@ -53,9 +351,34 @@ module Orb ) .returns(Orb::Models::EventIngestResponse) end - def ingest(events:, backfill_id: nil, debug: nil, request_options: {}) + def ingest( + # Body param: + events:, + # Query param: If this ingestion request is part of a backfill, this parameter + # ties the ingested events to the backfill + backfill_id: nil, + # Query param: Flag to enable additional debug information in the endpoint + # response + debug: nil, + request_options: {} + ) end + # This endpoint returns a filtered set of events for an account in a + # [paginated list format](/api-reference/pagination). + # + # Note that this is a `POST` endpoint rather than a `GET` endpoint because it + # employs a JSON body for search criteria rather than query parameters, allowing + # for a more flexible search syntax. + # + # Note that a search criteria _must_ be specified. Currently, Orb supports the + # following criteria: + # + # - `event_ids`: This is an explicit array of IDs to filter by. Note that an + # event's ID is the `idempotency_key` that was originally used for ingestion. + # + # By default, Orb will not throw a `404` if no events matched, Orb will return an + # empty array for `data` instead. sig do params( event_ids: T::Array[String], @@ -65,7 +388,20 @@ module Orb ) .returns(Orb::Models::EventSearchResponse) end - def search(event_ids:, timeframe_end: nil, timeframe_start: nil, request_options: {}) + def search( + # This is an explicit array of IDs to filter by. Note that an event's ID is the + # idempotency_key that was originally used for ingestion, and this only supports + # events that have not been amended. Values in this array will be treated case + # sensitively. + event_ids:, + # The end of the timeframe, exclusive, in which to search events. If not + # specified, the current time is used. + timeframe_end: nil, + # The start of the timeframe, inclusive, in which to search events. If not + # specified, the one week ago is used. + timeframe_start: nil, + request_options: {} + ) end sig { params(client: Orb::Client).returns(T.attached_class) } diff --git a/rbi/lib/orb/resources/events/backfills.rbi b/rbi/lib/orb/resources/events/backfills.rbi index bf8aaa5e..badd5cf0 100644 --- a/rbi/lib/orb/resources/events/backfills.rbi +++ b/rbi/lib/orb/resources/events/backfills.rbi @@ -4,6 +4,43 @@ module Orb module Resources class Events class Backfills + # Creating the backfill enables adding or replacing past events, even those that + # are older than the ingestion grace period. Performing a backfill in Orb involves + # 3 steps: + # + # 1. Create the backfill, specifying its parameters. + # 2. [Ingest](ingest) usage events, referencing the backfill (query parameter + # `backfill_id`). + # 3. [Close](close-backfill) the backfill, propagating the update in past usage + # throughout Orb. + # + # Changes from a backfill are not reflected until the backfill is closed, so you + # won’t need to worry about your customers seeing partially updated usage data. + # Backfills are also reversible, so you’ll be able to revert a backfill if you’ve + # made a mistake. + # + # This endpoint will return a backfill object, which contains an `id`. That `id` + # can then be used as the `backfill_id` query parameter to the event ingestion + # endpoint to associate ingested events with this backfill. The effects (e.g. + # updated usage graphs) of this backfill will not take place until the backfill is + # closed. + # + # If the `replace_existing_events` is `true`, existing events in the backfill's + # timeframe will be replaced with the newly ingested events associated with the + # backfill. If `false`, newly ingested events will be added to the existing + # events. + # + # If a `customer_id` or `external_customer_id` is specified, the backfill will + # only affect events for that customer. If neither is specified, the backfill will + # affect all customers. + # + # When `replace_existing_events` is `true`, this indicates that existing events in + # the timeframe should no longer be counted towards invoiced usage. In this + # scenario, the parameter `filter` can be optionally added which enables filtering + # using + # [computed properties](/extensibility/advanced-metrics#computed-properties). The + # expressiveness of computed properties allows you to deprecate existing events + # based on both a period of time and specific property values. sig do params( timeframe_end: Time, @@ -18,17 +55,42 @@ module Orb .returns(Orb::Models::Events::BackfillCreateResponse) end def create( + # The (exclusive) end of the usage timeframe affected by this backfill. By + # default, Orb allows backfills up to 10 days in duration at a time. Reach out to + # discuss extending this limit and your use case. timeframe_end:, + # The (inclusive) start of the usage timeframe affected by this backfill. By + # default, Orb allows backfills up to 10 days in duration at a time. Reach out to + # discuss extending this limit and your use case. timeframe_start:, + # The time at which no more events will be accepted for this backfill. The + # backfill will automatically begin reflecting throughout Orb at the close time. + # If not specified, it will default to 1 day after the creation of the backfill. close_time: nil, + # The Orb-generated ID of the customer to which this backfill is scoped. Omitting + # this field will scope the backfill to all customers. customer_id: nil, + # A boolean + # [computed property](/extensibility/advanced-metrics#computed-properties) used to + # filter the set of events to deprecate deprecation_filter: nil, + # The external customer ID of the customer to which this backfill is scoped. + # Omitting this field will scope the backfill to all customers. external_customer_id: nil, + # If true, replaces all existing events in the timeframe with the newly ingested + # events. If false, adds the newly ingested events to the existing events. replace_existing_events: nil, request_options: {} ) end + # This endpoint returns a list of all backfills in a list format. + # + # The list of backfills is ordered starting from the most recently created + # backfill. The response also includes + # [`pagination_metadata`](/api-reference/pagination), which lets the caller + # retrieve the next page of results if they exist. More information about + # pagination can be found in the [Pagination-metadata schema](pagination). sig do params( cursor: T.nilable(String), @@ -37,9 +99,20 @@ module Orb ) .returns(Orb::Page[Orb::Models::Events::BackfillListResponse]) end - def list(cursor: nil, limit: nil, request_options: {}) + def list( + # Cursor for pagination. This can be populated by the `next_cursor` value returned + # from the initial request. + cursor: nil, + # The number of items to fetch. Defaults to 20. + limit: nil, + request_options: {} + ) end + # Closing a backfill makes the updated usage visible in Orb. Upon closing a + # backfill, Orb will asynchronously reflect the updated usage in invoice amounts + # and usage graphs. Once all of the updates are complete, the backfill's status + # will transition to `reflected`. sig do params( backfill_id: String, @@ -50,6 +123,7 @@ module Orb def close(backfill_id, request_options: {}) end + # This endpoint is used to fetch a backfill given an identifier. sig do params( backfill_id: String, @@ -60,6 +134,13 @@ module Orb def fetch(backfill_id, request_options: {}) end + # Reverting a backfill undoes all the effects of closing the backfill. If the + # backfill is reflected, the status will transition to `pending_revert` while the + # effects of the backfill are undone. Once all effects are undone, the backfill + # will transition to `reverted`. + # + # If a backfill is reverted before its closed, no usage will be updated as a + # result of the backfill and it will immediately transition to `reverted`. sig do params( backfill_id: String, diff --git a/rbi/lib/orb/resources/events/volume.rbi b/rbi/lib/orb/resources/events/volume.rbi index caeee30f..923fef33 100644 --- a/rbi/lib/orb/resources/events/volume.rbi +++ b/rbi/lib/orb/resources/events/volume.rbi @@ -4,6 +4,19 @@ module Orb module Resources class Events class Volume + # This endpoint returns the event volume for an account in a + # [paginated list format](/api-reference/pagination). + # + # The event volume is aggregated by the hour and the + # [timestamp](/api-reference/event/ingest-events) field is used to determine which + # hour an event is associated with. Note, this means that late-arriving events + # increment the volume count for the hour window the timestamp is in, not the + # latest hour window. + # + # Each item in the response contains the count of events aggregated by the hour + # where the start and end time are hour-aligned and in UTC. When a specific + # timestamp is passed in for either start or end time, the response includes the + # hours the timestamp falls in. sig do params( timeframe_start: Time, @@ -14,7 +27,24 @@ module Orb ) .returns(Orb::Models::Events::EventVolumes) end - def list(timeframe_start:, cursor: nil, limit: nil, timeframe_end: nil, request_options: {}) + def list( + # The start of the timeframe, inclusive, in which to return event volume. All + # datetime values are converted to UTC time. If the specified time isn't + # hour-aligned, the response includes the event volume count for the hour the time + # falls in. + timeframe_start:, + # Cursor for pagination. This can be populated by the `next_cursor` value returned + # from the initial request. + cursor: nil, + # The number of items to fetch. Defaults to 20. + limit: nil, + # The end of the timeframe, exclusive, in which to return event volume. If not + # specified, the current time is used. All datetime values are converted to UTC + # time.If the specified time isn't hour-aligned, the response includes the event + # volumecount for the hour the time falls in. + timeframe_end: nil, + request_options: {} + ) end sig { params(client: Orb::Client).returns(T.attached_class) } diff --git a/rbi/lib/orb/resources/invoice_line_items.rbi b/rbi/lib/orb/resources/invoice_line_items.rbi index ecc8e1b0..62402c02 100644 --- a/rbi/lib/orb/resources/invoice_line_items.rbi +++ b/rbi/lib/orb/resources/invoice_line_items.rbi @@ -3,6 +3,8 @@ module Orb module Resources class InvoiceLineItems + # This creates a one-off fixed fee invoice line item on an Invoice. This can only + # be done for invoices that are in a `draft` status. sig do params( amount: String, @@ -15,7 +17,22 @@ module Orb ) .returns(Orb::Models::InvoiceLineItemCreateResponse) end - def create(amount:, end_date:, invoice_id:, name:, quantity:, start_date:, request_options: {}) + def create( + # The total amount in the invoice's currency to add to the line item. + amount:, + # A date string to specify the line item's end date in the customer's timezone. + end_date:, + # The id of the Invoice to add this line item. + invoice_id:, + # The item name associated with this line item. If an item with the same name + # exists in Orb, that item will be associated with the line item. + name:, + # The number of units on the line item + quantity:, + # A date string to specify the line item's start date in the customer's timezone. + start_date:, + request_options: {} + ) end sig { params(client: Orb::Client).returns(T.attached_class) } diff --git a/rbi/lib/orb/resources/invoices.rbi b/rbi/lib/orb/resources/invoices.rbi index bea3a771..605cf98f 100644 --- a/rbi/lib/orb/resources/invoices.rbi +++ b/rbi/lib/orb/resources/invoices.rbi @@ -3,6 +3,7 @@ module Orb module Resources class Invoices + # This endpoint is used to create a one-off invoice for a customer. sig do params( currency: String, @@ -27,20 +28,44 @@ module Orb .returns(Orb::Models::Invoice) end def create( + # An ISO 4217 currency string. Must be the same as the customer's currency if it + # is set. currency:, + # Optional invoice date to set. Must be in the past, if not set, `invoice_date` is + # set to the current time in the customer's timezone. invoice_date:, line_items:, + # Determines the difference between the invoice issue date for subscription + # invoices as the date that they are due. A value of '0' here represents that the + # invoice is due on issue, whereas a value of 30 represents that the customer has + # 30 days to pay the invoice. net_terms:, + # The id of the `Customer` to create this invoice for. One of `customer_id` and + # `external_customer_id` are required. customer_id: nil, + # An optional discount to attach to the invoice. discount: nil, + # The `external_customer_id` of the `Customer` to create this invoice for. One of + # `customer_id` and `external_customer_id` are required. external_customer_id: nil, + # An optional memo to attach to the invoice. memo: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. metadata: nil, + # When true, this invoice will automatically be issued upon creation. When false, + # the resulting invoice will require manual review to issue. Defaulted to false. will_auto_issue: nil, request_options: {} ) end + # This endpoint allows you to update the `metadata` property on an invoice. If you + # pass null for the metadata value, it will clear any existing metadata for that + # invoice. + # + # `metadata` can be modified regardless of invoice state. sig do params( invoice_id: String, @@ -49,9 +74,29 @@ module Orb ) .returns(Orb::Models::Invoice) end - def update(invoice_id, metadata: nil, request_options: {}) + def update( + invoice_id, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + request_options: {} + ) end + # This endpoint returns a list of all [`Invoice`](/core-concepts#invoice)s for an + # account in a list format. + # + # The list of invoices is ordered starting from the most recently issued invoice + # date. The response also includes + # [`pagination_metadata`](/api-reference/pagination), which lets the caller + # retrieve the next page of results if they exist. + # + # By default, this only returns invoices that are `issued`, `paid`, or `synced`. + # + # When fetching any `draft` invoices, this returns the last-computed invoice + # values for each draft invoice, which may not always be up-to-date since Orb + # regularly refreshes invoices asynchronously. sig do params( amount: T.nilable(String), @@ -81,10 +126,16 @@ module Orb amount: nil, amount_gt: nil, amount_lt: nil, + # Cursor for pagination. This can be populated by the `next_cursor` value returned + # from the initial request. cursor: nil, customer_id: nil, date_type: nil, due_date: nil, + # Filters invoices by their due dates within a specific time range in the past. + # Specify the range as a number followed by 'd' (days) or 'm' (months). For + # example, '7d' filters invoices due in the last 7 days, and '2m' filters those + # due in the last 2 months. due_date_window: nil, due_date_gt: nil, due_date_lt: nil, @@ -94,6 +145,7 @@ module Orb invoice_date_lt: nil, invoice_date_lte: nil, is_recurring: nil, + # The number of items to fetch. Defaults to 20. limit: nil, status: nil, subscription_id: nil, @@ -101,6 +153,8 @@ module Orb ) end + # This endpoint is used to fetch an [`Invoice`](/core-concepts#invoice) given an + # identifier. sig do params( invoice_id: String, @@ -111,6 +165,9 @@ module Orb def fetch(invoice_id, request_options: {}) end + # This endpoint can be used to fetch the upcoming + # [invoice](/core-concepts#invoice) for the current billing period given a + # subscription. sig do params( subscription_id: String, @@ -121,6 +178,12 @@ module Orb def fetch_upcoming(subscription_id:, request_options: {}) end + # This endpoint allows an eligible invoice to be issued manually. This is only + # possible with invoices where status is `draft`, `will_auto_issue` is false, and + # an `eligible_to_issue_at` is a time in the past. Issuing an invoice could + # possibly trigger side effects, some of which could be customer-visible (e.g. + # sending emails, auto-collecting payment, syncing the invoice to external + # providers, etc). sig do params( invoice_id: String, @@ -129,9 +192,20 @@ module Orb ) .returns(Orb::Models::Invoice) end - def issue(invoice_id, synchronous: nil, request_options: {}) + def issue( + invoice_id, + # If true, the invoice will be issued synchronously. If false, the invoice will be + # issued asynchronously. The synchronous option is only available for invoices + # that have no usage fees. If the invoice is configured to sync to an external + # provider, a successful response from this endpoint guarantees the invoice is + # present in the provider. + synchronous: nil, + request_options: {} + ) end + # This endpoint allows an invoice's status to be set the `paid` status. This can + # only be done to invoices that are in the `issued` status. sig do params( invoice_id: String, @@ -142,9 +216,20 @@ module Orb ) .returns(Orb::Models::Invoice) end - def mark_paid(invoice_id, payment_received_date:, external_id: nil, notes: nil, request_options: {}) + def mark_paid( + invoice_id, + # A date string to specify the date of the payment. + payment_received_date:, + # An optional external ID to associate with the payment. + external_id: nil, + # An optional note to associate with the payment. + notes: nil, + request_options: {} + ) end + # This endpoint collects payment for an invoice using the customer's default + # payment method. This action can only be taken on invoices with status "issued". sig do params( invoice_id: String, @@ -155,6 +240,17 @@ module Orb def pay(invoice_id, request_options: {}) end + # This endpoint allows an invoice's status to be set the `void` status. This can + # only be done to invoices that are in the `issued` status. + # + # If the associated invoice has used the customer balance to change the amount + # due, the customer balance operation will be reverted. For example, if the + # invoice used $10 of customer balance, that amount will be added back to the + # customer balance upon voiding. + # + # If the invoice was used to purchase a credit block, but the invoice is not yet + # paid, the credit block will be voided. If the invoice was created due to a + # top-up, the top-up will be disabled. sig do params( invoice_id: String, diff --git a/rbi/lib/orb/resources/items.rbi b/rbi/lib/orb/resources/items.rbi index d317930e..41af89c2 100644 --- a/rbi/lib/orb/resources/items.rbi +++ b/rbi/lib/orb/resources/items.rbi @@ -3,6 +3,7 @@ module Orb module Resources class Items + # This endpoint is used to create an [Item](/core-concepts#item). sig do params( name: String, @@ -15,9 +16,14 @@ module Orb ) .returns(Orb::Models::Item) end - def create(name:, request_options: {}) + def create( + # The name of the item. + name:, + request_options: {} + ) end + # This endpoint can be used to update properties on the Item. sig do params( item_id: String, @@ -30,6 +36,8 @@ module Orb def update(item_id, external_connections: nil, name: nil, request_options: {}) end + # This endpoint returns a list of all Items, ordered in descending order by + # creation time. sig do params( cursor: T.nilable(String), @@ -38,9 +46,17 @@ module Orb ) .returns(Orb::Page[Orb::Models::Item]) end - def list(cursor: nil, limit: nil, request_options: {}) + def list( + # Cursor for pagination. This can be populated by the `next_cursor` value returned + # from the initial request. + cursor: nil, + # The number of items to fetch. Defaults to 20. + limit: nil, + request_options: {} + ) end + # This endpoint returns an item identified by its item_id. sig do params( item_id: String, diff --git a/rbi/lib/orb/resources/metrics.rbi b/rbi/lib/orb/resources/metrics.rbi index b54f557c..ad1f72b1 100644 --- a/rbi/lib/orb/resources/metrics.rbi +++ b/rbi/lib/orb/resources/metrics.rbi @@ -3,6 +3,9 @@ module Orb module Resources class Metrics + # This endpoint is used to create a [metric](/core-concepts###metric) using a SQL + # string. See [SQL support](/extensibility/advanced-metrics#sql-support) for a + # description of constructing SQL queries with examples. sig do params( description: T.nilable(String), @@ -14,9 +17,26 @@ module Orb ) .returns(Orb::Models::BillableMetric) end - def create(description:, item_id:, name:, sql:, metadata: nil, request_options: {}) + def create( + # A description of the metric. + description:, + # The id of the item + item_id:, + # The name of the metric. + name:, + # A sql string defining the metric. + sql:, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + request_options: {} + ) end + # This endpoint allows you to update the `metadata` property on a metric. If you + # pass `null` for the metadata value, it will clear any existing metadata for that + # invoice. sig do params( metric_id: String, @@ -25,9 +45,19 @@ module Orb ) .returns(Orb::Models::BillableMetric) end - def update(metric_id, metadata: nil, request_options: {}) + def update( + metric_id, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + request_options: {} + ) end + # This endpoint is used to fetch [metric](/core-concepts##metric) details given a + # metric identifier. It returns information about the metrics including its name, + # description, and item. sig do params( created_at_gt: T.nilable(Time), @@ -45,12 +75,17 @@ module Orb created_at_gte: nil, created_at_lt: nil, created_at_lte: nil, + # Cursor for pagination. This can be populated by the `next_cursor` value returned + # from the initial request. cursor: nil, + # The number of items to fetch. Defaults to 20. limit: nil, request_options: {} ) end + # This endpoint is used to list [metrics](/core-concepts#metric). It returns + # information about the metrics including its name, description, and item. sig do params( metric_id: String, diff --git a/rbi/lib/orb/resources/plans.rbi b/rbi/lib/orb/resources/plans.rbi index d8e49878..06d4302f 100644 --- a/rbi/lib/orb/resources/plans.rbi +++ b/rbi/lib/orb/resources/plans.rbi @@ -7,6 +7,7 @@ module Orb def external_plan_id end + # This endpoint allows creation of plans including their prices. sig do params( currency: String, @@ -50,18 +51,35 @@ module Orb .returns(Orb::Models::Plan) end def create( + # An ISO 4217 currency string for invoices generated by subscriptions on this + # plan. currency:, name:, + # Prices for this plan. If the plan has phases, this includes prices across all + # phases of the plan. prices:, + # Free-form text which is available on the invoice PDF and the Orb invoice portal. default_invoice_memo: nil, external_plan_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. metadata: nil, + # The net terms determines the difference between the invoice date and the issue + # date for the invoice. If you intend the invoice to be due on issue, set this + # to 0. net_terms: nil, + # The status of the plan to create (either active or draft). If not specified, + # this defaults to active. status: nil, request_options: {} ) end + # This endpoint can be used to update the `external_plan_id`, and `metadata` of an + # existing plan. + # + # Other fields on a customer are currently immutable. sig do params( plan_id: String, @@ -71,9 +89,25 @@ module Orb ) .returns(Orb::Models::Plan) end - def update(plan_id, external_plan_id: nil, metadata: nil, request_options: {}) + def update( + plan_id, + # An optional user-defined ID for this plan resource, used throughout the system + # as an alias for this Plan. Use this field to identify a plan by an existing + # identifier in your system. + external_plan_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + request_options: {} + ) end + # This endpoint returns a list of all [plans](/core-concepts#plan-and-price) for + # an account in a list format. The list of plans is ordered starting from the most + # recently created plan. The response also includes + # [`pagination_metadata`](/api-reference/pagination), which lets the caller + # retrieve the next page of results if they exist. sig do params( created_at_gt: T.nilable(Time), @@ -92,13 +126,34 @@ module Orb created_at_gte: nil, created_at_lt: nil, created_at_lte: nil, + # Cursor for pagination. This can be populated by the `next_cursor` value returned + # from the initial request. cursor: nil, + # The number of items to fetch. Defaults to 20. limit: nil, + # The plan status to filter to ('active', 'archived', or 'draft'). status: nil, request_options: {} ) end + # This endpoint is used to fetch [plan](/core-concepts#plan-and-price) details + # given a plan identifier. It returns information about the prices included in the + # plan and their configuration, as well as the product that the plan is attached + # to. + # + # ## Serialized prices + # + # Orb supports a few different pricing models out of the box. Each of these models + # is serialized differently in a given [Price](/core-concepts#plan-and-price) + # object. The `model_type` field determines the key for the configuration object + # that is present. A detailed explanation of price types can be found in the + # [Price schema](/core-concepts#plan-and-price). + # + # ## Phases + # + # Orb supports plan phases, also known as contract ramps. For plans with phases, + # the serialized prices refer to all prices across all phases. sig do params( plan_id: String, diff --git a/rbi/lib/orb/resources/plans/external_plan_id.rbi b/rbi/lib/orb/resources/plans/external_plan_id.rbi index 4ffbc462..8e94ff53 100644 --- a/rbi/lib/orb/resources/plans/external_plan_id.rbi +++ b/rbi/lib/orb/resources/plans/external_plan_id.rbi @@ -4,6 +4,10 @@ module Orb module Resources class Plans class ExternalPlanID + # This endpoint can be used to update the `external_plan_id`, and `metadata` of an + # existing plan. + # + # Other fields on a customer are currently immutable. sig do params( other_external_plan_id: String, @@ -13,9 +17,36 @@ module Orb ) .returns(Orb::Models::Plan) end - def update(other_external_plan_id, external_plan_id: nil, metadata: nil, request_options: {}) + def update( + other_external_plan_id, + # An optional user-defined ID for this plan resource, used throughout the system + # as an alias for this Plan. Use this field to identify a plan by an existing + # identifier in your system. + external_plan_id: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + request_options: {} + ) end + # This endpoint is used to fetch [plan](/core-concepts##plan-and-price) details + # given an external_plan_id identifier. It returns information about the prices + # included in the plan and their configuration, as well as the product that the + # plan is attached to. + # + # If multiple plans are found to contain the specified external_plan_id, the + # active plans will take priority over archived ones, and among those, the + # endpoint will return the most recently created plan. + # + # ## Serialized prices + # + # Orb supports a few different pricing models out of the box. Each of these models + # is serialized differently in a given [Price](/core-concepts#plan-and-price) + # object. The `model_type` field determines the key for the configuration object + # that is present. A detailed explanation of price types can be found in the + # [Price schema](/core-concepts#plan-and-price). " sig do params( external_plan_id: String, diff --git a/rbi/lib/orb/resources/prices.rbi b/rbi/lib/orb/resources/prices.rbi index 10436a8f..a6e8db97 100644 --- a/rbi/lib/orb/resources/prices.rbi +++ b/rbi/lib/orb/resources/prices.rbi @@ -7,6 +7,16 @@ module Orb def external_price_id end + # This endpoint is used to create a [price](/product-catalog/price-configuration). + # A price created using this endpoint is always an add-on, meaning that it’s not + # associated with a specific plan and can instead be individually added to + # subscriptions, including subscriptions on different plans. + # + # An `external_price_id` can be optionally specified as an alias to allow + # ergonomic interaction with prices in the Orb API. + # + # See the [Price resource](/product-catalog/price-configuration) for the + # specification of different price model configurations possible in this endpoint. sig do params( cadence: Symbol, @@ -87,10 +97,14 @@ module Orb ) end def create( + # The cadence to bill for this price on. cadence:, + # An ISO 4217 currency string for which this price is billed in. currency:, + # The id of the item the price will be associated with. item_id:, model_type:, + # The name of the price. name:, unit_config:, package_config:, @@ -120,19 +134,38 @@ module Orb scalable_matrix_with_unit_pricing_config:, scalable_matrix_with_tiered_pricing_config:, cumulative_grouped_bulk_config:, + # The id of the billable metric for the price. Only needed if the price is + # usage-based. billable_metric_id: nil, + # If the Price represents a fixed cost, the price will be billed in-advance if + # this is true, and in-arrears if this is false. billed_in_advance: nil, + # For custom cadence: specifies the duration of the billing period in days or + # months. billing_cycle_configuration: nil, + # The per unit conversion rate of the price currency to the invoicing currency. conversion_rate: nil, + # An alias for the price. external_price_id: nil, + # If the Price represents a fixed cost, this represents the quantity of units + # applied. fixed_price_quantity: nil, + # The property used to group this price on an invoice invoice_grouping_key: nil, + # Within each billing cycle, specifies the cadence at which invoices are produced. + # If unspecified, a single invoice is produced per billing cycle. invoicing_cycle_configuration: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. metadata: nil, request_options: {} ) end + # This endpoint allows you to update the `metadata` property on a price. If you + # pass null for the metadata value, it will clear any existing metadata for that + # price. sig do params( price_id: String, @@ -172,9 +205,18 @@ module Orb ) ) end - def update(price_id, metadata: nil, request_options: {}) + def update( + price_id, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + request_options: {} + ) end + # This endpoint is used to list all add-on prices created using the + # [price creation endpoint](/api-reference/price/create-price). sig do params( cursor: T.nilable(String), @@ -216,9 +258,37 @@ module Orb ] ) end - def list(cursor: nil, limit: nil, request_options: {}) + def list( + # Cursor for pagination. This can be populated by the `next_cursor` value returned + # from the initial request. + cursor: nil, + # The number of items to fetch. Defaults to 20. + limit: nil, + request_options: {} + ) end + # This endpoint is used to evaluate the output of a price for a given customer and + # time range. It enables filtering and grouping the output using + # [computed properties](/extensibility/advanced-metrics#computed-properties), + # supporting the following workflows: + # + # 1. Showing detailed usage and costs to the end customer. + # 2. Auditing subtotals on invoice line items. + # + # For these workflows, the expressiveness of computed properties in both the + # filters and grouping is critical. For example, if you'd like to show your + # customer their usage grouped by hour and another property, you can do so with + # the following `grouping_keys`: + # `["hour_floor_timestamp_millis(timestamp_millis)", "my_property"]`. If you'd + # like to examine a customer's usage for a specific property value, you can do so + # with the following `filter`: + # `my_property = 'foo' AND my_other_property = 'bar'`. + # + # By default, the start of the time range must be no more than 100 days ago and + # the length of the results must be no greater than 1000. Note that this is a POST + # endpoint rather than a GET endpoint because it employs a JSON body rather than + # query parameters. sig do params( price_id: String, @@ -234,16 +304,27 @@ module Orb end def evaluate( price_id, + # The exclusive upper bound for event timestamps timeframe_end:, + # The inclusive lower bound for event timestamps timeframe_start:, + # The ID of the customer to which this evaluation is scoped. customer_id: nil, + # The external customer ID of the customer to which this evaluation is scoped. external_customer_id: nil, + # A boolean + # [computed property](/extensibility/advanced-metrics#computed-properties) used to + # filter the underlying billable metric filter: nil, + # Properties (or + # [computed properties](/extensibility/advanced-metrics#computed-properties)) used + # to group the underlying billable metric grouping_keys: nil, request_options: {} ) end + # This endpoint returns a price given an identifier. sig do params( price_id: String, diff --git a/rbi/lib/orb/resources/prices/external_price_id.rbi b/rbi/lib/orb/resources/prices/external_price_id.rbi index c2a50ee0..373a567a 100644 --- a/rbi/lib/orb/resources/prices/external_price_id.rbi +++ b/rbi/lib/orb/resources/prices/external_price_id.rbi @@ -4,6 +4,9 @@ module Orb module Resources class Prices class ExternalPriceID + # This endpoint allows you to update the `metadata` property on a price. If you + # pass null for the metadata value, it will clear any existing metadata for that + # price. sig do params( external_price_id: String, @@ -43,9 +46,19 @@ module Orb ) ) end - def update(external_price_id, metadata: nil, request_options: {}) + def update( + external_price_id, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. + metadata: nil, + request_options: {} + ) end + # This endpoint returns a price given an external price id. See the + # [price creation API](/api-reference/price/create-price) for more information + # about external price aliases. sig do params( external_price_id: String, diff --git a/rbi/lib/orb/resources/subscriptions.rbi b/rbi/lib/orb/resources/subscriptions.rbi index 1956c2d8..97dfe8e8 100644 --- a/rbi/lib/orb/resources/subscriptions.rbi +++ b/rbi/lib/orb/resources/subscriptions.rbi @@ -3,6 +3,262 @@ module Orb module Resources class Subscriptions + # A subscription represents the purchase of a plan by a customer. The customer is + # identified by either the `customer_id` or the `external_customer_id`, and + # exactly one of these fields must be provided. + # + # By default, subscriptions begin on the day that they're created and renew + # automatically for each billing cycle at the cadence that's configured in the + # plan definition. + # + # The default configuration for subscriptions in Orb is **In-advance billing** and + # **Beginning of month alignment** (see + # [Subscription](/core-concepts##subscription) for more details). + # + # In order to change the alignment behavior, Orb also supports billing + # subscriptions on the day of the month they are created. If + # `align_billing_with_subscription_start_date = true` is specified, subscriptions + # have billing cycles that are aligned with their `start_date`. For example, a + # subscription that begins on January 15th will have a billing cycle from January + # 15th to February 15th. Every subsequent billing cycle will continue to start and + # invoice on the 15th. + # + # If the "day" value is greater than the number of days in the month, the next + # billing cycle will start at the end of the month. For example, if the start_date + # is January 31st, the next billing cycle will start on February 28th. + # + # If a customer was created with a currency, Orb only allows subscribing the + # customer to a plan with a matching `invoicing_currency`. If the customer does + # not have a currency set, on subscription creation, we set the customer's + # currency to be the `invoicing_currency` of the plan. + # + # ## Customize your customer's subscriptions + # + # Prices and adjustments in a plan can be added, removed, or replaced for the + # subscription being created. This is useful when a customer has prices that + # differ from the default prices for a specific plan. + # + # + # This feature is only available for accounts that have migrated to Subscription Overrides Version 2. You can find your + # Subscription Overrides Version at the bottom of your [Plans page](https://app.withorb.com/plans) + # + # + # ### Adding Prices + # + # To add prices, provide a list of objects with the key `add_prices`. An object in + # the list must specify an existing add-on price with a `price_id` or + # `external_price_id` field, or create a new add-on price by including an object + # with the key `price`, identical to what would be used in the request body for + # the [create price endpoint](/api-reference/price/create-price). See the + # [Price resource](/product-catalog/price-configuration) for the specification of + # different price model configurations possible in this object. + # + # If the plan has phases, each object in the list must include a number with + # `plan_phase_order` key to indicate which phase the price should be added to. + # + # An object in the list can specify an optional `start_date` and optional + # `end_date`. This is equivalent to creating a price interval with the + # [add/edit price intervals endpoint](/api-reference/price-interval/add-or-edit-price-intervals). + # If unspecified, the start or end date of the phase or subscription will be used. + # + # An object in the list can specify an optional `minimum_amount`, + # `maximum_amount`, or `discounts`. This will create adjustments which apply only + # to this price. + # + # Additionally, an object in the list can specify an optional `reference_id`. This + # ID can be used to reference this price when + # [adding an adjustment](#adding-adjustments) in the same API call. However the ID + # is _transient_ and cannot be used to refer to the price in future API calls. + # + # ### Removing Prices + # + # To remove prices, provide a list of objects with the key `remove_prices`. An + # object in the list must specify a plan price with either a `price_id` or + # `external_price_id` field. + # + # ### Replacing Prices + # + # To replace prices, provide a list of objects with the key `replace_prices`. An + # object in the list must specify a plan price to replace with the + # `replaces_price_id` key, and it must specify a price to replace it with by + # either referencing an existing add-on price with a `price_id` or + # `external_price_id` field, or by creating a new add-on price by including an + # object with the key `price`, identical to what would be used in the request body + # for the [create price endpoint](/api-reference/price/create-price). See the + # [Price resource](/product-catalog/price-configuration) for the specification of + # different price model configurations possible in this object. + # + # For fixed fees, an object in the list can supply a `fixed_price_quantity` + # instead of a `price`, `price_id`, or `external_price_id` field. This will update + # only the quantity for the price, similar to the + # [Update price quantity](/api-reference/subscription/update-price-quantity) + # endpoint. + # + # The replacement price will have the same phase, if applicable, and the same + # start and end dates as the price it replaces. + # + # An object in the list can specify an optional `minimum_amount`, + # `maximum_amount`, or `discounts`. This will create adjustments which apply only + # to this price. + # + # Additionally, an object in the list can specify an optional `reference_id`. This + # ID can be used to reference the replacement price when + # [adding an adjustment](#adding-adjustments) in the same API call. However the ID + # is _transient_ and cannot be used to refer to the price in future API calls. + # + # ### Adding adjustments + # + # To add adjustments, provide a list of objects with the key `add_adjustments`. An + # object in the list must include an object with the key `adjustment`, identical + # to the adjustment object in the + # [add/edit price intervals endpoint](/api-reference/price-interval/add-or-edit-price-intervals). + # + # If the plan has phases, each object in the list must include a number with + # `plan_phase_order` key to indicate which phase the adjustment should be added + # to. + # + # An object in the list can specify an optional `start_date` and optional + # `end_date`. If unspecified, the start or end date of the phase or subscription + # will be used. + # + # ### Removing adjustments + # + # To remove adjustments, provide a list of objects with the key + # `remove_adjustments`. An object in the list must include a key, `adjustment_id`, + # with the ID of the adjustment to be removed. + # + # ### Replacing adjustments + # + # To replace adjustments, provide a list of objects with the key + # `replace_adjustments`. An object in the list must specify a plan adjustment to + # replace with the `replaces_adjustment_id` key, and it must specify an adjustment + # to replace it with by including an object with the key `adjustment`, identical + # to the adjustment object in the + # [add/edit price intervals endpoint](/api-reference/price-interval/add-or-edit-price-intervals). + # + # The replacement adjustment will have the same phase, if applicable, and the same + # start and end dates as the adjustment it replaces. + # + # ## Price overrides (DEPRECATED) + # + # + # Price overrides are being phased out in favor adding/removing/replacing prices. (See + # [Customize your customer's subscriptions](/api-reference/subscription/create-subscription)) + # + # + # Price overrides are used to update some or all prices in a plan for the specific + # subscription being created. This is useful when a new customer has negotiated a + # rate that is unique to the customer. + # + # To override prices, provide a list of objects with the key `price_overrides`. + # The price object in the list of overrides is expected to contain the existing + # price id, the `model_type` and configuration. (See the + # [Price resource](/product-catalog/price-configuration) for the specification of + # different price model configurations.) The numerical values can be updated, but + # the billable metric, cadence, type, and name of a price can not be overridden. + # + # ### Maximums and Minimums + # + # Minimums and maximums, much like price overrides, can be useful when a new + # customer has negotiated a new or different minimum or maximum spend cap than the + # default for a given price. If one exists for a price and null is provided for + # the minimum/maximum override on creation, then there will be no minimum/maximum + # on the new subscription. If no value is provided, then the default price maximum + # or minimum is used. + # + # To add a minimum for a specific price, add `minimum_amount` to the specific + # price in the `price_overrides` object. + # + # To add a maximum for a specific price, add `maximum_amount` to the specific + # price in the `price_overrides` object. + # + # ### Minimum override example + # + # Price minimum override example: + # + # ```json + # { + # ... + # "id": "price_id", + # "model_type": "unit", + # "unit_config": { + # "unit_amount": "0.50" + # }, + # "minimum_amount": "100.00" + # ... + # } + # ``` + # + # Removing an existing minimum example + # + # ```json + # { + # ... + # "id": "price_id", + # "model_type": "unit", + # "unit_config": { + # "unit_amount": "0.50" + # }, + # "minimum_amount": null + # ... + # } + # ``` + # + # ### Discounts + # + # Discounts, like price overrides, can be useful when a new customer has + # negotiated a new or different discount than the default for a price. If a + # discount exists for a price and a null discount is provided on creation, then + # there will be no discount on the new subscription. + # + # To add a discount for a specific price, add `discount` to the price in the + # `price_overrides` object. Discount should be a dictionary of the format: + # + # ```ts + # { + # "discount_type": "amount" | "percentage" | "usage", + # "amount_discount": string, + # "percentage_discount": string, + # "usage_discount": string + # } + # ``` + # + # where either `amount_discount`, `percentage_discount`, or `usage_discount` is + # provided. + # + # Price discount example + # + # ```json + # { + # ... + # "id": "price_id", + # "model_type": "unit", + # "unit_config": { + # "unit_amount": "0.50" + # }, + # "discount": {"discount_type": "amount", "amount_discount": "175"}, + # } + # ``` + # + # Removing an existing discount example + # + # ```json + # { + # "customer_id": "customer_id", + # "plan_id": "plan_id", + # "discount": null, + # "price_overrides": [ ... ] + # ... + # } + # ``` + # + # ## Threshold Billing + # + # Orb supports invoicing for a subscription when a preconfigured usage threshold + # is hit. To enable threshold billing, pass in an `invoicing_threshold`, which is + # specified in the subscription's invoicing currency, when creating a + # subscription. E.g. pass in `10.00` to issue an invoice when usage amounts hit + # $10.00 for a subscription that invoices in USD. sig do params( add_adjustments: T.nilable(T::Array[Orb::Models::SubscriptionCreateParams::AddAdjustment]), @@ -41,41 +297,95 @@ module Orb .returns(Orb::Models::SubscriptionCreateResponse) end def create( + # Additional adjustments to be added to the subscription. (Only available for + # accounts that have migrated off of legacy subscription overrides) add_adjustments: nil, + # Additional prices to be added to the subscription. (Only available for accounts + # that have migrated off of legacy subscription overrides) add_prices: nil, align_billing_with_subscription_start_date: nil, + # Determines whether issued invoices for this subscription will automatically be + # charged with the saved payment method on the due date. If not specified, this + # defaults to the behavior configured for this customer. auto_collection: nil, aws_region: nil, billing_cycle_anchor_configuration: nil, + # Redemption code to be used for this subscription. If the coupon cannot be found + # by its redemption code, or cannot be redeemed, an error response will be + # returned and the subscription creation or plan change will not be scheduled. coupon_redemption_code: nil, credits_overage_rate: nil, customer_id: nil, + # Determines the default memo on this subscription's invoices. Note that if this + # is not provided, it is determined by the plan configuration. default_invoice_memo: nil, end_date: nil, external_customer_id: nil, external_marketplace: nil, external_marketplace_reporting_id: nil, + # The external_plan_id of the plan that the given subscription should be switched + # to. Note that either this property or `plan_id` must be specified. external_plan_id: nil, + # An additional filter to apply to usage queries. This filter must be expressed as + # a boolean + # [computed property](/extensibility/advanced-metrics#computed-properties). If + # null, usage queries will not include any additional filter. filter: nil, + # The phase of the plan to start with initial_phase_order: nil, + # When this subscription's accrued usage reaches this threshold, an invoice will + # be issued for the subscription. If not specified, invoices will only be issued + # at the end of the billing period. invoicing_threshold: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. metadata: nil, + # The net terms determines the difference between the invoice date and the issue + # date for the invoice. If you intend the invoice to be due on issue, set this + # to 0. If not provided, this defaults to the value specified in the plan. net_terms: nil, per_credit_overage_amount: nil, + # The plan that the given subscription should be switched to. Note that either + # this property or `external_plan_id` must be specified. plan_id: nil, + # Specifies which version of the plan to subscribe to. If null, the default + # version will be used. plan_version_number: nil, + # Optionally provide a list of overrides for prices on the plan price_overrides: nil, + # Plan adjustments to be removed from the subscription. (Only available for + # accounts that have migrated off of legacy subscription overrides) remove_adjustments: nil, + # Plan prices to be removed from the subscription. (Only available for accounts + # that have migrated off of legacy subscription overrides) remove_prices: nil, + # Plan adjustments to be replaced with additional adjustments on the subscription. + # (Only available for accounts that have migrated off of legacy subscription + # overrides) replace_adjustments: nil, + # Plan prices to be replaced with additional prices on the subscription. (Only + # available for accounts that have migrated off of legacy subscription overrides) replace_prices: nil, start_date: nil, + # The duration of the trial period in days. If not provided, this defaults to the + # value specified in the plan. If `0` is provided, the trial on the plan will be + # skipped. trial_duration_days: nil, + # A list of customer IDs whose usage events will be aggregated and billed under + # this subscription. By default, a subscription only considers usage events + # associated with its attached customer's customer_id. When usage_customer_ids is + # provided, the subscription includes usage events from the specified customers + # only. Provided usage_customer_ids must be either the customer for this + # subscription itself, or any of that customer's children. usage_customer_ids: nil, request_options: {} ) end + # This endpoint can be used to update the `metadata`, `net terms`, + # `auto_collection`, `invoicing_threshold`, and `default_invoice_memo` properties + # on a subscription. sig do params( subscription_id: String, @@ -90,15 +400,39 @@ module Orb end def update( subscription_id, + # Determines whether issued invoices for this subscription will automatically be + # charged with the saved payment method on the due date. This property defaults to + # the plan's behavior. auto_collection: nil, + # Determines the default memo on this subscription's invoices. Note that if this + # is not provided, it is determined by the plan configuration. default_invoice_memo: nil, + # When this subscription's accrued usage reaches this threshold, an invoice will + # be issued for the subscription. If not specified, invoices will only be issued + # at the end of the billing period. invoicing_threshold: nil, + # User-specified key/value pairs for the resource. Individual keys can be removed + # by setting the value to `null`, and the entire metadata mapping can be cleared + # by setting `metadata` to `null`. metadata: nil, + # Determines the difference between the invoice issue date for subscription + # invoices as the date that they are due. A value of `0` here represents that the + # invoice is due on issue, whereas a value of `30` represents that the customer + # has a month to pay the invoice. net_terms: nil, request_options: {} ) end + # This endpoint returns a list of all subscriptions for an account as a + # [paginated](/api-reference/pagination) list, ordered starting from the most + # recently created subscription. For a full discussion of the subscription + # resource, see [Subscription](/core-concepts##subscription). + # + # Subscriptions can be filtered for a specific customer by using either the + # customer_id or external_customer_id query parameters. To filter subscriptions + # for multiple customers, use the customer_id[] or external_customer_id[] query + # parameters. sig do params( created_at_gt: T.nilable(Time), @@ -107,7 +441,7 @@ module Orb created_at_lte: T.nilable(Time), cursor: T.nilable(String), customer_id: T.nilable(T::Array[String]), - external_customer_id: T.nilable(String), + external_customer_id: T.nilable(T::Array[String]), limit: Integer, status: T.nilable(Symbol), request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything])) @@ -119,15 +453,79 @@ module Orb created_at_gte: nil, created_at_lt: nil, created_at_lte: nil, + # Cursor for pagination. This can be populated by the `next_cursor` value returned + # from the initial request. cursor: nil, customer_id: nil, external_customer_id: nil, + # The number of items to fetch. Defaults to 20. limit: nil, status: nil, request_options: {} ) end + # This endpoint can be used to cancel an existing subscription. It returns the + # serialized subscription object with an `end_date` parameter that signifies when + # the subscription will transition to an ended state. + # + # The body parameter `cancel_option` determines the cancellation behavior. Orb + # supports three cancellation options: + # + # - `end_of_subscription_term`: stops the subscription from auto-renewing. + # Subscriptions that have been cancelled with this option can still incur + # charges for the remainder of their term: + # + # - Issuing this cancellation request for a monthly subscription will keep the + # subscription active until the start of the subsequent month, and potentially + # issue an invoice for any usage charges incurred in the intervening period. + # - Issuing this cancellation request for a quarterly subscription will keep the + # subscription active until the end of the quarter and potentially issue an + # invoice for any usage charges incurred in the intervening period. + # - Issuing this cancellation request for a yearly subscription will keep the + # subscription active for the full year. For example, a yearly subscription + # starting on 2021-11-01 and cancelled on 2021-12-08 will remain active until + # 2022-11-01 and potentially issue charges in the intervening months for any + # recurring monthly usage charges in its plan. + # - **Note**: If a subscription's plan contains prices with difference cadences, + # the end of term date will be determined by the largest cadence value. For + # example, cancelling end of term for a subscription with a quarterly fixed + # fee with a monthly usage fee will result in the subscription ending at the + # end of the quarter. + # + # - `immediate`: ends the subscription immediately, setting the `end_date` to the + # current time: + # + # - Subscriptions that have been cancelled with this option will be invoiced + # immediately. This invoice will include any usage fees incurred in the + # billing period up to the cancellation, along with any prorated recurring + # fees for the billing period, if applicable. + # - **Note**: If the subscription has a recurring fee that was paid in-advance, + # the prorated amount for the remaining time period will be added to the + # [customer's balance](list-balance-transactions) upon immediate cancellation. + # However, if the customer is ineligible to use the customer balance, the + # subscription cannot be cancelled immediately. + # + # - `requested_date`: ends the subscription on a specified date, which requires a + # `cancellation_date` to be passed in. If no timezone is provided, the + # customer's timezone is used. For example, a subscription starting on January + # 1st with a monthly price can be set to be cancelled on the first of any month + # after January 1st (e.g. March 1st, April 1st, May 1st). A subscription with + # multiple prices with different cadences defines the "term" to be the highest + # cadence of the prices. + # + # Upcoming subscriptions are only eligible for immediate cancellation, which will + # set the `end_date` equal to the `start_date` upon cancellation. + # + # ## Backdated cancellations + # + # Orb allows you to cancel a subscription in the past as long as there are no paid + # invoices between the `requested_date` and the current time. If the cancellation + # is after the latest issued invoice, Orb will generate a balance refund for the + # current period. If the cancellation is before the most recently issued invoice, + # Orb will void the intervening invoice and generate a new one based on the new + # dates for the subscription. See the section on + # [cancellation behaviors](/product-catalog/creating-subscriptions#cancellation-behaviors). sig do params( subscription_id: String, @@ -140,13 +538,21 @@ module Orb end def cancel( subscription_id, + # Determines the timing of subscription cancellation cancel_option:, + # If false, this request will fail if it would void an issued invoice or create a + # credit note. Consider using this as a safety mechanism if you do not expect + # existing invoices to be changed. allow_invoice_credit_or_void: nil, + # The date that the cancellation should take effect. This parameter can only be + # passed if the `cancel_option` is `requested_date`. cancellation_date: nil, request_options: {} ) end + # This endpoint is used to fetch a [Subscription](/core-concepts##subscription) + # given an identifier. sig do params( subscription_id: String, @@ -157,6 +563,16 @@ module Orb def fetch(subscription_id, request_options: {}) end + # This endpoint is used to fetch a day-by-day snapshot of a subscription's costs + # in Orb, calculated by applying pricing information to the underlying usage (see + # the [subscription usage endpoint](fetch-subscription-usage) to fetch usage per + # metric, in usage units rather than a currency). + # + # The semantics of this endpoint exactly mirror those of + # [fetching a customer's costs](fetch-customer-costs). Use this endpoint to limit + # your analysis of costs to a specific subscription for the customer (e.g. to + # de-aggregate costs when a customer's subscription has started and stopped on the + # same day). sig do params( subscription_id: String, @@ -170,14 +586,25 @@ module Orb end def fetch_costs( subscription_id, + # The currency or custom pricing unit to use. currency: nil, + # Costs returned are exclusive of `timeframe_end`. timeframe_end: nil, + # Costs returned are inclusive of `timeframe_start`. timeframe_start: nil, + # Controls whether Orb returns cumulative costs since the start of the billing + # period, or incremental day-by-day costs. If your customer has minimums or + # discounts, it's strongly recommended that you use the default cumulative + # behavior. view_mode: nil, request_options: {} ) end + # This endpoint returns a [paginated](/api-reference/pagination) list of all plans + # associated with a subscription along with their start and end dates. This list + # contains the subscription's initial plan along with past and future plan + # changes. sig do params( subscription_id: String, @@ -193,7 +620,10 @@ module Orb end def fetch_schedule( subscription_id, + # Cursor for pagination. This can be populated by the `next_cursor` value returned + # from the initial request. cursor: nil, + # The number of items to fetch. Defaults to 20. limit: nil, start_date_gt: nil, start_date_gte: nil, @@ -203,6 +633,200 @@ module Orb ) end + # This endpoint is used to fetch a subscription's usage in Orb. Especially when + # combined with optional query parameters, this endpoint is a powerful way to + # build visualizations on top of Orb's event data and metrics. + # + # With no query parameters specified, this endpoint returns usage for the + # subscription's _current billing period_ across each billable metric that + # participates in the subscription. Usage quantities returned are the result of + # evaluating the metric definition for the entirety of the customer's billing + # period. + # + # ### Default response shape + # + # Orb returns a `data` array with an object corresponding to each billable metric. + # Nested within this object is a `usage` array which has a `quantity` value and a + # corresponding `timeframe_start` and `timeframe_end`. The `quantity` value + # represents the calculated usage value for the billable metric over the specified + # timeframe (inclusive of the `timeframe_start` timestamp and exclusive of the + # `timeframe_end` timestamp). + # + # Orb will include _every_ window in the response starting from the beginning of + # the billing period, even when there were no events (and therefore no usage) in + # the window. This increases the size of the response but prevents the caller from + # filling in gaps and handling cumbersome time-based logic. + # + # The query parameters in this endpoint serve to override this behavior and + # provide some key functionality, as listed below. Note that this functionality + # can also be used _in conjunction_ with each other, e.g. to display grouped usage + # on a custom timeframe. + # + # ## Custom timeframe + # + # In order to view usage for a custom timeframe rather than the current billing + # period, specify a `timeframe_start` and `timeframe_end`. This will calculate + # quantities for usage incurred between timeframe_start (inclusive) and + # timeframe_end (exclusive), i.e. `[timeframe_start, timeframe_end)`. + # + # Note: + # + # - These timestamps must be specified in ISO 8601 format and UTC timezone, e.g. + # `2022-02-01T05:00:00Z`. + # - Both parameters must be specified if either is specified. + # + # ## Grouping by custom attributes + # + # In order to view a single metric grouped by a specific _attribute_ that each + # event is tagged with (e.g. `cluster`), you must additionally specify a + # `billable_metric_id` and a `group_by` key. The `group_by` key denotes the event + # property on which to group. + # + # When returning grouped usage, only usage for `billable_metric_id` is returned, + # and a separate object in the `data` array is returned for each value of the + # `group_by` key present in your events. The `quantity` value is the result of + # evaluating the billable metric for events filtered to a single value of the + # `group_by` key. + # + # Orb expects that events that match the billable metric will contain values in + # the `properties` dictionary that correspond to the `group_by` key specified. By + # default, Orb will not return a `null` group (i.e. events that match the metric + # but do not have the key set). Currently, it is only possible to view usage + # grouped by a single attribute at a time. + # + # When viewing grouped usage, Orb uses pagination to limit the response size to + # 1000 groups by default. If there are more groups for a given subscription, + # pagination metadata in the response can be used to fetch all of the data. + # + # The following example shows usage for an "API Requests" billable metric grouped + # by `region`. Note the extra `metric_group` dictionary in the response, which + # provides metadata about the group: + # + # ```json + # { + # "data": [ + # { + # "usage": [ + # { + # "quantity": 0.19291, + # "timeframe_start": "2021-10-01T07:00:00Z", + # "timeframe_end": "2021-10-02T07:00:00Z", + # }, + # ... + # ], + # "metric_group": { + # "property_key": "region", + # "property_value": "asia/pacific" + # }, + # "billable_metric": { + # "id": "Fe9pbpMk86xpwdGB", + # "name": "API Requests" + # }, + # "view_mode": "periodic" + # }, + # ... + # ] + # } + # ``` + # + # ## Windowed usage + # + # The `granularity` parameter can be used to _window_ the usage `quantity` value + # into periods. When not specified, usage is returned for the entirety of the time + # range. + # + # When `granularity = day` is specified with a timeframe longer than a day, Orb + # will return a `quantity` value for each full day between `timeframe_start` and + # `timeframe_end`. Note that the days are demarcated by the _customer's local + # midnight_. + # + # For example, with `timeframe_start = 2022-02-01T05:00:00Z`, + # `timeframe_end = 2022-02-04T01:00:00Z` and `granularity=day`, the following + # windows will be returned for a customer in the `America/Los_Angeles` timezone + # since local midnight is `08:00` UTC: + # + # - `[2022-02-01T05:00:00Z, 2022-02-01T08:00:00Z)` + # - `[2022-02-01T08:00:00, 2022-02-02T08:00:00Z)` + # - `[2022-02-02T08:00:00, 2022-02-03T08:00:00Z)` + # - `[2022-02-03T08:00:00, 2022-02-04T01:00:00Z)` + # + # ```json + # { + # "data": [ + # { + # "billable_metric": { + # "id": "Q8w89wjTtBdejXKsm", + # "name": "API Requests" + # }, + # "usage": [ + # { + # "quantity": 0, + # "timeframe_end": "2022-02-01T08:00:00+00:00", + # "timeframe_start": "2022-02-01T05:00:00+00:00" + # }, + # { + # + # "quantity": 0, + # "timeframe_end": "2022-02-02T08:00:00+00:00", + # "timeframe_start": "2022-02-01T08:00:00+00:00" + # }, + # { + # "quantity": 0, + # "timeframe_end": "2022-02-03T08:00:00+00:00", + # "timeframe_start": "2022-02-02T08:00:00+00:00" + # }, + # { + # "quantity": 0, + # "timeframe_end": "2022-02-04T01:00:00+00:00", + # "timeframe_start": "2022-02-03T08:00:00+00:00" + # } + # ], + # "view_mode": "periodic" + # }, + # ... + # ] + # } + # ``` + # + # ## Decomposable vs. non-decomposable metrics + # + # Billable metrics fall into one of two categories: decomposable and + # non-decomposable. A decomposable billable metric, such as a sum or a count, can + # be displayed and aggregated across arbitrary timescales. On the other hand, a + # non-decomposable metric is not meaningful when only a slice of the billing + # window is considered. + # + # As an example, if we have a billable metric that's defined to count unique + # users, displaying a graph of unique users for each day is not representative of + # the billable metric value over the month (days could have an overlapping set of + # 'unique' users). Instead, what's useful for any given day is the number of + # unique users in the billing period so far, which are the _cumulative_ unique + # users. + # + # Accordingly, this endpoint returns treats these two types of metrics differently + # when `group_by` is specified: + # + # - Decomposable metrics can be grouped by any event property. + # - Non-decomposable metrics can only be grouped by the corresponding price's + # invoice grouping key. If no invoice grouping key is present, the metric does + # not support `group_by`. + # + # ## Matrix prices + # + # When a billable metric is attached to a price that uses matrix pricing, it's + # important to view usage grouped by those matrix dimensions. In this case, use + # the query parameters `first_dimension_key`, `first_dimension_value` and + # `second_dimension_key`, `second_dimension_value` while filtering to a specific + # `billable_metric_id`. + # + # For example, if your compute metric has a separate unit price (i.e. a matrix + # pricing model) per `region` and `provider`, your request might provide the + # following parameters: + # + # - `first_dimension_key`: `region` + # - `first_dimension_value`: `us-east-1` + # - `second_dimension_key`: `provider` + # - `second_dimension_value`: `aws` sig do params( subscription_id: String, @@ -227,20 +851,103 @@ module Orb end def fetch_usage( subscription_id, + # When specified in conjunction with `group_by`, this parameter filters usage to a + # single billable metric. Note that both `group_by` and `billable_metric_id` must + # be specified together. billable_metric_id: nil, first_dimension_key: nil, first_dimension_value: nil, + # This determines the windowing of usage reporting. granularity: nil, + # Groups per-price usage by the key provided. group_by: nil, second_dimension_key: nil, second_dimension_value: nil, + # Usage returned is exclusive of `timeframe_end`. timeframe_end: nil, + # Usage returned is inclusive of `timeframe_start`. timeframe_start: nil, + # Controls whether Orb returns cumulative usage since the start of the billing + # period, or incremental day-by-day usage. If your customer has minimums or + # discounts, it's strongly recommended that you use the default cumulative + # behavior. view_mode: nil, request_options: {} ) end + # This endpoint is used to add and edit subscription + # [price intervals](/api-reference/price-interval/add-or-edit-price-intervals). By + # making modifications to a subscription’s price intervals, you can + # [flexibly and atomically control the billing behavior of a subscription](/product-catalog/modifying-subscriptions). + # + # ## Adding price intervals + # + # Prices can be added as price intervals to a subscription by specifying them in + # the `add` array. A `price_id` or `external_price_id` from an add-on price or + # previously removed plan price can be specified to reuse an existing price + # definition (however, please note that prices from other plans cannot be added to + # the subscription). Additionally, a new price can be specified using the `price` + # field — this price will be created automatically. + # + # A `start_date` must be specified for the price interval. This is the date when + # the price will start billing on the subscription, so this will notably result in + # an immediate charge at this time for any billed in advance fixed fees. The + # `end_date` will default to null, resulting in a price interval that will bill on + # a continually recurring basis. Both of these dates can be set in the past or the + # future and Orb will generate or modify invoices to ensure the subscription’s + # invoicing behavior is correct. + # + # Additionally, a discount, minimum, or maximum can be specified on the price + # interval. This will only apply to this price interval, not any other price + # intervals on the subscription. + # + # ## Adjustment intervals + # + # An adjustment interval represents the time period that a particular adjustment + # (a discount, minimum, or maximum) applies to the prices on a subscription. + # Adjustment intervals can be added to a subscription by specifying them in the + # `add_adjustments` array, or modified via the `edit_adjustments` array. When + # creating an adjustment interval, you'll need to provide the definition of the + # new adjustment (the type of adjustment, and which prices it applies to), as well + # as the start and end dates for the adjustment interval. The start and end dates + # of an existing adjustment interval can be edited via the `edit_adjustments` + # field (just like price intervals). (To "change" the amount of a discount, + # minimum, or maximum, then, you'll need to end the existing interval, and create + # a new adjustment interval with the new amount and a start date that matches the + # end date of the previous interval.) + # + # ## Editing price intervals + # + # Price intervals can be adjusted by specifying edits to make in the `edit` array. + # A `price_interval_id` to edit must be specified — this can be retrieved from the + # `price_intervals` field on the subscription. + # + # A new `start_date` or `end_date` can be specified to change the range of the + # price interval, which will modify past or future invoices to ensure correctness. + # If either of these dates are unspecified, they will default to the existing date + # on the price interval. To remove a price interval entirely from a subscription, + # set the `end_date` to be equivalent to the `start_date`. + # + # ## Fixed fee quantity transitions + # + # The fixed fee quantity transitions for a fixed fee price interval can also be + # specified when adding or editing by passing an array for + # `fixed_fee_quantity_transitions`. A fixed fee quantity transition must have a + # `quantity` and an `effective_date`, which is the date after which the new + # quantity will be used for billing. If a fixed fee quantity transition is + # scheduled at a billing period boundary, the full quantity will be billed on an + # invoice with the other prices on the subscription. If the fixed fee quantity + # transition is scheduled mid-billing period, the difference between the existing + # quantity and quantity specified in the transition will be prorated for the rest + # of the billing period and billed immediately, which will generate a new invoice. + # + # Notably, the list of fixed fee quantity transitions passed will overwrite the + # existing fixed fee quantity transitions on the price interval, so the entire + # list of transitions must be specified to add additional transitions. The + # existing list of transitions can be retrieved using the + # `fixed_fee_quantity_transitions` property on a subscription’s serialized price + # intervals. sig do params( subscription_id: String, @@ -255,15 +962,205 @@ module Orb end def price_intervals( subscription_id, + # A list of price intervals to add to the subscription. add: nil, + # A list of adjustments to add to the subscription. add_adjustments: nil, + # If false, this request will fail if it would void an issued invoice or create a + # credit note. Consider using this as a safety mechanism if you do not expect + # existing invoices to be changed. allow_invoice_credit_or_void: nil, + # A list of price intervals to edit on the subscription. edit: nil, + # A list of adjustments to edit on the subscription. edit_adjustments: nil, request_options: {} ) end + # This endpoint can be used to change an existing subscription's plan. It returns + # the serialized updated subscription object. + # + # The body parameter `change_option` determines when the plan change occurrs. Orb + # supports three options: + # + # - `end_of_subscription_term`: changes the plan at the end of the existing plan's + # term. + # - Issuing this plan change request for a monthly subscription will keep the + # existing plan active until the start of the subsequent month. Issuing this + # plan change request for a yearly subscription will keep the existing plan + # active for the full year. Charges incurred in the remaining period will be + # invoiced as normal. + # - Example: The plan is billed monthly on the 1st of the month, the request is + # made on January 15th, so the plan will be changed on February 1st, and + # invoice will be issued on February 1st for the last month of the original + # plan. + # - `immediate`: changes the plan immediately. + # - Subscriptions that have their plan changed with this option will move to the + # new plan immediately, and be invoiced immediately. + # - This invoice will include any usage fees incurred in the billing period up + # to the change, along with any prorated recurring fees for the billing + # period, if applicable. + # - Example: The plan is billed monthly on the 1st of the month, the request is + # made on January 15th, so the plan will be changed on January 15th, and an + # invoice will be issued for the partial month, from January 1 to January 15, + # on the original plan. + # - `requested_date`: changes the plan on the requested date (`change_date`). + # - If no timezone is provided, the customer's timezone is used. The + # `change_date` body parameter is required if this option is chosen. + # - Example: The plan is billed monthly on the 1st of the month, the request is + # made on January 15th, with a requested `change_date` of February 15th, so + # the plan will be changed on February 15th, and invoices will be issued on + # February 1st and February 15th. + # + # Note that one of `plan_id` or `external_plan_id` is required in the request body + # for this operation. + # + # ## Customize your customer's subscriptions + # + # Prices and adjustments in a plan can be added, removed, or replaced on the + # subscription when you schedule the plan change. This is useful when a customer + # has prices that differ from the default prices for a specific plan. + # + # + # This feature is only available for accounts that have migrated to Subscription Overrides Version 2. You can find your + # Subscription Overrides Version at the bottom of your [Plans page](https://app.withorb.com/plans) + # + # + # ### Adding Prices + # + # To add prices, provide a list of objects with the key `add_prices`. An object in + # the list must specify an existing add-on price with a `price_id` or + # `external_price_id` field, or create a new add-on price by including an object + # with the key `price`, identical to what would be used in the request body for + # the [create price endpoint](/api-reference/price/create-price). See the + # [Price resource](/product-catalog/price-configuration) for the specification of + # different price model configurations possible in this object. + # + # If the plan has phases, each object in the list must include a number with + # `plan_phase_order` key to indicate which phase the price should be added to. + # + # An object in the list can specify an optional `start_date` and optional + # `end_date`. If `start_date` is unspecified, the start of the phase / plan change + # time will be used. If `end_date` is unspecified, it will finish at the end of + # the phase / have no end time. + # + # An object in the list can specify an optional `minimum_amount`, + # `maximum_amount`, or `discounts`. This will create adjustments which apply only + # to this price. + # + # Additionally, an object in the list can specify an optional `reference_id`. This + # ID can be used to reference this price when + # [adding an adjustment](#adding-adjustments) in the same API call. However the ID + # is _transient_ and cannot be used to refer to the price in future API calls. + # + # ### Removing Prices + # + # To remove prices, provide a list of objects with the key `remove_prices`. An + # object in the list must specify a plan price with either a `price_id` or + # `external_price_id` field. + # + # ### Replacing Prices + # + # To replace prices, provide a list of objects with the key `replace_prices`. An + # object in the list must specify a plan price to replace with the + # `replaces_price_id` key, and it must specify a price to replace it with by + # either referencing an existing add-on price with a `price_id` or + # `external_price_id` field, or by creating a new add-on price by including an + # object with the key `price`, identical to what would be used in the request body + # for the [create price endpoint](/api-reference/price/create-price). See the + # [Price resource](/product-catalog/price-configuration) for the specification of + # different price model configurations possible in this object. + # + # For fixed fees, an object in the list can supply a `fixed_price_quantity` + # instead of a `price`, `price_id`, or `external_price_id` field. This will update + # only the quantity for the price, similar to the + # [Update price quantity](/api-reference/subscription/update-price-quantity) + # endpoint. + # + # The replacement price will have the same phase, if applicable, and the same + # start and end dates as the price it replaces. + # + # An object in the list can specify an optional `minimum_amount`, + # `maximum_amount`, or `discounts`. This will create adjustments which apply only + # to this price. + # + # Additionally, an object in the list can specify an optional `reference_id`. This + # ID can be used to reference the replacement price when + # [adding an adjustment](#adding-adjustments) in the same API call. However the ID + # is _transient_ and cannot be used to refer to the price in future API calls. + # + # ### Adding adjustments + # + # To add adjustments, provide a list of objects with the key `add_adjustments`. An + # object in the list must include an object with the key `adjustment`, identical + # to the adjustment object in the + # [add/edit price intervals endpoint](/api-reference/price-interval/add-or-edit-price-intervals). + # + # If the plan has phases, each object in the list must include a number with + # `plan_phase_order` key to indicate which phase the adjustment should be added + # to. + # + # An object in the list can specify an optional `start_date` and optional + # `end_date`. If `start_date` is unspecified, the start of the phase / plan change + # time will be used. If `end_date` is unspecified, it will finish at the end of + # the phase / have no end time. + # + # ### Removing adjustments + # + # To remove adjustments, provide a list of objects with the key + # `remove_adjustments`. An object in the list must include a key, `adjustment_id`, + # with the ID of the adjustment to be removed. + # + # ### Replacing adjustments + # + # To replace adjustments, provide a list of objects with the key + # `replace_adjustments`. An object in the list must specify a plan adjustment to + # replace with the `replaces_adjustment_id` key, and it must specify an adjustment + # to replace it with by including an object with the key `adjustment`, identical + # to the adjustment object in the + # [add/edit price intervals endpoint](/api-reference/price-interval/add-or-edit-price-intervals). + # + # The replacement adjustment will have the same phase, if applicable, and the same + # start and end dates as the adjustment it replaces. + # + # ## Price overrides (DEPRECATED) + # + # + # Price overrides are being phased out in favor adding/removing/replacing prices. (See + # [Customize your customer's subscriptions](/api-reference/subscription/schedule-plan-change)) + # + # + # Price overrides are used to update some or all prices in a plan for the specific + # subscription being created. This is useful when a new customer has negotiated a + # rate that is unique to the customer. + # + # To override prices, provide a list of objects with the key `price_overrides`. + # The price object in the list of overrides is expected to contain the existing + # price id, the `model_type` and configuration. (See the + # [Price resource](/product-catalog/price-configuration) for the specification of + # different price model configurations.) The numerical values can be updated, but + # the billable metric, cadence, type, and name of a price can not be overridden. + # + # ### Maximums, and minimums + # + # Price overrides are used to update some or all prices in the target plan. + # Minimums and maximums, much like price overrides, can be useful when a new + # customer has negotiated a new or different minimum or maximum spend cap than the + # default for the plan. The request format for maximums and minimums is the same + # as those in [subscription creation](create-subscription). + # + # ## Scheduling multiple plan changes + # + # When scheduling multiple plan changes with the same date, the latest plan change + # on that day takes effect. + # + # ## Prorations for in-advance fees + # + # By default, Orb calculates the prorated difference in any fixed fees when making + # a plan change, adjusting the customer balance as needed. For details on this + # behavior, see + # [Modifying subscriptions](/product-catalog/modifying-subscriptions#prorations-for-in-advance-fees). sig do params( subscription_id: String, @@ -300,35 +1197,93 @@ module Orb def schedule_plan_change( subscription_id, change_option:, + # Additional adjustments to be added to the subscription. (Only available for + # accounts that have migrated off of legacy subscription overrides) add_adjustments: nil, + # Additional prices to be added to the subscription. (Only available for accounts + # that have migrated off of legacy subscription overrides) add_prices: nil, + # [DEPRECATED] Use billing_cycle_alignment instead. Reset billing periods to be + # aligned with the plan change's effective date. align_billing_with_plan_change_date: nil, + # Determines whether issued invoices for this subscription will automatically be + # charged with the saved payment method on the due date. If not specified, this + # defaults to the behavior configured for this customer. auto_collection: nil, + # Reset billing periods to be aligned with the plan change's effective date or + # start of the month. Defaults to `unchanged` which keeps subscription's existing + # billing cycle alignment. billing_cycle_alignment: nil, billing_cycle_anchor_configuration: nil, + # The date that the plan change should take effect. This parameter can only be + # passed if the `change_option` is `requested_date`. If a date with no time is + # passed, the plan change will happen at midnight in the customer's timezone. change_date: nil, + # Redemption code to be used for this subscription. If the coupon cannot be found + # by its redemption code, or cannot be redeemed, an error response will be + # returned and the subscription creation or plan change will not be scheduled. coupon_redemption_code: nil, credits_overage_rate: nil, + # Determines the default memo on this subscription's invoices. Note that if this + # is not provided, it is determined by the plan configuration. default_invoice_memo: nil, + # The external_plan_id of the plan that the given subscription should be switched + # to. Note that either this property or `plan_id` must be specified. external_plan_id: nil, + # An additional filter to apply to usage queries. This filter must be expressed as + # a boolean + # [computed property](/extensibility/advanced-metrics#computed-properties). If + # null, usage queries will not include any additional filter. filter: nil, + # The phase of the plan to start with initial_phase_order: nil, + # When this subscription's accrued usage reaches this threshold, an invoice will + # be issued for the subscription. If not specified, invoices will only be issued + # at the end of the billing period. invoicing_threshold: nil, + # The net terms determines the difference between the invoice date and the issue + # date for the invoice. If you intend the invoice to be due on issue, set this + # to 0. If not provided, this defaults to the value specified in the plan. net_terms: nil, per_credit_overage_amount: nil, + # The plan that the given subscription should be switched to. Note that either + # this property or `external_plan_id` must be specified. plan_id: nil, + # Specifies which version of the plan to change to. If null, the default version + # will be used. plan_version_number: nil, + # Optionally provide a list of overrides for prices on the plan price_overrides: nil, + # Plan adjustments to be removed from the subscription. (Only available for + # accounts that have migrated off of legacy subscription overrides) remove_adjustments: nil, + # Plan prices to be removed from the subscription. (Only available for accounts + # that have migrated off of legacy subscription overrides) remove_prices: nil, + # Plan adjustments to be replaced with additional adjustments on the subscription. + # (Only available for accounts that have migrated off of legacy subscription + # overrides) replace_adjustments: nil, + # Plan prices to be replaced with additional prices on the subscription. (Only + # available for accounts that have migrated off of legacy subscription overrides) replace_prices: nil, + # The duration of the trial period in days. If not provided, this defaults to the + # value specified in the plan. If `0` is provided, the trial on the plan will be + # skipped. trial_duration_days: nil, + # A list of customer IDs whose usage events will be aggregated and billed under + # this subscription. By default, a subscription only considers usage events + # associated with its attached customer's customer_id. When usage_customer_ids is + # provided, the subscription includes usage events from the specified customers + # only. Provided usage_customer_ids must be either the customer for this + # subscription itself, or any of that customer's children. usage_customer_ids: nil, request_options: {} ) end + # Manually trigger a phase, effective the given date (or the current time, if not + # specified). sig do params( subscription_id: String, @@ -340,12 +1295,23 @@ module Orb end def trigger_phase( subscription_id, + # If false, this request will fail if it would void an issued invoice or create a + # credit note. Consider using this as a safety mechanism if you do not expect + # existing invoices to be changed. allow_invoice_credit_or_void: nil, + # The date on which the phase change should take effect. If not provided, defaults + # to today in the customer's timezone. effective_date: nil, request_options: {} ) end + # This endpoint can be used to unschedule any pending cancellations for a + # subscription. + # + # To be eligible, the subscription must currently be active and have a future + # cancellation. This operation will turn on auto-renew, ensuring that the + # subscription does not end at the currently scheduled cancellation time. sig do params( subscription_id: String, @@ -356,6 +1322,11 @@ module Orb def unschedule_cancellation(subscription_id, request_options: {}) end + # This endpoint can be used to clear scheduled updates to the quantity for a fixed + # fee. + # + # If there are no updates scheduled, a request validation error will be returned + # with a 400 status code. sig do params( subscription_id: String, @@ -364,9 +1335,16 @@ module Orb ) .returns(Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse) end - def unschedule_fixed_fee_quantity_updates(subscription_id, price_id:, request_options: {}) + def unschedule_fixed_fee_quantity_updates( + subscription_id, + # Price for which the updates should be cleared. Must be a fixed fee. + price_id:, + request_options: {} + ) end + # This endpoint can be used to unschedule any pending plan changes on an existing + # subscription. sig do params( subscription_id: String, @@ -377,6 +1355,20 @@ module Orb def unschedule_pending_plan_changes(subscription_id, request_options: {}) end + # This endpoint can be used to update the quantity for a fixed fee. + # + # To be eligible, the subscription must currently be active and the price + # specified must be a fixed fee (not usage-based). This operation will immediately + # update the quantity for the fee, or if a `effective_date` is passed in, will + # update the quantity on the requested date at midnight in the customer's + # timezone. + # + # In order to change the fixed fee quantity as of the next draft invoice for this + # subscription, pass `change_option=upcoming_invoice` without an `effective_date` + # specified. + # + # If the fee is an in-advance fixed fee, it will also issue an immediate invoice + # for the difference for the remainder of the billing period. sig do params( subscription_id: String, @@ -391,15 +1383,43 @@ module Orb end def update_fixed_fee_quantity( subscription_id, + # Price for which the quantity should be updated. Must be a fixed fee. price_id:, quantity:, + # If false, this request will fail if it would void an issued invoice or create a + # credit note. Consider using this as a safety mechanism if you do not expect + # existing invoices to be changed. allow_invoice_credit_or_void: nil, + # Determines when the change takes effect. Note that if `effective_date` is + # specified, this defaults to `effective_date`. Otherwise, this defaults to + # `immediate` unless it's explicitly set to `upcoming_invoice`. change_option: nil, + # The date that the quantity change should take effect, localized to the + # customer's timezone. Ifthis parameter is not passed in, the quantity change is + # effective according to `change_option`. effective_date: nil, request_options: {} ) end + # This endpoint is used to update the trial end date for a subscription. The new + # trial end date must be within the time range of the current plan (i.e. the new + # trial end date must be on or after the subscription's start date on the current + # plan, and on or before the subscription end date). + # + # In order to retroactively remove a trial completely, the end date can be set to + # the transition date of the subscription to this plan (or, if this is the first + # plan for this subscription, the subscription's start date). In order to end a + # trial immediately, the keyword `immediate` can be provided as the trial end + # date. + # + # By default, Orb will shift only the trial end date (and price intervals that + # start or end on the previous trial end date), and leave all other future price + # intervals untouched. If the `shift` parameter is set to `true`, Orb will shift + # all subsequent price and adjustment intervals by the same amount as the trial + # end date shift (so, e.g., if a plan change is scheduled or an add-on price was + # added, that change will be pushed back by the same amount of time the trial is + # extended). sig do params( subscription_id: String, @@ -409,7 +1429,16 @@ module Orb ) .returns(Orb::Models::SubscriptionUpdateTrialResponse) end - def update_trial(subscription_id, trial_end_date:, shift: nil, request_options: {}) + def update_trial( + subscription_id, + # The new date that the trial should end, or the literal string `immediate` to end + # the trial immediately. + trial_end_date:, + # If true, shifts subsequent price and adjustment intervals (preserving their + # durations, but adjusting their absolute dates). + shift: nil, + request_options: {} + ) end sig { params(client: Orb::Client).returns(T.attached_class) } diff --git a/rbi/lib/orb/resources/top_level.rbi b/rbi/lib/orb/resources/top_level.rbi index b4afe5fb..87cb277d 100644 --- a/rbi/lib/orb/resources/top_level.rbi +++ b/rbi/lib/orb/resources/top_level.rbi @@ -3,6 +3,12 @@ module Orb module Resources class TopLevel + # This endpoint allows you to test your connection to the Orb API and check the + # validity of your API key, passed in the Authorization header. This is + # particularly useful for checking that your environment is set up properly, and + # is a great choice for connectors and integrations. + # + # This API does not have any side-effects or return any Orb resources. sig do params(request_options: T.nilable(T.any(Orb::RequestOptions, T::Hash[Symbol, T.anything]))) .returns(Orb::Models::TopLevelPingResponse) diff --git a/rbi/lib/orb/util.rbi b/rbi/lib/orb/util.rbi index 0df052a2..5a13bc7b 100644 --- a/rbi/lib/orb/util.rbi +++ b/rbi/lib/orb/util.rbi @@ -1,42 +1,52 @@ # typed: strong module Orb + # @api private module Util + # @api private sig { returns(Float) } def self.monotonic_secs end class << self + # @api private sig { returns(String) } def arch end + # @api private sig { returns(String) } def os end end class << self + # @api private sig { params(input: T.anything).returns(T.any(T::Boolean, T.anything)) } def primitive?(input) end + # @api private sig { params(input: T.anything).returns(T.any(T::Boolean, T.anything)) } def coerce_boolean(input) end + # @api private sig { params(input: T.anything).returns(T.nilable(T::Boolean)) } def coerce_boolean!(input) end + # @api private sig { params(input: T.anything).returns(T.any(Integer, T.anything)) } def coerce_integer(input) end + # @api private sig { params(input: T.anything).returns(T.any(Float, T.anything)) } def coerce_float(input) end + # @api private sig { params(input: T.anything).returns(T.any(T::Hash[T.anything, T.anything], T.anything)) } def coerce_hash(input) end @@ -45,17 +55,29 @@ module Orb OMIT = T.let(T.anything, T.anything) class << self + # @api private sig { params(lhs: T.anything, rhs: T.anything, concat: T::Boolean).returns(T.anything) } private def deep_merge_lr(lhs, rhs, concat: false) end + # @api private + # + # Recursively merge one hash with another. If the values at a given key are not + # both hashes, just take the new value. sig do params(values: T::Array[T.anything], sentinel: T.nilable(T.anything), concat: T::Boolean) .returns(T.anything) end - def deep_merge(*values, sentinel: nil, concat: false) + def deep_merge( + *values, + # the value to return if no values are provided. + sentinel: nil, + # whether to merge sequences by concatenation. + concat: false + ) end + # @api private sig do params( data: T.any(T::Hash[Symbol, T.anything], T::Array[T.anything], T.anything), @@ -70,20 +92,24 @@ module Orb end class << self + # @api private sig { params(uri: URI::Generic).returns(String) } def uri_origin(uri) end + # @api private sig { params(path: T.any(String, T::Array[String])).returns(String) } def interpolate_path(path) end end class << self + # @api private sig { params(query: T.nilable(String)).returns(T::Hash[String, T::Array[String]]) } def decode_query(query) end + # @api private sig do params(query: T.nilable(T::Hash[String, T.nilable(T.any(T::Array[String], String))])) .returns(T.nilable(String)) @@ -103,20 +129,24 @@ module Orb end class << self + # @api private sig { params(url: T.any(URI::Generic, String)).returns(Orb::Util::ParsedUriShape) } def parse_uri(url) end + # @api private sig { params(parsed: Orb::Util::ParsedUriShape).returns(URI::Generic) } def unparse_uri(parsed) end + # @api private sig { params(lhs: Orb::Util::ParsedUriShape, rhs: Orb::Util::ParsedUriShape).returns(URI::Generic) } def join_parsed_uri(lhs, rhs) end end class << self + # @api private sig do params( headers: T::Hash[String, @@ -128,15 +158,19 @@ module Orb end end + # An adapter that satisfies the IO interface required by `::IO.copy_stream` class ReadIOAdapter + # @api private sig { params(max_len: T.nilable(Integer)).returns(String) } private def read_enum(max_len) end + # @api private sig { params(max_len: T.nilable(Integer), out_string: T.nilable(String)).returns(T.nilable(String)) } def read(max_len = nil, out_string = nil) end + # @api private sig do params( stream: T.any(String, IO, StringIO, T::Enumerable[String]), @@ -155,20 +189,24 @@ module Orb end class << self + # @api private sig do params(y: Enumerator::Yielder, boundary: String, key: T.any(Symbol, String), val: T.anything).void end private def encode_multipart_formdata(y, boundary:, key:, val:) end + # @api private sig { params(body: T.anything).returns([String, T::Enumerable[String]]) } private def encode_multipart_streaming(body) end + # @api private sig { params(headers: T::Hash[String, String], body: T.anything).returns(T.anything) } def encode_content(headers, body) end + # @api private sig do params( headers: T.any(T::Hash[String, String], Net::HTTPHeader), @@ -182,6 +220,9 @@ module Orb end class << self + # @api private + # + # https://doc.rust-lang.org/std/iter/trait.FusedIterator.html sig do params(enum: T::Enumerable[T.anything], external: T::Boolean, close: T.proc.void) .returns(T::Enumerable[T.anything]) @@ -189,10 +230,12 @@ module Orb def fused_enum(enum, external: false, &close) end + # @api private sig { params(enum: T.nilable(T::Enumerable[T.anything])).void } def close_fused!(enum) end + # @api private sig do params( enum: T.nilable(T::Enumerable[T.anything]), @@ -203,16 +246,20 @@ module Orb end end - SSEMessage = T.type_alias do + ServerSentEvent = T.type_alias do {event: T.nilable(String), data: T.nilable(String), id: T.nilable(String), retry: T.nilable(Integer)} end class << self + # @api private sig { params(enum: T::Enumerable[String]).returns(T::Enumerable[String]) } def decode_lines(enum) end - sig { params(lines: T::Enumerable[String]).returns(Orb::Util::SSEMessage) } + # @api private + # + # https://html.spec.whatwg.org/multipage/server-sent-events.html#parsing-an-event-stream + sig { params(lines: T::Enumerable[String]).returns(Orb::Util::ServerSentEvent) } def decode_sse(lines) end end diff --git a/rbi/lib/orb/version.rbi b/rbi/lib/orb/version.rbi index 837ee9a7..faacb726 100644 --- a/rbi/lib/orb/version.rbi +++ b/rbi/lib/orb/version.rbi @@ -1,5 +1,5 @@ # typed: strong module Orb - VERSION = "0.1.0-alpha.26" + VERSION = "0.1.0-alpha.27" end diff --git a/sig/orb/base_client.rbs b/sig/orb/base_client.rbs index 4937a7ca..73441aa1 100644 --- a/sig/orb/base_client.rbs +++ b/sig/orb/base_client.rbs @@ -43,7 +43,7 @@ module Orb response_headers: ::Hash[String, String] ) -> Orb::BaseClient::request_input - # @private + # @api private attr_accessor requester: top def initialize: ( diff --git a/sig/orb/base_model.rbs b/sig/orb/base_model.rbs index fc4ec41b..20b9f3f0 100644 --- a/sig/orb/base_model.rbs +++ b/sig/orb/base_model.rbs @@ -84,7 +84,9 @@ module Orb private def self.known_variants: -> ::Array[[Symbol?, Proc]] - def self.variants: -> ::Array[[Symbol?, top]] + def self.derefed_variants: -> ::Array[[Symbol?, top]] + + def self.variants: -> ::Array[top] private def self.discriminator: (Symbol property) -> void diff --git a/sig/orb/errors.rbs b/sig/orb/errors.rbs index 694ff79d..74fa9d68 100644 --- a/sig/orb/errors.rbs +++ b/sig/orb/errors.rbs @@ -1,17 +1,17 @@ module Orb class Error < StandardError - attr_reader cause: StandardError? + attr_accessor cause: StandardError? end class ConversionError < Orb::Error end class APIError < Orb::Error - attr_reader url: URI::Generic + attr_accessor url: URI::Generic - attr_reader status: Integer? + attr_accessor status: Integer? - attr_reader body: top? + attr_accessor body: top? def initialize: ( url: URI::Generic, diff --git a/sig/orb/models/coupon.rbs b/sig/orb/models/coupon.rbs index ef0f3a6b..e58785e8 100644 --- a/sig/orb/models/coupon.rbs +++ b/sig/orb/models/coupon.rbs @@ -44,7 +44,7 @@ module Orb Orb::Models::PercentageDiscount | Orb::Models::AmountDiscount class Discount < Orb::Union - private def self.variants: -> [[:percentage, Orb::Models::PercentageDiscount], [:amount, Orb::Models::AmountDiscount]] + def self.variants: -> [Orb::Models::PercentageDiscount, Orb::Models::AmountDiscount] end end end diff --git a/sig/orb/models/coupon_create_params.rbs b/sig/orb/models/coupon_create_params.rbs index 1c2ec3b8..edf8c7f3 100644 --- a/sig/orb/models/coupon_create_params.rbs +++ b/sig/orb/models/coupon_create_params.rbs @@ -74,7 +74,7 @@ module Orb def to_hash: -> Orb::Models::CouponCreateParams::Discount::new_coupon_amount_discount end - private def self.variants: -> [[:percentage, Orb::Models::CouponCreateParams::Discount::NewCouponPercentageDiscount], [:amount, Orb::Models::CouponCreateParams::Discount::NewCouponAmountDiscount]] + def self.variants: -> [Orb::Models::CouponCreateParams::Discount::NewCouponPercentageDiscount, Orb::Models::CouponCreateParams::Discount::NewCouponAmountDiscount] end end end diff --git a/sig/orb/models/credit_note_list_params.rbs b/sig/orb/models/credit_note_list_params.rbs index 225a2b67..98d07a01 100644 --- a/sig/orb/models/credit_note_list_params.rbs +++ b/sig/orb/models/credit_note_list_params.rbs @@ -1,12 +1,28 @@ module Orb module Models type credit_note_list_params = - { cursor: String?, limit: Integer } & Orb::request_parameters + { + created_at_gt: Time?, + created_at_gte: Time?, + created_at_lt: Time?, + created_at_lte: Time?, + cursor: String?, + limit: Integer + } + & Orb::request_parameters class CreditNoteListParams < Orb::BaseModel extend Orb::RequestParameters::Converter include Orb::RequestParameters + attr_accessor created_at_gt: Time? + + attr_accessor created_at_gte: Time? + + attr_accessor created_at_lt: Time? + + attr_accessor created_at_lte: Time? + attr_accessor cursor: String? attr_reader limit: Integer? @@ -15,6 +31,10 @@ module Orb def initialize: ( + created_at_gt: Time?, + created_at_gte: Time?, + created_at_lt: Time?, + created_at_lte: Time?, cursor: String?, limit: Integer, request_options: Orb::request_opts diff --git a/sig/orb/models/customer_create_params.rbs b/sig/orb/models/customer_create_params.rbs index d31cec12..b4d1c831 100644 --- a/sig/orb/models/customer_create_params.rbs +++ b/sig/orb/models/customer_create_params.rbs @@ -312,7 +312,7 @@ module Orb def to_hash: -> Orb::Models::CustomerCreateParams::TaxConfiguration::new_tax_jar_configuration end - private def self.variants: -> [[:avalara, Orb::Models::CustomerCreateParams::TaxConfiguration::NewAvalaraTaxConfiguration], [:taxjar, Orb::Models::CustomerCreateParams::TaxConfiguration::NewTaxJarConfiguration]] + def self.variants: -> [Orb::Models::CustomerCreateParams::TaxConfiguration::NewAvalaraTaxConfiguration, Orb::Models::CustomerCreateParams::TaxConfiguration::NewTaxJarConfiguration] end type tax_id = diff --git a/sig/orb/models/customer_update_by_external_id_params.rbs b/sig/orb/models/customer_update_by_external_id_params.rbs index e3e9b2ca..bea0dca1 100644 --- a/sig/orb/models/customer_update_by_external_id_params.rbs +++ b/sig/orb/models/customer_update_by_external_id_params.rbs @@ -312,7 +312,7 @@ module Orb def to_hash: -> Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::new_tax_jar_configuration end - private def self.variants: -> [[:avalara, Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::NewAvalaraTaxConfiguration], [:taxjar, Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::NewTaxJarConfiguration]] + def self.variants: -> [Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::NewAvalaraTaxConfiguration, Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::NewTaxJarConfiguration] end type tax_id = diff --git a/sig/orb/models/customer_update_params.rbs b/sig/orb/models/customer_update_params.rbs index 7f7b92d5..b8171c03 100644 --- a/sig/orb/models/customer_update_params.rbs +++ b/sig/orb/models/customer_update_params.rbs @@ -308,7 +308,7 @@ module Orb def to_hash: -> Orb::Models::CustomerUpdateParams::TaxConfiguration::new_tax_jar_configuration end - private def self.variants: -> [[:avalara, Orb::Models::CustomerUpdateParams::TaxConfiguration::NewAvalaraTaxConfiguration], [:taxjar, Orb::Models::CustomerUpdateParams::TaxConfiguration::NewTaxJarConfiguration]] + def self.variants: -> [Orb::Models::CustomerUpdateParams::TaxConfiguration::NewAvalaraTaxConfiguration, Orb::Models::CustomerUpdateParams::TaxConfiguration::NewTaxJarConfiguration] end type tax_id = diff --git a/sig/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbs b/sig/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbs index 607e9452..cef04598 100644 --- a/sig/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbs +++ b/sig/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbs @@ -874,7 +874,7 @@ module Orb end end - private def self.variants: -> [[:increment, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::IncrementLedgerEntry], [:decrement, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::DecrementLedgerEntry], [:expiration_change, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::ExpirationChangeLedgerEntry], [:credit_block_expiry, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::CreditBlockExpiryLedgerEntry], [:void, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidLedgerEntry], [:void_initiated, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidInitiatedLedgerEntry], [:amendment, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::AmendmentLedgerEntry]] + def self.variants: -> [Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::IncrementLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::DecrementLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::ExpirationChangeLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::CreditBlockExpiryLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::VoidInitiatedLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse::AmendmentLedgerEntry] end end end diff --git a/sig/orb/models/customers/credits/ledger_create_entry_response.rbs b/sig/orb/models/customers/credits/ledger_create_entry_response.rbs index fb91936f..90849348 100644 --- a/sig/orb/models/customers/credits/ledger_create_entry_response.rbs +++ b/sig/orb/models/customers/credits/ledger_create_entry_response.rbs @@ -874,7 +874,7 @@ module Orb end end - private def self.variants: -> [[:increment, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::IncrementLedgerEntry], [:decrement, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::DecrementLedgerEntry], [:expiration_change, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::ExpirationChangeLedgerEntry], [:credit_block_expiry, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::CreditBlockExpiryLedgerEntry], [:void, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidLedgerEntry], [:void_initiated, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidInitiatedLedgerEntry], [:amendment, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::AmendmentLedgerEntry]] + def self.variants: -> [Orb::Models::Customers::Credits::LedgerCreateEntryResponse::IncrementLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::DecrementLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::ExpirationChangeLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::CreditBlockExpiryLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::VoidInitiatedLedgerEntry, Orb::Models::Customers::Credits::LedgerCreateEntryResponse::AmendmentLedgerEntry] end end end diff --git a/sig/orb/models/customers/credits/ledger_list_by_external_id_response.rbs b/sig/orb/models/customers/credits/ledger_list_by_external_id_response.rbs index 26b23612..9e1ae3d8 100644 --- a/sig/orb/models/customers/credits/ledger_list_by_external_id_response.rbs +++ b/sig/orb/models/customers/credits/ledger_list_by_external_id_response.rbs @@ -874,7 +874,7 @@ module Orb end end - private def self.variants: -> [[:increment, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::IncrementLedgerEntry], [:decrement, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::DecrementLedgerEntry], [:expiration_change, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::ExpirationChangeLedgerEntry], [:credit_block_expiry, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::CreditBlockExpiryLedgerEntry], [:void, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidLedgerEntry], [:void_initiated, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidInitiatedLedgerEntry], [:amendment, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::AmendmentLedgerEntry]] + def self.variants: -> [Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::IncrementLedgerEntry, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::DecrementLedgerEntry, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::ExpirationChangeLedgerEntry, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::CreditBlockExpiryLedgerEntry, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidLedgerEntry, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::VoidInitiatedLedgerEntry, Orb::Models::Customers::Credits::LedgerListByExternalIDResponse::AmendmentLedgerEntry] end end end diff --git a/sig/orb/models/customers/credits/ledger_list_response.rbs b/sig/orb/models/customers/credits/ledger_list_response.rbs index 0d139062..322bf5f2 100644 --- a/sig/orb/models/customers/credits/ledger_list_response.rbs +++ b/sig/orb/models/customers/credits/ledger_list_response.rbs @@ -874,7 +874,7 @@ module Orb end end - private def self.variants: -> [[:increment, Orb::Models::Customers::Credits::LedgerListResponse::IncrementLedgerEntry], [:decrement, Orb::Models::Customers::Credits::LedgerListResponse::DecrementLedgerEntry], [:expiration_change, Orb::Models::Customers::Credits::LedgerListResponse::ExpirationChangeLedgerEntry], [:credit_block_expiry, Orb::Models::Customers::Credits::LedgerListResponse::CreditBlockExpiryLedgerEntry], [:void, Orb::Models::Customers::Credits::LedgerListResponse::VoidLedgerEntry], [:void_initiated, Orb::Models::Customers::Credits::LedgerListResponse::VoidInitiatedLedgerEntry], [:amendment, Orb::Models::Customers::Credits::LedgerListResponse::AmendmentLedgerEntry]] + def self.variants: -> [Orb::Models::Customers::Credits::LedgerListResponse::IncrementLedgerEntry, Orb::Models::Customers::Credits::LedgerListResponse::DecrementLedgerEntry, Orb::Models::Customers::Credits::LedgerListResponse::ExpirationChangeLedgerEntry, Orb::Models::Customers::Credits::LedgerListResponse::CreditBlockExpiryLedgerEntry, Orb::Models::Customers::Credits::LedgerListResponse::VoidLedgerEntry, Orb::Models::Customers::Credits::LedgerListResponse::VoidInitiatedLedgerEntry, Orb::Models::Customers::Credits::LedgerListResponse::AmendmentLedgerEntry] end end end diff --git a/sig/orb/models/discount.rbs b/sig/orb/models/discount.rbs index 6f3f53f7..0a4c8eb5 100644 --- a/sig/orb/models/discount.rbs +++ b/sig/orb/models/discount.rbs @@ -7,7 +7,7 @@ module Orb | Orb::Models::AmountDiscount class Discount < Orb::Union - private def self.variants: -> [[:percentage, Orb::Models::PercentageDiscount], [:trial, Orb::Models::TrialDiscount], [:usage, Orb::Models::UsageDiscount], [:amount, Orb::Models::AmountDiscount]] + def self.variants: -> [Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::UsageDiscount, Orb::Models::AmountDiscount] end end end diff --git a/sig/orb/models/evaluate_price_group.rbs b/sig/orb/models/evaluate_price_group.rbs index 864a8d22..65015d88 100644 --- a/sig/orb/models/evaluate_price_group.rbs +++ b/sig/orb/models/evaluate_price_group.rbs @@ -27,7 +27,7 @@ module Orb type grouping_value = String | Float | bool class GroupingValue < Orb::Union - private def self.variants: -> [[nil, String], [nil, Float], [nil, bool]] + def self.variants: -> [String, Float, bool] end end end diff --git a/sig/orb/models/invoice.rbs b/sig/orb/models/invoice.rbs index 3cff062c..25edd9b8 100644 --- a/sig/orb/models/invoice.rbs +++ b/sig/orb/models/invoice.rbs @@ -1102,7 +1102,7 @@ module Orb def to_hash: -> Orb::Models::Invoice::LineItem::Adjustment::monetary_maximum_adjustment end - private def self.variants: -> [[:usage_discount, Orb::Models::Invoice::LineItem::Adjustment::MonetaryUsageDiscountAdjustment], [:amount_discount, Orb::Models::Invoice::LineItem::Adjustment::MonetaryAmountDiscountAdjustment], [:percentage_discount, Orb::Models::Invoice::LineItem::Adjustment::MonetaryPercentageDiscountAdjustment], [:minimum, Orb::Models::Invoice::LineItem::Adjustment::MonetaryMinimumAdjustment], [:maximum, Orb::Models::Invoice::LineItem::Adjustment::MonetaryMaximumAdjustment]] + def self.variants: -> [Orb::Models::Invoice::LineItem::Adjustment::MonetaryUsageDiscountAdjustment, Orb::Models::Invoice::LineItem::Adjustment::MonetaryAmountDiscountAdjustment, Orb::Models::Invoice::LineItem::Adjustment::MonetaryPercentageDiscountAdjustment, Orb::Models::Invoice::LineItem::Adjustment::MonetaryMinimumAdjustment, Orb::Models::Invoice::LineItem::Adjustment::MonetaryMaximumAdjustment] end type maximum = @@ -1357,7 +1357,7 @@ module Orb end end - private def self.variants: -> [[:matrix, Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem], [:tier, Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem], [:"'null'", Orb::Models::Invoice::LineItem::SubLineItem::OtherSubLineItem]] + def self.variants: -> [Orb::Models::Invoice::LineItem::SubLineItem::MatrixSubLineItem, Orb::Models::Invoice::LineItem::SubLineItem::TierSubLineItem, Orb::Models::Invoice::LineItem::SubLineItem::OtherSubLineItem] end type tax_amount = diff --git a/sig/orb/models/invoice_fetch_upcoming_response.rbs b/sig/orb/models/invoice_fetch_upcoming_response.rbs index 83cf8f58..65e45ad6 100644 --- a/sig/orb/models/invoice_fetch_upcoming_response.rbs +++ b/sig/orb/models/invoice_fetch_upcoming_response.rbs @@ -1116,7 +1116,7 @@ module Orb def to_hash: -> Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::monetary_maximum_adjustment end - private def self.variants: -> [[:usage_discount, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryUsageDiscountAdjustment], [:amount_discount, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryAmountDiscountAdjustment], [:percentage_discount, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryPercentageDiscountAdjustment], [:minimum, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryMinimumAdjustment], [:maximum, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryMaximumAdjustment]] + def self.variants: -> [Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryUsageDiscountAdjustment, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryAmountDiscountAdjustment, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryPercentageDiscountAdjustment, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryMinimumAdjustment, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::MonetaryMaximumAdjustment] end type maximum = @@ -1373,7 +1373,7 @@ module Orb end end - private def self.variants: -> [[:matrix, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::MatrixSubLineItem], [:tier, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::TierSubLineItem], [:"'null'", Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::OtherSubLineItem]] + def self.variants: -> [Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::MatrixSubLineItem, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::TierSubLineItem, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::SubLineItem::OtherSubLineItem] end type tax_amount = diff --git a/sig/orb/models/invoice_level_discount.rbs b/sig/orb/models/invoice_level_discount.rbs index 961515c7..46d961c1 100644 --- a/sig/orb/models/invoice_level_discount.rbs +++ b/sig/orb/models/invoice_level_discount.rbs @@ -6,7 +6,7 @@ module Orb | Orb::Models::TrialDiscount class InvoiceLevelDiscount < Orb::Union - private def self.variants: -> [[:percentage, Orb::Models::PercentageDiscount], [:amount, Orb::Models::AmountDiscount], [:trial, Orb::Models::TrialDiscount]] + def self.variants: -> [Orb::Models::PercentageDiscount, Orb::Models::AmountDiscount, Orb::Models::TrialDiscount] end end end diff --git a/sig/orb/models/invoice_line_item_create_response.rbs b/sig/orb/models/invoice_line_item_create_response.rbs index 1b29914c..a0b847b8 100644 --- a/sig/orb/models/invoice_line_item_create_response.rbs +++ b/sig/orb/models/invoice_line_item_create_response.rbs @@ -334,7 +334,7 @@ module Orb def to_hash: -> Orb::Models::InvoiceLineItemCreateResponse::Adjustment::monetary_maximum_adjustment end - private def self.variants: -> [[:usage_discount, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryUsageDiscountAdjustment], [:amount_discount, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryAmountDiscountAdjustment], [:percentage_discount, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryPercentageDiscountAdjustment], [:minimum, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryMinimumAdjustment], [:maximum, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryMaximumAdjustment]] + def self.variants: -> [Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryUsageDiscountAdjustment, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryAmountDiscountAdjustment, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryPercentageDiscountAdjustment, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryMinimumAdjustment, Orb::Models::InvoiceLineItemCreateResponse::Adjustment::MonetaryMaximumAdjustment] end type maximum = @@ -591,7 +591,7 @@ module Orb end end - private def self.variants: -> [[:matrix, Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::MatrixSubLineItem], [:tier, Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::TierSubLineItem], [:"'null'", Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::OtherSubLineItem]] + def self.variants: -> [Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::MatrixSubLineItem, Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::TierSubLineItem, Orb::Models::InvoiceLineItemCreateResponse::SubLineItem::OtherSubLineItem] end type tax_amount = diff --git a/sig/orb/models/plan.rbs b/sig/orb/models/plan.rbs index c624a14c..2363fb14 100644 --- a/sig/orb/models/plan.rbs +++ b/sig/orb/models/plan.rbs @@ -340,7 +340,7 @@ module Orb def to_hash: -> Orb::Models::Plan::Adjustment::plan_phase_maximum_adjustment end - private def self.variants: -> [[:usage_discount, Orb::Models::Plan::Adjustment::PlanPhaseUsageDiscountAdjustment], [:amount_discount, Orb::Models::Plan::Adjustment::PlanPhaseAmountDiscountAdjustment], [:percentage_discount, Orb::Models::Plan::Adjustment::PlanPhasePercentageDiscountAdjustment], [:minimum, Orb::Models::Plan::Adjustment::PlanPhaseMinimumAdjustment], [:maximum, Orb::Models::Plan::Adjustment::PlanPhaseMaximumAdjustment]] + def self.variants: -> [Orb::Models::Plan::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::Plan::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::Plan::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::Plan::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::Plan::Adjustment::PlanPhaseMaximumAdjustment] end type base_plan = { id: String?, external_plan_id: String?, name: String? } diff --git a/sig/orb/models/plan_create_params.rbs b/sig/orb/models/plan_create_params.rbs index 1ff7e5e7..05220558 100644 --- a/sig/orb/models/plan_create_params.rbs +++ b/sig/orb/models/plan_create_params.rbs @@ -4257,7 +4257,7 @@ module Orb end end - private def self.variants: -> [[:unit, Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice], [:package, Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice], [:matrix, Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice], [:tiered, Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice], [:tiered_bps, Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice], [:bps, Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice], [:bulk_bps, Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice], [:bulk, Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice], [:threshold_total_amount, Orb::Models::PlanCreateParams::Price::NewPlanThresholdTotalAmountPrice], [:tiered_package, Orb::Models::PlanCreateParams::Price::NewPlanTieredPackagePrice], [:tiered_with_minimum, Orb::Models::PlanCreateParams::Price::NewPlanTieredWithMinimumPrice], [:unit_with_percent, Orb::Models::PlanCreateParams::Price::NewPlanUnitWithPercentPrice], [:package_with_allocation, Orb::Models::PlanCreateParams::Price::NewPlanPackageWithAllocationPrice], [:tiered_with_proration, Orb::Models::PlanCreateParams::Price::NewPlanTierWithProrationPrice], [:unit_with_proration, Orb::Models::PlanCreateParams::Price::NewPlanUnitWithProrationPrice], [:grouped_allocation, Orb::Models::PlanCreateParams::Price::NewPlanGroupedAllocationPrice], [:grouped_with_prorated_minimum, Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithProratedMinimumPrice], [:grouped_with_metered_minimum, Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithMeteredMinimumPrice], [:matrix_with_display_name, Orb::Models::PlanCreateParams::Price::NewPlanMatrixWithDisplayNamePrice], [:bulk_with_proration, Orb::Models::PlanCreateParams::Price::NewPlanBulkWithProrationPrice], [:grouped_tiered_package, Orb::Models::PlanCreateParams::Price::NewPlanGroupedTieredPackagePrice], [:max_group_tiered_package, Orb::Models::PlanCreateParams::Price::NewPlanMaxGroupTieredPackagePrice], [:scalable_matrix_with_unit_pricing, Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithUnitPricingPrice], [:scalable_matrix_with_tiered_pricing, Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithTieredPricingPrice], [:cumulative_grouped_bulk, Orb::Models::PlanCreateParams::Price::NewPlanCumulativeGroupedBulkPrice]] + def self.variants: -> [Orb::Models::PlanCreateParams::Price::NewPlanUnitPrice, Orb::Models::PlanCreateParams::Price::NewPlanPackagePrice, Orb::Models::PlanCreateParams::Price::NewPlanMatrixPrice, Orb::Models::PlanCreateParams::Price::NewPlanTieredPrice, Orb::Models::PlanCreateParams::Price::NewPlanTieredBpsPrice, Orb::Models::PlanCreateParams::Price::NewPlanBpsPrice, Orb::Models::PlanCreateParams::Price::NewPlanBulkBpsPrice, Orb::Models::PlanCreateParams::Price::NewPlanBulkPrice, Orb::Models::PlanCreateParams::Price::NewPlanThresholdTotalAmountPrice, Orb::Models::PlanCreateParams::Price::NewPlanTieredPackagePrice, Orb::Models::PlanCreateParams::Price::NewPlanTieredWithMinimumPrice, Orb::Models::PlanCreateParams::Price::NewPlanUnitWithPercentPrice, Orb::Models::PlanCreateParams::Price::NewPlanPackageWithAllocationPrice, Orb::Models::PlanCreateParams::Price::NewPlanTierWithProrationPrice, Orb::Models::PlanCreateParams::Price::NewPlanUnitWithProrationPrice, Orb::Models::PlanCreateParams::Price::NewPlanGroupedAllocationPrice, Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithProratedMinimumPrice, Orb::Models::PlanCreateParams::Price::NewPlanGroupedWithMeteredMinimumPrice, Orb::Models::PlanCreateParams::Price::NewPlanMatrixWithDisplayNamePrice, Orb::Models::PlanCreateParams::Price::NewPlanBulkWithProrationPrice, Orb::Models::PlanCreateParams::Price::NewPlanGroupedTieredPackagePrice, Orb::Models::PlanCreateParams::Price::NewPlanMaxGroupTieredPackagePrice, Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithUnitPricingPrice, Orb::Models::PlanCreateParams::Price::NewPlanScalableMatrixWithTieredPricingPrice, Orb::Models::PlanCreateParams::Price::NewPlanCumulativeGroupedBulkPrice] end type status = :active | :draft diff --git a/sig/orb/models/price.rbs b/sig/orb/models/price.rbs index c8c6c710..5e3ff29c 100644 --- a/sig/orb/models/price.rbs +++ b/sig/orb/models/price.rbs @@ -9143,7 +9143,7 @@ module Orb end end - private def self.variants: -> [[:unit, Orb::Models::Price::UnitPrice], [:package, Orb::Models::Price::PackagePrice], [:matrix, Orb::Models::Price::MatrixPrice], [:tiered, Orb::Models::Price::TieredPrice], [:tiered_bps, Orb::Models::Price::TieredBpsPrice], [:bps, Orb::Models::Price::BpsPrice], [:bulk_bps, Orb::Models::Price::BulkBpsPrice], [:bulk, Orb::Models::Price::BulkPrice], [:threshold_total_amount, Orb::Models::Price::ThresholdTotalAmountPrice], [:tiered_package, Orb::Models::Price::TieredPackagePrice], [:grouped_tiered, Orb::Models::Price::GroupedTieredPrice], [:tiered_with_minimum, Orb::Models::Price::TieredWithMinimumPrice], [:tiered_package_with_minimum, Orb::Models::Price::TieredPackageWithMinimumPrice], [:package_with_allocation, Orb::Models::Price::PackageWithAllocationPrice], [:unit_with_percent, Orb::Models::Price::UnitWithPercentPrice], [:matrix_with_allocation, Orb::Models::Price::MatrixWithAllocationPrice], [:tiered_with_proration, Orb::Models::Price::TieredWithProrationPrice], [:unit_with_proration, Orb::Models::Price::UnitWithProrationPrice], [:grouped_allocation, Orb::Models::Price::GroupedAllocationPrice], [:grouped_with_prorated_minimum, Orb::Models::Price::GroupedWithProratedMinimumPrice], [:grouped_with_metered_minimum, Orb::Models::Price::GroupedWithMeteredMinimumPrice], [:matrix_with_display_name, Orb::Models::Price::MatrixWithDisplayNamePrice], [:bulk_with_proration, Orb::Models::Price::BulkWithProrationPrice], [:grouped_tiered_package, Orb::Models::Price::GroupedTieredPackagePrice], [:max_group_tiered_package, Orb::Models::Price::MaxGroupTieredPackagePrice], [:scalable_matrix_with_unit_pricing, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice], [:scalable_matrix_with_tiered_pricing, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice], [:cumulative_grouped_bulk, Orb::Models::Price::CumulativeGroupedBulkPrice]] + def self.variants: -> [Orb::Models::Price::UnitPrice, Orb::Models::Price::PackagePrice, Orb::Models::Price::MatrixPrice, Orb::Models::Price::TieredPrice, Orb::Models::Price::TieredBpsPrice, Orb::Models::Price::BpsPrice, Orb::Models::Price::BulkBpsPrice, Orb::Models::Price::BulkPrice, Orb::Models::Price::ThresholdTotalAmountPrice, Orb::Models::Price::TieredPackagePrice, Orb::Models::Price::GroupedTieredPrice, Orb::Models::Price::TieredWithMinimumPrice, Orb::Models::Price::TieredPackageWithMinimumPrice, Orb::Models::Price::PackageWithAllocationPrice, Orb::Models::Price::UnitWithPercentPrice, Orb::Models::Price::MatrixWithAllocationPrice, Orb::Models::Price::TieredWithProrationPrice, Orb::Models::Price::UnitWithProrationPrice, Orb::Models::Price::GroupedAllocationPrice, Orb::Models::Price::GroupedWithProratedMinimumPrice, Orb::Models::Price::GroupedWithMeteredMinimumPrice, Orb::Models::Price::MatrixWithDisplayNamePrice, Orb::Models::Price::BulkWithProrationPrice, Orb::Models::Price::GroupedTieredPackagePrice, Orb::Models::Price::MaxGroupTieredPackagePrice, Orb::Models::Price::ScalableMatrixWithUnitPricingPrice, Orb::Models::Price::ScalableMatrixWithTieredPricingPrice, Orb::Models::Price::CumulativeGroupedBulkPrice] end end end diff --git a/sig/orb/models/subscription.rbs b/sig/orb/models/subscription.rbs index 3dc3b3a4..12725b41 100644 --- a/sig/orb/models/subscription.rbs +++ b/sig/orb/models/subscription.rbs @@ -379,7 +379,7 @@ module Orb def to_hash: -> Orb::Models::Subscription::AdjustmentInterval::Adjustment::plan_phase_maximum_adjustment end - private def self.variants: -> [[:usage_discount, Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment], [:amount_discount, Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment], [:percentage_discount, Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment], [:minimum, Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment], [:maximum, Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment]] + def self.variants: -> [Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::Subscription::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment] end end @@ -529,7 +529,7 @@ module Orb def to_hash: -> Orb::Models::Subscription::DiscountInterval::usage_discount_interval end - private def self.variants: -> [[:amount, Orb::Models::Subscription::DiscountInterval::AmountDiscountInterval], [:percentage, Orb::Models::Subscription::DiscountInterval::PercentageDiscountInterval], [:usage, Orb::Models::Subscription::DiscountInterval::UsageDiscountInterval]] + def self.variants: -> [Orb::Models::Subscription::DiscountInterval::AmountDiscountInterval, Orb::Models::Subscription::DiscountInterval::PercentageDiscountInterval, Orb::Models::Subscription::DiscountInterval::UsageDiscountInterval] end type fixed_fee_quantity_schedule = diff --git a/sig/orb/models/subscription_cancel_response.rbs b/sig/orb/models/subscription_cancel_response.rbs index df27e807..4d79f665 100644 --- a/sig/orb/models/subscription_cancel_response.rbs +++ b/sig/orb/models/subscription_cancel_response.rbs @@ -381,7 +381,7 @@ module Orb def to_hash: -> Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::plan_phase_maximum_adjustment end - private def self.variants: -> [[:usage_discount, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment], [:amount_discount, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment], [:percentage_discount, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment], [:minimum, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment], [:maximum, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment]] + def self.variants: -> [Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment] end end @@ -531,7 +531,7 @@ module Orb def to_hash: -> Orb::Models::SubscriptionCancelResponse::DiscountInterval::usage_discount_interval end - private def self.variants: -> [[:amount, Orb::Models::SubscriptionCancelResponse::DiscountInterval::AmountDiscountInterval], [:percentage, Orb::Models::SubscriptionCancelResponse::DiscountInterval::PercentageDiscountInterval], [:usage, Orb::Models::SubscriptionCancelResponse::DiscountInterval::UsageDiscountInterval]] + def self.variants: -> [Orb::Models::SubscriptionCancelResponse::DiscountInterval::AmountDiscountInterval, Orb::Models::SubscriptionCancelResponse::DiscountInterval::PercentageDiscountInterval, Orb::Models::SubscriptionCancelResponse::DiscountInterval::UsageDiscountInterval] end type fixed_fee_quantity_schedule = diff --git a/sig/orb/models/subscription_create_params.rbs b/sig/orb/models/subscription_create_params.rbs index ff6fb2cd..7ec37406 100644 --- a/sig/orb/models/subscription_create_params.rbs +++ b/sig/orb/models/subscription_create_params.rbs @@ -358,7 +358,7 @@ module Orb def to_hash: -> Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::new_maximum end - private def self.variants: -> [[:percentage_discount, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::NewPercentageDiscount], [:usage_discount, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::NewUsageDiscount], [:amount_discount, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::NewAmountDiscount], [:minimum, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::NewMinimum], [:maximum, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::NewMaximum]] + def self.variants: -> [Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::NewPercentageDiscount, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::NewUsageDiscount, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::NewAmountDiscount, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::NewMinimum, Orb::Models::SubscriptionCreateParams::AddAdjustment::Adjustment::NewMaximum] end end @@ -4938,7 +4938,7 @@ module Orb end end - private def self.variants: -> [[:unit, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionUnitPrice], [:package, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionPackagePrice], [:matrix, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionMatrixPrice], [:tiered, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionTieredPrice], [:tiered_bps, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionTieredBpsPrice], [:bps, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionBpsPrice], [:bulk_bps, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionBulkBpsPrice], [:bulk, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionBulkPrice], [:threshold_total_amount, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionThresholdTotalAmountPrice], [:tiered_package, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionTieredPackagePrice], [:tiered_with_minimum, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionTieredWithMinimumPrice], [:unit_with_percent, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionUnitWithPercentPrice], [:package_with_allocation, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionPackageWithAllocationPrice], [:tiered_with_proration, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionTierWithProrationPrice], [:unit_with_proration, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionUnitWithProrationPrice], [:grouped_allocation, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionGroupedAllocationPrice], [:grouped_with_prorated_minimum, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionGroupedWithProratedMinimumPrice], [:bulk_with_proration, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionBulkWithProrationPrice], [:scalable_matrix_with_unit_pricing, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice], [:scalable_matrix_with_tiered_pricing, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice], [:cumulative_grouped_bulk, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionCumulativeGroupedBulkPrice], [:max_group_tiered_package, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionMaxGroupTieredPackagePrice], [:grouped_with_metered_minimum, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionGroupedWithMeteredMinimumPrice], [:matrix_with_display_name, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionMatrixWithDisplayNamePrice], [:grouped_tiered_package, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionGroupedTieredPackagePrice]] + def self.variants: -> [Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionUnitPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionPackagePrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionMatrixPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionTieredPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionTieredBpsPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionBpsPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionBulkBpsPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionTieredPackagePrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionTieredWithMinimumPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionUnitWithPercentPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionPackageWithAllocationPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionTierWithProrationPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionUnitWithProrationPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionGroupedAllocationPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionBulkWithProrationPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::SubscriptionCreateParams::AddPrice::Price::NewSubscriptionGroupedTieredPackagePrice] end end @@ -5209,7 +5209,7 @@ module Orb def to_hash: -> Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::new_maximum end - private def self.variants: -> [[:percentage_discount, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::NewPercentageDiscount], [:usage_discount, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::NewUsageDiscount], [:amount_discount, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::NewAmountDiscount], [:minimum, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::NewMinimum], [:maximum, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::NewMaximum]] + def self.variants: -> [Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::NewPercentageDiscount, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::NewUsageDiscount, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::NewAmountDiscount, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::NewMinimum, Orb::Models::SubscriptionCreateParams::ReplaceAdjustment::Adjustment::NewMaximum] end end @@ -9785,7 +9785,7 @@ module Orb end end - private def self.variants: -> [[:unit, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionUnitPrice], [:package, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionPackagePrice], [:matrix, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionMatrixPrice], [:tiered, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionTieredPrice], [:tiered_bps, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionTieredBpsPrice], [:bps, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionBpsPrice], [:bulk_bps, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionBulkBpsPrice], [:bulk, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionBulkPrice], [:threshold_total_amount, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionThresholdTotalAmountPrice], [:tiered_package, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionTieredPackagePrice], [:tiered_with_minimum, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionTieredWithMinimumPrice], [:unit_with_percent, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionUnitWithPercentPrice], [:package_with_allocation, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionPackageWithAllocationPrice], [:tiered_with_proration, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionTierWithProrationPrice], [:unit_with_proration, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionUnitWithProrationPrice], [:grouped_allocation, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionGroupedAllocationPrice], [:grouped_with_prorated_minimum, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionGroupedWithProratedMinimumPrice], [:bulk_with_proration, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionBulkWithProrationPrice], [:scalable_matrix_with_unit_pricing, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice], [:scalable_matrix_with_tiered_pricing, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice], [:cumulative_grouped_bulk, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionCumulativeGroupedBulkPrice], [:max_group_tiered_package, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionMaxGroupTieredPackagePrice], [:grouped_with_metered_minimum, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionGroupedWithMeteredMinimumPrice], [:matrix_with_display_name, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionMatrixWithDisplayNamePrice], [:grouped_tiered_package, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionGroupedTieredPackagePrice]] + def self.variants: -> [Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionUnitPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionPackagePrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionMatrixPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionTieredPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionTieredBpsPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionBpsPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionBulkBpsPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionTieredPackagePrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionTieredWithMinimumPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionUnitWithPercentPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionPackageWithAllocationPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionTierWithProrationPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionUnitWithProrationPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionGroupedAllocationPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionBulkWithProrationPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::SubscriptionCreateParams::ReplacePrice::Price::NewSubscriptionGroupedTieredPackagePrice] end end end diff --git a/sig/orb/models/subscription_create_response.rbs b/sig/orb/models/subscription_create_response.rbs index 23b52d9e..63cae447 100644 --- a/sig/orb/models/subscription_create_response.rbs +++ b/sig/orb/models/subscription_create_response.rbs @@ -381,7 +381,7 @@ module Orb def to_hash: -> Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::plan_phase_maximum_adjustment end - private def self.variants: -> [[:usage_discount, Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment], [:amount_discount, Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment], [:percentage_discount, Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment], [:minimum, Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment], [:maximum, Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment]] + def self.variants: -> [Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment] end end @@ -531,7 +531,7 @@ module Orb def to_hash: -> Orb::Models::SubscriptionCreateResponse::DiscountInterval::usage_discount_interval end - private def self.variants: -> [[:amount, Orb::Models::SubscriptionCreateResponse::DiscountInterval::AmountDiscountInterval], [:percentage, Orb::Models::SubscriptionCreateResponse::DiscountInterval::PercentageDiscountInterval], [:usage, Orb::Models::SubscriptionCreateResponse::DiscountInterval::UsageDiscountInterval]] + def self.variants: -> [Orb::Models::SubscriptionCreateResponse::DiscountInterval::AmountDiscountInterval, Orb::Models::SubscriptionCreateResponse::DiscountInterval::PercentageDiscountInterval, Orb::Models::SubscriptionCreateResponse::DiscountInterval::UsageDiscountInterval] end type fixed_fee_quantity_schedule = diff --git a/sig/orb/models/subscription_list_params.rbs b/sig/orb/models/subscription_list_params.rbs index b5f7b30d..dda75a9e 100644 --- a/sig/orb/models/subscription_list_params.rbs +++ b/sig/orb/models/subscription_list_params.rbs @@ -8,7 +8,7 @@ module Orb created_at_lte: Time?, cursor: String?, customer_id: ::Array[String]?, - external_customer_id: String?, + external_customer_id: ::Array[String]?, limit: Integer, status: Orb::Models::SubscriptionListParams::status? } @@ -30,7 +30,7 @@ module Orb attr_accessor customer_id: ::Array[String]? - attr_accessor external_customer_id: String? + attr_accessor external_customer_id: ::Array[String]? attr_reader limit: Integer? @@ -46,7 +46,7 @@ module Orb created_at_lte: Time?, cursor: String?, customer_id: ::Array[String]?, - external_customer_id: String?, + external_customer_id: ::Array[String]?, limit: Integer, status: Orb::Models::SubscriptionListParams::status?, request_options: Orb::request_opts diff --git a/sig/orb/models/subscription_price_intervals_params.rbs b/sig/orb/models/subscription_price_intervals_params.rbs index 6e4031df..6f8bd32f 100644 --- a/sig/orb/models/subscription_price_intervals_params.rbs +++ b/sig/orb/models/subscription_price_intervals_params.rbs @@ -122,7 +122,7 @@ module Orb type start_date = Time | Orb::Models::billing_cycle_relative_date class StartDate < Orb::Union - private def self.variants: -> [[nil, Time], [nil, Orb::Models::billing_cycle_relative_date]] + def self.variants: -> [Time, Orb::Models::billing_cycle_relative_date] end type allocation_price = @@ -231,13 +231,13 @@ module Orb def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::Add::Discount::usage_discount_creation_params end - private def self.variants: -> [[:amount, Orb::Models::SubscriptionPriceIntervalsParams::Add::Discount::AmountDiscountCreationParams], [:percentage, Orb::Models::SubscriptionPriceIntervalsParams::Add::Discount::PercentageDiscountCreationParams], [:usage, Orb::Models::SubscriptionPriceIntervalsParams::Add::Discount::UsageDiscountCreationParams]] + def self.variants: -> [Orb::Models::SubscriptionPriceIntervalsParams::Add::Discount::AmountDiscountCreationParams, Orb::Models::SubscriptionPriceIntervalsParams::Add::Discount::PercentageDiscountCreationParams, Orb::Models::SubscriptionPriceIntervalsParams::Add::Discount::UsageDiscountCreationParams] end type end_date = Time | Orb::Models::billing_cycle_relative_date class EndDate < Orb::Union - private def self.variants: -> [[nil, Time], [nil, Orb::Models::billing_cycle_relative_date]] + def self.variants: -> [Time, Orb::Models::billing_cycle_relative_date] end type fixed_fee_quantity_transition = @@ -5130,7 +5130,7 @@ module Orb end end - private def self.variants: -> [[:unit, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice], [:package, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice], [:matrix, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice], [:matrix_with_allocation, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice], [:tiered, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice], [:tiered_bps, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice], [:bps, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice], [:bulk_bps, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice], [:bulk, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice], [:threshold_total_amount, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice], [:tiered_package, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice], [:grouped_tiered, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice], [:max_group_tiered_package, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice], [:tiered_with_minimum, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice], [:package_with_allocation, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice], [:tiered_package_with_minimum, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice], [:unit_with_percent, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice], [:tiered_with_proration, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice], [:unit_with_proration, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice], [:grouped_allocation, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice], [:grouped_with_prorated_minimum, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice], [:grouped_with_metered_minimum, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice], [:matrix_with_display_name, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice], [:bulk_with_proration, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice], [:grouped_tiered_package, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice], [:scalable_matrix_with_unit_pricing, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice], [:scalable_matrix_with_tiered_pricing, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice], [:cumulative_grouped_bulk, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice]] + def self.variants: -> [Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackagePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithAllocationPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredBpsPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBpsPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkBpsPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingThresholdTotalAmountPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackagePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithMinimumPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingPackageWithAllocationPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithPercentPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingTieredWithProrationPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingUnitWithProrationPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedAllocationPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingBulkWithProrationPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingGroupedTieredPackagePrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::SubscriptionPriceIntervalsParams::Add::Price::NewFloatingCumulativeGroupedBulkPrice] end end @@ -5343,19 +5343,19 @@ module Orb def to_hash: -> Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::new_maximum end - private def self.variants: -> [[:percentage_discount, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewPercentageDiscount], [:usage_discount, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewUsageDiscount], [:amount_discount, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewAmountDiscount], [:minimum, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewMinimum], [:maximum, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewMaximum]] + def self.variants: -> [Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewPercentageDiscount, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewUsageDiscount, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewAmountDiscount, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewMinimum, Orb::Models::SubscriptionPriceIntervalsParams::AddAdjustment::Adjustment::NewMaximum] end type start_date = Time | Orb::Models::billing_cycle_relative_date class StartDate < Orb::Union - private def self.variants: -> [[nil, Time], [nil, Orb::Models::billing_cycle_relative_date]] + def self.variants: -> [Time, Orb::Models::billing_cycle_relative_date] end type end_date = Time | Orb::Models::billing_cycle_relative_date class EndDate < Orb::Union - private def self.variants: -> [[nil, Time], [nil, Orb::Models::billing_cycle_relative_date]] + def self.variants: -> [Time, Orb::Models::billing_cycle_relative_date] end end @@ -5409,7 +5409,7 @@ module Orb type end_date = Time | Orb::Models::billing_cycle_relative_date class EndDate < Orb::Union - private def self.variants: -> [[nil, Time], [nil, Orb::Models::billing_cycle_relative_date]] + def self.variants: -> [Time, Orb::Models::billing_cycle_relative_date] end type fixed_fee_quantity_transition = @@ -5433,7 +5433,7 @@ module Orb type start_date = Time | Orb::Models::billing_cycle_relative_date class StartDate < Orb::Union - private def self.variants: -> [[nil, Time], [nil, Orb::Models::billing_cycle_relative_date]] + def self.variants: -> [Time, Orb::Models::billing_cycle_relative_date] end end @@ -5471,13 +5471,13 @@ module Orb type end_date = Time | Orb::Models::billing_cycle_relative_date class EndDate < Orb::Union - private def self.variants: -> [[nil, Time], [nil, Orb::Models::billing_cycle_relative_date]] + def self.variants: -> [Time, Orb::Models::billing_cycle_relative_date] end type start_date = Time | Orb::Models::billing_cycle_relative_date class StartDate < Orb::Union - private def self.variants: -> [[nil, Time], [nil, Orb::Models::billing_cycle_relative_date]] + def self.variants: -> [Time, Orb::Models::billing_cycle_relative_date] end end end diff --git a/sig/orb/models/subscription_price_intervals_response.rbs b/sig/orb/models/subscription_price_intervals_response.rbs index 985fa4ca..b3716efa 100644 --- a/sig/orb/models/subscription_price_intervals_response.rbs +++ b/sig/orb/models/subscription_price_intervals_response.rbs @@ -382,7 +382,7 @@ module Orb def to_hash: -> Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::plan_phase_maximum_adjustment end - private def self.variants: -> [[:usage_discount, Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment], [:amount_discount, Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment], [:percentage_discount, Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment], [:minimum, Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment], [:maximum, Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment]] + def self.variants: -> [Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment] end end @@ -532,7 +532,7 @@ module Orb def to_hash: -> Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::usage_discount_interval end - private def self.variants: -> [[:amount, Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::AmountDiscountInterval], [:percentage, Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::PercentageDiscountInterval], [:usage, Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::UsageDiscountInterval]] + def self.variants: -> [Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::AmountDiscountInterval, Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::PercentageDiscountInterval, Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::UsageDiscountInterval] end type fixed_fee_quantity_schedule = diff --git a/sig/orb/models/subscription_schedule_plan_change_params.rbs b/sig/orb/models/subscription_schedule_plan_change_params.rbs index 2c648be2..d57f4fc9 100644 --- a/sig/orb/models/subscription_schedule_plan_change_params.rbs +++ b/sig/orb/models/subscription_schedule_plan_change_params.rbs @@ -348,7 +348,7 @@ module Orb def to_hash: -> Orb::Models::SubscriptionSchedulePlanChangeParams::AddAdjustment::Adjustment::new_maximum end - private def self.variants: -> [[:percentage_discount, Orb::Models::SubscriptionSchedulePlanChangeParams::AddAdjustment::Adjustment::NewPercentageDiscount], [:usage_discount, Orb::Models::SubscriptionSchedulePlanChangeParams::AddAdjustment::Adjustment::NewUsageDiscount], [:amount_discount, Orb::Models::SubscriptionSchedulePlanChangeParams::AddAdjustment::Adjustment::NewAmountDiscount], [:minimum, Orb::Models::SubscriptionSchedulePlanChangeParams::AddAdjustment::Adjustment::NewMinimum], [:maximum, Orb::Models::SubscriptionSchedulePlanChangeParams::AddAdjustment::Adjustment::NewMaximum]] + def self.variants: -> [Orb::Models::SubscriptionSchedulePlanChangeParams::AddAdjustment::Adjustment::NewPercentageDiscount, Orb::Models::SubscriptionSchedulePlanChangeParams::AddAdjustment::Adjustment::NewUsageDiscount, Orb::Models::SubscriptionSchedulePlanChangeParams::AddAdjustment::Adjustment::NewAmountDiscount, Orb::Models::SubscriptionSchedulePlanChangeParams::AddAdjustment::Adjustment::NewMinimum, Orb::Models::SubscriptionSchedulePlanChangeParams::AddAdjustment::Adjustment::NewMaximum] end end @@ -4928,7 +4928,7 @@ module Orb end end - private def self.variants: -> [[:unit, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionUnitPrice], [:package, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionPackagePrice], [:matrix, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionMatrixPrice], [:tiered, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionTieredPrice], [:tiered_bps, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionTieredBpsPrice], [:bps, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionBpsPrice], [:bulk_bps, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionBulkBpsPrice], [:bulk, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionBulkPrice], [:threshold_total_amount, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionThresholdTotalAmountPrice], [:tiered_package, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionTieredPackagePrice], [:tiered_with_minimum, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionTieredWithMinimumPrice], [:unit_with_percent, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionUnitWithPercentPrice], [:package_with_allocation, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionPackageWithAllocationPrice], [:tiered_with_proration, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionTierWithProrationPrice], [:unit_with_proration, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionUnitWithProrationPrice], [:grouped_allocation, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionGroupedAllocationPrice], [:grouped_with_prorated_minimum, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionGroupedWithProratedMinimumPrice], [:bulk_with_proration, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionBulkWithProrationPrice], [:scalable_matrix_with_unit_pricing, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice], [:scalable_matrix_with_tiered_pricing, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice], [:cumulative_grouped_bulk, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionCumulativeGroupedBulkPrice], [:max_group_tiered_package, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionMaxGroupTieredPackagePrice], [:grouped_with_metered_minimum, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionGroupedWithMeteredMinimumPrice], [:matrix_with_display_name, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionMatrixWithDisplayNamePrice], [:grouped_tiered_package, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionGroupedTieredPackagePrice]] + def self.variants: -> [Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionUnitPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionPackagePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionMatrixPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionTieredPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionTieredBpsPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionBpsPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionBulkBpsPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionTieredPackagePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionTieredWithMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionUnitWithPercentPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionPackageWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionTierWithProrationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionUnitWithProrationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionGroupedAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionBulkWithProrationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::AddPrice::Price::NewSubscriptionGroupedTieredPackagePrice] end end @@ -5200,7 +5200,7 @@ module Orb def to_hash: -> Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::new_maximum end - private def self.variants: -> [[:percentage_discount, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::NewPercentageDiscount], [:usage_discount, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::NewUsageDiscount], [:amount_discount, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::NewAmountDiscount], [:minimum, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::NewMinimum], [:maximum, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::NewMaximum]] + def self.variants: -> [Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::NewPercentageDiscount, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::NewUsageDiscount, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::NewAmountDiscount, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::NewMinimum, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplaceAdjustment::Adjustment::NewMaximum] end end @@ -9776,7 +9776,7 @@ module Orb end end - private def self.variants: -> [[:unit, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionUnitPrice], [:package, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionPackagePrice], [:matrix, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionMatrixPrice], [:tiered, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionTieredPrice], [:tiered_bps, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionTieredBpsPrice], [:bps, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionBpsPrice], [:bulk_bps, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionBulkBpsPrice], [:bulk, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionBulkPrice], [:threshold_total_amount, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionThresholdTotalAmountPrice], [:tiered_package, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionTieredPackagePrice], [:tiered_with_minimum, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionTieredWithMinimumPrice], [:unit_with_percent, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionUnitWithPercentPrice], [:package_with_allocation, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionPackageWithAllocationPrice], [:tiered_with_proration, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionTierWithProrationPrice], [:unit_with_proration, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionUnitWithProrationPrice], [:grouped_allocation, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionGroupedAllocationPrice], [:grouped_with_prorated_minimum, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionGroupedWithProratedMinimumPrice], [:bulk_with_proration, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionBulkWithProrationPrice], [:scalable_matrix_with_unit_pricing, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice], [:scalable_matrix_with_tiered_pricing, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice], [:cumulative_grouped_bulk, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionCumulativeGroupedBulkPrice], [:max_group_tiered_package, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionMaxGroupTieredPackagePrice], [:grouped_with_metered_minimum, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionGroupedWithMeteredMinimumPrice], [:matrix_with_display_name, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionMatrixWithDisplayNamePrice], [:grouped_tiered_package, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionGroupedTieredPackagePrice]] + def self.variants: -> [Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionUnitPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionPackagePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionMatrixPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionTieredPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionTieredBpsPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionBpsPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionBulkBpsPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionThresholdTotalAmountPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionTieredPackagePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionTieredWithMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionUnitWithPercentPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionPackageWithAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionTierWithProrationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionUnitWithProrationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionGroupedAllocationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionGroupedWithProratedMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionBulkWithProrationPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionScalableMatrixWithUnitPricingPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionScalableMatrixWithTieredPricingPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionCumulativeGroupedBulkPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionMaxGroupTieredPackagePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionGroupedWithMeteredMinimumPrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionMatrixWithDisplayNamePrice, Orb::Models::SubscriptionSchedulePlanChangeParams::ReplacePrice::Price::NewSubscriptionGroupedTieredPackagePrice] end end end diff --git a/sig/orb/models/subscription_schedule_plan_change_response.rbs b/sig/orb/models/subscription_schedule_plan_change_response.rbs index 65b89373..85b40673 100644 --- a/sig/orb/models/subscription_schedule_plan_change_response.rbs +++ b/sig/orb/models/subscription_schedule_plan_change_response.rbs @@ -382,7 +382,7 @@ module Orb def to_hash: -> Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::plan_phase_maximum_adjustment end - private def self.variants: -> [[:usage_discount, Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment], [:amount_discount, Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment], [:percentage_discount, Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment], [:minimum, Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment], [:maximum, Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment]] + def self.variants: -> [Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment] end end @@ -532,7 +532,7 @@ module Orb def to_hash: -> Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::usage_discount_interval end - private def self.variants: -> [[:amount, Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::AmountDiscountInterval], [:percentage, Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::PercentageDiscountInterval], [:usage, Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::UsageDiscountInterval]] + def self.variants: -> [Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::AmountDiscountInterval, Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::PercentageDiscountInterval, Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::UsageDiscountInterval] end type fixed_fee_quantity_schedule = diff --git a/sig/orb/models/subscription_trigger_phase_response.rbs b/sig/orb/models/subscription_trigger_phase_response.rbs index 9f68b553..b2bf7387 100644 --- a/sig/orb/models/subscription_trigger_phase_response.rbs +++ b/sig/orb/models/subscription_trigger_phase_response.rbs @@ -382,7 +382,7 @@ module Orb def to_hash: -> Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::plan_phase_maximum_adjustment end - private def self.variants: -> [[:usage_discount, Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment], [:amount_discount, Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment], [:percentage_discount, Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment], [:minimum, Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment], [:maximum, Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment]] + def self.variants: -> [Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment] end end @@ -532,7 +532,7 @@ module Orb def to_hash: -> Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::usage_discount_interval end - private def self.variants: -> [[:amount, Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::AmountDiscountInterval], [:percentage, Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::PercentageDiscountInterval], [:usage, Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::UsageDiscountInterval]] + def self.variants: -> [Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::AmountDiscountInterval, Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::PercentageDiscountInterval, Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::UsageDiscountInterval] end type fixed_fee_quantity_schedule = diff --git a/sig/orb/models/subscription_unschedule_cancellation_response.rbs b/sig/orb/models/subscription_unschedule_cancellation_response.rbs index 400a714a..05baff9b 100644 --- a/sig/orb/models/subscription_unschedule_cancellation_response.rbs +++ b/sig/orb/models/subscription_unschedule_cancellation_response.rbs @@ -382,7 +382,7 @@ module Orb def to_hash: -> Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::plan_phase_maximum_adjustment end - private def self.variants: -> [[:usage_discount, Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment], [:amount_discount, Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment], [:percentage_discount, Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment], [:minimum, Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment], [:maximum, Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment]] + def self.variants: -> [Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::SubscriptionUnscheduleCancellationResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment] end end @@ -532,7 +532,7 @@ module Orb def to_hash: -> Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::usage_discount_interval end - private def self.variants: -> [[:amount, Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::AmountDiscountInterval], [:percentage, Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::PercentageDiscountInterval], [:usage, Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::UsageDiscountInterval]] + def self.variants: -> [Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::AmountDiscountInterval, Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::PercentageDiscountInterval, Orb::Models::SubscriptionUnscheduleCancellationResponse::DiscountInterval::UsageDiscountInterval] end type fixed_fee_quantity_schedule = diff --git a/sig/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbs b/sig/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbs index c501877a..1910c047 100644 --- a/sig/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbs +++ b/sig/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbs @@ -382,7 +382,7 @@ module Orb def to_hash: -> Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::plan_phase_maximum_adjustment end - private def self.variants: -> [[:usage_discount, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment], [:amount_discount, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment], [:percentage_discount, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment], [:minimum, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment], [:maximum, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment]] + def self.variants: -> [Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment] end end @@ -532,7 +532,7 @@ module Orb def to_hash: -> Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::usage_discount_interval end - private def self.variants: -> [[:amount, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::AmountDiscountInterval], [:percentage, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::PercentageDiscountInterval], [:usage, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::UsageDiscountInterval]] + def self.variants: -> [Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::AmountDiscountInterval, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::PercentageDiscountInterval, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::UsageDiscountInterval] end type fixed_fee_quantity_schedule = diff --git a/sig/orb/models/subscription_unschedule_pending_plan_changes_response.rbs b/sig/orb/models/subscription_unschedule_pending_plan_changes_response.rbs index 8d3a00be..1563ad3c 100644 --- a/sig/orb/models/subscription_unschedule_pending_plan_changes_response.rbs +++ b/sig/orb/models/subscription_unschedule_pending_plan_changes_response.rbs @@ -382,7 +382,7 @@ module Orb def to_hash: -> Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::plan_phase_maximum_adjustment end - private def self.variants: -> [[:usage_discount, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment], [:amount_discount, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment], [:percentage_discount, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment], [:minimum, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment], [:maximum, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment]] + def self.variants: -> [Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment] end end @@ -532,7 +532,7 @@ module Orb def to_hash: -> Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::usage_discount_interval end - private def self.variants: -> [[:amount, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::AmountDiscountInterval], [:percentage, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::PercentageDiscountInterval], [:usage, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::UsageDiscountInterval]] + def self.variants: -> [Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::AmountDiscountInterval, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::PercentageDiscountInterval, Orb::Models::SubscriptionUnschedulePendingPlanChangesResponse::DiscountInterval::UsageDiscountInterval] end type fixed_fee_quantity_schedule = diff --git a/sig/orb/models/subscription_update_fixed_fee_quantity_response.rbs b/sig/orb/models/subscription_update_fixed_fee_quantity_response.rbs index e12ba521..a2c5a9e3 100644 --- a/sig/orb/models/subscription_update_fixed_fee_quantity_response.rbs +++ b/sig/orb/models/subscription_update_fixed_fee_quantity_response.rbs @@ -382,7 +382,7 @@ module Orb def to_hash: -> Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::plan_phase_maximum_adjustment end - private def self.variants: -> [[:usage_discount, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment], [:amount_discount, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment], [:percentage_discount, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment], [:minimum, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment], [:maximum, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment]] + def self.variants: -> [Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment] end end @@ -532,7 +532,7 @@ module Orb def to_hash: -> Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::usage_discount_interval end - private def self.variants: -> [[:amount, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::AmountDiscountInterval], [:percentage, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::PercentageDiscountInterval], [:usage, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::UsageDiscountInterval]] + def self.variants: -> [Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::AmountDiscountInterval, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::PercentageDiscountInterval, Orb::Models::SubscriptionUpdateFixedFeeQuantityResponse::DiscountInterval::UsageDiscountInterval] end type fixed_fee_quantity_schedule = diff --git a/sig/orb/models/subscription_update_trial_params.rbs b/sig/orb/models/subscription_update_trial_params.rbs index a1441b5a..80af0dae 100644 --- a/sig/orb/models/subscription_update_trial_params.rbs +++ b/sig/orb/models/subscription_update_trial_params.rbs @@ -42,7 +42,7 @@ module Orb def self.values: -> ::Array[Orb::Models::SubscriptionUpdateTrialParams::TrialEndDate::union_member1] end - private def self.variants: -> [[nil, Time], [nil, Orb::Models::SubscriptionUpdateTrialParams::TrialEndDate::union_member1]] + def self.variants: -> [Time, Orb::Models::SubscriptionUpdateTrialParams::TrialEndDate::union_member1] end end end diff --git a/sig/orb/models/subscription_update_trial_response.rbs b/sig/orb/models/subscription_update_trial_response.rbs index 8dc7bc15..340dbaf3 100644 --- a/sig/orb/models/subscription_update_trial_response.rbs +++ b/sig/orb/models/subscription_update_trial_response.rbs @@ -381,7 +381,7 @@ module Orb def to_hash: -> Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::plan_phase_maximum_adjustment end - private def self.variants: -> [[:usage_discount, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment], [:amount_discount, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment], [:percentage_discount, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment], [:minimum, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment], [:maximum, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment]] + def self.variants: -> [Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::SubscriptionUpdateTrialResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment] end end @@ -531,7 +531,7 @@ module Orb def to_hash: -> Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::usage_discount_interval end - private def self.variants: -> [[:amount, Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::AmountDiscountInterval], [:percentage, Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::PercentageDiscountInterval], [:usage, Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::UsageDiscountInterval]] + def self.variants: -> [Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::AmountDiscountInterval, Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::PercentageDiscountInterval, Orb::Models::SubscriptionUpdateTrialResponse::DiscountInterval::UsageDiscountInterval] end type fixed_fee_quantity_schedule = diff --git a/sig/orb/models/subscription_usage.rbs b/sig/orb/models/subscription_usage.rbs index 26031eba..6234eea0 100644 --- a/sig/orb/models/subscription_usage.rbs +++ b/sig/orb/models/subscription_usage.rbs @@ -226,7 +226,7 @@ module Orb end end - private def self.variants: -> [[nil, Orb::Models::SubscriptionUsage::UngroupedSubscriptionUsage], [nil, Orb::Models::SubscriptionUsage::GroupedSubscriptionUsage]] + def self.variants: -> [Orb::Models::SubscriptionUsage::UngroupedSubscriptionUsage, Orb::Models::SubscriptionUsage::GroupedSubscriptionUsage] end end end diff --git a/sig/orb/page.rbs b/sig/orb/page.rbs index 04768fce..598067ad 100644 --- a/sig/orb/page.rbs +++ b/sig/orb/page.rbs @@ -2,17 +2,10 @@ module Orb class Page[Elem] include Orb::BasePage[Elem] - attr_accessor data: ::Array[Elem] + attr_accessor data: ::Array[Elem]? attr_accessor pagination_metadata: PaginationMetadata - def initialize: ( - client: Orb::BaseClient, - req: Orb::BaseClient::request_components, - headers: ::Hash[String, String], - page_data: ::Hash[Symbol, top] - ) -> void - type pagination_metadata = { has_more: bool, next_cursor: String? } class PaginationMetadata < Orb::BaseModel attr_accessor has_more: bool diff --git a/sig/orb/resources/credit_notes.rbs b/sig/orb/resources/credit_notes.rbs index 6d858614..2efb36b7 100644 --- a/sig/orb/resources/credit_notes.rbs +++ b/sig/orb/resources/credit_notes.rbs @@ -17,6 +17,10 @@ module Orb ?Orb::Models::CreditNoteListParams | ::Hash[Symbol, top] params ) -> Orb::Page[Orb::Models::CreditNote] | ( + created_at_gt: Time?, + created_at_gte: Time?, + created_at_lt: Time?, + created_at_lte: Time?, cursor: String?, limit: Integer, request_options: Orb::request_opts diff --git a/sig/orb/resources/subscriptions.rbs b/sig/orb/resources/subscriptions.rbs index 8d8a6319..d3f1243a 100644 --- a/sig/orb/resources/subscriptions.rbs +++ b/sig/orb/resources/subscriptions.rbs @@ -66,7 +66,7 @@ module Orb created_at_lte: Time?, cursor: String?, customer_id: ::Array[String]?, - external_customer_id: String?, + external_customer_id: ::Array[String]?, limit: Integer, status: Orb::Models::SubscriptionListParams::status?, request_options: Orb::request_opts diff --git a/sig/orb/util.rbs b/sig/orb/util.rbs index a2cacfc4..be22f45c 100644 --- a/sig/orb/util.rbs +++ b/sig/orb/util.rbs @@ -120,11 +120,13 @@ module Orb (Enumerator::Yielder arg0) -> void } -> void - type sse_message = + type server_sent_event = { event: String?, data: String?, id: String?, retry: Integer? } def self?.decode_lines: (Enumerable[String] enum) -> Enumerable[String] - def self?.decode_sse: (Enumerable[String] lines) -> Orb::Util::sse_message + def self?.decode_sse: ( + Enumerable[String] lines + ) -> Orb::Util::server_sent_event end end diff --git a/sig/orb/version.rbs b/sig/orb/version.rbs index 3d1a2e88..31023e25 100644 --- a/sig/orb/version.rbs +++ b/sig/orb/version.rbs @@ -1,3 +1,3 @@ module Orb - VERSION: "0.1.0-alpha.25" + VERSION: "0.1.0-alpha.26" end diff --git a/test/orb/client_test.rb b/test/orb/client_test.rb index caa3df2e..277a9888 100644 --- a/test/orb/client_test.rb +++ b/test/orb/client_test.rb @@ -24,7 +24,6 @@ class MockResponse # @param code [Integer] # @param headers [Hash{String=>String}] - # def initialize(code, headers) @code = code @headers = {"content-type" => "application/json", **headers} @@ -33,7 +32,6 @@ def initialize(code, headers) # @param header [String] # # @return [String, nil] - # def [](header) @headers[header] end @@ -41,7 +39,6 @@ def [](header) # @param header [String] # # @return [Boolean] - # def key?(header) @headers.key?(header) end @@ -63,7 +60,6 @@ class MockRequester # @param response_code [Integer] # @param response_headers [Hash{String=>String}] # @param response_data [Object] - # def initialize(response_code, response_headers, response_data) @response_code = response_code @response_headers = response_headers @@ -72,7 +68,6 @@ def initialize(response_code, response_headers, response_data) end # @param req [Hash{Symbol=>Object}] - # def execute(req) # Deep copy the request because it is mutated on each retry. attempts.push(Marshal.load(Marshal.dump(req)))