LINE Messaging API SDK for PHP

CouponCreateRequest implements ModelInterface, ArrayAccess, JsonSerializable

CouponCreateRequest Class Doc Comment

Tags
category

Class

description

Request object for creating a coupon. Contains all configurable coupon properties. Specify the coupon period using one of these patterns: - endTimestamp - acquireEndTimestamp with expirationDay - expirationDay only - no period fields

author

OpenAPI Generator team

link
https://openapi-generator.tech
implements

Table of Contents

Interfaces

ModelInterface
Interface abstracting model access.
ArrayAccess
JsonSerializable

Constants

DISCRIMINATOR  : mixed = null
TIMEZONE_AMERICA_ANCHORAGE  : mixed = 'AMERICA_ANCHORAGE'
TIMEZONE_AMERICA_CARACAS  : mixed = 'AMERICA_CARACAS'
TIMEZONE_AMERICA_CHICAGO  : mixed = 'AMERICA_CHICAGO'
TIMEZONE_AMERICA_LOS_ANGELES  : mixed = 'AMERICA_LOS_ANGELES'
TIMEZONE_AMERICA_NEW_YORK  : mixed = 'AMERICA_NEW_YORK'
TIMEZONE_AMERICA_PHOENIX  : mixed = 'AMERICA_PHOENIX'
TIMEZONE_AMERICA_SANTIAGO  : mixed = 'AMERICA_SANTIAGO'
TIMEZONE_AMERICA_SAO_PAULO  : mixed = 'AMERICA_SAO_PAULO'
TIMEZONE_AMERICA_ST_JOHNS  : mixed = 'AMERICA_ST_JOHNS'
TIMEZONE_ASIA_ALMATY  : mixed = 'ASIA_ALMATY'
TIMEZONE_ASIA_BANGKOK  : mixed = 'ASIA_BANGKOK'
TIMEZONE_ASIA_COLOMBO  : mixed = 'ASIA_COLOMBO'
TIMEZONE_ASIA_KABUL  : mixed = 'ASIA_KABUL'
TIMEZONE_ASIA_KATHMANDU  : mixed = 'ASIA_KATHMANDU'
TIMEZONE_ASIA_RANGOON  : mixed = 'ASIA_RANGOON'
TIMEZONE_ASIA_TAIPEI  : mixed = 'ASIA_TAIPEI'
TIMEZONE_ASIA_TASHKENT  : mixed = 'ASIA_TASHKENT'
TIMEZONE_ASIA_TBILISI  : mixed = 'ASIA_TBILISI'
TIMEZONE_ASIA_TEHRAN  : mixed = 'ASIA_TEHRAN'
TIMEZONE_ASIA_TOKYO  : mixed = 'ASIA_TOKYO'
TIMEZONE_ASIA_VLADIVOSTOK  : mixed = 'ASIA_VLADIVOSTOK'
TIMEZONE_ATLANTIC_CAPE_VERDE  : mixed = 'ATLANTIC_CAPE_VERDE'
TIMEZONE_AUSTRALIA_DARWIN  : mixed = 'AUSTRALIA_DARWIN'
TIMEZONE_AUSTRALIA_SYDNEY  : mixed = 'AUSTRALIA_SYDNEY'
TIMEZONE_ETC_GMT_MINUS_11  : mixed = 'ETC_GMT_MINUS_11'
TIMEZONE_ETC_GMT_MINUS_12  : mixed = 'ETC_GMT_MINUS_12'
TIMEZONE_ETC_GMT_MINUS_2  : mixed = 'ETC_GMT_MINUS_2'
TIMEZONE_ETC_GMT_PLUS_12  : mixed = 'ETC_GMT_PLUS_12'
TIMEZONE_EUROPE_ISTANBUL  : mixed = 'EUROPE_ISTANBUL'
TIMEZONE_EUROPE_LONDON  : mixed = 'EUROPE_LONDON'
TIMEZONE_EUROPE_MOSCOW  : mixed = 'EUROPE_MOSCOW'
TIMEZONE_EUROPE_PARIS  : mixed = 'EUROPE_PARIS'
TIMEZONE_PACIFIC_HONOLULU  : mixed = 'PACIFIC_HONOLULU'
TIMEZONE_PACIFIC_TONGATAPU  : mixed = 'PACIFIC_TONGATAPU'
VISIBILITY__PUBLIC  : mixed = 'PUBLIC'
VISIBILITY_UNLISTED  : mixed = 'UNLISTED'

