本文整理汇总了Python中mcfw.serialization.ds_unicode函数的典型用法代码示例。如果您正苦于以下问题:Python ds_unicode函数的具体用法?Python ds_unicode怎么用?Python ds_unicode使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ds_unicode函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _deserialize_advanced_order_category
def _deserialize_advanced_order_category(stream):
c = AdvancedOrderCategory()
ds_long(stream) # version
c.id = ds_unicode(stream)
c.name = ds_unicode(stream)
c.items = _deserialize_advanced_order_item_list(stream)
return c
示例2: _deserialize_news_button
def _deserialize_news_button(stream, version):
b = NewsActionButtonTO()
b.id = ds_unicode(stream)
b.caption = ds_unicode(stream)
b.action = ds_unicode(stream)
b.flow_params = ds_unicode(stream) if version > 1 else None
return b
示例3: deserialize_form
def deserialize_form(stream):
version = ds_long(stream) # version
f = Form()
f.type = ds_unicode(stream)
f.widget = WIDGET_MAPPING[f.type].model_deserialize(stream)
f.javascript_validation = ds_unicode(stream) if version >= 2 else None
return f
示例4: deserialize_public_key
def deserialize_public_key(stream, version):
pk = PublicKeyTO()
pk.algorithm = ds_unicode(stream)
pk.name = ds_unicode(stream)
pk.index = ds_unicode(stream)
pk.public_key = ds_unicode(stream)
return pk
示例5: deserialize_mydigipass_widget_result
def deserialize_mydigipass_widget_result(stream):
version = ds_long(stream) # version
result = MyDigiPassWidgetResult()
if version == 1 or ds_bool(stream):
result.eid_profile = deserialize_mydigipass_eid_profile(stream, version)
else:
result.eid_profile = None
if version > 1 and ds_bool(stream):
result.eid_address = deserialize_mydigipass_eid_address(stream, version)
else:
result.eid_address = None
if version > 1:
result.eid_photo = ds_unicode(stream)
result.email = ds_unicode(stream)
result.phone = ds_unicode(stream)
else:
result.eid_photo = None
result.email = None
result.phone = None
if version > 1 and ds_bool(stream):
result.profile = deserialize_mydigipass_profile(stream, version)
else:
result.profile = None
if version > 1 and ds_bool(stream):
result.address = deserialize_mydigipass_address(stream, version)
else:
result.address = None
return result
示例6: _deserialize_text_widget
def _deserialize_text_widget(stream, w):
version = ds_long(stream)
w.value = ds_unicode(stream)
w.place_holder = ds_unicode(stream)
w.max_chars = ds_long(stream)
w.keyboard_type = ds_unicode(stream) if version >= 2 else TextWidget.keyboard_type.default
return w
示例7: _deserialize_news_sender
def _deserialize_news_sender(stream):
_ = ds_long(stream) # version
sender = NewsSenderTO()
sender.email = ds_unicode(stream)
sender.name = ds_unicode(stream)
sender.avatar_id = ds_long(stream)
return sender
示例8: deserialize_pay_widget_result
def deserialize_pay_widget_result(stream):
ds_long(stream) # version
result = PayWidgetResult()
result.transaction_id = ds_unicode(stream)
result.provider_id = ds_unicode(stream)
result.status = ds_unicode(stream)
return result
示例9: deserialize_oauth
def deserialize_oauth(stream):
ds_long(stream) # version
w = Oauth()
w.url = ds_unicode(stream)
w.success_message = ds_unicode(stream)
w.caption = ds_unicode(stream)
return w
示例10: _deserialize_news_button
def _deserialize_news_button(stream, version):
b = NewsButton()
b.id = ds_unicode(stream)
b.caption = ds_unicode(stream)
b.action = ds_unicode(stream)
b.flow_params = ds_unicode(stream) if version >= 2 else None
b.index = ds_long(stream) if version >= 3 else 0
return b
示例11: deserialize_photo_upload
def deserialize_photo_upload(stream):
version = ds_long(stream)
w = PhotoUpload()
w.quality = ds_unicode(stream)
w.gallery = False if version < 2 else ds_bool(stream)
w.camera = False if version < 2 else ds_bool(stream)
w.ratio = None if version < 3 else ds_unicode(stream)
return w
示例12: _deserialize_attachment
def _deserialize_attachment(stream, version):
a = Attachment()
a.index = ds_long(stream)
a.content_type = ds_unicode(stream)
a.download_url = ds_unicode(stream)
a.size = ds_long(stream)
a.name = None if version < 2 else ds_unicode(stream)
return a
示例13: deserialize_sign_widget_result
def deserialize_sign_widget_result(stream):
# type: (unicode) -> SignWidgetResult
version = ds_long(stream) # version
result = SignWidgetResult()
result.payload_signature = ds_unicode(stream)
result.total_signature = ds_unicode(stream)
result.public_key = deserialize_public_key(stream, version)
return result
示例14: _deserialize_payment_method
def _deserialize_payment_method(stream):
c = PaymentMethod()
ds_long(stream) # version
c.provider_id = ds_unicode(stream)
c.currency = ds_unicode(stream)
c.amount = ds_long(stream)
c.precision = ds_long(stream)
return c
示例15: _deserialize_js_flow_definition
def _deserialize_js_flow_definition(stream, version):
jfd = JsFlowDefinition()
jfd.language = ds_unicode(stream)
jfd.hash_ = ds_unicode(stream)
jfd.definition = ds_unicode(stream)
jfd.brandings = ds_unicode_list(stream) if version >= 4 else list()
jfd.attachments = ds_unicode_list(stream) if version >= 5 else list()
return jfd