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.20"
".": "0.1.0-alpha.21"
}
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-48084a007f009b4358484f09a3a7b74a990c402669f9d15adfbb60e4f835f951.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-a2c1aa029d1e72a5fc7d3c6cd431479888ebd9a379683a2c8630da48437baa4f.yml
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Changelog

## 0.1.0-alpha.21 (2025-03-06)

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

### Features

* **api:** api update ([#105](https://github.com/orbcorp/orb-ruby/issues/105)) ([7968ec9](https://github.com/orbcorp/orb-ruby/commit/7968ec90b70b5d3651cb27c8f2ea70b5cf09fd65))


### Chores

* bump lockfile ([#103](https://github.com/orbcorp/orb-ruby/issues/103)) ([1244c07](https://github.com/orbcorp/orb-ruby/commit/1244c07b21d5c1c6753e1f5f1f96ed997ed8b1cc))
* **internal:** version bump ([#100](https://github.com/orbcorp/orb-ruby/issues/100)) ([f7cc952](https://github.com/orbcorp/orb-ruby/commit/f7cc95244aab1e0e7f8f7ccc6f651b7544e54dfb))
* rename misleading variable ([#104](https://github.com/orbcorp/orb-ruby/issues/104)) ([1ce27e9](https://github.com/orbcorp/orb-ruby/commit/1ce27e9467cd10ebeb1ac5b6d8079faeb65867b2))
* update custom timeout header name ([#102](https://github.com/orbcorp/orb-ruby/issues/102)) ([8b2b509](https://github.com/orbcorp/orb-ruby/commit/8b2b509a07bd74385e63fb8a016e5b916e884946))

## 0.1.0-alpha.20 (2025-03-05)

Full Changelog: [v0.1.0-alpha.19...v0.1.0-alpha.20](https://github.com/orbcorp/orb-ruby/compare/v0.1.0-alpha.19...v0.1.0-alpha.20)
Expand Down
20 changes: 10 additions & 10 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.20)
orb (0.1.0.pre.alpha.21)
connection_pool

GEM
Expand Down Expand Up @@ -93,7 +93,7 @@ GEM
rbs (3.8.1)
logger
regexp_parser (2.10.0)
rubocop (1.72.2)
rubocop (1.73.2)
json (~> 2.3)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.1.0)
Expand All @@ -108,13 +108,13 @@ GEM
parser (>= 3.3.1.0)
ruby-progressbar (1.13.0)
securerandom (0.4.1)
sorbet (0.5.11856)
sorbet-static (= 0.5.11856)
sorbet-runtime (0.5.11856)
sorbet-static (0.5.11856-x86_64-linux)
sorbet-static-and-runtime (0.5.11856)
sorbet (= 0.5.11856)
sorbet-runtime (= 0.5.11856)
sorbet (0.5.11888)
sorbet-static (= 0.5.11888)
sorbet-runtime (0.5.11888)
sorbet-static (0.5.11888-x86_64-linux)
sorbet-static-and-runtime (0.5.11888)
sorbet (= 0.5.11888)
sorbet-runtime (= 0.5.11888)
spoom (1.5.4)
erubi (>= 1.10.0)
prism (>= 0.28.0)
Expand Down Expand Up @@ -157,7 +157,7 @@ GEM
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.6.0)
uri (1.0.2)
uri (1.0.3)
webrick (1.9.1)
yard (0.9.37)
yard-sorbet (0.9.0)
Expand Down
6 changes: 3 additions & 3 deletions lib/orb/base_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,8 @@
end

timeout = opts.fetch(:timeout, @timeout).to_f.clamp((0..))
unless headers.key?("x-stainless-read-timeout") || timeout.zero?
headers["x-stainless-read-timeout"] = timeout.to_s
unless headers.key?("x-stainless-timeout") || timeout.zero?
headers["x-stainless-timeout"] = timeout.to_s
end

headers.reject! { |_, v| v.to_s.empty? }
Expand Down Expand Up @@ -447,7 +447,7 @@
in { stream: Class => st }
st.new(model: model, url: url, status: status, response: response, messages: decoded)
in { page: Class => page }
page.new(client: self, req: req, headers: response, unwrapped: decoded)
page.new(client: self, req: req, headers: response, page_data: decoded)
else
unwrapped = Orb::Util.dig(decoded, req[:unwrap])
Orb::Converter.coerce(model, unwrapped)
Expand All @@ -458,7 +458,7 @@
#
def inspect
base_url = Orb::Util.unparse_uri(@base_url)
"#<#{self.class.name}:0x#{object_id.to_s(16)} base_url=#{base_url} max_retries=#{@max_retries} timeout=#{@timeout}>"

Check warning on line 461 in lib/orb/base_client.rb

View workflow job for this annotation

GitHub Actions / lint

Layout/LineLength: Line is too long. [122/110]
end
end
end
4 changes: 2 additions & 2 deletions lib/orb/base_page.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ def to_enum = super(:auto_paging_each)
# # @param client [Orb::BaseClient]
# # @param req [Hash{Symbol=>Object}]
# # @param headers [Hash{String=>String}, Net::HTTPHeader]
# # @param unwrapped [Object]
# # @param page_data [Object]
# #
# def initialize(client:, req:, headers:, unwrapped:); end
# def initialize(client:, req:, headers:, page_data:); end
end
end
4 changes: 3 additions & 1 deletion lib/orb/models/invoice.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1182,7 +1182,9 @@ class LineItem < Orb::BaseModel
required :adjusted_subtotal, String

# @!attribute adjustments
# All adjustments (ie. maximums, minimums, discounts) applied to the line item.
# 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).
#
# @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>]
required :adjustments, -> { Orb::ArrayOf[union: Orb::Models::Invoice::LineItem::Adjustment] }
Expand Down
4 changes: 3 additions & 1 deletion lib/orb/models/invoice_fetch_upcoming_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1181,7 +1181,9 @@ class LineItem < Orb::BaseModel
required :adjusted_subtotal, String

# @!attribute adjustments
# All adjustments (ie. maximums, minimums, discounts) applied to the line item.
# 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).
#
# @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>]
required :adjustments,
Expand Down
4 changes: 3 additions & 1 deletion lib/orb/models/invoice_line_item_create_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ class InvoiceLineItemCreateResponse < Orb::BaseModel
required :adjusted_subtotal, String

# @!attribute adjustments
# All adjustments (ie. maximums, minimums, discounts) applied to the line item.
# 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).
#
# @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>]
required :adjustments, -> { Orb::ArrayOf[union: Orb::Models::InvoiceLineItemCreateResponse::Adjustment] }
Expand Down
9 changes: 5 additions & 4 deletions lib/orb/models/subscription.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ class Subscription < Orb::BaseModel
required :active_plan_phase_order, Integer, nil?: true

# @!attribute adjustment_intervals
# The adjustment intervals for this subscription.
# The adjustment intervals for this subscription sorted by the start_date of the
# adjustment interval.
#
# @return [Array<Orb::Models::Subscription::AdjustmentInterval>]
required :adjustment_intervals, -> { Orb::ArrayOf[Orb::Models::Subscription::AdjustmentInterval] }
Expand Down Expand Up @@ -96,7 +97,7 @@ class Subscription < Orb::BaseModel
required :default_invoice_memo, String, nil?: true

# @!attribute discount_intervals
# The discount intervals for this subscription.
# The discount intervals for this subscription sorted by the start_date.
#
# @return [Array<Orb::Models::Subscription::DiscountInterval::AmountDiscountInterval, Orb::Models::Subscription::DiscountInterval::PercentageDiscountInterval, Orb::Models::Subscription::DiscountInterval::UsageDiscountInterval>]
required :discount_intervals, -> { Orb::ArrayOf[union: Orb::Models::Subscription::DiscountInterval] }
Expand All @@ -119,7 +120,7 @@ class Subscription < Orb::BaseModel
required :invoicing_threshold, String, nil?: true

# @!attribute maximum_intervals
# The maximum intervals for this subscription.
# The maximum intervals for this subscription sorted by the start_date.
#
# @return [Array<Orb::Models::Subscription::MaximumInterval>]
required :maximum_intervals, -> { Orb::ArrayOf[Orb::Models::Subscription::MaximumInterval] }
Expand All @@ -134,7 +135,7 @@ class Subscription < Orb::BaseModel
required :metadata, Orb::HashOf[String]

# @!attribute minimum_intervals
# The minimum intervals for this subscription.
# The minimum intervals for this subscription sorted by the start_date.
#
# @return [Array<Orb::Models::Subscription::MinimumInterval>]
required :minimum_intervals, -> { Orb::ArrayOf[Orb::Models::Subscription::MinimumInterval] }
Expand Down
9 changes: 5 additions & 4 deletions lib/orb/models/subscription_cancel_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ class SubscriptionCancelResponse < Orb::BaseModel
required :active_plan_phase_order, Integer, nil?: true

# @!attribute adjustment_intervals
# The adjustment intervals for this subscription.
# The adjustment intervals for this subscription sorted by the start_date of the
# adjustment interval.
#
# @return [Array<Orb::Models::SubscriptionCancelResponse::AdjustmentInterval>]
required :adjustment_intervals,
Expand Down Expand Up @@ -97,7 +98,7 @@ class SubscriptionCancelResponse < Orb::BaseModel
required :default_invoice_memo, String, nil?: true

# @!attribute discount_intervals
# The discount intervals for this subscription.
# The discount intervals for this subscription sorted by the start_date.
#
# @return [Array<Orb::Models::SubscriptionCancelResponse::DiscountInterval::AmountDiscountInterval, Orb::Models::SubscriptionCancelResponse::DiscountInterval::PercentageDiscountInterval, Orb::Models::SubscriptionCancelResponse::DiscountInterval::UsageDiscountInterval>]
required :discount_intervals,
Expand All @@ -121,7 +122,7 @@ class SubscriptionCancelResponse < Orb::BaseModel
required :invoicing_threshold, String, nil?: true

# @!attribute maximum_intervals
# The maximum intervals for this subscription.
# The maximum intervals for this subscription sorted by the start_date.
#
# @return [Array<Orb::Models::SubscriptionCancelResponse::MaximumInterval>]
required :maximum_intervals, -> { Orb::ArrayOf[Orb::Models::SubscriptionCancelResponse::MaximumInterval] }
Expand All @@ -136,7 +137,7 @@ class SubscriptionCancelResponse < Orb::BaseModel
required :metadata, Orb::HashOf[String]

# @!attribute minimum_intervals
# The minimum intervals for this subscription.
# The minimum intervals for this subscription sorted by the start_date.
#
# @return [Array<Orb::Models::SubscriptionCancelResponse::MinimumInterval>]
required :minimum_intervals, -> { Orb::ArrayOf[Orb::Models::SubscriptionCancelResponse::MinimumInterval] }
Expand Down
9 changes: 5 additions & 4 deletions lib/orb/models/subscription_create_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ class SubscriptionCreateResponse < Orb::BaseModel
required :active_plan_phase_order, Integer, nil?: true

# @!attribute adjustment_intervals
# The adjustment intervals for this subscription.
# The adjustment intervals for this subscription sorted by the start_date of the
# adjustment interval.
#
# @return [Array<Orb::Models::SubscriptionCreateResponse::AdjustmentInterval>]
required :adjustment_intervals,
Expand Down Expand Up @@ -97,7 +98,7 @@ class SubscriptionCreateResponse < Orb::BaseModel
required :default_invoice_memo, String, nil?: true

# @!attribute discount_intervals
# The discount intervals for this subscription.
# The discount intervals for this subscription sorted by the start_date.
#
# @return [Array<Orb::Models::SubscriptionCreateResponse::DiscountInterval::AmountDiscountInterval, Orb::Models::SubscriptionCreateResponse::DiscountInterval::PercentageDiscountInterval, Orb::Models::SubscriptionCreateResponse::DiscountInterval::UsageDiscountInterval>]
required :discount_intervals,
Expand All @@ -121,7 +122,7 @@ class SubscriptionCreateResponse < Orb::BaseModel
required :invoicing_threshold, String, nil?: true

# @!attribute maximum_intervals
# The maximum intervals for this subscription.
# The maximum intervals for this subscription sorted by the start_date.
#
# @return [Array<Orb::Models::SubscriptionCreateResponse::MaximumInterval>]
required :maximum_intervals, -> { Orb::ArrayOf[Orb::Models::SubscriptionCreateResponse::MaximumInterval] }
Expand All @@ -136,7 +137,7 @@ class SubscriptionCreateResponse < Orb::BaseModel
required :metadata, Orb::HashOf[String]

# @!attribute minimum_intervals
# The minimum intervals for this subscription.
# The minimum intervals for this subscription sorted by the start_date.
#
# @return [Array<Orb::Models::SubscriptionCreateResponse::MinimumInterval>]
required :minimum_intervals, -> { Orb::ArrayOf[Orb::Models::SubscriptionCreateResponse::MinimumInterval] }
Expand Down
9 changes: 5 additions & 4 deletions lib/orb/models/subscription_price_intervals_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ class SubscriptionPriceIntervalsResponse < Orb::BaseModel
required :active_plan_phase_order, Integer, nil?: true

# @!attribute adjustment_intervals
# The adjustment intervals for this subscription.
# The adjustment intervals for this subscription sorted by the start_date of the
# adjustment interval.
#
# @return [Array<Orb::Models::SubscriptionPriceIntervalsResponse::AdjustmentInterval>]
required :adjustment_intervals,
Expand Down Expand Up @@ -97,7 +98,7 @@ class SubscriptionPriceIntervalsResponse < Orb::BaseModel
required :default_invoice_memo, String, nil?: true

# @!attribute discount_intervals
# The discount intervals for this subscription.
# The discount intervals for this subscription sorted by the start_date.
#
# @return [Array<Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::AmountDiscountInterval, Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::PercentageDiscountInterval, Orb::Models::SubscriptionPriceIntervalsResponse::DiscountInterval::UsageDiscountInterval>]
required :discount_intervals,
Expand All @@ -121,7 +122,7 @@ class SubscriptionPriceIntervalsResponse < Orb::BaseModel
required :invoicing_threshold, String, nil?: true

# @!attribute maximum_intervals
# The maximum intervals for this subscription.
# The maximum intervals for this subscription sorted by the start_date.
#
# @return [Array<Orb::Models::SubscriptionPriceIntervalsResponse::MaximumInterval>]
required :maximum_intervals,
Expand All @@ -137,7 +138,7 @@ class SubscriptionPriceIntervalsResponse < Orb::BaseModel
required :metadata, Orb::HashOf[String]

# @!attribute minimum_intervals
# The minimum intervals for this subscription.
# The minimum intervals for this subscription sorted by the start_date.
#
# @return [Array<Orb::Models::SubscriptionPriceIntervalsResponse::MinimumInterval>]
required :minimum_intervals,
Expand Down
9 changes: 5 additions & 4 deletions lib/orb/models/subscription_schedule_plan_change_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ class SubscriptionSchedulePlanChangeResponse < Orb::BaseModel
required :active_plan_phase_order, Integer, nil?: true

# @!attribute adjustment_intervals
# The adjustment intervals for this subscription.
# The adjustment intervals for this subscription sorted by the start_date of the
# adjustment interval.
#
# @return [Array<Orb::Models::SubscriptionSchedulePlanChangeResponse::AdjustmentInterval>]
required :adjustment_intervals,
Expand Down Expand Up @@ -97,7 +98,7 @@ class SubscriptionSchedulePlanChangeResponse < Orb::BaseModel
required :default_invoice_memo, String, nil?: true

# @!attribute discount_intervals
# The discount intervals for this subscription.
# The discount intervals for this subscription sorted by the start_date.
#
# @return [Array<Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::AmountDiscountInterval, Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::PercentageDiscountInterval, Orb::Models::SubscriptionSchedulePlanChangeResponse::DiscountInterval::UsageDiscountInterval>]
required :discount_intervals,
Expand All @@ -121,7 +122,7 @@ class SubscriptionSchedulePlanChangeResponse < Orb::BaseModel
required :invoicing_threshold, String, nil?: true

# @!attribute maximum_intervals
# The maximum intervals for this subscription.
# The maximum intervals for this subscription sorted by the start_date.
#
# @return [Array<Orb::Models::SubscriptionSchedulePlanChangeResponse::MaximumInterval>]
required :maximum_intervals,
Expand All @@ -137,7 +138,7 @@ class SubscriptionSchedulePlanChangeResponse < Orb::BaseModel
required :metadata, Orb::HashOf[String]

# @!attribute minimum_intervals
# The minimum intervals for this subscription.
# The minimum intervals for this subscription sorted by the start_date.
#
# @return [Array<Orb::Models::SubscriptionSchedulePlanChangeResponse::MinimumInterval>]
required :minimum_intervals,
Expand Down
9 changes: 5 additions & 4 deletions lib/orb/models/subscription_trigger_phase_response.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ class SubscriptionTriggerPhaseResponse < Orb::BaseModel
required :active_plan_phase_order, Integer, nil?: true

# @!attribute adjustment_intervals
# The adjustment intervals for this subscription.
# The adjustment intervals for this subscription sorted by the start_date of the
# adjustment interval.
#
# @return [Array<Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval>]
required :adjustment_intervals,
Expand Down Expand Up @@ -97,7 +98,7 @@ class SubscriptionTriggerPhaseResponse < Orb::BaseModel
required :default_invoice_memo, String, nil?: true

# @!attribute discount_intervals
# The discount intervals for this subscription.
# The discount intervals for this subscription sorted by the start_date.
#
# @return [Array<Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::AmountDiscountInterval, Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::PercentageDiscountInterval, Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::UsageDiscountInterval>]
required :discount_intervals,
Expand All @@ -121,7 +122,7 @@ class SubscriptionTriggerPhaseResponse < Orb::BaseModel
required :invoicing_threshold, String, nil?: true

# @!attribute maximum_intervals
# The maximum intervals for this subscription.
# The maximum intervals for this subscription sorted by the start_date.
#
# @return [Array<Orb::Models::SubscriptionTriggerPhaseResponse::MaximumInterval>]
required :maximum_intervals,
Expand All @@ -137,7 +138,7 @@ class SubscriptionTriggerPhaseResponse < Orb::BaseModel
required :metadata, Orb::HashOf[String]

# @!attribute minimum_intervals
# The minimum intervals for this subscription.
# The minimum intervals for this subscription sorted by the start_date.
#
# @return [Array<Orb::Models::SubscriptionTriggerPhaseResponse::MinimumInterval>]
required :minimum_intervals,
Expand Down
Loading
Loading