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
The table of contents is too big for display.
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.31"
".": "0.1.0-alpha.32"
}
3 changes: 1 addition & 2 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,7 @@ Naming/ClassAndModuleCamelCase:
- "**/*.rbi"

Naming/MethodParameterName:
Exclude:
- "**/*.rbi"
Enabled: false

Naming/PredicateName:
Exclude:
Expand Down
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.32 (2025-04-02)

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

### Features

* link response models to their methods in yard doc ([#198](https://github.com/orbcorp/orb-ruby/issues/198)) ([6f6cc29](https://github.com/orbcorp/orb-ruby/commit/6f6cc2972dd0f0863201d4d7642dbec922893364))


### Chores

* improve yard docs readability ([#197](https://github.com/orbcorp/orb-ruby/issues/197)) ([6416b4c](https://github.com/orbcorp/orb-ruby/commit/6416b4c1725c50e22dd7360ce0175651cc7b86fa))
* **internal:** codegen related update ([#196](https://github.com/orbcorp/orb-ruby/issues/196)) ([d2e04d6](https://github.com/orbcorp/orb-ruby/commit/d2e04d695150fc6253f47f00693f9967a7fa69d4))
* **internal:** codegen related update ([#199](https://github.com/orbcorp/orb-ruby/issues/199)) ([70d35b6](https://github.com/orbcorp/orb-ruby/commit/70d35b67ae45e59e17e3cbc8b490094b5e74ae75))
* **internal:** codegen related update ([#201](https://github.com/orbcorp/orb-ruby/issues/201)) ([641222f](https://github.com/orbcorp/orb-ruby/commit/641222f1f19b2e4d14e7eabe8f9b4ef429fe02e9))
* **internal:** version bump ([#194](https://github.com/orbcorp/orb-ruby/issues/194)) ([42ffeeb](https://github.com/orbcorp/orb-ruby/commit/42ffeebb1ea9141981bd5a92ad8268db02162d7b))
* order client variables by "importance" ([#200](https://github.com/orbcorp/orb-ruby/issues/200)) ([59fb348](https://github.com/orbcorp/orb-ruby/commit/59fb348f33a4379778338d4f1791707713627a1e))

## 0.1.0-alpha.31 (2025-04-01)

Full Changelog: [v0.1.0-alpha.30...v0.1.0-alpha.31](https://github.com/orbcorp/orb-ruby/compare/v0.1.0-alpha.30...v0.1.0-alpha.31)
Expand Down
2 changes: 1 addition & 1 deletion 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.31)
orb (0.1.0.pre.alpha.32)
connection_pool

GEM
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The underlying REST API documentation can be found on [docs.withorb.com](https:/
To use this gem, install via Bundler by adding the following to your application's `Gemfile`:

```ruby
gem "orb", "~> 0.1.0.pre.alpha.30"
gem "orb", "~> 0.1.0.pre.alpha.31"
```

To fetch an initial copy of the gem:
Expand Down Expand Up @@ -63,7 +63,7 @@ When the library is unable to connect to the API, or if the API returns a non-su
```ruby
begin
customer = orb.customers.create(email: "[email protected]", name: "My Customer")
rescue Orb::Error => e
rescue Orb::Errors::APIError => e
puts(e.status) # 400
end
```
Expand All @@ -79,7 +79,7 @@ Error codes are as followed:
| HTTP 409 | `ConflictError` |
| HTTP 422 | `UnprocessableEntityError` |
| HTTP 429 | `RateLimitError` |
| HTTP >=500 | `InternalServerError` |
| HTTP >= 500 | `InternalServerError` |
| Other HTTP error | `APIStatusError` |
| Timeout | `APITimeoutError` |
| Network error | `APIConnectionError` |
Expand Down
8 changes: 4 additions & 4 deletions lib/orb/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ class Client < Orb::Transport::BaseClient

# Creates and returns a new client for interacting with the API.
#
# @param base_url [String, nil] Override the default base URL for the API, e.g., `"https://api.example.com/v2/"`
#
# @param api_key [String, nil] Defaults to `ENV["ORB_API_KEY"]`
#
# @param base_url [String, nil] Override the default base URL for the API, e.g., `"https://api.example.com/v2/"`
#
# @param max_retries [Integer] Max number of retries to attempt after a failed retryable request.
#
# @param timeout [Float]
Expand All @@ -85,8 +85,8 @@ class Client < Orb::Transport::BaseClient
#
# @param idempotency_header [String]
def initialize(
base_url: nil,
api_key: ENV["ORB_API_KEY"],
base_url: nil,
max_retries: DEFAULT_MAX_RETRIES,
timeout: DEFAULT_TIMEOUT_IN_SECONDS,
initial_retry_delay: DEFAULT_INITIAL_RETRY_DELAY,
Expand All @@ -96,7 +96,7 @@ def initialize(
base_url ||= "https://api.withorb.com/v1"

if api_key.nil?
raise ArgumentError.new("api_key is required")
raise ArgumentError.new("api_key is required, and can be set via environ: \"ORB_API_KEY\"")
end

@api_key = api_key.to_s
Expand Down
Loading
Loading