diff --git a/com/alipay/ams/api/model/period_type.py b/com/alipay/ams/api/model/period_type.py index a620e14..08dbf8e 100644 --- a/com/alipay/ams/api/model/period_type.py +++ b/com/alipay/ams/api/model/period_type.py @@ -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" @@ -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: diff --git a/com/alipay/ams/api/request/pay/alipay_pay_request.py b/com/alipay/ams/api/request/pay/alipay_pay_request.py index 199871d..5e358be 100644 --- a/com/alipay/ams/api/request/pay/alipay_pay_request.py +++ b/com/alipay/ams/api/request/pay/alipay_pay_request.py @@ -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 @@ -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): @@ -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 @@ -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']