Module: Chargify
- Defined in:
- lib/chargify_api_ares.rb,
lib/chargify_api_ares.rb
Overview
Version check
Defined Under Namespace
Classes: Base, Component, Customer, PaymentProfile, Product, ProductFamily, Site, Statement, Subscription, Transaction, Usage
Constant Summary collapse
- MIN_VERSION =
'2.3.4'
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.
-
.timeout ⇒ Object
Returns the value of attribute timeout.
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 |
.timeout ⇒ Object
Returns the value of attribute timeout.
53 54 55 |
# File 'lib/chargify_api_ares.rb', line 53 def timeout @timeout 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' Base.timeout = timeout unless (timeout.blank?) self.site ||= "https://#{subdomain}.chargify.com" Base.site = site Subscription::Component.site = site + "/subscriptions/:subscription_id" Subscription::Statement.site = site + "/subscriptions/:subscription_id" Subscription::Transaction.site = site + "/subscriptions/:subscription_id" end |