Properties

$attributeMap  : array<string|int, string>
Array of attributes where the key is the local name, and the value is the original name
$container  : array<string|int, mixed>
Associative array for storing property values
$getters  : array<string|int, string>
Array of attributes to getter functions (for serialization of requests)
$openAPIFormats  : array<string|int, string>
Array of property to format mappings. Used for (de)serialization
$openAPIModelName  : string
The original name of the model.
$openAPINullables  : array<string|int, bool>
Array of nullable properties. Used for (de)serialization
$openAPINullablesSetToNull  : array<string|int, bool>
If a nullable field gets set to null, insert it here
$openAPITypes  : array<string|int, string>
Array of property to type mappings. Used for (de)serialization
$setters  : array<string|int, string>
Array of attributes to setter functions (for deserialization of responses)

Methods

__construct()  : mixed
Constructor
__toString()  : string
Gets the string presentation of the object
attributeMap()  : array<string|int, mixed>
Array of attributes where the key is the local name, and the value is the original name
getAcquireEndTimestamp()  : int|null
Gets acquireEndTimestamp
getAcquisitionCondition()  : AcquisitionConditionRequest
Gets acquisitionCondition
getBarcodeImageUrl()  : string|null
Gets barcodeImageUrl
getCouponCode()  : string|null
Gets couponCode
getDescription()  : string|null
Gets description
getEndTimestamp()  : int|null
Gets endTimestamp
getExpirationDay()  : int|null
Gets expirationDay
getImageUrl()  : string|null
Gets imageUrl
getMaxUseCountPerTicket()  : int
Gets maxUseCountPerTicket
getModelName()  : string
The original name of the model.
getReward()  : CouponRewardRequest|null
Gets reward
getStartTimestamp()  : int
Gets startTimestamp
getters()  : array<string|int, mixed>
Array of attributes to getter functions (for serialization of requests)
getTimezone()  : string
Gets timezone
getTimezoneAllowableValues()  : array<string|int, string>
Gets allowable values of the enum
getTitle()  : string
Gets title
getUsageCondition()  : string|null
Gets usageCondition
getVisibility()  : string
Gets visibility
getVisibilityAllowableValues()  : array<string|int, string>
Gets allowable values of the enum
isNullable()  : bool
Checks if a property is nullable
isNullableSetToNull()  : bool
Checks if a nullable property is set to null.
jsonSerialize()  : mixed
Serializes the object to a value that can be serialized natively by json_encode().
listInvalidProperties()  : array<string|int, mixed>
Show all the invalid properties with reasons.
offsetExists()  : bool
Returns true if offset exists. False otherwise.
offsetGet()  : mixed|null
Gets offset.
offsetSet()  : void
Sets value based on offset.
offsetUnset()  : void
Unsets offset.
openAPIFormats()  : array<string|int, mixed>
Array of property to format mappings. Used for (de)serialization
openAPITypes()  : array<string|int, mixed>
Array of property to type mappings. Used for (de)serialization
setAcquireEndTimestamp()  : self
Sets acquireEndTimestamp
setAcquisitionCondition()  : self
Sets acquisitionCondition
setBarcodeImageUrl()  : self
Sets barcodeImageUrl
setCouponCode()  : self
Sets couponCode
setDescription()  : self
Sets description
setEndTimestamp()  : self
Sets endTimestamp
setExpirationDay()  : self
Sets expirationDay
setImageUrl()  : self
Sets imageUrl
setMaxUseCountPerTicket()  : self
Sets maxUseCountPerTicket
setReward()  : self
Sets reward
setStartTimestamp()  : self
Sets startTimestamp
setters()  : array<string|int, mixed>
Array of attributes to setter functions (for deserialization of responses)
setTimezone()  : self
Sets timezone
setTitle()  : self
Sets title
setUsageCondition()  : self
Sets usageCondition
setVisibility()  : self
Sets visibility
toHeaderValue()  : string
Gets a header-safe presentation of the object
valid()  : bool
Validate all the properties in the model return true if all passed
openAPINullables()  : array<string|int, mixed>
Array of nullable properties
getOpenAPINullablesSetToNull()  : array<string|int, bool>
Array of nullable field names deliberately set to null
setIfExists()  : void
Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the $this->openAPINullablesSetToNull array
setOpenAPINullablesSetToNull()  : void
Setter - Array of nullable field names deliberately set to null

