global-open-sdk-python 1.3.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (287) hide show
  1. com/__init__.py +1 -0
  2. com/alipay/__init__.py +0 -0
  3. com/alipay/ams/__init__.py +0 -0
  4. com/alipay/ams/api/__init__.py +0 -0
  5. com/alipay/ams/api/default_alipay_client.py +114 -0
  6. com/alipay/ams/api/exception/__init__.py +0 -0
  7. com/alipay/ams/api/exception/exception.py +6 -0
  8. com/alipay/ams/api/model/__init__.py +0 -0
  9. com/alipay/ams/api/model/account_balance.py +49 -0
  10. com/alipay/ams/api/model/account_holder_type.py +10 -0
  11. com/alipay/ams/api/model/account_type.py +11 -0
  12. com/alipay/ams/api/model/acquirer_info.py +86 -0
  13. com/alipay/ams/api/model/address.py +121 -0
  14. com/alipay/ams/api/model/agreement_info.py +35 -0
  15. com/alipay/ams/api/model/amount.py +39 -0
  16. com/alipay/ams/api/model/amount_limit.py +44 -0
  17. com/alipay/ams/api/model/amount_limit_info.py +44 -0
  18. com/alipay/ams/api/model/antom_path_constants.py +55 -0
  19. com/alipay/ams/api/model/association_type.py +15 -0
  20. com/alipay/ams/api/model/attachment.py +54 -0
  21. com/alipay/ams/api/model/attachment_type.py +26 -0
  22. com/alipay/ams/api/model/auth_code_form.py +20 -0
  23. com/alipay/ams/api/model/auth_meta_data.py +32 -0
  24. com/alipay/ams/api/model/authentication_channel_type.py +12 -0
  25. com/alipay/ams/api/model/authentication_type.py +11 -0
  26. com/alipay/ams/api/model/authorization_error.py +27 -0
  27. com/alipay/ams/api/model/authorization_phase.py +10 -0
  28. com/alipay/ams/api/model/browser_info.py +65 -0
  29. com/alipay/ams/api/model/business_info.py +89 -0
  30. com/alipay/ams/api/model/business_type.py +13 -0
  31. com/alipay/ams/api/model/buyer.py +59 -0
  32. com/alipay/ams/api/model/cancellation_type.py +9 -0
  33. com/alipay/ams/api/model/capture_mode.py +10 -0
  34. com/alipay/ams/api/model/card_brand.py +54 -0
  35. com/alipay/ams/api/model/card_brand_type.py +13 -0
  36. com/alipay/ams/api/model/card_payment_method_detail.py +444 -0
  37. com/alipay/ams/api/model/card_verification_result.py +76 -0
  38. com/alipay/ams/api/model/certificate.py +65 -0
  39. com/alipay/ams/api/model/certificate_type.py +15 -0
  40. com/alipay/ams/api/model/challenge_action_form.py +63 -0
  41. com/alipay/ams/api/model/challenge_trigger_source_type.py +13 -0
  42. com/alipay/ams/api/model/challenge_type.py +14 -0
  43. com/alipay/ams/api/model/china_extra_trans_info.py +130 -0
  44. com/alipay/ams/api/model/class_type.py +11 -0
  45. com/alipay/ams/api/model/clearing_channel.py +7 -0
  46. com/alipay/ams/api/model/code_detail.py +53 -0
  47. com/alipay/ams/api/model/code_value_type.py +24 -0
  48. com/alipay/ams/api/model/company.py +141 -0
  49. com/alipay/ams/api/model/companyType.py +20 -0
  50. com/alipay/ams/api/model/company_unit_type.py +10 -0
  51. com/alipay/ams/api/model/contact.py +27 -0
  52. com/alipay/ams/api/model/contact_info.py +30 -0
  53. com/alipay/ams/api/model/coupon_payment_method_detail.py +107 -0
  54. com/alipay/ams/api/model/credit_pay_fee_type.py +9 -0
  55. com/alipay/ams/api/model/credit_pay_plan.py +41 -0
  56. com/alipay/ams/api/model/customer_belongs_to.py +47 -0
  57. com/alipay/ams/api/model/customer_id_type.py +14 -0
  58. com/alipay/ams/api/model/customs_info.py +28 -0
  59. com/alipay/ams/api/model/declaration_record.py +178 -0
  60. com/alipay/ams/api/model/delivery_method_type.py +10 -0
  61. com/alipay/ams/api/model/disable_reason_type.py +17 -0
  62. com/alipay/ams/api/model/discount.py +46 -0
  63. com/alipay/ams/api/model/discount_payment_method_detail.py +94 -0
  64. com/alipay/ams/api/model/display_type.py +33 -0
  65. com/alipay/ams/api/model/dispute_evidence_format_type.py +10 -0
  66. com/alipay/ams/api/model/dispute_evidence_type.py +10 -0
  67. com/alipay/ams/api/model/entity_associations.py +67 -0
  68. com/alipay/ams/api/model/env.py +229 -0
  69. com/alipay/ams/api/model/extend_info.py +21 -0
  70. com/alipay/ams/api/model/external_payment_method_detail.py +76 -0
  71. com/alipay/ams/api/model/funding_type.py +16 -0
  72. com/alipay/ams/api/model/gaming.py +55 -0
  73. com/alipay/ams/api/model/goods.py +108 -0
  74. com/alipay/ams/api/model/grant_type.py +12 -0
  75. com/alipay/ams/api/model/http_method.py +9 -0
  76. com/alipay/ams/api/model/identity_check_result.py +9 -0
  77. com/alipay/ams/api/model/in_store_payment_scenario.py +14 -0
  78. com/alipay/ams/api/model/individual.py +97 -0
  79. com/alipay/ams/api/model/installment.py +41 -0
  80. com/alipay/ams/api/model/interest_free.py +85 -0
  81. com/alipay/ams/api/model/leg.py +116 -0
  82. com/alipay/ams/api/model/legal_entity_type.py +10 -0
  83. com/alipay/ams/api/model/lodging.py +95 -0
  84. com/alipay/ams/api/model/logo.py +31 -0
  85. com/alipay/ams/api/model/merchant.py +107 -0
  86. com/alipay/ams/api/model/merchant_customs_info.py +28 -0
  87. com/alipay/ams/api/model/merchant_info.py +79 -0
  88. com/alipay/ams/api/model/merchant_registration_info.py +96 -0
  89. com/alipay/ams/api/model/merchant_type.py +10 -0
  90. com/alipay/ams/api/model/method_type.py +13 -0
  91. com/alipay/ams/api/model/order.py +186 -0
  92. com/alipay/ams/api/model/order_code_form.py +66 -0
  93. com/alipay/ams/api/model/order_info.py +22 -0
  94. com/alipay/ams/api/model/os_type.py +12 -0
  95. com/alipay/ams/api/model/passengers.py +39 -0
  96. com/alipay/ams/api/model/paymentOptionDetail.py +43 -0
  97. com/alipay/ams/api/model/payment_detail.py +32 -0
  98. com/alipay/ams/api/model/payment_factor.py +73 -0
  99. com/alipay/ams/api/model/payment_method.py +86 -0
  100. com/alipay/ams/api/model/payment_method_category_type.py +29 -0
  101. com/alipay/ams/api/model/payment_method_detail.py +126 -0
  102. com/alipay/ams/api/model/payment_method_detail_type.py +30 -0
  103. com/alipay/ams/api/model/payment_method_info.py +53 -0
  104. com/alipay/ams/api/model/payment_method_type.py +12 -0
  105. com/alipay/ams/api/model/payment_option.py +137 -0
  106. com/alipay/ams/api/model/payment_result_info.py +159 -0
  107. com/alipay/ams/api/model/payment_verification_data.py +34 -0
  108. com/alipay/ams/api/model/period_rule.py +48 -0
  109. com/alipay/ams/api/model/period_type.py +12 -0
  110. com/alipay/ams/api/model/plan.py +106 -0
  111. com/alipay/ams/api/model/presentment_mode.py +11 -0
  112. com/alipay/ams/api/model/product_code_type.py +13 -0
  113. com/alipay/ams/api/model/promotion_info.py +66 -0
  114. com/alipay/ams/api/model/promotion_result.py +49 -0
  115. com/alipay/ams/api/model/promotion_type.py +10 -0
  116. com/alipay/ams/api/model/psp_customer_info.py +78 -0
  117. com/alipay/ams/api/model/quote.py +84 -0
  118. com/alipay/ams/api/model/redirect_action_form.py +63 -0
  119. com/alipay/ams/api/model/refund_detail.py +35 -0
  120. com/alipay/ams/api/model/refund_from_type.py +11 -0
  121. com/alipay/ams/api/model/refund_record.py +66 -0
  122. com/alipay/ams/api/model/registration_detail.py +119 -0
  123. com/alipay/ams/api/model/result.py +39 -0
  124. com/alipay/ams/api/model/result_status_type.py +27 -0
  125. com/alipay/ams/api/model/risk_score_detail.py +37 -0
  126. com/alipay/ams/api/model/risk_score_result.py +57 -0
  127. com/alipay/ams/api/model/risk_score_type.py +24 -0
  128. com/alipay/ams/api/model/scope_type.py +17 -0
  129. com/alipay/ams/api/model/settle_to_type.py +10 -0
  130. com/alipay/ams/api/model/settlement_bank_account.py +143 -0
  131. com/alipay/ams/api/model/settlement_detail.py +32 -0
  132. com/alipay/ams/api/model/settlement_info.py +31 -0
  133. com/alipay/ams/api/model/settlement_strategy.py +22 -0
  134. com/alipay/ams/api/model/shipping.py +61 -0
  135. com/alipay/ams/api/model/stock_info.py +26 -0
  136. com/alipay/ams/api/model/store.py +107 -0
  137. com/alipay/ams/api/model/subscription_notification_type.py +14 -0
  138. com/alipay/ams/api/model/subscription_status.py +12 -0
  139. com/alipay/ams/api/model/support_bank.py +49 -0
  140. com/alipay/ams/api/model/support_card_brand.py +39 -0
  141. com/alipay/ams/api/model/terminal_type.py +13 -0
  142. com/alipay/ams/api/model/three_ds_result.py +78 -0
  143. com/alipay/ams/api/model/transaction.py +80 -0
  144. com/alipay/ams/api/model/transaction_status_type.py +33 -0
  145. com/alipay/ams/api/model/transaction_type.py +36 -0
  146. com/alipay/ams/api/model/transfer_from_detail.py +44 -0
  147. com/alipay/ams/api/model/transfer_to_detail.py +108 -0
  148. com/alipay/ams/api/model/transit.py +46 -0
  149. com/alipay/ams/api/model/transit_type.py +12 -0
  150. com/alipay/ams/api/model/trial.py +47 -0
  151. com/alipay/ams/api/model/user_identity_type.py +11 -0
  152. com/alipay/ams/api/model/user_name.py +77 -0
  153. com/alipay/ams/api/model/wallet_payment_method_type.py +20 -0
  154. com/alipay/ams/api/model/web_site.py +54 -0
  155. com/alipay/ams/api/net/__init__.py +0 -0
  156. com/alipay/ams/api/net/default_http_rpc.py +58 -0
  157. com/alipay/ams/api/request/__init__.py +0 -0
  158. com/alipay/ams/api/request/alipay_request.py +41 -0
  159. com/alipay/ams/api/request/auth/__init__.py +0 -0
  160. com/alipay/ams/api/request/auth/alipay_auth_apply_token_request.py +88 -0
  161. com/alipay/ams/api/request/auth/alipay_auth_consult_request.py +160 -0
  162. com/alipay/ams/api/request/auth/alipay_auth_query_token_request.py +32 -0
  163. com/alipay/ams/api/request/auth/alipay_auth_revoke_token_request.py +43 -0
  164. com/alipay/ams/api/request/declare/__init__.py +0 -0
  165. com/alipay/ams/api/request/declare/alipay_customs_declare_request.py +109 -0
  166. com/alipay/ams/api/request/declare/alipay_customs_query_request.py +28 -0
  167. com/alipay/ams/api/request/dispute/__init__.py +0 -0
  168. com/alipay/ams/api/request/dispute/alipay_accept_dispute_request.py +29 -0
  169. com/alipay/ams/api/request/dispute/alipay_download_dispute_evidence_request.py +40 -0
  170. com/alipay/ams/api/request/dispute/alipay_supply_defense_document_request.py +39 -0
  171. com/alipay/ams/api/request/marketplace/__init__.py +0 -0
  172. com/alipay/ams/api/request/marketplace/alipay_create_payout_request.py +53 -0
  173. com/alipay/ams/api/request/marketplace/alipay_create_transfer_request.py +53 -0
  174. com/alipay/ams/api/request/marketplace/alipay_inquire_balance_request.py +29 -0
  175. com/alipay/ams/api/request/marketplace/alipay_register_request.py +65 -0
  176. com/alipay/ams/api/request/marketplace/alipay_settle_request.py +51 -0
  177. com/alipay/ams/api/request/marketplace/alipay_settlement_info_update_request.py +62 -0
  178. com/alipay/ams/api/request/marketplace/alipay_submit_attachment_request.py +51 -0
  179. com/alipay/ams/api/request/merchant/__init__.py +0 -0
  180. com/alipay/ams/api/request/merchant/alipay_merchant_registration_info_query_request.py +30 -0
  181. com/alipay/ams/api/request/merchant/alipay_merchant_registration_request.py +78 -0
  182. com/alipay/ams/api/request/merchant/alipay_merchant_registration_status_query_request.py +42 -0
  183. com/alipay/ams/api/request/notify/__init__.py +0 -0
  184. com/alipay/ams/api/request/notify/alipay_auth_notify.py +67 -0
  185. com/alipay/ams/api/request/notify/alipay_capture_result_notify.py +64 -0
  186. com/alipay/ams/api/request/notify/alipay_dispute_notify.py +131 -0
  187. com/alipay/ams/api/request/notify/alipay_notify.py +28 -0
  188. com/alipay/ams/api/request/notify/alipay_pay_result_notify.py +111 -0
  189. com/alipay/ams/api/request/notify/alipay_refund_notify.py +67 -0
  190. com/alipay/ams/api/request/notify/alipay_subscription_notify.py +93 -0
  191. com/alipay/ams/api/request/notify/alipay_subscription_pay_notify.py +49 -0
  192. com/alipay/ams/api/request/notify/alipay_vaulting_notify.py +47 -0
  193. com/alipay/ams/api/request/pay/__init__.py +0 -0
  194. com/alipay/ams/api/request/pay/alipay_capture_request.py +70 -0
  195. com/alipay/ams/api/request/pay/alipay_create_order_request.py +94 -0
  196. com/alipay/ams/api/request/pay/alipay_create_session_request.py +202 -0
  197. com/alipay/ams/api/request/pay/alipay_pay_cancel_request.py +57 -0
  198. com/alipay/ams/api/request/pay/alipay_pay_consult_request.py +244 -0
  199. com/alipay/ams/api/request/pay/alipay_pay_query_request.py +60 -0
  200. com/alipay/ams/api/request/pay/alipay_pay_request.py +269 -0
  201. com/alipay/ams/api/request/pay/alipay_refund_query_request.py +51 -0
  202. com/alipay/ams/api/request/pay/alipay_refund_request.py +118 -0
  203. com/alipay/ams/api/request/pay/entry_code_payment_request.py +49 -0
  204. com/alipay/ams/api/request/pay/order_code_payment_request.py +46 -0
  205. com/alipay/ams/api/request/pay/user_presented_code_payment_request.py +50 -0
  206. com/alipay/ams/api/request/risks/__init__.py +0 -0
  207. com/alipay/ams/api/request/risks/inquiry_risk_score_request.py +68 -0
  208. com/alipay/ams/api/request/risks/risk_decide_request.py +121 -0
  209. com/alipay/ams/api/request/risks/risk_report_request.py +65 -0
  210. com/alipay/ams/api/request/risks/send_payment_result_request.py +73 -0
  211. com/alipay/ams/api/request/risks/send_refund_result_request.py +61 -0
  212. com/alipay/ams/api/request/subscription/__init__.py +0 -0
  213. com/alipay/ams/api/request/subscription/alipay_subscription_cancel_request.py +52 -0
  214. com/alipay/ams/api/request/subscription/alipay_subscription_change_request.py +140 -0
  215. com/alipay/ams/api/request/subscription/alipay_subscription_create_request.py +205 -0
  216. com/alipay/ams/api/request/users/__init__.py +0 -0
  217. com/alipay/ams/api/request/users/alipay_init_authentication_request.py +79 -0
  218. com/alipay/ams/api/request/users/alipay_user_query_info_request.py +32 -0
  219. com/alipay/ams/api/request/users/alipay_verify_authentication_request.py +56 -0
  220. com/alipay/ams/api/request/vaulting/__init__.py +0 -0
  221. com/alipay/ams/api/request/vaulting/alipay_vaulting_payment_method_request.py +84 -0
  222. com/alipay/ams/api/request/vaulting/alipay_vaulting_query_request.py +29 -0
  223. com/alipay/ams/api/request/vaulting/alipay_vaulting_session_request.py +84 -0
  224. com/alipay/ams/api/response/__init__.py +0 -0
  225. com/alipay/ams/api/response/alipay_response.py +22 -0
  226. com/alipay/ams/api/response/auth/__init__.py +0 -0
  227. com/alipay/ams/api/response/auth/alipay_auth_apply_token_response.py +57 -0
  228. com/alipay/ams/api/response/auth/alipay_auth_consult_response.py +68 -0
  229. com/alipay/ams/api/response/auth/alipay_auth_query_token_response.py +49 -0
  230. com/alipay/ams/api/response/auth/alipay_auth_revoke_token_response.py +21 -0
  231. com/alipay/ams/api/response/declare/__init__.py +0 -0
  232. com/alipay/ams/api/response/declare/alipay_customs_declare_response.py +54 -0
  233. com/alipay/ams/api/response/declare/alipay_customs_query_response.py +32 -0
  234. com/alipay/ams/api/response/dispute/__init__.py +0 -0
  235. com/alipay/ams/api/response/dispute/alipay_accept_dispute_response.py +24 -0
  236. com/alipay/ams/api/response/dispute/alipay_download_dispute_evidence_response.py +26 -0
  237. com/alipay/ams/api/response/dispute/alipay_supply_defense_document_response.py +24 -0
  238. com/alipay/ams/api/response/marketplace/__init__.py +0 -0
  239. com/alipay/ams/api/response/marketplace/alipay_create_payout_response.py +43 -0
  240. com/alipay/ams/api/response/marketplace/alipay_create_transfer_response.py +43 -0
  241. com/alipay/ams/api/response/marketplace/alipay_inquire_balance_response.py +26 -0
  242. com/alipay/ams/api/response/marketplace/alipay_register_response.py +18 -0
  243. com/alipay/ams/api/response/marketplace/alipay_settle_response.py +25 -0
  244. com/alipay/ams/api/response/marketplace/alipay_settlement_info_update_response.py +17 -0
  245. com/alipay/ams/api/response/marketplace/alipay_submit_attachment_response.py +26 -0
  246. com/alipay/ams/api/response/merchant/__init__.py +0 -0
  247. com/alipay/ams/api/response/merchant/alipay_merchant_registration_info_query_response.py +25 -0
  248. com/alipay/ams/api/response/merchant/alipay_merchant_registration_response.py +20 -0
  249. com/alipay/ams/api/response/merchant/alipay_merchant_registration_status_query_response.py +25 -0
  250. com/alipay/ams/api/response/pay/__init__.py +0 -0
  251. com/alipay/ams/api/response/pay/alipay_capture_response.py +59 -0
  252. com/alipay/ams/api/response/pay/alipay_create_order_response.py +55 -0
  253. com/alipay/ams/api/response/pay/alipay_create_session_response.py +32 -0
  254. com/alipay/ams/api/response/pay/alipay_pay_cancel_response.py +34 -0
  255. com/alipay/ams/api/response/pay/alipay_pay_consult_response.py +41 -0
  256. com/alipay/ams/api/response/pay/alipay_pay_query_response.py +245 -0
  257. com/alipay/ams/api/response/pay/alipay_pay_response.py +218 -0
  258. com/alipay/ams/api/response/pay/alipay_refund_query_response.py +68 -0
  259. com/alipay/ams/api/response/pay/alipay_refund_response.py +111 -0
  260. com/alipay/ams/api/response/risks/__init__.py +0 -0
  261. com/alipay/ams/api/response/risks/inquiry_risk_score_response.py +42 -0
  262. com/alipay/ams/api/response/risks/risk_decide_response.py +34 -0
  263. com/alipay/ams/api/response/risks/risk_report_response.py +11 -0
  264. com/alipay/ams/api/response/risks/send_payment_result_response.py +11 -0
  265. com/alipay/ams/api/response/risks/send_refund_result_response.py +11 -0
  266. com/alipay/ams/api/response/subscription/__init__.py +0 -0
  267. com/alipay/ams/api/response/subscription/alipay_subscription_cancel_response.py +12 -0
  268. com/alipay/ams/api/response/subscription/alipay_subscription_change_response.py +11 -0
  269. com/alipay/ams/api/response/subscription/alipay_subscription_create_response.py +40 -0
  270. com/alipay/ams/api/response/users/__init__.py +0 -0
  271. com/alipay/ams/api/response/users/alipay_init_authentication_response.py +21 -0
  272. com/alipay/ams/api/response/users/alipay_user_query_info_response.py +37 -0
  273. com/alipay/ams/api/response/users/alipay_verify_authentication_response.py +21 -0
  274. com/alipay/ams/api/response/vaulting/__init__.py +0 -0
  275. com/alipay/ams/api/response/vaulting/alipay_vaulting_payment_method_response.py +50 -0
  276. com/alipay/ams/api/response/vaulting/alipay_vaulting_query_response.py +53 -0
  277. com/alipay/ams/api/response/vaulting/alipay_vaulting_session_response.py +31 -0
  278. com/alipay/ams/api/tools/__init__.py +0 -0
  279. com/alipay/ams/api/tools/constants.py +17 -0
  280. com/alipay/ams/api/tools/date_tools.py +30 -0
  281. com/alipay/ams/api/tools/signature_tool.py +96 -0
  282. com/alipay/ams/api/tools/webhook_tool.py +10 -0
  283. global_open_sdk_python-1.3.0.dist-info/LICENSE +21 -0
  284. global_open_sdk_python-1.3.0.dist-info/METADATA +31 -0
  285. global_open_sdk_python-1.3.0.dist-info/RECORD +287 -0
  286. global_open_sdk_python-1.3.0.dist-info/WHEEL +5 -0
  287. global_open_sdk_python-1.3.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,106 @@
