tango-app-api-payment-subscription 3.0.23-dev → 3.0.24-dev

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
 
2
2
 
3
3
  import { paymentSubscriptionRouter } from './src/routes/paymentSubscription.routes.js';
4
- import { paymentDoc } from './src/docs/payment.docs.js';
4
+ import { paymentDocs } from './src/docs/payment.docs.js';
5
5
 
6
- export { paymentSubscriptionRouter, paymentDoc };
6
+ export { paymentSubscriptionRouter, paymentDocs };
7
7
 
8
8
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tango-app-api-payment-subscription",
3
- "version": "3.0.23-dev",
3
+ "version": "3.0.24-dev",
4
4
  "description": "paymentSubscription",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -784,6 +784,8 @@ export const trialApproval = async ( req, res ) => {
784
784
  }
785
785
  requestData.status = 'completed';
786
786
  requestData.save().then( async () => {
787
+ req.body.clientId = requestData.clientId;
788
+ updatePricing( req, res, true );
787
789
  if ( req.body.type == 'approve' ) {
788
790
  let clientProducts = await paymentService.findOne( { clientId: requestData.clientId, status: 'active' }, { planDetails: 1 } );
789
791
  if ( clientProducts?.planDetails.subscriptionType == 'free' ) {
@@ -3,7 +3,7 @@
3
3
  import * as schema from '../dtos/validation.dtos.js';
4
4
  import j2s from 'joi-to-swagger';
5
5
 
6
- export const paymentDoc = {
6
+ export const paymentDocs = {
7
7
  '/v3/paymentSubscription/addBilling': {
8
8
  post: {
9
9
  tags: [ 'payment' ],