common

Classes

Client
SubscriptionProductClient

Type Definitions

Plan

Source:
Properties:
Name Type Attributes Description
id string

ID.

name string

Plan name.

onChainId string

Plan ID in the Ethereum blockchain (internal use of the SDK).

description string

Plan description.

price string

Plan price in tokens (stored as string).

periods number

Number of periods in periodUnit between bill cycles.

periodUnit string

Period unit: DAY, MONTH, YEAR.

maxExecutions string

How many times the Plan is executed.

private boolean

If a Plan is private it requires a signature (with a private key) from the authorizer defined in the Subscription Manager.

active boolean

Is the plan enabled for subscriptions or disabled?.

txHash string <optional>

Transaction hash when it was deployed.

error Error | string <optional>

Error message (if any).

state string

Enum: DRAFT, PENDING, DEPLOYED, FAILED.

removalState string

Enum: OK, PENDING, FAILED.

createdAt Date | string

Timestamp.

updatedAt Date | string

Timestamp.

Daisy's Plan object. Can be retrieved using module:common~SubscriptionProductClient#getData.

Type:
  • Object

Receipt

Source:
Properties:
Name Type Attributes Description
id string

ID.

txHash string

Transaction hash.

action string

What happened in this billing cycle.

nextPayment string <optional>

When is the next billing cycle.

reason Error | string <optional>

If failed, this is the error message.

createdAt Date | string

When was executed.

Type:
  • Object

Subscription

Source:
Properties:
Name Type Attributes Description
daisyId string

Daisy ID.

account string

Subscriber ethereum address.

token string

Token address.

price number | string

Approved tokens.

periodUnit number
periods number
signature string <optional>

Created when user signs the agreement at module:browser.DaisySDKToken#sign.

signatureExpiresAt string

UNIX Timestamp (in seconds for blockchain usage) when the signature field expires.

maxExecutions number | string

How many periods the subscription is for.

nextPayment string <optional>

UNIX Timestamp (in seconds for blockchain usage) when its the next billing cycle (approximation).

nextPaymentDate Date | string <optional>

Normal Date object representing the next billing cycle.

onChainId string <optional>

Identifier in the blockchain.

txHash string <optional>

Transaction hash after deploying the subscription.

error Error | string <optional>

Error message (if any).

errorAt Date | string <optional>

When the error ocurred (if any).

state string

Current subscription state. Enum: NOT_STARTED, PENDING, ACTIVE, ACTIVE_CANCELLED, CANCELLED, EXPIRED, INVALID, NOT_ENOUGH_FUNDS, FAILED.

cancelState string

Enum: OK, PENDING, FAILED.

startedAt Date | string <optional>

When the subscription started (off-chain value).

endedAt string <optional>

When the subscription ended (off-chain value).

updatedAt Date | string

Timestamp.

createdAt Date | string

Timestamp.

Type:
  • Object

SubscriptionManager

Source:
Properties:
Name Type Attributes Description
networkId number | string

Ethereum network identifier.

name string

Name.

wallet string

Where the billed tokens are transferer.

publisher string

Ethereum address of the publisher of this contract (can edit data and plans).

tokenAddress string

ERC20 Token address.

deployedAt Date | string <optional>

When the contract was deployed.

address string <optional>

Contract address.

authorizer string

Ethereum address of the manager of this contract.

txHash string <optional>

Transaction hash when it was deployed.

state string

Enum: DRAFT, PENDING, DEPLOYED, FAILED.

identifier string

DAISY_ID.

secretKey string <optional>

DAISY_SECRET_LEY.

createdAt Date | string

Timestamp.

updatedAt Date | string

Timestamp.

plans Array.<module:common~Plan> <optional>

Plans related to this manager.

Type:
  • Object

Classes

Client
SubscriptionProductClient

Type Definitions

Plan

Source:
Properties:
Name Type Attributes Description
id string

ID.

name string

Plan name.

onChainId string

Plan ID in the Ethereum blockchain (internal use of the SDK).

description string

Plan description.

price string

Plan price in tokens (stored as string).

periods number

Number of periods in periodUnit between bill cycles.

periodUnit string

Period unit: DAY, MONTH, YEAR.

maxExecutions string

How many times the Plan is executed.

private boolean

If a Plan is private it requires a signature (with a private key) from the authorizer defined in the Subscription Manager.

active boolean

Is the plan enabled for subscriptions or disabled?.

txHash string <optional>

Transaction hash when it was deployed.

error Error | string <optional>

Error message (if any).

state string

Enum: DRAFT, PENDING, DEPLOYED, FAILED.

removalState string

Enum: OK, PENDING, FAILED.

createdAt Date | string

Timestamp.

updatedAt Date | string

Timestamp.

Daisy's Plan object. Can be retrieved using module:common~SubscriptionProductClient#getData.

Type:
  • Object

Receipt

Source:
Properties:
Name Type Attributes Description
id string

ID.

txHash string

Transaction hash.

action string

What happened in this billing cycle.

nextPayment string <optional>

When is the next billing cycle.

reason Error | string <optional>

If failed, this is the error message.

createdAt Date | string

When was executed.

Type:
  • Object

Subscription

Source:
Properties:
Name Type Attributes Description
daisyId string

Daisy ID.

account string

Subscriber ethereum address.

token string

Token address.

price number | string

Approved tokens.

periodUnit number
periods number
signature string <optional>

Created when user signs the agreement at module:browser.DaisySDKToken#sign.

signatureExpiresAt string

UNIX Timestamp (in seconds for blockchain usage) when the signature field expires.

maxExecutions number | string

