Error endpoint
This commit is contained in:
@@ -11,7 +11,7 @@ post {
|
|||||||
}
|
}
|
||||||
|
|
||||||
body:form-urlencoded {
|
body:form-urlencoded {
|
||||||
iccid: 8933201125068890408
|
iccid: 8933201125065160414
|
||||||
offer: SAVEFAMILY1
|
offer: SAVEFAMILY1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
20
docs/sim-api/ReActivate.bru
Normal file
20
docs/sim-api/ReActivate.bru
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
meta {
|
||||||
|
name: ReActivate
|
||||||
|
type: http
|
||||||
|
seq: 13
|
||||||
|
}
|
||||||
|
|
||||||
|
post {
|
||||||
|
url: {{baseurl}}/sim/reActivate
|
||||||
|
body: formUrlEncoded
|
||||||
|
auth: inherit
|
||||||
|
}
|
||||||
|
|
||||||
|
body:form-urlencoded {
|
||||||
|
iccid: 8933201125065160380
|
||||||
|
}
|
||||||
|
|
||||||
|
settings {
|
||||||
|
encodeUrl: true
|
||||||
|
timeout: 0
|
||||||
|
}
|
||||||
@@ -141,7 +141,7 @@ export class SimController {
|
|||||||
return { iccid, compañia, offer }
|
return { iccid, compañia, offer }
|
||||||
},
|
},
|
||||||
useCase: (args) => this.simUseCases.reActivation(args),
|
useCase: (args) => this.simUseCases.reActivation(args),
|
||||||
onError: (d, e) => console.error("[x] Error activacion: ", d, e),
|
onError: (d, e) => console.error("[x] Error reactivacion: ", d, e),
|
||||||
onSuccess: console.log
|
onSuccess: console.log
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ export class SimUsecases {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async reActivation(args: { iccid: string, compañia: string, offer: string }):
|
async reActivation(args: { iccid: string, compañia: string, offer: string }):
|
||||||
Promise<Result<string, { iccid: string, message_id: string, operation: "reactivation" }>> {
|
Promise<Result<string, { iccid: string, message_id: string, operation: "reactivate" }>> {
|
||||||
const activationEvent = <SimEvents.activation>{
|
const activationEvent = <SimEvents.activation>{
|
||||||
key: `sim.${args.compañia}.reactivation`,
|
key: `sim.${args.compañia}.reactivation`,
|
||||||
payload: {
|
payload: {
|
||||||
@@ -154,7 +154,7 @@ export class SimUsecases {
|
|||||||
return {
|
return {
|
||||||
data: {
|
data: {
|
||||||
iccid: args.iccid,
|
iccid: args.iccid,
|
||||||
operation: "reactivation",
|
operation: "reactivate",
|
||||||
message_id: createdOrder.data?.correlation_id
|
message_id: createdOrder.data?.correlation_id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user