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
25 changes: 20 additions & 5 deletions com/alipay/ams/api/model/authorization_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ def __init__(self):
self.__allowed_merchant_category_list = None # type: [str]
self.__allowed_auth_times = None # type: int
self.__allowed_currencies = None # type: [str]
self.__payment_preference_currencies = None # type: [str]
self.__card_limit_detail = None # type: CardLimitDetail
self.__card_limit_info = None # type: CardLimitInfo
self.__refund_preference = None # type: RefundPreference
Expand All @@ -22,7 +23,7 @@ def __init__(self):
@property
def card_active_time(self):
"""
If not present, It will be activated when the card is created. Datetime UTC time: 2018-10-31T00:00:00+0800 ISO 8601
The card activation time in ISO 8601 format.
"""
return self.__card_active_time

Expand All @@ -32,7 +33,7 @@ def card_active_time(self, value):
@property
def card_cancel_time(self):
"""
Datetime UTC time: 2018-10-31T00:00:00+0800 ISO 8601
The card cancellation time in ISO 8601 format.
"""
return self.__card_cancel_time

Expand All @@ -42,7 +43,7 @@ def card_cancel_time(self, value):
@property
def allowed_merchant_category_list(self):
"""
Allowed MCC (Merchant Category Code) list. If not set or left empty, all transactions are allowed.
The allowed merchant category code list.
"""
return self.__allowed_merchant_category_list

Expand All @@ -52,7 +53,7 @@ def allowed_merchant_category_list(self, value):
@property
def allowed_auth_times(self):
"""
Indicates the number of allowed authorization times. If not set or left empty, all transactions are allowed.
The number of allowed authorization attempts.
"""
return self.__allowed_auth_times

Expand All @@ -62,14 +63,24 @@ def allowed_auth_times(self, value):
@property
def allowed_currencies(self):
"""
Allowed transaction currencies (ISO 4217 three-letter codes). If not set, no currency restriction applies.
The allowed transaction currencies as ISO 4217 codes.
"""
return self.__allowed_currencies

@allowed_currencies.setter
def allowed_currencies(self, value):
self.__allowed_currencies = value
@property
def payment_preference_currencies(self):
"""
The card-level ordered balance-consumption preference. For a whitelisted merchant, the stored list is returned when configured and this child field is omitted when no card-level preference is configured. For a non-whitelisted merchant, the parent cardDetail object is omitted.
"""
return self.__payment_preference_currencies