1
+ import json
2
+
3
+ from com.alipay.ams.api.model.amount import Amount
4
+
5
+
6
+ class Plan(object):
7
+ def __init__(self):
8
+ self.__interest_rate = None
9
+ self.__min_installment_amount = None # type: Amount
10
+ self.__max_installment_amount = None # type: Amount
11
+ self.__installment_num = None
12
+ self.__interval = None
13
+ self.__enabled = None
14
+
15
+ @property
16
+ def interest_rate(self):
17
+ return self.__interest_rate
18
+
19
+ @interest_rate.setter
20
+ def interest_rate(self, value):
21
+ self.__interest_rate = value
22
+
23
+ @property
24
+ def min_installment_amount(self):
25
+ return self.__min_installment_amount
26
+
27
+ @min_installment_amount.setter
28
+ def min_installment_amount(self, value):
29
+ self.__min_installment_amount = value
30
+
31
+ @property
32
+ def max_installment_amount(self):
33
+ return self.__max_installment_amount
34
+
35
+ @max_installment_amount.setter
36
+ def max_installment_amount(self, value):
37
+ self.__max_installment_amount = value
38
+
39
+ @property
40
+ def installment_num(self):
41
+ return self.__installment_num
42
+
43
+ @installment_num.setter
44
+ def installment_num(self, value):
45
+ self.__installment_num = value
46
+
47
+ @property
48
+ def interval(self):
49
+ return self.__interval
50
+
51
+ @interval.setter
52
+ def interval(self, value):
53
+ self.__interval = value
54
+
55
+ @property
56
+ def enabled(self):
57
+ return self.__enabled
58
+
59
+ @enabled.setter
60
+ def enabled(self, value):
61
+ self.__enabled = value
62
+
63
+ def to_ams_dict(self):
64
+ params = dict()
65
+ if hasattr(self, "interest_rate") and self.interest_rate:
66
+ params['interestRate'] = self.interest_rate
67
+
68
+ if hasattr(self, "min_installment_amount") and self.min_installment_amount:
69
+ params['minInstallmentAmount'] = self.min_installment_amount.to_ams_dict()
70
+
71
+ if hasattr(self, "max_installment_amount") and self.max_installment_amount:
72
+ params['maxInstallmentAmount'] = self.max_installment_amount.to_ams_dict()
73
+
74
+ if hasattr(self, "installment_num") and self.installment_num:
75
+ params['installmentNum'] = self.installment_num
76
+
77
+ if hasattr(self, "interval") and self.interval:
78
+ params['interval'] = self.interval
79
+
80
+ if hasattr(self, "enabled") and self.enabled:
81
+ params['enabled'] = self.enabled
82
+ return params
83
+
84
+ def parse_rsp_body(self, plan_body):
85
+ if type(plan_body) == str:
86
+ payment_option_body = json.loads(plan_body)
87
+
88
+ if "interestRate" in plan_body:
89
+ self.interest_rate = plan_body["interestRate"]
90
+
91
+ if "minInstallmentAmount" in plan_body:
92
+ self.min_installment_amount = Amount()
93
+ self.min_installment_amount.parse_rsp_body(plan_body["minInstallmentAmount"])
94
+
95
+ if "maxInstallmentAmount" in plan_body:
96
+ self.max_installment_amount = Amount()
97
+ self.max_installment_amount.parse_rsp_body(plan_body["maxInstallmentAmount"])
98
+
99
+ if "installmentNum" in plan_body:
100
+ self.installment_num = plan_body["installmentNum"]
101
+
102
+ if "interval" in plan_body:
103
+ self.interval = plan_body["interval"]
104
+
105
+ if "enabled" in plan_body:
106
+ self.enabled = plan_body["enabled"]
@@ -0,0 +1,11 @@
1
+ from enum import Enum, unique
2
+
3
+
4
+ @unique
5
+ class PresentmentMode(Enum):
6
+ BUNDLE = "BUNDLE"
7
+ TILED = "TILED"
8
+ UNIFIED = "UNIFIED"
9
+
10
+ def to_ams_dict(self):
11
+ return self.name
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env python
2
+ # -*- coding: utf-8 -*-
3
+ from enum import Enum, unique
4
+
5
+
6
+ @unique
7
+ class ProductCodeType(Enum):
8
+ AGREEMENT_PAYMENT = "AGREEMENT_PAYMENT"
9
+ IN_STORE_PAYMENT = "IN_STORE_PAYMENT"
10
+ CASHIER_PAYMENT = "CASHIER_PAYMENT"
11
+
12
+ def to_ams_dict(self):
13
+ return self.name
@@ -0,0 +1,66 @@
1
+ import json
2
+
3
+ from com.alipay.ams.api.model.discount import Discount
4
+ from com.alipay.ams.api.model.interest_free import InterestFree
5
+ from com.alipay.ams.api.model.promotion_type import PromotionType
6
+
7
+
8
+ class PromotionInfo(object):
9
+ def __init__(self):
10
+ self.__promotion_type = None # type:PromotionType
11
+ self.__discount = None # type:Discount
12
+ self.__interest_free = None # type:InterestFree
13
+
14
+ @property
15
+ def promotion_type(self):
16
+ return self.__promotion_type
17
+
18
+ @promotion_type.setter
19
+ def promotion_type(self, value):
20
+ self.__promotion_type = value
21
+
22
+ @property
23
+ def discount(self):
24
+ return self.__discount
25
+
26
+ @discount.setter
27
+ def discount(self, value):
28
+ self.__discount = value
29
+
30
+ @property
31
+ def interest_free(self):
32
+ return self.__interest_free
33
+
34
+ @interest_free.setter
35
+ def interest_free(self, value):
36
+ self.__interest_free = value
37
+
38
+ def to_ams_dict(self):
39
+ params = dict()
40
+ if hasattr(self, "promotion_type") and self.promotion_type:
41
+ params['promotionType'] = self.promotion_type.value
42
+
43
+ if hasattr(self, "discount") and self.discount:
44
+ params['discount'] = self.discount.to_ams_dict()
45
+
46
+ if hasattr(self, "interest_free") and self.interest_free:
47
+ params['interestFree'] = self.interest_free.to_ams_dict()
48
+
49
+ return params
50
+
51
+ def parse_rsp_body(self, promotion_info_body):
52
+ if type(promotion_info_body) == str:
53
+ promotion_info_body = json.loads(promotion_info_body)
54
+
55
+ if 'promotionType' in promotion_info_body:
56
+ self.promotion_type = PromotionType(promotion_info_body['promotionType'])
57
+
58
+ if 'discount' in promotion_info_body:
59
+ discount_result = Discount()
60
+ discount_result.parse_rsp_body(promotion_info_body['discount'])
61
+ self.discount = discount_result
62
+
63
+ if 'interestFree' in promotion_info_body:
64
+ interest_free_result = InterestFree()
65
+ interest_free_result.parse_rsp_body(promotion_info_body['interestFree'])
66
+ self.interest_free = interest_free_result
@@ -0,0 +1,49 @@
1
+ import json
2
+
3
+ from com.alipay.ams.api.model.discount import Discount
4
+ from com.alipay.ams.api.model.promotion_type import PromotionType
5
+
6
+
7
+ class PromotionResult(object):
8
+
9
+ def __init__(self):
10
+ self.__promotion_type = None # type:PromotionType
11
+ self.__discount = None # type:Discount
12
+
13
+ @property
14
+ def promotion_type(self):
15
+ return self.__promotion_type
16
+
17
+ @promotion_type.setter
18
+ def promotion_type(self, promotion_type):
19
+ self.__promotion_type = promotion_type
20
+
21
+ @property
22
+ def discount(self):
23
+ return self.__discount
24
+
25
+ @discount.setter
26
+ def discount(self, discount):
27
+ self.__discount = discount
28
+
29
+ def to_ams_dict(self):
30
+ params = dict()
31
+ if hasattr(self, "promotion_type") and self.promotion_type:
32
+ params['promotionType'] = self.promotion_type
33
+
34
+ if hasattr(self, "discount") and self.discount:
35
+ params['discount'] = self.discount
36
+
37
+ return params
38
+
39
+ def parse_rsp_body(self, promotion_result_body):
40
+ if type(promotion_result_body) == str:
41
+ promotion_result_body = json.loads(promotion_result_body)
42
+
43
+ if 'promotionType' in promotion_result_body:
44
+ self.promotion_type = promotion_result_body['promotionType']
45
+
46
+ if 'discount' in promotion_result_body:
47
+ discount_result = Discount()
48
+ discount_result.parse_rsp_body(promotion_result_body['discount'])
49
+ self.__promotion_result = discount_result
@@ -0,0 +1,10 @@
1
+ from enum import Enum, unique
2
+
3
+
4
+ @unique
5
+ class PromotionType(Enum):
6
+ DISCOUNT = "DISCOUNT"
7
+ INTEREST_FREE = "INTEREST_FREE"
8
+
9
+ def to_ams_dict(self):
10
+ return self.name
@@ -0,0 +1,78 @@
1
+ #!/usr/bin/env python
2
+ # -*- coding: utf-8 -*-
3
+
4
+ import json
5
+
6
+
7
+ class PspCustomerInfo(object):
8
+ def __init__(self):
9
+ self.__psp_name = None
10
+ self.__psp_customer_id = None
11
+ self.__display_customer_id = None
12
+ self.__display_customer_name = None
13
+ self.__customer_2088_id = None
14
+ self.__extend_info = None
15
+
16
+ @property
17
+ def psp_name(self):
18
+ return self.__psp_name
19
+
20
+ @psp_name.setter
21
+ def psp_name(self, value):
22
+ self.__psp_name = value
23
+
24
+ @property
25
+ def psp_customer_id(self):
26
+ return self.__psp_customer_id
27
+
28
+ @psp_customer_id.setter
29
+ def psp_customer_id(self, value):
30
+ self.__psp_customer_id = value
31
+
32
+ @property
33
+ def display_customer_id(self):
34
+ return self.__display_customer_id
35
+
36
+ @display_customer_id.setter
37
+ def display_customer_id(self, value):
38
+ self.__display_customer_id = value
39
+
40
+ @property
41
+ def display_customer_name(self):
42
+ return self.__display_customer_name
43
+
44
+ @display_customer_name.setter
45
+ def display_customer_name(self, value):
46
+ self.__display_customer_name = value
47
+
48
+ @property
49
+ def customer_2088_id(self):
50
+ return self.__customer_2088_id
51
+
52
+ @customer_2088_id.setter
53
+ def customer_2088_id(self, value):
54
+ self.__customer_2088_id = value
55
+
56
+ @property
57
+ def extend_info(self):
58
+ return self.__extend_info
59
+
60
+ @extend_info.setter
61
+ def extend_info(self, value):
62
+ self.__extend_info = value
63
+
64
+ def parse_rsp_body(self, psp_customer_info_body):
65
+ if type(psp_customer_info_body) == str:
66
+ psp_customer_info_body = json.loads(psp_customer_info_body)
67
+ if 'pspName' in psp_customer_info_body:
68
+ self.__psp_name = psp_customer_info_body['pspName']
69
+ if 'pspCustomerId' in psp_customer_info_body:
70
+ self.__psp_customer_id = psp_customer_info_body['pspCustomerId']
71
+ if 'displayCustomerId' in psp_customer_info_body:
72
+ self.__display_customer_id = psp_customer_info_body['displayCustomerId']
73
+ if 'displayCustomerName' in psp_customer_info_body:
74
+ self.__display_customer_name = psp_customer_info_body['displayCustomerName']
75
+ if 'customer2088Id' in psp_customer_info_body:
76
+ self.__customer_2088_id = psp_customer_info_body['customer2088Id']
77
+ if 'extendInfo' in psp_customer_info_body:
78
+ self.__extend_info = psp_customer_info_body['extendInfo']
@@ -0,0 +1,84 @@
1
+ #!/usr/bin/env python
2
+ # -*- coding: utf-8 -*-
3
+
4
+ import json
5
+
6
+
7
+ class Quote(object):
8
+ def __init__(self):
9
+ self.__quote_id = None
10
+ self.__quote_currency_pair = None
11
+ self.__quote_price = None
12
+ self.__quote_start_time = None
13
+ self.__quote_expiry_time = None
14
+ self.__guaranteed = None
15
+
16
+ @property
17
+ def quote_id(self):
18
+ return self.__quote_id
19
+
20
+ @quote_id.setter
21
+ def quote_id(self, value):
22
+ self.__quote_id = value
23
+
24
+ @property
25
+ def quote_currency_pair(self):
26
+ return self.__quote_currency_pair
27
+
28
+ @quote_currency_pair.setter
29
+ def quote_currency_pair(self, value):
30
+ self.__quote_currency_pair = value
31
+
32
+ @property
33
+ def quote_price(self):
34
+ return self.__quote_price
35
+
36
+ @quote_price.setter
37
+ def quote_price(self, value):
38
+ self.__quote_price = value
39
+
40
+ @property
41
+ def quote_start_time(self):
42
+ return self.__quote_start_time
43
+
44
+ @quote_start_time.setter
45
+ def quote_start_time(self, value):
46
+ self.__quote_start_time = value
47
+
48
+ @property
49
+ def quote_expiry_time(self):
50
+ return self.__quote_start_time
51
+
52
+ @quote_expiry_time.setter
53
+ def quote_start_time(self, value):
54
+ self.__quote_expiry_time = value
55
+
56
+ @property
57
+ def guaranteed(self):
58
+ return self.__guaranteed
59
+
60
+ @guaranteed.setter
61
+ def guaranteed(self, value):
62
+ self.__guaranteed = value
63
+
64
+ def parse_rsp_body(self, quote_body):
65
+ if type(quote_body) == str:
66
+ quote_body = json.loads(quote_body)
67
+
68
+ if 'quoteId' in quote_body:
69
+ self.__quote_id = quote_body['quoteId']
70
+
71
+ if 'quoteCurrencyPair' in quote_body:
72
+ self.__quote_currency_pair = quote_body['quoteCurrencyPair']
73
+
74
+ if 'quotePrice' in quote_body:
75
+ self.__quote_price = quote_body['quotePrice']
76
+
77
+ if 'quoteStartTime' in quote_body:
78
+ self.__quote_start_time = quote_body['quoteStartTime']
79
+
80
+ if 'quoteExpiryTime' in quote_body:
81
+ self.__quote_expiry_time = quote_body['quoteExpiryTime']
82
+
83
+ if 'guaranteed' in quote_body:
84
+ self.__guaranteed = quote_body['guaranteed']
@@ -0,0 +1,63 @@
1
+ #!/usr/bin/env python
2
+ # -*- coding: utf-8 -*-
3
+
4
+ import json
5
+
6
+ from com.alipay.ams.api.model.method_type import MethodType
7
+
8
+
9
+ class RedirectActionForm(object):
10
+
11
+ def __init__(self):
12
+ self.__method = None # type:MethodType
13
+ self.__parameters = None
14
+ self.__redirect_url = None
15
+ self.__action_form_type = None
16
+
17
+ @property
18
+ def method(self):
19
+ return self.__method
20
+
21
+ @method.setter
22
+ def method(self, value):
23
+ self.__method = value
24
+
25
+ @property
26
+ def parameters(self):
27
+ return self.__parameters
28
+
29
+ @parameters.setter
30
+ def parameters(self, value):
31
+ self.__parameters = value
32
+
33
+ @property
34
+ def redirect_url(self):
35
+ return self.__redirect_url
36
+
37
+ @redirect_url.setter
38
+ def redirect_url(self, value):
39
+ self.__redirect_url = value
40
+
41
+ @property
42
+ def action_form_type(self):
43
+ return self.__action_form_type
44
+
45
+ @action_form_type.setter
46
+ def action_form_type(self, value):
47
+ self.__action_form_type = value
48
+
49
+ def parse_rsp_body(self, redirect_action_form_body):
50
+ if type(redirect_action_form_body) == str:
51
+ redirect_action_form_body = json.loads(redirect_action_form_body)
52
+
53
+ if 'method' in redirect_action_form_body:
54
+ self.__method = redirect_action_form_body['method']
55
+
56
+ if 'parameters' in redirect_action_form_body:
57
+ self.__parameters = redirect_action_form_body['parameters']
58
+
59
+ if 'redirectUrl' in redirect_action_form_body:
60
+ self.__redirect_url = redirect_action_form_body['redirectUrl']
61
+
62
+ if 'actionFormType' in redirect_action_form_body:
63
+ self.__action_form_type = redirect_action_form_body['actionFormType']
@@ -0,0 +1,35 @@
1
+ import json
2
+
3
+ from com.alipay.ams.api.model.amount import Amount
4
+ from com.alipay.ams.api.model.refund_from_type import RefundFromType
5
+
6
+
7
+ class RefundDetail(object):
8
+ def __init__(self):
9
+ self.__refund_amount = None # type:Amount
10
+ self.__refund_from = None # type:RefundFromType
11
+
12
+ @property
13
+ def refund_amount(self):
14
+ return self.__refund_amount
15
+
16
+ @refund_amount.setter
17
+ def refund_amount(self, value):
18
+ self.__refund_amount = value
19
+
20
+ @property
21
+ def refund_from(self):
22
+ return self.__refund_from
23
+
24
+ @refund_from.setter
25
+ def refund_from(self, value):
26
+ self.__refund_from = value
27
+
28
+ def parse_rsp_body(self, quote_body):
29
+ if type(quote_body) == str:
30
+ quote_body = json.loads(quote_body)
31
+ if 'refundAmount' in quote_body:
32
+ self.__refund_amount = Amount()
33
+ self.__refund_amount.parse_rsp_body(quote_body['refundAmount'])
34
+ if 'refundFrom' in quote_body:
35
+ self.__refund_from = quote_body['refundFrom']
@@ -0,0 +1,11 @@
1
+ from enum import Enum, unique
2
+
3
+
4
+ @unique
5
+ class RefundFromType(Enum):
6
+ SELLER = "SELLER"
7
+ MARKETPLACE = "MARKETPLACE"
8
+ UNSETTLED_FUNDS = "UNSETTLED_FUNDS"
9
+
10
+ def to_ams_dict(self):
11
+ return self.name
@@ -0,0 +1,66 @@
1
+ from com.alipay.ams.api.model.amount import Amount
2
+
3
+
4
+ class RefundRecord:
5
+ def __init__(self):
6
+ self.__reference_order_id = None
7
+ self.__reference_goods_id = None
8
+ self.__amount = None #type: Amount
9
+ self.__refund_reason = None
10
+ self.__refund_time = None
11
+
12
+ @property
13
+ def reference_order_id(self):
14
+ return self.__reference_order_id
15
+
16
+ @reference_order_id.setter
17
+ def reference_order_id(self, value):
18
+ self.__reference_order_id = value
19
+
20
+ @property
21
+ def reference_goods_id(self):
22
+ return self.__reference_goods_id
23
+
24
+ @reference_goods_id.setter
25
+ def reference_goods_id(self, value):
26
+ self.__reference_goods_id = value
27
+
28
+ @property
29
+ def amount(self):
30
+ return self.__amount
31
+
32
+ @amount.setter
33
+ def amount(self, value):
34
+ self.__amount = value
35
+
36
+ @property
37
+ def refund_reason(self):
38
+ return self.__refund_reason
39
+
40
+ @refund_reason.setter
41
+ def refund_reason(self, value):
42
+ self.__refund_reason = value
43
+
44
+ @property
45
+ def refund_time(self):
46
+ return self.__refund_time
47
+
48
+ @refund_time.setter
49
+ def refund_time(self, value ):
50
+ self.__refund_time = value
51
+
52
+
53
+ def to_ams_dict(self):
54
+ params = dict()
55
+ if self.__reference_order_id is not None:
56
+ params['referenceOrderId'] = self.__reference_order_id
57
+ if self.__reference_goods_id is not None:
58
+ params['referenceGoodsId'] = self.__reference_goods_id
59
+ if self.__amount is not None:
60
+ params['amount'] = self.__amount.to_ams_dict()
61
+ if self.__refund_reason is not None:
62
+ params['refundReason'] = self.__refund_reason
63
+ if self.__refund_time is not None:
64
+ params['refundTime'] = self.__refund_time
65
+
66
+ return params