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 @@
{
".": "1.149.0"
".": "1.150.0"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 229
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-bd464d151612058d8029150b376949b22d5515af23621465c0ce1c1069b91644.yml
openapi_spec_hash: e60e1548c523a0ee7c9daa1bd988cbc5
config_hash: ca1425272e17fa23d4466d33492334fa
config_hash: eecc5886c26d07c167f37f30ae505a2c
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 1.150.0 (2025-11-26)

Full Changelog: [v1.149.0...v1.150.0](https://github.com/Increase/increase-ruby/compare/v1.149.0...v1.150.0)

### Features

* **api:** api update ([f837860](https://github.com/Increase/increase-ruby/commit/f83786006c083bfc0a72c3982746194d73edb0b2))

## 1.149.0 (2025-11-24)

Full Changelog: [v1.148.0...v1.149.0](https://github.com/Increase/increase-ruby/compare/v1.148.0...v1.149.0)
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:
increase (1.149.0)
increase (1.150.0)
connection_pool

GEM
Expand Down
70 changes: 7 additions & 63 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application
<!-- x-release-please-start-version -->

```ruby
gem "increase", "~> 1.149.0"
gem "increase", "~> 1.150.0"
```

<!-- x-release-please-end -->
Expand All @@ -31,43 +31,11 @@ increase = Increase::Client.new(
environment: "sandbox" # defaults to "production"
)

account = increase.accounts.create(
name: "New Account!",
entity_id: "entity_n8y8tnk2p9339ti393yi",
program_id: "program_i2v2os4mwza1oetokh9i"
)
account = increase.accounts.create(name: "New Account!")

puts(account.id)
```

### Pagination

List methods in the Increase API are paginated.

This library provides auto-paginating iterators with each list response, so you do not have to request successive pages manually:

```ruby
page = increase.accounts.list

# Fetch single item from page.
account = page.data[0]
puts(account.id)

# Automatically fetches more pages as needed.
page.auto_paging_each do |account|
puts(account.id)
end
```

Alternatively, you can use the `#next_page?` and `#next_page` methods for more granular control working with pages.

```ruby
if page.next_page?
new_page = page.next_page
puts(new_page.data[0].id)
end
```

### File uploads

Request parameters that correspond to file uploads can be passed as raw contents, a [`Pathname`](https://rubyapi.org/3.2/o/pathname) instance, [`StringIO`](https://rubyapi.org/3.2/o/stringio), or more.
Expand Down Expand Up @@ -138,12 +106,7 @@ increase = Increase::Client.new(
)

# Or, configure per-request:
increase.accounts.create(
name: "New Account!",
entity_id: "entity_n8y8tnk2p9339ti393yi",
program_id: "program_i2v2os4mwza1oetokh9i",
request_options: {max_retries: 5}
)
increase.accounts.create(name: "New Account!", request_options: {max_retries: 5})
```

### Timeouts
Expand All @@ -157,12 +120,7 @@ increase = Increase::Client.new(
)

# Or, configure per-request:
increase.accounts.create(
name: "New Account!",
entity_id: "entity_n8y8tnk2p9339ti393yi",
program_id: "program_i2v2os4mwza1oetokh9i",
request_options: {timeout: 5}
)
increase.accounts.create(name: "New Account!", request_options: {timeout: 5})
```

On timeout, `Increase::Errors::APITimeoutError` is raised.
Expand Down Expand Up @@ -195,8 +153,6 @@ Note: the `extra_` parameters of the same name overrides the documented paramete
account =
increase.accounts.create(
name: "New Account!",
entity_id: "entity_n8y8tnk2p9339ti393yi",
program_id: "program_i2v2os4mwza1oetokh9i",
request_options: {
extra_query: {my_query_parameter: value},
extra_body: {my_body_parameter: value},
Expand Down Expand Up @@ -242,29 +198,17 @@ This library provides comprehensive [RBI](https://sorbet.org/docs/rbi) definitio
You can provide typesafe request parameters like so:

```ruby
increase.accounts.create(
name: "New Account!",
entity_id: "entity_n8y8tnk2p9339ti393yi",
program_id: "program_i2v2os4mwza1oetokh9i"
)
increase.accounts.create(name: "New Account!")
```

Or, equivalently:

```ruby
# Hashes work, but are not typesafe:
increase.accounts.create(
name: "New Account!",
entity_id: "entity_n8y8tnk2p9339ti393yi",
program_id: "program_i2v2os4mwza1oetokh9i"
)
increase.accounts.create(name: "New Account!")

# You can also splat a full Params class:
params = Increase::AccountCreateParams.new(
name: "New Account!",
entity_id: "entity_n8y8tnk2p9339ti393yi",
program_id: "program_i2v2os4mwza1oetokh9i"
)
params = Increase::AccountCreateParams.new(name: "New Account!")
increase.accounts.create(**params)
```

Expand Down
Loading