@payment_preference_currencies.setter
def payment_preference_currencies(self, value):
self.__payment_preference_currencies = value
@property
def card_limit_detail(self):
"""Gets the card_limit_detail of this AuthorizationControl.

Expand Down Expand Up @@ -115,6 +126,8 @@ def to_ams_dict(self):
params['allowedAuthTimes'] = self.allowed_auth_times
if hasattr(self, "allowed_currencies") and self.allowed_currencies is not None:
params['allowedCurrencies'] = self.allowed_currencies
if hasattr(self, "payment_preference_currencies") and self.payment_preference_currencies is not None:
params['paymentPreferenceCurrencies'] = self.payment_preference_currencies
if hasattr(self, "card_limit_detail") and self.card_limit_detail is not None:
params['cardLimitDetail'] = self.card_limit_detail
if hasattr(self, "card_limit_info") and self.card_limit_info is not None:
Expand All @@ -137,6 +150,8 @@ def parse_rsp_body(self, response_body):
self.__allowed_auth_times = response_body['allowedAuthTimes']
if 'allowedCurrencies' in response_body:
self.__allowed_currencies = response_body['allowedCurrencies']
if 'paymentPreferenceCurrencies' in response_body:
self.__payment_preference_currencies = response_body['paymentPreferenceCurrencies']
if 'cardLimitDetail' in response_body:
self.__card_limit_detail = CardLimitDetail()
self.__card_limit_detail.parse_rsp_body(response_body['cardLimitDetail'])
Expand Down
37 changes: 37 additions & 0 deletions com/alipay/ams/api/model/billing_subscription_status_change.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import json




class BillingSubscriptionStatusChange:
def __init__(self):

self.__action = None # type: str


@property
def action(self):
"""
The subscription status change action. The currently supported value is PAUSE, which pauses payment collection and changes the subscription status from ACTIVE to PAUSED. To reactivate a paused subscription, call the resume subscription API. Maximum length: 10 characters.
"""
return self.__action

@action.setter
def action(self, value):
self.__action = value




def to_ams_dict(self):
params = dict()
if hasattr(self, "action") and self.action is not None:
params['action'] = self.action
return params


def parse_rsp_body(self, response_body):
if isinstance(response_body, str):
response_body = json.loads(response_body)
if 'action' in response_body:
self.__action = response_body['action']
223 changes: 223 additions & 0 deletions com/alipay/ams/api/model/card_detail.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,223 @@
import json
from com.alipay.ams.api.model.result import Result
from com.alipay.ams.api.model.authorization_control import AuthorizationControl
from com.alipay.ams.api.model.cardholder_info import CardholderInfo




class CardDetail:
def __init__(self):

self.__result = None # type: Result
self.__asset_id = None # type: str
self.__card_nick_name = None # type: str
self.__card_status = None # type: str
self.__masked_card_no = None # type: str
self.__card_brand = None # type: str
self.__created_time = None # type: str
self.__updated_time = None # type: str
self.__purpose = None # type: str
self.__note = None # type: str
self.__metadata = None # type: {str: (str,)}
self.__authorization_control = None # type: AuthorizationControl
self.__cardholderinfo = None # type: CardholderInfo


@property
def result(self):
"""Gets the result of this CardDetail.

"""
return self.__result

@result.setter
def result(self, value):
self.__result = value
@property
def asset_id(self):
"""
The card asset ID.
"""
return self.__asset_id

@asset_id.setter
def asset_id(self, value):
self.__asset_id = value
@property
def card_nick_name(self):
"""
The user-defined card nickname.
"""
return self.__card_nick_name

@card_nick_name.setter
def card_nick_name(self, value):
self.__card_nick_name = value
@property
def card_status(self):
"""
The current card status.
"""
return self.__card_status

@card_status.setter
def card_status(self, value):
self.__card_status = value
@property
def masked_card_no(self):
"""
The masked card number.
"""
return self.__masked_card_no

@masked_card_no.setter
def masked_card_no(self, value):
self.__masked_card_no = value
@property
def card_brand(self):
"""
The card network brand.
"""
return self.__card_brand

@card_brand.setter
def card_brand(self, value):
self.__card_brand = value
@property
def created_time(self):
"""
The card creation time in ISO 8601 format.
"""
return self.__created_time

@created_time.setter
def created_time(self, value):
self.__created_time = value
@property
def updated_time(self):
"""
The card update time in ISO 8601 format.
"""
return self.__updated_time

@updated_time.setter
def updated_time(self, value):
self.__updated_time = value
@property
def purpose(self):
"""
The purpose of the card.
"""
return self.__purpose

@purpose.setter
def purpose(self, value):
self.__purpose = value
@property
def note(self):
"""
The note supplied for the card application.
"""
return self.__note

@note.setter
def note(self, value):
self.__note = value
@property
def metadata(self):
"""
Customer metadata in key-value format.
"""
return self.__metadata

@metadata.setter
def metadata(self, value):
self.__metadata = value
@property
def authorization_control(self):
"""Gets the authorization_control of this CardDetail.

"""
return self.__authorization_control

@authorization_control.setter
def authorization_control(self, value):
self.__authorization_control = value
@property
def cardholderinfo(self):
"""Gets the cardholderinfo of this CardDetail.

