Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.1.0-alpha.6"
".": "0.1.0-alpha.7"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 103
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-2824cb456b8e3a7ce1ea34aa37a2c8e63d5b70425a5863502ffe1e1b1ef7efaf.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-25409f3b13e6d1d003e351fc18d248ecf3c5821cfde5f409a1d356e4fc917d8c.yml
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Changelog

## 0.1.0-alpha.7 (2025-02-13)

Full Changelog: [v0.1.0-alpha.6...v0.1.0-alpha.7](https://github.com/orbcorp/orb-ruby/compare/v0.1.0-alpha.6...v0.1.0-alpha.7)

### Features

* **api:** api update ([#34](https://github.com/orbcorp/orb-ruby/issues/34)) ([9fad0c4](https://github.com/orbcorp/orb-ruby/commit/9fad0c4f6f7ab7db26866956ad724afcc785297e))


### Chores

* enable full pagination tests ([#32](https://github.com/orbcorp/orb-ruby/issues/32)) ([df07d96](https://github.com/orbcorp/orb-ruby/commit/df07d9620a969672cb6cf34d633a3e4ae6b5f789))
* **internal:** codegen related update ([#28](https://github.com/orbcorp/orb-ruby/issues/28)) ([8d0a108](https://github.com/orbcorp/orb-ruby/commit/8d0a10834d2b8f07f30c117f725c2eaed72f3eb8))
* **internal:** codegen related update ([#30](https://github.com/orbcorp/orb-ruby/issues/30)) ([fc2a760](https://github.com/orbcorp/orb-ruby/commit/fc2a7602ed78b5c13e72e5bfc4484a5d2c2fe56c))
* **internal:** version bump ([#26](https://github.com/orbcorp/orb-ruby/issues/26)) ([91b6be8](https://github.com/orbcorp/orb-ruby/commit/91b6be8a802fde161cb861607c8a1e7259830c3f))
* use concise syntax for pattern matching ([#29](https://github.com/orbcorp/orb-ruby/issues/29)) ([f04c8e3](https://github.com/orbcorp/orb-ruby/commit/f04c8e3ad6e0f52e95877c1ed07df0a592b68f5b))
* whitespace changes ([#31](https://github.com/orbcorp/orb-ruby/issues/31)) ([4d8cd6f](https://github.com/orbcorp/orb-ruby/commit/4d8cd6fa546c909abc40f40167f8c234b9b69057))

## 0.1.0-alpha.6 (2025-02-11)

Full Changelog: [v0.1.0-alpha.5...v0.1.0-alpha.6](https://github.com/orbcorp/orb-ruby/compare/v0.1.0-alpha.5...v0.1.0-alpha.6)
Expand Down
8 changes: 4 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ GIT
PATH
remote: .
specs:
orb (0.1.0.pre.alpha.5)
orb (0.1.0.pre.alpha.7)
connection_pool

GEM
Expand Down Expand Up @@ -80,9 +80,9 @@ GEM
parser (>= 3.3.1.0)
ruby-progressbar (1.13.0)
securerandom (0.4.1)
sorbet (0.5.11813)
sorbet-static (= 0.5.11813)
sorbet-static (0.5.11813-x86_64-linux)
sorbet (0.5.11823)
sorbet-static (= 0.5.11823)
sorbet-static (0.5.11823-x86_64-linux)
steep (1.9.4)
activesupport (>= 5.1)
concurrent-ruby (>= 1.1.10)
Expand Down
16 changes: 8 additions & 8 deletions lib/orb/base_model.rb
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ def ===(other)
case other
in Array
# rubocop:disable Style/CaseEquality
other.all? { |item| type === item }
other.all? { type === _1 }
# rubocop:enable Style/CaseEquality
else
false
Expand All @@ -609,7 +609,7 @@ def coerce(value)
type = item_type
case value
in Enumerable unless value.is_a?(Hash)
value.map { |item| Orb::Converter.coerce(type, item) }
value.map { Orb::Converter.coerce(type, _1) }
else
value
end
Expand All @@ -625,7 +625,7 @@ def dump(value)
type = item_type
case value
in Enumerable unless value.is_a?(Hash)
value.map { |item| Orb::Converter.dump(type, item) }.to_a
value.map { Orb::Converter.dump(type, _1) }.to_a
else
value
end
Expand Down Expand Up @@ -906,7 +906,7 @@ def self.defaults = (@defaults ||= {})
setter = "#{name_sym}="

if known_fields.key?(name_sym)
[name_sym, setter].each { |name| undef_method(name) }
[name_sym, setter].each { undef_method(_1) }
end

known_fields[name_sym] = {mode: @mode, key: key, required: required, type_fn: type_fn}
Expand Down Expand Up @@ -1015,8 +1015,8 @@ def ==(other)
# @return [Orb::BaseModel, Object]
#
def self.coerce(value)
case (coerced = Orb::Util.coerce_hash(value))
in Hash
case Orb::Util.coerce_hash(value)
in Hash => coerced
new(coerced)
else
value
Expand Down Expand Up @@ -1166,8 +1166,8 @@ def deconstruct_keys(keys)
# @param data [Hash{Symbol=>Object}, Orb::BaseModel]
#
def initialize(data = {})
case (coerced = Orb::Util.coerce_hash(data))
in Hash
case Orb::Util.coerce_hash(data)
in Hash => coerced
@data = coerced.transform_keys(&:to_sym)
else
raise ArgumentError.new("Expected a #{Hash} or #{Orb::BaseModel}, got #{data.inspect}")
Expand Down
25 changes: 12 additions & 13 deletions lib/orb/models/customers/cost_list_by_external_id_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,27 +78,25 @@ class Data < Orb::BaseModel
# ```ruby
# per_price_cost => {
# price: Orb::Models::Price,
# price_id: String,
# subtotal: String,
# total: String,
# quantity: Float
# }
# ```
class PerPriceCost < Orb::BaseModel
# @!attribute price
# 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.
# The price object
#
# 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)
#
# @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]
# @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]
required :price, union: -> { Orb::Models::Price }

# @!attribute price_id
# The price the cost is associated with
#
# @return [String]
required :price_id, String

# @!attribute subtotal
# Price's contributions for the timeframe, excluding any minimums and discounts.
#
Expand All @@ -118,12 +116,13 @@ class PerPriceCost < Orb::BaseModel
optional :quantity, Float, nil?: true

# @!parse
# # @param price [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]
# # @param price [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]
# # @param price_id [String]
# # @param subtotal [String]
# # @param total [String]
# # @param quantity [Float, nil]
# #
# def initialize(price:, subtotal:, total:, quantity: nil, **) = super
# def initialize(price:, price_id:, subtotal:, total:, quantity: nil, **) = super

# def initialize: (Hash | Orb::BaseModel) -> void
end
Expand Down
25 changes: 12 additions & 13 deletions lib/orb/models/customers/cost_list_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,27 +76,25 @@ class Data < Orb::BaseModel
# ```ruby
# per_price_cost => {
# price: Orb::Models::Price,
# price_id: String,
# subtotal: String,
# total: String,
# quantity: Float
# }
# ```
class PerPriceCost < Orb::BaseModel
# @!attribute price
# 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.
# The price object
#
# 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)
#
# @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]
# @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]
required :price, union: -> { Orb::Models::Price }

# @!attribute price_id
# The price the cost is associated with
#
# @return [String]
required :price_id, String

# @!attribute subtotal
# Price's contributions for the timeframe, excluding any minimums and discounts.
#
Expand All @@ -116,12 +114,13 @@ class PerPriceCost < Orb::BaseModel
optional :quantity, Float, nil?: true

# @!parse
# # @param price [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]
# # @param price [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]
# # @param price_id [String]
# # @param subtotal [String]
# # @param total [String]
# # @param quantity [Float, nil]
# #
# def initialize(price:, subtotal:, total:, quantity: nil, **) = super
# def initialize(price:, price_id:, subtotal:, total:, quantity: nil, **) = super

# def initialize: (Hash | Orb::BaseModel) -> void
end
Expand Down
Loading
Loading