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

Fix List and Find Scheduled Messages #451

Merged
Changes from all commits
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
10 changes: 5 additions & 5 deletions lib/nylas/resources/messages.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,21 +94,21 @@ def send(identifier:, request_body:)
# Retrieve your scheduled messages.
#
# @param identifier [String] Grant ID or email account from which to find the scheduled message from.
# @param schedule_id [String] The id of the scheduled message to stop.
# @return [Array(Hash, String)] The list of scheduled messages and the API Request ID.
def list_scheduled_messages(identifier:, schedule_id:)
def list_scheduled_messages(identifier:)
get(
path: "#{api_uri}/v3/grants/#{identifier}/messages/schedules/#{schedule_id}"
path: "#{api_uri}/v3/grants/#{identifier}/messages/schedules"
)
end

# Retrieve your scheduled messages.
#
# @param identifier [String] Grant ID or email account from which to list the scheduled messages from.
# @param schedule_id [String] The id of the scheduled message to stop.
# @return [Array(Hash, String)] The scheduled message and the API Request ID.
def find_scheduled_messages(identifier:)
def find_scheduled_messages(identifier:, schedule_id:)
get(
path: "#{api_uri}/v3/grants/#{identifier}/messages/schedules"
path: "#{api_uri}/v3/grants/#{identifier}/messages/schedules/#{schedule_id}"
)
end

Expand Down
Loading