public async getOfferingPricingPlan({
offeringId
}: GetOfferingPricingPlanOptions): Promise<GetOfferingPricingPlanResponse> {
return this.offeringClient.getPricingPlan({
offeringId: offeringId,
auth: {
asap: this.asap
}
});
}
}
let pricingPlanId;
this.getOfferingPricingPlan({
offeringId: mapItemToOfferingId(item),
}).then(res=>{
if(res.values && res.values[0] && res.values[0].key){
return pricingPlanId = res.values[0].key;
} else {
throw ("Invalid ")
}
});
console.log(pricingPlanId);
I need pricingPlanId value outside asyn function