Class: Proposal
market/proposal.Proposal
Proposal module - an object representing an offer in the state of a proposal from the provider.
Table of contents
Constructors
Properties
Accessors
Methods
Constructors
constructor
• new Proposal(demand
, parentId
, setCounteringProposalReference
, api
, model
, eventTarget?
): Proposal
Create proposal for given subscription ID
Parameters
Name | Type |
---|---|
demand | Demand |
parentId | null | string |
setCounteringProposalReference | (id : string , parentId : string ) => null | void |
api | RequestorApi |
model | Proposal |
eventTarget? | EventTarget |
Returns
Defined in
Properties
id
• id: string
Defined in
issuerId
• Readonly
issuerId: string
Defined in
provider
• Readonly
provider: ProviderInfo
Defined in
properties
• Readonly
properties: ProposalProperties
Defined in
constraints
• Readonly
constraints: string
Defined in
timestamp
• Readonly
timestamp: string
Defined in
counteringProposalId
• counteringProposalId: null
| string
Defined in
demand
• Readonly
demand: Demand
Defined in
Accessors
details
• get
details(): ProposalDetails
Returns
Defined in
pricing
• get
pricing(): PricingInfo
Returns
Defined in
Methods
validate
▸ validate(): void
Validates if the proposal satisfies basic business rules, is complete and thus safe to interact with
Use this method before executing any important logic, to ensure that you're working with correct, complete data
Returns
void
Defined in
isInitial
▸ isInitial(): boolean
Returns
boolean
Defined in
isDraft
▸ isDraft(): boolean
Returns
boolean
Defined in
isExpired
▸ isExpired(): boolean
Returns
boolean
Defined in
isRejected
▸ isRejected(): boolean
Returns
boolean
Defined in
reject
▸ reject(reason?
): Promise
<void
>
Parameters
Name | Type | Default value |
---|---|---|
reason | string | "no reason" |
Returns
Promise
<void
>
Defined in
respond
▸ respond(chosenPlatform
): Promise
<string
>
Parameters
Name | Type |
---|---|
chosenPlatform | string |
Returns
Promise
<string
>
Defined in
hasPaymentPlatform
▸ hasPaymentPlatform(paymentPlatform
): boolean
Parameters
Name | Type |
---|---|
paymentPlatform | string |
Returns
boolean
Defined in
getEstimatedCost
▸ getEstimatedCost(): number
Proposal cost estimation based on CPU, Env and startup costs
Returns
number