Class: JustCall::Client
- Inherits:
-
Object
- Object
- JustCall::Client
- Includes:
- API
- Defined in:
- lib/justcall_ruby/client.rb
Constant Summary
Constants included from API
API::ROOT_URL, API::USER_AGENT
Instance Attribute Summary collapse
-
#api_key ⇒ Object
readonly
Returns the value of attribute api_key.
-
#api_secret ⇒ Object
readonly
Returns the value of attribute api_secret.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(api_key:, api_secret:) ⇒ Client
constructor
A new instance of Client.
- #sms ⇒ Object
Constructor Details
#initialize(api_key:, api_secret:) ⇒ Client
Returns a new instance of Client.
11 12 13 14 |
# File 'lib/justcall_ruby/client.rb', line 11 def initialize(api_key:, api_secret:) @api_key = api_key @api_secret = api_secret end |
Instance Attribute Details
#api_key ⇒ Object (readonly)
Returns the value of attribute api_key.
9 10 11 |
# File 'lib/justcall_ruby/client.rb', line 9 def api_key @api_key end |
#api_secret ⇒ Object (readonly)
Returns the value of attribute api_secret.
9 10 11 |
# File 'lib/justcall_ruby/client.rb', line 9 def api_secret @api_secret end |
Instance Method Details
#call ⇒ Object
16 17 18 |
# File 'lib/justcall_ruby/client.rb', line 16 def call @call ||= JustCall::Call.new(client: self) end |
#sms ⇒ Object
20 21 22 |
# File 'lib/justcall_ruby/client.rb', line 20 def sms @sms ||= JustCall::SMS.new(client: self) end |