UNPKG

@dodi-smart/nuki-graphql-api

Version:
91 lines 2.48 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.AddressTokenService = void 0; class AddressTokenService { constructor(httpRequest) { this.httpRequest = httpRequest; } /** * Gives some info about address token * @param id The token id * @returns AddressTokenInfo successful operation * @throws ApiError */ getAddressToken(id) { return this.httpRequest.request({ method: 'GET', url: '/address/token/{id}', path: { 'id': id, }, errors: { 401: `Not authorized`, 404: `Token not found`, }, }); } /** * Gives an redeemed address token * @param id The token id * @returns AddressToken successful operation * @throws ApiError */ getAddressTokenRedeem(id) { return this.httpRequest.request({ method: 'GET', url: '/address/token/{id}/redeem', path: { 'id': id, }, errors: { 401: `Not authorized`, 404: `Token not found`, }, }); } /** * Redeems an address token * @param id The token id * @param email If false no email will be send * @returns void * @throws ApiError */ updateAddressTokenRedeem(id, email) { return this.httpRequest.request({ method: 'POST', url: '/address/token/{id}/redeem', path: { 'id': id, }, query: { 'email': email, }, errors: { 400: `Invalid parameter given`, 401: `Not authorized`, 404: `Token not found`, }, }); } /** * Get a list of address tokens * @param addressId The address id * @returns AddressToken successful operation * @throws ApiError */ getAddressTokens(addressId) { return this.httpRequest.request({ method: 'GET', url: '/address/{addressId}/token', path: { 'addressId': addressId, }, errors: { 400: `Bad Parameter`, 401: `Not authorized`, }, }); } } exports.AddressTokenService = AddressTokenService; //# sourceMappingURL=AddressTokenService.js.map