Skip to content

Commit 6dcce30

Browse files
committed
format & fix
1 parent e2f9f3a commit 6dcce30

File tree

102 files changed

+240
-303
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+240
-303
lines changed

com/alipay/ams/api/default_alipay_client.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ def __init__(self, gateway_url, client_id, merchant_private_key, alipay_public_k
1717
"""
1818
内部方法,生成请求签名
1919
"""
20+
2021
def __gen_sign(self, http_method, path, client_id, req_time, req_body):
2122
try:
2223
sign_value = sign(http_method, path, client_id, req_time, req_body, self.__merchant_private_key)
@@ -27,9 +28,11 @@ def __gen_sign(self, http_method, path, client_id, req_time, req_body):
2728
"""
2829
内部方法,生成请求签名
2930
"""
31+
3032
def __verify_sign(self, http_method, path, client_id, rsp_time, rsp_body, rsp_signature):
3133
try:
32-
is_verify = verify(http_method, path, client_id, rsp_time, rsp_body, rsp_signature, self.__alipay_public_key)
34+
is_verify = verify(http_method, path, client_id, rsp_time, rsp_body, rsp_signature,
35+
self.__alipay_public_key)
3336
except Exception as e:
3437
raise AlipayApiException("response verify failed. " + str(e))
3538
return is_verify

com/alipay/ams/api/exception/exception.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,3 @@
44

55
class AlipayApiException(ValueError):
66
pass
7-

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44

55
class BusinessType(object):
6-
76
HOTEL = "1"
87
AIR_FLIGHT = "2"
98
STUDAY_ABROAD = "3"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ class DisableReasonType(Enum):
1414
CURRENT_CHANNEL_NOT_EXIST = "CURRENT_CHANNEL_NOT_EXIST"
1515

1616
def to_ams_dict(self):
17-
return self.name
17+
return self.name

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ class MethodType(Enum):
88
PUT = "PUT"
99
DELETE = "DELETE"
1010
PATCH = "PATCH"
11+
1112
def to_ams_dict(self):
12-
return self.name
13+
return self.name

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,4 +118,4 @@ def parse_rsp_body(self, address_body):
118118
self.__zip_code = address_body['zipCode']
119119

120120
if 'label' in address_body:
121-
self.__label = address_body['label']
121+
self.__label = address_body['label']

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33

44
class AuthCodeForm(object):
55
def __init__(self):
6-
self.codeDetails = None #type: list: CodeDetail
7-
6+
self.codeDetails = None # type: list: CodeDetail
87

98
@property
109
def code_details(self):
1110
return self.codeDetails
11+
1212
@code_details.setter
1313
def code_details(self, value):
1414
self.codeDetails = value
@@ -17,4 +17,4 @@ def to_ams_dict(self):
1717
params = dict()
1818
if self.codeDetails is not None:
1919
params['codeDetails'] = [item.to_ams_dict() for item in self.codeDetails]
20-
return params
20+
return params
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
from enum import Enum, unique
22

3+
34
@unique
45
class CaptureMode(Enum):
56
AUTOMATIC = "AUTOMATIC"
67
MANUAL = "MANUAL"
78

89
def to_ams_dict(self):
9-
return self.name
10+
return self.name

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
@unique
77
class CardBrand(Enum):
8-
98
VISA = "VISA"
109
MASTERCARD = "MASTERCARD"
1110
MAESTRO = "MAESTRO"
@@ -21,7 +20,7 @@ class CardBrand(Enum):
2120

2221
def to_ams_dict(self):
2322
return self.name
24-
23+
2524
@staticmethod
2625
def value_of(value):
2726
if not value:

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ class CardBrandType(Enum):
1010
ELO = "ELO"
1111

1212
def to_ams_dict(self):
13-
return self.name
13+
return self.name

0 commit comments

Comments
 (0)