lws 7.1.2 → 7.2.2

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: a6ddf096778ba5030a935df95f904a65776bbd8b2dd30602e3c9d912124fb5cd
4
- data.tar.gz: 739154dc2c9598eef580f9a562cff9ddccde3a0828e985c55429ceed74f03a5d
3
+ metadata.gz: 350e54af9f57bb0b94f8f51248803a4e6fa9e2f421756e4d2bac70366ce23fff
4
+ data.tar.gz: 7ea50f13efa607f5cca37a78f4017bb3b538c203ebd186a1de981bc56d9d7aab
5
5
  SHA512:
6
- metadata.gz: c6f4e39e00a7277ed012c6d4a2a846dae249edf892db185d17c5a62efa012902bc388ed4e652a26e25eb30ea07e208fbe4ef08b19671c750a0e3f33aa719f8a5
7
- data.tar.gz: 696ae43f1ed90d4674365f86d63d411fc21544cce16ba250079e0bcefef1143c9d908c6e01b18773b006fa9a704e45ebc85795ff044c28948bf16fb79f4da042
6
+ metadata.gz: e2d6398954478aa49996571f6925c9272c325e2fe33da50ecced8945788babb92db0a8ca55b5f959216c242dee51b39ff89eb14a1b7b34d85ebebf5b2dfa34a0
7
+ data.tar.gz: f269968ac27d608b2ccced085c4ae425818039340262c5e66bbdded3cc4f3438f781e1add2c15a9b503199c5996f47b0788ccd98c692300f560530fa0df5caf2
@@ -87,13 +87,11 @@ begin
87
87
  if @options[:cfg_file]
88
88
  cfg_file = @options[:cfg_file]
89
89
  raise "config file does not exist: #{cfg_file}" unless File.exist? cfg_file
90
- config.load_config_file(cfg_file)
90
+ config.load_config_file(cfg_file, @options[:environment])
91
91
  else
92
- config.load_config_file(GLOBAL_CONFIG_FILE)
93
- config.load_config_file(USER_CONFIG_FILE)
92
+ config.load_config_file(GLOBAL_CONFIG_FILE, @options[:environment])
93
+ config.load_config_file(USER_CONFIG_FILE, @options[:environment])
94
94
  end
95
-
96
- config.environment = @options[:environment] if @options[:environment]
97
95
  end
98
96
  if @options[:app]
99
97
  @app_module = LWS.app_module(@options[:app].downcase)
@@ -158,7 +156,7 @@ if LWS.config.http_debug
158
156
  end
159
157
  end
160
158
  debug_outputs << "JSON" if LWS.config.json_debug
161
- unless debug_outputs.present?
159
+ if debug_outputs.present?
162
160
  puts "- Debug output: #{debug_outputs.join(', ')}"
163
161
  end
164
162
  puts
data/lib/lws.rb CHANGED
@@ -1,15 +1,16 @@
1
1
  #
2
- # Copyright © 2016 LeftClick B.V.
2
+ # Copyright © 2016–2020 LeftClick B.V.
3
3
  #
4
4
  # This software is property of LeftClick B.V. and cannot be redistributed
5
5
  # and/or modified without permission. The software or any of its parts
6
6
  # cannot be used for any other purposes than the LeftClick services and
7
7
  # only during a valid license subscription. For more information, please
8
- # contact LeftClick B.V. at: Geldropseweg 8B, 5731 SG Mierlo, The
9
- # Netherlands, info@leftclick.eu, +31492-782120.
8
+ # contact LeftClick B.V. at: Schootense Dreef 20A, 5708 HZ Helmond, The
9
+ # Netherlands, info@leftclick.eu, +3185-4444-004.
10
10
 
11
11
 
12
12
  require "faraday_middleware"
13
+ require "faraday/http_cache"
13
14
  require "hashie"
14
15
  require "multi_json"
15
16
  require "spyke"
@@ -43,7 +44,7 @@ module LWS
43
44
  # @return [Config] the API configuration for the web services
