app_manager 1.0.1 → 1.0.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8e6965769520fe875a92f79820bd1288c4d46166b3527d3a6a4417d65b530510
4
- data.tar.gz: e84cdb37ae65da5f86e86630b1892ba335939ff46e61309965c7c12a4974c51d
3
+ metadata.gz: 847c25a0c23c17f00ef12346b0082f9859f9a4710d349588e9184e3d82bb0f8e
4
+ data.tar.gz: '086bcb9fea905bc8f16deadbe0ae1aedc749aa37d8921ce892ed97ffa422d761'
5
5
  SHA512:
6
- metadata.gz: f1241ef8b8d0bc7c754f0df7647d3c2402eef5eddbba89f6360844c73cdff81c79ec962bd6322aa8a265fcff07c8296abad3ea5034032eb5c2799262a2b39ad4
7
- data.tar.gz: 43097bc92bad6bb5b7cc43c918b869d565f9bbc2c795312ec15933a71494673c00f79378f2c0e1afbc2cacc75020c05141375b4dec6a77518fb6106fb55318fc
6
+ metadata.gz: f8efcec332bf8cda8d8c0b25c02103eb519579bdd7617987258d32da06243e487c272ed6258ca992f27cb8e40c3b75b50f0a7698914b37e53c5f3dd8d734493f
7
+ data.tar.gz: 61aab970d09abb2d8c1b8032249cfce44ca42255740e49033eeb12cbfc9e4677ea62d3e7f55577bc7ffe84fd412efe0fe9af64cb1dc5373a273e6638e120d851
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- app_manager (1.0.1)
4
+ app_manager (1.0.2)
5
5
  httparty
6
6
  kaminari (>= 0.16.3)
7
7
  rails (>= 5.2.0)
@@ -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 << plan_discount if plan_discount.any?
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": price_details
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AppManager
4
- VERSION = "1.0.1"
4
+ VERSION = "1.0.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: app_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hulkapps