ruby-miradore 3.3.11 → 3.3.15

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b06855a6dc337daa1aed5959b18747ca839af28dc5b3c5b6660f266c8e287a34
4
- data.tar.gz: 2a23544c9191c9a40392797dfb6d4dda501887ef3a155370180114a2675ce150
3
+ metadata.gz: 1bd3404518b59b883223a286aa8cb2b3f586367f0209678ca22414c003ebe1e2
4
+ data.tar.gz: e37515c3faadfb46a5ddbb275c68509a3e72304fb4971e0e8b36aef567e5a8da
5
5
  SHA512:
6
- metadata.gz: a0f2abc784e0d960bff77731a71cbcbfec6e0550f7bec84b568eed85bda639532e2332cf7d9c0177da111f6fcfaa821ef3d8b6263497ca23a20b19f16fe5f60e
7
- data.tar.gz: 67f139f86fee3d1102cd42f973d078705cad2ad277a13526137396b0003277e555cd3b0bc092b42d9b4b522239241105c8fd5caa172205843303ce12183de7fb
6
+ metadata.gz: c50711bc929570b9b483c4d55686aa5c4d75dfcfa14a8f67f30f27d03199fb1554fb27699be7df86d0f54eabd26336c4724fc993fd4ea41d4017ca8d764861a3
7
+ data.tar.gz: 2744e5bdf3dc2d79140320da1bc0846487fe1e46d40dc5f0794035f9f9da26ed111e36fa8fb5f4580ee799ac09cdf9b6a02088d6459b3edd19385349f245f0a9
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ruby-miradore (3.3.11)
4
+ ruby-miradore (3.3.14)
5
5
  activesupport (~> 6.1)
6
6
  builder (~> 3.1)
7
7
  crack (~> 0.4)
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://rzilient.online.miradore.com/API/Device?auth=&filters=(InvDevice.SerialNumber%20eq%20C76TLUEMHG7F)&select=*,*
5
+ uri: https://rzilient.online.miradore.com/API/Device/?auth=&filters=(InvDevice.SerialNumber%20eq%20C76TLUEMHG7F)&select=*,*
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://test634.online.miradore.com/API/Device?auth=1_8,Yo-TV8QyCiBUF&filters=&select=*,InvDevice.*
5
+ uri: https://test634.online.miradore.com/API/Device/?auth=&filters=&select=*,InvDevice.*
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://rzilient.online.miradore.com/API/Device?auth=&filters=&select=*,*
5
+ uri: https://rzilient.online.miradore.com/API/Device/?auth=&filters=&select=*,*
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://rzilient.online.miradore.com/API/Device?auth=&filters=&select=*,InvDevice.*
5
+ uri: https://rzilient.online.miradore.com/API/Device/?auth=&filters=&select=*,InvDevice.*
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://rzilient.online.miradore.com/API/Device?auth=&filters=(InvDevice.SerialNumber%20eq%20SRE)&select=*,*
5
+ uri: https://rzilient.online.miradore.com/API/Device/?auth=&filters=(InvDevice.SerialNumber%20eq%20SRE)&select=*,*
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://rzilient.online.miradore.com/API/Device?auth=&filters=&select=*,InvDevice.*,InvOS.*,InvStorage.*,Security.*,Location.*,Enrollment.*,User.*
5
+ uri: https://rzilient.online.miradore.com/API/Device/?auth=&filters=&select=*,InvDevice.*,InvOS.*,InvStorage.*,Security.*,Location.*,Enrollment.*,User.*
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://test634.online.miradore.com/API/Device?auth=&filters=(InvDevice.SerialNumber%20eq%2087DB6H2)&select=*,*
5
+ uri: https://test634.online.miradore.com/API/Device/?auth=&filters=(ID%20eq%2037)&select=*,*
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -11,8 +11,6 @@ http_interactions:
11
11
  - application/json
12
12
  Accept:
13
13
  - application/json
14
- X-Api-Key:
15
- - ''
16
14
  Accept-Encoding:
17
15
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
16
  User-Agent:
@@ -39,26 +37,15 @@ http_interactions:
39
37
  X-Frame-Options:
40
38
  - SAMEORIGIN
41
39
  Date:
42
- - Wed, 03 Nov 2021 09:25:17 GMT
40
+ - Mon, 15 Nov 2021 20:01:42 GMT
43
41
  Content-Length:
