A Listing represents the the actual publishing procedure in the Connect platform.

Static methods

staticget(id:String):Listing

Returns:

The Listing with the given id, or null if it was not found.

staticlist(filters:Query):Collection<Listing>

Lists all listings that match the given filters. Supported filters are:

  • status
  • contract
  • product
  • created_date
  • marketplace
  • sourcing__agreement
  • sourcing__published

Returns:

A Collection of Listings.

Constructor

new()

Variables

contract:Contract

Distribution contract.

created:DateTime

Listing creation date.

pendingRequest:ListingRequest

ListingRequest reference.

product:Product

Product reference.

provider:Account

Provider account reference.

sourcing:ListingSourcing

Indicates whether the product is available in wholesale catalog. Object appears when product can be published.

status:String

Status of the listing. One of: listed, unlisted.

vendor:Account

Vendor account reference.

Methods

put():Listing

Puts the listing in the Connect platform with the data changed in this model.

You should reassign your listing with the object returned by this method, so the next time you call put on the object, the SDK knows the fields that already got updated in a previous call, like this:

listing = listing.put();

Returns:

The Listing returned from the server, which should contain the same data as this Listing.

Inherited Variables

Defined by IdModel

id:String

Id of the model.

Inherited Methods

Defined by Model

toObject():Dynamic

Returns:

A Haxe dynamic object with a shallow copy of this model's properties.

toString():String

Returns:

A String with the JSON representation of this Model.