Class: Smess::LinkMobility
- Defined in:
- lib/smess/outputs/link_mobility.rb
Instance Attribute Summary collapse
-
#gate_id ⇒ Object
Returns the value of attribute gate_id.
-
#password ⇒ Object
Returns the value of attribute password.
-
#platform_id ⇒ Object
Returns the value of attribute platform_id.
-
#platform_partner_id ⇒ Object
Returns the value of attribute platform_partner_id.
-
#username ⇒ Object
Returns the value of attribute username.
Attributes inherited from Output
Instance Method Summary collapse
Methods inherited from HttpBase
Methods included from Logging
Methods inherited from Output
#check, #initialize, #send_feedback, #verify
Constructor Details
This class inherits a constructor from Smess::HttpBase
Instance Attribute Details
#gate_id ⇒ Object
Returns the value of attribute gate_id.
17 18 19 |
# File 'lib/smess/outputs/link_mobility.rb', line 17 def gate_id @gate_id end |
#password ⇒ Object
Returns the value of attribute password.
17 18 19 |
# File 'lib/smess/outputs/link_mobility.rb', line 17 def password @password end |
#platform_id ⇒ Object
Returns the value of attribute platform_id.
17 18 19 |
# File 'lib/smess/outputs/link_mobility.rb', line 17 def platform_id @platform_id end |
#platform_partner_id ⇒ Object
Returns the value of attribute platform_partner_id.
17 18 19 |
# File 'lib/smess/outputs/link_mobility.rb', line 17 def platform_partner_id @platform_partner_id end |
#username ⇒ Object
Returns the value of attribute username.
17 18 19 |
# File 'lib/smess/outputs/link_mobility.rb', line 17 def username @username end |
Instance Method Details
#deliver ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/smess/outputs/link_mobility.rb', line 8 def deliver request.auth.basic(username, password) request.url = url request.headers["Content-Type"] = "application/json" request.body = body http_post request end |
#validate_config ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'lib/smess/outputs/link_mobility.rb', line 18 def validate_config @username = config.fetch(:username) @password = config.fetch(:password) @platform_id = config.fetch(:platform_id) @platform_partner_id = config.fetch(:platform_partner_id) @gate_id = config.fetch(:gate_id) @sender_id = config.fetch(:sender_id, @sender_id) end |