44
45
  mattr_reader :config
45
46
 
46
- # @return [Stubbing] the stubbing setup for the web service
47
+ # @return [Stubbing] the stubbing setup for the web services
47
48
  mattr_reader :stubbing
48
49
 
49
50
  # Sets up the application API libraries using the provided
@@ -73,11 +74,15 @@ module LWS
73
74
  #
74
75
  # @yieldparam [Config] config an API configuration object that can be
75
76
  # configured
76
- # @raise [LWS::Errors::ConfigError] if the API token is not configured/found
77
+ # @raise [LWS::Errors::ConfigError] if the API token is not configured/found afterwards
77
78
  # @return [LWS] the module itself
78
79
  def self.setup(&block)
79
80
  @@config = Config.new
80
- yield @@config
81
+
82
+ # Override the environment if needed
83
+ if ENV["LC_LWS_ENV"].present?
84
+ @@config.environment = ENV["LC_LWS_ENV"].to_sym
85
+ end
81
86
 
82
87
  # Override the API token if needed (and no custom API token middleware
83
88
  # is used)
@@ -85,10 +90,7 @@ module LWS
85
90
  @@config.api_token = ENV["LC_LWS_API_TOKEN"]
86
91
  end
87
92
 
88
- # Override the environment if needed
89
- if ENV["LC_LWS_ENV"].present?
90
- @@config.environment = ENV["LC_LWS_ENV"].to_sym
91
- end
93
+ yield @@config
92
94
 
93
95
  if config.api_token.blank? and config.api_token_middleware.blank?
94
96
  raise LWS::Errors::ConfigError,
@@ -107,14 +109,20 @@ module LWS
107
109
  # Sets up the Faraday API object with the current LWS configuration for
108
110
  # the given API URL.
109
111
  #
110
- # @param api_url The endpoint URL of the API
111
- # @return [Faraday] A Faraday connection that makes requests to the API
112
+ # @param api_url [String] The endpoint URL of the API
113
+ # @return [Faraday::Connection] A Faraday connection that makes requests to the API
112
114
  def self.setup_api(api_url)
113
115
  api = Faraday.new(url: api_url) do |c|
114
116
  # Request
115
117
  if config.caching_object
116
118
  c.use FaradayMiddleware::Caching, config.caching_object
117
119
  end
120
+ if config.http_caching
121
+ logger = config.http_debug ? config.logger : nil
122
+ c.use Faraday::HttpCache, store: config.http_caching_object,
123
+ logger: logger,
124
+ shared_cache: false
125
+ end
118
126
  c.use RequestHeaders, config.api_token
119
127
  c.use config.api_token_middleware if config.api_token_middleware.present?
120
128
  c.request :json
@@ -1,12 +1,12 @@
1
1
  #
2
- # Copyright © 2016 LeftClick B.V.
2
+ # Copyright © 2016–2020 LeftClick B.V.
3
3
  #
4
4
  # This software is property of LeftClick B.V. and cannot be redistributed
5
5
  # and/or modified without permission. The software or any of its parts
6
6
  # cannot be used for any other purposes than the LeftClick services and
7
7
  # only during a valid license subscription. For more information, please
8
- # contact LeftClick B.V. at: Geldropseweg 8B, 5731 SG Mierlo, The
9
- # Netherlands, info@leftclick.eu, +31492-782120.
8
+ # contact LeftClick B.V. at: Schootense Dreef 20A, 5708 HZ Helmond, The
9
+ # Netherlands, info@leftclick.eu, +3185-4444-004.
10
10
 
11
11
 
12
12
  # = The auth app module
@@ -1,12 +1,12 @@
1
1
  #
2
- # Copyright © 2016 LeftClick B.V.
2
+ # Copyright © 2016–2020 LeftClick B.V.
3
3
  #
4
4
  # This software is property of LeftClick B.V. and cannot be redistributed
5
5
  # and/or modified without permission. The software or any of its parts
