Represents a request of the Fulfillment Api.

Static methods

staticget(id:String):AssetRequest

Returns:

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

staticlist(filters:Query):Collection<AssetRequest>

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

  • status
  • created
  • id (List support)
  • type (purchase|renew|change|cancel)
  • asset.id (asset_id) - (List support)
  • asset.product.id (product_id)
  • asset.product.name - (List support)
  • asset.hub.id
  • asset.connection.hub.name - (List support)
  • asset.connection.provider.id
  • asset.connection.provider.name - (List support)
  • asset.connection.vendor.name - (List support)
  • asset.tiers.customer.id (Customer ID)
  • asset.tiers.tier1.id
  • asset.tiers.tier2.id
  • asset.connection.type (test|production|preview)

Returns:

A Collection of AssetRequests.

Constructor

new()

Variables

activationKey:String

Activation key content for activating the subscription on vendor portal. This markdown formatted message is sent to customer.

asset:Asset

Asset object

assignee:String

Connect returns either a String or a JSON object in this field. When it is an object, its String representation is stored.

contract:Contract

Contract object.

created:DateTime

Date of request creation.

marketplace:Marketplace

Marketplace object.

note:String

Details of note.

paramsFormUrl:String

URL for customer/reseller/provider for modifying param based on vendor's feedback.

reason:String

Fail reason in case of status of request is failed.

status:String

Status of request. One of: pending, inquiring, failed, approved.

Valid status changes:

  • pending -> inquiring
  • pending -> failed
  • pending -> approved
  • inquiring -> failed
  • inquiring -> approved
  • inquiring -> pending

type:String

Type of request. One of: purchase, change, suspend, resume, renew, cancel.

updated:DateTime

Date of last request modification.

Methods

approveByTemplate(id:String):AssetRequest

Changes this AssetRequest status to "approved", sending the id of a Template to render on the portal.

When processing requests within a Flow, you should use the Flow.approveByTemplate method instead of this one, since it finishes the flow and logs the information.

Returns:

The AssetRequest returned from the server, which should contain the updated status.

approveByTile(text:String):AssetRequest

Changes this AssetRequest status to "approved", rendering a tile on the portal with the given Markdown text.

When processing requests within a Flow, you should use the Flow.approveByTile method instead of this one, since it finishes the flow and logs the information.

Returns:

The AssetRequest returned from the server, which should contain the updated status.

assign(assigneeId:String):AssetRequest

Assigns this request to the assignee with the given assigneeId.

Returns:

The AssetRequest returned from the server, which should contain the updated assignee.

fail(reason:String):AssetRequest

Changes the status of this AssetRequest to "failed".

When processing requests within a Flow, you should use the Flow.fail method instead of this one, since it finishes the flow and logs the information.

Returns:

The AssetRequest returned from the server, which should contain the updated status.

getConversation():Conversation

Returns:

The Conversation assigned to this AssetRequest, or null if there is none.

inquire(templateId:String):AssetRequest

Changes the status of this AssetRequest to "inquiring".

When processing requests within a Flow, you should use the Flow.inquire method instead of this one, since it finishes the flow and logs the information.

Parameters:

templateId

Id of the template to use in the portal, or null to not use any.

Returns:

The AssetRequest returned from the server, which should contain the updated status.

@:value({ key : "migration_info" })needsMigration(key:String = "migration_info"):Bool

Returns:

Whether this AssetRequest is pending migration. This is indicated by the presence of a parameter that contains JSON data. By default, it checks the parameter "migration_info" and, if it is not found, it checks for "migration_info_object".

pend():AssetRequest

Changes the status of this AssetRequest to "pending".

When processing requests within a Flow, you should use the Flow.pend method instead of this one, since it finishes the flow and logs the information.

Returns:

The AssetRequest returned from the server, which should contain the updated status.

register():AssetRequest

Registers a new AssetRequest on Connect, based on the data of this AssetRequest, which should have a value at least in the following fields:

  • type
  • asset.externalUid
  • asset.items
  • asset.product.id
  • asset.tiers
  • marketplace.id

Returns:

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

update(params:Collection<Param>):AssetRequest

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

If no parameters are specified for updating, you should reassign your request 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:

request = request.update(null);

Parameters:

params

A collection of parameters to update. If null is passed, then the parameters that have changed in the request will be sent.

Returns:

The AssetRequest returned from the server, which should contain the same data as this AssetRequest, 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.