44
- - '995'
42
+ - '513'
45
43
  body:
46
44
  encoding: ASCII-8BIT
47
- string: <?xml version="1.0" encoding="utf-8"?><Content><Items count="4"><Device><ID>2</ID><User><ID>1</ID></User><Enrollment><ID>6</ID></Enrollment><OnlineStatus>Unmanaged</OnlineStatus><LastReported>04.10.2021
48
- 10:00:00</LastReported><LastReportedDays>30</LastReportedDays><LastReportedHours>719</LastReportedHours><LastReportedMinutes>43165</LastReportedMinutes><IPAddress>185.212.21.63</IPAddress><LocalIPAddress>172.18.254.13</LocalIPAddress><MACAddress>D4:81:D7:F8:52:85</MACAddress><Platform>WindowsDesktop</Platform><OSVersionName>Windows
49
- 10 Pro (20H2)</OSVersionName><Client><ID>2</ID></Client><ConfigProfileDeployments
50
- /><Status>Deleted</Status><Created>13.08.2021 13:19:37</Created><Modified>04.10.2021
51
- 09:58:05</Modified><Source>MiradoreOnline</Source></Device><Device><ID>3</ID><Enrollment><ID>13</ID></Enrollment><OnlineStatus>Unmanaged</OnlineStatus><LastReported>04.10.2021
52
- 10:10:00</LastReported><LastReportedDays>30</LastReportedDays><LastReportedHours>719</LastReportedHours><LastReportedMinutes>43155</LastReportedMinutes><IPAddress>185.212.21.63</IPAddress><LocalIPAddress>172.18.254.13</LocalIPAddress><MACAddress>F8:59:71:86:81:CF</MACAddress><Platform>WindowsDesktop</Platform><OSVersionName>Windows
53
- 10 Professionnel (20H2)</OSVersionName><Client><ID>3</ID></Client><ConfigProfileDeployments
54
- /><Status>Deleted</Status><Created>04.10.2021 10:07:03</Created><Modified>05.10.2021
55
- 16:16:52</Modified><Source>MiradoreOnline</Source></Device><Device><ID>4</ID><Enrollment><ID>17</ID></Enrollment><OnlineStatus>Unmanaged</OnlineStatus><LastReported>12.10.2021
56
- 10:51:10</LastReported><LastReportedDays>22</LastReportedDays><LastReportedHours>527</LastReportedHours><LastReportedMinutes>31594</LastReportedMinutes><IPAddress>185.212.21.63</IPAddress><LocalIPAddress>172.18.254.16</LocalIPAddress><MACAddress>F8:59:71:86:81:CF</MACAddress><Platform>WindowsDesktop</Platform><OSVersionName>Windows
57
- 10 Pro (20H2)</OSVersionName><Client><ID>4</ID></Client><ConfigProfileDeployments
58
- /><Status>Deleted</Status><Created>04.10.2021 10:26:25</Created><Modified>12.10.2021
59
- 10:50:17</Modified><Source>MiradoreOnline</Source></Device><Device><ID>9</ID><User><ID>2</ID></User><Location><ID>1</ID></Location><Category><ID>3</ID></Category><Enrollment><ID>36</ID></Enrollment><OnlineStatus>Active</OnlineStatus><LastReported>02.11.2021
60
- 13:40:06</LastReported><LastReportedDays>1</LastReportedDays><LastReportedHours>20</LastReportedHours><LastReportedMinutes>1185</LastReportedMinutes><IPAddress>185.212.21.34</IPAddress><LocalIPAddress>172.18.193.32</LocalIPAddress><MACAddress>F8:59:71:86:81:CF</MACAddress><Platform>WindowsDesktop</Platform><PurchaseDate>03.11.2021
61
- 00:00:00</PurchaseDate><OSVersionName>Windows 10 Pro (20H2)</OSVersionName><Client><ID>9</ID></Client><ConfigProfileDeployments><ConfigProfileDeployment><ID>1</ID><ConfigProfile><ID>7</ID></ConfigProfile></ConfigProfileDeployment></ConfigProfileDeployments><Status>Active</Status><Created>27.10.2021
62
- 08:10:37</Created><Modified>03.11.2021 09:16:54</Modified><Source>MiradoreOnline</Source></Device></Items></Content>
63
- recorded_at: Wed, 03 Nov 2021 09:25:18 GMT
45
+ string: <?xml version="1.0" encoding="utf-8"?><Content><Items count="1"><Device><ID>37</ID><User><ID>2</ID></User><Enrollment><ID>49</ID><User><ID>2</ID></User></Enrollment><OnlineStatus>Active</OnlineStatus><LastReported>15.11.2021
46
+ 19:21:33</LastReported><LastReportedDays>0</LastReportedDays><LastReportedHours>1</LastReportedHours><LastReportedMinutes>40</LastReportedMinutes><IPAddress>46.25.9.62</IPAddress><MACAddress>d4:dc:cd:d6:09:be</MACAddress><Platform>iOS</Platform><OSVersionName>iOS
47
+ 14.4.2</OSVersionName><Client><ID>37</ID></Client><ConfigProfileDeployments
48
+ /><Status>AutoGenerated</Status><Created>15.11.2021 19:21:35</Created><Modified>15.11.2021
49
+ 19:21:35</Modified><Source>MiradoreOnline</Source></Device></Items></Content>
50
+ recorded_at: Mon, 15 Nov 2021 20:01:42 GMT
64
51
  recorded_with: VCR 6.0.0
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://test634.online.miradore.com/API/Device?auth=1_8,Yo-TV8QyCiBUF&filters=(InvDevice.SerialNumber%20eq%2087DB6H2)&select=*,*
5
+ uri: https://test634.online.miradore.com/API/Device/?auth=&filters=ID%20eq%2037&select=*,*
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -37,26 +37,15 @@ http_interactions:
37
37
  X-Frame-Options:
38
38
  - SAMEORIGIN
39
39
  Date:
40
- - Wed, 03 Nov 2021 13:29:28 GMT
40
+ - Tue, 16 Nov 2021 09:03:17 GMT
41
41
  Content-Length:
42
- - '979'
42
+ - '547'
43
43
  body:
44
44
  encoding: ASCII-8BIT
45
- string: <?xml version="1.0" encoding="utf-8"?><Content><Items count="4"><Device><ID>2</ID><User><ID>1</ID></User><Enrollment><ID>6</ID></Enrollment><OnlineStatus>Unmanaged</OnlineStatus><LastReported>04.10.2021
46
- 10:00:00</LastReported><LastReportedDays>30</LastReportedDays><LastReportedHours>723</LastReportedHours><LastReportedMinutes>43409</LastReportedMinutes><IPAddress>185.212.21.63</IPAddress><LocalIPAddress>172.18.254.13</LocalIPAddress><MACAddress>D4:81:D7:F8:52:85</MACAddress><Platform>WindowsDesktop</Platform><OSVersionName>Windows
47
- 10 Pro (20H2)</OSVersionName><Client><ID>2</ID></Client><ConfigProfileDeployments
48
- /><Status>Deleted</Status><Created>13.08.2021 13:19:37</Created><Modified>04.10.2021
49
- 09:58:05</Modified><Source>MiradoreOnline</Source></Device><Device><ID>3</ID><Enrollment><ID>13</ID></Enrollment><OnlineStatus>Unmanaged</OnlineStatus><LastReported>04.10.2021
50
- 10:10:00</LastReported><LastReportedDays>30</LastReportedDays><LastReportedHours>723</LastReportedHours><LastReportedMinutes>43399</LastReportedMinutes><IPAddress>185.212.21.63</IPAddress><LocalIPAddress>172.18.254.13</LocalIPAddress><MACAddress>F8:59:71:86:81:CF</MACAddress><Platform>WindowsDesktop</Platform><OSVersionName>Windows
51
- 10 Professionnel (20H2)</OSVersionName><Client><ID>3</ID></Client><ConfigProfileDeployments
52
- /><Status>Deleted</Status><Created>04.10.2021 10:07:03</Created><Modified>05.10.2021
53
- 16:16:52</Modified><Source>MiradoreOnline</Source></Device><Device><ID>4</ID><Enrollment><ID>17</ID></Enrollment><OnlineStatus>Unmanaged</OnlineStatus><LastReported>12.10.2021
54
- 10:51:10</LastReported><LastReportedDays>22</LastReportedDays><LastReportedHours>531</LastReportedHours><LastReportedMinutes>31838</LastReportedMinutes><IPAddress>185.212.21.63</IPAddress><LocalIPAddress>172.18.254.16</LocalIPAddress><MACAddress>F8:59:71:86:81:CF</MACAddress><Platform>WindowsDesktop</Platform><OSVersionName>Windows
55
- 10 Pro (20H2)</OSVersionName><Client><ID>4</ID></Client><ConfigProfileDeployments
56
- /><Status>Deleted</Status><Created>04.10.2021 10:26:25</Created><Modified>12.10.2021
57
- 10:50:17</Modified><Source>MiradoreOnline</Source></Device><Device><ID>9</ID><User><ID>4</ID></User><Location><ID>1</ID></Location><Category><ID>3</ID></Category><Enrollment><ID>36</ID></Enrollment><OnlineStatus>Active</OnlineStatus><LastReported>03.11.2021
58
- 11:04:00</LastReported><LastReportedDays>0</LastReportedDays><LastReportedHours>2</LastReportedHours><LastReportedMinutes>145</LastReportedMinutes><IPAddress>185.212.21.34</IPAddress><LocalIPAddress>172.18.193.32</LocalIPAddress><MACAddress>F8:59:71:86:81:CF</MACAddress><Platform>WindowsDesktop</Platform><PurchaseDate>03.11.2021
59
- 00:00:00</PurchaseDate><OSVersionName>Windows 10 Pro (20H2)</OSVersionName><Client><ID>9</ID></Client><ConfigProfileDeployments><ConfigProfileDeployment><ID>1</ID><ConfigProfile><ID>7</ID></ConfigProfile></ConfigProfileDeployment></ConfigProfileDeployments><Status>Active</Status><Created>27.10.2021
60
- 08:10:37</Created><Modified>03.11.2021 11:09:57</Modified><Source>MiradoreOnline</Source></Device></Items></Content>
61
- recorded_at: Wed, 03 Nov 2021 13:29:28 GMT
45
+ string: <?xml version="1.0" encoding="utf-8"?><Content><Items count="1"><Device><ID>37</ID><User><ID>2</ID></User><Category><ID>8</ID></Category><Enrollment><ID>49</ID><User><ID>2</ID></User></Enrollment><OnlineStatus>Active</OnlineStatus><LastReported>16.11.2021
46
+ 08:31:26</LastReported><LastReportedDays>0</LastReportedDays><LastReportedHours>1</LastReportedHours><LastReportedMinutes>32</LastReportedMinutes><IPAddress>185.212.21.34</IPAddress><MACAddress>d4:dc:cd:d6:09:be</MACAddress><Platform>iOS</Platform><OSVersionName>iOS
47
+ 14.4.2</OSVersionName><Client><ID>37</ID></Client><ConfigProfileDeployments
48
+ /><Status>AutoGenerated</Status><Created>15.11.2021 19:21:35</Created><Modified>16.11.2021
49
+ 09:01:30</Modified><Source>MiradoreOnline</Source></Device></Items></Content>
50
+ recorded_at: Tue, 16 Nov 2021 09:03:17 GMT
62
51
  recorded_with: VCR 6.0.0