6
6
  # cannot be used for any other purposes than the LeftClick services and
7
7
  # only during a valid license subscription. For more information, please
8
- # contact LeftClick B.V. at: Geldropseweg 8B, 5731 SG Mierlo, The
9
- # Netherlands, info@leftclick.eu, +31492-782120.
8
+ # contact LeftClick B.V. at: Schootense Dreef 20A, 5708 HZ Helmond, The
9
+ # Netherlands, info@leftclick.eu, +3185-4444-004.
10
10
 
11
11
 
12
12
  # = The corporate website app module
@@ -1,12 +1,12 @@
1
1
  #
2
- # Copyright © 2017 LeftClick B.V.
2
+ # Copyright © 2016–2020 LeftClick B.V.
3
3
  #
4
4
  # This software is property of LeftClick B.V. and cannot be redistributed
5
5
  # and/or modified without permission. The software or any of its parts
6
6
  # cannot be used for any other purposes than the LeftClick services and
7
7
  # only during a valid license subscription. For more information, please
8
- # contact LeftClick B.V. at: Geldropseweg 8B, 5731 SG Mierlo, The
9
- # Netherlands, info@leftclick.eu, +31492-782120.
8
+ # contact LeftClick B.V. at: Schootense Dreef 20A, 5708 HZ Helmond, The
9
+ # Netherlands, info@leftclick.eu, +3185-4444-004.
10
10
 
11
11
 
12
12
  # = The digital_signage app module
@@ -497,6 +497,11 @@ module LWS::DigitalSignage
497
497
  class Layout < LWS::Generic::Model
498
498
  use_api LWS::DigitalSignage.api
499
499
 
500
+ # @!attribute category_ids
501
+ # @return [Array<Integer>] the IDs of the categories assoicated with
502
+ # the layout
503
+ attribute :category_ids
504
+
500
505
  # @!attribute categories
501
506
  # @return [Array<Layout::Category>] the categories associated with
502
507
  # the layout
@@ -504,13 +509,19 @@ module LWS::DigitalSignage
504
509
  has_many :categories, class_name: "LWS::DigitalSignage::Layout::Category",
505
510
  uri: "layout/:layout_id/categories(/:id)"
506
511
 
507
- # @!attribute company
508
- # @return [LWS::Auth::Company] the company the layout belongs to
509
- belongs_to :company, class_name: "LWS::Auth::Company"
512
+ # @!attribute company_owner
513
+ # @return [LWS::Auth::Company] the company that owns the layout
514
+ belongs_to :company_owner, class_name: "LWS::Auth::Company",
515
+ foreign_key: :company_owner_id,
516
+ uri: "companies/:id"
510
517
 
511
- # @!attribute company_id
512
- # @return [Integer] the ID of the company the layout belongs to
513
- attribute :company_id
518
+ # @!attribute company_owner_id
519
+ # @return [Integer] the ID of the company that owns the layout
520
+ attribute :company_owner_id
521
+
522
+ # @!attribute company_shared_ids
523
+ # @return [Array<Integer>] the IDs of the company the layout is shared with
524
+ attribute :company_shared_ids
514
525
 
515
526
  # @!attribute default_duration
516
527
  # @return [5..3600] the default duration of a slide created from the layout
@@ -520,6 +531,14 @@ module LWS::DigitalSignage
520
531
  # @return [String, nil] the description of the layout
521
532
  attribute :description
522
533
 
534
+ # @!attribute description_html
535
+ # @return [String, nil] an HTML version of the description of the layout
536
+ attribute :description_html
537
+
538
+ # @!attribute duration_kind
539
+ # @return ["variable", "fixed", "kind"] the duration kind of the layout
540
+ attribute :duration_kind
541
+
523
542
  # @!attribute favorite
524
543
  # @return [Boolean] whether the layout is a favorite for the current account
525
544
  attribute :favorite