Constants

TIMEZONE_AMERICA_ANCHORAGE

public mixed TIMEZONE_AMERICA_ANCHORAGE = 'AMERICA_ANCHORAGE'

TIMEZONE_AMERICA_LOS_ANGELES

public mixed TIMEZONE_AMERICA_LOS_ANGELES = 'AMERICA_LOS_ANGELES'

TIMEZONE_AMERICA_NEW_YORK

public mixed TIMEZONE_AMERICA_NEW_YORK = 'AMERICA_NEW_YORK'

TIMEZONE_AMERICA_SANTIAGO

public mixed TIMEZONE_AMERICA_SANTIAGO = 'AMERICA_SANTIAGO'

TIMEZONE_AMERICA_SAO_PAULO

public mixed TIMEZONE_AMERICA_SAO_PAULO = 'AMERICA_SAO_PAULO'

TIMEZONE_AMERICA_ST_JOHNS

public mixed TIMEZONE_AMERICA_ST_JOHNS = 'AMERICA_ST_JOHNS'

TIMEZONE_ASIA_VLADIVOSTOK

public mixed TIMEZONE_ASIA_VLADIVOSTOK = 'ASIA_VLADIVOSTOK'

TIMEZONE_ATLANTIC_CAPE_VERDE

public mixed TIMEZONE_ATLANTIC_CAPE_VERDE = 'ATLANTIC_CAPE_VERDE'

TIMEZONE_AUSTRALIA_DARWIN

public mixed TIMEZONE_AUSTRALIA_DARWIN = 'AUSTRALIA_DARWIN'

TIMEZONE_AUSTRALIA_SYDNEY

public mixed TIMEZONE_AUSTRALIA_SYDNEY = 'AUSTRALIA_SYDNEY'

TIMEZONE_ETC_GMT_MINUS_11

public mixed TIMEZONE_ETC_GMT_MINUS_11 = 'ETC_GMT_MINUS_11'

TIMEZONE_ETC_GMT_MINUS_12

public mixed TIMEZONE_ETC_GMT_MINUS_12 = 'ETC_GMT_MINUS_12'

TIMEZONE_PACIFIC_HONOLULU

public mixed TIMEZONE_PACIFIC_HONOLULU = 'PACIFIC_HONOLULU'

TIMEZONE_PACIFIC_TONGATAPU

public mixed TIMEZONE_PACIFIC_TONGATAPU = 'PACIFIC_TONGATAPU'

Properties

$attributeMap

Array of attributes where the key is the local name, and the value is the original name

protected static array<string|int, string> $attributeMap = ['acquisitionCondition' => 'acquisitionCondition', 'barcodeImageUrl' => 'barcodeImageUrl', 'couponCode' => 'couponCode', 'description' => 'description', 'endTimestamp' => 'endTimestamp', 'acquireEndTimestamp' => 'acquireEndTimestamp', 'expirationDay' => 'expirationDay', 'imageUrl' => 'imageUrl', 'maxUseCountPerTicket' => 'maxUseCountPerTicket', 'startTimestamp' => 'startTimestamp', 'title' => 'title', 'usageCondition' => 'usageCondition', 'reward' => 'reward', 'visibility' => 'visibility', 'timezone' => 'timezone']

