Class: Spire::API::Account
- Defined in:
- lib/spire/api/account.rb
Instance Attribute Summary
Attributes inherited from Resource
#capabilities, #properties, #url
Instance Method Summary collapse
-
#billing_subscription(info) ⇒ Account
Updates and subscribe the account to a billing plan.
- #resource_name ⇒ Object
Methods inherited from Resource
#[], #delete, #get, #initialize, #key, #media_type, #method_missing, #respond_to?, #schema, #update
Methods included from Requestable
Constructor Details
This class inherits a constructor from Spire::API::Resource
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Spire::API::Resource
Instance Method Details
#billing_subscription(info) ⇒ Account
Updates and subscribe the account to a billing plan
50 51 52 53 54 55 56 |
# File 'lib/spire/api/account.rb', line 50 def billing_subscription(info) response = request(:billing_subscription) raise "Error attempting to update account billing: (#{response.status}) #{response.body}" if response.status != 200 properties = response.data #@resources["account"] = JSON.parse(response.body) self end |
#resource_name ⇒ Object
5 6 7 |
# File 'lib/spire/api/account.rb', line 5 def resource_name "account" end |