'MIME::Base64' => 3.13,
'DateTime::Format::ISO8601' => 0.08,
'JSON::Parse' => 0.56,
'List::MoreUtils' => 0.33,
'Time::HiRes'
EST_CATEGORY_READ);
return $handler_instance->api_call("bulkread.ResponseHandler", "application/json");
}
sub download_result
{
my ($self,$job_id) = @_;
my $handler_instance = CommonAPIHandler->
application/json");
$handler_instance->set_request($request);
$handler_instance->set_mandatory_checker(1);
return $handler_instance->api_call("bulkread.ActionHandler", "application/json");
}
1;
com::zoho::crm::api::util::Constants;
use JSON;
use File::Spec::Functions qw(catfile);
use Try::Catch;
use Log::Handler;
use File::Path;
use JSON::Parse "json_file_to_perl";
our $logger = Log::Handle
ld_details_json = json_file_to_perl($record_field_details_path);
my %record_field_details_json = %{$record_field_details_json};
if(exists($record_field_details_json{lc($modul
ls_json{lc($module)});
}
my $JSON = JSON->new->utf8;
my $data;
open($data, ">", $record_field_details_path);
my $encoded_json = $JSON->e
package Log;
use JSON;
sub new
{
my ($class, $level, $file_path) = @_;
my $self={
'level' => $level,
'file_path' => $file_path
};
bless $self, $class;
return $self;
}
s
itializer::get_json_details();
my %json_details = %{$init};
$pack =~ s/::/./;
$package_path = $self->find_class_path($pack, \%json_details);
my $class_detail = $json_details{$packa
if("$type" eq "List")
{
my @array = $self->set_json_array($field_value, $member_detail);
$request_hash->{$key_name} = [@array];
type" eq "HashMap")
{
$request_hash->{$key_name} = $self->set_json_object($field_value, \%member_detail);
}
elsif(exists($member_det
type}->($obj);
}
=head1 NAME
com::zoho::crm::api::util::DataTypeConverter - This class converts JSON value to the expected data type.
=head1 DESCRIPTION
=head2 METHODS
=over 4
=item C<init>
Thi
rter method.
=item C<pre_convert>
This method is to convert JSON value to expected data value.
Param obj : A Object containing the JSON value.
Param type : A String containing the expected method
Type containing expected data value.
=item C<post_convert>
This method to convert Perl data to JSON data value.
Param obj : A specified dataType containing a perl data value.
Param type : A Strin
ce Path MUST NOT be undef/empty.";
our $LOGFILE_NAME = "SDKLogs.log";
our $JSON_DETAILS_FILE_PATH = "src/JsonDetails.json";
our $INITIALIZATION_SUCCESSFUL = "Initialization successful ";
our $INIT
TEGORY_READ);
return $handler_instance->api_call("variablegroups.ResponseHandler", "application/json");
}
sub get_variable_group_by_id
{
my ($self,$id) = @_;
my $handler_instance = CommonAPIHand
TEGORY_READ);
return $handler_instance->api_call("variablegroups.ResponseHandler", "application/json");
}
sub get_variable_group_by_api_name
{
my ($self,$api_name) = @_;
my $handler_instance = C
nts::REQUEST_METHOD_GET);
$handler_instance->set_category_method($Constants::REQUEST_CATEGORY_READ);
return $handler_instance->api_call("variablegroups.ResponseHandler", "application/json");
}
1;
use strict;
use warnings;
use Scalar::Util qw(blessed);
use JSON;
use Switch;
use Data::Dumper;
use Try::Catch;
use Log::Handler;
use src::com::zoho::crm::api::util::APIHTTPConnector;
use src::com::z
oho::crm::api::util::APIResponse;
use src::com::zoho::crm::api::util::JSONConverter;
use src::com::zoho::crm::api::util::XMLConverter;
use src::com::zoho::crm::api::util::Downloader;
use src::com::zoh
ter;
switch($encode_type)
{
case ["application/json", "text/plain", "text/html"]
{
$converter = JSONConverter->new($self)
}
case ["application/xml"
rc::com::zoho::api::exception::SDKException;
use src::com::zoho::crm::api::Initializer;
use JSON::Parse 'json_file_to_perl';
use Cwd qw(realpath);
sub validate
{
my($self, $header_param, $value)
y $json_details = $self->get_json_details();
my %json_details=%{$json_details};
my $json_class_name = $self->get_file_name($class_name);
my $type_detail = undef;
if(exists($json_de
tails{$json_class_name}))
{
$type_detail = $self->get_key_json_details($name, $json_details{$json_class_name});
}
if(defined($type_detail))
{
my %type_detail = %{$type
elf->{module});
return $handler_instance->api_call("relatedlists.ResponseHandler", "application/json");
}
sub get_related_list
{
my ($self,$id) = @_;
my $handler_instance = CommonAPIHandler->new
ry_method($Constants::REQUEST_CATEGORY_READ);
$handler_instance->add_param("module", $self->{module});
return $handler_instance->api_call("relatedlists.ResponseHandler", "application/json");
}
1;
set_mandatory_checker(1);
return $handler_instance->api_call("file.ActionHandler", "application/json");
}
sub get_file
{
my ($self,$param_instance) = @_;
if((defined($param_instance))&&(!(($para
r. ".json";
# my $test = __FILE__;
#
# my ($volume,$directory,$file) = File::Spec->splitpath( $test );
#
# my $test_path = catfile($directory, "../../../../../", $str. ".json");
th;
# return "/Users/raja-7453/Documents/AutomateSDK/PerlSDK/zohocrm-perl-sdk/src/". $str. ".json";
}
=head1 NAME
com::zoho::crm::api::util::Converter - This abstract class is to construct API
.
Param member_name : A String containing the member name.
Param key_details : A JSONObject containing the key JSON details.
Param value : A Object containing the key value.
Param unique_values_ma
use src::com::zoho::api::authenticator::Token;
use src::com::zoho::crm::api::util::Constants;
use JSON;
use Moose;
use Try::Catch;
use Log::Handler;
use REST::Client;
use Scalar::Util::Numeric qw(isin
%request_body);
my $decoded_json = JSON->new->utf8->decode($res->decoded_content());
$store->save_token($user, $self->parse_response($decoded_json));
return $self;
}
%request_body);
my $decoded_json = JSON->new->utf8->decode($res->decoded_content());
$store->save_token($user, $self->parse_response($decoded_json));
return $self;
}
ST_CATEGORY_READ);
return $handler_instance->api_call("blueprint.ResponseHandler", "application/json");
}
sub update_blueprint
{
my ($self,$request) = @_;
if(!(($request)->isa("blueprint::BodyWr
plication/json");
$handler_instance->set_request($request);
$handler_instance->set_mandatory_checker(1);
return $handler_instance->api_call("blueprint.ActionResponse", "application/json");
}
1;
ings;
package Initializer;
use Moose;
use File::Spec::Functions qw(catfile);
use Try::Catch;
use JSON;
use Log::Handler;
use Cwd qw(realpath);
use Cwd qw(getcwd);
use src::com::zoho::crm::api::UserSi
tore;
our $json_details;
our $logger;
our $resource_path;
has 'user' => (is => "rw");
has 'environment' => (is => "rw");
has 'token' => (is => "rw");
has 'store' => (is => "rw");
has 'json_details' =
try
{
use JSON::Parse 'json_file_to_perl';
my $json_file_path = realpath($Constants::JSON_DETAILS_FILE_PATH);
$json_details = json_file_to_perl($json_file_path);
}
aram_instance);
return $handler_instance->api_call("sharerecords.ResponseHandler", "application/json");
}
sub share_record
{
my ($self,$request) = @_;
if(!(($request)->isa("sharerecords::BodyWra
lication/json");
$handler_instance->set_request($request);
$handler_instance->set_mandatory_checker(1);
return $handler_instance->api_call("sharerecords.ActionHandler", "application/json");
}
lication/json");
$handler_instance->set_request($request);
$handler_instance->set_mandatory_checker(1);
return $handler_instance->api_call("sharerecords.ActionHandler", "application/json");
}
ST_METHOD_DELETE);
return $handler_instance->api_call("attachments.ActionHandler", "application/json");
}
sub get_attachments
{
my ($self) = shift;
my $handler_instance = CommonAPIHandler->new()
_CATEGORY_READ);
return $handler_instance->api_call("attachments.ResponseHandler", "application/json");
}
sub upload_attachment
{
my ($self,$request) = @_;
if(!(($request)->isa("attachments::Fil
datory_checker(1);
return $handler_instance->api_call("attachments.ActionHandler", "application/json");
}
sub upload_link_attachment
{
my ($self,$param_instance) = @_;
if((defined($param_instanc
T_CATEGORY_READ);
return $handler_instance->api_call("currencies.ResponseHandler", "application/json");
}
sub add_currencies
{
my ($self,$request) = @_;
if(!(($request)->isa("currencies::BodyWra
plication/json");
$handler_instance->set_request($request);
$handler_instance->set_mandatory_checker(1);
return $handler_instance->api_call("currencies.ActionHandler", "application/json");
}
s
plication/json");
$handler_instance->set_request($request);
$handler_instance->set_mandatory_checker(1);
return $handler_instance->api_call("currencies.ActionHandler", "application/json");
}
s
der($header_instance);
return $handler_instance->api_call("notes.ResponseHandler", "application/json");
}
sub create_notes
{
my ($self,$request) = @_;
if(!(($request)->isa("notes::BodyWrapper"))
application/json");
$handler_instance->set_request($request);
$handler_instance->set_mandatory_checker(1);
return $handler_instance->api_call("notes.ActionHandler", "application/json");
}
sub
application/json");
$handler_instance->set_request($request);
$handler_instance->set_mandatory_checker(1);
return $handler_instance->api_call("notes.ActionHandler", "application/json");
}
sub