$container

Associative array for storing property values

protected array<string|int, mixed> $container = []

$getters

Array of attributes to getter functions (for serialization of requests)

protected static array<string|int, string> $getters = ['acquisitionCondition' => 'getAcquisitionCondition', 'barcodeImageUrl' => 'getBarcodeImageUrl', 'couponCode' => 'getCouponCode', 'description' => 'getDescription', 'endTimestamp' => 'getEndTimestamp', 'acquireEndTimestamp' => 'getAcquireEndTimestamp', 'expirationDay' => 'getExpirationDay', 'imageUrl' => 'getImageUrl', 'maxUseCountPerTicket' => 'getMaxUseCountPerTicket', 'startTimestamp' => 'getStartTimestamp', 'title' => 'getTitle', 'usageCondition' => 'getUsageCondition', 'reward' => 'getReward', 'visibility' => 'getVisibility', 'timezone' => 'getTimezone']

$openAPIFormats

Array of property to format mappings. Used for (de)serialization

protected static array<string|int, string> $openAPIFormats = ['acquisitionCondition' => null, 'barcodeImageUrl' => null, 'couponCode' => null, 'description' => null, 'endTimestamp' => 'int64', 'acquireEndTimestamp' => 'int64', 'expirationDay' => 'int32', 'imageUrl' => null, 'maxUseCountPerTicket' => 'int32', 'startTimestamp' => 'int64', 'title' => null, 'usageCondition' => null, 'reward' => null, 'visibility' => null, 'timezone' => null]
Tags
phpstan-var

array<string, string|null>

psalm-var

array<string, string|null>

$openAPIModelName

The original name of the model.

protected static string $openAPIModelName = 'CouponCreateRequest'

$openAPINullables

Array of nullable properties. Used for (de)serialization

protected static array<string|int, bool> $openAPINullables = ['acquisitionCondition' => false, 'barcodeImageUrl' => false, 'couponCode' => false, 'description' => false, 'endTimestamp' => false, 'acquireEndTimestamp' => false, 'expirationDay' => false, 'imageUrl' => false, 'maxUseCountPerTicket' => false, 'startTimestamp' => false, 'title' => false, 'usageCondition' => false, 'reward' => false, 'visibility' => false, 'timezone' => false]

$openAPINullablesSetToNull

If a nullable field gets set to null, insert it here

protected array<string|int, bool> $openAPINullablesSetToNull = []

$openAPITypes

Array of property to type mappings. Used for (de)serialization

protected static array<string|int, string> $openAPITypes = ['acquisitionCondition' => '\LINE\Clients\MessagingApi\Model\AcquisitionConditionRequest', 'barcodeImageUrl' => 'string', 'couponCode' => 'string', 'description' => 'string', 'endTimestamp' => 'int', 'acquireEndTimestamp' => 'int', 'expirationDay' => 'int', 'imageUrl' => 'string', 'maxUseCountPerTicket' => 'int', 'startTimestamp' => 'int', 'title' => 'string', 'usageCondition' => 'string', 'reward' => '\LINE\Clients\MessagingApi\Model\CouponRewardRequest', 'visibility' => 'string', 'timezone' => 'string']

$setters

Array of attributes to setter functions (for deserialization of responses)

protected static array<string|int, string> $setters = ['acquisitionCondition' => 'setAcquisitionCondition', 'barcodeImageUrl' => 'setBarcodeImageUrl', 'couponCode' => 'setCouponCode', 'description' => 'setDescription', 'endTimestamp' => 'setEndTimestamp', 'acquireEndTimestamp' => 'setAcquireEndTimestamp', 'expirationDay' => 'setExpirationDay', 'imageUrl' => 'setImageUrl', 'maxUseCountPerTicket' => 'setMaxUseCountPerTicket', 'startTimestamp' => 'setStartTimestamp', 'title' => 'setTitle', 'usageCondition' => 'setUsageCondition', 'reward' => 'setReward', 'visibility' => 'setVisibility', 'timezone' => 'setTimezone']

