d2 Data Mapping
Some conversion is needed between JSON and Perl:
=over 4
=item - Boolean `true` and `false` are converted to 0 and 1
=item - JSON date strings are converted to Unix numeric timesta
package Bb::Collaborate::Ultra::Session::Occurrence;
use warnings; use strict;
use Mouse;
use JSON;
extends 'Bb::Collaborate::Ultra::DAO';
use Mouse::Util::TypeConstraints;
=head1 NAME
Bb::Collabora
>id;
my $path = $self->path . '/sessions';
my $json = $session->_freeze( { id => $session_id } );
$self->connection->POST($path, $json );
}
# downloaded from https://xx-csa.bbcollab.com/d
orate::Ultra::Connection;
use warnings; use strict;
use Crypt::JWT qw(encode_jwt decode_jwt);
use JSON;
use Mouse;
use REST::Client;
use Try::Tiny;
use Bb::Collaborate::Ultra::Connection::Token;
=hea
elf->debug;
my $response_data;
if ($response_content) {
try {
$response_data = from_json( $response_content);
}
catch {
die "[$response_code] $response_content";
};
die "[$resp
;
$auth->_leased( time() );
$self->auth( $auth );
}
=head2 POST
Low level method. Posts JSON data formatted data, along with
appropriate authorization headers.
my $response = $connectio
package Bb::Collaborate::Ultra::Session::Log;
use warnings; use strict;
use Mouse;
use JSON;
extends 'Bb::Collaborate::Ultra::DAO';
use Mouse::Util::TypeConstraints;
use Bb::Collaborate::Ultra::Sessio
package Bb::Collaborate::Ultra::Session::RecurrenceRule;
use warnings; use strict;
use Mouse;
use JSON;
extends 'Bb::Collaborate::Ultra::DAO';
use Mouse::Util::TypeConstraints;
coerce __PACKAGE__, fro
te::Ultra::DAO;
use warnings; use strict;
use Mouse;
use parent qw{Class::Data::Inheritable};
use JSON;
use Bb::Collaborate::Ultra::Util;
use Mouse::Util::TypeConstraints;
use Data::Compare;
use Clone
);
my %opt = @_;
my $json = $class->_freeze($data);
my $path = $opt{path} || $class->path
or die "no POST path";
my $msg = $connection->POST($path, $json, @_);
$class->construct(
= ref($self) || $self;
my $path = $self->path;
my $json = $class->_freeze($update_data);
my $msg = $connection->PATCH($path, $json);
my $obj = $self->construct($msg, connection => $con