spec/integration/taskrouter/v1/workspace/worker_spec.rb in twilio-ruby-5.0.0.rc22 vs spec/integration/taskrouter/v1/workspace/worker_spec.rb in twilio-ruby-5.0.0.rc23

- old
+ new

@@ -27,36 +27,40 @@ @holodeck.mock(Twilio::TwilioResponse.new( 200, %q[ { "meta": { - "first_page_url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers?PageSize=50&Page=0", - "key": "workers", - "next_page_url": null, "page": 0, "page_size": 50, + "first_page_url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers?PageSize=50&Page=0", "previous_page_url": null, - "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers?PageSize=50&Page=0" + "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers?PageSize=50&Page=0", + "next_page_url": null, + "key": "workers" }, "workers": [ { + "sid": "WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "friendly_name": "testWorker", "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "activity_name": "Offline", "activity_sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "activity_name": "Offline", + "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "attributes": "{}", "available": false, - "date_created": "2015-08-03T17:34:12Z", - "date_status_changed": "2015-08-03T17:34:12Z", - "date_updated": "2015-08-03T17:34:12Z", - "friendly_name": "dc7d5461-3a05-11e5-a889-98e0d9a1eb73", + "date_created": "2017-05-30T23:05:29Z", + "date_updated": "2017-05-30T23:05:29Z", + "date_status_changed": "2017-05-30T23:05:29Z", + "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "links": { + "channels": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels", "activity": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Activities/WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "workspace": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" - }, - "sid": "WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + "workspace": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/Statistics", + "worker_channels": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels", + "reservations": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Reservations" + } } ] } ] )) @@ -114,25 +118,29 @@ it "receives create responses" do @holodeck.mock(Twilio::TwilioResponse.new( 201, %q[ { + "sid": "WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "friendly_name": "NewWorker", "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "activity_name": "available", "activity_sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "attributes": "{\\"email\\": \\"test@twilio.com\\", \\"phone\\": \\"8675309\\"}", - "available": true, - "date_created": "2014-05-14T10:50:02Z", - "date_status_changed": "2014-05-14T23:26:06Z", - "date_updated": "2014-05-14T23:26:06Z", - "friendly_name": "Test Worker", - "sid": "WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "activity_name": "Offline", "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "attributes": "{}", + "available": false, + "date_created": "2017-05-30T23:19:38Z", + "date_updated": "2017-05-30T23:19:38Z", + "date_status_changed": "2017-05-30T23:19:38Z", + "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "links": { + "channels": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels", "activity": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Activities/WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "workspace": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + "workspace": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/Statistics", + "worker_channels": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels", + "reservations": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Reservations" } } ] )) @@ -164,22 +172,26 @@ %q[ { "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "activity_name": "available", "activity_sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "attributes": "{\\"email\\": \\"test@twilio.com\\", \\"phone\\": \\"8675309\\"}", - "available": true, - "date_created": "2014-05-14T10:50:02Z", - "date_status_changed": "2014-05-14T23:26:06Z", - "date_updated": "2014-05-14T23:26:06Z", - "friendly_name": "Test Worker", + "attributes": "{}", + "available": false, + "date_created": "2017-05-30T23:32:39Z", + "date_status_changed": "2017-05-30T23:32:39Z", + "date_updated": "2017-05-30T23:32:39Z", + "friendly_name": "NewWorker3", "sid": "WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "links": { + "channels": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels", "activity": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Activities/WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "workspace": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + "workspace": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/Statistics", + "worker_channels": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels", + "reservations": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Reservations" } } ] )) @@ -208,24 +220,28 @@ it "receives update responses" do @holodeck.mock(Twilio::TwilioResponse.new( 200, %q[ { + "sid": "WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "friendly_name": "blah", "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "activity_name": "available", "activity_sid": "WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "attributes": "{\\"email\\": \\"test@twilio.com\\", \\"phone\\": \\"8675309\\"}", - "available": true, - "date_created": "2014-05-14T10:50:02Z", - "date_status_changed": "2014-05-14T23:26:06Z", - "date_updated": "2014-05-14T23:26:06Z", - "friendly_name": "Test Worker", - "sid": "WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "activity_name": "Offline", "workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "attributes": "{}", + "available": false, + "date_created": "2017-05-30T23:32:22Z", + "date_updated": "2017-05-31T00:05:57Z", + "date_status_changed": "2017-05-30T23:32:22Z", + "url": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "links": { + "channels": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels", "activity": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Activities/WAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", - "workspace": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" + "workspace": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", + "statistics": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/Statistics", + "worker_channels": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels", + "reservations": "https://taskrouter.twilio.com/v1/Workspaces/WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Workers/WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Reservations" } } ] )) \ No newline at end of file