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.

author

OpenAPI Generator team

link
https://openapi-generator.tech
implements

\ArrayAccess<string, mixed>

Interfaces, Classes, Traits and Enums

ModelInterface
Interface abstracting model access.
ArrayAccess
JsonSerializable

Table of Contents

DISCRIMINATOR  = null
TIMEZONE_AMERICA_ANCHORAGE  = 'AMERICA_ANCHORAGE'
TIMEZONE_AMERICA_CARACAS  = 'AMERICA_CARACAS'
TIMEZONE_AMERICA_CHICAGO  = 'AMERICA_CHICAGO'
TIMEZONE_AMERICA_LOS_ANGELES  = 'AMERICA_LOS_ANGELES'
TIMEZONE_AMERICA_NEW_YORK  = 'AMERICA_NEW_YORK'
TIMEZONE_AMERICA_PHOENIX  = 'AMERICA_PHOENIX'
TIMEZONE_AMERICA_SANTIAGO  = 'AMERICA_SANTIAGO'
TIMEZONE_AMERICA_SAO_PAULO  = 'AMERICA_SAO_PAULO'
TIMEZONE_AMERICA_ST_JOHNS  = 'AMERICA_ST_JOHNS'
TIMEZONE_ASIA_ALMATY  = 'ASIA_ALMATY'
TIMEZONE_ASIA_BANGKOK  = 'ASIA_BANGKOK'
TIMEZONE_ASIA_COLOMBO  = 'ASIA_COLOMBO'
TIMEZONE_ASIA_KABUL  = 'ASIA_KABUL'
TIMEZONE_ASIA_KATHMANDU  = 'ASIA_KATHMANDU'
TIMEZONE_ASIA_RANGOON  = 'ASIA_RANGOON'
TIMEZONE_ASIA_TAIPEI  = 'ASIA_TAIPEI'
TIMEZONE_ASIA_TASHKENT  = 'ASIA_TASHKENT'
TIMEZONE_ASIA_TBILISI  = 'ASIA_TBILISI'
TIMEZONE_ASIA_TEHRAN  = 'ASIA_TEHRAN'
TIMEZONE_ASIA_TOKYO  = 'ASIA_TOKYO'
TIMEZONE_ASIA_VLADIVOSTOK  = 'ASIA_VLADIVOSTOK'
TIMEZONE_ATLANTIC_CAPE_VERDE  = 'ATLANTIC_CAPE_VERDE'
TIMEZONE_AUSTRALIA_DARWIN  = 'AUSTRALIA_DARWIN'
TIMEZONE_AUSTRALIA_SYDNEY  = 'AUSTRALIA_SYDNEY'
TIMEZONE_ETC_GMT_MINUS_11  = 'ETC_GMT_MINUS_11'
TIMEZONE_ETC_GMT_MINUS_12  = 'ETC_GMT_MINUS_12'
TIMEZONE_ETC_GMT_MINUS_2  = 'ETC_GMT_MINUS_2'
TIMEZONE_ETC_GMT_PLUS_12  = 'ETC_GMT_PLUS_12'
TIMEZONE_EUROPE_ISTANBUL  = 'EUROPE_ISTANBUL'
TIMEZONE_EUROPE_LONDON  = 'EUROPE_LONDON'
TIMEZONE_EUROPE_MOSCOW  = 'EUROPE_MOSCOW'
TIMEZONE_EUROPE_PARIS  = 'EUROPE_PARIS'
TIMEZONE_PACIFIC_HONOLULU  = 'PACIFIC_HONOLULU'
TIMEZONE_PACIFIC_TONGATAPU  = 'PACIFIC_TONGATAPU'
VISIBILITY__PUBLIC  = 'PUBLIC'
VISIBILITY_UNLISTED  = 'UNLISTED'
$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, mixed>
Array of nullable properties. Used for (de)serialization
$openAPINullablesSetToNull  : array<string|int, mixed>
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)
__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
getAcquisitionCondition()  : AcquisitionConditionRequest
Gets acquisitionCondition
getBarcodeImageUrl()  : string|null
Gets barcodeImageUrl
getCouponCode()  : string|null
Gets couponCode
getDescription()  : string|null
Gets description
getEndTimestamp()  : int
Gets endTimestamp
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
setAcquisitionCondition()  : self
Sets acquisitionCondition
setBarcodeImageUrl()  : self
Sets barcodeImageUrl
setCouponCode()  : self
Sets couponCode
setDescription()  : self
Sets description
setEndTimestamp()  : self
Sets endTimestamp
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', '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', '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', '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, mixed> $openAPINullables = ['acquisitionCondition' => false, 'barcodeImageUrl' => false, 'couponCode' => false, 'description' => false, 'endTimestamp' => 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, mixed> $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', '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', '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

Return values
mixed

__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>

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
Return values
int

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

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

Return values
void

offsetUnset()

Unsets offset.

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

Offset

Return values
void

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>

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 $endTimestamp) : self
Parameters
$endTimestamp : int

Coupon expiration time (epoch seconds). Coupon cannot be used after this time.

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
Return values
void

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>
Return values
void

Search results