_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;
s;
use feature 'state';
use Digest::MD5 qw(md5_hex);
use HTML::Entities qw(decode_entities);
use JSON::MaybeXS;
use Mojo::UserAgent;
use Moo;
use Net::Netrc;
use Types::Standard qw(Enum InstanceOf In
t => $self->token,
v => $self->api_version,
c => $self->client_id,
f => 'json',
defined $params ? %{ $params } : (),
);
foreach my $k ( keys %q ) {
$ur
->body;
if( $result->headers->content_type =~ m{application/json} ) {
eval {
my $d = decode_json($body);
$data = $d->{'subsonic-response'};
($param_instance);
return $handler_instance->api_call("variables.ResponseHandler", "application/json");
}
sub create_variables
{
my ($self,$request) = @_;
if(!(($request)->isa("variables::BodyWr
plication/json");
$handler_instance->set_request($request);
$handler_instance->set_mandatory_checker(1);
return $handler_instance->api_call("variables.ActionHandler", "application/json");
}
su
plication/json");
$handler_instance->set_request($request);
$handler_instance->set_mandatory_checker(1);
return $handler_instance->api_call("variables.ActionHandler", "application/json");
}
su
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
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
{
rom TravisCI
=cut
require RT::Config;
use RT::Date;
use LWP::UserAgent ();
use URI::Escape;
use JSON;
$RT::Config::META{TravisCI} = {
Type => 'HASH',
};
RT->AddStyleSheets('travisci.css');
RT-
eval {
$result = decode_json($response->decoded_content);
};
if ($@) {
return { success => 0, error => 'Could not parse result as JSON' };
}
if ( !$result->{last_
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
#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
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
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
{
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"
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
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
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
ated by DZP::OurPkgVersion
}
use Simple::Accessor qw{
url
json
auto_detect_utf8
_http
_started_at
};
use HTTP::Tiny;
use JSON::XS ();
use Encode ();
use constant SLACK_COLOR_START =>
efault_headers => {
'Content-Type' => 'application/json; charset=UTF-8',
}
);
}
sub _build_json {
return JSON::XS->new->utf8(0)->pretty(1);
}
# by default on
sub _build_a
}
}
return $self->_http->post_form(
$self->url,
{ payload => $self->json->encode($data) },
);
}
1;
__END__
=pod
=encoding utf-8
=head1 NAME
Slack::WebHook - Sl
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
($param_instance);
return $handler_instance->api_call("variables.ResponseHandler", "application/json");
}
sub create_variables
{
my ($self,$request) = @_;
if(!(($request)->isa("variables::BodyWr
plication/json");
$handler_instance->set_request($request);
$handler_instance->set_mandatory_checker(1);
return $handler_instance->api_call("variables.ActionHandler", "application/json");
}
su
plication/json");
$handler_instance->set_request($request);
$handler_instance->set_mandatory_checker(1);
return $handler_instance->api_call("variables.ActionHandler", "application/json");
}
su
_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;
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;