Method: Simplify::Subscription.find
- Defined in:
- lib/simplify/subscription.rb
.find(id, *auth) ⇒ Object
Retrieve a Subscription object from the API
- id
-
ID of object to retrieve
- auth
-
Authentication information used for the API call. If no value is passed the global keys Simplify::public_key and Simplify::private_key are used. For backwards compatibility the public and private keys may be passed instead of the authentication object.
Returns a Subscription object.
122 123 124 125 126 127 128 129 130 |
# File 'lib/simplify/subscription.rb', line 122 def self.find(id, *auth) auth_obj = Simplify::PaymentsApi.create_auth_object(auth) h = Simplify::PaymentsApi.execute("subscription", 'show', {"id" => id}, auth_obj) obj = Subscription.new() obj.authentication = auth_obj obj = obj.merge!(h) obj end |