Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tw 2456 ruby add send to drafts #446

Merged
merged 2 commits into from
Dec 20, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions lib/nylas/resources/drafts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,20 @@ def destroy(identifier:, draft_id:)

[true, request_id]
end

# Send an draft.
#
# @param identifier [String] Grant ID or email account from which to delete an object.
# @param draft_id [String] The id of the draft to delete.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: can you update these doc lines?

Suggested change
# @param identifier [String] Grant ID or email account from which to delete an object.
# @param draft_id [String] The id of the draft to delete.
# @param identifier [String] Grant ID or email account from which to send the draft.
# @param draft_id [String] The id of the draft to send.

# @return [Array(Hash, String)] The sent message draft and the API Request ID.
def send(identifier:, draft_id:)

response = post(
path: "#{api_uri}/v3/grants/#{identifier}/drafts/#{draft_id}"
)

response
end

end
end