@@ -0,0 +1,64 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://test634.online.miradore.com/API/Device/?auth=&filters=(InvDevice.SerialNumber%20eq%2087DB6H2)&select=*,*
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Content-Type:
11
+ - application/json
12
+ Accept:
13
+ - application/json
14
+ X-Api-Key:
15
+ - ''
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ User-Agent:
19
+ - Ruby
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Cache-Control:
26
+ - no-cache
27
+ Pragma:
28
+ - no-cache
29
+ Content-Type:
30
+ - text/xml
31
+ Expires:
32
+ - "-1"
33
+ Vary:
34
+ - Accept-Encoding
35
+ Server:
36
+ - Microsoft-IIS/10.0
37
+ X-Aspnet-Version:
38
+ - 4.0.30319
39
+ X-Frame-Options:
40
+ - SAMEORIGIN
41
+ Date:
42
+ - Mon, 15 Nov 2021 20:23:34 GMT
43
+ Content-Length:
44
+ - '993'
45
+ body:
46
+ encoding: ASCII-8BIT
47
+ string: <?xml version="1.0" encoding="utf-8"?><Content><Items count="4"><Device><ID>2</ID><User><ID>1</ID></User><Enrollment><ID>6</ID></Enrollment><OnlineStatus>Unmanaged</OnlineStatus><LastReported>04.10.2021
48
+ 10:00:00</LastReported><LastReportedDays>42</LastReportedDays><LastReportedHours>1018</LastReportedHours><LastReportedMinutes>61103</LastReportedMinutes><IPAddress>185.212.21.63</IPAddress><LocalIPAddress>172.18.254.13</LocalIPAddress><MACAddress>D4:81:D7:F8:52:85</MACAddress><Platform>WindowsDesktop</Platform><OSVersionName>Windows
49
+ 10 Pro (20H2)</OSVersionName><Client><ID>2</ID></Client><ConfigProfileDeployments
50
+ /><Status>Deleted</Status><Created>13.08.2021 13:19:37</Created><Modified>04.10.2021
51
+ 09:58:05</Modified><Source>MiradoreOnline</Source></Device><Device><ID>3</ID><Enrollment><ID>13</ID></Enrollment><OnlineStatus>Unmanaged</OnlineStatus><LastReported>04.10.2021
52
+ 10:10:00</LastReported><LastReportedDays>42</LastReportedDays><LastReportedHours>1018</LastReportedHours><LastReportedMinutes>61093</LastReportedMinutes><IPAddress>185.212.21.63</IPAddress><LocalIPAddress>172.18.254.13</LocalIPAddress><MACAddress>F8:59:71:86:81:CF</MACAddress><Platform>WindowsDesktop</Platform><OSVersionName>Windows
53
+ 10 Professionnel (20H2)</OSVersionName><Client><ID>3</ID></Client><ConfigProfileDeployments
54
+ /><Status>Deleted</Status><Created>04.10.2021 10:07:03</Created><Modified>05.10.2021
55
+ 16:16:52</Modified><Source>MiradoreOnline</Source></Device><Device><ID>4</ID><Enrollment><ID>17</ID></Enrollment><OnlineStatus>Unmanaged</OnlineStatus><LastReported>12.10.2021
56
+ 10:51:10</LastReported><LastReportedDays>34</LastReportedDays><LastReportedHours>826</LastReportedHours><LastReportedMinutes>49532</LastReportedMinutes><IPAddress>185.212.21.63</IPAddress><LocalIPAddress>172.18.254.16</LocalIPAddress><MACAddress>F8:59:71:86:81:CF</MACAddress><Platform>WindowsDesktop</Platform><OSVersionName>Windows
57
+ 10 Pro (20H2)</OSVersionName><Client><ID>4</ID></Client><ConfigProfileDeployments
58
+ /><Status>Deleted</Status><Created>04.10.2021 10:26:25</Created><Modified>12.10.2021
59
+ 10:50:17</Modified><Source>MiradoreOnline</Source></Device><Device><ID>9</ID><Location><ID>1</ID></Location><Category><ID>3</ID></Category><Enrollment><ID>36</ID></Enrollment><OnlineStatus>Unknown</OnlineStatus><LastReported>04.11.2021
60
+ 14:31:00</LastReported><LastReportedDays>11</LastReportedDays><LastReportedHours>270</LastReportedHours><LastReportedMinutes>16192</LastReportedMinutes><IPAddress>185.212.21.34</IPAddress><LocalIPAddress>172.18.193.32</LocalIPAddress><MACAddress>F8:59:71:86:81:CF</MACAddress><Platform>WindowsDesktop</Platform><PurchaseDate>08.11.2021
61
+ 00:00:00</PurchaseDate><OSVersionName>Windows 10 Professionnel (20H2)</OSVersionName><Client><ID>9</ID></Client><ConfigProfileDeployments><ConfigProfileDeployment><ID>1</ID><ConfigProfile><ID>7</ID></ConfigProfile></ConfigProfileDeployment></ConfigProfileDeployments><Status>Active</Status><Created>27.10.2021
62
+ 08:10:37</Created><Modified>15.11.2021 19:55:20</Modified><Source>MiradoreOnline</Source></Device></Items></Content>
63
+ recorded_at: Mon, 15 Nov 2021 20:23:34 GMT
64
+ recorded_with: VCR 6.0.0
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://rzilient.online.miradore.com/API/Organization?auth=&filters=&select=*,*
5
+ uri: https://rzilient.online.miradore.com/API/Organization/?auth=&filters=&select=*,*
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://rzilient.online.miradore.com/API/User?auth=&filters=(ID%20eq%202)&select=*,*
5
+ uri: https://rzilient.online.miradore.com/API/User/?auth=&filters=(ID%20eq%202)&select=*,*
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://rzilient.online.miradore.com/API/Device?auth=&filters=(InvDevice.SerialNumber%20eq%20K8N0CV07315233B)&select=*,*
5
+ uri: https://rzilient.online.miradore.com/API/Device/?auth=&filters=(InvDevice.SerialNumber%20eq%20K8N0CV07315233B)&select=*,*
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -0,0 +1,39 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: patch
5
+ uri: https://test634.online.miradore.com/API/v2/Device/9/
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"category":"Laptops","friendlyName":"Eduard personal","userEmailAddress":"eduard@rzilient.club","location":["Barcelona"],"tags":["Personal"],"ownershipStartDate":"2021-11-15
9
+ 21:23:34 +0100"}'
10
+ headers:
11
+ Content-Type:
12
+ - application/json
13
+ Accept:
14
+ - application/json
15
+ X-Api-Key:
16
+ -
17
+ Accept-Encoding:
18
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
19
+ User-Agent:
20
+ - Ruby
21
+ response:
22
+ status:
23
+ code: 200
24
+ message: OK
25
+ headers:
26
+ Server:
27
+ - Microsoft-IIS/10.0
28
+ X-Frame-Options:
29
+ - SAMEORIGIN
30
+ - SAMEORIGIN
31
+ Date:
32
+ - Mon, 15 Nov 2021 20:23:35 GMT
33
+ Content-Length:
34
+ - '0'
35
+ body:
36
+ encoding: UTF-8
37
+ string: ''
38
+ recorded_at: Mon, 15 Nov 2021 20:23:35 GMT
39
+ recorded_with: VCR 6.0.0
@@ -2,10 +2,10 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: put
5
- uri: https://test634.online.miradore.com/API/v2/Device/9/category
5
+ uri: https://test634.online.miradore.com/API/v2/Device/37/category
6
6
  body:
7
7
  encoding: UTF-8
8
- string: '"Laptops"'
8
+ string: '"Smartphones"'
9
9
  headers:
10
10
  Content-Type:
11
11
  - application/json
@@ -30,11 +30,11 @@ http_interactions:
30
30
  - SAMEORIGIN
31
31
  - SAMEORIGIN
32
32
  Date:
33
- - Wed, 03 Nov 2021 10:48:33 GMT
33
+ - Mon, 15 Nov 2021 20:03:44 GMT
34
34
  Content-Length:
35
- - '81'
35
+ - '85'
36
36
  body:
37
37
  encoding: UTF-8
38
- string: '{"categoryID":3,"name":"Laptops","description":null,"deviceCount":2,"image":null}'
39
- recorded_at: Wed, 03 Nov 2021 10:48:34 GMT
38
+ string: '{"categoryID":8,"name":"Smartphones","description":null,"deviceCount":1,"image":null}'
39
+ recorded_at: Mon, 15 Nov 2021 20:03:44 GMT
40
40
  recorded_with: VCR 6.0.0
@@ -2,17 +2,17 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: put
5
- uri: https://test634.online.miradore.com/API/v2/Device/9/model
5
+ uri: https://test634.online.miradore.com/API/v2/Device/37/model
6
6
  body:
7
7
  encoding: UTF-8
8
- string: '{"model":"test"}'
8
+ string: '{"id":"37","name":"test"}'
9
9
  headers:
10
10
  Content-Type:
11
11
  - application/json
12
12
  Accept:
13
13
  - application/json
14
14
  X-Api-Key:
15
- - 1_8,Yo-TV8QyCiBUF
15
+ -
16
16
  Accept-Encoding:
17
17
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
18
  User-Agent:
@@ -30,11 +30,11 @@ http_interactions:
30
30
  - SAMEORIGIN
31
31
  - SAMEORIGIN
32
32
  Date:
33
- - Wed, 03 Nov 2021 13:30:26 GMT
33
+ - Tue, 16 Nov 2021 09:04:26 GMT
34
34
  Content-Length:
35
35
  - '2'
36
36
  body:
37
37
  encoding: UTF-8
38
38
  string: "{}"
39
- recorded_at: Wed, 03 Nov 2021 13:30:27 GMT
39
+ recorded_at: Tue, 16 Nov 2021 09:04:26 GMT
40
40
  recorded_with: VCR 6.0.0
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://rzilient.online.miradore.com/API/User?auth=&filters=&select=*,ID
5
+ uri: https://rzilient.online.miradore.com/API/User/?auth=&filters=&select=*,ID
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: |
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Ruby
4
4
  module Miradore
5
- VERSION = "3.3.11"
5
+ VERSION = "3.3.15"
6
6
  end
7
7
  end
data/lib/ruby/miradore.rb CHANGED
@@ -13,7 +13,7 @@ module Ruby
13
13
 
14
14
  def self.url
15
15
  {
16
- item_v1: "https://%<subdomain>s.online.miradore.com/API/%<item>s?auth=%<auth>s&select=*,%<attribute>s&filters=%<filter>s",
16
+ item_v1: "https://%<subdomain>s.online.miradore.com/API/%<item>s/%<id>s?auth=%<auth>s&select=*,%<attribute>s&filters=%<filter>s",
17
17
  request_v1: "https://%<subdomain>s.online.miradore.com/API/Device?auth=%<auth>s&select=*,Category.*,InvDevice.*,InvStorage.*,InvOS.*,Enrollment.*,Client.*,User.*,Location.*,Security.*,ReportedLocation.*&filters=%<filter>s",
18
18
  v2: "https://%<subdomain>s.online.miradore.com/API/v2/Device/%<id>s/%<method>s"
19
19
  }
@@ -71,6 +71,7 @@ module Ruby
71
71
  url = Miradore.url[api_version] % args.merge(
72
72
  subdomain: @subdomain || args[:subdomain],
73
73
  auth: args.fetch(:auth, @auth),
74
+ id: args.fetch(:id, nil),
74
75
  item: self.class.to_s.split("::").last,
75
76
  attribute: args.fetch(:attribute, "*"),
76
77
  filter: args.fetch(:filter, nil)
@@ -134,6 +135,10 @@ module Ruby
134
135
  http_method(args.merge(method: :put, action: __method__))
135
136
  end
136
137
 
138
+ def activate(**args)
139
+ http_method(args.merge(method: :post, action: __method__))
140
+ end
141
+
137
142
  def device_serial_number
138
143
  invdevice.serial_number || invdevice.hardware_serial_number
139
144
  end
@@ -147,7 +152,7 @@ module Ruby
147
152
  end
148
153
 
149
154
  def phone?
150
- !!invdevice&.imei
155
+ %w[Android iOS WindowsPhone].include?(platform)
151
156
  end
152
157
 
153
158
  def call(**args)
@@ -163,7 +168,7 @@ module Ruby
163
168
  id: args.fetch(:id, id),
164
169
  method: args.fetch(:action, nil)
165
170
  }
166
- self.class.method(args.fetch(:method, nil)).call(url, body: JSON.generate(args.fetch(:body, {})))
171
+ self.class.method(args.fetch(:method, nil)).call(url, body: args.fetch(:body, {}).to_json)
167
172
  rescue StandardError => e
168
173
  { error: e&.message || "Error connecting to manager service provider", status: :not_found }
169
174
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-miradore
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.11
4
+ version: 3.3.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eduard Garcia Castelló
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-11-09 00:00:00.000000000 Z
11
+ date: 2021-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -157,10 +157,12 @@ files:
157
157
  - fixtures/vcr_cassettes/full_list_and_details.yml
158
158
  - fixtures/vcr_cassettes/get_computer_device_to_update.yml
159
159
  - fixtures/vcr_cassettes/get_computer_device_to_update_2.yml
160
+ - fixtures/vcr_cassettes/get_computer_device_to_update_dell.yml
160
161
  - fixtures/vcr_cassettes/get_location.yml
161
162
  - fixtures/vcr_cassettes/get_user_from_miradore.yml
162
163
  - fixtures/vcr_cassettes/search_by_serial_number.yml
163
164
  - fixtures/vcr_cassettes/update_model_of_a_computer_device.yml
165
+ - fixtures/vcr_cassettes/update_model_of_a_computer_device_dell.yml
164
166
  - fixtures/vcr_cassettes/update_model_of_a_computer_device_v2.yml
165
167
  - fixtures/vcr_cassettes/update_model_of_a_computer_device_v2_2.yml
166
168
  - fixtures/vcr_cassettes/user_alredy_exist_in_miradore.yml