@quintype/components 3.3.3 → 3.3.4-accesstype-integration.1
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/dist/cjs/index.js
CHANGED
|
@@ -5092,7 +5092,6 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
5092
5092
|
_this.loadScript(function () {
|
|
5093
5093
|
// dont try to initialize accessType if integration id is not available
|
|
5094
5094
|
if (accessTypeBkIntegrationId === undefined) {
|
|
5095
|
-
console.warn("AccessType: Integration Id is undefined");
|
|
5096
5095
|
return false;
|
|
5097
5096
|
}
|
|
5098
5097
|
|
|
@@ -5121,7 +5120,9 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
5121
5120
|
var paymentOptions = _this.props.paymentOptions;
|
|
5122
5121
|
planObject["paymentType"] = get__default["default"](planObject.selectedPlan, ["recurring"]) ? "razorpay_recurring" : "razorpay";
|
|
5123
5122
|
|
|
5124
|
-
var paymentObject = _this.makePaymentObject(planObject)
|
|
5123
|
+
var paymentObject = _this.makePaymentObject(_objectSpread(_objectSpread({}, planObject), {}, {
|
|
5124
|
+
couponCode: selectedPlanObj.coupon_code
|
|
5125
|
+
}));
|
|
5125
5126
|
|
|
5126
5127
|
return paymentOptions.razorpay.proceed(paymentObject);
|
|
5127
5128
|
});
|
|
@@ -5546,6 +5547,7 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
5546
5547
|
initAdyenPayment: this.initAdyenPayment,
|
|
5547
5548
|
initPaytrailPayment: this.initPaytrailPayment,
|
|
5548
5549
|
checkAccess: this.checkAccess,
|
|
5550
|
+
getSubscription: this.getSubscription,
|
|
5549
5551
|
getSubscriptionForUser: this.getSubscriptionForUser,
|
|
5550
5552
|
accessUpdated: this.props.accessUpdated,
|
|
5551
5553
|
accessIsLoading: this.props.accessIsLoading,
|
|
@@ -5639,6 +5641,7 @@ var mapDispatchToProps$1 = function mapDispatchToProps(dispatch) {
|
|
|
5639
5641
|
"phone_number": "007"}} | Update the Subscriber Metadata
|
|
5640
5642
|
* validateCoupon| selectedPlan(object), couponCode (string) | Validate coupon with plan
|
|
5641
5643
|
* cancelSubscription| subscriptionId(number) | Cancel a subscription
|
|
5644
|
+
* getSubscription | -NA- | Gets the subscription groups provided by the publisher
|
|
5642
5645
|
* getSubscriptionForUser | -NA- | Gets the subscriptions of the current logged in user
|
|
5643
5646
|
* accessUpdated| accessObject(object) | Sets the current story access to redux store
|
|
5644
5647
|
* accessIsLoading| loading(boolean) | A boolean which holds true between the request for access of a story and its response
|
|
@@ -522,7 +522,6 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
522
522
|
_this.loadScript(function () {
|
|
523
523
|
// dont try to initialize accessType if integration id is not available
|
|
524
524
|
if (accessTypeBkIntegrationId === undefined) {
|
|
525
|
-
console.warn("AccessType: Integration Id is undefined");
|
|
526
525
|
return false;
|
|
527
526
|
}
|
|
528
527
|
|
|
@@ -551,7 +550,9 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
551
550
|
var paymentOptions = _this.props.paymentOptions;
|
|
552
551
|
planObject["paymentType"] = get(planObject.selectedPlan, ["recurring"]) ? "razorpay_recurring" : "razorpay";
|
|
553
552
|
|
|
554
|
-
var paymentObject = _this.makePaymentObject(planObject)
|
|
553
|
+
var paymentObject = _this.makePaymentObject(_objectSpread(_objectSpread({}, planObject), {}, {
|
|
554
|
+
couponCode: selectedPlanObj.coupon_code
|
|
555
|
+
}));
|
|
555
556
|
|
|
556
557
|
return paymentOptions.razorpay.proceed(paymentObject);
|
|
557
558
|
});
|
|
@@ -976,6 +977,7 @@ var AccessTypeBase = /*#__PURE__*/function (_React$Component) {
|
|
|
976
977
|
initAdyenPayment: this.initAdyenPayment,
|
|
977
978
|
initPaytrailPayment: this.initPaytrailPayment,
|
|
978
979
|
checkAccess: this.checkAccess,
|
|
980
|
+
getSubscription: this.getSubscription,
|
|
979
981
|
getSubscriptionForUser: this.getSubscriptionForUser,
|
|
980
982
|
accessUpdated: this.props.accessUpdated,
|
|
981
983
|
accessIsLoading: this.props.accessIsLoading,
|
|
@@ -1069,6 +1071,7 @@ var mapDispatchToProps = function mapDispatchToProps(dispatch) {
|
|
|
1069
1071
|
"phone_number": "007"}} | Update the Subscriber Metadata
|
|
1070
1072
|
* validateCoupon| selectedPlan(object), couponCode (string) | Validate coupon with plan
|
|
1071
1073
|
* cancelSubscription| subscriptionId(number) | Cancel a subscription
|
|
1074
|
+
* getSubscription | -NA- | Gets the subscription groups provided by the publisher
|
|
1072
1075
|
* getSubscriptionForUser | -NA- | Gets the subscriptions of the current logged in user
|
|
1073
1076
|
* accessUpdated| accessObject(object) | Sets the current story access to redux store
|
|
1074
1077
|
* accessIsLoading| loading(boolean) | A boolean which holds true between the request for access of a story and its response
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quintype/components",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.4-accesstype-integration.1",
|
|
4
4
|
"description": "Components to help build Quintype Node.js apps",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/es/index.js",
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"docs": "rimraf docs && jsdoc -c jsdoc.json",
|
|
103
103
|
"prepack": "npm run build",
|
|
104
104
|
"prepublishOnly": "./bin-dev-scripts/standard-version-release.sh",
|
|
105
|
-
"sync-files-to": "npx onchange --verbose --
|
|
105
|
+
"sync-files-to": "npx onchange --verbose --await-write-finish=2000 'src/**/*' -- ./bin-dev-scripts/sync-to.sh",
|
|
106
106
|
"test": "jest --config jest.config.js",
|
|
107
107
|
"test:cover": "jest --coverage --watchAll; open coverage/index.html"
|
|
108
108
|
}
|