File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -65,8 +65,11 @@ export default class Bling {
6565 *
6666 * @param accessToken O token de acesso à API do Bling.
6767 */
68- constructor ( accessToken : string ) {
69- this . #repository = getRepository ( accessToken )
68+ constructor (
69+ accessToken : string ,
70+ baseUrl = 'https://api.bling.com.br/Api/v3'
71+ ) {
72+ this . #repository = getRepository ( accessToken , baseUrl )
7073 this . #modules = { }
7174 }
7275
Original file line number Diff line number Diff line change @@ -6,9 +6,12 @@ import { IBlingRepository } from '../repositories/bling.repository.interface'
66 *
77 * @returns {IBlingRepository }
88 */
9- export function getRepository ( accessToken : string ) : IBlingRepository {
9+ export function getRepository (
10+ accessToken : string ,
11+ baseUrl : string
12+ ) : IBlingRepository {
1013 return new BlingRepository ( {
11- baseUrl : 'https://api.bling.com.br/Api/v3' ,
14+ baseUrl,
1215 accessToken
1316 } )
1417}
You can’t perform that action at this time.
0 commit comments