Class: MaxApiClient::ShareAttachment

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

Overview

Attachment wrapper for shared links or tokens.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(url: nil, token: nil) ⇒ ShareAttachment

Returns a new instance of ShareAttachment.



101
102
103
104
105
# File 'lib/max_api_client/attachments.rb', line 101

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

Instance Attribute Details

#tokenObject (readonly)

Returns the value of attribute token.



99
100
101
# File 'lib/max_api_client/attachments.rb', line 99

def token
  @token
end

#urlObject (readonly)

Returns the value of attribute url.



99
100
101
# File 'lib/max_api_client/attachments.rb', line 99

def url
  @url
end

Instance Method Details

#to_hObject



107
108
109
# File 'lib/max_api_client/attachments.rb', line 107

def to_h
  { type: "share", payload: { url:, token: } }
end