Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion com/alipay/ams/api/model/period_type.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from enum import Enum, unique
@unique
class PeriodType(Enum):
"""The subscription period type. Valid values are: WEEK: indicates that the subscription period is measured in weeks. MONTH: indicates that the subscription period is measured in months. QUARTER: indicates that the subscription period is measured in quarters. HALF_YEAR: indicates that the subscription period is measured in half years. YEAR: indicates that the subscription period is measured in years."""
"""The subscription period type. Valid values are: DAY: indicates that the subscription period is measured in days. WEEK: indicates that the subscription period is measured in weeks. MONTH: indicates that the subscription period is measured in months. QUARTER: indicates that the subscription period is measured in quarters. HALF_YEAR: indicates that the subscription period is measured in half years. YEAR: indicates that the subscription period is measured in years."""

DAY = "DAY"
WEEK = "WEEK"
MONTH = "MONTH"
QUARTER = "QUARTER"
Expand All @@ -17,6 +18,8 @@ def value_of(value):
if not value:
return None

if PeriodType.DAY.value == value:
return PeriodType.DAY
if PeriodType.WEEK.value == value:
return PeriodType.WEEK
if PeriodType.MONTH.value == value:
Expand Down
15 changes: 15 additions & 0 deletions com/alipay/ams/api/request/pay/alipay_pay_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ def __init__(self):
self.__extend_info = None # type: str
self.__merchant_account_id = None # type: str
self.__dual_offline_payment = None # type: bool
self.__tea_drinker_plus_test = None # type: str


@property
Expand Down Expand Up @@ -334,6 +335,16 @@ def dual_offline_payment(self):
@dual_offline_payment.setter
def dual_offline_payment(self, value):
self.__dual_offline_payment = value
@property
def tea_drinker_plus_test(self):
"""
Test parameter for TeaDrinkerPlus
"""
return self.__tea_drinker_plus_test

@tea_drinker_plus_test.setter
def tea_drinker_plus_test(self, value):
self.__tea_drinker_plus_test = value


def to_ams_json(self):
Expand Down Expand Up @@ -399,6 +410,8 @@ def to_ams_dict(self):
params['merchantAccountId'] = self.merchant_account_id
if hasattr(self, "dual_offline_payment") and self.dual_offline_payment is not None:
params['dualOfflinePayment'] = self.dual_offline_payment
if hasattr(self, "tea_drinker_plus_test") and self.tea_drinker_plus_test is not None:
params['teaDrinkerPlusTest'] = self.tea_drinker_plus_test
return params


Expand Down Expand Up @@ -477,3 +490,5 @@ def parse_rsp_body(self, response_body):
self.__merchant_account_id = response_body['merchantAccountId']
if 'dualOfflinePayment' in response_body:
self.__dual_offline_payment = response_body['dualOfflinePayment']
if 'teaDrinkerPlusTest' in response_body:
self.__tea_drinker_plus_test = response_body['teaDrinkerPlusTest']