alula-ruby 2.1.2 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2a5c030dc25e12e66dfeba3db613a92b54fdc53e821351a51e78da43efd2d9be
4
- data.tar.gz: f869b4408ac1b0179baf1114b6fe6cc380d8d76e40fb7652614968ee3f05d3c2
3
+ metadata.gz: 247c9119a14643882e61a122b637a87d235765849ae133f014c64e231bd02a9e
4
+ data.tar.gz: a6ff54e27b1c51a5a0ea5b683e64e3e31a1165c89ba0bd8d12d545ab13f1415e
5
5
  SHA512:
6
- metadata.gz: 3045b8f512ce320edfbc6e8b79392e83fbcda4fd2adef9cc5403e7979025d075bb3ebeafa8ff00e7e69e3ba40858f0a4883021a49116d0127139a4632ccc50de
7
- data.tar.gz: 6a5dd45a244df7c4e98eb5412a245025018debf109ea9524dc41e0ba6ec2a40fa7ff1fa45ea13e78a0abd122a5fbf7df00bd09c9883e61d4c3009c8e28cc675d
6
+ metadata.gz: 04e0f8b86cf095f5d9365fce87560ec5748b95e09bbf5180aaa8bb299d72a291242e9456fa5939df5ef7e13f2197f19d7b35ec01e8ec004747042994113a1504
7
+ data.tar.gz: 450925aacda921e9e0897134bbb8a734438b690d6e64025a7d8e83b882a2b57414790ade19b394ab6119c72a80a7eb3ceabbd19cf5bde32d04a10c037819bc28
data/VERSION.md CHANGED
@@ -2,6 +2,7 @@
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 |
5
6
  | v2.1.2 | 2024-11-12 | Add CameraGetFirmwareVersionProc |
6
7
  | v2.1.1 | 2024-11-12 | Add device record attribute |
7
8
  | v2.1.0 | 2024-10-24 | Bump multiple dependencies |
@@ -73,6 +73,8 @@ module Alula
73
73
  value ? Util.underscore(value).to_sym : nil
74
74
  elsif opts[:hex_convert_required] == true
75
75
  Util.convert_hex_crc?(self.program_id) ? value.to_s(16) : value
76
+ elsif opts[:type] == :number
77
+ value&.to_i
76
78
  else
77
79
  value
78
80
  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
@@ -6,7 +6,7 @@ module Alula
6
6
  extend Alula::ApiOperations::Save
7
7
 
8
8
  resource_path 'features/prices'
9
- type 'feature-prices'
9
+ type 'features-prices'
10
10
 
11
11
  field :id,
12
12
  type: :string,
data/lib/alula/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Alula
4
- VERSION = '2.1.2'
4
+ VERSION = '2.2.0'
5
5
  end
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'
@@ -125,6 +126,7 @@ module Alula
125
126
  Alula::DeviceCharge,
126
127
  Alula::DeviceCredit,
127
128
  Alula::DeviceEventLog,
129
+ Alula::DeviceFeaturePrice,
128
130
  Alula::DeviceNotification,
129
131
  Alula::DeviceUser,
130
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.1.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-12 00:00:00.000000000 Z
11
+ date: 2024-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -271,6 +271,7 @@ files:
271
271
  - lib/alula/resources/device_charge.rb
272
272
  - lib/alula/resources/device_credit.rb
273
273
  - lib/alula/resources/device_event_log.rb
274
+ - lib/alula/resources/device_feature_price.rb
274
275
  - lib/alula/resources/device_notification.rb
275
276
  - lib/alula/resources/device_program.rb
276
277
  - lib/alula/resources/device_user.rb