Skip to content

Commit 070311c

Browse files
committed
update 0710
1 parent 08e82ad commit 070311c

13 files changed

+344
-30
lines changed

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# Changelog
22

33

4-
## 1.4.4 - 2024-04-10
4+
## 1.4.6 - 2024-07-10
5+
- update 0710
6+
7+
## 1.4.5 - 2024-04-10
58
- pay/createPaymentSession支付接口支持订阅支付能力
69

710

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
```
22
Language:Python
33
Python version:2.7+
4-
Releass ^1.4.5
4+
Releass ^1.4.6
55
Copyright:Ant financial services group
66
```
77

com/alipay/ams/api/model/antom_path_constants.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ class AntomPathConstants(Enum):
3333
DOWNLOAD_DISPUTE_EVIDENCE_PATH = "/ams/api/v1/payments/downloadDisputeEvidence"
3434

3535
REFUND_PATH = "/ams/api/v1/payments/refund"
36+
RETRIEVE_PATH = "/ams/api//v1/payments/retrievePaymentSession";
37+
3638
INQUIRY_REFUND_PATH = "/ams/api/v1/payments/inquiryRefund"
3739

3840
DECLARE_PATH = "/ams/api/v1/customs/declare"
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
from com.alipay.ams.api.model.delivery_estimate_info import DeliveryEstimateInfo
2+
3+
4+
class DeliveryEstimate(object):
5+
def __init__(self):
6+
self.__minimum = None #type: DeliveryEstimateInfo
7+
self.__maximum = None #type: DeliveryEstimateInfo
8+
9+
10+
@property
11+
def minimum(self):
12+
return self.__minimum
13+
14+
@minimum.setter
15+
def minimum(self, value):
16+
self.__minimum = value
17+
18+
19+
@property
20+
def maximum(self):
21+
return self.__maximum
22+
23+
@maximum.setter
24+
def maximum(self, value):
25+
self.__maximum = value
26+
27+
28+
def to_ams_dict(self):
29+
params = dict()
30+
if self.minimum is not None:
31+
params['minimum'] = self.minimum.to_ams_dict()
32+
if self.maximum is not None:
33+
params['maximum'] = self.maximum.to_ams_dict()
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
2+
3+
4+
class DeliveryEstimateInfo(object):
5+
def __init__(self):
6+
self.__unit = None
7+
self.__value = None
8+
9+
@property
10+
def unit(self):
11+
return self.__unit
12+
13+
@unit.setter
14+
def unit(self, value):
15+
self.__unit = value
16+
17+
@property
18+
def value(self):
19+
return self.__value
20+
21+
@value.setter
22+
def value(self, value):
23+
self.__value = value
24+
25+
26+
def to_ams_dict(self):
27+
params = dict()
28+
if self.unit is not None:
29+
params['unit'] = self.unit
30+
if self.value is not None:
31+
params['value'] = self.value
32+
return params

com/alipay/ams/api/model/discount.py

Lines changed: 63 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -6,71 +6,108 @@
66
class Discount(object):
77

88
def __init__(self):
9-
self.discountTag = None
10-
self.discountName = None
11-
self.savingsAmount = None # type: Amount
12-
self.estimateSavingsAmount = None # type: Amount
9+
self.__discount_tag = None
10+
self.__discount_name = None
11+
self.__savings_amount = None # type: Amount
12+
self.__estimate_savings_amount = None # type: Amount
13+
self.__promotion_code = None
1314

1415
@property
15-
def discountTag(self):
16-
return self.__discountTag
16+
def discount_tag(self):
17+
return self.__discount_tag
1718

18-
@discountTag.setter
19-
def discountTag(self, value):
20-
self.__discountTag = value
19+
@discount_tag.setter
20+
def discount_tag(self, value):
21+
self.__discount_tag = value
2122

2223
@property
23-
def discountName(self):
24-
return self.__discountName
24+
def discount_name(self):
25+
return self.__discount_name
2526

26-
@discountName.setter
27-
def discountName(self, value):
28-
self.__discountName = value
27+
@discount_name.setter
28+
def discount_name(self, value):
29+
self.__discount_name = value
30+
31+
@property
32+
def savings_amount(self):
33+
return self.__savings_amount
34+
35+
@savings_amount.setter
36+
def savings_amount(self, value):
37+
self.__savings_amount = value
38+
39+
@property
40+
def estimate_savings_amount(self):
41+
return self.__estimate_savings_amount
42+
43+
@estimate_savings_amount.setter
44+
def estimate_savings_amount(self, value):
45+
self.__estimate_savings_amount = value
46+
47+
@property
48+
def promotion_code(self):
49+
return self.__promotion_code
50+
51+
@promotion_code.setter
52+
def promotion_code(self, value):
53+
self.__promotion_code = value
2954

3055
@property
3156
def savingsAmount(self):
32-
return self.__savingsAmount
57+
return self.__savings_amount
3358

3459
@savingsAmount.setter
3560
def savingsAmount(self, value):
36-
self.__savingsAmount = value
61+
self.__savings_amount = value
3762

3863
@property
3964
def estimateSavingsAmount(self):
40-
return self.__estimateSavingsAmount
65+
return self.__estimate_savings_amount
4166

4267
@estimateSavingsAmount.setter
4368
def estimateSavingsAmount(self, value):
44-
self.__estimateSavingsAmount = value
69+
self.__estimate_savings_amount = value
70+
71+
@property
72+
def promotionCode(self):
73+
return self.__promotion_code
74+
75+
@promotionCode.setter
76+
def promotionCode(self, value):
77+
self.__promotion_code = value
4578

