ePages 6.10 - DE_EPAGES/Product/API/Table/ProductPrice.pm

Package DE_EPAGES::Product::API::Table::ProductPrice

interface for table ProductPrice

@EXPORT_OK
InsertProductPrice
UpdateProductPrice
DeleteProductPrice
GetAllPKeyProductPrices
GetAllInfoProductPrices
GetInfoProductPrice
ExistsProductPrice
GetPKeyProductPricesByProductID
GetInfoProductPricesByProductID
GetPKeyProductPricesByCurrencyID
GetInfoProductPricesByCurrencyID

Functions

DeleteProductPrice
ExistsProductPrice
GetAllInfoProductPrices
GetAllPKeyProductPrices
GetInfoProductPrice
GetInfoProductPricesByCurrencyID
GetInfoProductPricesByProductID
GetPKeyProductPricesByCurrencyID
GetPKeyProductPricesByProductID
InsertProductPrice
UpdateProductPrice

DeleteProductPrice

Deletes a(n) ProductPrice.

Syntax
DeleteProductPrice($ProductID, $CurrencyID);
DeleteProductPrice($hProductPrice); # if $hProductPrice includes ProductID, CurrencyID
Input
$ProductID (int)
product identifier (part of primary key)
$CurrencyID (char(3))
alpha currency code (ISO 4217) (part of primary key)

ExistsProductPrice

Returns true if the ProductPrice exists.

Syntax
$exists = ExistsProductPrice($ProductID, $CurrencyID);
Input
$ProductID (int)
product identifier
$CurrencyID (char(3))
alpha currency code (ISO 4217)
Return
$exists (boolean)
1/0 the ProductPrice exists (yes/no)

GetAllInfoProductPrices

Returns all objects of ProductPrice.

Syntax
$ahProductPrices = GetAllInfoProductPrices();
Return
$ahProductPrices (reference to array of hashes)
with following keys:
  • ProductID - product identifier (part of primary key)- int
  • CurrencyID - alpha currency code (ISO 4217) (part of primary key)- char(3)
  • ListPrice - price amount (optional)- money
  • ManufacturerPrice - #Labl[20] (optional)- money
  • EcoParticipation - Additional fee for electronic products in France (optional)- money

GetAllPKeyProductPrices

Returns all ProductPrice identifiers.

Syntax
$ahProductPriceIDs = GetAllPKeyProductPrices();
Return
$ahProductPriceIDs (reference to array of hashes)
with following keys:
  • ProductID - product identifier - int
  • CurrencyID - alpha currency code (ISO 4217) - char(3)

GetInfoProductPrice

Returns the ProductPrice by identifier.

Syntax
$hProductPrice = GetInfoProductPrice($ProductID, $CurrencyID);
Input
$ProductID (int)
product identifier (part of primary key)
$CurrencyID (char(3))
alpha currency code (ISO 4217) (part of primary key)
Return
$hProductPrice (reference to hash)
with following keys:
  • ProductID - product identifier (part of primary key)- int
  • CurrencyID - alpha currency code (ISO 4217) (part of primary key)- char(3)
  • ListPrice - price amount (optional)- money
  • ManufacturerPrice - #Labl[20] (optional)- money
  • EcoParticipation - Additional fee for electronic products in France (optional)- money

GetInfoProductPricesByCurrencyID

Returns objects of ProductPrice by alternate key CurrencyID.

Syntax
$ahProductPrices = GetInfoProductPricesByCurrencyID($CurrencyID);
Input
$CurrencyID (char(3))
alpha currency code (ISO 4217)
Return
$ahProductPrices (reference to array of hashes)
with following keys:
  • ProductID - product identifier (part of primary key)- int
  • CurrencyID - alpha currency code (ISO 4217) (part of primary key)- char(3)
  • ListPrice - price amount (optional)- money
  • ManufacturerPrice - #Labl[20] (optional)- money
  • EcoParticipation - Additional fee for electronic products in France (optional)- money

GetInfoProductPricesByProductID

Returns objects of ProductPrice by primary key element ProductID.

Syntax
$ahProductPrices = GetInfoProductPricesByProductID($ProductID);
Input
$ProductID (int)
product identifier
Return
$ahProductPrices (reference to array of hashes)
with following keys:
  • ProductID - product identifier (part of primary key)- int
  • CurrencyID - alpha currency code (ISO 4217) (part of primary key)- char(3)
  • ListPrice - price amount (optional)- money
  • ManufacturerPrice - #Labl[20] (optional)- money
  • EcoParticipation - Additional fee for electronic products in France (optional)- money

GetPKeyProductPricesByCurrencyID

Returns primary keys of ProductPrice by alternate key CurrencyID.

Syntax
$ahKeys = GetPKeyProductPricesByCurrencyID($CurrencyID);
Input
$CurrencyID (char(3))
alpha currency code (ISO 4217)
Return
$ahKeys (reference to array of hashes)
with following keys:
  • ProductID - product identifier - int
  • CurrencyID - alpha currency code (ISO 4217) - char(3)

GetPKeyProductPricesByProductID

Returns primary keys of ProductPrice by primary key element ProductID.

Syntax
$ahKeys = GetPKeyProductPricesByProductID($ProductID);
Input
$ProductID (int)
product identifier
Return
$ahKeys (reference to array of hashes)
with following keys:
  • ProductID - product identifier - int
  • CurrencyID - alpha currency code (ISO 4217) - char(3)

InsertProductPrice

Creates an entry of ProductPrice.

Syntax
InsertProductPrice($hProductPrice);
Input
$hProductPrice (reference to hash)
with following keys:
  • ProductID - product identifier (part of primary key)- int
  • CurrencyID - alpha currency code (ISO 4217) (part of primary key)- char(3)
  • ListPrice - price amount (optional)- money
  • ManufacturerPrice - #Labl[20] (optional)- money
  • EcoParticipation - Additional fee for electronic products in France (optional)- money

UpdateProductPrice

Updates a(n) ProductPrice if any element was changed.

Syntax
UpdateProductPrice($ProductID, $CurrencyID, $hProductPrice);
UpdateProductPrice($hProductPrice); # if $hProductPrice includes ProductID, CurrencyID
Input
$ProductID (int)
product identifier (part of primary key)
$CurrencyID (char(3))
alpha currency code (ISO 4217) (part of primary key)
$hProductPrice (reference to hash)
with following keys:
  • ListPrice - price amount (optional)- money
  • ManufacturerPrice - #Labl[20] (optional)- money
  • EcoParticipation - Additional fee for electronic products in France (optional)- money