Class: Chartmogul::Client
- Inherits:
-
Object
- Object
- Chartmogul::Client
- Defined in:
- lib/chartmogul/client.rb
Constant Summary collapse
- BASE_URI =
'https://api.chartmogul.com'
Instance Attribute Summary collapse
-
#account_token ⇒ Object
readonly
Returns the value of attribute account_token.
-
#secret_key ⇒ Object
readonly
Returns the value of attribute secret_key.
Instance Method Summary collapse
-
#customers ⇒ Object
Public: Get customers API.
-
#import ⇒ Object
Public: Get import API.
-
#initialize(account_token: nil, secret_key: nil) ⇒ Client
constructor
Public: Constructor.
-
#userpwd ⇒ Object
Public: Get userpwd.
Constructor Details
#initialize(account_token: nil, secret_key: nil) ⇒ Client
Public: Constructor.
account_token - The String ChartMogul account token. secret_key - The String ChartMogul secret key.
11 12 13 14 |
# File 'lib/chartmogul/client.rb', line 11 def initialize(account_token: nil, secret_key: nil) @account_token = account_token @secret_key = secret_key end |
Instance Attribute Details
#account_token ⇒ Object (readonly)
Returns the value of attribute account_token.
5 6 7 |
# File 'lib/chartmogul/client.rb', line 5 def account_token @account_token end |
#secret_key ⇒ Object (readonly)
Returns the value of attribute secret_key.
5 6 7 |
# File 'lib/chartmogul/client.rb', line 5 def secret_key @secret_key end |
Instance Method Details
#customers ⇒ Object
Public: Get customers API.
Returns the instance of Chartmogul::V1::Customers.
33 34 35 |
# File 'lib/chartmogul/client.rb', line 33 def customers Chartmogul::V1::Customers.new(self) end |
#import ⇒ Object
Public: Get import API.
Returns the instance of Chartmogul::V1::Import.
26 27 28 |
# File 'lib/chartmogul/client.rb', line 26 def import Chartmogul::V1::Import.new(self) end |
#userpwd ⇒ Object
Public: Get userpwd.
Returns the String.
19 20 21 |
# File 'lib/chartmogul/client.rb', line 19 def userpwd "#{account_token}:#{secret_key}" end |