"""
return self.__cardholderinfo

@cardholderinfo.setter
def cardholderinfo(self, value):
self.__cardholderinfo = value




def to_ams_dict(self):
params = dict()
if hasattr(self, "result") and self.result is not None:
params['result'] = self.result
if hasattr(self, "asset_id") and self.asset_id is not None:
params['assetId'] = self.asset_id
if hasattr(self, "card_nick_name") and self.card_nick_name is not None:
params['cardNickName'] = self.card_nick_name
if hasattr(self, "card_status") and self.card_status is not None:
params['cardStatus'] = self.card_status
if hasattr(self, "masked_card_no") and self.masked_card_no is not None:
params['maskedCardNo'] = self.masked_card_no
if hasattr(self, "card_brand") and self.card_brand is not None:
params['cardBrand'] = self.card_brand
if hasattr(self, "created_time") and self.created_time is not None:
params['createdTime'] = self.created_time
if hasattr(self, "updated_time") and self.updated_time is not None:
params['updatedTime'] = self.updated_time
if hasattr(self, "purpose") and self.purpose is not None:
params['purpose'] = self.purpose
if hasattr(self, "note") and self.note is not None:
params['note'] = self.note
if hasattr(self, "metadata") and self.metadata is not None:
params['metadata'] = self.metadata
if hasattr(self, "authorization_control") and self.authorization_control is not None:
params['authorizationControl'] = self.authorization_control
if hasattr(self, "cardholderinfo") and self.cardholderinfo is not None:
params['cardholderinfo'] = self.cardholderinfo
return params


def parse_rsp_body(self, response_body):
if isinstance(response_body, str):
response_body = json.loads(response_body)
if 'result' in response_body:
self.__result = Result()
self.__result.parse_rsp_body(response_body['result'])
if 'assetId' in response_body:
self.__asset_id = response_body['assetId']
if 'cardNickName' in response_body:
self.__card_nick_name = response_body['cardNickName']
if 'cardStatus' in response_body:
self.__card_status = response_body['cardStatus']
if 'maskedCardNo' in response_body:
self.__masked_card_no = response_body['maskedCardNo']
if 'cardBrand' in response_body:
self.__card_brand = response_body['cardBrand']
if 'createdTime' in response_body:
self.__created_time = response_body['createdTime']
if 'updatedTime' in response_body:
self.__updated_time = response_body['updatedTime']
if 'purpose' in response_body:
self.__purpose = response_body['purpose']
if 'note' in response_body:
self.__note = response_body['note']
if 'metadata' in response_body:
self.__metadata = response_body['metadata']
if 'authorizationControl' in response_body:
self.__authorization_control = AuthorizationControl()
self.__authorization_control.parse_rsp_body(response_body['authorizationControl'])
if 'cardholderinfo' in response_body:
self.__cardholderinfo = CardholderInfo()
self.__cardholderinfo.parse_rsp_body(response_body['cardholderinfo'])
2 changes: 1 addition & 1 deletion com/alipay/ams/api/model/cardholder_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def bill_address(self, value):
@property
def display_name(self):
"""
The name that is displayed on the card
The name displayed on the card.
"""
return self.__display_name

Expand Down
8 changes: 4 additions & 4 deletions com/alipay/ams/api/model/paginator.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def __init__(self):
@property
def current_page(self):
"""
The current page number, start from 1.
The current page number, starting from 1.
"""
return self.__current_page

Expand All @@ -25,7 +25,7 @@ def current_page(self, value):
@property
def page_size(self):
"""
The maximum records returned per page.
The number of records returned per page.
"""
return self.__page_size

Expand All @@ -35,7 +35,7 @@ def page_size(self, value):
@property
def total_page(self):
"""
Total number of pages.
The total number of pages.
"""
return self.__total_page

Expand All @@ -45,7 +45,7 @@ def total_page(self, value):
@property
def total_count(self):
"""
Total items that match the criteria.
The total number of records that match the query criteria.
"""
return self.__total_count

Expand Down
Loading