-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from Ovenn-lab/feature/additional-endpoints-sup…
…port Feature/additional endpoints support
- Loading branch information
Showing
34 changed files
with
8,738 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
import { GetAccountParamsType } from '../../Modules/Ledger/types'; | ||
import { PaymentParamType } from '../../Modules/Order/types'; | ||
import { GetCurrenciesData, GetExchangeRateData, SeparatorType } from '../../Modules/Public/types'; | ||
import { RefundParamsType } from '../../Modules/Refunds/types'; | ||
export declare type BuildPathInput = { | ||
path: string; | ||
params?: GetExchangeRateData | GetCurrenciesData | PaymentParamType | SeparatorType | RefundParamsType; | ||
params?: GetExchangeRateData | GetCurrenciesData | PaymentParamType | SeparatorType | RefundParamsType | GetAccountParamsType; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { CoinGateClient } from '../../Modules/Client/CoinGate.client'; | ||
import { PaginationParams } from '../../Modules/types'; | ||
/** | ||
* Class representing a Ledger Service | ||
* @extends CoinGateClient | ||
*/ | ||
export declare class LedgerService extends CoinGateClient { | ||
/** | ||
* Retrieving a specific ledger account. | ||
* @param {string} id | ||
* @returns Account | ||
*/ | ||
getAccount(id: string): Promise<any>; | ||
/** | ||
* Retrieving all ledger accounts. | ||
* @param {PaginationParams} params page number and number of accounts per page | ||
* @returns Accounts | ||
*/ | ||
listAccounts(params?: PaginationParams): Promise<any>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.LedgerService = void 0; | ||
const CoinGate_client_1 = require("../../Modules/Client/CoinGate.client"); | ||
/** | ||
* Class representing a Ledger Service | ||
* @extends CoinGateClient | ||
*/ | ||
class LedgerService extends CoinGate_client_1.CoinGateClient { | ||
/** | ||
* Retrieving a specific ledger account. | ||
* @param {string} id | ||
* @returns Account | ||
*/ | ||
getAccount(id) { | ||
const path = this.buildPath({ | ||
path: '/v2/ledger/accounts/:id', | ||
params: { id } | ||
}); | ||
return this.get({ path }); | ||
} | ||
/** | ||
* Retrieving all ledger accounts. | ||
* @param {PaginationParams} params page number and number of accounts per page | ||
* @returns Accounts | ||
*/ | ||
listAccounts(params) { | ||
const searchParams = this.formatPaginationParams(params); | ||
return this.get({ path: '/v2/ledger/accounts', searchParams }); | ||
} | ||
} | ||
exports.LedgerService = LedgerService; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export declare type GetAccountParamsType = { | ||
id: string; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { CoinGateClient } from '../../Modules/Client/CoinGate.client'; | ||
import { PaginationParams } from '../../Modules/types'; | ||
/** | ||
* Class representing a Withdrawals Service | ||
* @extends CoinGateClient | ||
*/ | ||
export declare class WithdrawalsService extends CoinGateClient { | ||
/** | ||
* Retrieving a specific withdrawal. | ||
* @param {number} id | ||
* @returns Withdrawal | ||
*/ | ||
getWithdrawal(id: number): Promise<any>; | ||
/** | ||
* Retrieving all withdrawals | ||
* @param {PaginationParams} params page number and number of withdrawals per page | ||
* @returns Withdrawals | ||
*/ | ||
getWithdrawals(params?: PaginationParams): Promise<any>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.WithdrawalsService = void 0; | ||
const CoinGate_client_1 = require("../../Modules/Client/CoinGate.client"); | ||
/** | ||
* Class representing a Withdrawals Service | ||
* @extends CoinGateClient | ||
*/ | ||
class WithdrawalsService extends CoinGate_client_1.CoinGateClient { | ||
/** | ||
* Retrieving a specific withdrawal. | ||
* @param {number} id | ||
* @returns Withdrawal | ||
*/ | ||
getWithdrawal(id) { | ||
const path = this.buildPath({ | ||
path: '/v2/withdrawals/:id', | ||
params: { id } | ||
}); | ||
return this.get({ path }); | ||
} | ||
/** | ||
* Retrieving all withdrawals | ||
* @param {PaginationParams} params page number and number of withdrawals per page | ||
* @returns Withdrawals | ||
*/ | ||
getWithdrawals(params) { | ||
const searchParams = this.formatPaginationParams(params); | ||
return this.get({ path: '/v2/withdrawals', searchParams }); | ||
} | ||
} | ||
exports.WithdrawalsService = WithdrawalsService; |
Oops, something went wrong.