4679
def to_ams_dict(self):
4780
params = dict()
4881
if self.discountTag is not None:
49-
params['discountTag'] = self.discountTag
82+
params['discountTag'] = self.discount_tag
5083
if self.discountName is not None:
51-
params['discountName'] = self.discountName
84+
params['discountName'] = self.discount_name
5285
if self.savingsAmount is not None:
53-
params['savingsAmount'] = self.savingsAmount.to_ams_dict()
86+
params['savingsAmount'] = self.savings_amount.to_ams_dict()
5487
if self.estimateSavingsAmount is not None:
55-
params['estimateSavingsAmount'] = self.estimateSavingsAmount.to_ams_dict()
88+
params['estimateSavingsAmount'] = self.estimate_savings_amount.to_ams_dict()
89+
if self.promotionCode is not None:
90+
params['promotionCode'] = self.promotion_code
5691
return params
5792

5893
def parse_rsp_body(self, discount_body):
5994
if type(discount_body) == str:
6095
discount_body = json.loads(discount_body)
6196

6297
if 'discountTag' in discount_body:
63-
self.discountTag = discount_body['discountTag']
98+
self.discount_tag = discount_body['discountTag']
6499

65100
if 'discountName' in discount_body:
66-
self.discountName = discount_body['discountName']
101+
self.discount_name = discount_body['discountName']
67102

68103
if 'savingsAmount' in discount_body:
69104
payment_amount = Amount()
70105
payment_amount.parse_rsp_body(discount_body['savingsAmount'])
71-
self.__savingsAmount = payment_amount
106+
self.savings_amount = payment_amount
72107

73108
if 'estimateSavingsAmount' in discount_body:
74109
payment_amount = Amount()
75110
payment_amount.parse_rsp_body(discount_body['estimateSavingsAmount'])
76-
self.__estimateSavingsAmount = payment_amount
111+
self.estimate_savings_amount = payment_amount
112+
if 'promotionCode' in discount_body:
113+
self.promotion_code = discount_body['promotionCode']

com/alipay/ams/api/model/goods.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ def __init__(self):
1717
self.__goods_url = None
1818
self.__goods_image_url = None
1919
self.__price_id = None
20+
self.__goods_discount_amount = None # type:Amount
21+
self.__cross_sell = None # type:Goods
2022

2123
@property
2224
def reference_goods_id(self):
@@ -106,6 +108,23 @@ def price_id(self):
106108
def price_id(self, value):
107109
self.__price_id = value
108110

111+
@property
112+
def goods_discount_amount(self):
113+
return self.__goods_discount_amount
114+
115+
@goods_discount_amount.setter
116+
def goods_discount_amount(self, value):
117+
self.__goods_discount_amount = value
118+
119+
@property
120+
def cross_sell(self):
121+
return self.__cross_sell
122+
123+
@cross_sell.setter
124+
def cross_sell(self, value):
125+
self.__cross_sell = value
126+
127+
109128
def to_ams_dict(self):
110129
params = dict()
111130
if hasattr(self, "reference_goods_id") and self.reference_goods_id:
@@ -141,4 +160,9 @@ def to_ams_dict(self):
141160
if hasattr(self, "price_id") and self.price_id:
142161
params['priceId'] = self.price_id
143162

163+
if hasattr(self, "goods_discount_amount") and self.goods_discount_amount:
164+
params['goodsDiscountAmount'] = self.goods_discount_amount
165+
if hasattr(self, "cross_sell") and self.cross_sell:
166+
params['crossSell'] = self.cross_sell
167+
144168
return params

com/alipay/ams/api/model/order.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
3+
from com.alipay.ams.api.model.amount import Amount
34
from com.alipay.ams.api.model.buyer import Buyer
45
from com.alipay.ams.api.model.env import Env
56
from com.alipay.ams.api.model.gaming import Gaming
@@ -27,6 +28,8 @@ def __init__(self):
2728
self.__gaming = None # type: Gaming
2829
self.__order_created_time = None
2930
self.__need_declaration = None
31+
self.__order_discount_amount = None # type: Amount
32+
self.__sub_total_order_amount = None # type: Amount
3033

3134
@property
3235
def reference_order_id(self):
@@ -139,6 +142,23 @@ def need_declaration(self):
139142
def need_declaration(self, value):
140143
self.__need_declaration = value
141144

145+
@property
146+
def order_discount_amount(self):
147+
return self.__order_discount_amount
148+
149+
@order_discount_amount.setter
150+
def order_discount_amount(self, value):
151+
self.__order_discount_amount = value
152+
153+
154+
@property
155+
def sub_total_order_amount(self):
156+
return self.__sub_total_order_amount
157+
158+
@sub_total_order_amount.setter
159+
def sub_total_order_amount(self, value):
160+
self.__sub_total_order_amount = value
161+
142162
def to_ams_dict(self):
143163
params = dict()
144164
if hasattr(self, "reference_order_id") and self.reference_order_id:
@@ -183,4 +203,10 @@ def to_ams_dict(self):
183203
if hasattr(self, "need_declaration") and self.need_declaration:
184204
params['needDeclaration'] = self.need_declaration
185205

206+
if hasattr(self, "order_discount_amount") and self.order_discount_amount:
207+
params['orderDiscountAmount'] = self.order_discount_amount
208+
209+
if hasattr(self, "sub_total_order_amount") and self.sub_total_order_amount:
210+
params['subTotalOrderAmount'] = self.sub_total_order_amount
211+
186212
return params

0 commit comments

Comments
 (0)