BmltClient-ApiClient

 view release on metacpan or  search on metacpan

lib/BmltClient/RootServerApi.pm  view on Meta::CPAN

    my $form_params = {};

    # 'Accept' and 'Content-Type' header
    my $_header_accept = $self->{api_client}->select_header_accept('application/json');
    if ($_header_accept) {
        $header_params->{'Accept'} = $_header_accept;
    }
    $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');

    # path params
    if ( exists $args{'service_body_id'}) {
        my $_base_variable = "{" . "serviceBodyId" . "}";
        my $_base_value = $self->{api_client}->to_path_value($args{'service_body_id'});
        $_resource_path =~ s/$_base_variable/$_base_value/g;
    }

    my $_body_data;
    # body params
    if ( exists $args{'service_body_partial_update'}) {
        $_body_data = $args{'service_body_partial_update'};
    }

    # authentication setting, if any
    my $auth_settings = [qw(bmltToken )];

    # make the API Call
    $self->{api_client}->call_api($_resource_path, $_method,
                                           $query_params, $form_params,
                                           $header_params, $_body_data, $auth_settings);
    return;
}

#
# update_format
#
# Updates a format
#
# @param int $format_id ID of format (required)
# @param FormatUpdate $format_update Pass in format object (required)
{
    my $params = {
    'format_id' => {
        data_type => 'int',
        description => 'ID of format',
        required => '1',
    },
    'format_update' => {
        data_type => 'FormatUpdate',
        description => 'Pass in format object',
        required => '1',
    },
    };
    __PACKAGE__->method_documentation->{ 'update_format' } = {
        summary => 'Updates a format',
        params => $params,
        returns => undef,
        };
}
# @return void
#
sub update_format {
    my ($self, %args) = @_;

    # verify the required parameter 'format_id' is set
    unless (exists $args{'format_id'}) {
      croak("Missing the required parameter 'format_id' when calling update_format");
    }

    # verify the required parameter 'format_update' is set
    unless (exists $args{'format_update'}) {
      croak("Missing the required parameter 'format_update' when calling update_format");
    }

    # parse inputs
    my $_resource_path = '/api/v1/formats/{formatId}';

    my $_method = 'PUT';
    my $query_params = {};
    my $header_params = {};
    my $form_params = {};

    # 'Accept' and 'Content-Type' header
    my $_header_accept = $self->{api_client}->select_header_accept('application/json');
    if ($_header_accept) {
        $header_params->{'Accept'} = $_header_accept;
    }
    $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');

    # path params
    if ( exists $args{'format_id'}) {
        my $_base_variable = "{" . "formatId" . "}";
        my $_base_value = $self->{api_client}->to_path_value($args{'format_id'});
        $_resource_path =~ s/$_base_variable/$_base_value/g;
    }

    my $_body_data;
    # body params
    if ( exists $args{'format_update'}) {
        $_body_data = $args{'format_update'};
    }

    # authentication setting, if any
    my $auth_settings = [qw(bmltToken )];

    # make the API Call
    $self->{api_client}->call_api($_resource_path, $_method,
                                           $query_params, $form_params,
                                           $header_params, $_body_data, $auth_settings);
    return;
}

#
# update_meeting
#
# Updates a meeting
#
# @param int $meeting_id ID of meeting (required)
# @param MeetingUpdate $meeting_update Pass in meeting object (required)
{
    my $params = {
    'meeting_id' => {
        data_type => 'int',
        description => 'ID of meeting',
        required => '1',
    },
    'meeting_update' => {
        data_type => 'MeetingUpdate',
        description => 'Pass in meeting object',
        required => '1',
    },
    };
    __PACKAGE__->method_documentation->{ 'update_meeting' } = {
        summary => 'Updates a meeting',
        params => $params,
        returns => undef,
        };
}
# @return void
#
sub update_meeting {
    my ($self, %args) = @_;

    # verify the required parameter 'meeting_id' is set
    unless (exists $args{'meeting_id'}) {
      croak("Missing the required parameter 'meeting_id' when calling update_meeting");
    }

    # verify the required parameter 'meeting_update' is set
    unless (exists $args{'meeting_update'}) {
      croak("Missing the required parameter 'meeting_update' when calling update_meeting");
    }

    # parse inputs
    my $_resource_path = '/api/v1/meetings/{meetingId}';

    my $_method = 'PUT';
    my $query_params = {};
    my $header_params = {};
    my $form_params = {};

    # 'Accept' and 'Content-Type' header
    my $_header_accept = $self->{api_client}->select_header_accept('application/json');
    if ($_header_accept) {
        $header_params->{'Accept'} = $_header_accept;
    }
    $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');

    # path params
    if ( exists $args{'meeting_id'}) {
        my $_base_variable = "{" . "meetingId" . "}";
        my $_base_value = $self->{api_client}->to_path_value($args{'meeting_id'});
        $_resource_path =~ s/$_base_variable/$_base_value/g;
    }

    my $_body_data;
    # body params
    if ( exists $args{'meeting_update'}) {
        $_body_data = $args{'meeting_update'};
    }

    # authentication setting, if any
    my $auth_settings = [qw(bmltToken )];

    # make the API Call
    $self->{api_client}->call_api($_resource_path, $_method,
                                           $query_params, $form_params,
                                           $header_params, $_body_data, $auth_settings);
    return;
}

