README.md in recurly-3.0.0.beta.3 vs README.md in recurly-3.0.0.beta.4
- old
+ new
@@ -13,11 +13,11 @@
### Installing
This gem is a pre-release. In your Gemfile, add `recurly` as a dependency.
```ruby
-gem 'recurly', '3.0.0.beta.3'
+gem 'recurly', '3.0.0.beta.4'
```
It's important that you lock on a specific version as there may be breaking changes between releases.
All beta releases will have the format `3.0.0.beta.x` until we go live.
@@ -46,11 +46,11 @@
Recurly::Client.new(subdomain: 'mysite-prod', api_key: API_KEY) do |client|
sub = client.get_subscription(subscription_id: 'abcd123456')
end
```
-If you only plan on using the client for more than one site, you should initialize a new client for each site.
+If you plan on using the client for more than one site, you should initialize a new client for each site.
```ruby
# Give a `site_id`
client = Recurly::Client.new(api_key: API_KEY, site_id: SITE_ID)
# Or use the subdomain
@@ -110,10 +110,11 @@
Pagination endpoints take a number of options to sort and filter the results. They can be passed in as keyword arguments.
The names, types, and descriptions of these arguments are listed in the rubydocs for each method:
```ruby
options = {
+ limit: 200, # number of items per page
state: :active, # only active plans
sort: :updated_at,
order: :asc,
begin_time: DateTime.new(2017,1,1), # January 1st 2017,
end_time: DateTime.now
@@ -122,9 +123,15 @@
plans = client.list_plans(**options)
plans.each do |plan|
puts "Plan: #{plan.id}"
end
```
+
+**A note on `limit`**:
+
+`limit` defaults to 20 items per page and can be set from 1 to 200. Choosing a lower limit means more network requests but smaller payloads.
+We recommend keeping the default for most cases but increasing the limit if you are planning on iterating through many pages of items (e.g. all transactions in your site).
+
### Creating Resources
Currently, resources are created by passing in a `body` keyword argument in the form of a `Hash`.
This Hash must follow the schema of the documented request type. For example, the `create_plan` operation