:mod:`rattail.classes` Module ----------------------------- .. automodule:: rattail.classes Functions ========= .. autofunction:: rattail.classes.getset_factory Meta Classes ============ .. autoclass:: rattail.ClassBase :members: Data Classes ============ .. .. autoclass:: rattail.Address .. .. attribute:: street_1 .. First line of the street address. .. .. attribute:: street_2 .. Second line of the street address. .. .. attribute:: city .. City in which the address is located. .. .. attribute:: state .. State in which the address is located. .. .. attribute:: zip .. Zip code in which the address is located. .. autoclass:: rattail.Brand .. attribute:: name The brand name. .. autoclass:: rattail.Customer .. attribute:: name The customer's name. .. .. attribute:: addresses .. A list of :class:`rattail.Address` instances for the customer. .. .. attribute:: emails .. A list of :class:`rattail.EmailAddress` instances for the customer. .. .. attribute:: phones .. A list of :class:`rattail.Phone` instances for the customer. .. .. attribute:: people .. A list of :class:`rattail.Person` instances associated with the customer. .. .. autoattribute:: person .. .. autoattribute:: address .. .. autoclass:: rattail.CustomerContactType .. .. attribute:: name .. The name of the contact type, e.g. "Office". .. autoclass:: rattail.Department .. attribute:: name The name of the department. .. attribute:: tax_rate A reference to a :class:`rattail.TaxRate` for the department. .. .. autoclass:: rattail.EmailAddress .. .. attribute:: address .. The actual email address. .. autoclass:: rattail.Employee .. attribute:: id An integer field which may contain a human-friendly ID for the employee. .. attribute:: person Reference to a :class:`rattail.Person`. It is assumed that an employee "is" a person. .. attribute:: pin The employee's "PIN number"; used for quick logins. .. autoclass:: rattail.Measure .. attribute:: name The human-friendly (singular) name of the measure, e.g. "Unit" or "Pound". .. autoclass:: rattail.Permission .. attribute:: group A reference to the :class:`rattail.PermissionGroup` to which this permission belongs. .. attribute:: name The "permission" part of the permission's name, i.e. without the "group" part of the name. .. attribute:: display_name The name of the permission as displayed in user interfaces. .. autoclass:: rattail.PermissionGroup .. attribute:: name The group's canonical name. This is used in combination with :attr:`Permission.name` to interpret "fully-qualified" permission names. .. attribute:: display_name The name of the group as displayed in user interfaces. .. attribute:: permissions: The list of :class:`rattail.Permission` instances belonging to this group. .. autoclass:: rattail.Person .. attribute:: first_name The person's first name. .. attribute:: middle_name The person's middle name. .. attribute:: last_name The person's last name. .. attribute:: suffix The suffix of the person's name. .. attribute:: display_name The person's name as it should be displayed in the user interface. .. attribute:: birth_year The year in which the person was born. .. attribute:: birth_month The month in which the person was born. .. attribute:: birth_day The day (of the month) in which the person was born. .. .. attribute:: addresses .. A list of :class:`rattail.Address` instances for the person. .. .. attribute:: phones .. A list of :class:`rattail.Phone` instances for the person. .. .. attribute:: emails .. A list of :class:`rattail.EmailAddress` instances for the person. .. .. autoattribute:: address .. .. autoattribute:: phone .. .. autoattribute:: email .. .. autoclass:: rattail.PersonContactType .. .. attribute:: name .. The name of the contact type, e.g. "Mobile". .. .. autoclass:: rattail.Phone .. .. attribute:: number .. The actual phone (or fax, etc.) number. .. autoclass:: rattail.Product .. attribute:: plu A 16-character string field which may contain a PLU for the product. .. attribute:: description The description of the product. Note that by default, this field is only 25 characters long so that it may easily fit on a receipt. .. attribute:: department A reference to the :class:`rattail.Department` to which the product belongs. .. attribute:: tax_rate A reference to a :class:`rattail.TaxRate` for the product. .. attribute:: brand A reference to a :class:`rattail.Brand` for the product. .. attribute:: size A string field which may contain size information for the product. The meaning of this field is left to each organization to determine. .. attribute:: measure A reference to a :class:`rattail.Measure` for the product. .. attribute:: base_product A reference to a :class:`rattail.BaseProduct`, where ``self`` is defined as a secondary demonination to the ``base_product``. .. attribute:: base_product_quantity Multiplier to use when translating values between ``self`` and ``base_product``. .. attribute:: barcodes A list of (20-char) barcode strings for the product. .. autoattribute:: barcode .. .. attribute:: prices .. A list of :class:`rattail.Price` instances applicable to the product. .. .. autoattribute:: regular_price .. attribute:: discountable Boolean determining whether or not *any* discounts may be applied to the product when selling. .. autoclass:: rattail.Role .. attribute:: name The name of the role. .. attribute:: permissions The list of :class:`rattail.Permission` instances which are allowed for the role. .. autoclass:: rattail.Store .. attribute:: id An integer field which may contain a human-friendly ID for the store. .. attribute:: name A descriptive name for the store. .. autoclass:: rattail.TaxRate .. attribute:: name A descriptive name for the tax rate. .. attribute:: rate The actual tax rate percentage in decimal, e.g. 4.20 (%). .. autoclass:: rattail.User .. attribute:: username The username with which the user may log in. .. attribute:: password The user's password. Note that the actual format of data in this field will depend on the "authenticator" in use. .. attribute:: salt The salt to be used when hashing the user's password, if the authenticator in use requires it. .. attribute:: person Reference to a :class:`rattail.Person`. It is mostly assumed that a user "is" a person, although some jobs (e.g. ETL) might require automation under a non-human user. .. attribute:: roles A list of :class:`rattail.Role` instances to which the user belongs.