File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -133,9 +133,8 @@ export class Order {
133
133
* @throws { PrintOneError } If the order could not be refreshed.
134
134
*/
135
135
public async refresh ( ) : Promise < void > {
136
- const urlPrefix = this . batchId ? `batches/${ this . batchId } /` : "" ;
137
136
this . _data = await this . _protected . client . GET < IOrder > (
138
- `${ urlPrefix } orders/${ this . id } ` ,
137
+ `${ this . urlPrefix } orders/${ this . id } ` ,
139
138
) ;
140
139
}
141
140
@@ -179,10 +178,13 @@ export class Order {
179
178
time ++ ;
180
179
}
181
180
182
- const urlPrefix = this . batchId ? `batches/${ this . batchId } /` : "" ;
183
181
this . _data = await this . _protected . client . POST < IOrder > (
184
- `${ urlPrefix } orders/${ this . id } /cancel` ,
182
+ `${ this . urlPrefix } orders/${ this . id } /cancel` ,
185
183
{ } ,
186
184
) ;
187
185
}
186
+
187
+ protected get urlPrefix ( ) : string {
188
+ return this . batchId ? `batches/${ this . batchId } /` : "" ; ;
189
+ }
188
190
}
You can’t perform that action at this time.
0 commit comments