Skip to content

Commit 4165c3b

Browse files
authored
Merge pull request #261 from orbcorp/release-please--branches--main--changes--next
release: 0.5.3
2 parents 1bc0aca + 80e967d commit 4165c3b

File tree

282 files changed

+20356
-7890
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

282 files changed

+20356
-7890
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.5.2"
2+
".": "0.5.3"
33
}

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# Changelog
22

3+
## 0.5.3 (2025-05-22)
4+
5+
Full Changelog: [v0.5.2...v0.5.3](https://github.com/orbcorp/orb-ruby/compare/v0.5.2...v0.5.3)
6+
7+
### Chores
8+
9+
* **docs:** grammar improvements ([3c1a4d4](https://github.com/orbcorp/orb-ruby/commit/3c1a4d421f276c01935659d401c8383470f2f10c))
10+
* force utf-8 locale via `RUBYOPT` when formatting ([42a4919](https://github.com/orbcorp/orb-ruby/commit/42a49195c6ea42836d56e130113158c013f4d5d7))
11+
* **internal:** version bump ([1decdd2](https://github.com/orbcorp/orb-ruby/commit/1decdd2778f75a19da2218937d4a4f6a44009b84))
12+
* refine Yard and Sorbet types and ensure linting is turned on for examples ([8ec00ad](https://github.com/orbcorp/orb-ruby/commit/8ec00ad8007fa9ff78d8c479eb592f3083da8ad9))
13+
* use fully qualified names for yard annotations and rbs aliases ([22efb17](https://github.com/orbcorp/orb-ruby/commit/22efb17c873701d2d583c9c517a128128b1bd4d5))
14+
315
## 0.5.2 (2025-05-20)
416

517
Full Changelog: [v0.5.1...v0.5.2](https://github.com/orbcorp/orb-ruby/compare/v0.5.1...v0.5.2)

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ GIT
1111
PATH
1212
remote: .
1313
specs:
14-
orb-billing (0.5.1)
14+
orb-billing (0.5.2)
1515
connection_pool
1616

1717
GEM

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application
1515
<!-- x-release-please-start-version -->
1616

1717
```ruby
18-
gem "orb-billing", "~> 0.5.2"
18+
gem "orb-billing", "~> 0.5.3"
1919
```
2020

2121
<!-- x-release-please-end -->
@@ -180,7 +180,7 @@ puts(customer[:my_undocumented_property])
180180

181181
#### Undocumented request params
182182

183-
If you want to explicitly send an extra param, you can do so with the `extra_query`, `extra_body`, and `extra_headers` under the `request_options:` parameter when making a request as seen in examples above.
183+
If you want to explicitly send an extra param, you can do so with the `extra_query`, `extra_body`, and `extra_headers` under the `request_options:` parameter when making a request, as seen in the examples above.
184184

185185
#### Undocumented endpoints
186186

@@ -198,7 +198,7 @@ response = client.request(
198198

199199
### Concurrency & connection pooling
200200

201-
The `Orb::Client` instances are threadsafe, but only are fork-safe when there are no in-flight HTTP requests.
201+
The `Orb::Client` instances are threadsafe, but are only are fork-safe when there are no in-flight HTTP requests.
202202

203203
Each instance of `Orb::Client` has its own HTTP connection pool with a default size of 99. As such, we recommend instantiating the client once per application in most settings.
204204

@@ -248,7 +248,7 @@ orb.credit_notes.create(
248248
#
249249
)
250250

251-
# Literal values is also permissible:
251+
# Literal values are also permissible:
252252
orb.credit_notes.create(
253253
reason: :duplicate,
254254
#

Rakefile

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ require "rake/clean"
99
require "rubocop/rake_task"
1010

1111
tapioca = "sorbet/tapioca"
12+
examples = "examples"
1213
ignore_file = ".ignore"
1314

1415
CLEAN.push(*%w[.idea/ .ruby-lsp/ .yardoc/ doc/], *FileList["*.gem"], ignore_file)
@@ -35,11 +36,11 @@ multitask(:test) do
3536
end
3637

3738
xargs = %w[xargs --no-run-if-empty --null --max-procs=0 --max-args=300 --]
38-
locale = {"LC_ALL" => "C.UTF-8"}
39+
ruby_opt = {"RUBYOPT" => [ENV["RUBYOPT"], "--encoding=UTF-8"].compact.join(" ")}
3940

4041
desc("Lint `*.rb(i)`")
4142
multitask(:"lint:rubocop") do
42-
find = %w[find ./lib ./test ./rbi -type f -and ( -name *.rb -or -name *.rbi ) -print0]
43+
find = %w[find ./lib ./test ./rbi ./examples -type f -and ( -name *.rb -or -name *.rbi ) -print0]
4344

4445
rubocop = %w[rubocop]
4546
rubocop += %w[--format github] if ENV.key?("CI")
@@ -54,7 +55,7 @@ end
5455
desc("Format `*.rb`")
5556
multitask(:"format:rb") do
5657
# while `syntax_tree` is much faster than `rubocop`, `rubocop` is the only formatter with full syntax support
57-
find = %w[find ./lib ./test -type f -and -name *.rb -print0]
58+
find = %w[find ./lib ./test ./examples -type f -and -name *.rb -print0]
5859
fmt = xargs + %w[rubocop --fail-level F --autocorrect --format simple --]
5960
sh("#{find.shelljoin} | #{fmt.shelljoin}")
6061
end
@@ -63,7 +64,7 @@ desc("Format `*.rbi`")
6364
multitask(:"format:rbi") do
6465
find = %w[find ./rbi -type f -and -name *.rbi -print0]
6566
fmt = xargs + %w[stree write --]
66-
sh(locale, "#{find.shelljoin} | #{fmt.shelljoin}")
67+
sh(ruby_opt, "#{find.shelljoin} | #{fmt.shelljoin}")
6768
end
6869

6970
desc("Format `*.rbs`")
@@ -99,7 +100,7 @@ multitask(:"format:rbs") do
99100
# transform class aliases to type aliases, which syntax tree has no trouble with
100101
sh("#{find.shelljoin} | #{pre.shelljoin}")
101102
# run syntax tree to format `*.rbs` files
102-
sh(locale, "#{find.shelljoin} | #{fmt.shelljoin}") do
103+
sh(ruby_opt, "#{find.shelljoin} | #{fmt.shelljoin}") do
103104
success = _1
104105
end
105106
# transform type aliases back to class aliases
@@ -117,12 +118,14 @@ multitask(:"typecheck:steep") do
117118
sh(*%w[steep check])
118119
end
119120

121+
directory(examples)
122+
120123
desc("Typecheck `*.rbi`")
121-
multitask(:"typecheck:sorbet") do
122-
sh(*%w[srb typecheck])
124+
multitask("typecheck:sorbet": examples) do
125+
sh(*%w[srb typecheck --dir], examples)
123126
end
124127

125-
file(tapioca) do
128+
directory(tapioca) do
126129
sh(*%w[tapioca init])
127130
end
128131

SECURITY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ before making any information public.
1616
## Reporting Non-SDK Related Security Issues
1717

1818
If you encounter security issues that are not directly related to SDKs but pertain to the services
19-
or products provided by Orb please follow the respective company's security reporting guidelines.
19+
or products provided by Orb, please follow the respective company's security reporting guidelines.
2020

2121
### Orb Terms and Policies
2222

23-
Please contact team@withorb.com for any questions or concerns regarding security of our services.
23+
Please contact team@withorb.com for any questions or concerns regarding the security of our services.
2424

2525
---
2626

lib/orb/internal.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,8 @@ module Internal
1313
define_sorbet_constant!(:AnyHash) do
1414
T.type_alias { T::Hash[Symbol, T.anything] }
1515
end
16+
define_sorbet_constant!(:FileInput) do
17+
T.type_alias { T.any(Pathname, StringIO, IO, String, Orb::FilePart) }
18+
end
1619
end
1720
end

lib/orb/models/alert.rb

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class Alert < Orb::Internal::Type::BaseModel
2525
# @!attribute customer
2626
# The customer the alert applies to.
2727
#
28-
# @return [Orb::Alert::Customer, nil]
28+
# @return [Orb::Models::Alert::Customer, nil]
2929
required :customer, -> { Orb::Alert::Customer }, nil?: true
3030

3131
# @!attribute enabled
@@ -37,37 +37,37 @@ class Alert < Orb::Internal::Type::BaseModel
3737
# @!attribute metric
3838
# The metric the alert applies to.
3939
#
40-
# @return [Orb::Alert::Metric, nil]
40+
# @return [Orb::Models::Alert::Metric, nil]
4141
required :metric, -> { Orb::Alert::Metric }, nil?: true
4242

4343
# @!attribute plan
4444
# The plan the alert applies to.
4545
#
46-
# @return [Orb::Alert::Plan, nil]
46+
# @return [Orb::Models::Alert::Plan, nil]
4747
required :plan, -> { Orb::Alert::Plan }, nil?: true
4848

4949
# @!attribute subscription
5050
# The subscription the alert applies to.
5151
#
52-
# @return [Orb::Alert::Subscription, nil]
52+
# @return [Orb::Models::Alert::Subscription, nil]
5353
required :subscription, -> { Orb::Alert::Subscription }, nil?: true
5454

5555
# @!attribute thresholds
5656
# The thresholds that define the conditions under which the alert will be
5757
# triggered.
5858
#
59-
# @return [Array<Orb::Alert::Threshold>, nil]
59+
# @return [Array<Orb::Models::Alert::Threshold>, nil]
6060
required :thresholds, -> { Orb::Internal::Type::ArrayOf[Orb::Alert::Threshold] }, nil?: true
6161

6262
# @!attribute type
6363
# The type of alert. This must be a valid alert type.
6464
#
65-
# @return [Symbol, Orb::Alert::Type]
65+
# @return [Symbol, Orb::Models::Alert::Type]
6666
required :type, enum: -> { Orb::Alert::Type }
6767

6868
# @!method initialize(id:, created_at:, currency:, customer:, enabled:, metric:, plan:, subscription:, thresholds:, type:)
69-
# Some parameter documentations has been truncated, see {Orb::Alert} for more
70-
# details.
69+
# Some parameter documentations has been truncated, see {Orb::Models::Alert} for
70+
# more details.
7171
#
7272
# [Alerts within Orb](/product-catalog/configuring-alerts) monitor spending,
7373
# usage, or credit balance and trigger webhooks when a threshold is exceeded.
@@ -81,21 +81,21 @@ class Alert < Orb::Internal::Type::BaseModel
8181
#
8282
# @param currency [String, nil] The name of the currency the credit balance or invoice cost is denominated in.
8383
#
84-
# @param customer [Orb::Alert::Customer, nil] The customer the alert applies to.
84+
# @param customer [Orb::Models::Alert::Customer, nil] The customer the alert applies to.
8585
#
8686
# @param enabled [Boolean] Whether the alert is enabled or disabled.
8787
#
88-
# @param metric [Orb::Alert::Metric, nil] The metric the alert applies to.
88+
# @param metric [Orb::Models::Alert::Metric, nil] The metric the alert applies to.
8989
#
90-
# @param plan [Orb::Alert::Plan, nil] The plan the alert applies to.
90+
# @param plan [Orb::Models::Alert::Plan, nil] The plan the alert applies to.
9191
#
92-
# @param subscription [Orb::Alert::Subscription, nil] The subscription the alert applies to.
92+
# @param subscription [Orb::Models::Alert::Subscription, nil] The subscription the alert applies to.
9393
#
94-
# @param thresholds [Array<Orb::Alert::Threshold>, nil] The thresholds that define the conditions under which the alert will be triggere
94+
# @param thresholds [Array<Orb::Models::Alert::Threshold>, nil] The thresholds that define the conditions under which the alert will be triggere
9595
#
96-
# @param type [Symbol, Orb::Alert::Type] The type of alert. This must be a valid alert type.
96+
# @param type [Symbol, Orb::Models::Alert::Type] The type of alert. This must be a valid alert type.
9797

98-
# @see Orb::Alert#customer
98+
# @see Orb::Models::Alert#customer
9999
class Customer < Orb::Internal::Type::BaseModel
100100
# @!attribute id
101101
#
@@ -114,7 +114,7 @@ class Customer < Orb::Internal::Type::BaseModel
114114
# @param external_customer_id [String, nil]
115115
end
116116

117-
# @see Orb::Alert#metric
117+
# @see Orb::Models::Alert#metric
118118
class Metric < Orb::Internal::Type::BaseModel
119119
# @!attribute id
120120
#
@@ -127,7 +127,7 @@ class Metric < Orb::Internal::Type::BaseModel
127127
# @param id [String]
128128
end
129129

130-
# @see Orb::Alert#plan
130+
# @see Orb::Models::Alert#plan
131131
class Plan < Orb::Internal::Type::BaseModel
132132
# @!attribute id
133133
#
@@ -153,8 +153,8 @@ class Plan < Orb::Internal::Type::BaseModel
153153
required :plan_version, String
154154

155155
# @!method initialize(id:, external_plan_id:, name:, plan_version:)
156-
# Some parameter documentations has been truncated, see {Orb::Alert::Plan} for
157-
# more details.
156+
# Some parameter documentations has been truncated, see {Orb::Models::Alert::Plan}
157+
# for more details.
158158
#
159159
# The plan the alert applies to.
160160
#
@@ -167,7 +167,7 @@ class Plan < Orb::Internal::Type::BaseModel
167167
# @param plan_version [String]
168168
end
169169

170-
# @see Orb::Alert#subscription
170+
# @see Orb::Models::Alert#subscription
171171
class Subscription < Orb::Internal::Type::BaseModel
172172
# @!attribute id
173173
#
@@ -190,8 +190,8 @@ class Threshold < Orb::Internal::Type::BaseModel
190190
required :value, Float
191191

192192
# @!method initialize(value:)
193-
# Some parameter documentations has been truncated, see {Orb::Alert::Threshold}
194-
# for more details.
193+
# Some parameter documentations has been truncated, see
194+
# {Orb::Models::Alert::Threshold} for more details.
195195
#
196196
# Thresholds are used to define the conditions under which an alert will be
197197
# triggered.
@@ -201,7 +201,7 @@ class Threshold < Orb::Internal::Type::BaseModel
201201

202202
# The type of alert. This must be a valid alert type.
203203
#
204-
# @see Orb::Alert#type
204+
# @see Orb::Models::Alert#type
205205
module Type
206206
extend Orb::Internal::Type::Enum
207207

lib/orb/models/alert_create_for_customer_params.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,23 @@ class AlertCreateForCustomerParams < Orb::Internal::Type::BaseModel
1616
# @!attribute type
1717
# The type of alert to create. This must be a valid alert type.
1818
#
19-
# @return [Symbol, Orb::AlertCreateForCustomerParams::Type]
19+
# @return [Symbol, Orb::Models::AlertCreateForCustomerParams::Type]
2020
required :type, enum: -> { Orb::AlertCreateForCustomerParams::Type }
2121

2222
# @!attribute thresholds
2323
# The thresholds that define the values at which the alert will be triggered.
2424
#
25-
# @return [Array<Orb::AlertCreateForCustomerParams::Threshold>, nil]
25+
# @return [Array<Orb::Models::AlertCreateForCustomerParams::Threshold>, nil]
2626
optional :thresholds,
2727
-> { Orb::Internal::Type::ArrayOf[Orb::AlertCreateForCustomerParams::Threshold] },
2828
nil?: true
2929

3030
# @!method initialize(currency:, type:, thresholds: nil, request_options: {})
3131
# @param currency [String] The case sensitive currency or custom pricing unit to use for this alert.
3232
#
33-
# @param type [Symbol, Orb::AlertCreateForCustomerParams::Type] The type of alert to create. This must be a valid alert type.
33+
# @param type [Symbol, Orb::Models::AlertCreateForCustomerParams::Type] The type of alert to create. This must be a valid alert type.
3434
#
35-
# @param thresholds [Array<Orb::AlertCreateForCustomerParams::Threshold>, nil] The thresholds that define the values at which the alert will be triggered.
35+
# @param thresholds [Array<Orb::Models::AlertCreateForCustomerParams::Threshold>, nil] The thresholds that define the values at which the alert will be triggered.
3636
#
3737
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
3838

@@ -59,7 +59,7 @@ class Threshold < Orb::Internal::Type::BaseModel
5959

6060
# @!method initialize(value:)
6161
# Some parameter documentations has been truncated, see
62-
# {Orb::AlertCreateForCustomerParams::Threshold} for more details.
62+
# {Orb::Models::AlertCreateForCustomerParams::Threshold} for more details.
6363
#
6464
# Thresholds are used to define the conditions under which an alert will be
6565
# triggered.

lib/orb/models/alert_create_for_external_customer_params.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,23 @@ class AlertCreateForExternalCustomerParams < Orb::Internal::Type::BaseModel
1616
# @!attribute type
1717
# The type of alert to create. This must be a valid alert type.
1818
#
19-
# @return [Symbol, Orb::AlertCreateForExternalCustomerParams::Type]
19+
# @return [Symbol, Orb::Models::AlertCreateForExternalCustomerParams::Type]
2020
required :type, enum: -> { Orb::AlertCreateForExternalCustomerParams::Type }
2121

2222
# @!attribute thresholds
2323
# The thresholds that define the values at which the alert will be triggered.
2424
#
25-
# @return [Array<Orb::AlertCreateForExternalCustomerParams::Threshold>, nil]
25+
# @return [Array<Orb::Models::AlertCreateForExternalCustomerParams::Threshold>, nil]
2626
optional :thresholds,
2727
-> { Orb::Internal::Type::ArrayOf[Orb::AlertCreateForExternalCustomerParams::Threshold] },
2828
nil?: true
2929

3030
# @!method initialize(currency:, type:, thresholds: nil, request_options: {})
3131
# @param currency [String] The case sensitive currency or custom pricing unit to use for this alert.
3232
#
33-
# @param type [Symbol, Orb::AlertCreateForExternalCustomerParams::Type] The type of alert to create. This must be a valid alert type.
33+
# @param type [Symbol, Orb::Models::AlertCreateForExternalCustomerParams::Type] The type of alert to create. This must be a valid alert type.
3434
#
35-
# @param thresholds [Array<Orb::AlertCreateForExternalCustomerParams::Threshold>, nil] The thresholds that define the values at which the alert will be triggered.
35+
# @param thresholds [Array<Orb::Models::AlertCreateForExternalCustomerParams::Threshold>, nil] The thresholds that define the values at which the alert will be triggered.
3636
#
3737
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
3838

@@ -59,7 +59,7 @@ class Threshold < Orb::Internal::Type::BaseModel
5959

6060
# @!method initialize(value:)
6161
# Some parameter documentations has been truncated, see
62-
# {Orb::AlertCreateForExternalCustomerParams::Threshold} for more details.
62+
# {Orb::Models::AlertCreateForExternalCustomerParams::Threshold} for more details.
6363
#
6464
# Thresholds are used to define the conditions under which an alert will be
6565
# triggered.

0 commit comments

Comments
 (0)