File Coverage

blib/lib/SemanticWeb/Schema/LocalBusiness.pm
Criterion Covered Total %
statement 17 17 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod n/a
total 23 23 100.0


line stmt bran cond sub pod time code
1 1     1   512 use utf8;
  1         2  
  1         6  
2              
3             package SemanticWeb::Schema::LocalBusiness;
4              
5             # ABSTRACT: A particular physical business or branch of an organization
6              
7 1     1   46 use v5.14;
  1         3  
8 1     1   5 use Moo;
  1         3  
  1         5  
9              
10             extends qw/ SemanticWeb::Schema::Organization SemanticWeb::Schema::Place /;
11              
12              
13 1     1   323 use MooX::JSON_LD 'LocalBusiness';
  1         2  
  1         6  
14 1     1   1989 use Ref::Util qw/ is_plain_hashref /;
  1         2  
  1         65  
15             # RECOMMEND PREREQ: Ref::Util::XS
16              
17 1     1   7 use namespace::autoclean;
  1         2  
  1         15  
18              
19             our $VERSION = 'v21.0.1';
20              
21              
22             has branch_of => (
23             is => 'rw',
24             predicate => '_has_branch_of',
25             json_ld => 'branchOf',
26             );
27              
28              
29              
30             has currencies_accepted => (
31             is => 'rw',
32             predicate => '_has_currencies_accepted',
33             json_ld => 'currenciesAccepted',
34             );
35              
36              
37              
38             has opening_hours => (
39             is => 'rw',
40             predicate => '_has_opening_hours',
41             json_ld => 'openingHours',
42             );
43              
44              
45              
46             has payment_accepted => (
47             is => 'rw',
48             predicate => '_has_payment_accepted',
49             json_ld => 'paymentAccepted',
50             );
51              
52              
53              
54             has price_range => (
55             is => 'rw',
56             predicate => '_has_price_range',
57             json_ld => 'priceRange',
58             );
59              
60              
61              
62              
63              
64             1;
65              
66             __END__
67              
68             =pod
69              
70             =encoding UTF-8
71              
72             =head1 NAME
73              
74             SemanticWeb::Schema::LocalBusiness - A particular physical business or branch of an organization
75              
76             =head1 VERSION
77              
78             version v21.0.1
79              
80             =head1 DESCRIPTION
81              
82             A particular physical business or branch of an organization. Examples of
83             LocalBusiness include a restaurant, a particular branch of a restaurant
84             chain, a branch of a bank, a medical practice, a club, a bowling alley,
85             etc.
86              
87             =head1 ATTRIBUTES
88              
89             =head2 C<branch_of>
90              
91             C<branchOf>
92              
93             The larger organization that this local business is a branch of, if any. Not to be confused with (anatomical) [[branch]].
94              
95             A branch_of should be one of the following types:
96              
97             =over
98              
99             =item C<InstanceOf['SemanticWeb::Schema::Organization']>
100              
101             =back
102              
103             =head2 C<_has_branch_of>
104              
105             A predicate for the L</branch_of> attribute.
106              
107             =head2 C<currencies_accepted>
108              
109             C<currenciesAccepted>
110              
111             The currency accepted. Use standard formats: [ISO 4217 currency
112             format](http://en.wikipedia.org/wiki/ISO_4217), e.g. "USD"; [Ticker
113             symbol](https://en.wikipedia.org/wiki/List_of_cryptocurrencies) for
114             cryptocurrencies, e.g. "BTC"; well known names for [Local Exchange Trading
115             Systems](https://en.wikipedia.org/wiki/Local_exchange_trading_system)
116             (LETS) and other currency types, e.g. "Ithaca HOUR".
117              
118             A currencies_accepted should be one of the following types:
119              
120             =over
121              
122             =item C<Str>
123              
124             =back
125              
126             =head2 C<_has_currencies_accepted>
127              
128             A predicate for the L</currencies_accepted> attribute.
129              
130             =head2 C<opening_hours>
131              
132             C<openingHours>
133              
134             =for html <p>The general opening hours for a business. Opening hours can be specified
135             as a weekly time range, starting with days, then times per day. Multiple
136             days can be listed with commas ',' separating each day. Day or time ranges
137             are specified using a hyphen '-'. * Days are specified using the following
138             two-letter combinations: ```Mo```, ```Tu```, ```We```, ```Th```, ```Fr```,
139             ```Sa```, ```Su```. * Times are specified using 24:00 format. For example,
140             3pm is specified as ```15:00```, 10am as ```10:00```. * Here is an example:
141             <code>&lt;time itemprop="openingHours" datetime=&quot;Tu,Th
142             16:00-20:00&quot;&gt;Tuesdays and Thursdays 4-8pm&lt;/time&gt;</code>. * If
143             a business is open 7 days a week, then it can be specified as
144             <code>&lt;time itemprop=&quot;openingHours&quot;
145             datetime=&quot;Mo-Su&quot;&gt;Monday through Sunday, all
146             day&lt;/time&gt;</code>.</p>
147              
148             A opening_hours should be one of the following types:
149              
150             =over
151              
152             =item C<Str>
153              
154             =back
155              
156             =head2 C<_has_opening_hours>
157              
158             A predicate for the L</opening_hours> attribute.
159              
160             =head2 C<payment_accepted>
161              
162             C<paymentAccepted>
163              
164             Cash, Credit Card, Cryptocurrency, Local Exchange Tradings System, etc.
165              
166             A payment_accepted should be one of the following types:
167              
168             =over
169              
170             =item C<Str>
171              
172             =back
173              
174             =head2 C<_has_payment_accepted>
175              
176             A predicate for the L</payment_accepted> attribute.
177              
178             =head2 C<price_range>
179              
180             C<priceRange>
181              
182             The price range of the business, for example ```$$$```.
183              
184             A price_range should be one of the following types:
185              
186             =over
187              
188             =item C<Str>
189              
190             =back
191              
192             =head2 C<_has_price_range>
193              
194             A predicate for the L</price_range> attribute.
195              
196             =head1 SEE ALSO
197              
198             L<SemanticWeb::Schema::Place>
199              
200             =head1 SOURCE
201              
202             The development version is on github at L<https://github.com/robrwo/SemanticWeb-Schema>
203             and may be cloned from L<git://github.com/robrwo/SemanticWeb-Schema.git>
204              
205             =head1 BUGS
206              
207             Please report any bugs or feature requests on the bugtracker website
208             L<https://github.com/robrwo/SemanticWeb-Schema/issues>
209              
210             When submitting a bug or request, please include a test-file or a
211             patch to an existing test-file that illustrates the bug or desired
212             feature.
213              
214             =head1 AUTHOR
215              
216             Robert Rothenberg <rrwo@cpan.org>
217              
218             =head1 COPYRIGHT AND LICENSE
219              
220             This software is Copyright (c) 2018-2023 by Robert Rothenberg.
221              
222             This is free software, licensed under:
223              
224             The Artistic License 2.0 (GPL Compatible)
225              
226             =cut