Class: Proz::WiwoReply
- Inherits:
-
Object
- Object
- Proz::WiwoReply
- Includes:
- HTTParty
- Defined in:
- lib/proz/wiwo_reply.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#token ⇒ Object
readonly
Returns the value of attribute token.
Instance Method Summary collapse
-
#initialize(token:, id:, message:, **options) ⇒ WiwoReply
constructor
A new instance of WiwoReply.
- #post ⇒ Object
Constructor Details
#initialize(token:, id:, message:, **options) ⇒ WiwoReply
Returns a new instance of WiwoReply.
8 9 10 11 12 13 |
# File 'lib/proz/wiwo_reply.rb', line 8 def initialize(token:, id:, message:, **) @token = token @id = id @message = { message: } @options = end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
7 8 9 |
# File 'lib/proz/wiwo_reply.rb', line 7 def id @id end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
7 8 9 |
# File 'lib/proz/wiwo_reply.rb', line 7 def @message end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
7 8 9 |
# File 'lib/proz/wiwo_reply.rb', line 7 def @options end |
#token ⇒ Object (readonly)
Returns the value of attribute token.
7 8 9 |
# File 'lib/proz/wiwo_reply.rb', line 7 def token @token end |
Instance Method Details
#post ⇒ Object
15 16 17 18 19 20 |
# File 'lib/proz/wiwo_reply.rb', line 15 def post body = .merge!() self.class.post("/wiwo/#{id}/replies", body: body, headers: { 'Authorization' => "Bearer #{token}" } ) end |