Extends
Poi
class Product extends Poi
Static
create
static create(json = null): Product
Parameters:
| Name | Type | Required | Default | Description |
| json | null | object | No | null | Used to constructor from a JSON representation. See fromJSON |
Returns:
Type: Product
getName
static getName(): string
Returns:
Type: constant ("Product": string)
Constructor
constructor
constructor(json = null): Product
Parameters:
| Name | Type | Required | Default | Description |
| json | null | object | No | null | Used to constructor from a JSON representation. See fromJSON |
Properties
brand_name
| Type | Default | Description |
| string | null | null | |
currency
| Type | Default | Description |
| string | null | null | |
description1
| Type | Default | Description |
| int | 0 | |
description2
| Type | Default | Description |
| string | null | null | |
discount_value
| Type | Default | Description |
| int | null | null | |
ean
| Type | Default | Description |
| string | null | null | |
full_description
| Type | Default | Description |
| string | null | null | |
full_name
| Type | Default | Description |
| string | null | null | |
price
| Type | Default | Description |
| number | null | null | |
priority
| Type | Default | Description |
| int | null | null | |
rating
| Type | Default | Description |
| number | null | null | |
rating_count
| Type | Default | Description |
| int | null | null | |
reference
| Type | Default | Description |
| string | null | null | |
remaining_quantity
| Type | Default | Description |
| int | null | null | |
status
| Type | Default | Description |
| string | null | null | |
url
| Type | Default | Description |
| string | null | null | |
values
Overwritten Properties
type
Read-Only
Inherited Properties
categories
children
client_id
| Type | Default | Description |
| string | null | null | |
created_at
| Type | Default | Description |
| Date | null | null | |
Read-Only
custom_objects
description
| Type | Default | Description |
| string | null | null | |
id
| Type | Default | Description |
| null | int | symbol | null | The entity identifier |
logos
medias
metadata
| Type | Default | Description |
| Map | new Map() | |
name
| Type | Default | Description |
| string | null | |
new
| Type | Default | Description |
| boolean | true | |
parents
pictures
places
signature
| Type | Default | Description |
| string | null | null | |
site
| Type | Default | Description |
| Reference<Site> | new Reference('Site', null) | |
tags
updated_at
| Type | Default | Description |
| Date | null | null | |
Read-Only
version
| Type | Default | Description |
| int | null | |
Read-Only
Methods
toJSON
toJSON(): object
Returns:
Type: object (see properties bellow)
| Name | Type | Description |
| categories | Array<int | symbol> | |
| children | Array<{id: int | symbol, position: int}> | |
| client_id | string | null | |
| created_at | string | null | Datetime in ISO 8601 format |
| custom_objects | Array<int | symbol> | |
| description | null | string | |
| id | null | int | symbol | |
| logos | Array<{id: int | symbol, position: int}> | |
| medias | Array<{id: int | symbol, position: int}> | |
| metadata | object | |
| name | string | null | |
| new | boolean | |
| parents | Array<int | symbol> | |
| pictures | Array<{id: int | symbol, position: int}> | |
| places | Array<int | symbol> | |
| signature | string | null | |
| site | null | int | symbol | |
| tags | Array<int | symbol> | |
| type | string | null | |
| updated_at | string | null | Datetime in ISO 8601 format |
| version | int | null | |
| brand_name | null | string | |
| currency | null | string | |
| description1 | null | string | |
| description2 | null | string | |
| discount_value | int | null | |
| ean | null | string | |
| full_description | null | string | |
| full_name | null | string | |
| price | number | null | |
| priority | int | null | |
| rating | number | null | |
| rating_count | int | null | |
| reference | null | string | |
| remaining_quantity | int | null | |
| status | null | string | |
| url | null | string | |
| values | Array<int | symbol> | |
fromJSON
fromJSON(json: object): Product
Parameters:
| Name | Type | Required | Default | Description |
| json | object | Yes | - | |
| json.categories | Array<int | symbol> | No | [] | |
| json.children | Array<{id: int | symbol, position: int}> | No | [] | |
| json.client_id | string | null | No | null | |
| json.created_at | string | null | No | null | Datetime in ISO 8601 format |
| json.custom_objects | Array<int | symbol> | No | [] | |
| json.description | null | string | No | null | |
| json.id | null | int | symbol | No | null | |
| json.logos | Array<{id: int | symbol, position: int}> | No | [] | |
| json.medias | Array<{id: int | symbol, position: int}> | No | [] | |
| json.metadata | object | No | {} | |
| json.name | string | null | No | null | |
| json.new | boolean | No | true | |
| json.parents | Array<int | symbol> | No | [] | |
| json.pictures | Array<{id: int | symbol, position: int}> | No | [] | |
| json.places | Array<int | symbol> | No | [] | |
| json.signature | string | null | No | null | |
| json.site | null | int | symbol | No | null | |
| json.tags | Array<int | symbol> | No | [] | |
| json.type | string | null | No | 'product' | |
| json.updated_at | string | null | No | null | Datetime in ISO 8601 format |
| json.version | int | null | No | null | |
| json.opening_time | null | string | No | null | |
| json.phone | null | string | No | null | |
| json.priority | int | No | 0 | |
| json.url | null | string | No | null | |
| json.brand_name | null | string | No | null | |
| json.currency | null | string | No | null | |
| json.description1 | null | string | No | null | |
| json.description2 | null | string | No | null | |
| json.discount_value | int | null | No | null | |
| json.ean | null | string | No | null | |
| json.full_description | null | string | No | null | |
| json.full_name | null | string | No | null | |
| json.price | number | null | No | null | |
| json.priority | int | null | No | null | |
| json.rating | number | null | No | null | |
| json.rating_count | int | null | No | null | |
| json.reference | null | string | No | null | |
| json.remaining_quantity | int | null | No | null | |
| json.status | null | string | No | null | |
| json.url | null | string | No | null | |
| json.values | Array<int | symbol> | No | [] | |
Returns:
Returns this
clone
clone(): Product
Returns:
A new deep copy
Type: Product