Class: MaxApiClient::ShareAttachment
- Inherits:
-
Attachment
- Object
- Attachment
- MaxApiClient::ShareAttachment
- 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
-
#token ⇒ Object
readonly
Returns the value of attribute token.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(url: nil, token: nil) ⇒ ShareAttachment
constructor
A new instance of ShareAttachment.
- #to_h ⇒ Object
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
#token ⇒ Object (readonly)
Returns the value of attribute token.
99 100 101 |
# File 'lib/max_api_client/attachments.rb', line 99 def token @token end |
#url ⇒ Object (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_h ⇒ Object
107 108 109 |
# File 'lib/max_api_client/attachments.rb', line 107 def to_h { type: "share", payload: { url:, token: } } end |