# README
Slyk GO
Index
- Create Client
- Working Principle
- User
- Wallet
- Transaction
- Asset
- Movement
- Payment Method
- Invites
- Rates
- Address
- Category
- Order
- Product
- Question
- Task
- Tax Rate
Create Client
To use the slyk-go library, it is necessary to create a client. You need to give this client an api key.
Api Key : https://developers.slyk.io/slyk/developing-with-slyk/quick-start-guide
package main
import (
"fmt"
"github.com/KMACEL/slyk-go"
)
func main() {
client := slyk.New("{{API_KEY}}")
}
Working Principle
This library has been prepared with reference to "https://developers.slyk.io/slyk/reference/endpoints". The functions in this library are used for communication with the endpoints at this address.
Get Functions
Get functions are used to fetch information.
Get Functions Filter
Get functions can take filters. These filters are created by functions. For example, let's examine the Get User system.
This is the function that brings up the User list. "filter ...*getUsersFilter"
func (c Client) GetUsers(filter ...*getUsersFilter) (*Users, error) {
.
.
.
}
"..." means bringing the data filtered or unfiltered, thanks to its Section. So if we don't filter this function, it will return all data.
client.GetUsers()
But if you want to create a filter, a "getUsersFilter" type filter must be created. But since this is a private value, a filter should be created through constructor methods.
client.GetUsers(slyk.GetUsersFilter().SetEmail("[email protected]")
Thus, this function will bring up the user whose "email" address is "[email protected]".
However, it is possible to add more than one filter as below.
client.GetUsers(slyk.GetUsersFilter().
SetEmail("[email protected]").
SetBlocked(true).
SetApproved(true).
SetName("Mert"))
If there is a filter in "slyk endpoint" that is not in this library, you can also query it with "SetGenericQueryParameter".
client.GetUsers(slyk.GetUsersFilter().
SetEmail("[email protected]").
SetBlocked(true).
SetApproved(true).
SetName("Mert").
SetGenericQueryParameter("filter[OTHER]", "TEST"))
Filter Information
Some filters come in 3 types. These mean "=, in, of". Its equivalents are, for example,
SetAssetCode(assetCode string)
SetAssetCodeWithIN(assetCode ...string)
SetAssetCodeWithNIN(assetCode ...string)
- "=": it is checked if the data is equal to the value. 1 piece of data is requested.
- "in": There can be many data entries. A list of those matching the entered parameters is brought.
- "nin": There can be many data entries. The list of non-parameters entered is brought.
Note for page filters :
- PageSize = Defines the number of results per page. Default = 30.
- Page Number = Defines the number of the page to retrieve. Default = 1
NOTE : In this document, the filters are located under "Filter List". "For Create;" Then comes the filter suitable for that function. "Filters That Can Be Added;" After, come filters that can be added to that filter.
Example = client.GetUsers(slyk.GetUsersFilter().SetEmail("[email protected]").SetBlocked(true))
client.GetUsers = API
slyk.GetUsersFilter = Filter Creator
SetEmail : Filter ()
SetBlocked : Filter
Update Functions
Functions used to update data. There are two types of usage.
Take the "UpdateUser" function for example. The first parameter is the id of the data to be updated. The second data is the struct to update.
func (c Client) UpdateUser(userID string, updateUserData *UpdateUserDataBody) (*User, error) {
.
.
.
}
Method 1 - With Struct
A struct is required for each "update" function. You can enter data directly with struct suitable for Update function and perform update operations.
Update Struct :
type UpdateUserDataBody struct {
Name string `json:"name,omitempty"`
Locale string `json:"locale,omitempty"`
CustomData interface{} `json:"customData,omitempty"`
}
Use;
client.UpdateUser("cf99e4d8-bc64-4a5c-80a4-dd1e25e2018d", &slyk.UpdateUserDataBody{
Name: "Mert",
Locale: "en",
CustomData: map[string]interface{}{"Test": "123"},
})
Method 2 - With Methods
You can assign parameters to be updated with a constructor method.
client.UpdateUser("cf99e4d8-bc64-4a5c-80a4-dd1e25e2018d",
slyk.UpdateUserDataForBody().
SetName("Mert").
SetLocale("en"))
Create Functions
Used to make a new recording. There are two types of usage.
Take the "CreateUser" function for example. As data, the struct to be created is taken.
func (c Client) CreateUser(createUserdata *CreateUserDataBody) (*User, error) {
.
.
.
}
Method 1 - With Struct
A struct is required for each "create" function. You can enter data directly with struct suitable for Create function and perform create operations.
Struct :
type CreateUserDataBody struct {
Email string `json:"email"`
Code string `json:"code,omitempty"`
Locale string `json:"locale,omitempty"`
Name string `json:"name,omitempty"`
Password string `json:"password,"`
Approved bool `json:"approved,omitempty"`
Blocked bool `json:"blocked,omitempty"`
CustomData interface{} `json:"customData,omitempty"`
PrimaryWalletID string `json:"primaryWalletId,omitempty"`
Verified bool `json:"verified,omitempty"`
}
Use;
client.CreateUser(&sly.CreateUserDataBody{
Email: "[email protected]",
Password: "123456789.aA",
})
Method 2 - With Methods
You can assign parameters to be created with a constructor method.
client.CreateUser(slyk.CreateUserDataForBody().
SetName("Mert").
SetEmail("[email protected]").
SetPassword("123456789.aA").
SetCustomData(map[string]interface{}{"name": "mert"}).
SetVerified(true).
SetApproved(true).
SetBlocked(false).
SetLocale("en"))
User
Get User
GetUser is returns the Slyk user list. This function returns user information and error.
if you do not use a filter, '30' users' information is received.
response,err := client.GetUsers({{OPTIONAL_FILTER}})
Filter List
For Create;
slyk.GetUsersFilter()
Filters That Can Be Added;
SetGenericQueryParameter(key string, value interface{})
SetApproved(approved bool)
SetBlocked(blocked bool)
SetEmail(email string)
SetID(id string)
SetIDWithIN(id ...string)
SetName(name string)
SetPhone(phone string)
SetPrimaryWalletId(primaryWalletId string)
SetReferralCode(referralCode string)
SetReferralUserID(referralUserID string)
SetReferralUserIDWithIN(referralUserID ...string)
SetRole(role string)
SetVerified(verified bool)
SetSortWithCreatedAt()
SetSortWithCreatedAtReverse()
SetSortWithUpdatedAt()
SetSortWithUpdatedAtReverse()
SetPageSize(size int)
SetPageNumber(number int)
Get User With ID
Fetches information about a user. User Id takes as parameter.
response,err := client.GetUserWithID({{USER_ID}})
Update User
Used to update the user's data.
Function;
response,err := client.UpdateUser({{USER_ID}}, *UpdateUserDataBody)
Struct
type UpdateUserDataBody struct {
Name string `json:"name,omitempty"`
Locale string `json:"locale,omitempty"`
CustomData interface{} `json:"customData,omitempty"`
}
Body Function
For Create;
slyk.UpdateUserDataForBody()
Append List;
SetName(name string)
SetLocale(locale string)
SetCustomData(customData interface{})
Create User
Used to register new users.
Note ;
- Login password. It must contain: 1 capital letter; 1 lower letter; 1 digit; at least 8 characters.
Function;
response,err := client.CreateUser(*CreateUserDataBody)
Struct
type CreateUserDataBody struct {
Email string `json:"email"`
Code string `json:"code,omitempty"`
Locale string `json:"locale,omitempty"`
Name string `json:"name,omitempty"`
Password string `json:"password,"`
Approved bool `json:"approved,omitempty"`
Blocked bool `json:"blocked,omitempty"`
CustomData interface{} `json:"customData,omitempty"`
PrimaryWalletID string `json:"primaryWalletId,omitempty"`
Verified bool `json:"verified,omitempty"`
}
Body Function
For Create;
slyk.CreateUserDataForBody()
Append List;
SetName(name string)
SetEmail(email string)
SetPassword(password string)
SetLocale(locale string)
SetCustomData(customData interface{})
SetApproved(approved bool)
SetBlocked(blocked bool)
SetCode(code string)
SetPrimaryWalletID(primaryWalletID string)
SetVerified(verified bool)
Set User Approve
It performs the approval process. It takes "user id" as parameter. An user that is not approved is unable to login.
err := client.SetUserApprove({{USER_ID}})
Set User Block
It performs the block process. It takes "user id" as parameter. An user that is blocked is unable to login.
err := client.SetUserBlock({{USER_ID}})
Set User Unblock
It performs the block process. It takes "user id" as parameter.
err := client.SetUserUnblock({{USER_ID}})
Change Password
it is used to change the user password. New password. It must contain: 1 capital letter; 1 lower letter; 1 digit; at least 8 characters.
err := client.ChangePassword({{USER_ID}},{{NEW_PASSWORD}})
Wallet
Get Wallets
Brings up the wallet list.
response,err := client.GetWallets({{OPTIONAL_FILTER}})
Filter List
For Create;
slyk.GetWalletsFilter()
Filters That Can Be Added;
SetGenericQueryParameter(key string, value interface{})
SetID(id string)
SetIDWithIN(id ...string)
SetIDWithNIN(id ...string)
SetLocked(locked bool)
SetName(name string)
SetOwnerID(ownerId string)
SetReference(reference string)
SetSortWithCreatedAt()
SetSortWithCreatedAtReverse()
Get Wallet With ID
The wallet id returns the information of a given wallet. Convenience endepoint endpoint to get a paginated list of transactions where the wallet id may be either the destinationWalletId or the originWalletId of the Transaction object.
response,err := client.GetWalletWithID({{WALLET_ID}})
Get Wallet Activity
Brings wallet activities.
response,err := client.GetWalletActivity({{OPTIONAL_FILTER}})
Filter List
For Create;
slyk.GetWalletActivityFilter()
Filters That Can Be Added;
SetGenericQueryParameter(key string, value interface{})
SetAssetCode(assetCode string)
SetAssetCodeWithIN(assetCode ...string)
SetAssetCodeWithNIN(assetCode ...string)
SetCode(code string)
SetCodeWithIN(code ...string)
SetCodeWithNIN(code ...string)
SetStatus(status string)
SetStatusWithIN(status ...string)
SetStatusWithNIN(status ...string)
SetType(getType string)
SetTypeWithIN(getType ...string)
SetTypeWithNIN(getType ...string)
SetSortWithAmount()
SetSortWithAmountReverse()
SetSortWithCreatedAt()
SetSortWithCreatedAtReverse()
SetAvailableIncludeWithUser()
SetAvailableIncludeWithWallets()
Get Wallet Activity With ID
Returns the activities of 1 wallet given the id.
response,err := client.GetWalletActivityWithID({{WALLET_ID}}},{{OPTIONAL_FILTER}})
Filter List
For Create;
slyk.GetWalletActivtyWithIDFilter()
Filters That Can Be Added;
SetGenericQueryParameter(key string, value interface{})
SetAssetCode(assetCode string)
SetAssetCodeWithIN(assetCode ...string)
SetAssetCodeWithNIN(assetCode ...string)
SetCode(code string)
SetCodeWithIN(code ...string)
SetCodeWithNIN(code ...string)
SetStatus(status string)
SetStatusWithIN(status ...string)
SetStatusWithNIN(status ...string)
SetType(getType string)
SetTypeWithIN(getType ...string)
SetTypeWithNIN(getType ...string)
SetSortWithAmount()
SetSortWithAmountReverse()
SetSortWithCreatedAt()
SetSortWithCreatedAtReverse()
SetAvailableIncludeWithUser()
SetAvailableIncludeWithWallets()
Get Wallet Balance
Brings balance information. Retrieves a payspace's balance for the various assets it contains. Only assets that were ever transacted on the wallet will be shown (even if their balance is currently zero).
response,err := client.GetWalletBalance({{OPTIONAL_FILTER}})
Filter List
For Create;
slyk.GetWalletBalanceWithIDFilter()
Filters That Can Be Added;
SetGenericQueryParameter(key string, value interface{})
SetAssetCode(assetCode string)
SetAssetCodeWithIN(assetCode ...string)
SetAssetCodeWithNIN(assetCode ...string)
Get Wallet Balance With ID
Its wallet id brings the balance information given.
response,err := client.GetWalletBalanceWithID({{WALLET_ID}}},{{OPTIONAL_FILTER}})
Filter List
For Create;
slyk.GetWalletBalanceWithIDFilter()
Filters That Can Be Added;
SetGenericQueryParameter(key string, value interface{})
SetAssetCode(assetCode string)
SetAssetCodeWithIN(assetCode ...string)
SetAssetCodeWithNIN(assetCode ...string)
Get Wallet Movements
Brings up a list of wallet Movements.
response,err := client.GetWalletMovements({{WALLET_ID}}},{{OPTIONAL_FILTER}})
Filter List
For Create;
slyk.GetWalletMovementsFilter()
Filters That Can Be Added;
SetGenericQueryParameter(key string, value interface{})
SetAssetCode(assetCode string)
SetAssetCodeWithIN(assetCode ...string)
SetAssetCodeWithNIN(assetCode ...string)
SetSortWithAmount()
SetSortWithAmountReverse()
SetSortWithCreatedAt()
SetSortWithCreatedAtReverse()
SetAvailableTransactionWithUser()
Get Wallet Transactions
Brings up a list of Wallet Transactions
response,err := client.GetWalletTransactions({{WALLET_ID}}},{{OPTIONAL_FILTER}})
Filter List
For Create;
slyk.GetWalletTransactionsFilter()
Filters That Can Be Added;
SetGenericQueryParameter(key string, value interface{})
SetAssetCode(assetCode string)
SetAssetCodeWithIN(assetCode ...string)
SetAssetCodeWithNIN(assetCode ...string)
SetCode(code string)
SetCodeWithIN(code ...string)
SetCodeWithNIN(code ...string)
SetStatus(status string)
SetStatusWithIN(status ...string)
SetStatusWithNIN(status ...string)
SetType(getType string)
SetTypeWithIN(getType ...string)
SetTypeWithNIN(getType ...string)
SetSortWithAmount()
SetSortWithAmountReverse()
SetSortWithCreatedAt()
SetSortWithCreatedAtReverse()
Update Wallet
Used to update wallet information.
Function;
response,err := client.UpdateWallet({{USER_ID}}, *UpdateWalletData)
Struct
type UpdateWalletDataBody struct {
Locked bool `json:"locked,omitempty"`
OwnerID string `json:"ownerId,omitempty"`
CustomData interface{} `json:"customData,omitempty"`
}
Body Function
For Create;
slyk.UpdateWalletDataForBody()
Append List;
SetOwnerID(ownerID string)
SetLocked(locked bool)
SetCustomData(customData interface{})
Create Wallet
Used to create a new wallet.
Function;
response,err := client.CreateWallet(*CreateWalletData)
Struct
type CreateWalletDataBody struct {
Name string `json:"name,omitempty"`
Locked bool `json:"locked,omitempty"`
OwnerID string `json:"ownerId,omitempty"`
CustomData interface{} `json:"customData,omitempty"`
}
Body Function
For Create;
slyk.CreateWalletDataForBody()
Append List;
SetName(name string)
SetOwnerID(ownerID string)
SetLocked(locked bool)
SetCustomData(customData interface{})
Transaction
Get Transactions
Returns transactions data.
response,err := client.GetTransactions({{OPTIONAL_FILTER}})
Filter List
For Create;
slyk.GetTransactionsFilter()
Filters That Can Be Added;
SetGenericQueryParameter(key string, value interface{})
SetAssetCode(assetCode string)
SetAssetCodeWithIN(assetCode ...string)
SetAssetCodeWithNIN(assetCode ...string)
SetCode(code string)
SetCodeWithIN(code ...string)
SetCodeWithNIN(code ...string)
SetCreated(date string)
SetCreatedAtWithGTE(date string)
SetCreatedAtWithLTE(date string)
SetDescription(description string)
SetDestinationWalletID(destinationWalletID string)
SetDestinationWalletIdWithIN(destinationWalletId ...string)
SetDestinationWalletIdWithNIN(destinationWalletId ...string)
SetExternalId(externalId string)
SetExternalIdWithIN(externalId ...string)
SetExternalIdWithNIN(externalId ...string)
SetExternalReferenceWithNIN(externalReference string)
SetID(id string)
SetIDWithIN(id ...string)
SetIDWithNIN(id ...string)
SetOriginWalletID(originWalletId string)
SetOriginWalletIDWithIN(originWalletId ...string)
SetOriginWalletIdWithNIN(originWalletId ...string)
SetRSeference(reference string)
SetStatus(status string)
SetStatusWithIN(status ...string)
SetStatusWithNIN(status ...string)
SetType(typeParam string)
SetTypeWithIN(typeParam ...string)
SetTypeWithNIN(typeParam ...string)
SetWalletID(walletID string)
SetWalletIdWithIN(walletId ...string)
SetWalletIdWithNIN(walletId ...string)
SetSortWithAmount()
SetSortWithAmountReverse()
SetSortWithCreatedAt()
SetSortWithCreatedAtReverse()
SetPageSize(size int)
SetPageNumber(number int)
Get Transactions With ID
Returns 1 Transaction data given its id.
response,err := client.GetTransactionsWithID({{TRANSACTIN_ID}} )
Set Transaction Approve With ID
It is used to approve the transaction in pending.
response,err := client.SetTransactionApprove({{TRANSACTIN_ID}} )
Set Transaction Confirm With ID
It is used to confirm the transaction in pending.
response,err := client.SetTransactionConfirm({{TRANSACTIN_ID}} )
Set Transaction Fail With ID
It is used to fail the transaction in pending.
response,err := client.SetTransactionFail({{TRANSACTIN_ID}},*TransactionFailDataBody)
Struct
type TransactionFailDataBody struct {
Reason string `json:"reason"`
}
Body Function
For Create;
slyk.TransactionFailDataForBody()
Append List;
SetReason(reason string)
Set Transaction Reject With ID
It is used to Reject the transaction in pending.
response,err := client.SetTransactionReject({{TRANSACTIN_ID}}, *TransactionRejectDataBody)
Struct
type TransactionRejectDataBody struct {
Reason string `json:"reason"`
}
Body Function
For Create;
slyk.TransactionRejectDataForBody()
Append List;
SetReason(reason string)
Create Transaction Deposit
Used to create deposit to the transection.
Function;
response,err := client.CreateTransactionDeposit({{TRANSACTIN_ID}},*CreateTransactionDepositDataBody)
Struct
type CreateTransactionDepositDataBody struct {
Amount string `json:"amount"`
AssetCode string `json:"assetCode"`
Code string `json:"code"`
CustomData interface{} `json:"customData,omitempty"`
Data interface{} `json:"data"`
Description string `json:"description,omitempty"`
DestinationAddress string `json:"destinationAddress,omitempty"`
DestinationWalletID string `json:"destinationWalletId"`
Commit bool `json:"commit,omitempty"`
ExternalReference string `json:"externalReference,omitempty"`
}
Body Function
For Create;
slyk.CreateTransactionDepositDataForBody()
Append List;
SetAmount(amount string)
SetAssetCode(assetCode string)
SetCode(code string)
SetCommit(commit bool)
SetCustomData(customData interface{})
SetDescription(description string)
SetDestinationAddress(destinationAddress string)
SetDestinationWalletID(destinationWalletID string)
SetExternalReference(externalReference string)
Create Transaction Pay
Function;
response,err := client.CreateTransactionPay(*CreateTransactionPayDataBody)
Struct
type CreateTransactionPayDataBody struct {
Amount string `json:"amount"`
AssetCode string `json:"assetCode"`
CustomData interface{} `json:"customData,omitempty"`
Description string `json:"description,omitempty"`
OriginWalletID string `json:"originWalletId"`
}
Body Function
For Create;
slyk.CreateTransactionPayDataForBody()
Append List;
SetAmount(amount string)
SetAssetCode(assetCode string)
SetCustomData(customData interface{})
SetDescription(description string)
SetOriginWalletID(originWalletID string)
Create Transaction Transfer
Function;
response,err := client.CreateTransactionTransfer(*CreateTransactionTransferDataBody)
Struct
type CreateTransactionTransferDataBody struct {
Amount string `json:"amount"`
AssetCode string `json:"assetCode"`
Code string `json:"code"`
Commit bool `json:"commit,omitempty"`
CustomData interface{} `json:"customData,omitempty"`
Description string `json:"description,omitempty"`
DestinationAddress string `json:"destinationAddress,omitempty"`
DestinationWalletID string `json:"destinationWalletId"`
ExternalReference string `json:"externalReference,omitempty"`
OriginAddress string `json:"originAddress,omitempty"`
OriginWalletID string `json:"originWalletId"`
}
Body Function
For Create;
slyk.CreateTransactionTransferDataForBody()
Append List;
SetAmount(amount string)
SetAssetCode(assetCode string)
SetCode(code string)
SetCommit(commit bool)
SetCustomData(customData interface{})
SetDescription(description string)
SetDestinationAddress(destinationAddress string)
SetDestinationWalletID(destinationWalletID string)
SetExternalReference(externalReference string)
SetOriginWalletID(originWalletID string)
SetOriginAddress(originAddress string)
Create Transaction Withdrawal
Function;
response,err := client.CreateTransactionWithdrawal(*CreateTransactionWithdrawalDataBody)
Struct
type CreateTransactionWithdrawalDataBody struct {
Amount string `json:"amount"`
AssetCode string `json:"assetCode"`
Code string `json:"code"`
Commit bool `json:"commit,omitempty"`
CustomData interface{} `json:"customData,omitempty"`
Data interface{} `json:"data,omitempty"`
Description string `json:"description,omitempty"`
ExternalReference string `json:"externalReference,omitempty"`
OriginAddress string `json:"originAddress,omitempty"`
OriginWalletID string `json:"originWalletId"`
}
Body Function
For Create;
slyk.CreateTransactionWithdrawalDataForBody()
Append List;
SetAmount(amount string)
SetAssetCode(assetCode string)
SetCode(code string)
SetCommit(commit bool)
SetCustomData(customData interface{})
SetDescription(description string)
SetExternalReference(externalReference string)
SetOriginWalletID(originWalletID string)
SetOriginAddress(originAddress string)
Asset
Get Assets
Brings up the assets list.
response,err := client.GetAssets({{OPTIONAL_FILTER}})
Filter List
For Create;
slyk.GetAssetsFilter()
Filters That Can Be Added;
SetGenericQueryParameter(key string, value interface{})
SetCode(code string)
SetCodeWithIN(code ...string)
SetCodeWithNIN(code ...string)
SetEnabled(enabled bool)
SetName(name string)
SetSystem(system bool)
SetType(getType string)
SetTypeWithIN(getType ...string)
SetTypeWithNIN(getType ...string)
SetSortWithCreatedAt()
SetSortWithCreatedAtReverse()
SetSortWithEnabled()
SetSortWithEnabledReverse()
SetSortWithSystem()
SetSortWithSystemReverse()
SetSortWithType()
SetSortWithTypeReverse()
SetPageSize(size int)
SetPageNumber(number int)
Get Asset With Code
It brings 1 asset information whose code is given.
response,err := client.GetAssetsWithCode({{ASSET_CODE}})
Update Assets With Code
Updates the asset information.
Note : System assets cannot be updated.
Function;
response,err := client.UpdateAssets({{ASSET_CODE}}, *UpdateAssetDataBody)
Struct
type UpdateAssetDataBody struct {
DecimalPlaces int `json:"decimalPlaces,omitempty"`
Name string `json:"name,omitempty"`
Contract struct{} `json:"contract,omitempty"`
CustomData interface{} `json:"customData,omitempty"`
Enabled bool `json:"enabled,omitempty"`
Logo string `json:"logo,omitempty"`
Symbol string `json:"symbol,omitempty"`
}
Body Function
For Create;
slyk.UpdateAssetDataForBody()
Append List;
SetName(name string)
SetDecimalPlaces(decimalPlaces int)
SetContract(contract struct{})
SetCustomData(customData interface{})
SetEnabled(enabled bool)
SetLogo(logo string)
SetSymbol(symbol string)
Create Asset
Updates the asset information.
Function;
response,err := client.CreateAsset(*CreateAssetDataBody)
Struct
type CreateAssetDataBody struct {
Code string `json:"code"`
Contract struct{} `json:"contract,omitempty"`
CustomData interface{} `json:"customData,omitempty"`
DecimalPlaces int `json:"decimalPlaces"`
Enabled bool `json:"enabled,omitempty"`
Name string `json:"name"`
Symbol string `json:"symbol,omitempty"`
Type string `json:"type"`
}
Body Function
For Create;
slyk.CreateAssetDataForBody()
Append List;
SetCode(code string)
SetName(name string)
SetContract(contract struct{})
SetCustomData(customData interface{})
SetDecimalPlaces(decimalPlaces int)
SetEnabled(enabled bool)
SetSymbol(sysmbol string)
SetType(typeParam string)
Movement
Get Movements
Brings up the movements list.
response,err := client.GetMovements({{OPTIONAL_FILTER}})
Filter List
For Create;
slyk.GetMovementsFilter()
Filters That Can Be Added;
SetGenericQueryParameter(key string, value interface{})
SetAssetCode(assetCode string)
SetAssetCodeWithIN(assetCode ...string)
SetAssetCodeWithNIN(assetCode ...string)
SetCreatedAtWithGTE(date string)
SetCreatedAtWithLTE(date string)
SetID(id string)
SetIDWithIN(id ...string)
SetIDWithNIN(id ...string)
SetTransaction(transactionID string)
SetTransactionIDWithIN(transactionID ...string)
SetTransactionIDWithNIN(transactionID ...string)
SetWalletID(walletID string)
SetWalletIDWithIN(walletID ...string)
SetWalletIDWithNIN(walletID ...string)
SetSortWithCreatedAt()
SetSortWithCreatedAtReverse()
SetSortWithAmount(amount string)
SetSortWithAmountReverse(amount string)
SetAvailableTransactionWithUser()
SetPageSize(size int)
SetPageNumber(number int)
Get Movement With ID
It brings 1 movement information whose id is given.
response,err := client.GetMovementWithID({{MOVEMENT_ID}},{{OPTIONAL_FILTER}})
Filter List
For Create;
slyk.GetMovementWithIDFilter()
Filters That Can Be Added;
SetGenericQueryParameter(key string, value interface{})
SetAvailableTransactionWithUser()
Payment Method
Get Payment Methods
Brings up the payment medhods list.
response,err := client.GetPaymentMethods({{OPTIONAL_FILTER}})
Filter List
For Create;
slyk.GetPaymentMedhodsFilter()
Filters That Can Be Added;
SetGenericQueryParameter(key string, value interface{})
SetCreatedAtWithGTE(date string)
SetCreatedAtWithLTE(date string)
SetEnabledWithIN(enabled bool)
SetEnabledWithNIN(enabled bool)
SetSlug(slug string)
SetSlugWithIN(slug ...string)
SetSlugWithNIN(slug ...string)
Get Payment Method With Slug
It brings 1 payment medhod information whose slug is given.
response,err := client.GetPaymentMethodsWithSlug({{SLUG}})
Invites
Get Invites
Brings up the invites list.
response,err := client.GetInvites({{OPTIONAL_FILTER}})
Filter List
For Create;
slyk.GetInvitesFilter()
Filters That Can Be Added;
SetGenericQueryParameter(key string, value interface{})
SetCode(code string)
SetCodeWithIN(code ...string)
SetCodeWithNIN(code ...string)
SetExpiredAtWithGTE(date string)
SetExpiredAtWithLTE(date string)
SetInvitedEmail(invitedEmail string)
SetInvitedEmailWithIN(invitedEmail ...string)
SetInvitedEmailWithNIN(invitedEmail ...string)
SetInvitedUserID(invitedEmail string)
SetInvitedUserIDWithIN(invitedUserID ...string)
SetInvitedUserIDWithNIN(invitedUserID ...string)
SetInviterUserID(inviterUserID string)
SetInviterUserIDWithIN(inviterUserID ...string)
SetInviterUserIDWithNIN(inviterUserID ...string)
SetStatus(status string)
SetStatusWithIN(status ...string)
SetStatusWithNIN(status ...string)
SetType(typeInvite string)
SetSortWithCreatedAt()
SetSortWithCreatedAtReverse()
SetSortWithExpiredAt()
SetSortWithExpiredAtReverse()
SetSortWithUpdatedAt()
SetSortWithUpdatedAtReverse()
SetPageSize(size int)
SetPageNumber(number int)
Get Invite With Code
It brings 1 invite information whose slug is given.
response,err := client.GetInviteWithCode({{INVITE_CODE}})
Get Invite With Code For Validate
response,err := client.GetInviteWithCodeForValidate({{INVITE_CODE}})
Create Invite
Create the asset information.
Function;
response,err := client.CreateInvite(*CreateInviteDataBody)
Struct
type CreateInviteDataBody struct {
Email string `json:"email,omitempty"`
InviterUserID string `json:"inviterUserId,omitempty"`
}
Body Function
For Create;
slyk.CreateInviteBody()
Append List;
SetEmail(email string)
SetInviterUserID(inviterUserID string)
Cancel Invite
response,err := client.CancelInvite({{INVITE_CODE}})
Rates
Get Rates
Brings up the rates list.
response,err := client.GetRates({{OPTIONAL_FILTER}})
Filter List
For Create;
slyk.GetRatesFilter()
Filters That Can Be Added;
SetGenericQueryParameter(key string, value interface{})
SetBaseAssetCode(baseAssetCode string)
SetBaseAssetCodeWithIN(baseAssetCode ...string)
SetBaseAssetCodeWithNIN(baseAssetCode ...string)
SetQuoteAssetCode(quoteAssetCode string)
SetQuoteAssetCodeWithIN(quoteAssetCode ...string)
SetQuoteAssetCodeWithNIN(quoteAssetCode ...string)
SetRateWithGT(rate string)
SetRateWithGTE(rate string)
SetRateWithLT(rate string)
SetRateWithLTE(rate string)
SetSortWithCreatedAt()
SetSortWithCreatedAtReverse()
SetSortWithUpdatedAt()
SetSortWithUpdatedAtReverse()
SetSortWitRate()
SetSortWitRateReverse()
SetPageSize(size int)
SetPageNumber(number int)
Get Rates With Base Asset Code And Quote Asset Code
response,err := client.GetRatesWithBaseAssetCodeAndQuoteAssetCode({{BASE_ASSET_CODE}},{{QUOTE_ASSET_CODE}})
Update Rate
Function;
response,err := client.UpdateRate({{BASE_ASSET_CODE}},{{QUOTE_ASSET_CODE}},*UpdateRateBodyData)
Struct
type UpdateRateDataBody struct {
Rate string `json:"rate"`
CustomData interface{} `json:"customData,omitempty"`
}
Body Function
For Create;
slyk.UpdateRateDataForBody()
Append List;
SetRate(rate string)
SetCustomData(customData interface{})
Create Rate
Function;
response,err := client.CreateRate(*CreateRateDataBody)
Struct
type CreateRateDataBody struct {
BaseAssetCode string `json:"baseAssetCode"`
QuoteAssetCode string `json:"quoteAssetCode"`
Rate string `json:"rate"`
CustomData interface{} `json:"customData,omitempty"`
}
Body Function
For Create;
slyk.CreateRateDataForBody()
Append List;
SetBaseAssetCode(baseAssetCode string)
SetQuoteAssetCode(quoteAssetCode string)
SetRate(rate string)
SetCustomData(customData interface{})
Delete Rate
response,err := client.DeleteRate({{BASE_ASSET_CODE}},{{QUOTE_ASSET_CODE}})
Address
Note : Address APIs become active only after "CoinBase" integration. It is "Coinbase" as the Only Provider.
Get Addresses
Brings up the address list.
response,err := client.GetAddresses({{OPTIONAL_FILTER}})
Filter List
For Create;
slyk.GetAddressesFilter()
Filters That Can Be Added;
SetGenericQueryParameter(key string, value interface{})
SetAddress(address string)
SetAssetCode(assetCode string)
SetAssetCodeWithIN(assetCode ...string)
SetAssetCodeWithNIN(assetCode ...string)
SetID(walletID string)
SetIDWithIN(walletID ...string)
SetIDWithNIN(walletID ...string)
Get Address With ID
response,err := client.GetAddressWithID({{ADDRESS_ID}})
Create Address
Function;
response,err := client.CreateAddress(*CreateAddressBody)
Struct
type CreateAddressBody struct {
Address string `json:"address,omitempty"`
AssetCode string `json:"assetCode,omitempty"`
CustomData interface{} `json:"customData,omitempty"`
Provider string `json:"provider,omitempty"`
WalletID string `json:"walletId,omitempty"`
}
Body Function
For Create;
slyk.CreateAddressForBody()
Append List;
SetAddress(address string)
SetAssetCode(assetCode string)
SetCustomData(customData interface{})
SetProvider(provider string)
SetWalletID(walletID string)
Category
Get Categories
Brings up the categories list.
response,err := client.GetCategories({{OPTIONAL_FILTER}})
Filter List
For Create;
slyk.GetCategoriesFilter()
Filters That Can Be Added;
SetGenericQueryParameter(key string, value interface{})
SetAvailableProducts(availableProducts interface{})
SetDescription(description string)
SetID(id string)
SetIDWithIN(id ...string)
SetIDWithNIN(id ...string)
SetOrder(order string)
SetOrderWithGTE(order string)
SetOrderWithLTE(order string)
SetTitle(title string)
SetVisibleProducts(visibleProducts interface{})
SetSortWithCreatedAt()
SetSortWithCreatedAtReverse()
SetSortWithOrder()
SetSortWithOrderReverse()
SetSortWithTitle()
SetSortWithTitleReverse()
SetPageSize(size int)
SetPageNumber(number int)
Get Category With ID
response,err := client.GetCategoryWithID({{CATEGORY_ID}})
Update Category
Function;
response,err := client.UpdateCategory({{CATEGORY_ID}},*UpdateCategoryDataBody)
Struct
type UpdateCategoryDataBody struct {
Description string `json:"description,omitempty"`
Image string `json:"image,omitempty"`
Title string `json:"title,omitempty"`
CustomData interface{} `json:"customData"`
Order string `json:"order,omitempty"`
}
Body Function
For Create;
slyk.UpdateCategoryDataForBody()
Append List;
SetDescription(description string)
SetImage(image string)
SetTitle(title string)
SetCustomData(customData string)
SetOrder(order string)
Create Category
Function;
response,err := client.CreateCategory(*CreateCategoryDataBody)
Struct
type CreateCategoryDataBody struct {
Description string `json:"description,omitempty"`
Image string `json:"image,omitempty"`
Title string `json:"title"`
CustomData interface{} `json:"customData"`
Order string `json:"order,omitempty"`
}
Body Function
For Create;
slyk.CreateCategoryDataForBody()
Append List;
SetDescription(description string)
SetImage(image string)
SetTitle(title string)
SetCustomData(customData string)
SetOrder(order string)
Category Reorder
response,err := client.CategoryReorder({{CATEGORY_ID}},*CategoryReorderDataBody)
Struct
type CategoryReorderDataBody struct {
SubsequentID string `json:"subsequentId,omitempty"`
}
Body Function
For Create;
slyk.CategoryReorderDataForBody()
Append List;
SetSubsequentID(subsequentID string)
Delete Category
err := client.DeleteCategory({{CATEGORY_ID}})
Order
Get Orders
Brings up the order list.
response,err := client.GetOrders({{OPTIONAL_FILTER}})
Filter List
For Create;
slyk.GetOrdersFilter()
Filters That Can Be Added;
SetGenericQueryParameter(key string, value interface{})
SetAmount(amount string)
SetAmountWithGTE(amount string)
SetAmountWithLTE(amount string)
SetAssetCode(assetCode string)
SetAssetCodeWithIN(assetCode ...string)
SetAssetCodeWithNIN(assetCode ...string)
SetBonus(bonus string)
SetBonusWithGTE(bonus string)
SetBonusWithLTE(bonus string)
SetFulfilledAt(fulfilledAt string)
SetFulfilledAtWithGTE(fulfilledAt string)
SetFulfilledAtWithLTE(fulfilledAt string)
SetHideDraftsWithLTE(hideDrafts interface{})
SetOrderStatus(orderStatus string)
SetOrderStatuseWithIN(orderStatus ...string)
SetOrderStatusWithNIN(orderStatus ...string)
SetPaidAmount(paidAmount string)
SetPaidAmountWithGTE(paidAmount string)
SetPaidAmountWithLTE(paidAmount string)
SetPaidAt(paidAt string)
SetPaidAtWithGTE(paidAt string)
SetPaidAtWithLTE(paidAt string)
SetPaymentStatus(paymentStatus string)
SetPaymentStatusWithIN(paymentStatus ...string)
SetPaymentStatusWithNIN(paymentStatus ...string)
SetReference(reference string)
SetReferenceWithIN(reference ...string)
SetReferenceNIN(reference ...string)
SetTrackingID(trackingID string)
SetTrackingIDWithIN(trackingID ...string)
SetTrackingIDWithNIN(trackingID ...string)
SetUserID(userID string)
SetUserIDWithIN(userID ...string)
SetUserIDWithNIN(userID ...string)
SetSortWithCreatedAt()
SetSortWithCreatedAtReverse()
SetSortWithCanceledAt()
SetSortWithCanceledAtReverse()
SetSortWithFulfilledAt()
SetSortWithFulfilledAtReverse()
SetSortWithPaidAt()
SetSortWithPaidAtReverse()
SetPageSize(size int)
SetPageNumber(number int)
Get Order With ID
response,err := client.GetOrderWithID({{ORDER_ID}})
Get Order Lines With ID
Brings up the order list.
response,err := client.GetOrderLinesWithID({{ORDER_ID}},{{OPTIONAL_FILTER}})
Filter List
For Create;
slyk.GetOrderLinesWithIDFilter()
Filters That Can Be Added;
SetGenericQueryParameter(key string, value interface{})
SetAssetCode(assetCode string)
SetAssetCodeWithIN(assetCode ...string)
SetAssetCodeWithNIN(assetCode ...string)
SetFulfilledAt(fulfilledAt string)
SetFulfilledAtWithGTE(fulfilledAt string)
SetFulfilledAtWithLTE(fulfilledAt string)
SetFulfilledQuantity(fulfilledQuantity string)
SetFulfilledQuantityWithGTE(fulfilledQuantity string)
SetFulfilledQuantityWithLTE(fulfilledQuantity string)
SetQuantity(quantity string)
SetQuantityWithGTE(quantity string)
SetQuantityWithLTE(quantity string)
SetStatus(status string)
SetStatusWithIN(status ...string)
SetStatusWithNIN(status ...string)
SetUnitPrice(unitPrice string)
SetUnitPriceWithGTE(unitPrice string)
SetUnitPriceWithLTE(unitPrice string)
SetSortWithCreatedAt()
SetSortWithCreatedAtReverse()
SetSortWithFulfilledAt()
SetSortWithFulfilledAtReverse()
SetPageSize(size int)
SetPageNumber(number int)
Get Order Lines With ID And Line ID
response,err := client.GetOrderWithID({{ORDER_ID}},{{LONE_ID}})
Update Order
Function;
response,err := client.UpdateOrder({{ORDER_ID}},*UpdateOrderDataBody)
Struct
type UpdateOrderDataBody struct {
TrackingID string `json:"trackingId"`
}
Body Function
For Create;
slyk.UpdateOrderDataForBody()
Append List;
SetTrackingID(trackingID string)
Create Order
Function;
response,err := client.CreateOrder(*CreateOrderDataBody)
Struct
type CreateOrderDataBody struct {
ChosenPaymentMethod string `json:"chosenPaymentMethod,omitempty"`
CustomData interface{} `json:"customData,omitempty"`
DeliveryMethod string `json:"deliveryMethod,omitempty"`
DryRun bool `json:"dryRun,omitempty"`
Lines []LineForOrder `json:"lines"`
ShippingAddressID string `json:"shippingAddressId,omitempty"`
UseBonus bool `json:"useBonus,omitempty"`
UserID string `json:"userId"`
UserNotes string `json:"userNotes,omitempty"`
WalletID string `json:"walletId,omitempty"`
}
Body Function
For Create;
slyk.CreateOrderDataForBody()
Append List;
SetChosenPaymentMethod(chosenPaymentMethod string)
SetCustomData(customData interface{})
SetDeliveryMethod(deliveryMethod string)
SetDryRun(dryRun bool)
SetLines(lines []LineForOrder)
AppendLine(line LineForOrder)
SetShippingAddressID(shippingAddressID string)
SetUseBonus(useBonus bool)
SetUserID(userID string)
SetUserNotes(userNotes string)
SetWalletID(walletID string) }
Order Cancel
err := client.OrderCancel({{ORDER_ID}},*OrderCancelDataBody)
Struct
type OrderCancelDataBody struct {
Reason string `json:"reason,omitempty"`
RefundAmount string `json:"refundAmount,omitempty"`
}
Body Function
For Create;
slyk.OrderCancelDataForBody()
Append List;
SetReason(reason string)
SetRefundAmount(refundAmount string)
Order Fulfill
response,err := client.OrderFulfill({{ORDER_ID}},*OrderFulfillDataBody)
Struct
type OrderFulfillDataBody struct {
TrackingID string `json:"trackingId"`
}
Body Function
For Create;
slyk.OrderFulfillDataForBody()
Append List;
SetTrackingID(trackingID string)
Order UN Fulfill
response,err := client.OrderUNFulfill({{ORDER_ID}})
Order Pay
err := client.OrderPay({{ORDER_ID}},*OrderPayDataBody)
Struct
type OrderPayDataBody struct {
Amount string `json:"amount,omitempty"`
WalletID string `json:"walletId,omitempty"`
}
Body Function
For Create;
slyk.OrderPayDataForBody()
Append List;
SetAmount(amount string)
SetWalletID(walletID string)
Order Line Fulfill
err := client.OrderLineFulfill({{ORDER_ID}},*OrderLineFulfillDataBody)
Struct
type OrderLineFulfillDataBody struct {
Quantity int `json:"quantity"`
}
Body Function
For Create;
slyk.OrderLineFulfillDataForBody()
Append List;
SetQuantity(quantity int)
Order Line UN Fulfill
err := client.OrderLineUNFulfill({{ORDER_ID}},*OrderLineUNFulfillDataBody)
Struct
type OrderLineUNFulfillDataForBody struct {
Quantity int `json:"quantity"`
}
Body Function
For Create;
slyk.OrderLineUNFulfillDataForBody()
Append List;
SetQuantity(quantity int)
Product
Get Products
Brings up the products list.
response,err := client.GetProducts({{OPTIONAL_FILTER}})
Filter List
For Create;
slyk.GetProductsFilter()
Filters That Can Be Added;
SetGenericQueryParameter(key string, value interface{})
SetAvailable(available string)
SetCategoryID(categoryID string)
SetCategoryIDWithIN(categoryID ...string)
SetCategoryIDWithNIN(categoryID ...string)
SetDescription(description string)
SetFeatured(featured bool)
SetID(id string)
SetIDWithIN(id ...string)
SetIDWithNIN(id ...string)
SetName(name string)
SetOrderWithGTE(order string)
SetOrdertWithLTE(order string)
SetRequiresIdentity(requiresIdentity string)
SetTypeCode(typeCode string)
SetTypeCodeWithIN(typeCode ...string)
SetTypeCodeWithNIN(typeCode ...string)
SetVisible(visible bool)
SetSortWithCreatedAt()
SetSortWithCreatedAtReverse()
SetSortWithOrder()
SetSortWithOrderReverse()
SetSortWithFeatured()
SetSortWithFeaturedReverse()
SetPageSize(size int)
SetPageNumber(number int)
Get Product With ID
response,err := client.GetProductWithID({{PRODUCT_ID}})
Update Product
Function;
response,err := client.UpdateProduct({{PRODUCT_ID}},*UpdateProductDataBody)
Struct
type UpdateProductDataBody struct {
AllowChoosingQuantity bool `json:"allowChoosingQuantity,omitempty"`
AssetCode string `json:"assetCode,omitempty"`
Available bool `json:"available,omitempty"`
Bonus string `json:"bonus,omitempty"`
ButtonLabel string `json:"buttonLabel,omitempty"`
CategoryID string `json:"categoryId,omitempty"`
CustomData interface{} `json:"customData,omitempty"`
Description string `json:"description,omitempty"`
Featured bool `json:"featured,omitempty"`
Image string `json:"image,omitempty"`
ListLabel string `json:"listLabel,omitempty"`
Name string `json:"name,omitempty"`
Order string `json:"order,omitempty"`
Price string `json:"price,omitempty"`
RequiresIdentity bool `json:"requiresIdentity,omitempty"`
TaxRateID string `json:"taxRateId,omitempty"`
Thumbnail string `json:"thumbnail,omitempty"`
URL string `json:"url,omitempty"`
Visible bool `json:"visible,omitempty"`
}
Body Function
For Create;
slyk.UpdateProductDataForBody()
Append List;
SetAllowChoosingQuantity(allowChoosingQuantity bool)
SetAssetCode(assetCode string)
SetAvailable(available bool)
SetBonus(bonus string)
SetButtonLabel(buttonLabel string)
SetCategoryID(categoryID string)
SetCustomData(customData interface{})
SetDescription(description string)
SetFeatured(featured bool)
SetImage(image string)
SetListLabel(listLabel string)
SetName(name string)
SetOrder(order string)
SetPrice(price string)
SetRequiresIdentity(requiresIdentity bool)
SetTaxRateID(taxRateID string)
SetThumbnail(thumbnail string)
SetURL(url string)
SetVisible(visible bool)
Create Product
Function;
response,err := client.CreateProduct(*CreateProductDataBody)
Struct
type CreateProductDataBody struct {
AllowChoosingQuantity bool `json:"allowChoosingQuantity,omitempty"`
AssetCode string `json:"assetCode,omitempty"`
Available bool `json:"available,omitempty"`
Bonus string `json:"bonus,omitempty"`
ButtonLabel string `json:"buttonLabel,omitempty"`
CategoryID string `json:"categoryId"`
CustomData interface{} `json:"customData,omitempty"`
Description string `json:"description,omitempty"`
Featured bool `json:"featured,omitempty"`
Image string `json:"image,omitempty"`
ListLabel string `json:"listLabel,omitempty"`
Name string `json:"name"`
Order string `json:"order,omitempty"`
Price string `json:"price"`
RequiresIdentity bool `json:"requiresIdentity,omitempty"`
TaxRateID string `json:"taxRateId,omitempty"`
Thumbnail string `json:"thumbnail,omitempty"`
URL string `json:"url,omitempty"`
Visible bool `json:"visible,omitempty"`
}
Body Function
For Create;
slyk.CreateProductDataForBody()
Append List;
SetAllowChoosingQuantity(allowChoosingQuantity bool)
SetAssetCode(assetCode string)
SetAvailable(available bool)
SetBonus(bonus string)
SetButtonLabel(buttonLabel string)
SetCategoryID(categoryID string)
SetCustomData(customData interface{})
SetDescription(description string)
SetFeatured(featured bool)
SetImage(image string)
SetListLabel(listLabel string)
SetName(name string)
SetOrder(order string)
SetPrice(price string)
SetRequiresIdentity(requiresIdentity bool)
SetTaxRateID(taxRateID string)
SetThumbnail(thumbnail string)
SetURL(url string)
SetVisible(visible bool)
Add Product Question
Function;
response,err := client.AddProductQuestion({{PRODUCT_ID}},*AddProductQuestionDataBody)
Struct
type AddProductQuestionDataBody struct {
QuestionID string `json:"questionId"`
}
Body Function
For Create;
slyk.AddProductQuestionDataForBody()
Append List;
SetQuestionID(questionID string)
Product Reorder
Function;
err := client.ProductReorder({{PRODUCT_ID}},*ProductReorderDataBody)
Struct
type ProductReorderDataBody struct {
SubsequentID string `json:"subsequentId"`
}
Body Function
For Create;
slyk.ProductReorderDataForBody()
Append List;
SetSubsequentID(questionID string)
Product Question Reorder
Function;
err := client.ProductQuestionReorder({{PRODUCT_ID}},{{QUESTION_ID}},*ProductQuestionReorderDataBody)
Struct
type ProductQuestionReorderDataBody struct {
SubsequentID string `json:"subsequentId"`
}
Body Function
For Create;
slyk.ProductQuestionReorderDataForBody()
Append List;
SetSubsequentID(questionID string)
Delete Product
Function;
err := client.DeleteProduct({{PRODUCT_ID}})
Delete Product Question
Function;
err := client.DeleteProductQuestion({{PRODUCT_ID}},{{QUESTION_ID}})
Question
Get Questions
Brings up the questions list.
response,err := client.GetQuestions({{OPTIONAL_FILTER}})
Filter List
For Create;
slyk.GetQuestionsFilter()
Filters That Can Be Added;
SetGenericQueryParameter(key string, value interface{})
SetID(id string)
SetIDWithIN(id ...string)
SetIDWithNIN(id ...string)
SetProductTypeCode(productTypeCode string)
SetTitle(title string)
SetTypeCode(typeCode string)
SetTypeCodeWithIN(typeCode ...string)
SetTypeCodeWithNIN(typeCode ...string)
SetSortWithCreatedAt()
SetSortWithCreatedAtReverse()
SetSortWithTypeCode()
SetSortWithTypeCodeReverse()
SetSortWithTitle()
SetSortWithTitleReverse()
SetPageSize(size int)
SetPageNumber(number int)
Get Question With ID
response,err := client.GetQuestionWithID({{QUESTION_ID}})
Get Questions Types
Brings up the questions types list.
response,err := client.GetQuestionsTypes({{OPTIONAL_FILTER}})
Filter List
For Create;
slyk.GetQuestionsTypesFilter()
Filters That Can Be Added;
SetGenericQueryParameter(key string, value interface{})
SetCode(code string)
SetCodeWithIN(code ...string)
SetCodeWithNIN(code ...string)
SetSortWithCreatedAt()
SetSortWithCreatedAtReverse()
SetSortWithCode()
SetSortWithCodeReverse()
SetPageSize(size int)
SetPageNumber(number int)
Update Question
Function;
response,err := client.UpdateQuestion({{QUESTION_ID}},*UpdateQuestionDataBody)
Struct
type UpdateQuestionDataBody struct {
Configurations interface{} `json:"configurations,omitempty"`
CustomData interface{} `json:"customData,omitempty"`
Description string `json:"description,omitempty"`
ProductTypeCode string `json:"productTypeCode,omitempty"`
Required bool `json:"required,omitempty"`
Title string `json:"title,omitempty"`
TypeCode string `json:"typeCode,omitempty"`
}
Body Function
For Create;
slyk.UpdateQuestionDataForBody()
Append List;
SetConfigurations(configurations interface{})
SetCustomData(customData interface{})
SetDescription(description string)
SetProductTypeCode(productTypeCode string)
SetRequired(required bool)
SetTitle(title string)
SetTypeCode(typeCode string)
Create Question
Function;
response,err := client.CreateQuestion(*CreateQuestionDataBody)
Struct
type CreateQuestionDataBody struct {
Configurations interface{} `json:"configurations,omitempty"`
CustomData interface{} `json:"customData,omitempty"`
Description string `json:"description,omitempty"`
ProductTypeCode string `json:"productTypeCode"`
Required bool `json:"required,omitempty"`
Title string `json:"title"`
TypeCode string `json:"typeCode"`
}
Body Function
For Create;
slyk.CreateQuestionDataForBody()
Append List;
SetConfigurations(configurations interface{})
SetCustomData(customData interface{})
SetDescription(description string)
SetProductTypeCode(productTypeCode string)
SetRequired(required bool)
SetTitle(title string)
SetTypeCode(typeCode string)
Delete Question
err := client.DeleteQuestion({{QUESTION_ID}})
Task
Get Tasks
Brings up the tasks list.
response,err := client.GetTasks({{OPTIONAL_FILTER}})
Filter List
For Create;
slyk.GetTasksFilter()
Filters That Can Be Added;
SetGenericQueryParameter(key string, value interface{})
SetEnabled(enabled bool)
SetFeatured(featured bool)
SetID(id string)
SetIDWithIN(id ...string)
SetIDWithNIN(id ...string)
SetName(name string)
SetNameWithIN(name ...string)
SetNameWithNIN(name ...string)
SetOrderWithGTE(order string)
SetOrdertWithLTE(order string)
SetType(getType string)
SetTypeWithIN(getType ...string)
SetTypeWithNIN(getType ...string)
SetSortWithAmount()
SetSortWithAmountReverse()
SetSortWithCreatedAt()
SetSortWithCreatedAtReverse()
SetSortWithEnabled()
SetSortWithEnabledReverse()
SetSortWithFeatured()
SetSortWithFeaturedReverse()
SetSortWithName()
SetSortWithNameReverse()
SetSortWithOrder()
SetSortWithOrderReverse()
SetSortWithType()
SetSortWithTypeReverse()
SetPageSize(size int)
SetPageNumber(number int)
Get Task With ID
response,err := client.GetTaskWithID({{TASK_ID}})
Update Task
Function;
response,err := client.UpdateTask({{TASK_ID}},*UpdateTaskDataBody)
Struct
type UpdateTaskDataBody struct {
Amount string `json:"amount,omitempty"`
ButtonLabel string `json:"buttonLabel,omitempty"`
CustomData interface{} `json:"customData,omitempty"`
Description string `json:"description,omitempty"`
Enabled bool `json:"enabled,omitempty"`
Featured bool `json:"featured,omitempty"`
Image string `json:"image,omitempty"`
Name string `json:"name,omitempty"`
Order string `json:"order,omitempty"`
SurveyURL string `json:"surveyUrl,omitempty"`
Thumbnail string `json:"thumbnail,omitempty"`
Type string `json:"type,omitempty"`
}
Body Function
For Create;
slyk.UpdateTaskDataForBody()
Append List;
SetAmount(amount string)
SetButtonLabel(buttonLabel string)
SetCustomData(customData interface{})
SetDescription(description string)
SetEnabled(enabled bool)
SetFeatured(featured bool)
SetImage(image string)
SetName(name string)
SetOrder(order string)
SetSurveyURL(surveyURL string)
SetThumbnail(thumbnail string)
SetType(typeFiled string)
Create Task
Function;
response,err := client.CreateTask(*CreateTaskDataBody)
Struct
type CreateTaskDataBody struct {
Amount string `json:"amount"`
ButtonLabel string `json:"buttonLabel,omitempty"`
CustomData interface{} `json:"customData,omitempty"`
Description string `json:"description"`
Enabled bool `json:"enabled,omitempty"`
Featured bool `json:"featured,omitempty"`
Image string `json:"image,omitempty"`
Name string `json:"name"`
Order string `json:"order,omitempty"`
SurveyURL string `json:"surveyUrl,omitempty"`
Thumbnail string `json:"thumbnail,omitempty"`
Type string `json:"type"`
}
Body Function
For Create;
slyk.CreateTaskDataForBody()
Append List;
SetAmount(amount string)
SetButtonLabel(buttonLabel string)
SetCustomData(customData interface{})
SetDescription(description string)
SetEnabled(enabled bool)
SetFeatured(featured bool)
SetImage(image string)
SetName(name string)
SetOrder(order string)
SetSurveyURL(surveyURL string)
SetThumbnail(thumbnail string)
SetType(typeFiled string)
Set Task Complete
err := client.SetTaskComplete({{TASK_ID}})
Set Task Reorder
err := client.SetTaskReorder({{TASK_ID}})
Delete Task
err := client.DeleteTask({{TASK_ID}})
Tax Rate
Get Tax Rates
Brings up the tax rates list.
response,err := client.GetTaxRates({{OPTIONAL_FILTER}})
Filter List
For Create;
slyk.GetTaxRatesFilter()
Filters That Can Be Added;
SetGenericQueryParameter(key string, value interface{})
SetID(id string)
SetIDWithIN(id ...string)
SetIDWithNIN(id ...string)
SetName(name string)
SetSortWithCreatedAt()
SetSortWithCreatedAtReverse()
SetSortWithName()
SetSortWithNameReverse()
SetSortWithRate()
SetSortWithRateReverse()
SetPageSize(size int)
SetPageNumber(number int)
Get Tax Rate With ID
response,err := client.GetTaxRateWithID({{TAX_RATE_ID}})
Update Tax Rate
Function;
response,err := client.UpdateTaxRate({{TAX_RATE_ID}},*UpdateTaxRateDataBody)
Struct
type UpdateTaxRateDataBody struct {
Name string `json:"name,omitempty"`
Rate string `json:"rate,omitempty"`
}
Body Function
For Create;
slyk.UpdateTaxRateDataForBody()
Append List;
SetName(name string)
SetRate(rate string)
Create Tax Rate
Function;
response,err := client.CreateTaxRate(*CreateTaxRateDataBody)
Struct
type CreateTaxRateDataBody struct {
Name string `json:"name"`
Rate string `json:"rate"`
}
Body Function
For Create;
slyk.CreateTaxRateDataForBody()
Append List;
SetName(name string)
SetRate(rate string)
Delete Tax Rate
err := client.DeleteTaxRate({{TAX_RATE_ID}})