Class: MaxApiClient::MediaAttachment

Inherits:
Attachment show all
Defined in:
lib/max_api_client/attachments.rb

Overview

Shared attachment implementation for upload-backed media objects.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Attachment

#to_h

Constructor Details

#initialize(token: nil) ⇒ MediaAttachment

Returns a new instance of MediaAttachment.



15
16
17
18
# File 'lib/max_api_client/attachments.rb', line 15

def initialize(token: nil)
  super()
  @token = token
end

Instance Attribute Details

#tokenObject (readonly)

Returns the value of attribute token.



13
14
15
# File 'lib/max_api_client/attachments.rb', line 13

def token
  @token
end

Instance Method Details

#payloadObject



20
21
22
# File 'lib/max_api_client/attachments.rb', line 20

def payload
  { token: token }
end