Class: MaxApiClient::StickerAttachment

Inherits:
Attachment
  • Object
show all
Defined in:
lib/max_api_client/attachments.rb,
sig/max_api_client.rbs

Overview

Attachment wrapper for sticker references.

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#codeObject (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_hObject



77
78
79
# File 'lib/max_api_client/attachments.rb', line 77

def to_h
  { type: "sticker", payload: { code: } }
end