File Coverage

blib/lib/SemanticWeb/Schema/LocalBusiness.pm
Criterion Covered Total %
statement 15 15 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod n/a
total 20 20 100.0


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