Test-ZZZ/src/com/zoho/crm/api/modules/ModulesOperations.pm
require 'src/com/zoho/crm/api/Header.pm';
require 'src/com/zoho/crm/api/HeaderMap.pm';
require 'src/com/zoho/crm/api/util/APIResponse.pm';
require 'src/com/zoho/crm/api/util/CommonAPIHandler.pm';
require 'src/com/zoho/crm/api/util/Constants.pm';
require 'src/com/zoho/api/exception/SDKException.pm';
package modules::ModulesOperations;
use Moose;
sub new
{
my ($class) = shift;
my $self =
{
};
bless $self,$class;
return $self;
}
sub get_modules
{
my ($self,$header_instance) = @_;
if((defined($header_instance))&&(!(($header_instance)->isa("HeaderMap"))))
{
die SDKException->new($Constants::DATA_TYPE_ERROR, "KEY: header_instance EXPECTED TYPE: HeaderMap", undef, undef);
}
my $handler_instance = CommonAPIHandler->new();
my $api_path = "";
$api_path = $api_path . "/crm/v2/settings/modules";
$handler_instance->set_api_path($api_path);
$handler_instance->set_http_method($Constants::REQUEST_METHOD_GET);
$handler_instance->set_category_method($Constants::REQUEST_CATEGORY_READ);
$handler_instance->set_header($header_instance);
return $handler_instance->api_call("modules.ResponseHandler", "application/json");
}
sub get_module
{
my ($self,$api_name) = @_;
my $handler_instance = CommonAPIHandler->new();
my $api_path = "";
$api_path = $api_path . "/crm/v2/settings/modules/";
$api_path = $api_path . "".$api_name;
$handler_instance->set_api_path($api_path);
$handler_instance->set_http_method($Constants::REQUEST_METHOD_GET);
$handler_instance->set_category_method($Constants::REQUEST_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("modules::BodyWrapper")))
{
die SDKException->new($Constants::DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: modules::BodyWrapper", undef, undef);
}
my $handler_instance = CommonAPIHandler->new();
my $api_path = "";
$api_path = $api_path . "/crm/v2/settings/modules/";
$api_path = $api_path . "".$api_name;
$handler_instance->set_api_path($api_path);
$handler_instance->set_http_method($Constants::REQUEST_METHOD_PUT);
$handler_instance->set_category_method($Constants::REQUEST_CATEGORY_UPDATE);
$handler_instance->set_content_type("application/json");
$handler_instance->set_request($request);
return $handler_instance->api_call("modules.ActionHandler", "application/json");
}
sub update_module_by_id
{
my ($self,$request,$id) = @_;
if(!(($request)->isa("modules::BodyWrapper")))
{
die SDKException->new($Constants::DATA_TYPE_ERROR, "KEY: request EXPECTED TYPE: modules::BodyWrapper", undef, undef);
}
my $handler_instance = CommonAPIHandler->new();
my $api_path = "";
$api_path = $api_path . "/crm/v2/settings/modules/";
$api_path = $api_path . "".$id;
$handler_instance->set_api_path($api_path);
$handler_instance->set_http_method($Constants::REQUEST_METHOD_PUT);
$handler_instance->set_category_method($Constants::REQUEST_CATEGORY_UPDATE);
$handler_instance->set_content_type("application/json");
$handler_instance->set_request($request);
return $handler_instance->api_call("modules.ActionHandler", "application/json");
}
package modules::GetModulesHeader;
sub If_modified_since
{
return Header->new("If-Modified-Since", "com.zoho.crm.api.Modules.GetModulesHeader");
}
1;