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.15"
".": "0.1.0-alpha.16"
}
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
# Changelog

## 0.1.0-alpha.16 (2025-02-28)

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

### Features

* **internal:** modified tests for thread and fiber safety ([#82](https://github.com/orbcorp/orb-ruby/issues/82)) ([a133366](https://github.com/orbcorp/orb-ruby/commit/a13336658840813e03b78c935b37691794213a58))


### Bug Fixes

* better support header parameters ([#83](https://github.com/orbcorp/orb-ruby/issues/83)) ([4ad1f41](https://github.com/orbcorp/orb-ruby/commit/4ad1f41c3238a3d9e089dcfce72079a76868eb1e))


### Chores

* **internal:** version bump ([#79](https://github.com/orbcorp/orb-ruby/issues/79)) ([01fd69a](https://github.com/orbcorp/orb-ruby/commit/01fd69a0b7be1b6b394b9b3c39410d4782382ce3))


### Documentation

* update URLs from stainlessapi.com to stainless.com ([#81](https://github.com/orbcorp/orb-ruby/issues/81)) ([333e153](https://github.com/orbcorp/orb-ruby/commit/333e1539913d5b7e5298e5de7a6574456b5d8975))

## 0.1.0-alpha.15 (2025-02-27)

Full Changelog: [v0.1.0-alpha.14...v0.1.0-alpha.15](https://github.com/orbcorp/orb-ruby/compare/v0.1.0-alpha.14...v0.1.0-alpha.15)
Expand Down
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ source "https://rubygems.org"
gemspec

group :development do
gem "async"
gem "minitest"
gem "minitest-focus"
gem "minitest-hooks"
gem "minitest-proveit"
gem "minitest-rg"
gem "rake"
gem "rbs"
gem "rubocop"
Expand Down
46 changes: 35 additions & 11 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.15)
orb (0.1.0.pre.alpha.16)
connection_pool

GEM
Expand All @@ -30,30 +30,50 @@ GEM
securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5)
ast (2.4.2)
async (2.23.0)
console (~> 1.29)
fiber-annotation
io-event (~> 1.9)
metrics (~> 0.12)
traces (~> 0.15)
base64 (0.2.0)
benchmark (0.4.0)
bigdecimal (3.1.9)
concurrent-ruby (1.3.5)
connection_pool (2.5.0)
console (1.29.3)
fiber-annotation
fiber-local (~> 1.1)
json
csv (3.3.2)
drb (2.2.1)
erubi (1.13.1)
ffi (1.17.1)
fiber-annotation (0.2.0)
fiber-local (1.1.0)
fiber-storage
fiber-storage (1.0.0)
fileutils (1.7.3)
i18n (1.14.7)
concurrent-ruby (~> 1.0)
io-event (1.9.0)
json (2.10.1)
language_server-protocol (3.17.0.4)
lint_roller (1.1.0)
listen (3.9.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
logger (1.6.6)
metrics (0.12.1)
minitest (5.25.4)
minitest-focus (1.4.0)
minitest (>= 4, < 6)
minitest-hooks (1.5.2)
minitest (> 5.3)
minitest-proveit (1.0.0)
minitest (> 5, < 7)
minitest-rg (5.3.0)
minitest (~> 5.0)
netrc (0.11.0)
parallel (1.26.3)
parser (3.3.7.1)
Expand Down Expand Up @@ -84,18 +104,18 @@ GEM
rubocop-ast (>= 1.38.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.38.0)
rubocop-ast (1.38.1)
parser (>= 3.3.1.0)
ruby-progressbar (1.13.0)
securerandom (0.4.1)
sorbet (0.5.11834)
sorbet-static (= 0.5.11834)
sorbet-runtime (0.5.11834)
sorbet-static (0.5.11834-x86_64-linux)
sorbet-static-and-runtime (0.5.11834)
sorbet (= 0.5.11834)
sorbet-runtime (= 0.5.11834)
spoom (1.5.3)
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)
spoom (1.5.4)
erubi (>= 1.10.0)
prism (>= 0.28.0)
rbi (>= 0.2.3)
Expand All @@ -120,7 +140,7 @@ GEM
strscan (3.1.2)
syntax_tree (6.2.0)
prettier_print (>= 1.2.0)
tapioca (0.16.10)
tapioca (0.16.11)
benchmark
bundler (>= 2.2.25)
netrc (>= 0.11.0)
Expand All @@ -133,6 +153,7 @@ GEM
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
thor (1.3.2)
traces (0.15.2)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.6.0)
Expand All @@ -147,9 +168,12 @@ PLATFORMS
x86_64-linux

DEPENDENCIES
async
minitest
minitest-focus
minitest-hooks
minitest-proveit
minitest-rg
orb!
rake
rbs
Expand Down
4 changes: 2 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

## Reporting Security Issues

This SDK is generated by [Stainless Software Inc](http://stainlessapi.com). Stainless takes security seriously, and encourages you to report any security vulnerability promptly so that appropriate action can be taken.
This SDK is generated by [Stainless Software Inc](http://stainless.com). Stainless takes security seriously, and encourages you to report any security vulnerability promptly so that appropriate action can be taken.

To report a security issue, please contact the Stainless team at security@stainlessapi.com.
To report a security issue, please contact the Stainless team at security@stainless.com.

## Responsible Disclosure

Expand Down
8 changes: 4 additions & 4 deletions lib/orb/base_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
# @param max_retries [Integer]
# @param initial_retry_delay [Float]
# @param max_retry_delay [Float]
# @param headers [Hash{String=>String, nil}]
# @param headers [Hash{String=>String, Integer, Array<String, Integer, nil>, nil}]
# @param idempotency_header [String, nil]
#
def initialize(
Expand Down Expand Up @@ -193,7 +193,7 @@
#
# @option req [Hash{String=>Array<String>, String, nil}, nil] :query
#
# @option req [Hash{String=>String, nil}, nil] :headers
# @option req [Hash{String=>String, Integer, Array<String, Integer, nil>, nil}, nil] :headers
#
# @option req [Object, nil] :body
#
Expand Down Expand Up @@ -399,7 +399,7 @@
#
# @option req [Hash{String=>Array<String>, String, nil}, nil] :query
#
# @option req [Hash{String=>String, nil}, nil] :headers
# @option req [Hash{String=>String, Integer, Array<String, Integer, nil>, nil}, nil] :headers
#
# @option req [Object, nil] :body
#
Expand Down Expand Up @@ -442,7 +442,7 @@
#
# @option req [Hash{String=>Array<String>, String, nil}, nil] :query
#
# @option req [Hash{String=>String, nil}, nil] :headers
# @option req [Hash{String=>String, Integer, Array<String, Integer, nil>, nil}, nil] :headers
#
# @option req [Object, nil] :body
#
Expand Down Expand Up @@ -478,7 +478,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 481 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/resources/customers/credits/top_ups.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def list(customer_id, params = {})
#
def delete(top_up_id, params)
parsed, options = Orb::Models::Customers::Credits::TopUpDeleteParams.dump_request(params)
customer_id = parsed.fetch(:customer_id) do
customer_id = parsed.delete(:customer_id) do
raise ArgumentError.new("missing required path argument #{_1}")
end
@client.request(
Expand Down Expand Up @@ -167,7 +167,7 @@ def create_by_external_id(external_customer_id, params)
#
def delete_by_external_id(top_up_id, params)
parsed, options = Orb::Models::Customers::Credits::TopUpDeleteByExternalIDParams.dump_request(params)
external_customer_id = parsed.fetch(:external_customer_id) do
external_customer_id = parsed.delete(:external_customer_id) do
raise ArgumentError.new("missing required path argument #{_1}")
end
@client.request(
Expand Down
10 changes: 8 additions & 2 deletions lib/orb/util.rb
Original file line number Diff line number Diff line change
Expand Up @@ -382,13 +382,19 @@ def join_parsed_uri(lhs, rhs)
class << self
# @private
#
# @param headers [Array<Hash{String=>String, Integer, nil}>]
# @param headers [Hash{String=>String, Integer, Array<String, Integer, nil>, nil}]
#
# @return [Hash{String=>String}]
#
def normalized_headers(*headers)
{}.merge(*headers.compact).to_h do |key, val|
[key.downcase, val&.to_s&.strip]
case val
in Array
val.map { _1.to_s.strip }.join(", ")
else
val&.to_s&.strip
end
[key.downcase, val]
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/orb/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Orb
VERSION = "0.1.0-alpha.15"
VERSION = "0.1.0-alpha.16"
end
25 changes: 22 additions & 3 deletions rbi/lib/orb/base_client.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,16 @@ module Orb
method: Symbol,
path: T.any(String, T::Array[String]),
query: T.nilable(T::Hash[String, T.nilable(T.any(T::Array[String], String))]),
headers: T.nilable(T::Hash[String, T.nilable(String)]),
headers: T.nilable(
T::Hash[String,
T.nilable(
T.any(
String,
Integer,
T::Array[T.nilable(T.any(String, Integer))]
)
)]
),
body: T.nilable(T.anything),
unwrap: T.nilable(Symbol),
page: T.nilable(T::Class[Orb::BaseModel]),
Expand Down Expand Up @@ -69,7 +78,8 @@ module Orb
max_retries: Integer,
initial_retry_delay: Float,
max_retry_delay: Float,
headers: T::Hash[String, T.nilable(String)],
headers: T::Hash[String,
T.nilable(T.any(String, Integer, T::Array[T.nilable(T.any(String, Integer))]))],
idempotency_header: T.nilable(String)
)
.void
Expand Down Expand Up @@ -133,7 +143,16 @@ module Orb
method: Symbol,
path: T.any(String, T::Array[String]),
query: T.nilable(T::Hash[String, T.nilable(T.any(T::Array[String], String))]),
headers: T.nilable(T::Hash[String, T.nilable(String)]),
headers: T.nilable(
T::Hash[String,
T.nilable(
T.any(
String,
Integer,
T::Array[T.nilable(T.any(String, Integer))]
)
)]
),
body: T.nilable(T.anything),
unwrap: T.nilable(Symbol),
page: T.nilable(T::Class[Orb::BaseModel]),
Expand Down
5 changes: 4 additions & 1 deletion rbi/lib/orb/util.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,10 @@ module Orb
end

sig do
params(headers: T::Array[T::Hash[String, T.nilable(T.any(String, Integer))]])
params(
headers: T::Hash[String,
T.nilable(T.any(String, Integer, T::Array[T.nilable(T.any(String, Integer))]))]
)
.returns(T::Hash[String, String])
end
def self.normalized_headers(*headers)
Expand Down
2 changes: 1 addition & 1 deletion rbi/lib/orb/version.rbi
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# typed: strong

module Orb
VERSION = "0.1.0-alpha.15"
VERSION = "0.1.0-alpha.16"
end
12 changes: 9 additions & 3 deletions sig/orb/base_client.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ module Orb
method: Symbol,
path: String | ::Array[String],
query: ::Hash[String, (::Array[String] | String)?]?,
headers: ::Hash[String, String?]?,
headers: ::Hash[String, (String
| Integer
| ::Array[(String | Integer)?])?]?,
body: top?,
unwrap: Symbol?,
page: Class?,
Expand Down Expand Up @@ -49,7 +51,9 @@ module Orb
max_retries: Integer,
initial_retry_delay: Float,
max_retry_delay: Float,
headers: ::Hash[String, String?],
headers: ::Hash[String, (String
| Integer
| ::Array[(String | Integer)?])?],
idempotency_header: String?
) -> void

Expand Down Expand Up @@ -85,7 +89,9 @@ module Orb
Symbol method,
String | ::Array[String] path,
query: ::Hash[String, (::Array[String] | String)?]?,
headers: ::Hash[String, String?]?,
headers: ::Hash[String, (String
| Integer
| ::Array[(String | Integer)?])?]?,
body: top?,
unwrap: Symbol?,
page: Class?,
Expand Down
4 changes: 3 additions & 1 deletion sig/orb/util.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ module Orb
) -> URI::Generic

def self?.normalized_headers: (
*::Array[::Hash[String, (String | Integer)?]] headers
*::Hash[String, (String
| Integer
| ::Array[(String | Integer)?])?] headers
) -> ::Hash[String, String]

def self?.encode_multipart_formdata: (
Expand Down
2 changes: 1 addition & 1 deletion sig/orb/version.rbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Orb
VERSION: "0.1.0-alpha.14"
VERSION: "0.1.0-alpha.15"
end
Loading
Loading