An object containing Distribution agreements with exact Hubs, enriched with additional information on details about the relation.

A Marketplace is a way to list Products to specified regions (based on Distribution Agreements) and use specific Hubs to provision incoming Fulfillment requests.

Static methods

staticget(id:String):Marketplace

Returns:

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

staticlist(filters:Query):Collection<Marketplace>

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

  • id
  • name
  • owner.id
  • owner.name
  • sourcing
  • search
  • owner__id

Returns:

A Collection of Marketplaces.

Constructor

new()

Variables

activeContracts:Int

How many active contracts were signed on the Marketplace.

countries:Collection<Country>

Collection of country objects associated with marketplace.

currency:String

description:String

Markdown text describing the marketplace.

hubs:Collection<ExtIdHub>

Collection of account-hub relations associated with the Marketplace object.

icon:String

Image identifying Marketplace object uploaded by user.

name:String

Marketplace title, unique for an account.

owner:Account

Provider account - the object owner.

sourcing:Bool

Is marketplace available for sourcing?

zone:String

Zone where the marketplace is located, there can be following zones: AF, NA, OC, AS, EU, SA (It is continents).

Methods

register():Marketplace

Registers a new Marketplace on Connect, based on the data of this Marketplace.

Returns:

The new Marketplace, or null if it couldn't be created.

remove():Bool

Removes this Marketplace from Connect.

setIcon(icon:Blob):Bool

Sets the icon of this Marketplace.

update():Marketplace

Updates the Marketplace in the server with the data changed in this model.

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

marketplace = marketplace.update();

Returns:

The Marketplace returned from the server, which should contain the same data as this Marketplace, or null if the updating fails.

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.