Class: PostmanMta::Label
- Inherits:
-
ApplicationModel
- Object
- ApplicationModel
- PostmanMta::Label
- Defined in:
- app/models/postman_mta/label.rb
Instance Attribute Summary collapse
-
#conversation_id ⇒ Object
readonly
Returns the value of attribute conversation_id.
Instance Method Summary collapse
- #create(params) ⇒ Object
- #destroy(label_id) ⇒ Object
-
#initialize(conversation_id) ⇒ Label
constructor
A new instance of Label.
Constructor Details
#initialize(conversation_id) ⇒ Label
Returns a new instance of Label.
5 6 7 |
# File 'app/models/postman_mta/label.rb', line 5 def initialize(conversation_id) @conversation_id = conversation_id end |
Instance Attribute Details
#conversation_id ⇒ Object (readonly)
Returns the value of attribute conversation_id.
3 4 5 |
# File 'app/models/postman_mta/label.rb', line 3 def conversation_id @conversation_id end |
Instance Method Details
#create(params) ⇒ Object
9 10 11 |
# File 'app/models/postman_mta/label.rb', line 9 def create(params) post("/conversations/#{conversation_id}/labels", body: params) end |
#destroy(label_id) ⇒ Object
13 14 15 |
# File 'app/models/postman_mta/label.rb', line 13 def destroy(label_id) delete("/conversations/#{conversation_id}/labels/#{label_id}") end |