@@ -547,11 +566,25 @@ module LWS::DigitalSignage
547
566
  # @return [Boolean] whether the layout has priority over others
548
567
  attribute :priority
549
568
 
569
+ # @!attribute public
570
+ # @return [Boolean] whether the layout is public (i.e. shared with all
571
+ # companies)
572
+ attribute :public
573
+
574
+ # @!attribute rotation
575
+ # @return ["landscape", "portrait"] the rotation (orientation) of the
576
+ # layout
577
+ attribute :rotation
578
+
550
579
  # @!attribute slides
551
580
  # @return [Array<Slide>] the slides using the layout
552
581
  has_many :slides, class_name: "LWS::DigitalSignage::Slide",
553
582
  uri: "layouts/:layout_id/slides(/:id)"
554
583
 
584
+ # @!attribute thumbnail_url
585
+ # @return [String, nil] the URL of the thumbnail of the layout
586
+ attribute :thumbnail_url
587
+
555
588
  # @!attribute trans
556
589
  # @return ["cut", "fadein", "zoomin", "slidein"] the transition of the
557
590
  # entire layout
@@ -728,6 +761,19 @@ module LWS::DigitalSignage
728
761
  use_api LWS::DigitalSignage.api
729
762
  uri "layout/:layout_id/versions(/:id)"
730
763
 
764
+ # @!attribute archive_storage_id
765
+ # @return [String, nil] sthe storage ID of the archive/layout pack of the
766
+ # layout version
767
+ attribute :archive_storage_id
768
+
769
+ # @!attribute archive_url
770
+ # @note
771
+ # To be able retrieve this, the token needs to be passed via +X-Token+
772
+ # in the HTTP request headers!
773
+ # @return [String, nil] the URL of the archive/layout pack of the layout
774
+ # version (if accessible)
775
+ attribute :archive_url
776
+
731
777
  # @!attribute elements
732
778
  # @return [Array<Layout::Element>] the elements contained in the layout
733
779
  # version
@@ -801,9 +847,9 @@ module LWS::DigitalSignage
801
847
  # @return [Integer] the ID of the configuration of the player
802
848
  attribute :configuration_id
803
849
 
804
- # @!attribute feedbacks
850
+ # @!attribute feedback
805
851
  # @return [Hash{String=>String}] a mapping of player feedback key/values
806
- attribute :feedbacks
852
+ attribute :feedback
807
853
 
808
854
  # @!attribute [r] health_percentage
809
855
  # @return [Fixnum] the health of the player (percentage)
@@ -834,13 +880,17 @@ module LWS::DigitalSignage
834
880
  # @return [Integer] the ID of the model of the player
835
881
  attribute :model_id
836
882
 
883
+ # @!attribute name
884
+ # @return [String] the name of the player
885
+ attribute :name
886
+
837
887
  # @!attribute notifications
838
888
  # @return [Array<Player::Notification>] the notifications for the player
839
889
  has_many :notifications, class_name: "LWS::DigitalSignage::Player::Notification"
840
890
 
841
- # @!attribute operational_hours [r]
891
+ # @!attribute operation_hours [r]
842
892
  # @return [String, nil] the number of hours the player has been operational
843
- attribute :operational_hours
893
+ attribute :operation_hours
844
894
 
845
895
  # @!attribute operational_since [r]
846
896
  # @return [String, nil] the date/time when the player became operational
@@ -855,6 +905,10 @@ module LWS::DigitalSignage
855
905
  # @return [Array<Player::Component::Part>] the parts of the player
856
906
  has_many :parts, class_name: "LWS::DigitalSignage::Player::Component::Part"
857
907
 
908
+ # @!attribute recent_os
909
+ # @return [Boolean] whether the OS of the player is recent
910
+ attribute :recent_os
911
+
858
912
  # @!attribute registration_locked
859
913
  # @return [Boolean] whether registarion is locked for the player
860
914
  attribute :registration_locked
@@ -891,9 +945,14 @@ module LWS::DigitalSignage
891
945
  attribute :status
