The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

AxKit::App::TABOO::Data::User::Customer - Customer Data objects for TABOO

SYNOPSIS

  use AxKit::App::TABOO::Data::User::Customer;
  $user = AxKit::App::TABOO::Data::User::Customer->new();
  $user->load('kjetil');

DESCRIPTION

This Data class subclasses AxKit::App::TABOO::Data::User to add more contact information for customers to a webshop.

METHODS

This class implements two methods, the rest is inherited from AxKit::App::TABOO::Data::User.

new()

The constructor. Makes sure that we inherit the data members from our superclass. Apart from that, nothing special.

save()

The save() method has been reimplemented in this class. It is less generic than the method of the grandparent class, but it saves data to two different tables, and should do its job well. It takes no parameters.

STORED DATA

The data is stored in named fields, and for certain uses, it is good to know them. If you want to subclass this class, you might want to use the same names, see the documentation of AxKit::APP::TABOO::Data for more about this.

In addition to the names of the parent, this class adds the following fields:

  • address

    A string representing the street address of the customer.

  • locality

    A string representing the locality of the user. May be used to provide more information about the address if needed.

  • code

    A string that may be used for ZIP codes or similar things.

  • contactstatus

    An integer that may be used to indicate if the contact information to the customer is OK. If, for example, our e-mail to the given e-mail address bounces, we may set it to a value to signify that. Currently, TABOO does not specify what the values mean, it may at a later point, but it is suggested that 0 is used to mean OK.

  • comment

    May be used to enter a short string with customer information that doesn't fit anywhere else.

This is likely to be extended in future versions.

BUGS/TODO

The save method has a really bad implementation... I'm not really sure it saves...

You cannot use the save method in this class to save an object in the case where there is a record for the parent class, but lacks one for this class.

FORMALITIES

See AxKit::App::TABOO.