Class: ChargifyApi::Connection
- Inherits:
-
Object
- Object
- ChargifyApi::Connection
- Defined in:
- lib/connection.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
Instance Method Summary collapse
- #get(uri, query_string) ⇒ Object
-
#initialize(api_key, subdomain) ⇒ Connection
constructor
A new instance of Connection.
Constructor Details
#initialize(api_key, subdomain) ⇒ Connection
Returns a new instance of Connection.
5 6 7 8 9 |
# File 'lib/connection.rb', line 5 def initialize(api_key, subdomain) @api_key = api_key @subdomain = subdomain @base_url = "https://#{@subdomain}.chargify.com/" end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
3 4 5 |
# File 'lib/connection.rb', line 3 def @options end |
Instance Method Details
#get(uri, query_string) ⇒ Object
15 16 17 |
# File 'lib/connection.rb', line 15 def get(uri, query_string) HTTParty.get(@base_url + uri, .merge(:query => query_string)) end |