892
946
 
893
947
  # @!attribute status_reason [r]
894
- # @return [String] the reason for the current player status
948
+ # @return ["unknown", "hardware_failure", "outdated_os", "good", "connection_inactive_short",
949
+ # "connection_inactive_long"] the reason for the current player status
895
950
  attribute :status_reason
896
951
 
952
+ # @!attribute status_updated_at [r]
953
+ # @return [String] the date/time the status was last updated
954
+ attribute :status_updated_at
955
+
897
956
  # @!attribute tags
898
957
  # @return [Array<Player::Tag>] the tags of the player
899
958
  has_many :tags, class_name: "LWS::DigitalSignage::Player::Tag"
@@ -1685,6 +1744,10 @@ module LWS::DigitalSignage
1685
1744
  # scheduled on
1686
1745
  has_many :channel_groups, class_name: "LWS::DigitalSignage::Channel::Group"
1687
1746
 
1747
+ # @!attribute comments
1748
+ # @return [String, nil] the comments/remarks for the slide
1749
+ attribute :comments
1750
+
1688
1751
  # @!attribute company
1689
1752
  # @return [LWS::Auth::Company] the company the slide belongs to
1690
1753
  belongs_to :company, class_name: "LWS::Auth::Company"
@@ -1693,6 +1756,19 @@ module LWS::DigitalSignage
1693
1756
  # @return [Integer] the ID of the company the slide belongs to
1694
1757
  attribute :company_id
1695
1758
 
1759
+ # @!attribute duration
1760
+ # @return [Integer, nil] the duration of the slide (for fixed or content-bound durations
1761
+ # in the layout)
1762
+ attribute :duration
1763
+
1764
+ # @!attribute edit_account_ids
1765
+ # @return [Array<Integer>] the IDs of the accounts that can edit the slide
1766
+ attribute :edit_account_ids
1767
+
1768
+ # @!attribute editable_by_me
1769
+ # @return [Boolean] whether the authenticated user can edit the slide
1770
+ attribute :editable_by_me
1771
+
1696
1772
  # @!attribute layout
1697
1773
  # @return [LWS::Layout] the layout the slide uses
1698
1774
  belongs_to :layout
@@ -1711,13 +1787,16 @@ module LWS::DigitalSignage
1711
1787
 
1712
1788
  # @!attribute schedules
1713
1789
  # @return [Array<Schedule>] the slide schedules that apply for the slide
1714
- # FIXME: Missing endpoint in LWS
1715
1790
  has_many :schedules, class_name: "LWS::DigitalSignage::Slide::Schedule"
1716
1791
 
1717
1792
  # @!attribute status [r]
1718
1793
  # @return ["initializing", "waiting_content", "available", "error"]
1719
1794
  # the status of the slide
1720
1795
  attribute :status
1796
+
1797
+ # @!attribute thumbnail_url
1798
+ # @return [String, nil] the URL of the thumbnail of the slide
1799
+ attribute :thumbnail_url
1721
1800
  end
1722
1801
 
1723
1802
  # = The slide schedule class
@@ -1,12 +1,12 @@
1
1
  #
2
- # Copyright © 2016 LeftClick B.V.
2
+ # Copyright © 2016–2020 LeftClick B.V.
3
3
  #
4
4
  # This software is property of LeftClick B.V. and cannot be redistributed
5
5
  # and/or modified without permission. The software or any of its parts
6
6
  # cannot be used for any other purposes than the LeftClick services and
7
7
  # only during a valid license subscription. For more information, please
8
- # contact LeftClick B.V. at: Geldropseweg 8B, 5731 SG Mierlo, The
9
- # Netherlands, info@leftclick.eu, +31492-782120.
8
+ # contact LeftClick B.V. at: Schootense Dreef 20A, 5708 HZ Helmond, The
9
+ # Netherlands, info@leftclick.eu, +3185-4444-004.
10
10
 
11
11
 
12
12
  # = The generic app module
