app_manager 2.4.2 → 2.4.3

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: 4ad4341fa685d8ead7b67ced72169de1a681bab991d6b4cd31be5593744cce24
4
- data.tar.gz: b702e63ee20af249fb949d4cd980b486f465cb6933fb310fb4df1e772a2e0af2
3
+ metadata.gz: '0290bbafdb7d1f3176dc2fa2a81f2826e5ca3fad4438786347b6ad4b075e8c08'
4
+ data.tar.gz: 57f949f7c33cf5aa80d1c58fc0d5d30e9d55a91e76907ce194c59e0f846fcb01
5
5
  SHA512:
6
- metadata.gz: f728df28393203f69e4cc77616502479256ba6f1c868c456e23c596952b58911d667e5c6fec9932483ac07f95ead43edb5967e85e3c858966a6697b3a5b2f18f
7
- data.tar.gz: a2cbe8d14ef379903483f84ca425d4df234408e775fb84452cfd757bac116b84bc11c9fe70b7b08bfc50274785c73b89da0a1ae6b5a757cf25adb9bf4958a762
6
+ metadata.gz: 25811aad36f0e14134924c08563b56358910e8e47371d040adc9045d0e41fe0aaece9cb7a6346d816d5df0396c987b634e9f7cc0ea646a04fa0774b76d2d2441
7
+ data.tar.gz: 6ae46323bb5bcade4371e2142d70148e8b8dfb555e2a79ed2ac145457a42fd525087631e0df5a12cf7c83b75619fd5ece268b73b927ffce4933d4838b57c382d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- app_manager (2.4.2)
4
+ app_manager (2.4.3)
5
5
  activerecord-import (~> 1.4)
6
6
  httparty
7
7
  kaminari (>= 0.16.3)
@@ -895,56 +895,63 @@ module AppManager
895
895
  # ==========================================================
896
896
  # SHOPS RELATION
897
897
  # ==========================================================
898
-
899
- if payload["shops_relation"].present?
898
+ if payload.key?("shops_relation")
900
899
 
901
900
  AppManager::DiscountShop
902
- .where(discount_id: main_data["discount_id"])
903
- .delete_all
901
+ .where(discount_id: main_data["discount_id"])
902
+ .delete_all
904
903
 
905
- rows = Array(payload["shops_relation"]).map do |row|
906
- row = row.deep_stringify_keys
904
+ if payload["shops_relation"].present?
907
905
 
908
- {
909
- "discount_id" => main_data["discount_id"],
910
- "domain" => row["domain"]
911
- }
906
+ rows = Array(payload["shops_relation"]).map do |row|
907
+ row = row.deep_stringify_keys
908
+
909
+ {
910
+ "discount_id" => main_data["discount_id"],
911
+ "domain" => row["domain"]
912
+ }
913
+ end
914
+
915
+ AppManager::DiscountShop.insert_all(rows) if rows.present?
912
916
  end
913
917
 
914
- AppManager::DiscountShop.insert_all(rows) if rows.present?
915
918
  end
916
-
917
919
  # ==========================================================
918
920
  # PLANS RELATION
919
921
  # ==========================================================
920
922
 
921
- if payload["plans_relation"].present?
923
+ if payload.key?("plans_relation")
922
924
 
923
925
  AppManager::DiscountLinkPlan
924
926
  .where(discount_id: main_data["discount_id"])
925
927
  .delete_all
926
928
 
927
- rows = Array(payload["plans_relation"]).map do |row|
928
- row = row.deep_stringify_keys
929
+ if payload["plans_relation"].present?
929
930
 
930
- {
931
- "discount_id" => main_data["discount_id"],
932
- "plan_id" => row["plan_id"]
933
- }
931
+ rows = Array(payload["plans_relation"]).map do |row|
932
+ row = row.deep_stringify_keys
933
+
934
+ {
935
+ "discount_id" => main_data["discount_id"],
936
+ "plan_id" => row["plan_id"]
937
+ }
938
+ end
939
+
940
+ AppManager::DiscountLinkPlan.insert_all(rows) if rows.present?
934
941
  end
935
942
 
936
- AppManager::DiscountLinkPlan.insert_all(rows) if rows.present?
937
943
  end
938
-
939
944
  # ==========================================================
940
945
  # USAGE RELATION
941
946
  # ==========================================================
947
+ #
948
+ if payload.key?("usage_relation")
942
949
 
943
- if payload["usage_relation"].present?
950
+ AppManager::DiscountUsageLog
951
+ .where(discount_id: main_data["discount_id"])
952
+ .delete_all
944
953
 
945
- AppManager::DiscountUsageLog
946
- .where(discount_id: main_data["discount_id"])
947
- .delete_all
954
+ if payload["usage_relation"].present?
948
955
 
949
956
  rows = Array(payload["usage_relation"]).map do |row|
950
957
  row = row.deep_stringify_keys
@@ -961,6 +968,7 @@ module AppManager
961
968
 
962
969
  AppManager::DiscountUsageLog.insert_all(rows) if rows.present?
963
970
  end
971
+ end
964
972
 
965
973
  when "promotional-discounts-delete"
966
974
  AppManager::Discount
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AppManager
4
- VERSION = "2.4.2"
4
+ VERSION = "2.4.3"
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.4.2
4
+ version: 2.4.3
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-02-27 00:00:00.000000000 Z
11
+ date: 2026-03-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty