add skip_dcontext_suffix to skip CDRs with dcontext ending in a definable string...
[freeside.git] / FS / FS / clientapi_session_field.pm
1 package FS::clientapi_session_field;
2 use base qw(FS::Record);
3
4 use strict;
5
6 =head1 NAME
7
8 FS::clientapi_session_field - Object methods for clientapi_session_field records
9
10 =head1 SYNOPSIS
11
12   use FS::clientapi_session_field;
13
14   $record = new FS::clientapi_session_field \%hash;
15   $record = new FS::clientapi_session_field { 'column' => 'value' };
16
17   $error = $record->insert;
18
19   $error = $new_record->replace($old_record);
20
21   $error = $record->delete;
22
23   $error = $record->check;
24
25 =head1 DESCRIPTION
26
27 An FS::clientapi_session_field object represents a FS::ClientAPI session data
28 field.  FS::clientapi_session_field inherits from FS::Record.  The following
29 fields are currently supported:
30
31 =over 4
32
33 =item fieldnum - primary key
34
35 =item sessionnum - Base ClientAPI sesison (see L<FS::clientapi_session>)
36
37 =item fieldname
38
39 =item fieldvalie
40
41 =back
42
43 =head1 METHODS
44
45 =over 4
46
47 =item new HASHREF
48
49 Creates a new record.  To add the record to the database, see L<"insert">.
50
51 Note that this stores the hash reference, not a distinct copy of the hash it
52 points to.  You can ask the object for a copy with the I<hash> method.
53
54 =cut
55
56 # the new method can be inherited from FS::Record, if a table method is defined
57
58 sub table { 'clientapi_session_field'; }
59
60 =item insert
61
62 Adds this record to the database.  If there is an error, returns the error,
63 otherwise returns false.
64
65 =cut
66
67 # the insert method can be inherited from FS::Record
68
69 =item delete
70
71 Delete this record from the database.
72
73 =cut
74
75 # the delete method can be inherited from FS::Record
76
77 =item replace OLD_RECORD
78
79 Replaces the OLD_RECORD with this one in the database.  If there is an error,
80 returns the error, otherwise returns false.
81
82 =cut
83
84 # the replace method can be inherited from FS::Record
85
86 =item check
87
88 Checks all fields to make sure this is a valid record.  If there is
89 an error, returns the error, otherwise returns false.  Called by the insert
90 and replace methods.
91
92 =cut
93
94 # the check method should currently be supplied - FS::Record contains some
95 # data checking routines
96
97 sub check {
98   my $self = shift;
99
100   my $error = 
101     $self->ut_numbern('primary_key')
102     || $self->ut_number('validate_other_fields')
103   ;
104   return $error if $error;
105
106   $self->SUPER::check;
107 }
108
109 =back
110
111 =head1 BUGS
112
113 =head1 SEE ALSO
114
115 L<FS::clientapi_session>, L<FS::ClientAPI>, L<FS::Record>, schema.html from the
116 base documentation.
117
118 =cut
119
120 1;
121