@@ -79,8 +79,10 @@ module LWS::Generic
79
79
  # Sets the Faraday API object used for this class. This will used by
80
80
  # Spyke.
81
81
  #
82
- # @param api The Faraday connection that makes requests to the API
83
- # @return [Faraday] A Faraday connection that makes requests to the API
82
+ # @param [Faraday::Connection] api A Faraday connection that makes
83
+ # requests to the API
84
+ # @return [Faraday::Connection] The Faraday connection that makes requests
85
+ # to the API
84
86
  def self.use_api(api)
85
87
  self.connection = api
86
88
  self.include_root_in_json self.name.split("::").last.underscore.to_sym
@@ -155,7 +157,11 @@ module LWS::Generic
155
157
  # @return [Object, nil] the digged up value or +nil+
156
158
  def dig(*attrs)
157
159
  attr = attrs.shift
158
- value = send(attr)
160
+ value = begin
161
+ send(attr)
162
+ rescue NoMethodError
163
+ nil
164
+ end
159
165
  return nil if value.nil?
160
166
  return value if attrs.empty?
161
167
  raise TypeError, "#{value.class} does not have #dig method" unless value.respond_to? :dig
@@ -191,7 +197,7 @@ module LWS::Generic
191
197
 
192
198
  # = The storage class
193
199
  #
194
- # This class can be used to upload files for this app module.
200
+ # This class can be used to download and upload files for this app module.
195
201
  class Storage
196
202
  # @!visibility private
197
203
  def self.use_api(api)
@@ -262,7 +268,7 @@ module LWS::Generic
262
268
  checksum = Digest::MD5.base64digest(data)
263
269
  body = { blob: { filename: filename,
264
270
  content_type: content_type,
265
- byte_size: data.length,
271
+ byte_size: data.bytesize,
266
272
  checksum: checksum } }
267
273
  res = @as_connection.post do |req|
268
274
  req.url "rails/active_storage/direct_uploads"
@@ -1,12 +1,12 @@
1
1
  #
2
- # Copyright © 2016 LeftClick B.V.
2
+ # Copyright © 2016–2020 LeftClick B.V.
3
3
  #
4
4
  # This software is property of LeftClick B.V. and cannot be redistributed
5
5
  # and/or modified without permission. The software or any of its parts
6
6
  # cannot be used for any other purposes than the LeftClick services and
7
7
  # only during a valid license subscription. For more information, please
8
- # contact LeftClick B.V. at: Geldropseweg 8B, 5731 SG Mierlo, The
9
- # Netherlands, info@leftclick.eu, +31492-782120.
8
+ # contact LeftClick B.V. at: Schootense Dreef 20A, 5708 HZ Helmond, The
9
+ # Netherlands, info@leftclick.eu, +3185-4444-004.
10
10
 
11
11
 
12
12
  # = The maps app module
@@ -1,12 +1,12 @@
1
1
  #
2
- # Copyright © 2016 LeftClick B.V.
2
+ # Copyright © 2016–2020 LeftClick B.V.
3
3
  #
4
4
  # This software is property of LeftClick B.V. and cannot be redistributed
5
5
  # and/or modified without permission. The software or any of its parts
6
6
  # cannot be used for any other purposes than the LeftClick services and
7
7
  # only during a valid license subscription. For more information, please
8
- # contact LeftClick B.V. at: Geldropseweg 8B, 5731 SG Mierlo, The
9
- # Netherlands, info@leftclick.eu, +31492-782120.
8
+ # contact LeftClick B.V. at: Schootense Dreef 20A, 5708 HZ Helmond, The
9
+ # Netherlands, info@leftclick.eu, +3185-4444-004.
10
10
 
11
11
 
12
12
  # = The presence app module
@@ -43,10 +43,6 @@ module LWS::Presence
43
43
  class Appointment < LWS::Generic::Model
44
44
  use_api LWS::Presence.api
45
45
 
