Module: Faturando
- Defined in:
- lib/faturando_api.rb,
lib/faturando_api.rb,
lib/faturando/version.rb
Overview
Version check
Defined Under Namespace
Classes: Base, Customer, Feature, FeatureValue, Plan, Project, Subscription
Constant Summary collapse
- MIN_VERSION =
'2.3.4'
- VERSION =
"0.1.2"
Class Attribute Summary collapse
-
.api_key ⇒ Object
Returns the value of attribute api_key.
-
.format ⇒ Object
Returns the value of attribute format.
-
.project_key ⇒ Object
Returns the value of attribute project_key.
-
.site ⇒ Object
Returns the value of attribute site.
-
.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.
49 50 51 |
# File 'lib/faturando_api.rb', line 49 def api_key @api_key end |
.format ⇒ Object
Returns the value of attribute format.
49 50 51 |
# File 'lib/faturando_api.rb', line 49 def format @format end |
.project_key ⇒ Object
Returns the value of attribute project_key.
49 50 51 |
# File 'lib/faturando_api.rb', line 49 def project_key @project_key end |
.site ⇒ Object
Returns the value of attribute site.
49 50 51 |
# File 'lib/faturando_api.rb', line 49 def site @site end |
.timeout ⇒ Object
Returns the value of attribute timeout.
49 50 51 |
# File 'lib/faturando_api.rb', line 49 def timeout @timeout end |
Class Method Details
.configure {|_self| ... } ⇒ Object
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/faturando_api.rb', line 51 def configure yield self Base.user = api_key Base.password = 'X' Base.timeout = timeout unless (timeout.blank?) self.site ||= "https://faturan.do" project_base_path = site + "/projects/#{project_key}" Base.site = site Plan.site = project_base_path Feature.site = project_base_path Customer.site = project_base_path Subscription.site = project_base_path FeatureValue.site = project_base_path + "/plans/:plan_id" end |