-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkalıtım.py
79 lines (56 loc) · 1.64 KB
/
kalıtım.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
class WebPush:
platform = ""
optin = False
global_Frequency_capping = ""
start_date = ""
end_date = ""
language = ""
push_type = ""
def __init__(self):
pass
def send_push(self):
print("Push Gonderildi")
class TriggerPush(WebPush):
trigger_page = ""
def __init__(self):
WebPush.__init__(self)
class BulkPush(WebPush):
send_date = 0
def __init__(self):
WebPush.__init__(self)
class SegmentPush(WebPush):
segment_name = ""
def __init__(self):
WebPush.__init__(self)
class PriceAlertPush(WebPush):
price_info = 0
discount_rate = 0
def __init__(self):
WebPush.__init__(self)
def discount_price(self, price_info, discount_rate):
self.price_info = price_info
self.discount_rate = discount_rate
return self.price_info / self.discount_rate
class InstockPush(WebPush):
stock_info = False
def __init__(self):
WebPush.__init__(self)
def stock_update(self):
self.stock_info = not self.stock_info
return self.stock_info
def main():
web_push_object = WebPush()
trigger_push_object = TriggerPush()
bulk_push_object = BulkPush
segment_push_object = SegmentPush()
price_alert_push_object = PriceAlertPush()
instock_push_object = InstockPush()
web_push_object.send_push()
discount_price = price_alert_push_object.discount_price(1000, 15)
print(discount_price)
stock_update = instock_push_object.stock_update()
print(stock_update)
stock_update = instock_push_object.stock_update()
print(stock_update)
if __name__ == '__main__':
main()