trex-model 1.6.1__tar.gz → 1.6.3__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.6.1 → trex_model-1.6.3}/PKG-INFO +1 -1
- {trex_model-1.6.1 → trex_model-1.6.3}/setup.py +1 -1
- {trex_model-1.6.1 → trex_model-1.6.3}/trex_model.egg-info/PKG-INFO +1 -1
- {trex_model-1.6.1 → trex_model-1.6.3}/trexmodel/models/datastore/analytic_models.py +14 -2
- {trex_model-1.6.1 → trex_model-1.6.3}/trexmodel/models/datastore/customer_models.py +1 -1
- {trex_model-1.6.1 → trex_model-1.6.3}/trexmodel/models/datastore/helper/reward_transaction_helper.py +1 -1
- {trex_model-1.6.1 → trex_model-1.6.3}/trexmodel/models/datastore/merchant_models.py +41 -8
- {trex_model-1.6.1 → trex_model-1.6.3}/trexmodel/models/datastore/ndb_models.py +8 -4
- {trex_model-1.6.1 → trex_model-1.6.3}/trexmodel/models/datastore/partnership_models.py +86 -9
- {trex_model-1.6.1 → trex_model-1.6.3}/trexmodel/models/datastore/redeem_models.py +50 -32
- {trex_model-1.6.1 → trex_model-1.6.3}/trexmodel/models/datastore/reward_models.py +10 -2
- {trex_model-1.6.1 → trex_model-1.6.3}/trexmodel/models/datastore/transaction_models.py +7 -4
- {trex_model-1.6.1 → trex_model-1.6.3}/LICENSE +0 -0
- {trex_model-1.6.1 → trex_model-1.6.3}/MANIFEST.in +0 -0
- {trex_model-1.6.1 → trex_model-1.6.3}/README.md +0 -0
- {trex_model-1.6.1 → trex_model-1.6.3}/setup.cfg +0 -0
- {trex_model-1.6.1 → trex_model-1.6.3}/trex_model.egg-info/SOURCES.txt +0 -0
- {trex_model-1.6.1 → trex_model-1.6.3}/trex_model.egg-info/dependency_links.txt +0 -0
- {trex_model-1.6.1 → trex_model-1.6.3}/trex_model.egg-info/requires.txt +0 -0
- {trex_model-1.6.1 → trex_model-1.6.3}/trex_model.egg-info/top_level.txt +0 -0
- {trex_model-1.6.1 → trex_model-1.6.3}/trexmodel/__init__.py +0 -0
- {trex_model-1.6.1 → trex_model-1.6.3}/trexmodel/conf.py +0 -0
- {trex_model-1.6.1 → trex_model-1.6.3}/trexmodel/models/__init__.py +0 -0
- {trex_model-1.6.1 → trex_model-1.6.3}/trexmodel/models/datastore/__init__.py +0 -0
- {trex_model-1.6.1 → trex_model-1.6.3}/trexmodel/models/datastore/admin_models.py +0 -0
- {trex_model-1.6.1 → trex_model-1.6.3}/trexmodel/models/datastore/app_models.py +0 -0
- {trex_model-1.6.1 → trex_model-1.6.3}/trexmodel/models/datastore/coporate_models.py +0 -0
- {trex_model-1.6.1 → trex_model-1.6.3}/trexmodel/models/datastore/customer_model_helpers.py +0 -0
- {trex_model-1.6.1 → trex_model-1.6.3}/trexmodel/models/datastore/fb_subsriber_models.py +0 -0
- {trex_model-1.6.1 → trex_model-1.6.3}/trexmodel/models/datastore/helper/__init__.py +0 -0
- {trex_model-1.6.1 → trex_model-1.6.3}/trexmodel/models/datastore/helper/reward_model_helpers.py +0 -0
- {trex_model-1.6.1 → trex_model-1.6.3}/trexmodel/models/datastore/import_models.py +0 -0
- {trex_model-1.6.1 → trex_model-1.6.3}/trexmodel/models/datastore/inventory_model.py +0 -0
- {trex_model-1.6.1 → trex_model-1.6.3}/trexmodel/models/datastore/loyalty_models.py +0 -0
- {trex_model-1.6.1 → trex_model-1.6.3}/trexmodel/models/datastore/lucky_draw_models.py +0 -0
- {trex_model-1.6.1 → trex_model-1.6.3}/trexmodel/models/datastore/marketing_models.py +0 -0
- {trex_model-1.6.1 → trex_model-1.6.3}/trexmodel/models/datastore/membership_models.py +0 -0
- {trex_model-1.6.1 → trex_model-1.6.3}/trexmodel/models/datastore/merchant_promotion_models.py +0 -0
- {trex_model-1.6.1 → trex_model-1.6.3}/trexmodel/models/datastore/message_model_helper.py +0 -0
- {trex_model-1.6.1 → trex_model-1.6.3}/trexmodel/models/datastore/message_models.py +0 -0
- {trex_model-1.6.1 → trex_model-1.6.3}/trexmodel/models/datastore/model_decorators.py +0 -0
- {trex_model-1.6.1 → trex_model-1.6.3}/trexmodel/models/datastore/pos_models.py +0 -0
- {trex_model-1.6.1 → trex_model-1.6.3}/trexmodel/models/datastore/prepaid_models.py +0 -0
- {trex_model-1.6.1 → trex_model-1.6.3}/trexmodel/models/datastore/product_models.py +0 -0
- {trex_model-1.6.1 → trex_model-1.6.3}/trexmodel/models/datastore/program_models.py +0 -0
- {trex_model-1.6.1 → trex_model-1.6.3}/trexmodel/models/datastore/rating_models.py +0 -0
- {trex_model-1.6.1 → trex_model-1.6.3}/trexmodel/models/datastore/recruit_models.py +0 -0
- {trex_model-1.6.1 → trex_model-1.6.3}/trexmodel/models/datastore/redemption_catalogue_models.py +0 -0
- {trex_model-1.6.1 → trex_model-1.6.3}/trexmodel/models/datastore/referral_program_model.py +0 -0
- {trex_model-1.6.1 → trex_model-1.6.3}/trexmodel/models/datastore/spending_base_program_model.py +0 -0
- {trex_model-1.6.1 → trex_model-1.6.3}/trexmodel/models/datastore/system_models.py +0 -0
- {trex_model-1.6.1 → trex_model-1.6.3}/trexmodel/models/datastore/task_models.py +0 -0
- {trex_model-1.6.1 → trex_model-1.6.3}/trexmodel/models/datastore/test_models.py +0 -0
- {trex_model-1.6.1 → trex_model-1.6.3}/trexmodel/models/datastore/user_models.py +0 -0
- {trex_model-1.6.1 → trex_model-1.6.3}/trexmodel/models/datastore/voucher_models.py +0 -0
- {trex_model-1.6.1 → trex_model-1.6.3}/trexmodel/models/merchant_helpers.py +0 -0
- {trex_model-1.6.1 → trex_model-1.6.3}/trexmodel/models/model_decorator.py +0 -0
- {trex_model-1.6.1 → trex_model-1.6.3}/trexmodel/models/prepaid_helpers.py +0 -0
- {trex_model-1.6.1 → trex_model-1.6.3}/trexmodel/pos_conf.py +0 -0
- {trex_model-1.6.1 → trex_model-1.6.3}/trexmodel/program_conf.py +0 -0
- {trex_model-1.6.1 → trex_model-1.6.3}/trexmodel/utils/__init__.py +0 -0
- {trex_model-1.6.1 → trex_model-1.6.3}/trexmodel/utils/gcloud/__init__.py +0 -0
- {trex_model-1.6.1 → trex_model-1.6.3}/trexmodel/utils/gcloud/datastore_util.py +0 -0
- {trex_model-1.6.1 → trex_model-1.6.3}/trexmodel/utils/model/__init__.py +0 -0
- {trex_model-1.6.1 → trex_model-1.6.3}/trexmodel/utils/model/model_util.py +0 -0
|
@@ -17,8 +17,9 @@ class UpstreamData(BaseNModel, DictModel):
|
|
|
17
17
|
stream_content = ndb.JsonProperty(required=True)
|
|
18
18
|
is_sent = ndb.BooleanProperty(required=True, default=False)
|
|
19
19
|
created_datetime = ndb.DateTimeProperty(required=True, auto_now_add=True)
|
|
20
|
+
partition_datetime = ndb.DateTimeProperty(required=False)
|
|
20
21
|
|
|
21
|
-
dict_properties = ['table_template_name', 'dataset_name', 'table_name', 'stream_content', 'is_sent']
|
|
22
|
+
dict_properties = ['table_template_name', 'dataset_name', 'table_name', 'stream_content', 'is_sent', 'partition_datetime']
|
|
22
23
|
|
|
23
24
|
@staticmethod
|
|
24
25
|
def list_not_send(offset=0, limit=model_conf.MAX_FETCH_RECORD, start_cursor=None,return_with_cursor=False, keys_only=False):
|
|
@@ -27,6 +28,12 @@ class UpstreamData(BaseNModel, DictModel):
|
|
|
27
28
|
return UpstreamData.list_all_with_condition_query(query, offset=offset, start_cursor=start_cursor, return_with_cursor=return_with_cursor, keys_only=keys_only, limit=limit)
|
|
28
29
|
|
|
29
30
|
|
|
31
|
+
@staticmethod
|
|
32
|
+
def list_all(offset=0, limit=model_conf.MAX_FETCH_RECORD, start_cursor=None,return_with_cursor=False, keys_only=False):
|
|
33
|
+
query = UpstreamData.query()
|
|
34
|
+
|
|
35
|
+
return UpstreamData.list_all_with_condition_query(query, offset=offset, start_cursor=start_cursor, return_with_cursor=return_with_cursor, keys_only=keys_only, limit=limit)
|
|
36
|
+
|
|
30
37
|
@staticmethod
|
|
31
38
|
def list_by_date_range(datetime_start, datetime_end, offset=0, limit=model_conf.MAX_FETCH_RECORD, start_cursor=None,return_with_cursor=False, keys_only=False):
|
|
32
39
|
|
|
@@ -43,6 +50,10 @@ class UpstreamData(BaseNModel, DictModel):
|
|
|
43
50
|
def count_not_sent(limit=model_conf.MAX_FETCH_RECORD):
|
|
44
51
|
return UpstreamData.query(ndb.AND(UpstreamData.is_sent==False)).count(limit = limit)
|
|
45
52
|
|
|
53
|
+
@staticmethod
|
|
54
|
+
def count_all(limit=model_conf.MAX_FETCH_RECORD):
|
|
55
|
+
return UpstreamData.query().count(limit = limit)
|
|
56
|
+
|
|
46
57
|
@staticmethod
|
|
47
58
|
def count_by_date_range(datetime_start, datetime_end, limit=model_conf.MAX_FETCH_RECORD):
|
|
48
59
|
datetime_end = datetime_end + timedelta(days=1)
|
|
@@ -53,13 +64,14 @@ class UpstreamData(BaseNModel, DictModel):
|
|
|
53
64
|
)).count(limit = limit)
|
|
54
65
|
|
|
55
66
|
@staticmethod
|
|
56
|
-
def create(merchant_acct, dataset_name, table_name, table_template_name, stream_content):
|
|
67
|
+
def create(merchant_acct, dataset_name, table_name, table_template_name, stream_content, partition_datetime=None):
|
|
57
68
|
UpstreamData(
|
|
58
69
|
merchant_acct = merchant_acct.create_ndb_key(),
|
|
59
70
|
table_template_name = table_template_name,
|
|
60
71
|
dataset_name = dataset_name,
|
|
61
72
|
table_name = table_name,
|
|
62
73
|
stream_content = stream_content,
|
|
74
|
+
partition_datetime = partition_datetime,
|
|
63
75
|
).put()
|
|
64
76
|
|
|
65
77
|
|
|
@@ -757,7 +757,7 @@ class Customer(BaseNModel, DictModel, FullTextSearchable):
|
|
|
757
757
|
def update_after_added_voucher(self, added_voucher):
|
|
758
758
|
entitled_voucher_summary = self.entitled_voucher_summary
|
|
759
759
|
update_customer_entiteld_voucher_summary_with_customer_new_voucher(entitled_voucher_summary, added_voucher)
|
|
760
|
-
self.put()
|
|
760
|
+
self.put()
|
|
761
761
|
|
|
762
762
|
class CustomerMembership(BaseNModel, DictModel):
|
|
763
763
|
'''
|
{trex_model-1.6.1 → trex_model-1.6.3}/trexmodel/models/datastore/helper/reward_transaction_helper.py
RENAMED
|
@@ -1265,7 +1265,7 @@ def update_transaction_all_entitled_reward_summary(transaction_id):
|
|
|
1265
1265
|
|
|
1266
1266
|
if vouchers_list:
|
|
1267
1267
|
logger.debug('found entitled voucher list')
|
|
1268
|
-
entiteld_voucher_brief = EntitledVoucherSummary()
|
|
1268
|
+
entiteld_voucher_brief = EntitledVoucherSummary(transaction_id=transaction_id)
|
|
1269
1269
|
|
|
1270
1270
|
for customer_voucher in vouchers_list:
|
|
1271
1271
|
merchant_voucher = customer_voucher.entitled_voucher_entity
|
|
@@ -23,8 +23,8 @@ import pytz
|
|
|
23
23
|
from trexlib.utils.common.cache_util import deleteFromCache, getFromCache,\
|
|
24
24
|
setCache
|
|
25
25
|
|
|
26
|
-
logger = logging.getLogger('model')
|
|
27
|
-
|
|
26
|
+
#logger = logging.getLogger('model')
|
|
27
|
+
logger = logging.getLogger('target_debug')
|
|
28
28
|
|
|
29
29
|
class BusinessEntity(BaseNModel, DictModel):
|
|
30
30
|
company_name = ndb.StringProperty(required=False)
|
|
@@ -81,6 +81,7 @@ class MerchantAcct(MerchantMin):
|
|
|
81
81
|
published_tier_program_configuration = ndb.JsonProperty()
|
|
82
82
|
|
|
83
83
|
approved_partner_merchant_configuration = ndb.JsonProperty()
|
|
84
|
+
partner_merchant_history_configuration = ndb.JsonProperty()
|
|
84
85
|
|
|
85
86
|
membership_configuration = ndb.JsonProperty()
|
|
86
87
|
tier_membership_configuration = ndb.JsonProperty()
|
|
@@ -115,7 +116,7 @@ class MerchantAcct(MerchantMin):
|
|
|
115
116
|
'dashboard_stat_figure', 'program_settings', 'is_tier_membership_configured', 'website',
|
|
116
117
|
'product_package', 'loyalty_package','pos_package', 'account_plan','outlet_count', 'outlet_limit',
|
|
117
118
|
'published_redemption_catalogue_configuration', 'partner_redemption_catalogue_configuration',
|
|
118
|
-
'approved_partner_merchant_configuration',
|
|
119
|
+
'approved_partner_merchant_configuration', 'partner_merchant_history_configuration',
|
|
119
120
|
'logo_public_url'
|
|
120
121
|
]
|
|
121
122
|
|
|
@@ -877,6 +878,12 @@ class MerchantAcct(MerchantMin):
|
|
|
877
878
|
def update_partner_merchant_configuration(self, partner_merchant_configuration):
|
|
878
879
|
merchant_acct_key = partner_merchant_configuration.get('merchant_acct_key')
|
|
879
880
|
|
|
881
|
+
if is_empty(self.partner_merchant_history_configuration):
|
|
882
|
+
self.partner_merchant_history_configuration = {
|
|
883
|
+
'partners':{},
|
|
884
|
+
'count':0
|
|
885
|
+
}
|
|
886
|
+
|
|
880
887
|
if is_empty(self.approved_partner_merchant_configuration):
|
|
881
888
|
self.approved_partner_merchant_configuration = {
|
|
882
889
|
'partners' :{
|
|
@@ -884,15 +891,33 @@ class MerchantAcct(MerchantMin):
|
|
|
884
891
|
},
|
|
885
892
|
'count' : 1,
|
|
886
893
|
}
|
|
894
|
+
|
|
895
|
+
self.partner_merchant_history_configuration = {
|
|
896
|
+
'partners' :{
|
|
897
|
+
merchant_acct_key : partner_merchant_configuration,
|
|
898
|
+
},
|
|
899
|
+
'count' : 1,
|
|
900
|
+
}
|
|
887
901
|
|
|
888
902
|
else:
|
|
903
|
+
|
|
889
904
|
existing_partner_merchant_dict = self.approved_partner_merchant_configuration.get('partners')
|
|
890
|
-
|
|
905
|
+
partner_merchant_history_dict = self.partner_merchant_history_configuration.get('partners')
|
|
906
|
+
partner_merchant_details = existing_partner_merchant_dict.get(merchant_acct_key)
|
|
907
|
+
|
|
891
908
|
if partner_merchant_details:
|
|
892
909
|
existing_partner_merchant_dict[merchant_acct_key] = partner_merchant_configuration
|
|
893
910
|
else:
|
|
894
911
|
existing_partner_merchant_dict[merchant_acct_key] = partner_merchant_configuration
|
|
895
|
-
|
|
912
|
+
self.approved_partner_merchant_configuration['count']+=self.approved_partner_merchant_configuration['count']
|
|
913
|
+
|
|
914
|
+
partner_merchant_details = partner_merchant_history_dict.get(merchant_acct_key)
|
|
915
|
+
if partner_merchant_details:
|
|
916
|
+
partner_merchant_history_dict[merchant_acct_key] = partner_merchant_configuration
|
|
917
|
+
else:
|
|
918
|
+
partner_merchant_history_dict[merchant_acct_key] = partner_merchant_configuration
|
|
919
|
+
|
|
920
|
+
self.partner_merchant_history_configuration['count']=len(self.partner_merchant_history_configuration['partners'])
|
|
896
921
|
|
|
897
922
|
self.put()
|
|
898
923
|
deleteFromCache(self.key_in_str)
|
|
@@ -901,9 +926,17 @@ class MerchantAcct(MerchantMin):
|
|
|
901
926
|
if self.approved_partner_merchant_configuration is not None:
|
|
902
927
|
existing_partner_merchant_dict = self.approved_partner_merchant_configuration.get('partners')
|
|
903
928
|
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
929
|
+
logger.debug('existing_partner_merchant_dict=%s', existing_partner_merchant_dict)
|
|
930
|
+
|
|
931
|
+
if existing_partner_merchant_dict:# and existing_partner_merchant_dict.get(existing_partner_merchant_dict):
|
|
932
|
+
for key in existing_partner_merchant_dict.keys():
|
|
933
|
+
logger.debug('key=%s', key)
|
|
934
|
+
if partner_merchant_acct_key in existing_partner_merchant_dict:
|
|
935
|
+
#existing_partner_merchant_dict.pop(partner_merchant_acct_key)
|
|
936
|
+
del existing_partner_merchant_dict[partner_merchant_acct_key]
|
|
937
|
+
self.approved_partner_merchant_configuration['count']-=1
|
|
938
|
+
else:
|
|
939
|
+
logger.debug('%s not found', partner_merchant_acct_key)
|
|
907
940
|
|
|
908
941
|
|
|
909
942
|
def update_approved_partner_redemption_catalogue(self, catalogue_configuration):
|
|
@@ -367,10 +367,11 @@ class BaseNModel(DictModel, NDBModel):
|
|
|
367
367
|
)
|
|
368
368
|
|
|
369
369
|
@classmethod
|
|
370
|
-
def list_all_with_condition_query(cls, query, offset=0, start_cursor=None, return_with_cursor=False,
|
|
371
|
-
|
|
370
|
+
def list_all_with_condition_query(cls, query, offset=0, start_cursor=None, return_with_cursor=False,
|
|
371
|
+
keys_only=False,limit=model_conf.MAX_FETCH_RECORD, order_by=None):
|
|
372
372
|
|
|
373
373
|
|
|
374
|
+
logger.debug('list_all: start_cursor=%s, order_by=%s, return_with_cursor=%s', start_cursor, order_by, return_with_cursor)
|
|
374
375
|
|
|
375
376
|
if start_cursor or return_with_cursor:
|
|
376
377
|
if is_not_empty(start_cursor):
|
|
@@ -379,12 +380,15 @@ class BaseNModel(DictModel, NDBModel):
|
|
|
379
380
|
else:
|
|
380
381
|
start_cursor = ndb.Cursor()
|
|
381
382
|
|
|
382
|
-
|
|
383
|
+
if order_by:
|
|
384
|
+
(search_results, next_cursor, more) = query.order(order_by).fetch_page(page_size=limit, start_cursor=start_cursor, keys_only=keys_only)
|
|
385
|
+
else:
|
|
386
|
+
(search_results, next_cursor, more) = query.fetch_page(page_size=limit, start_cursor=start_cursor, keys_only=keys_only)
|
|
383
387
|
logger.debug('##########################################')
|
|
384
|
-
|
|
385
388
|
logger.debug('list_all: results=%s', search_results)
|
|
386
389
|
logger.debug('list_all: next_cursor=%s', next_cursor)
|
|
387
390
|
logger.debug('list_all: more=%s', more)
|
|
391
|
+
logger.debug('list_all: return_with_cursor=%s', return_with_cursor)
|
|
388
392
|
|
|
389
393
|
logger.debug('##########################################')
|
|
390
394
|
|
|
@@ -9,14 +9,16 @@ from trexmodel.models.datastore.ndb_models import BaseNModel, DictModel
|
|
|
9
9
|
import logging
|
|
10
10
|
from trexmodel.models.datastore.merchant_models import MerchantAcct,\
|
|
11
11
|
MerchantUser
|
|
12
|
-
from trexconf import program_conf
|
|
13
|
-
from datetime import datetime
|
|
12
|
+
from trexconf import program_conf, conf
|
|
13
|
+
from datetime import datetime, timedelta
|
|
14
14
|
from trexlib.utils.string_util import is_not_empty
|
|
15
15
|
from trexmodel.models.datastore.redemption_catalogue_models import RedemptionCatalogue
|
|
16
16
|
from trexmodel.models.merchant_helpers import convert_points_between_merchants
|
|
17
17
|
from trexmodel.models.datastore.user_models import User
|
|
18
18
|
from trexlib.utils.common.cache_util import setCache, getFromCache,\
|
|
19
19
|
deleteFromCache
|
|
20
|
+
from trexlib.utils.common.date_util import convert_date_to_datetime
|
|
21
|
+
|
|
20
22
|
|
|
21
23
|
|
|
22
24
|
logger = logging.getLogger('target_debug')
|
|
@@ -294,7 +296,7 @@ class PartnerLinked(BaseNModel, DictModel):
|
|
|
294
296
|
if partner_merchant_account:
|
|
295
297
|
logger.debug('partner company=%s', partner_merchant_account.company_name)
|
|
296
298
|
|
|
297
|
-
partner_merchant_account.remove_partner_merchant_configuration(self.
|
|
299
|
+
partner_merchant_account.remove_partner_merchant_configuration(self.merchant_key)
|
|
298
300
|
|
|
299
301
|
for catalogue_key in self.redemption_catalogue_list:
|
|
300
302
|
partner_merchant_account.remove_partner_redeption_catalogue(catalogue_key)
|
|
@@ -322,22 +324,58 @@ class PartnershipRewardTransaction(BaseNModel, DictModel):
|
|
|
322
324
|
'''
|
|
323
325
|
This is used to record convert merchant point to partner merchant point
|
|
324
326
|
'''
|
|
325
|
-
merchant_acct
|
|
326
|
-
partner_merchant_acct
|
|
327
|
+
merchant_acct = ndb.KeyProperty(name="merchant_acct", kind=MerchantAcct)
|
|
328
|
+
partner_merchant_acct = ndb.KeyProperty(name="partner_merchant_acct", kind=MerchantAcct)
|
|
327
329
|
|
|
328
330
|
merchant_point_worth_value_in_currency = ndb.FloatProperty(required=True, default=.0)
|
|
329
331
|
partner_point_worth_value_in_currency = ndb.FloatProperty(required=True, default=.0)
|
|
330
332
|
|
|
331
|
-
transact_point_amount
|
|
332
|
-
transact_datetime
|
|
333
|
+
transact_point_amount = ndb.FloatProperty(required=True)
|
|
334
|
+
transact_datetime = ndb.DateTimeProperty(required=True, auto_now_add=True)
|
|
335
|
+
|
|
336
|
+
user_acct = ndb.KeyProperty(name="user_acct", kind=User)
|
|
337
|
+
transaction_id = ndb.StringProperty(required=True)
|
|
338
|
+
reward_summary = ndb.JsonProperty()
|
|
339
|
+
|
|
340
|
+
is_revert = ndb.BooleanProperty(required=False, default=False)
|
|
341
|
+
reverted_datetime = ndb.DateTimeProperty(required=False)
|
|
342
|
+
reverted_by = ndb.KeyProperty(name="reverted_by", kind=MerchantUser)
|
|
343
|
+
reverted_by_username = ndb.StringProperty(required=False)
|
|
344
|
+
|
|
345
|
+
dict_properties = [
|
|
346
|
+
'partner_merchant_acct_key', 'merchant_point_worth_value_in_currency', 'partner_point_worth_value_in_currency',
|
|
347
|
+
'transact_point_amount', 'transact_datetime', 'reward_summary', 'transaction_id',
|
|
348
|
+
]
|
|
349
|
+
|
|
350
|
+
@property
|
|
351
|
+
def merchant_acct_key(self):
|
|
352
|
+
return self.merchant_acct.urlsafe().decode('utf-8')
|
|
353
|
+
|
|
354
|
+
@property
|
|
355
|
+
def partner_merchant_acct_key(self):
|
|
356
|
+
return self.partner_merchant_acct.urlsafe().decode('utf-8')
|
|
357
|
+
|
|
358
|
+
@property
|
|
359
|
+
def merchant_acct_entity(self):
|
|
360
|
+
return self.merchant_acct.get()
|
|
361
|
+
|
|
362
|
+
@property
|
|
363
|
+
def partner_merchant_acct_entity(self):
|
|
364
|
+
return self.partner_merchant_acct.get()
|
|
333
365
|
|
|
334
|
-
|
|
366
|
+
@property
|
|
367
|
+
def user_acct_entity(self):
|
|
368
|
+
return self.user_acct.get()
|
|
369
|
+
|
|
370
|
+
@property
|
|
371
|
+
def user_acct_reference_code(self):
|
|
372
|
+
return self.user_acct_entity.reference_code
|
|
335
373
|
|
|
336
374
|
def convertion_rate(self)->float:
|
|
337
375
|
return self.merchant_point_worth_value_in_currency/self.partner_point_worth_value_in_currency
|
|
338
376
|
|
|
339
377
|
@staticmethod
|
|
340
|
-
def create(merchant_acct, partner_merchant_acct, user_acct, transact_point_amount):
|
|
378
|
+
def create(merchant_acct, partner_merchant_acct, user_acct, transact_point_amount, reward_summary=None):
|
|
341
379
|
merchant_artnership_settings = PartnershipSettings.get_by_merchant_acct(merchant_acct)
|
|
342
380
|
partner_partnership_settings = PartnershipSettings.get_by_merchant_acct(partner_merchant_acct)
|
|
343
381
|
|
|
@@ -353,6 +391,10 @@ class PartnershipRewardTransaction(BaseNModel, DictModel):
|
|
|
353
391
|
|
|
354
392
|
transact_point_amount = transact_point_amount,
|
|
355
393
|
user_acct = user_acct.create_ndb_key(),
|
|
394
|
+
reward_summary = {
|
|
395
|
+
'entitled_voucher_summary': reward_summary.entitled_voucher_summary,
|
|
396
|
+
},
|
|
397
|
+
transaction_id = reward_summary.transaction_id,
|
|
356
398
|
)
|
|
357
399
|
partnership_reward_transaction.put()
|
|
358
400
|
return partnership_reward_transaction
|
|
@@ -361,7 +403,42 @@ class PartnershipRewardTransaction(BaseNModel, DictModel):
|
|
|
361
403
|
raise Exception('Merchant or partner partnership settings is not enabled or created')
|
|
362
404
|
|
|
363
405
|
|
|
406
|
+
@staticmethod
|
|
407
|
+
def list_transaction_by_date(enquiry_date, merchant_acct=None, partner_merchant_acct=None, offset=0, limit=conf.PAGINATION_SIZE, return_with_cursor=False, start_cursor=None):
|
|
408
|
+
start_datetime = convert_date_to_datetime(enquiry_date)
|
|
409
|
+
end_datetime = start_datetime + timedelta(days=1)
|
|
410
|
+
query = PartnershipRewardTransaction.query(
|
|
411
|
+
ndb.AND(
|
|
412
|
+
PartnershipRewardTransaction.merchant_acct==merchant_acct.create_ndb_key(),
|
|
413
|
+
PartnershipRewardTransaction.partner_merchant_acct==partner_merchant_acct.create_ndb_key(),
|
|
414
|
+
PartnershipRewardTransaction.transact_datetime>=start_datetime,
|
|
415
|
+
PartnershipRewardTransaction.transact_datetime<end_datetime,
|
|
416
|
+
))
|
|
417
|
+
if return_with_cursor:
|
|
418
|
+
(result, next_cursor) = PartnershipRewardTransaction.list_all_with_condition_query(query, order_by=PartnershipRewardTransaction.transact_datetime, start_cursor=start_cursor, return_with_cursor=True, limit=limit)
|
|
419
|
+
|
|
420
|
+
return (result, next_cursor)
|
|
421
|
+
else:
|
|
422
|
+
return query.order(PartnershipRewardTransaction.transact_datetime).fetch(offset=offset, limit=limit)
|
|
364
423
|
|
|
365
424
|
|
|
425
|
+
@staticmethod
|
|
426
|
+
def list_merchant_partnership_reward_transaction(merchant_acct, offset=0, limit=conf.PAGINATION_SIZE, start_cursor=None, return_with_cursor=False, reverse_order=True, keys_only=False):
|
|
427
|
+
if keys_only:
|
|
428
|
+
query = PartnershipRewardTransaction.query(ndb.AND(PartnershipRewardTransaction.merchant_acct==merchant_acct.create_ndb_key()))
|
|
429
|
+
return PartnershipRewardTransaction.list_all_with_condition_query(query, offset=offset, limit=limit, keys_only=True)
|
|
430
|
+
else:
|
|
431
|
+
if reverse_order:
|
|
432
|
+
query = PartnershipRewardTransaction.query(ndb.AND(PartnershipRewardTransaction.merchant_acct==merchant_acct.create_ndb_key())).order(-PartnershipRewardTransaction.transact_datetime)
|
|
433
|
+
else:
|
|
434
|
+
query = PartnershipRewardTransaction.query(ndb.AND(PartnershipRewardTransaction.merchant_acct==merchant_acct.create_ndb_key())).order(PartnershipRewardTransaction.transact_datetime)
|
|
435
|
+
|
|
436
|
+
return PartnershipRewardTransaction.list_all_with_condition_query(query, offset=offset, limit=limit, start_cursor=start_cursor, return_with_cursor=return_with_cursor)
|
|
366
437
|
|
|
438
|
+
@staticmethod
|
|
439
|
+
def count_merchant_partnership_reward_transaction(merchant_acct, limit=conf.MAX_FETCH_RECORD):
|
|
440
|
+
query = PartnershipRewardTransaction.query(ndb.AND(PartnershipRewardTransaction.merchant_acct==merchant_acct.create_ndb_key()))
|
|
441
|
+
|
|
442
|
+
return PartnershipRewardTransaction.count_with_condition_query(query, limit=limit)
|
|
367
443
|
|
|
444
|
+
|
|
@@ -23,7 +23,7 @@ from trexmodel.models.datastore import user_models
|
|
|
23
23
|
from _ast import Is
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
logger = logging.getLogger('
|
|
26
|
+
logger = logging.getLogger('target_debug')
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
class CustomerRedeemedItemUpstream(DictModel):
|
|
@@ -77,7 +77,8 @@ class CustomerRedemption(BaseNModel, DictModel):
|
|
|
77
77
|
reverted_by = ndb.KeyProperty(name="reverted_by", kind=MerchantUser)
|
|
78
78
|
reverted_by_username = ndb.StringProperty(required=False)
|
|
79
79
|
is_allow_to_revert = ndb.BooleanProperty(required=False, default=False)
|
|
80
|
-
is_tier_program_redemption = ndb.BooleanProperty(required=False, default=False)
|
|
80
|
+
is_tier_program_redemption = ndb.BooleanProperty(required=False, default=False)
|
|
81
|
+
is_partnership_redemption = ndb.BooleanProperty(required=False, default=False)
|
|
81
82
|
tier_program_transaction_id = ndb.StringProperty(required=False)
|
|
82
83
|
|
|
83
84
|
|
|
@@ -86,7 +87,7 @@ class CustomerRedemption(BaseNModel, DictModel):
|
|
|
86
87
|
'redeemed_datetime', 'is_revert', 'allow_to_revert', 'redeemed_outlet',
|
|
87
88
|
'is_system_redemption', 'is_tier_program_redemption', 'tier_program_transaction_id',
|
|
88
89
|
'redeemed_by_username', 'reverted_datetime', 'reverted_by_username', 'prepaid_redeem_code',
|
|
89
|
-
'is_allow_to_revert',
|
|
90
|
+
'is_allow_to_revert', 'is_partnership_redemption',
|
|
90
91
|
]
|
|
91
92
|
|
|
92
93
|
@staticmethod
|
|
@@ -329,7 +330,7 @@ class CustomerRedemption(BaseNModel, DictModel):
|
|
|
329
330
|
redeemed_voucher_keys_list=None, invoice_id=None, remarks=None, prepaid_redeem_code=None,
|
|
330
331
|
redeemed_by=None, redeemed_datetime=None, redemption_catalogue_transction_summary=None,
|
|
331
332
|
is_allow_to_revert=True,
|
|
332
|
-
is_partnership_redemption=False
|
|
333
|
+
is_partnership_redemption=False,
|
|
333
334
|
):
|
|
334
335
|
|
|
335
336
|
|
|
@@ -343,10 +344,16 @@ class CustomerRedemption(BaseNModel, DictModel):
|
|
|
343
344
|
redeemed_by_username = redeemed_by.username
|
|
344
345
|
|
|
345
346
|
|
|
347
|
+
logger.info('reward_summary=%s', reward_summary)
|
|
348
|
+
|
|
346
349
|
redeem_transaction_id = transaction_id or generate_transaction_id(prefix='d')
|
|
347
350
|
|
|
351
|
+
logger.info('redeem_transaction_id=%s', redeem_transaction_id)
|
|
352
|
+
|
|
348
353
|
if redeemed_datetime is None:
|
|
349
354
|
redeemed_datetime = datetime.utcnow()
|
|
355
|
+
|
|
356
|
+
logger.info('redeemed_datetime=%s', redeemed_datetime)
|
|
350
357
|
|
|
351
358
|
redeemed_summary = {}
|
|
352
359
|
if redemption_catalogue_transction_summary is not None:
|
|
@@ -354,7 +361,7 @@ class CustomerRedemption(BaseNModel, DictModel):
|
|
|
354
361
|
|
|
355
362
|
#@model_transactional(desc='redeem reward')
|
|
356
363
|
def __start_redeem(__customer, __total_redeemed_amount, cursor, reward_cls):
|
|
357
|
-
logger.debug('__start_redeem: reward_cls=%s', reward_cls)
|
|
364
|
+
logger.debug('__start_redeem: reward_cls=%s, cursor=%s', reward_cls, cursor)
|
|
358
365
|
(result, next_cursor) = reward_cls.list_by_valid_with_cursor(__customer, limit=50, start_cursor=cursor)
|
|
359
366
|
|
|
360
367
|
logger.debug('__start_redeem: result count=%s', len(result))
|
|
@@ -368,28 +375,26 @@ class CustomerRedemption(BaseNModel, DictModel):
|
|
|
368
375
|
redeemed_amount = .0
|
|
369
376
|
reward_balance_before_redeem = r.reward_balance
|
|
370
377
|
|
|
371
|
-
logger.
|
|
372
|
-
logger.debug('__start_redeem: __total_redeemed_amount before=%s', __total_redeemed_amount)
|
|
378
|
+
logger.info('__start_redeem: reward_balance_before_redeem before=%s, __total_redeemed_amount=%s', reward_balance_before_redeem, __total_redeemed_amount)
|
|
373
379
|
|
|
374
380
|
if reward_balance_before_redeem>0:
|
|
375
381
|
|
|
376
382
|
if reward_balance_before_redeem<__total_redeemed_amount:
|
|
377
|
-
logger.
|
|
383
|
+
logger.info('__start_redeem: redeem partial amount from redeem amount')
|
|
378
384
|
redeemed_amount = reward_balance_before_redeem
|
|
379
385
|
__total_redeemed_amount -=reward_balance_before_redeem
|
|
380
386
|
r.update_used_reward_amount(reward_balance_before_redeem)
|
|
381
387
|
reward_balance_before_redeem = 0
|
|
382
388
|
|
|
383
389
|
else:
|
|
384
|
-
logger.
|
|
390
|
+
logger.info('__start_redeem: redeem remaining balance from redeem amount')
|
|
385
391
|
redeemed_amount = __total_redeemed_amount
|
|
386
392
|
r.update_used_reward_amount(__total_redeemed_amount)
|
|
387
393
|
reward_balance_before_redeem -= __total_redeemed_amount
|
|
388
394
|
__total_redeemed_amount = 0
|
|
389
395
|
|
|
390
396
|
|
|
391
|
-
logger.
|
|
392
|
-
logger.debug('__start_redeem: reward_balance_before_redeem after =%s', reward_balance_before_redeem)
|
|
397
|
+
logger.info('__start_redeem: reward_balance_before_redeem after =%s, __total_redeemed_amount=%s', reward_balance_before_redeem, __total_redeemed_amount)
|
|
393
398
|
|
|
394
399
|
transaction_id_list.append(r.transaction_id)
|
|
395
400
|
|
|
@@ -405,9 +410,10 @@ class CustomerRedemption(BaseNModel, DictModel):
|
|
|
405
410
|
else:
|
|
406
411
|
logger.debug('__start_redeem reward balance is ZERO')
|
|
407
412
|
|
|
408
|
-
|
|
413
|
+
transaction_id_list = set(transaction_id_list)
|
|
409
414
|
|
|
410
|
-
|
|
415
|
+
logger.debug('after finished reading reward, transaction_id_list=%s', transaction_id_list)
|
|
416
|
+
|
|
411
417
|
for transaction_id in transaction_id_list:
|
|
412
418
|
CustomerTransaction.update_transaction_reward_have_been_redeemed(transaction_id, redeem_transaction_id)
|
|
413
419
|
|
|
@@ -422,28 +428,37 @@ class CustomerRedemption(BaseNModel, DictModel):
|
|
|
422
428
|
no_sufficient_to_redeem = False
|
|
423
429
|
continue_checking = True
|
|
424
430
|
|
|
425
|
-
if is_partnership_redemption==False:
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
431
|
+
#if is_partnership_redemption==False:
|
|
432
|
+
while total_redeemed_amount>0 and continue_checking:
|
|
433
|
+
(total_redeemed_amount, cursor, __redeemed_reward_details_list) = __start_redeem(customer, total_redeemed_amount, cursor,
|
|
434
|
+
CustomerPointReward)
|
|
435
|
+
logger.debug('after __start_redeem total_redeemed_amount= %s, cursor=%s', total_redeemed_amount, cursor)
|
|
436
|
+
|
|
437
|
+
logger.debug('__redeemed_reward_details_list count=%d', len(__redeemed_reward_details_list))
|
|
438
|
+
|
|
439
|
+
if __redeemed_reward_details_list:
|
|
440
|
+
redeemed_reward_details_list.extend(__redeemed_reward_details_list)
|
|
432
441
|
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
if total_redeemed_amount>0 and is_empty(cursor):
|
|
442
|
+
if total_redeemed_amount>0:
|
|
443
|
+
if is_empty(cursor):
|
|
444
|
+
logger.info('total_redeemed_amount=%s and no more reward to redeem thus it is considered no sufficient reward amount to redeem', total_redeemed_amount)
|
|
437
445
|
no_sufficient_to_redeem = True
|
|
438
446
|
continue_checking = False
|
|
439
|
-
break
|
|
440
|
-
|
|
441
|
-
logger.
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
logger.
|
|
447
|
+
break
|
|
448
|
+
else:
|
|
449
|
+
logger.info('total_redeemed_amount=%s and the total redeem amount is ZERO', total_redeemed_amount)
|
|
450
|
+
continue_checking = False
|
|
451
|
+
break
|
|
452
|
+
|
|
453
|
+
|
|
454
|
+
logger.debug('continue_checking=%s, no_sufficient_to_redeem=%s', continue_checking, no_sufficient_to_redeem)
|
|
455
|
+
|
|
456
|
+
logger.info('Completed checking to redeem reward balance, no_sufficient_to_redeem=%s', no_sufficient_to_redeem)
|
|
457
|
+
|
|
458
|
+
if no_sufficient_to_redeem:
|
|
459
|
+
raise Exception('No sufficient balance to redeem')
|
|
460
|
+
#else:
|
|
461
|
+
# logger.info('This is partnership redemption')
|
|
447
462
|
|
|
448
463
|
redeemed_summary = {
|
|
449
464
|
reward_format : {
|
|
@@ -458,6 +473,8 @@ class CustomerRedemption(BaseNModel, DictModel):
|
|
|
458
473
|
reward_balance = 0
|
|
459
474
|
|
|
460
475
|
reward_summary[reward_format]['amount'] = reward_balance
|
|
476
|
+
|
|
477
|
+
logger.info('reward balance for %s = %s', reward_format, reward_balance)
|
|
461
478
|
|
|
462
479
|
elif reward_format == program_conf.REWARD_FORMAT_STAMP:
|
|
463
480
|
total_redeemed_amount = redeemed_amount
|
|
@@ -658,6 +675,7 @@ class CustomerRedemption(BaseNModel, DictModel):
|
|
|
658
675
|
|
|
659
676
|
redeemed_datetime = redeemed_datetime,
|
|
660
677
|
is_tier_program_redemption = is_tier_program_redemption,
|
|
678
|
+
is_partnership_redemption = is_partnership_redemption,
|
|
661
679
|
tier_program_transaction_id = tier_program_transaction_id,
|
|
662
680
|
is_allow_to_revert = is_allow_to_revert,
|
|
663
681
|
)
|
|
@@ -392,9 +392,11 @@ class CustomerEntitledVoucher(CustomerEntitledReward):
|
|
|
392
392
|
use_online = ndb.BooleanProperty(required=False, default=False)
|
|
393
393
|
use_in_store = ndb.BooleanProperty(required=False, default=False)
|
|
394
394
|
|
|
395
|
+
partner_merchant_acct = ndb.KeyProperty(name='partner_merchant_acct', kind=MerchantAcct)
|
|
396
|
+
|
|
395
397
|
dict_properties = [
|
|
396
398
|
'redeem_code', 'configuration', 'rewarded_datetime', 'transaction_id',
|
|
397
|
-
'status', 'is_reverted', 'is_used',
|
|
399
|
+
'status', 'is_reverted', 'is_used', 'is_partnership_voucher', 'partner_merchant_acct_key',
|
|
398
400
|
]
|
|
399
401
|
|
|
400
402
|
@property
|
|
@@ -402,6 +404,10 @@ class CustomerEntitledVoucher(CustomerEntitledReward):
|
|
|
402
404
|
if self.redeemed_by_outlet:
|
|
403
405
|
return self.redeemed_by_outlet.urlsafe().decode('utf-8')
|
|
404
406
|
|
|
407
|
+
@property
|
|
408
|
+
def partner_merchant_acct_key(self):
|
|
409
|
+
if self.partner_merchant_acct:
|
|
410
|
+
return self.partner_merchant_acct.urlsafe().decode('utf-8')
|
|
405
411
|
|
|
406
412
|
|
|
407
413
|
@staticmethod
|
|
@@ -616,7 +622,7 @@ class CustomerEntitledVoucher(CustomerEntitledReward):
|
|
|
616
622
|
effective_date=None, expiry_date=None,
|
|
617
623
|
transaction_id=None, invoice_id=None,
|
|
618
624
|
rewarded_by=None, rewarded_datetime=None,
|
|
619
|
-
program_key=None
|
|
625
|
+
program_key=None, partner_merchant_acct=None,
|
|
620
626
|
):
|
|
621
627
|
logger.debug('program_key=%s', program_key)
|
|
622
628
|
redeem_code = random_string(program_conf.REDEEM_CODE_LENGTH, is_human_mistake_safe=True)
|
|
@@ -645,6 +651,8 @@ class CustomerEntitledVoucher(CustomerEntitledReward):
|
|
|
645
651
|
|
|
646
652
|
user_acct = customer_acct.registered_user_acct.create_ndb_key(),
|
|
647
653
|
reward_program = string_to_key_property(program_key) if program_key is not None else None,
|
|
654
|
+
|
|
655
|
+
partner_merchant_acct = partner_merchant_acct.create_ndb_key() if partner_merchant_acct is not None else None
|
|
648
656
|
)
|
|
649
657
|
|
|
650
658
|
customer_entiteld_voucher.put()
|
|
@@ -202,6 +202,8 @@ class CustomerTransaction(SalesTransaction):
|
|
|
202
202
|
|
|
203
203
|
is_tier_membership_upgraded = ndb.BooleanProperty(required=False, default=False)
|
|
204
204
|
|
|
205
|
+
is_partner_transaction = ndb.BooleanProperty(required=False, default=False)
|
|
206
|
+
|
|
205
207
|
upgraded_merchant_tier_membership = ndb.KeyProperty(name="upgraded_merchant_tier_membership", kind=MerchantTierMembership)
|
|
206
208
|
|
|
207
209
|
purchased_merchant_membership = ndb.KeyProperty(name="purchased_merchant_membership", kind=MerchantMembership)
|
|
@@ -213,7 +215,7 @@ class CustomerTransaction(SalesTransaction):
|
|
|
213
215
|
'transact_datetime', 'created_datetime', 'transact_outlet_key', 'is_revert', 'reverted_datetime', 'reverted_by_username',
|
|
214
216
|
'transact_by', 'transact_by_username', 'is_reward_redeemed', 'is_sales_transaction', 'allow_to_revert',
|
|
215
217
|
'is_membership_purchase', 'purchased_merchant_membership_key', 'is_tier_membership_upgraded', 'upgraded_merchant_tier_membership_key',
|
|
216
|
-
'is_rating_review_enabled', 'promotion_code',
|
|
218
|
+
'is_rating_review_enabled', 'promotion_code', 'is_partner_transaction',
|
|
217
219
|
]
|
|
218
220
|
|
|
219
221
|
def to_transaction_details_json(self):
|
|
@@ -358,8 +360,8 @@ class CustomerTransaction(SalesTransaction):
|
|
|
358
360
|
):
|
|
359
361
|
return CustomerTransaction.create_system_transaction(customer, remarks=remarks, system_remarks=system_remarks, transact_outlet=transact_outlet, transact_by=transact_by,
|
|
360
362
|
transact_datetime=transact_datetime, reward_giveaway_method=program_conf.PROGRAM_REWARD_GIVEAWAY_METHOD_PARTNERSHIP,
|
|
361
|
-
is_sales_transaction = False, allow_to_revert=
|
|
362
|
-
is_membership_purchase=False, is_membership_renew=False,
|
|
363
|
+
is_sales_transaction = False, allow_to_revert=True,
|
|
364
|
+
is_membership_purchase=False, is_membership_renew=False, is_partner_transaction=True,
|
|
363
365
|
)
|
|
364
366
|
|
|
365
367
|
@staticmethod
|
|
@@ -406,7 +408,7 @@ class CustomerTransaction(SalesTransaction):
|
|
|
406
408
|
def create_system_transaction(customer, transact_amount=.0, tax_amount=.0, invoice_id=None, remarks=None, system_remarks=None,
|
|
407
409
|
transact_outlet=None, transact_by=None, transact_datetime=None, reward_giveaway_method=program_conf.PROGRAM_REWARD_GIVEAWAY_METHOD_SYSTEM,
|
|
408
410
|
is_sales_transaction = False, allow_to_revert=True, is_membership_purchase=False, is_membership_renew=False, purchased_customer_membership=None,
|
|
409
|
-
promotion_code=None
|
|
411
|
+
promotion_code=None, is_partner_transaction=False,
|
|
410
412
|
):
|
|
411
413
|
|
|
412
414
|
transact_by_username = None
|
|
@@ -454,6 +456,7 @@ class CustomerTransaction(SalesTransaction):
|
|
|
454
456
|
allow_to_revert = allow_to_revert,
|
|
455
457
|
is_membership_purchase = is_membership_purchase,
|
|
456
458
|
is_membership_renew = is_membership_renew,
|
|
459
|
+
is_partner_transaction = is_partner_transaction,
|
|
457
460
|
purchased_merchant_membership = purchased_customer_membership.merchant_membership_entity.create_ndb_key() if purchased_customer_membership else None,
|
|
458
461
|
purchased_customer_membership = purchased_customer_membership.create_ndb_key() if purchased_customer_membership else None,
|
|
459
462
|
promotion_code = promotion_code,
|
|
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.6.1 → trex_model-1.6.3}/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
|
{trex_model-1.6.1 → trex_model-1.6.3}/trexmodel/models/datastore/merchant_promotion_models.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
|
{trex_model-1.6.1 → trex_model-1.6.3}/trexmodel/models/datastore/redemption_catalogue_models.py
RENAMED
|
File without changes
|
|
File without changes
|
{trex_model-1.6.1 → trex_model-1.6.3}/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
|