app_manager 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/app_manager/graphql_helper.rb +6 -4
- data/lib/app_manager/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 847c25a0c23c17f00ef12346b0082f9859f9a4710d349588e9184e3d82bb0f8e
|
4
|
+
data.tar.gz: '086bcb9fea905bc8f16deadbe0ae1aedc749aa37d8921ce892ed97ffa422d761'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f8efcec332bf8cda8d8c0b25c02103eb519579bdd7617987258d32da06243e487c272ed6258ca992f27cb8e40c3b75b50f0a7698914b37e53c5f3dd8d734493f
|
7
|
+
data.tar.gz: 61aab970d09abb2d8c1b8032249cfce44ca42255740e49033eeb12cbfc9e4677ea62d3e7f55577bc7ffe84fd412efe0fe9af64cb1dc5373a273e6638e120d851
|
data/Gemfile.lock
CHANGED
@@ -71,14 +71,15 @@ module AppManager
|
|
71
71
|
end
|
72
72
|
|
73
73
|
discount_type = plan['discount_type'] || "percentage"
|
74
|
-
discount_val = discount_type == "percentage" ? (plan['discount'].to_f/ 100) : plan['discount']
|
75
|
-
plan_discount = plan['discount'] ? { "durationLimitInIntervals" => (plan['discount_interval'] || nil), "value" => {"#{discount_type}" => discount_val} } : {}
|
74
|
+
discount_val = discount_type == "percentage" ? (plan['discount'].to_f/ 100) : "#{plan['discount']}"
|
75
|
+
plan_discount = plan['discount'] ? { "discount" => { "durationLimitInIntervals" => (plan['discount_interval'] || nil), "value" => {"#{discount_type}" => discount_val} } } : {}
|
76
76
|
|
77
77
|
price_details = {
|
78
78
|
"price": { "amount": plan['price'], "currencyCode": 'USD' },
|
79
79
|
"interval": plan['interval']['value']
|
80
80
|
}
|
81
|
-
price_details
|
81
|
+
price_details.merge! plan_discount if plan_discount.any?
|
82
|
+
|
82
83
|
|
83
84
|
query = 'mutation(
|
84
85
|
$name: String!,
|
@@ -112,10 +113,11 @@ module AppManager
|
|
112
113
|
"test": plan_test,
|
113
114
|
"lineItems": [{
|
114
115
|
"plan": {
|
115
|
-
"appRecurringPricingDetails":
|
116
|
+
"appRecurringPricingDetails": price_details
|
116
117
|
}
|
117
118
|
}]
|
118
119
|
}
|
120
|
+
|
119
121
|
data = run_graph_api(query,variables)
|
120
122
|
return data
|
121
123
|
end
|
data/lib/app_manager/version.rb
CHANGED