|
wtfast Keys API
|
Defines methods for managing wtfast keys. More...
Public Member Functions | |
| bool | Authenticate (string login, string password, out string sessionToken) |
| Authenticate seller and start API session. More... | |
| void | Logout (string sessionToken) |
| Logout the seller and close API session. More... | |
| string | BuyKey (string sessionToken, int membershipId, int computers, KeyTimeUnit timeUnit, int timeAmount, KeyType type, bool master, int masterLimit, bool activate) |
| Buy a new inactive key with the specified parameters. More... | |
| string [] | BuyKeyBulk (string sessionToken, int membershipId, int computers, KeyTimeUnit timeUnit, int timeAmount, KeyType type, bool master, int masterLimit, bool activate, int numberOfKeys) |
| Buy multiple new keys with the specified parameters. More... | |
| void | ActivateKey (string sessionToken, string keyId) |
| Activate the key to be available for user. More... | |
| void | DeactivateKey (string sessionToken, string keyId) |
| Deactivates an active key. More... | |
| KeyInfo [] | GetAllKeys (string sessionToken) |
| Returns the list of all keys associated with the given seller's account. More... | |
| KeyInfo [] | GetKeys (string sessionToken, int? year, int? month, KeyState? state, KeyOrder? sortOrder, OrderDir? sortDir, int start, int perPage) |
| Returns the list of keys associated with the given seller's account filtered and ordered according to the given parameters. More... | |
| KeyInfo [] | GetKeysByDate (string sessionToken, int? year, int? month, KeyState? state, KeyOrder? sortOrder, OrderDir? sortDir, DateTime createdAfter, int start, int perPage) |
| Returns the list of keys associated with the given seller's account filtered and ordered according to the given parameters. More... | |
| int | GetKeysCount (string sessionToken, int? year, int? month, KeyState? state) |
| Returns number of keys associated with the given seller's account filtered according to the given parameters. More... | |
| KeyInfo | GetKey (string sessionToken, string keyId) |
| Returns information about a single key. More... | |
| PriceInfo | GetKeyPriceInfo (string sessionToken, int membershipId, int computers, KeyTimeUnit timeUnit, int timeAmount, KeyType type) |
| Returns key pricing information for given key parameters. More... | |
| SellerInfo | GetSellerInfo (string sessionToken) |
| Returns information about seller's account. More... | |
| MembershipInfo [] | GetMembershipTypes (string sessionToken, bool all) |
| Returns list of available membership types. More... | |
| int | GetKeyUseInfoCount (string sessionToken, string keyId) |
| Returns number of users who used given key. This information is only relevant to master keys. More... | |
| UseInfo [] | GetKeyUseInfo (string sessionToken, string keyId, int start, int perPage) |
| Returns information about users who used given key. More... | |
Defines methods for managing wtfast keys.
Version 1.2
| void keyservice.KeyService.ActivateKey | ( | string | sessionToken, |
| string | keyId | ||
| ) |
Activate the key to be available for user.
Call this method after you sell the key to the end-user.
| sessionToken | session token |
| keyId | key identifier |
| bool keyservice.KeyService.Authenticate | ( | string | login, |
| string | password, | ||
| out string | sessionToken | ||
| ) |
Authenticate seller and start API session.
Call this method before calling any other method in this class.
Supply your login and password as input parameters and the method will return a session token for use during the session. Supply the returned session token as the first argument for each of the remaining methods.
| login | seller login |
| password | seller password |
| sessionToken | session token |
true if authentication is successful| string keyservice.KeyService.BuyKey | ( | string | sessionToken, |
| int | membershipId, | ||
| int | computers, | ||
| KeyTimeUnit | timeUnit, | ||
| int | timeAmount, | ||
| KeyType | type, | ||
| bool | master, | ||
| int | masterLimit, | ||
| bool | activate | ||
| ) |
Buy a new inactive key with the specified parameters.
The key will be added to the seller's account and the seller's credit will be decreased by the value of the key price.
To get PriceInfo for specific key parameter configuration call GetKeyPriceInfo method.
| sessionToken | session token |
| membershipId | membership id - the only supported id value is 3. See GetMembershipTypes to obtain detailed information |
| computers | number of computers. Must be between 1 and 100. |
| timeUnit | unit of the key duration - Day or Month - see KeyTimeUnit |
| timeAmount | number of time units of the key duration. If time unit is month, the only valid amount values are 1, 2, 3, 6, 12 |
| type | type of key - see KeyType |
| master | true to buy master key. Master keys can be used by more then one user. |
| masterLimit | maximum number of users for master key. This value is ignored for non-master keys. |
| activate | true if the key should be activated |
| SoapException | if membership id is invalid |
| SoapException | if computers is outside the valid range |
| SoapException | if time unit is month and time amount is not one of 1, 2, 3, 6, 12 |
| SoapException | if a KeyType.Subscription is requested and seller does not have subscription keys enabled |
| SoapException | if a master is set to true and seller does not have master keys enabled |
| SoapException | if seller does not have sufficient credit |
| string [] keyservice.KeyService.BuyKeyBulk | ( | string | sessionToken, |
| int | membershipId, | ||
| int | computers, | ||
| KeyTimeUnit | timeUnit, | ||
| int | timeAmount, | ||
| KeyType | type, | ||
| bool | master, | ||
| int | masterLimit, | ||
| bool | activate, | ||
| int | numberOfKeys | ||
| ) |
Buy multiple new keys with the specified parameters.
To get PriceInfo for specific key parameter configuration call GetKeyPriceInfo method.
The keys will be added to the seller's account and the seller's credit will be decreased by the value of the keys price.
This method allows to create keys which are already activated.
| sessionToken | session token |
| membershipId | membership id - the only supported id value is 3. See GetMembershipTypes to obtain detailed information |
| computers | number of computers. Must be between 1 and 100. |
| timeUnit | unit of the key duration - Day or Month - see KeyTimeUnit |
| timeAmount | number of time units of the key duration. If time unit is month, the only valid amount values are 1, 2, 3, 6, 12 |
| type | type of key - see KeyType |
| master | true to buy master key. Master keys can be used by more then one user. |
| masterLimit | maximum number of users for master key. This value is ignored for non-master keys. |
| activate | true if the key should be activated |
| numberOfKeys | number of keys to buy - must be between 1 and 50.0000 |
| SoapException | if membership id is invalid |
| SoapException | if computers is outside the valid range |
| SoapException | if time unit is month and time amount is not one of 1, 2, 3, 6, 12 |
| SoapException | if numberOfKeys is invalid |
| SoapException | if a KeyType.Subscription is requested and seller does not have subscription keys enabled |
| SoapException | if a master is set to true and seller does not have master keys enabled |
| SoapException | if seller does not have sufficient credit |
| void keyservice.KeyService.DeactivateKey | ( | string | sessionToken, |
| string | keyId | ||
| ) |
Deactivates an active key.
This a utility method and should be used only in legitimate cases. Once a key is deactivated, the user's subscription is also canceled and no further use of given key is possible.
| sessionToken | session token |
| keyId | key identifier |
| KeyInfo [] keyservice.KeyService.GetAllKeys | ( | string | sessionToken | ) |
Returns the list of all keys associated with the given seller's account.
This methods does not support paging. If you have large number of keys, use GetKeys instead.
| sessionToken | session token |
| KeyInfo keyservice.KeyService.GetKey | ( | string | sessionToken, |
| string | keyId | ||
| ) |
Returns information about a single key.
| sessionToken | session token |
| keyId | key identifier |
| PriceInfo keyservice.KeyService.GetKeyPriceInfo | ( | string | sessionToken, |
| int | membershipId, | ||
| int | computers, | ||
| KeyTimeUnit | timeUnit, | ||
| int | timeAmount, | ||
| KeyType | type | ||
| ) |
Returns key pricing information for given key parameters.
| sessionToken | session token |
| membershipId | membership id - the only supported id value is 3. See GetMembershipTypes to obtain detailed information |
| computers | number of computers. Must be between 1 and 100. |
| timeUnit | unit of the key duration - day or month - see KeyTimeUnit |
| timeAmount | number of time units of the key duration. If time unit is month, the only valid amount values are 1, 2, 3, 6, 12 |
| type | type of key - see KeyType |
| SoapException | if membership id is invalid |
| SoapException | if computers is outside the valid range |
| SoapException | if time unit is month and time amount is not one of 1, 2, 3, 6, 12 |
| SoapException | if a KeyType.Subscription is requested and seller does noot have subscription keys enabled |
| KeyInfo [] keyservice.KeyService.GetKeys | ( | string | sessionToken, |
| int? | year, | ||
| int? | month, | ||
| KeyState? | state, | ||
| KeyOrder? | sortOrder, | ||
| OrderDir? | sortDir, | ||
| int | start, | ||
| int | perPage | ||
| ) |
Returns the list of keys associated with the given seller's account filtered and ordered according to the given parameters.
In case of filtering by year and/or month, the date used for filtering depends on the value of the state parameter:
state is null or is Inactive, the creation date is being used for filtering state is Active - the date of activation is used state is Used - the date of actual use by the customer is used | sessionToken | session token |
| state | filter by given state of key |
| year | filter by year |
| month | filter by month |
| sortOrder | sort order by attribute |
| sortDir | sort direction |
| start | offset of the first record to retrieve |
| perPage | number of keys to retrieve, or use 0 to return all keys |
| KeyInfo [] keyservice.KeyService.GetKeysByDate | ( | string | sessionToken, |
| int? | year, | ||
| int? | month, | ||
| KeyState? | state, | ||
| KeyOrder? | sortOrder, | ||
| OrderDir? | sortDir, | ||
| DateTime | createdAfter, | ||
| int | start, | ||
| int | perPage | ||
| ) |
Returns the list of keys associated with the given seller's account filtered and ordered according to the given parameters.
In case of filtering by year and/or month, the date used for filtering depends on the value of the state parameter:
state is null or is Inactive, the creation date is being used for filtering state is Active - the date of activation is used state is Used - the date of actual use by the customer is used | sessionToken | session token |
| state | filter by given state of key |
| year | filter by year |
| month | filter by month |
| sortOrder | sort order by attribute |
| sortDir | sort direction |
| createdAfter | filter only keys created after this date (UTC) |
| start | offset of the first record to retrieve |
| perPage | number of keys to retrieve, or use 0 to return all keys |
| int keyservice.KeyService.GetKeysCount | ( | string | sessionToken, |
| int? | year, | ||
| int? | month, | ||
| KeyState? | state | ||
| ) |
Returns number of keys associated with the given seller's account filtered according to the given parameters.
In case of filtering by year and/or month, the date used for filtering depends on the value of the state parameter:
state is null or is Inactive, the creation date is being used for filtering state is Active - the date of activation is used state is Used - the date of actual use by the customer is used | sessionToken | session token |
| year | filter by year |
| month | filter by month |
| state | filter by given state of key |
| UseInfo [] keyservice.KeyService.GetKeyUseInfo | ( | string | sessionToken, |
| string | keyId, | ||
| int | start, | ||
| int | perPage | ||
| ) |
Returns information about users who used given key.
| sessionToken | session token |
| keyId | key identifier |
| start | offset of the first record to retrieve |
| perPage | number of uses to retrieve, or use 0 to return all users |
| int keyservice.KeyService.GetKeyUseInfoCount | ( | string | sessionToken, |
| string | keyId | ||
| ) |
Returns number of users who used given key. This information is only relevant to master keys.
| sessionToken | session token |
| keyId | key identifier |
| MembershipInfo [] keyservice.KeyService.GetMembershipTypes | ( | string | sessionToken, |
| bool | all | ||
| ) |
Returns list of available membership types.
| sessionToken | session token |
| all | if true - returns all defined memberships, otherwise returns only available memberships |
| SellerInfo keyservice.KeyService.GetSellerInfo | ( | string | sessionToken | ) |
| void keyservice.KeyService.Logout | ( | string | sessionToken | ) |