#
# update_service_body
#
# Updates a Service Body
#
# @param int $service_body_id ID of service body (required)
# @param ServiceBodyUpdate $service_body_update Pass in service body object (required)
{
    my $params = {
    'service_body_id' => {
        data_type => 'int',
        description => 'ID of service body',
        required => '1',
    },
    'service_body_update' => {
        data_type => 'ServiceBodyUpdate',
        description => 'Pass in service body object',
        required => '1',
    },
    };
    __PACKAGE__->method_documentation->{ 'update_service_body' } = {
        summary => 'Updates a Service Body',
        params => $params,
        returns => undef,
        };
}
# @return void
#
sub update_service_body {
    my ($self, %args) = @_;

    # verify the required parameter 'service_body_id' is set
    unless (exists $args{'service_body_id'}) {
      croak("Missing the required parameter 'service_body_id' when calling update_service_body");
    }

    # verify the required parameter 'service_body_update' is set
    unless (exists $args{'service_body_update'}) {
      croak("Missing the required parameter 'service_body_update' when calling update_service_body");
    }

    # parse inputs
    my $_resource_path = '/api/v1/servicebodies/{serviceBodyId}';

    my $_method = 'PUT';
    my $query_params = {};
    my $header_params = {};
    my $form_params = {};

    # 'Accept' and 'Content-Type' header
    my $_header_accept = $self->{api_client}->select_header_accept('application/json');
    if ($_header_accept) {
        $header_params->{'Accept'} = $_header_accept;
    }
    $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');

    # path params
    if ( exists $args{'service_body_id'}) {
        my $_base_variable = "{" . "serviceBodyId" . "}";
        my $_base_value = $self->{api_client}->to_path_value($args{'service_body_id'});
        $_resource_path =~ s/$_base_variable/$_base_value/g;
    }

    my $_body_data;
    # body params
    if ( exists $args{'service_body_update'}) {
        $_body_data = $args{'service_body_update'};
    }

    # authentication setting, if any
    my $auth_settings = [qw(bmltToken )];

    # make the API Call
    $self->{api_client}->call_api($_resource_path, $_method,
                                           $query_params, $form_params,
                                           $header_params, $_body_data, $auth_settings);
    return;
}

#
# update_user
#
# Update single user
#
# @param int $user_id ID of user (required)
# @param UserUpdate $user_update Pass in user object (required)
{
    my $params = {
    'user_id' => {
        data_type => 'int',
        description => 'ID of user',
        required => '1',
    },
    'user_update' => {
        data_type => 'UserUpdate',
        description => 'Pass in user object',
        required => '1',
    },
    };
    __PACKAGE__->method_documentation->{ 'update_user' } = {
        summary => 'Update single user',
        params => $params,
        returns => undef,
        };
}
# @return void
#
sub update_user {
    my ($self, %args) = @_;

    # verify the required parameter 'user_id' is set
    unless (exists $args{'user_id'}) {
      croak("Missing the required parameter 'user_id' when calling update_user");
    }

    # verify the required parameter 'user_update' is set
    unless (exists $args{'user_update'}) {
      croak("Missing the required parameter 'user_update' when calling update_user");
    }

    # parse inputs
    my $_resource_path = '/api/v1/users/{userId}';

    my $_method = 'PUT';
    my $query_params = {};
    my $header_params = {};
    my $form_params = {};

    # 'Accept' and 'Content-Type' header
    my $_header_accept = $self->{api_client}->select_header_accept('application/json');
    if ($_header_accept) {
        $header_params->{'Accept'} = $_header_accept;
    }
    $header_params->{'Content-Type'} = $self->{api_client}->select_header_content_type('application/json');

    # path params
    if ( exists $args{'user_id'}) {
        my $_base_variable = "{" . "userId" . "}";
        my $_base_value = $self->{api_client}->to_path_value($args{'user_id'});
        $_resource_path =~ s/$_base_variable/$_base_value/g;
    }

    my $_body_data;
    # body params
    if ( exists $args{'user_update'}) {
        $_body_data = $args{'user_update'};
    }

    # authentication setting, if any
    my $auth_settings = [qw(bmltToken )];

    # make the API Call
    $self->{api_client}->call_api($_resource_path, $_method,
                                           $query_params, $form_params,
                                           $header_params, $_body_data, $auth_settings);
    return;
}

1;



( run in 0.435 second using v1.01-cache-2.11-cpan-483215c6ad5 )