Module: Chargify
- Defined in:
- lib/chargify_api_ares.rb,
lib/chargify_api_ares.rb
Overview
Version check
Defined Under Namespace
Classes: Base, Component, Customer, Product, ProductFamily, Subscription, Usage
Constant Summary collapse
- ARES_VERSIONS =
['2.3.4', '2.3.5', '2.3.8']
Class Attribute Summary collapse
-
.api_key ⇒ Object
Returns the value of attribute api_key.
-
.format ⇒ Object
Returns the value of attribute format.
-
.site ⇒ Object
Returns the value of attribute site.
-
.subdomain ⇒ Object
Returns the value of attribute subdomain.
Class Method Summary collapse
Class Attribute Details
.api_key ⇒ Object
Returns the value of attribute api_key.
53 54 55 |
# File 'lib/chargify_api_ares.rb', line 53 def api_key @api_key end |
.format ⇒ Object
Returns the value of attribute format.
53 54 55 |
# File 'lib/chargify_api_ares.rb', line 53 def format @format end |
.site ⇒ Object
Returns the value of attribute site.
53 54 55 |
# File 'lib/chargify_api_ares.rb', line 53 def site @site end |
.subdomain ⇒ Object
Returns the value of attribute subdomain.
53 54 55 |
# File 'lib/chargify_api_ares.rb', line 53 def subdomain @subdomain end |
Class Method Details
.configure {|_self| ... } ⇒ Object
55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/chargify_api_ares.rb', line 55 def configure yield self Base.user = api_key Base.password = 'X' if site.blank? Base.site = "https://#{subdomain}.chargify.com" Subscription::Component.site = "https://#{subdomain}.chargify.com/subscriptions/:subscription_id" else Base.site = site Subscription::Component.site = site + "/subscriptions/:subscription_id" end end |