alula-ruby 2.1.2 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/Dockerfile +1 -1
- data/VERSION.md +2 -0
- data/lib/alula/procedures/video_register_proc.rb +37 -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 +8 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d96970881def7032eaa1f4566fb622a802b8f3172763f1f36155edd41782628
|
4
|
+
data.tar.gz: 77247c2916538c0812ac65975c0c4ad674e540152c7f26ea1f91d2d3749e2a7a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ba5ea055c0d1ccc7a4cea560440302ba0021142f248afff1d291a59b87a8e661e1ea36d2081bebe5f7f2939a0bbc32dd47fe811c1aaa256892a7186c57aac12
|
7
|
+
data.tar.gz: de8fc218f6b8f5875247bc9f5e96c1042f4f9691c5644b516262cecd70e69ec8e5a257191c3f8ac62ec66fa3206284abdac9a40dc9c2dc3f21adcdc6ddf5e869
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.3.
|
1
|
+
3.3.6
|
data/Dockerfile
CHANGED
data/VERSION.md
CHANGED
@@ -2,6 +2,8 @@
|
|
2
2
|
|
3
3
|
| Version | Date | Description |
|
4
4
|
| ------- | ------------| --------------------------------------------------------------------------- |
|
5
|
+
| v2.3.0 | 2024-12-17 | Add Video Register Proc |
|
6
|
+
| v2.2.0 | 2024-12-10 | Add SMS Limit to Device model and the Device Feature Price model |
|
5
7
|
| v2.1.2 | 2024-11-12 | Add CameraGetFirmwareVersionProc |
|
6
8
|
| v2.1.1 | 2024-11-12 | Add device record attribute |
|
7
9
|
| v2.1.0 | 2024-10-24 | Bump multiple dependencies |
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
##
|
4
|
+
# qrCode: string
|
5
|
+
# accountId: string
|
6
|
+
# customerId: string
|
7
|
+
# serialNumber: string
|
8
|
+
# verificationCode: string
|
9
|
+
# brand: string
|
10
|
+
# model: string
|
11
|
+
#
|
12
|
+
# Method: video.register
|
13
|
+
module Alula
|
14
|
+
class VideoRegisterProc < Alula::RpcResource
|
15
|
+
class Response < Alula::RpcResponse
|
16
|
+
end
|
17
|
+
|
18
|
+
def self.call(**kwargs)
|
19
|
+
payload = {
|
20
|
+
qrCode: kwargs[:qr_code],
|
21
|
+
accountId: kwargs[:account_id],
|
22
|
+
customerId: kwargs[:customer_id],
|
23
|
+
serialNumber: kwargs[:serial_number],
|
24
|
+
verificationCode: kwargs[:verification_code],
|
25
|
+
brand: kwargs[:brand],
|
26
|
+
model: kwargs[:model]
|
27
|
+
}
|
28
|
+
|
29
|
+
request(
|
30
|
+
http_method: :post,
|
31
|
+
path: '/rpc/v1/video/register',
|
32
|
+
payload:,
|
33
|
+
handler: Response
|
34
|
+
)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
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'
|
@@ -93,6 +94,7 @@ require_relative 'alula/procedures/user_plansvideo_price_get'
|
|
93
94
|
require_relative 'alula/procedures/user_get_locked_proc'
|
94
95
|
require_relative 'alula/procedures/user_unlock_proc'
|
95
96
|
require_relative 'alula/procedures/user_password_reset_proc'
|
97
|
+
require_relative 'alula/procedures/video_register_proc'
|
96
98
|
require_relative 'alula/procedures/video_unregister_proc'
|
97
99
|
require_relative 'alula/procedures/camera_get_wifi_proc'
|
98
100
|
require_relative 'alula/procedures/camera_get_sd_status_proc'
|
@@ -125,6 +127,7 @@ module Alula
|
|
125
127
|
Alula::DeviceCharge,
|
126
128
|
Alula::DeviceCredit,
|
127
129
|
Alula::DeviceEventLog,
|
130
|
+
Alula::DeviceFeaturePrice,
|
128
131
|
Alula::DeviceNotification,
|
129
132
|
Alula::DeviceUser,
|
130
133
|
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.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Titus Johnson
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-12-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -252,6 +252,7 @@ files:
|
|
252
252
|
- lib/alula/procedures/user_transfer_reject.rb
|
253
253
|
- lib/alula/procedures/user_transfer_request.rb
|
254
254
|
- lib/alula/procedures/user_unlock_proc.rb
|
255
|
+
- lib/alula/procedures/video_register_proc.rb
|
255
256
|
- lib/alula/procedures/video_unregister_proc.rb
|
256
257
|
- lib/alula/query_interface.rb
|
257
258
|
- lib/alula/rate_limit.rb
|
@@ -271,6 +272,7 @@ files:
|
|
271
272
|
- lib/alula/resources/device_charge.rb
|
272
273
|
- lib/alula/resources/device_credit.rb
|
273
274
|
- lib/alula/resources/device_event_log.rb
|
275
|
+
- lib/alula/resources/device_feature_price.rb
|
274
276
|
- lib/alula/resources/device_notification.rb
|
275
277
|
- lib/alula/resources/device_program.rb
|
276
278
|
- lib/alula/resources/device_user.rb
|
@@ -308,10 +310,10 @@ files:
|
|
308
310
|
- lib/parser.rb
|
309
311
|
- utils/mariadb/conf/custom.cnf
|
310
312
|
- utils/mongodb/init/00_users.sh
|
311
|
-
homepage:
|
313
|
+
homepage:
|
312
314
|
licenses: []
|
313
315
|
metadata: {}
|
314
|
-
post_install_message:
|
316
|
+
post_install_message:
|
315
317
|
rdoc_options: []
|
316
318
|
require_paths:
|
317
319
|
- lib
|
@@ -327,7 +329,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
327
329
|
version: '0'
|
328
330
|
requirements: []
|
329
331
|
rubygems_version: 3.0.3.1
|
330
|
-
signing_key:
|
332
|
+
signing_key:
|
331
333
|
specification_version: 4
|
332
334
|
summary: Ruby bindings for the Alula API
|
333
335
|
test_files: []
|