Method: Mailosaur::Devices#create
- Defined in:
- lib/Mailosaur/devices.rb
#create(device_create_options) ⇒ Device
Create a device
Creates a new virtual security device and returns it.
38 39 40 41 42 43 |
# File 'lib/Mailosaur/devices.rb', line 38 def create() response = conn.post 'api/devices', .to_json @handle_http_error.call(response) unless response.status == 200 model = JSON.parse(response.body) Mailosaur::Models::Device.new(model) end |