Methods

__construct()

Constructor

public __construct([array<string|int, mixed>|null $data = null ]) : mixed
Parameters
$data : array<string|int, mixed>|null = null

Associated array of property values initializing the model

__toString()

Gets the string presentation of the object

public __toString() : string
Return values
string

attributeMap()

Array of attributes where the key is the local name, and the value is the original name

public static attributeMap() : array<string|int, mixed>
Return values
array<string|int, mixed>

getAcquireEndTimestamp()

Gets acquireEndTimestamp

public getAcquireEndTimestamp() : int|null
Return values
int|null

getBarcodeImageUrl()

Gets barcodeImageUrl

public getBarcodeImageUrl() : string|null
Return values
string|null

getCouponCode()

Gets couponCode

public getCouponCode() : string|null
Return values
string|null

getDescription()

Gets description

public getDescription() : string|null
Return values
string|null

getEndTimestamp()

Gets endTimestamp

public getEndTimestamp() : int|null
Return values
int|null

getExpirationDay()

Gets expirationDay

public getExpirationDay() : int|null
Return values
int|null

getImageUrl()

Gets imageUrl

public getImageUrl() : string|null
Return values
string|null

getMaxUseCountPerTicket()

Gets maxUseCountPerTicket

public getMaxUseCountPerTicket() : int
Return values
int

getModelName()

The original name of the model.

public getModelName() : string
Return values
string

getStartTimestamp()

Gets startTimestamp

public getStartTimestamp() : int
Return values
int

getters()

Array of attributes to getter functions (for serialization of requests)

public static getters() : array<string|int, mixed>
Return values
array<string|int, mixed>

getTimezoneAllowableValues()

Gets allowable values of the enum

public getTimezoneAllowableValues() : array<string|int, string>
Return values
array<string|int, string>

getUsageCondition()

Gets usageCondition

public getUsageCondition() : string|null
Return values
string|null

getVisibility()

Gets visibility

public getVisibility() : string
Return values
string

getVisibilityAllowableValues()

Gets allowable values of the enum

public getVisibilityAllowableValues() : array<string|int, string>
Return values
array<string|int, string>

isNullable()

Checks if a property is nullable

public static isNullable(string $property) : bool
Parameters
$property : string
Return values
bool

isNullableSetToNull()

Checks if a nullable property is set to null.

public isNullableSetToNull(string $property) : bool
Parameters
$property : string
Return values
bool

listInvalidProperties()

Show all the invalid properties with reasons.

public listInvalidProperties() : array<string|int, mixed>
Return values
array<string|int, mixed> —

invalid properties with reasons

offsetExists()

Returns true if offset exists. False otherwise.

public offsetExists(int $offset) : bool
Parameters
$offset : int

Offset

Return values
bool

offsetGet()

Gets offset.

public offsetGet(int $offset) : mixed|null
Parameters
$offset : int

Offset

Attributes
#[ReturnTypeWillChange]
Return values
mixed|null

offsetSet()

Sets value based on offset.

public offsetSet(int|null $offset, mixed $value) : void
Parameters
$offset : int|null

Offset

$value : mixed

Value to be set

offsetUnset()

Unsets offset.

public offsetUnset(int $offset) : void
Parameters
$offset : int

Offset

openAPIFormats()

Array of property to format mappings. Used for (de)serialization

public static openAPIFormats() : array<string|int, mixed>
Return values
array<string|int, mixed>

openAPITypes()

Array of property to type mappings. Used for (de)serialization

public static openAPITypes() : array<string|int, mixed>
Return values
array<string|int, mixed>

setAcquireEndTimestamp()

Sets acquireEndTimestamp

public setAcquireEndTimestamp(int|null $acquireEndTimestamp) : self
Parameters
$acquireEndTimestamp : int|null

End time for coupon acquisition (epoch seconds). Acquisition has no end time when this field is omitted. Specify with expirationDay, and do not specify with endTimestamp.

