File Coverage

blib/lib/WebService/Mattermost/V4/API/Object/User/Session.pm
Criterion Covered Total %
statement 6 10 60.0
branch 0 2 0.0
condition n/a
subroutine 2 6 33.3
pod n/a
total 8 18 44.4


line stmt bran cond sub pod time code
1             package WebService::Mattermost::V4::API::Object::User::Session;
2:

3: # ABSTRACT: A user session item. 4:
5: use Moo;
6: use Types::Standard qw(ArrayRef Bool Maybe Str);
7:
8: extends 'WebService::Mattermost::V4::API::Object';
9: with qw(
10: WebService::Mattermost::V4::API::Object::Role::BelongingToUser
11: WebService::Mattermost::V4::API::Object::Role::CreatedAt
12: WebService::Mattermost::V4::API::Object::Role::ExpiresAt
13: WebService::Mattermost::V4::API::Object::Role::ID
14: WebService::Mattermost::V4::API::Object::Role::LastActivityAt
15: WebService::Mattermost::V4::API::Object::Role::Props
16: WebService::Mattermost::V4::API::Object::Role::Roles
17: );
18:
19: ################################################################################
20:
21: has device_id => (is => 'ro', isa => Maybe[Str], lazy => 1, builder => 1);
22: has is_oauth => (is => 'ro', isa => Maybe[Bool], lazy => 1, builder => 1);
23: has team_members => (is => 'ro', isa => Maybe[ArrayRef], lazy => 1, builder => 1);
24: has token => (is => 'ro', isa => Maybe[Str], lazy => 1, builder => 1);
25:
26: ################################################################################
27:
28: sub _build_device_id { shift->raw_data->{device_id} }
29: sub _build_is_oauth { shift->raw_data->{is_oauth} ? 1 : 0 }
30: sub _build_team_members { shift->raw_data->{team_members} }
31: sub _build_token { shift->raw_data->{token} }
32:
33: ################################################################################
34:
35: 1;
36:
37: __END__
38:
39: =pod
40:
41: =encoding UTF-8
42:
43: =head1 NAME
44:
45: WebService::Mattermost::V4::API::Object::User::Session - A user session item.
46:
47: =head1 VERSION
48:
49: version 0.28
50:
51: =head1 DESCRIPTION
52:
53: =head2 METHODS
54:
55: =over 4
56:
57: =item C<device_id>
58:
59: =item C<is_oauth>
60:
61: =item C<team_members>
62:
63: =item C<token>
64:
65: =back
66:
67: =head1 SEE ALSO
68:
69: =over 4
70:
71: =item L<WebService::Mattermost::V4::API::Object::Role::BelongingToUser>
72:
73: =item L<WebService::Mattermost::V4::API::Object::Role::CreatedAt>
74:
75: =item L<WebService::Mattermost::V4::API::Object::Role::ExpiresAt>
76:
77: =item L<WebService::Mattermost::V4::API::Object::Role::ID>
78:
79: =item L<WebService::Mattermost::V4::API::Object::Role::LastActivityAt>
80:
81: =item L<WebService::Mattermost::V4::API::Object::Role::Props>
82:
83: =back
84:
85: =head1 AUTHOR
86:
87: Mike Jones <mike@netsplit.org.uk>
88:
89: =head1 COPYRIGHT AND LICENSE
90:
91: This software is Copyright (c) 2020 by Mike Jones.
92:
93: This is free software, licensed under:
94:
95: The MIT (X11) License
96:
97: =cut
98: