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

Add twilio 5 support. #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
15 changes: 14 additions & 1 deletion lib/sms_spec/drivers/twilio-ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,21 @@ def self.configuration
private_class_method :configuration

module REST
class Client
class Api
class V2010
class AccountContext
class MessageList
include SmsSpec::Helpers

def create(to: nil, status_callback: :unset, application_sid: :unset, max_price: :unset, provide_feedback: :unset, validity_period: :unset, max_rate: :unset, force_delivery: :unset, provider_sid: :unset, content_retention: :unset, address_retention: :unset, smart_encoded: :unset, from: :unset, messaging_service_sid: :unset, body: :unset, media_url: :unset)
add_message SmsSpec::Message.new(:number => to, :from => from, :body => body)
end
end
end
end
end

class Client
def initialize(*args)
# mimic the primary class's #initialize.
options = args.last.is_a?(Hash) ? args.pop : {}
Expand Down