Class: Google::Apis::GmailV1::Draft

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/gmail_v1/classes.rb,
lib/google/apis/gmail_v1/representations.rb,
lib/google/apis/gmail_v1/representations.rb

Overview

A draft email in the user's mailbox.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Draft

Returns a new instance of Draft.



284
285
286
# File 'lib/google/apis/gmail_v1/classes.rb', line 284

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#idString

The immutable ID of the draft. Corresponds to the JSON property id

Returns:

  • (String)


277
278
279
# File 'lib/google/apis/gmail_v1/classes.rb', line 277

def id
  @id
end

#messageGoogle::Apis::GmailV1::Message

An email message. Corresponds to the JSON property message



282
283
284
# File 'lib/google/apis/gmail_v1/classes.rb', line 282

def message
  @message
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



289
290
291
292
# File 'lib/google/apis/gmail_v1/classes.rb', line 289

def update!(**args)
  @id = args[:id] if args.key?(:id)
  @message = args[:message] if args.key?(:message)
end