README.md in paddle-2.0.0 vs README.md in paddle-2.1.0
- old
+ new
@@ -5,11 +5,11 @@
## Installation
Add this line to your application's Gemfile:
```ruby
-gem "paddle", "~> 2.0"
+gem "paddle", "~> 2.1"
```
## Billing API
For accessing the new Billing API from Paddle. For more info, view the [Paddle Billing](https://www.paddle.com/billing) page.
@@ -25,10 +25,13 @@
Paddle.configure do |config|
# Use :development or :sandbox for the Sandbox API
# Or use :production for the Production API
config.environment = :sandbox
config.api_key = ENV["PADDLE_API_KEY"]
+
+ # Set the API version. Defaults to 1
+ config.version = 1
end
```
### Products
@@ -181,10 +184,14 @@
Paddle::Transaction.create(items: [ { price_id: "pri_abc123", quantity: 1 } ])
# Retrieve a transaction
Paddle::Transaction.retrieve(id: "txn_abc123")
+# Retrieve a transaction with extra information
+# extra can be either "address", "adjustment", "adjustments_totals", "business", "customer", "discount"
+Paddle::Transaction.retrieve(id: "txn_abc123", extra: "customer")
+
# Update a transaction
# https://developer.paddle.com/api-reference/transaction/update-transaction
Paddle::Transaction.update(id: "txn_abc123", items: [ { price_id: "pri_abc123", quantity: 2 } ])
# Preview a transaction
@@ -208,9 +215,13 @@
Paddle::Subscription.list(status: "active")
Paddle::Subscription.list(status: "canceled")
# Retrieve a subscription
Paddle::Subscription.retrieve(id: "sub_abc123")
+
+# Retrieve a subscription with extra information
+# extra can be either "next_transaction" or "recurring_transaction_details"
+Paddle::Subscription.retrieve(id: "sub_abc123", extra: "next_transaction")
# Preview an update to a subscription
# https://developer.paddle.com/api-reference/subscriptions/preview-subscription
Paddle::Subscription.preview(id: "sub_abc123", items: [ { price_id: "pri_123abc", quantity: 2 } ])