46
- # @!attribute title
47
- # @return [String] the title of the appointment
48
- attribute :title
49
-
50
46
  # @!attribute datetime_end
51
47
  # @return [String] the timestamp of the end of the appointment
52
48
  attribute :datetime_end
@@ -72,17 +68,21 @@ module LWS::Presence
72
68
  attribute :location_id
73
69
 
74
70
  # @!attribute organiser
75
- # @return [Person] the origaniser of the appointment
71
+ # @return [Person] the organiser of the appointment
76
72
  belongs_to :organiser, class_name: "LWS::Presence::Person"
77
73
 
78
74
  # @!attribute organiser_id
79
- # @return [Fixnum] the ID of the origaniser of the appointment
75
+ # @return [Fixnum] the ID of the organiser of the appointment
80
76
  attribute :organiser_id
81
77
 
82
78
  # @!attribute people
83
79
  # @return [Array<Person>] the people associated with the appointment
84
80
  has_many :people
85
81
 
82
+ # @!attribute title
83
+ # @return [String] the title of the appointment
84
+ attribute :title
85
+
86
86
  # @!attribute uuid
87
87
  # @return [String] the UUID of the location
88
88
  attribute :uuid
@@ -439,6 +439,10 @@ module LWS::Presence
439
439
  class Person < LWS::Generic::Model
440
440
  use_api LWS::Presence.api
441
441
 
442
+ # @!attribute address
443
+ # @return [String, nil] the address of the person
444
+ attribute :address
445
+
442
446
  # @!attribute appointments
443
447
  # @return [Array<Appointment>] the appointments involving the person
444
448
  has_many :appointments
@@ -454,6 +458,18 @@ module LWS::Presence
454
458
  # @return [String, nil] the URL of the avatar of the person
455
459
  attribute :avatar_url
456
460
 
461
+ # @!attribute birthdate
462
+ # @return [String, nil] the birthdate of the person
463
+ attribute :birthdate
464
+
465
+ # @!attribute city
466
+ # @return [String, nil] the city of the person
467
+ attribute :city
468
+
469
+ # @!attribute country
470
+ # @return [String, nil] the country of the person
471
+ attribute :country
472
+
457
473
  # @!attribute company
458
474
  # @return [LWS::Auth::Company] the company the person belongs to
459
475
  belongs_to :company, class_name: "LWS::Auth::Company"
@@ -595,12 +611,24 @@ module LWS::Presence
595
611
  # @return ["public", "private"] if a person should be protected by not
596
612
  # showing critical information
597
613
  attribute :visibility
614
+
615
+ # @!attribute zip_code
616
+ # @return [String, nil] the zip code of the person
617
+ attribute :zip_code
598
618
  end
599
619
 
600
620
  # = The reader class
601
621
  class Reader < LWS::Generic::Model
602
622
  use_api LWS::Presence.api
603
623
 
624
+ # @!attribute company
625
+ # @return [LWS::Auth::Company] the company the reader belongs to
626
+ belongs_to :company, class_name: "LWS::Auth::Company"
627
+
628
+ # @!attribute company_id
629
+ # @return [Integer] the ID of the company the reader belongs to
630
+ attribute :company_id
631
+
604
632
  # @!attribute gateway
605
633
  # @return [Integer] the (32-bit) LCIO gateway ID of the reader
606
634
  attribute :gateway
@@ -613,9 +641,17 @@ module LWS::Presence
613
641
  # @return [Integer] the ID of the location of the reader
614
642
  attribute :location_id
615
643
 
644
+ # @!attribute name
645
+ # @return [String] the name of the reader
646
+ attribute :name
647
+
616
648
  # @!attribute node
617
649
  # @return [Integer] the (8-bit) LCIO gateway node number of the reader
618
650
  attribute :node
651
+
652
+ # @!attribute serial_number
653
+ # @return [String] the serial number of the reader
654
+ attribute :serial_number
619
655
  end
620
656
 
621
657
  # (see Generic::Storage)