Class: ClickatellApiClient::API::Client
- Inherits:
-
Object
- Object
- ClickatellApiClient::API::Client
- Defined in:
- lib/clickatell_api_client/api/client.rb
Constant Summary collapse
- NO_ERROR =
200- ERROR_MISSING_FROM_NUMBER =
106- ERROR_TOP_UP_ACCOUNT =
301- PROVIDER_URL =
'https://platform.clickatell.com'.freeze
- MESSAGES_ENDPOINT =
'/messages'.freeze
Instance Attribute Summary collapse
-
#api_key ⇒ Object
readonly
Returns the value of attribute api_key.
Instance Method Summary collapse
-
#initialize(api_key) ⇒ Client
constructor
A new instance of Client.
- #send_message(params) ⇒ Object
Constructor Details
#initialize(api_key) ⇒ Client
Returns a new instance of Client.
18 19 20 |
# File 'lib/clickatell_api_client/api/client.rb', line 18 def initialize(api_key) @api_key = api_key end |
Instance Attribute Details
#api_key ⇒ Object (readonly)
Returns the value of attribute api_key.
16 17 18 |
# File 'lib/clickatell_api_client/api/client.rb', line 16 def api_key @api_key end |
Instance Method Details
#send_message(params) ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/clickatell_api_client/api/client.rb', line 22 def (params) request( http_method: :post, endpoint: MESSAGES_ENDPOINT, params: params ) end |