app_manager 2.7.0 → 2.7.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b07aa041091f2f5c6acc9fc85b9ffbf6c73d7d97f0694981fb3ee261fd4d167c
4
- data.tar.gz: 3ef460faa396f6dbb9df6cb66010045975cd76b28a29e97d00b4542bb846a0c2
3
+ metadata.gz: 7097b0362f386770f66306e607f117f234a16dd33f052519bbe3ea29dd82307e
4
+ data.tar.gz: ae5401f9ba1dbb4d4e805c5b0e6d449c9edc8360a07a64a753e9453d7c011e9a
5
5
  SHA512:
6
- metadata.gz: 22f3bb93b50b5064d8db803023882e48539e9c212703b922379378e3cff63d017020b96c7cf3d2bdf3402768e4011f1ffbbd7ba823d513c3d81c9881a6f91a69
7
- data.tar.gz: 423fbd2cea4724aaeeacfc86fc6f90d15df211fc8a74a23c8e6ac2c93ff3744d27c502873d55b3beb03d3783db3492d74b26c63f2d0d940209668715bccbc8d1
6
+ metadata.gz: a09ff3472bce7bcbc051961fb79525b2167fdc5a6bbcf4daa49df6f12680b7eca65440be09833c923c15e6b0b8b186e6acfd806329b7127695d66aa9c9991cad
7
+ data.tar.gz: ebf183ea195be9e09a60a0518e838b01d6073336c0c07d4c5ff10844d3da5eb87352e34c05bd90bf6fd1553b6649b78f5186632a0039866fb8cae9aeeefb378b
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- app_manager (2.7.0)
4
+ app_manager (2.7.1)
5
5
  activerecord-import (~> 1.4)
6
6
  httparty
7
7
  kaminari (>= 0.16.3)
@@ -152,7 +152,7 @@ GEM
152
152
  prism (~> 1.5)
153
153
  multi_xml (0.9.1)
154
154
  bigdecimal (>= 3.1, < 5)
155
- net-imap (0.6.4.1)
155
+ net-imap (0.6.6)
156
156
  date
157
157
  net-protocol
158
158
  net-pop (0.1.2)
@@ -51,6 +51,13 @@ module AppManager
51
51
  rescue Exception => e
52
52
  Rollbar.error("APP MANAGER Error in Process Plan #{e.inspect}-#{e.backtrace}")
53
53
  end
54
+ unless [true, 1, '1'].include?(plan_data['public'])
55
+ begin
56
+ plan_obj.mark_custom_plan_used(params[:shop], params[:plan_id])
57
+ rescue Exception => e
58
+ Rollbar.error("APP MANAGER Error marking custom plan used #{e.inspect}-#{e.backtrace}")
59
+ end
60
+ end
54
61
  AppManager.clear_cache
55
62
  # render json: {'redirect_url' => "#{app_url}?shop=#{params[:shop]}"} and return true
56
63
  render json: {'status' => true,'plan_type' => 'free_plan'} and return true
@@ -121,6 +121,8 @@ module AppManager
121
121
  return @fs.store_local_charge(params,options)
122
122
  when 'cancel-charge'
123
123
  return @fs.store_cancel_charge(params,options)
124
+ when 'mark-custom-plan-used'
125
+ return @fs.mark_custom_plan_used_helper(params,options)
124
126
  when 'get-remaining-days'
125
127
  return @fs.get_local_remaining_days(params,options)
126
128
  when 'get-charge'
@@ -23,6 +23,10 @@ module AppManager
23
23
  post("/cancel-charge", {shop_domain: shop_domain, plan_id: plan_id})
24
24
  end
25
25
 
26
+ def mark_custom_plan_used(shop_domain, plan_id)
27
+ post("/mark-custom-plan-used", {shop_domain: shop_domain, plan_id: plan_id})
28
+ end
29
+
26
30
  def update_charge(shop_domain, plan_id)
27
31
  post("/update-charge", {shop_domain: shop_domain, plan_id: plan_id})
28
32
  end
@@ -886,6 +886,17 @@ module AppManager
886
886
  return message
887
887
  end
888
888
 
889
+ def mark_custom_plan_used_helper(params, options)
890
+ shop_domain = options[:shop_domain] || params['shop_domain'] rescue nil
891
+ plan_id = options[:plan_id] || params['plan_id'] rescue nil
892
+ return {"message" => 'fail'} if shop_domain.blank? || plan_id.blank?
893
+ return {"message" => 'success', 'updated' => false} unless AppManager::PlanUser.column_names.include?('used')
894
+
895
+ updated = AppManager::PlanUser.where(shop_domain: shop_domain, plan_id: plan_id, used: false)
896
+ .update_all(used: true, updated_at: Time.current)
897
+ {"message" => 'success', 'updated' => updated > 0}
898
+ end
899
+
889
900
  def store_discount_used(params,options)
890
901
  if options && options[:shop_domain].present? && options[:discount_id].present?
891
902
  app_id = AppManager::Discount.where(discount_id: options[:discount_id])
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AppManager
4
- VERSION = "2.7.0"
4
+ VERSION = "2.7.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: app_manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.7.0
4
+ version: 2.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rahul Tiwari @ Hulkapps
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-07-23 00:00:00.000000000 Z
11
+ date: 2026-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty