Class: MaxApiClient::StickerAttachment
- Inherits:
-
Attachment
- Object
- Attachment
- MaxApiClient::StickerAttachment
- Defined in:
- lib/max_api_client/attachments.rb,
sig/max_api_client.rbs
Overview
Attachment wrapper for sticker references.
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
Instance Method Summary collapse
-
#initialize(code:) ⇒ StickerAttachment
constructor
A new instance of StickerAttachment.
- #to_h ⇒ Object
Constructor Details
#initialize(code:) ⇒ StickerAttachment
Returns a new instance of StickerAttachment.
72 73 74 75 |
# File 'lib/max_api_client/attachments.rb', line 72 def initialize(code:) super() @code = code end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
70 71 72 |
# File 'lib/max_api_client/attachments.rb', line 70 def code @code end |
Instance Method Details
#to_h ⇒ Object
77 78 79 |
# File 'lib/max_api_client/attachments.rb', line 77 def to_h { type: "sticker", payload: { code: } } end |