How many periods the subscription is for.

nextPayment string <optional>

UNIX Timestamp (in seconds for blockchain usage) when its the next billing cycle (approximation).

nextPaymentDate Date | string <optional>

Normal Date object representing the next billing cycle.

onChainId string <optional>

Identifier in the blockchain.

txHash string <optional>

Transaction hash after deploying the subscription.

error Error | string <optional>

Error message (if any).

errorAt Date | string <optional>

When the error ocurred (if any).

state string

Current subscription state. Enum: NOT_STARTED, PENDING, ACTIVE, ACTIVE_CANCELLED, CANCELLED, EXPIRED, INVALID, NOT_ENOUGH_FUNDS, FAILED.

cancelState string

Enum: OK, PENDING, FAILED.

startedAt Date | string <optional>

When the subscription started (off-chain value).

endedAt string <optional>

When the subscription ended (off-chain value).

updatedAt Date | string

Timestamp.

createdAt Date | string

Timestamp.

Type:
  • Object

SubscriptionManager

Source:
Properties:
Name Type Attributes Description
networkId number | string

Ethereum network identifier.

name string

Name.

wallet string

Where the billed tokens are transferer.

publisher string

Ethereum address of the publisher of this contract (can edit data and plans).

tokenAddress string

ERC20 Token address.

deployedAt Date | string <optional>

When the contract was deployed.

address string <optional>

Contract address.

authorizer string

Ethereum address of the manager of this contract.

txHash string <optional>

Transaction hash when it was deployed.

state string

Enum: DRAFT, PENDING, DEPLOYED, FAILED.

identifier string

DAISY_ID.

secretKey string <optional>

DAISY_SECRET_LEY.

createdAt Date | string

Timestamp.

updatedAt Date | string

Timestamp.

plans Array.<module:common~Plan> <optional>

Plans related to this manager.

Type:
  • Object

Classes

Client
SubscriptionProductClient

Type Definitions

Plan

Source:
Properties:
Name Type Attributes Description
id string

ID.

name string

Plan name.

onChainId string

Plan ID in the Ethereum blockchain (internal use of the SDK).

description string

Plan description.

price string

Plan price in tokens (stored as string).

periods number

Number of periods in periodUnit between bill cycles.

periodUnit string

Period unit: DAY, MONTH, YEAR.

maxExecutions string

How many times the Plan is executed.

private boolean

If a Plan is private it requires a signature (with a private key) from the authorizer defined in the Subscription Manager.

active boolean

Is the plan enabled for subscriptions or disabled?.

txHash string <optional>

Transaction hash when it was deployed.

error Error | string <optional>

Error message (if any).

state string

Enum: DRAFT, PENDING, DEPLOYED, FAILED.

removalState string

Enum: OK, PENDING, FAILED.

createdAt Date | string

Timestamp.

updatedAt Date | string

Timestamp.

Daisy's Plan object. Can be retrieved using module:common~SubscriptionProductClient#getData.

Type:
  • Object

Receipt

Source:
Properties:
Name Type Attributes Description
id string

ID.

txHash string

Transaction hash.

action string

What happened in this billing cycle.

nextPayment string <optional>

When is the next billing cycle.

reason Error | string <optional>

If failed, this is the error message.

createdAt Date | string

When was executed.

Type:
  • Object

Subscription

Source:
Properties:
Name Type Attributes Description
daisyId string

Daisy ID.

account string

Subscriber ethereum address.

token string

Token address.

price number | string

Approved tokens.

periodUnit number
periods number
signature string <optional>

Created when user signs the agreement at module:browser.DaisySDKToken#sign.

signatureExpiresAt string

UNIX Timestamp (in seconds for blockchain usage) when the signature field expires.

maxExecutions number | string

How many periods the subscription is for.

nextPayment string <optional>

UNIX Timestamp (in seconds for blockchain usage) when its the next billing cycle (approximation).

nextPaymentDate Date | string <optional>

Normal Date object representing the next billing cycle.

onChainId string <optional>

Identifier in the blockchain.

txHash string <optional>

Transaction hash after deploying the subscription.

error Error | string <optional>

Error message (if any).

errorAt Date | string <optional>

When the error ocurred (if any).

state string

Current subscription state. Enum: NOT_STARTED, PENDING, ACTIVE, ACTIVE_CANCELLED, CANCELLED, EXPIRED, INVALID, NOT_ENOUGH_FUNDS, FAILED.

cancelState string

Enum: OK, PENDING, FAILED.

startedAt Date | string <optional>

When the subscription started (off-chain value).

endedAt string <optional>

When the subscription ended (off-chain value).

updatedAt Date | string

Timestamp.

createdAt Date | string

Timestamp.

Type:
  • Object

SubscriptionManager

Source:
Properties:
Name Type Attributes Description
networkId number | string

Ethereum network identifier.

name string

Name.

wallet string

Where the billed tokens are transferer.

publisher string

Ethereum address of the publisher of this contract (can edit data and plans).

tokenAddress string

ERC20 Token address.

deployedAt Date | string <optional>

When the contract was deployed.

address string <optional>

Contract address.

authorizer string

Ethereum address of the manager of this contract.

txHash string <optional>

Transaction hash when it was deployed.

state string

Enum: DRAFT, PENDING, DEPLOYED, FAILED.

identifier string

DAISY_ID.

secretKey string <optional>

DAISY_SECRET_LEY.

createdAt Date | string

Timestamp.

updatedAt Date | string

Timestamp.

plans Array.<module:common~Plan> <optional>

Plans related to this manager.

Type:
  • Object