my $json_details = Initializer::get_json_details();
my %json_details = %{$json_details};
my $package_path = $self->find_class_path($pack, $json_details);
my $class_detail = $json_deta
my $instance;
my $class_to_load = $self->construct_class_to_load($package_path, $json_details);
require $class_to_load;
my @names = split('\.', $pack);
$ins
}
}
sub find_class_path
{
my ($self, $pack, $json_details) = @_;
if(index($pack, "com") == -1)
{
foreach my $key (keys %{$json_details})
{
if(index($key, $pa
#use strict;
package JSONConverter;
use warnings;
use JSON;
use Scalar::Util::Numeric qw(isint isfloat);
use src::com::zoho::crm::api::util::Converter;
use src::com::zoho::crm::api::Initializer;
use
quest
{
my ($self, $request_instance, $class_detail, $instance_number) = @_;
my $request_json = {};
my %class_detail = %{$class_detail};
foreach my $member_name (keys %class_detail)
$request_json->{lc($key_name)} = $field_value;
}
elsif(lc($key_name) eq lc($Constants::FILE_ID))
{
$request_json->{lc($key_nam
($header_instance);
return $handler_instance->api_call("bulkwrite.ActionResponse", "application/json");
}
sub create_bulk_write_job
{
my ($self,$request) = @_;
if(!(($request)->isa("bulkwrite::R
plication/json");
$handler_instance->set_request($request);
$handler_instance->set_mandatory_checker(1);
return $handler_instance->api_call("bulkwrite.ActionResponse", "application/json");
}
s
ST_CATEGORY_READ);
return $handler_instance->api_call("bulkwrite.ResponseWrapper", "application/json");
}
sub download_bulk_write_result
{
my ($self,$download_url) = @_;
my $handler_instance = C
self->{module});
return $handler_instance->api_call("customviews.ResponseHandler", "application/json");
}
sub get_custom_view
{
my ($self,$id) = @_;
my $handler_instance = CommonAPIHandler->new(
ory_method($Constants::REQUEST_CATEGORY_READ);
$handler_instance->add_param("module", $self->{module});
return $handler_instance->api_call("customviews.ResponseHandler", "application/json");
}
1;
:REQUEST_CATEGORY_READ);
return $handler_instance->api_call("org.ResponseHandler", "application/json");
}
sub upload_organization_photo
{
my ($self,$request) = @_;
if(!(($request)->isa("org::Fil
"multipart/form-data");
$handler_instance->set_request($request);
$handler_instance->set_mandatory_checker(1);
return $handler_instance->api_call("org.ActionResponse", "application/json");
}
1;
def,
message => undef,
mandatory => undef,
criteria => undef,
related_details => undef,
json_type => undef,
crypt => undef,
field_label => undef,
tooltip => undef,
created_source =>
}
sub get_json_type
{
my ($self) = shift;
return $self->{json_type};
}
sub set_json_type
{
my ($self,$json_type) = @_;
$self->{json_type} = $json_type;
$self->{key_modified}{"json_type"} = 1
EST_CATEGORY_READ);
return $handler_instance->api_call("profiles.ResponseHandler", "application/json");
}
sub get_profile
{
my ($self,$id) = @_;
my $handler_instance = CommonAPIHandler->new();
Constants::REQUEST_METHOD_GET);
$handler_instance->set_category_method($Constants::REQUEST_CATEGORY_READ);
return $handler_instance->api_call("profiles.ResponseHandler", "application/json");
}
1;
e", $self->{module});
return $handler_instance->api_call("fields.ResponseHandler", "application/json");
}
sub get_field
{
my ($self,$id) = @_;
my $handler_instance = CommonAPIHandler->new();
m
e", $self->{module});
return $handler_instance->api_call("fields.ResponseHandler", "application/json");
}
package fields::GetFieldsParam;
sub type
{
return Param->new("type", "com.zoho.crm.api.Fi
der($header_instance);
return $handler_instance->api_call("users.ResponseHandler", "application/json");
}
sub create_user
{
my ($self,$request) = @_;
if(!(($request)->isa("users::BodyWrapper")))
application/json");
$handler_instance->set_request($request);
$handler_instance->set_mandatory_checker(1);
return $handler_instance->api_call("users.ActionHandler", "application/json");
}
sub
application/json");
$handler_instance->set_request($request);
$handler_instance->set_mandatory_checker(1);
return $handler_instance->api_call("users.ActionHandler", "application/json");
}
sub
", $self->{module});
return $handler_instance->api_call("layouts.ResponseHandler", "application/json");
}
sub get_layout
{
my ($self,$id) = @_;
my $handler_instance = CommonAPIHandler->new();
ategory_method($Constants::REQUEST_CATEGORY_READ);
$handler_instance->add_param("module", $self->{module});
return $handler_instance->api_call("layouts.ResponseHandler", "application/json");
}
1;
EQUEST_CATEGORY_READ);
return $handler_instance->api_call("taxes.ResponseHandler", "application/json");
}
sub create_taxes
{
my ($self,$request) = @_;
if(!(($request)->isa("taxes::BodyWrapper"))
application/json");
$handler_instance->set_request($request);
$handler_instance->set_mandatory_checker(1);
return $handler_instance->api_call("taxes.ActionHandler", "application/json");
}
sub
application/json");
$handler_instance->set_request($request);
$handler_instance->set_mandatory_checker(1);
return $handler_instance->api_call("taxes.ActionHandler", "application/json");
}
sub
CATEGORY_READ);
return $handler_instance->api_call("contactroles.ResponseHandler", "application/json");
}
sub create_contact_roles
{
my ($self,$request) = @_;
if(!(($request)->isa("contactroles:
lication/json");
$handler_instance->set_request($request);
$handler_instance->set_mandatory_checker(1);
return $handler_instance->api_call("contactroles.ActionHandler", "application/json");
}
lication/json");
$handler_instance->set_request($request);
$handler_instance->set_mandatory_checker(1);
return $handler_instance->api_call("contactroles.ActionHandler", "application/json");
}
me($module_api_name);
return $handler_instance->api_call("record.ResponseHandler", "application/json");
}
sub update_record
{
my ($self,$request,$module_api_name,$id) = @_;
if(!(($request)->isa(
y_method($Constants::REQUEST_CATEGORY_UPDATE);
$handler_instance->set_content_type("application/json");
$handler_instance->set_request($request);
Utility::get_fields($module_api_name);
$handle
name($module_api_name);
return $handler_instance->api_call("record.ActionHandler", "application/json");
}
sub delete_record
{
my ($self,$param_instance,$module_api_name,$id) = @_;
if((defined($p
use warnings;
use JSON;
package Utility;
use src::com::zoho::crm::api::fields::FieldsOperations;
use src::com::zoho::crm::api::relatedlists::RelatedListsOperations;
use src::com::zoho::crm::api::modu
Data::Dumper;
use Time::HiRes qw(gettimeofday);
use File::Spec::Functions qw(catfile);
use JSON::Parse "json_file_to_perl";
use Moose;
our %apitype_vs_datatype = ();
our %apitype_vs_structurename =
s::FIELD_DETAILS_DIRECTORY);
unless(-e $resources_path)
{
unless(Utility::search_json_details($module_api_name) eq "")
{
return;
}
mkdir $resource
use strict;
use warnings;
use JSON;
use src::com::zoho::crm::api::util::Constants;
use LWP::UserAgent;
use HTTP::Request;
use HTTP::Headers;
package APIHTTPConnector;
use Moose;
our $logger = Log::
$self->{url} . $key . "=" . $value . "&";
}
}
}
sub to_string
{
my($self) = shift;
my $JSON = JSON->new->utf8;
my $request_headers = $self->{headers};
my %request_headers = %{$request_head
::URL . " = " . $self->{url} . ' , ' . $Constants::HEADERS . $JSON->encode(\%request_headers) . ' , ' . $Constants::PARAMS . " = " . $JSON->encode(\%{$self->{parameters}}) . ".");
}
=head1 NAME
co
er_instance);
return $handler_instance->api_call("relatedrecords.ResponseHandler", "application/json");
}
sub update_related_records
{
my ($self,$request) = @_;
if(!(($request)->isa("relatedreco
y_method($Constants::REQUEST_CATEGORY_UPDATE);
$handler_instance->set_content_type("application/json");
$handler_instance->set_request($request);
$handler_instance->set_mandatory_checker(1);
U
dler_instance);
return $handler_instance->api_call("relatedrecords.ActionHandler", "application/json");
}
sub delink_records
{
my ($self,$param_instance) = @_;
if((defined($param_instance))&&(!(
EQUEST_CATEGORY_READ);
return $handler_instance->api_call("roles.ResponseHandler", "application/json");
}
sub get_role
{
my ($self,$id) = @_;
my $handler_instance = CommonAPIHandler->new();
my
d($Constants::REQUEST_METHOD_GET);
$handler_instance->set_category_method($Constants::REQUEST_CATEGORY_READ);
return $handler_instance->api_call("roles.ResponseHandler", "application/json");
}
1;
_CATEGORY_READ);
return $handler_instance->api_call("territories.ResponseHandler", "application/json");
}
sub get_territory
{
my ($self,$id) = @_;
my $handler_instance = CommonAPIHandler->new();
stants::REQUEST_METHOD_GET);
$handler_instance->set_category_method($Constants::REQUEST_CATEGORY_READ);
return $handler_instance->api_call("territories.ResponseHandler", "application/json");
}
1;
param($param_instance);
return $handler_instance->api_call("tags.ResponseHandler", "application/json");
}
sub create_tags
{
my ($self,$request,$param_instance) = @_;
if(!(($request)->isa("tags::
y_method($Constants::REQUEST_CATEGORY_CREATE);
$handler_instance->set_content_type("application/json");
$handler_instance->set_request($request);
$handler_instance->set_param($param_instance);
set_mandatory_checker(1);
return $handler_instance->api_call("tags.ActionHandler", "application/json");
}
sub update_tags
{
my ($self,$request,$param_instance) = @_;
if(!(($request)->isa("tags::
r($header_instance);
return $handler_instance->api_call("modules.ResponseHandler", "application/json");
}
sub get_module
{
my ($self,$api_name) = @_;
my $handler_instance = CommonAPIHandler->new
UEST_CATEGORY_READ);
return $handler_instance->api_call("modules.ResponseHandler", "application/json");
}
sub update_module_by_api_name
{
my ($self,$request,$api_name) = @_;
if(!(($request)->isa
nce->set_content_type("application/json");
$handler_instance->set_request($request);
return $handler_instance->api_call("modules.ActionHandler", "application/json");
}
sub update_module_by_id
{