Skip to content

Commit 6f9366c

Browse files
committed
Add deprecation warnings
1 parent 7a8c082 commit 6f9366c

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ as methods on the client object. The following methods are currently available:
122122

123123
#### Orders
124124

125+
**Note:** The beta purchases endpoint has been deprecated and its methods have been removed from the gem except `create_purchase`, which now sends requests to the Order creation endpoint [here](https://developer.drip.com/#orders)
126+
125127
| Actions | Methods |
126128
| :------------------------- | :--------------------------------------------------- |
127129
| Create or update an order | `#create_or_update_order(email, options = {})` |

lib/drip/client/purchases.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@ module Purchases
99
# Drip API docs for the required schema.
1010
# Returns a Drip::Response.
1111
# See https://developer.drip.com/#orders
12+
#
13+
# DEPRECATED: The beta Purchase endpoint has been deprecated and this method now sends
14+
# requests to the Order creation endpoint. Please use `create_or_update_order` instead
1215
def create_purchase(email, amount, options = {})
16+
warn "[DEPRECATED] `create_purchase` is deprecated. Please use `create_or_update_order` instead."
17+
1318
data = options.merge({ amount: amount, email: email })
1419
post "#{account_id}/orders", generate_resource("orders", data)
1520
end

0 commit comments

Comments
 (0)