trex-model 1.5.15__tar.gz → 1.5.16__tar.gz
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.
Potentially problematic release.
This version of trex-model might be problematic. Click here for more details.
- {trex-model-1.5.15 → trex-model-1.5.16}/PKG-INFO +10 -5
- {trex-model-1.5.15 → trex-model-1.5.16}/setup.py +1 -1
- {trex-model-1.5.15 → trex-model-1.5.16}/trex_model.egg-info/PKG-INFO +10 -5
- {trex-model-1.5.15 → trex-model-1.5.16}/trexmodel/models/datastore/helper/reward_transaction_helper.py +9 -1
- {trex-model-1.5.15 → trex-model-1.5.16}/trexmodel/models/datastore/reward_models.py +4 -1
- {trex-model-1.5.15 → trex-model-1.5.16}/LICENSE +0 -0
- {trex-model-1.5.15 → trex-model-1.5.16}/MANIFEST.in +0 -0
- {trex-model-1.5.15 → trex-model-1.5.16}/README.md +0 -0
- {trex-model-1.5.15 → trex-model-1.5.16}/setup.cfg +0 -0
- {trex-model-1.5.15 → trex-model-1.5.16}/trex_model.egg-info/SOURCES.txt +0 -0
- {trex-model-1.5.15 → trex-model-1.5.16}/trex_model.egg-info/dependency_links.txt +0 -0
- {trex-model-1.5.15 → trex-model-1.5.16}/trex_model.egg-info/requires.txt +0 -0
- {trex-model-1.5.15 → trex-model-1.5.16}/trex_model.egg-info/top_level.txt +0 -0
- {trex-model-1.5.15 → trex-model-1.5.16}/trexmodel/__init__.py +0 -0
- {trex-model-1.5.15 → trex-model-1.5.16}/trexmodel/conf.py +0 -0
- {trex-model-1.5.15 → trex-model-1.5.16}/trexmodel/models/__init__.py +0 -0
- {trex-model-1.5.15 → trex-model-1.5.16}/trexmodel/models/datastore/__init__.py +0 -0
- {trex-model-1.5.15 → trex-model-1.5.16}/trexmodel/models/datastore/admin_models.py +0 -0
- {trex-model-1.5.15 → trex-model-1.5.16}/trexmodel/models/datastore/analytic_models.py +0 -0
- {trex-model-1.5.15 → trex-model-1.5.16}/trexmodel/models/datastore/app_models.py +0 -0
- {trex-model-1.5.15 → trex-model-1.5.16}/trexmodel/models/datastore/coporate_models.py +0 -0
- {trex-model-1.5.15 → trex-model-1.5.16}/trexmodel/models/datastore/customer_model_helpers.py +0 -0
- {trex-model-1.5.15 → trex-model-1.5.16}/trexmodel/models/datastore/customer_models.py +0 -0
- {trex-model-1.5.15 → trex-model-1.5.16}/trexmodel/models/datastore/fb_subsriber_models.py +0 -0
- {trex-model-1.5.15 → trex-model-1.5.16}/trexmodel/models/datastore/helper/__init__.py +0 -0
- {trex-model-1.5.15 → trex-model-1.5.16}/trexmodel/models/datastore/helper/reward_model_helpers.py +0 -0
- {trex-model-1.5.15 → trex-model-1.5.16}/trexmodel/models/datastore/import_models.py +0 -0
- {trex-model-1.5.15 → trex-model-1.5.16}/trexmodel/models/datastore/inventory_model.py +0 -0
- {trex-model-1.5.15 → trex-model-1.5.16}/trexmodel/models/datastore/loyalty_models.py +0 -0
- {trex-model-1.5.15 → trex-model-1.5.16}/trexmodel/models/datastore/lucky_draw_models.py +0 -0
- {trex-model-1.5.15 → trex-model-1.5.16}/trexmodel/models/datastore/marketing_models.py +0 -0
- {trex-model-1.5.15 → trex-model-1.5.16}/trexmodel/models/datastore/membership_models.py +0 -0
- {trex-model-1.5.15 → trex-model-1.5.16}/trexmodel/models/datastore/merchant_models.py +0 -0
- {trex-model-1.5.15 → trex-model-1.5.16}/trexmodel/models/datastore/message_model_helper.py +0 -0
- {trex-model-1.5.15 → trex-model-1.5.16}/trexmodel/models/datastore/message_models.py +0 -0
- {trex-model-1.5.15 → trex-model-1.5.16}/trexmodel/models/datastore/model_decorators.py +0 -0
- {trex-model-1.5.15 → trex-model-1.5.16}/trexmodel/models/datastore/ndb_models.py +0 -0
- {trex-model-1.5.15 → trex-model-1.5.16}/trexmodel/models/datastore/pos_models.py +0 -0
- {trex-model-1.5.15 → trex-model-1.5.16}/trexmodel/models/datastore/prepaid_models.py +0 -0
- {trex-model-1.5.15 → trex-model-1.5.16}/trexmodel/models/datastore/product_models.py +0 -0
- {trex-model-1.5.15 → trex-model-1.5.16}/trexmodel/models/datastore/program_models.py +0 -0
- {trex-model-1.5.15 → trex-model-1.5.16}/trexmodel/models/datastore/rating_models.py +0 -0
- {trex-model-1.5.15 → trex-model-1.5.16}/trexmodel/models/datastore/recruit_models.py +0 -0
- {trex-model-1.5.15 → trex-model-1.5.16}/trexmodel/models/datastore/redeem_models.py +0 -0
- {trex-model-1.5.15 → trex-model-1.5.16}/trexmodel/models/datastore/redemption_catalogue_models.py +0 -0
- {trex-model-1.5.15 → trex-model-1.5.16}/trexmodel/models/datastore/referral_program_model.py +0 -0
- {trex-model-1.5.15 → trex-model-1.5.16}/trexmodel/models/datastore/spending_base_program_model.py +0 -0
- {trex-model-1.5.15 → trex-model-1.5.16}/trexmodel/models/datastore/system_models.py +0 -0
- {trex-model-1.5.15 → trex-model-1.5.16}/trexmodel/models/datastore/task_models.py +0 -0
- {trex-model-1.5.15 → trex-model-1.5.16}/trexmodel/models/datastore/test_models.py +0 -0
- {trex-model-1.5.15 → trex-model-1.5.16}/trexmodel/models/datastore/transaction_models.py +0 -0
- {trex-model-1.5.15 → trex-model-1.5.16}/trexmodel/models/datastore/user_models.py +0 -0
- {trex-model-1.5.15 → trex-model-1.5.16}/trexmodel/models/datastore/voucher_models.py +0 -0
- {trex-model-1.5.15 → trex-model-1.5.16}/trexmodel/models/merchant_helpers.py +0 -0
- {trex-model-1.5.15 → trex-model-1.5.16}/trexmodel/models/model_decorator.py +0 -0
- {trex-model-1.5.15 → trex-model-1.5.16}/trexmodel/models/prepaid_helpers.py +0 -0
- {trex-model-1.5.15 → trex-model-1.5.16}/trexmodel/pos_conf.py +0 -0
- {trex-model-1.5.15 → trex-model-1.5.16}/trexmodel/program_conf.py +0 -0
- {trex-model-1.5.15 → trex-model-1.5.16}/trexmodel/utils/__init__.py +0 -0
- {trex-model-1.5.15 → trex-model-1.5.16}/trexmodel/utils/gcloud/__init__.py +0 -0
- {trex-model-1.5.15 → trex-model-1.5.16}/trexmodel/utils/gcloud/datastore_util.py +0 -0
- {trex-model-1.5.15 → trex-model-1.5.16}/trexmodel/utils/model/__init__.py +0 -0
- {trex-model-1.5.15 → trex-model-1.5.16}/trexmodel/utils/model/model_util.py +0 -0
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: trex-model
|
|
3
|
-
Version: 1.5.
|
|
3
|
+
Version: 1.5.16
|
|
4
4
|
Summary: TRex database module package
|
|
5
5
|
Home-page: https://bitbucket.org/lokjac/trex-model
|
|
6
6
|
Author: Jack Lok
|
|
7
7
|
Author-email: sglok77@gmail.com
|
|
8
|
-
License: UNKNOWN
|
|
9
|
-
Description: This is database modelusing google datastore mode module
|
|
10
|
-
|
|
11
|
-
Platform: UNKNOWN
|
|
12
8
|
Classifier: Programming Language :: Python :: 3
|
|
13
9
|
Classifier: License :: OSI Approved :: MIT License
|
|
14
10
|
Classifier: Operating System :: OS Independent
|
|
15
11
|
Description-Content-Type: text/markdown
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Requires-Dist: google-cloud-firestore
|
|
14
|
+
Requires-Dist: google_cloud_datastore
|
|
15
|
+
Requires-Dist: google-cloud-ndb
|
|
16
|
+
Requires-Dist: six
|
|
17
|
+
Requires-Dist: trex-lib
|
|
18
|
+
Requires-Dist: flask-login==0.6.2
|
|
19
|
+
|
|
20
|
+
This is database modelusing google datastore mode module
|
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: trex-model
|
|
3
|
-
Version: 1.5.
|
|
3
|
+
Version: 1.5.16
|
|
4
4
|
Summary: TRex database module package
|
|
5
5
|
Home-page: https://bitbucket.org/lokjac/trex-model
|
|
6
6
|
Author: Jack Lok
|
|
7
7
|
Author-email: sglok77@gmail.com
|
|
8
|
-
License: UNKNOWN
|
|
9
|
-
Description: This is database modelusing google datastore mode module
|
|
10
|
-
|
|
11
|
-
Platform: UNKNOWN
|
|
12
8
|
Classifier: Programming Language :: Python :: 3
|
|
13
9
|
Classifier: License :: OSI Approved :: MIT License
|
|
14
10
|
Classifier: Operating System :: OS Independent
|
|
15
11
|
Description-Content-Type: text/markdown
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Requires-Dist: google-cloud-firestore
|
|
14
|
+
Requires-Dist: google_cloud_datastore
|
|
15
|
+
Requires-Dist: google-cloud-ndb
|
|
16
|
+
Requires-Dist: six
|
|
17
|
+
Requires-Dist: trex-lib
|
|
18
|
+
Requires-Dist: flask-login==0.6.2
|
|
19
|
+
|
|
20
|
+
This is database modelusing google datastore mode module
|
|
@@ -24,7 +24,9 @@ from trexanalytics.bigquery_upstream_data_config import create_merchant_customer
|
|
|
24
24
|
create_merchant_customer_redemption_upstream_for_merchant,\
|
|
25
25
|
create_merchant_customer_prepaid_upstream_for_merchant,\
|
|
26
26
|
create_merchant_customer_redemption_reverted_upstream_for_merchant,\
|
|
27
|
-
create_revert_entitled_customer_voucher_upstream_for_merchant
|
|
27
|
+
create_revert_entitled_customer_voucher_upstream_for_merchant,\
|
|
28
|
+
create_entitled_customer_voucher_upstream_for_merchant,\
|
|
29
|
+
create_redeemed_customer_voucher_to_upstream_for_merchant
|
|
28
30
|
from trexmodel.models.datastore.membership_models import MerchantTierMembership
|
|
29
31
|
from trexmodel.models.datastore.transaction_models import CustomerTransaction,\
|
|
30
32
|
SalesTransaction
|
|
@@ -695,6 +697,12 @@ def redeem_reward_transaction(customer, redeem_outlet=None, reward_format=None,
|
|
|
695
697
|
if customer_redemption:
|
|
696
698
|
create_redemption_message(customer_redemption)
|
|
697
699
|
create_merchant_customer_redemption_upstream_for_merchant(customer_redemption, streamed_datetime=redeemed_datetime)
|
|
700
|
+
if reward_format == program_conf.REWARD_FORMAT_VOUCHER:
|
|
701
|
+
for voucher_key in redeemed_voucher_keys_list:
|
|
702
|
+
customer_voucher = CustomerEntitledVoucher.fetch(voucher_key)
|
|
703
|
+
if customer_voucher:
|
|
704
|
+
create_redeemed_customer_voucher_to_upstream_for_merchant(customer_voucher)
|
|
705
|
+
|
|
698
706
|
|
|
699
707
|
return customer_redemption
|
|
700
708
|
|
|
@@ -560,7 +560,9 @@ class CustomerEntitledVoucher(CustomerEntitledReward):
|
|
|
560
560
|
def create(merchant_voucher, customer_acct, transact_outlet=None,
|
|
561
561
|
effective_date=None, expiry_date=None,
|
|
562
562
|
transaction_id=None, invoice_id=None,
|
|
563
|
-
rewarded_by=None, rewarded_datetime=None
|
|
563
|
+
rewarded_by=None, rewarded_datetime=None,
|
|
564
|
+
program_key=None
|
|
565
|
+
):
|
|
564
566
|
|
|
565
567
|
redeem_code = random_string(program_conf.REDEEM_CODE_LENGTH, is_human_mistake_safe=True)
|
|
566
568
|
|
|
@@ -587,6 +589,7 @@ class CustomerEntitledVoucher(CustomerEntitledReward):
|
|
|
587
589
|
rewarded_datetime = rewarded_datetime,
|
|
588
590
|
|
|
589
591
|
user_acct = customer_acct.registered_user_acct.create_ndb_key(),
|
|
592
|
+
reward_program = string_to_key_property(program_key),
|
|
590
593
|
)
|
|
591
594
|
|
|
592
595
|
customer_entiteld_voucher.put()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{trex-model-1.5.15 → trex-model-1.5.16}/trexmodel/models/datastore/customer_model_helpers.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{trex-model-1.5.15 → trex-model-1.5.16}/trexmodel/models/datastore/helper/reward_model_helpers.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{trex-model-1.5.15 → trex-model-1.5.16}/trexmodel/models/datastore/redemption_catalogue_models.py
RENAMED
|
File without changes
|
{trex-model-1.5.15 → trex-model-1.5.16}/trexmodel/models/datastore/referral_program_model.py
RENAMED
|
File without changes
|
{trex-model-1.5.15 → trex-model-1.5.16}/trexmodel/models/datastore/spending_base_program_model.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|