alula-ruby 2.1.1 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION.md +2 -0
- data/lib/alula/procedures/camera_get_firmware_version_proc.rb +27 -0
- data/lib/alula/resource_attributes.rb +2 -0
- data/lib/alula/resources/device.rb +8 -0
- data/lib/alula/resources/device_feature_price.rb +242 -0
- data/lib/alula/resources/feature_price.rb +1 -1
- data/lib/alula/version.rb +1 -1
- data/lib/alula.rb +3 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 247c9119a14643882e61a122b637a87d235765849ae133f014c64e231bd02a9e
|
4
|
+
data.tar.gz: a6ff54e27b1c51a5a0ea5b683e64e3e31a1165c89ba0bd8d12d545ab13f1415e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04e0f8b86cf095f5d9365fce87560ec5748b95e09bbf5180aaa8bb299d72a291242e9456fa5939df5ef7e13f2197f19d7b35ec01e8ec004747042994113a1504
|
7
|
+
data.tar.gz: 450925aacda921e9e0897134bbb8a734438b690d6e64025a7d8e83b882a2b57414790ade19b394ab6119c72a80a7eb3ceabbd19cf5bde32d04a10c037819bc28
|
data/VERSION.md
CHANGED
@@ -2,6 +2,8 @@
|
|
2
2
|
|
3
3
|
| Version | Date | Description |
|
4
4
|
| ------- | ------------| --------------------------------------------------------------------------- |
|
5
|
+
| v2.2.0 | 2024-12-10 | Add SMS Limit to Device model and the Device Feature Price model |
|
6
|
+
| v2.1.2 | 2024-11-12 | Add CameraGetFirmwareVersionProc |
|
5
7
|
| v2.1.1 | 2024-11-12 | Add device record attribute |
|
6
8
|
| v2.1.0 | 2024-10-24 | Bump multiple dependencies |
|
7
9
|
| v2.0.0 | 2024-10-17 | Add device helpers, breaking change - removed `is_` from methods returning a boolean |
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Alula
|
4
|
+
class CameraGetFirmwareVersionProc < Alula::RpcResource
|
5
|
+
class Response < Alula::RpcResponse
|
6
|
+
attr_accessor :result
|
7
|
+
|
8
|
+
def initialize(response)
|
9
|
+
super(response)
|
10
|
+
@result = response.data
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.call(device_id:)
|
15
|
+
payload = {
|
16
|
+
"deviceId": device_id
|
17
|
+
}
|
18
|
+
|
19
|
+
request(
|
20
|
+
http_method: :post,
|
21
|
+
path: '/video/v1/rpc/devices/get-firmware-version',
|
22
|
+
payload:,
|
23
|
+
handler: Response
|
24
|
+
)
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -40,6 +40,7 @@ module Alula
|
|
40
40
|
relationship :notifications, type: 'devices-notifications', cardinality: 'To-many'
|
41
41
|
relationship :video_verification_cameras, type: 'video-verification-cameras', cardinality: 'To-many'
|
42
42
|
relationship :users, type: 'devices-users', cardinality: 'To-many'
|
43
|
+
relationship :features_prices, type: 'devices-features-prices', cardinality: 'To-one'
|
43
44
|
# relationship :features_supported, type: 'devices-features-supported', cardinality: 'To-one'
|
44
45
|
# relationship :features_disabled, type: 'devices-features-disabled', cardinality: 'To-one'
|
45
46
|
|
@@ -705,5 +706,12 @@ module Alula
|
|
705
706
|
filterable: false,
|
706
707
|
creatable_by: [],
|
707
708
|
patchable_by: [:system]
|
709
|
+
|
710
|
+
field :sms_limit,
|
711
|
+
type: :number,
|
712
|
+
sortable: false,
|
713
|
+
filterable: false,
|
714
|
+
creatable_by: [],
|
715
|
+
patchable_by: %i[system station dealer]
|
708
716
|
end
|
709
717
|
end
|
@@ -0,0 +1,242 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Alula
|
4
|
+
class DeviceFeaturePrice < Alula::RestResource
|
5
|
+
extend Alula::ResourceAttributes
|
6
|
+
extend Alula::RelationshipAttributes
|
7
|
+
extend Alula::ApiOperations::Request
|
8
|
+
extend Alula::ApiOperations::List
|
9
|
+
extend Alula::ApiOperations::Save
|
10
|
+
|
11
|
+
# SMS Notification object
|
12
|
+
class SmsNotification < Alula::ObjectField
|
13
|
+
field :unit_price, type: :number
|
14
|
+
field :unit_type, type: :string
|
15
|
+
field :units, type: :number
|
16
|
+
field :subtotal, type: :number
|
17
|
+
end
|
18
|
+
|
19
|
+
resource_path 'devices/features/prices'
|
20
|
+
type 'devices-features-prices'
|
21
|
+
|
22
|
+
relationship :device, type: 'devices', cardinality: 'To-one'
|
23
|
+
|
24
|
+
field :id,
|
25
|
+
type: :string,
|
26
|
+
sortable: false,
|
27
|
+
filterable: false,
|
28
|
+
creatable_by: [],
|
29
|
+
patchable_by: []
|
30
|
+
|
31
|
+
field :activation,
|
32
|
+
type: :number,
|
33
|
+
sortable: false,
|
34
|
+
filterable: false,
|
35
|
+
creatable_by: [],
|
36
|
+
patchable_by: []
|
37
|
+
|
38
|
+
field :alarm_notifications,
|
39
|
+
type: :number,
|
40
|
+
sortable: false,
|
41
|
+
filterable: false,
|
42
|
+
creatable_by: [],
|
43
|
+
patchable_by: []
|
44
|
+
|
45
|
+
field :alarm_transmission,
|
46
|
+
type: :number,
|
47
|
+
sortable: false,
|
48
|
+
filterable: false,
|
49
|
+
creatable_by: [],
|
50
|
+
patchable_by: []
|
51
|
+
|
52
|
+
field :alarm_verification,
|
53
|
+
type: :number,
|
54
|
+
sortable: false,
|
55
|
+
filterable: false,
|
56
|
+
creatable_by: [],
|
57
|
+
patchable_by: []
|
58
|
+
|
59
|
+
field :alula_messenger,
|
60
|
+
type: :number,
|
61
|
+
sortable: false,
|
62
|
+
filterable: false,
|
63
|
+
creatable_by: [],
|
64
|
+
patchable_by: []
|
65
|
+
|
66
|
+
field :base,
|
67
|
+
type: :number,
|
68
|
+
sortable: false,
|
69
|
+
filterable: false,
|
70
|
+
creatable_by: [],
|
71
|
+
patchable_by: []
|
72
|
+
|
73
|
+
field :billing_custom,
|
74
|
+
type: :number,
|
75
|
+
sortable: false,
|
76
|
+
filterable: false,
|
77
|
+
creatable_by: [],
|
78
|
+
patchable_by: []
|
79
|
+
|
80
|
+
field :home_automation,
|
81
|
+
type: :number,
|
82
|
+
sortable: false,
|
83
|
+
filterable: false,
|
84
|
+
creatable_by: [],
|
85
|
+
patchable_by: []
|
86
|
+
|
87
|
+
field :interactive_services,
|
88
|
+
type: :number,
|
89
|
+
sortable: false,
|
90
|
+
filterable: false,
|
91
|
+
creatable_by: [],
|
92
|
+
patchable_by: []
|
93
|
+
|
94
|
+
field :intrude_impair,
|
95
|
+
type: :number,
|
96
|
+
sortable: false,
|
97
|
+
filterable: false,
|
98
|
+
creatable_by: [],
|
99
|
+
patchable_by: []
|
100
|
+
|
101
|
+
field :onvif_video_hub,
|
102
|
+
type: :number,
|
103
|
+
sortable: false,
|
104
|
+
filterable: false,
|
105
|
+
creatable_by: [],
|
106
|
+
patchable_by: []
|
107
|
+
|
108
|
+
field :panel_downloading,
|
109
|
+
type: :number,
|
110
|
+
sortable: false,
|
111
|
+
filterable: false,
|
112
|
+
creatable_by: [],
|
113
|
+
patchable_by: []
|
114
|
+
|
115
|
+
field :program_fee,
|
116
|
+
type: :number,
|
117
|
+
sortable: false,
|
118
|
+
filterable: false,
|
119
|
+
creatable_by: [],
|
120
|
+
patchable_by: []
|
121
|
+
|
122
|
+
field :super_gte_12_hour,
|
123
|
+
type: :number,
|
124
|
+
sortable: false,
|
125
|
+
filterable: false,
|
126
|
+
creatable_by: [],
|
127
|
+
patchable_by: []
|
128
|
+
|
129
|
+
field :super_gte_14_day,
|
130
|
+
type: :number,
|
131
|
+
sortable: false,
|
132
|
+
filterable: false,
|
133
|
+
creatable_by: [],
|
134
|
+
patchable_by: []
|
135
|
+
|
136
|
+
field :super_gte_15_min,
|
137
|
+
type: :number,
|
138
|
+
sortable: false,
|
139
|
+
filterable: false,
|
140
|
+
creatable_by: [],
|
141
|
+
patchable_by: []
|
142
|
+
|
143
|
+
field :super_gte_1_hour,
|
144
|
+
type: :number,
|
145
|
+
sortable: false,
|
146
|
+
filterable: false,
|
147
|
+
creatable_by: [],
|
148
|
+
patchable_by: []
|
149
|
+
|
150
|
+
field :super_gte_200_sec,
|
151
|
+
type: :number,
|
152
|
+
sortable: false,
|
153
|
+
filterable: false,
|
154
|
+
creatable_by: [],
|
155
|
+
patchable_by: []
|
156
|
+
|
157
|
+
field :super_gte_24_hour,
|
158
|
+
type: :number,
|
159
|
+
sortable: false,
|
160
|
+
filterable: false,
|
161
|
+
creatable_by: [],
|
162
|
+
patchable_by: []
|
163
|
+
|
164
|
+
field :super_gte_30_day,
|
165
|
+
type: :number,
|
166
|
+
sortable: false,
|
167
|
+
filterable: false,
|
168
|
+
creatable_by: [],
|
169
|
+
patchable_by: []
|
170
|
+
|
171
|
+
field :super_gte_5_min,
|
172
|
+
type: :number,
|
173
|
+
sortable: false,
|
174
|
+
filterable: false,
|
175
|
+
creatable_by: [],
|
176
|
+
patchable_by: []
|
177
|
+
|
178
|
+
field :super_gte_6_hour,
|
179
|
+
type: :number,
|
180
|
+
sortable: false,
|
181
|
+
filterable: false,
|
182
|
+
creatable_by: [],
|
183
|
+
patchable_by: []
|
184
|
+
|
185
|
+
field :super_gte_7_day,
|
186
|
+
type: :number,
|
187
|
+
sortable: false,
|
188
|
+
filterable: false,
|
189
|
+
creatable_by: [],
|
190
|
+
patchable_by: []
|
191
|
+
|
192
|
+
field :super_lt_200_sec,
|
193
|
+
type: :number,
|
194
|
+
sortable: false,
|
195
|
+
filterable: false,
|
196
|
+
creatable_by: [],
|
197
|
+
patchable_by: []
|
198
|
+
|
199
|
+
field :two_way_voice,
|
200
|
+
type: :number,
|
201
|
+
sortable: false,
|
202
|
+
filterable: false,
|
203
|
+
creatable_by: [],
|
204
|
+
patchable_by: []
|
205
|
+
|
206
|
+
field :video_verification,
|
207
|
+
type: :number,
|
208
|
+
sortable: false,
|
209
|
+
filterable: false,
|
210
|
+
creatable_by: [],
|
211
|
+
patchable_by: []
|
212
|
+
|
213
|
+
field :vigilance,
|
214
|
+
type: :number,
|
215
|
+
sortable: false,
|
216
|
+
filterable: false,
|
217
|
+
creatable_by: [],
|
218
|
+
patchable_by: []
|
219
|
+
|
220
|
+
field :weather_alerts,
|
221
|
+
type: :number,
|
222
|
+
sortable: false,
|
223
|
+
filterable: false,
|
224
|
+
creatable_by: [],
|
225
|
+
patchable_by: []
|
226
|
+
|
227
|
+
field :weather_forecast,
|
228
|
+
type: :number,
|
229
|
+
sortable: false,
|
230
|
+
filterable: false,
|
231
|
+
creatable_by: [],
|
232
|
+
patchable_by: []
|
233
|
+
|
234
|
+
field :sms_notification,
|
235
|
+
type: :object,
|
236
|
+
sortable: false,
|
237
|
+
filterable: false,
|
238
|
+
creatable_by: [],
|
239
|
+
patchable_by: [],
|
240
|
+
use: SmsNotification
|
241
|
+
end
|
242
|
+
end
|
data/lib/alula/version.rb
CHANGED
data/lib/alula.rb
CHANGED
@@ -60,6 +60,7 @@ require_relative 'alula/resources/station'
|
|
60
60
|
require_relative 'alula/resources/oauth_client'
|
61
61
|
require_relative 'alula/resources/device_alias'
|
62
62
|
require_relative 'alula/resources/device_notification'
|
63
|
+
require_relative 'alula/resources/device_feature_price'
|
63
64
|
require_relative 'alula/resources/video_verification_camera'
|
64
65
|
require_relative 'alula/resources/video_verification_event'
|
65
66
|
require_relative 'alula/resources/feature_plan'
|
@@ -103,6 +104,7 @@ require_relative 'alula/procedures/camera_get_svr_config_proc'
|
|
103
104
|
require_relative 'alula/procedures/camera_set_svr_config_proc'
|
104
105
|
require_relative 'alula/procedures/camera_get_rec_config_proc'
|
105
106
|
require_relative 'alula/procedures/camera_set_rec_config_proc'
|
107
|
+
require_relative 'alula/procedures/camera_get_firmware_version_proc'
|
106
108
|
|
107
109
|
module Alula
|
108
110
|
#
|
@@ -124,6 +126,7 @@ module Alula
|
|
124
126
|
Alula::DeviceCharge,
|
125
127
|
Alula::DeviceCredit,
|
126
128
|
Alula::DeviceEventLog,
|
129
|
+
Alula::DeviceFeaturePrice,
|
127
130
|
Alula::DeviceNotification,
|
128
131
|
Alula::DeviceUser,
|
129
132
|
Alula::VideoVerificationCamera,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alula-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Titus Johnson
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-11
|
11
|
+
date: 2024-12-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -218,6 +218,7 @@ files:
|
|
218
218
|
- lib/alula/oauth.rb
|
219
219
|
- lib/alula/pagination.rb
|
220
220
|
- lib/alula/procedures/camera_get_chime_info_proc.rb
|
221
|
+
- lib/alula/procedures/camera_get_firmware_version_proc.rb
|
221
222
|
- lib/alula/procedures/camera_get_info_proc.rb
|
222
223
|
- lib/alula/procedures/camera_get_rec_config_proc.rb
|
223
224
|
- lib/alula/procedures/camera_get_sd_status_proc.rb
|
@@ -270,6 +271,7 @@ files:
|
|
270
271
|
- lib/alula/resources/device_charge.rb
|
271
272
|
- lib/alula/resources/device_credit.rb
|
272
273
|
- lib/alula/resources/device_event_log.rb
|
274
|
+
- lib/alula/resources/device_feature_price.rb
|
273
275
|
- lib/alula/resources/device_notification.rb
|
274
276
|
- lib/alula/resources/device_program.rb
|
275
277
|
- lib/alula/resources/device_user.rb
|