SunnyCashCoupon
in package
Class SunnyCashCoupon
Table of Contents
- $couponCodeReader : SunnyCashCouponCodeReaderInterface
- $description : string
- $id : int
- $logoStorageWriter : SunnyCashLogoStorageWriterInterface
- $name : string
- $partnerTitle : string
- $shopLogo : string
- $transactionId : string
- $type : string
- $url : string
- __construct() : mixed
- SunnyCashCoupon constructor.
- getCode() : SunnyCashCouponCode
- getDescription() : string
- getId() : int
- getName() : string
- getPartnerTitle() : string
- getRawShopLogo() : string
- getShopLogo() : string
- getType() : string
- getUrl() : string
- storeLogo() : mixed
- Stores the coupon logo to the filesystem.
- getRandomString() : string
- Generates a random (most probably unique) string.
- removePlaceholder() : string
- Removes the "_SOURCE_TRANSACTION_ID_" placeholder from SunnyCash URLs.
Properties
$couponCodeReader
protected
SunnyCashCouponCodeReaderInterface
$couponCodeReader
$description
protected
string
$description
$id
protected
int
$id
$logoStorageWriter
protected
SunnyCashLogoStorageWriterInterface
$logoStorageWriter
$name
protected
string
$name
$partnerTitle
protected
string
$partnerTitle
$shopLogo
protected
string
$shopLogo
$transactionId
protected
string
$transactionId
$type
protected
string
$type
$url
protected
string
$url
Methods
__construct()
SunnyCashCoupon constructor.
public
__construct(SunnyCashLogoStorageWriterInterface $logoStorageWriter, SunnyCashCouponCodeReaderInterface $couponCodeReader, IdType $id, StringType $name, StringType $description, StringType $url, StringType $partnerTitle, StringType $shopLogo, StringType $type) : mixed
Parameters
- $logoStorageWriter : SunnyCashLogoStorageWriterInterface
- $couponCodeReader : SunnyCashCouponCodeReaderInterface
- $id : IdType
- $name : StringType
- $description : StringType
- $url : StringType
- $partnerTitle : StringType
- $shopLogo : StringType
- $type : StringType
Return values
mixed —getCode()
public
getCode() : SunnyCashCouponCode
Return values
SunnyCashCouponCode —getDescription()
public
getDescription() : string
Return values
string —getId()
public
getId() : int
Return values
int —getName()
public
getName() : string
Return values
string —getPartnerTitle()
public
getPartnerTitle() : string
Return values
string —getRawShopLogo()
public
getRawShopLogo() : string
Return values
string —getShopLogo()
public
getShopLogo() : string
Return values
string —getType()
public
getType() : string
Return values
string —getUrl()
public
getUrl() : string
Return values
string —storeLogo()
Stores the coupon logo to the filesystem.
public
storeLogo() : mixed
Return values
mixed —getRandomString()
Generates a random (most probably unique) string.
protected
getRandomString() : string
Return values
string —removePlaceholder()
Removes the "_SOURCE_TRANSACTION_ID_" placeholder from SunnyCash URLs.
protected
removePlaceholder(StringType $url) : string
Parameters
- $url : StringType