Skip to content

Commit

Permalink
Merge pull request #446 from nylas/TW-2456-ruby-add-send-to-drafts
Browse files Browse the repository at this point in the history
Tw 2456 ruby add send to drafts
  • Loading branch information
atejada committed Dec 20, 2023
2 parents 5594eeb + a93bba1 commit 1c76ced
Showing 1 changed file with 15 additions and 0 deletions.
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 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

0 comments on commit 1c76ced

Please sign in to comment.