nmkr-studio-api
Version:
Typesafe API Client to work with the NMKR Studio V2 API
143 lines • 5.3 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.CustomerService = void 0;
class CustomerService {
constructor(httpRequest) {
this.httpRequest = httpRequest;
}
/**
* Adds a payout wallet to your account
* With this call you can add a payout wallet in your account. You have to confirm the wallet by clicking the link in the email
* @returns ApiErrorResultClass Returns the Apiresultclass with the information about the address
* @throws ApiError
*/
getV2AddPayoutWallet({ walletaddress }) {
return this.httpRequest.request({
method: 'GET',
url: '/v2/AddPayoutWallet/{walletaddress}',
path: {
walletaddress: walletaddress,
},
errors: {
401: `The access was denied. (Wrong or expired APIKEY, wrong projectid etc.)`,
404: `The project was not found in our database or not assiged to your account`,
406: `Some data are not correct - eg wrong wallet address`,
},
});
}
/**
* Creates a subcustomer
* @returns CreateSubcustomerResultClass Returns the result as ZIP File
* @returns any Returns the results as CSV File
* @throws ApiError
*/
postV2CreateApikeyForSubcustomer({ customerid, requestBody, }) {
return this.httpRequest.request({
method: 'POST',
url: '/v2/CreateApikeyForSubcustomer/{customerid}',
path: {
customerid: customerid,
},
body: requestBody,
mediaType: 'application/json',
errors: {
401: `The access was denied. (Wrong or expired APIKEY, wrong projectid etc.)`,
404: `The project was not found in our database or not assiged to your account`,
},
});
}
/**
* Creates a subcustomer
* @returns CreateSubcustomerResultClass Returns the result as ZIP File
* @returns any Returns the results as CSV File
* @throws ApiError
*/
postV2CreateSubcustomer({ customerid, requestBody, }) {
return this.httpRequest.request({
method: 'POST',
url: '/v2/CreateSubcustomer/{customerid}',
path: {
customerid: customerid,
},
body: requestBody,
mediaType: 'application/json',
errors: {
401: `The access was denied. (Wrong or expired APIKEY, wrong projectid etc.)`,
404: `The project was not found in our database or not assiged to your account`,
},
});
}
/**
* Returns all Transactions of a customer
* @returns GetTransactionsClass Returns the result as ZIP File
* @returns any Returns the results as CSV File
* @throws ApiError
*/
getV2GetCustomerTransactions({ customerid, fromdate, todate, exportOptions, }) {
return this.httpRequest.request({
method: 'GET',
url: '/v2/GetCustomerTransactions/{customerid}',
path: {
customerid: customerid,
},
query: {
fromdate: fromdate,
todate: todate,
exportOptions: exportOptions,
},
errors: {
401: `The access was denied. (Wrong or expired APIKEY, wrong projectid etc.)`,
404: `The project was not found in our database or not assiged to your account`,
},
});
}
/**
* Returns the count of mint coupons in your account
* @returns GetMintCouponBalanceResultClass Returns the GetMintCouponBalanceResultClass
* @throws ApiError
*/
getV2GetMintCouponBalance() {
return this.httpRequest.request({
method: 'GET',
url: '/v2/GetMintCouponBalance',
errors: {
401: `The access was denied. (Wrong or expired APIKEY, wrong projectid etc.)`,
},
});
}
/**
* Returns all payout wallets in your account
* @returns GetPayoutWalletsResultClass Returns the GetPayoutWalletsResultClass
* @throws ApiError
*/
getV2GetPayoutWallets() {
return this.httpRequest.request({
method: 'GET',
url: '/v2/GetPayoutWallets',
errors: {
401: `The access was denied. (Wrong or expired APIKEY, wrong projectid etc.)`,
},
});
}
/**
* Returns a list with all subcustomers
* @returns SubcustomerClass Returns the result as ZIP File
* @returns any Returns the results as CSV File
* @throws ApiError
*/
getV2GetSubcustomers({ customerid, }) {
return this.httpRequest.request({
method: 'GET',
url: '/v2/GetSubcustomers/{customerid}',
path: {
customerid: customerid,
},
errors: {
401: `The access was denied. (Wrong or expired APIKEY, wrong projectid etc.)`,
404: `The project was not found in our database or not assiged to your account`,
},
});
}
}
exports.CustomerService = CustomerService;
//# sourceMappingURL=CustomerService.js.map