Return values
self

setBarcodeImageUrl()

Sets barcodeImageUrl

public setBarcodeImageUrl(string|null $barcodeImageUrl) : self
Parameters
$barcodeImageUrl : string|null

URL of the barcode image associated with the coupon. Used for in-store redemption.

Return values
self

setCouponCode()

Sets couponCode

public setCouponCode(string|null $couponCode) : self
Parameters
$couponCode : string|null

Unique code to be presented by the user to redeem the coupon. Optional.

Return values
self

setDescription()

Sets description

public setDescription(string|null $description) : self
Parameters
$description : string|null

Detailed description of the coupon. Displayed to users.

Return values
self

setEndTimestamp()

Sets endTimestamp

public setEndTimestamp(int|null $endTimestamp) : self
Parameters
$endTimestamp : int|null

End time for coupon acquisition and usage (epoch seconds). Users can acquire and use the coupon until this time. Do not specify with acquireEndTimestamp or expirationDay.

Return values
self

setExpirationDay()

Sets expirationDay

public setExpirationDay(int|null $expirationDay) : self
Parameters
$expirationDay : int|null

Number of days a ticket remains usable after acquisition. The ticket expires at the end of the day this many days after it is acquired.

Return values
self

setImageUrl()

Sets imageUrl

public setImageUrl(string|null $imageUrl) : self
Parameters
$imageUrl : string|null

URL of the main image representing the coupon. Displayed in the coupon list.

Return values
self

setMaxUseCountPerTicket()

Sets maxUseCountPerTicket

public setMaxUseCountPerTicket(int $maxUseCountPerTicket) : self
Parameters
$maxUseCountPerTicket : int

Maximum number of times a single coupon ticket can be used. Use -1 to indicate no limit.

Return values
self

setStartTimestamp()

Sets startTimestamp

public setStartTimestamp(int $startTimestamp) : self
Parameters
$startTimestamp : int

Coupon start time (epoch seconds). Coupon can be used from this time.

Return values
self

setters()

Array of attributes to setter functions (for deserialization of responses)

public static setters() : array<string|int, mixed>
Return values
array<string|int, mixed>

setTimezone()

Sets timezone

public setTimezone(string $timezone) : self
Parameters
$timezone : string

Timezone for interpreting start and end timestamps.

Return values
self

setTitle()

Sets title

public setTitle(string $title) : self
Parameters
$title : string

Title of the coupon. Displayed in the coupon list.

Return values
self

setUsageCondition()

Sets usageCondition

public setUsageCondition(string|null $usageCondition) : self
Parameters
$usageCondition : string|null

Conditions for using the coupon. Shown to users.

Return values
self

setVisibility()

Sets visibility

public setVisibility(string $visibility) : self
Parameters
$visibility : string

Visibility of the coupon. Determines who can see or acquire the coupon.

Return values
self

toHeaderValue()

Gets a header-safe presentation of the object

public toHeaderValue() : string
Return values
string

valid()

Validate all the properties in the model return true if all passed

public valid() : bool
Return values
bool —

True if all properties are valid

openAPINullables()

Array of nullable properties

protected static openAPINullables() : array<string|int, mixed>
Return values
array<string|int, mixed>

getOpenAPINullablesSetToNull()

Array of nullable field names deliberately set to null

private getOpenAPINullablesSetToNull() : array<string|int, bool>
Return values
array<string|int, bool>

setIfExists()

Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the $this->openAPINullablesSetToNull array

private setIfExists(string $variableName, array<string|int, mixed> $fields, mixed $defaultValue) : void
Parameters
$variableName : string
$fields : array<string|int, mixed>
$defaultValue : mixed

setOpenAPINullablesSetToNull()

Setter - Array of nullable field names deliberately set to null

private setOpenAPINullablesSetToNull(array<string|int, bool> $openAPINullablesSetToNull) : void
Parameters
$openAPINullablesSetToNull : array<string|int, bool>
On this page

Search results