Biblio-ILL-ISO

 view release on metacpan or  search on metacpan

lib/Biblio/ILL/ISO/Request.pm  view on Meta::CPAN

=head2 set_cost_info_type($cit)

 Sets the message's cost-info-type.
 Expects a valid Biblio::ILL::ISO::CostInfoType.

    my $cit = new Biblio::ILL::ISO::CostInfoType("","","","PLS001","\$40.00");
    $msg->set_cost_info_type($cit);

 This is an optional field.

=cut
sub set_cost_info_type {
    my $self = shift;
    my ($parm) = shift;

    croak "missing cost-info-type" unless $parm;
    croak "invalid cost-info-type" unless (ref($parm) eq "Biblio::ILL::ISO::CostInfoType");

    $self->{"cost-info-type"} = $parm;

    return;
}

#---------------------------------------------------------------
#
#---------------------------------------------------------------
=head1

=head2 set_copyright_compliance($s)

 Sets the message's copyright-compliance.
 Expects a simple text string.

    msg->set_copyright_compliance("Statement of copyright compliance");

 This is an optional field.

=cut
sub set_copyright_compliance {
    my $self = shift;
    my ($parm) = shift;

    croak "missing copyright-compliance" unless $parm;

    $self->{"copyright-compliance"} = new Biblio::ILL::ISO::ILLString($parm);

    return;
}

#---------------------------------------------------------------
#
#---------------------------------------------------------------
=head1

=head2 set_third_party_info_type($tpit)

 Sets the message's third-party-info-type.
 Expects a valid Biblio::ILL::ISO::ThirdPartyInfoType.

    # The send-to-list-type sequence
    my $stlt = new Biblio::ILL::ISO::SendToListType( new Biblio::ILL::ISO::SystemId("MBOM") )
    my $stlts = new Biblio::ILL::ISO::SendToListTypeSequence( $stlt );
    $stlts->add(new Biblio::ILL::ISO::SendToListType( new Biblio::ILL::ISO::SystemId("MWPL"),
                                                      new Biblio::ILL::ISO::AccountNumber("PLS001"),
				                      new Biblio::ILL::ISO::SystemAddress("SMTP","pls\@gov.mb.ca")
				                    )
  	       );

    # The already-tried-list-type
    my $atlt = new Biblio::ILL::ISO::AlreadyTriedListType( new Biblio::ILL::ISO::SystemId("BVAS") );
    my $obj = new Biblio::ILL::ISO::SystemId();
    $obj->set_institution_name("Winnipeg Public Library");
    $atlt->add($obj);
    $obj = new Biblio::ILL::ISO::SystemId();
    $obj->set_person_name("Frank Emil Urwald");
    $atlt->add($obj);
    $atlt->add( new Biblio::ILL::ISO::SystemId("MBOM"));

    # And finally, the third-party-info-type
    my $sa = new Biblio::ILL::ISO::SystemAddress("SMTP","David_A_Christensen\@hotmail.com");
    my $tpit = new Biblio::ILL::ISO::ThirdPartyInfoType(1,1,1,1,
                                                        "ordered",
						        $sa,
						        $stlts,
						        $atlt
						       );
    msg->set_third_party_info_type($tpit);

 This is an optional field.

=cut
sub set_third_party_info_type {
    my $self = shift;
    my ($parm) = shift;

    croak "missing third-party-info-type" unless $parm;
    croak "invalid third-party-info-type" unless (ref($parm) eq "Biblio::ILL::ISO::ThirdPartyInfoType");

    $self->{"third-party-info-type"} = $parm;

    return;
}

#---------------------------------------------------------------
#
#---------------------------------------------------------------
=head1

=head2 set_retry_flag($flag)

 Sets the message's retry-flag.
 Acceptable parameter values are the strings:
     true
     false

 This is a mandatory field.

=cut
sub set_retry_flag {
    my $self = shift;
    my ($parm) = shift;

    $parm = "false" unless $parm;
    $self->{"retry-flag"} = new Biblio::ILL::ISO::Flag($parm);

    return;
}

#---------------------------------------------------------------
#
#---------------------------------------------------------------
=head1

=head2 set_forward_flag($flag)

 Sets the message's forward-flag.
 Acceptable parameter values are the strings:



( run in 0.984 second using v1.01-cache-2.11-cpan-9581c071862 )