dana-python 2.1.7__tar.gz → 2.1.9__tar.gz
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.
- {dana_python-2.1.7/dana_python.egg-info → dana_python-2.1.9}/PKG-INFO +1 -1
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/enum.py +1 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/create_shop_request.py +2 -2
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/merchant_information.py +2 -2
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/shop_resource_info.py +11 -1
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/update_shop_request.py +2 -2
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/webhook/shop_info.py +1 -1
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/webhook/webhook.py +173 -45
- {dana_python-2.1.7 → dana_python-2.1.9/dana_python.egg-info}/PKG-INFO +1 -1
- {dana_python-2.1.7 → dana_python-2.1.9}/pyproject.toml +1 -1
- {dana_python-2.1.7 → dana_python-2.1.9}/tests/test_disbursement_api.py +30 -15
- dana_python-2.1.9/tests/test_webhook.py +275 -0
- dana_python-2.1.7/tests/test_webhook.py +0 -111
- {dana_python-2.1.7 → dana_python-2.1.9}/LICENSE +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/README.md +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/__init__.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/api_client.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/api_response.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/base/__init__.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/base/configuration.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/base/model.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/base/types.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/disbursement/__init__.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/disbursement/v1/__init__.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/disbursement/v1/api/__init__.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/disbursement/v1/api/disbursement_api.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/disbursement/v1/enum.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/disbursement/v1/models/__init__.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/disbursement/v1/models/bank_account_inquiry_request.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/disbursement/v1/models/bank_account_inquiry_request_additional_info.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/disbursement/v1/models/bank_account_inquiry_response.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/disbursement/v1/models/bank_account_inquiry_response_additional_info.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/disbursement/v1/models/dana_account_inquiry_request.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/disbursement/v1/models/dana_account_inquiry_request_additional_info.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/disbursement/v1/models/dana_account_inquiry_response.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/disbursement/v1/models/money.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/disbursement/v1/models/transfer_to_bank_inquiry_status_request.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/disbursement/v1/models/transfer_to_bank_inquiry_status_response.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/disbursement/v1/models/transfer_to_bank_request.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/disbursement/v1/models/transfer_to_bank_request_additional_info.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/disbursement/v1/models/transfer_to_bank_response.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/disbursement/v1/models/transfer_to_dana_inquiry_status_request.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/disbursement/v1/models/transfer_to_dana_inquiry_status_response.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/disbursement/v1/models/transfer_to_dana_request.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/disbursement/v1/models/transfer_to_dana_request_additional_info.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/disbursement/v1/models/transfer_to_dana_response.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/exceptions.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/__init__.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/__init__.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/api/__init__.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/api/merchant_management_api.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/__init__.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/address_info.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/asset_card_list_item.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/business_docs.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/create_division_request.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/create_division_request_ext_info.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/create_division_response.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/create_division_response_response.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/create_division_response_response_body.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/create_division_response_response_head.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/create_shop_response.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/create_shop_response_response.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/create_shop_response_response_body.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/create_shop_response_response_head.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/division_resource_info.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/member_asset_result_info.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/merchant_account_info.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/merchant_certificate_info.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/merchant_contact_address.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/merchant_contact_email.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/merchant_contact_mobile_no.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/merchant_corporate_certificate.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/merchant_resource_information.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/mobile_no_info.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/pic_info.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/query_asset_card_list_request.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/query_asset_card_list_response.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/query_asset_card_list_response_response.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/query_asset_card_list_response_response_body.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/query_asset_card_list_response_response_head.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/query_division_request.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/query_division_response.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/query_division_response_response.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/query_division_response_response_body.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/query_division_response_response_head.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/query_merchant_info_request.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/query_merchant_info_response.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/query_merchant_info_response_response.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/query_merchant_info_response_response_body.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/query_merchant_info_response_response_head.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/query_merchant_resource_request.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/query_merchant_resource_response.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/query_merchant_resource_response_response.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/query_merchant_resource_response_response_body.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/query_merchant_resource_response_response_head.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/query_shop_request.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/query_shop_response.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/query_shop_response_response.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/query_shop_response_response_body.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/query_shop_response_response_head.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/result_info.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/update_division_request.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/update_division_response.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/update_division_response_response.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/update_division_response_response_body.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/update_division_response_response_head.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/update_shop_response.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/update_shop_response_response.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/update_shop_response_response_head.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/user_name.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/payment_gateway/__init__.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/payment_gateway/v1/__init__.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/payment_gateway/v1/api/__init__.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/payment_gateway/v1/api/payment_gateway_api.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/payment_gateway/v1/custom_validation.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/payment_gateway/v1/enum.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/payment_gateway/v1/models/__init__.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/payment_gateway/v1/models/actor_context.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/payment_gateway/v1/models/amount_detail.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/payment_gateway/v1/models/audit_info.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/payment_gateway/v1/models/buyer.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/payment_gateway/v1/models/cancel_order_request.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/payment_gateway/v1/models/cancel_order_response.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/payment_gateway/v1/models/consult_pay_payment_info.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/payment_gateway/v1/models/consult_pay_request.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/payment_gateway/v1/models/consult_pay_request_additional_info.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/payment_gateway/v1/models/consult_pay_response.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/payment_gateway/v1/models/create_order_by_api_additional_info.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/payment_gateway/v1/models/create_order_by_api_request.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/payment_gateway/v1/models/create_order_by_redirect_additional_info.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/payment_gateway/v1/models/create_order_by_redirect_request.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/payment_gateway/v1/models/create_order_response.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/payment_gateway/v1/models/create_order_response_additional_info.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/payment_gateway/v1/models/env_info.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/payment_gateway/v1/models/goods.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/payment_gateway/v1/models/money.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/payment_gateway/v1/models/order_api_object.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/payment_gateway/v1/models/order_redirect_object.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/payment_gateway/v1/models/pay_option_additional_info.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/payment_gateway/v1/models/pay_option_detail.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/payment_gateway/v1/models/pay_option_info.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/payment_gateway/v1/models/payment_view.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/payment_gateway/v1/models/promo_info.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/payment_gateway/v1/models/query_payment_request.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/payment_gateway/v1/models/query_payment_response.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/payment_gateway/v1/models/query_payment_response_additional_info.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/payment_gateway/v1/models/refund_option_bill.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/payment_gateway/v1/models/refund_order_request.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/payment_gateway/v1/models/refund_order_request_additional_info.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/payment_gateway/v1/models/refund_order_response.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/payment_gateway/v1/models/seller.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/payment_gateway/v1/models/shipping_info.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/payment_gateway/v1/models/status_detail.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/payment_gateway/v1/models/time_detail.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/payment_gateway/v1/models/url_param.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/payment_gateway/v1/models/virtual_account_info.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/rest.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/utils/date_validation.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/utils/models.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/utils/open_api_configuration.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/utils/open_api_header.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/utils/script.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/utils/snap_configuration.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/utils/snap_header.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/utils/url.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/webhook/__init__.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/webhook/finish_notify_payment_info.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/webhook/finish_notify_request.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/webhook/finish_notify_request_additional_info.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/webhook/finish_notify_response.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/webhook/money.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/webhook/pay_option_info.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/__init__.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/__init__.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/api/__init__.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/api/widget_api.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/custom_validation.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/enum.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/__init__.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/account_info.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/account_unbinding_request.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/account_unbinding_request_additional_info.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/account_unbinding_response.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/amount_detail.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/apply_ott_request.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/apply_ott_request_additional_info.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/apply_ott_response.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/apply_ott_response_user_resources_inner.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/apply_token_authorization_code_request.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/apply_token_refresh_token_request.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/apply_token_response.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/apply_token_response_additional_info.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/apply_token_response_additional_info_user_info.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/balance_inquiry_request.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/balance_inquiry_request_additional_info.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/balance_inquiry_response.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/buyer.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/cancel_order_request.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/cancel_order_response.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/env_info.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/goods.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/international_order_info.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/international_order_info_exchange_rate.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/money.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/oauth2_url_data.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/oauth2_url_data_seamless_data.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/order.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/pay_option_detail.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/pay_option_detail_additional_info.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/pay_option_info.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/payment_promo_info.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/payment_view.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/query_payment_request.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/query_payment_response.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/query_payment_response_additional_info.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/query_user_profile_request.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/query_user_profile_response.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/query_user_profile_response_response.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/query_user_profile_response_response_body.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/query_user_profile_response_response_head.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/refund_order_request.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/refund_order_request_additional_info.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/refund_order_response.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/refund_promo_info.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/result_info.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/seller.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/service_info.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/shipping_info.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/status_detail.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/time_detail.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/url_param.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/user_resource_info.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/virtual_account_info.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/widget_payment_request.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/widget_payment_request_additional_info.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/models/widget_payment_response.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana/widget/v1/util.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana_python.egg-info/SOURCES.txt +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana_python.egg-info/dependency_links.txt +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana_python.egg-info/requires.txt +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/dana_python.egg-info/top_level.txt +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/setup.cfg +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/tests/test_merchant_management_api.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/tests/test_payment_gateway_api.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/tests/test_payment_gateway_with_automation.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/tests/test_snap_header.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/tests/test_widget_api.py +0 -0
- {dana_python-2.1.7 → dana_python-2.1.9}/tests/test_widget_with_automation.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dana-python
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.9
|
|
4
4
|
Summary: API Client (SDK) for DANA APIs based on https://dashboard.dana.id/api-docs
|
|
5
5
|
Author-email: DANA Package Manager <package-manager@dana.id>
|
|
6
6
|
Maintainer-email: DANA Package Manager <package-manager@dana.id>
|
{dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/create_shop_request.py
RENAMED
|
@@ -94,8 +94,8 @@ class CreateShopRequest(BaseModel, BaseSdkModel):
|
|
|
94
94
|
@field_validator('size_type')
|
|
95
95
|
def size_type_validate_enum(cls, value):
|
|
96
96
|
"""Validates the enum"""
|
|
97
|
-
if value not in set(['UMI', 'UKE', 'UME', 'UBE']):
|
|
98
|
-
raise ValueError("must be one of enum values ('UMI', 'UKE', 'UME', 'UBE')")
|
|
97
|
+
if value not in set(['UMI', 'UKE', 'UME', 'UBE', 'URE']):
|
|
98
|
+
raise ValueError("must be one of enum values ('UMI', 'UKE', 'UME', 'UBE', 'URE')")
|
|
99
99
|
return value
|
|
100
100
|
|
|
101
101
|
@field_validator('tax_no')
|
{dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/merchant_information.py
RENAMED
|
@@ -123,8 +123,8 @@ class MerchantInformation(BaseModel, BaseSdkModel):
|
|
|
123
123
|
if value is None:
|
|
124
124
|
return value
|
|
125
125
|
|
|
126
|
-
if value not in set(['UMI', 'UKE', 'UME', 'UBE']):
|
|
127
|
-
raise ValueError("must be one of enum values ('UMI', 'UKE', 'UME', 'UBE')")
|
|
126
|
+
if value not in set(['UMI', 'UKE', 'UME', 'UBE', 'URE']):
|
|
127
|
+
raise ValueError("must be one of enum values ('UMI', 'UKE', 'UME', 'UBE', 'URE')")
|
|
128
128
|
return value
|
|
129
129
|
|
|
130
130
|
@field_validator('tax_no')
|
{dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/shop_resource_info.py
RENAMED
|
@@ -34,7 +34,7 @@ import json
|
|
|
34
34
|
|
|
35
35
|
from dana.base.model import BaseSdkModel
|
|
36
36
|
|
|
37
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
37
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
|
38
38
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
39
39
|
from dana.merchant_management.v1.models.address_info import AddressInfo
|
|
40
40
|
from typing import Optional, Set
|
|
@@ -60,6 +60,16 @@ class ShopResourceInfo(BaseModel, BaseSdkModel):
|
|
|
60
60
|
nmid: Optional[StrictStr] = Field(default=None, description="Network merchant identifier")
|
|
61
61
|
__properties: ClassVar[List[str]] = ["merchantId", "parentDivisionId", "parentRoleType", "mainName", "sizeType", "shopAddress", "externalShopId", "logoUrlMap", "extInfo", "ln", "lat", "nmid"]
|
|
62
62
|
|
|
63
|
+
@field_validator('size_type')
|
|
64
|
+
def size_type_validate_enum(cls, value):
|
|
65
|
+
"""Validates the enum"""
|
|
66
|
+
if value is None:
|
|
67
|
+
return value
|
|
68
|
+
|
|
69
|
+
if value not in set(['UMI', 'UKE', 'UME', 'UBE', 'URE']):
|
|
70
|
+
raise ValueError("must be one of enum values ('UMI', 'UKE', 'UME', 'UBE', 'URE')")
|
|
71
|
+
return value
|
|
72
|
+
|
|
63
73
|
model_config = ConfigDict(
|
|
64
74
|
populate_by_name=True,
|
|
65
75
|
validate_assignment=True,
|
{dana_python-2.1.7 → dana_python-2.1.9}/dana/merchant_management/v1/models/update_shop_request.py
RENAMED
|
@@ -98,8 +98,8 @@ class UpdateShopRequest(BaseModel, BaseSdkModel):
|
|
|
98
98
|
if value is None:
|
|
99
99
|
return value
|
|
100
100
|
|
|
101
|
-
if value not in set(['UMI', 'UKE', 'UME', 'UBE']):
|
|
102
|
-
raise ValueError("must be one of enum values ('UMI', 'UKE', 'UME', 'UBE')")
|
|
101
|
+
if value not in set(['UMI', 'UKE', 'UME', 'UBE', 'URE']):
|
|
102
|
+
raise ValueError("must be one of enum values ('UMI', 'UKE', 'UME', 'UBE', 'URE')")
|
|
103
103
|
return value
|
|
104
104
|
|
|
105
105
|
@field_validator('loyalty')
|
|
@@ -36,7 +36,7 @@ class ShopInfo(BaseModel, BaseSdkModel):
|
|
|
36
36
|
shop_id: Optional[Annotated[str, Field(strict=True, max_length=64)]] = Field(default=None, description="Information of shop identifier. Required if externalShopId is blank")
|
|
37
37
|
external_shop_id: Optional[Annotated[str, Field(strict=True, max_length=64)]] = Field(default=None, description="Information of external shop identifier. Required if shopId is blank")
|
|
38
38
|
operator_id: Optional[Annotated[str, Field(strict=True, max_length=32)]] = Field(default=None, description="Information of operator identifier")
|
|
39
|
-
shop_address: Optional[
|
|
39
|
+
shop_address: Optional[str] = Field(default=None, description="Information of shop address")
|
|
40
40
|
division_id: Optional[Annotated[str, Field(strict=True, max_length=64)]] = Field(default=None, description="Information of division identifier")
|
|
41
41
|
external_division_id: Optional[Annotated[str, Field(strict=True, max_length=64)]] = Field(default=None, description="Information of external division identifier")
|
|
42
42
|
division_type: Optional[Annotated[str, Field(strict=True, max_length=32)]] = Field(default=None, description="Information of division type")
|
|
@@ -141,6 +141,27 @@ class WebhookParser:
|
|
|
141
141
|
except Exception as e:
|
|
142
142
|
return "", Exception(f"MinifyJSON: failed to marshal JSON for minification: {e}")
|
|
143
143
|
|
|
144
|
+
@staticmethod
|
|
145
|
+
def _has_triple_escaped_json_string_field(json_str: str) -> bool:
|
|
146
|
+
return '":"{\\\\\\"' in json_str
|
|
147
|
+
|
|
148
|
+
@staticmethod
|
|
149
|
+
def _process_over_escaped_minified_json(json_str: str) -> str:
|
|
150
|
+
normalized = json_str.replace('\\\\"', '"')
|
|
151
|
+
return WebhookParser._process_nested_json_fields(normalized)
|
|
152
|
+
|
|
153
|
+
@staticmethod
|
|
154
|
+
def _process_nested_json_fields(json_str: str) -> str:
|
|
155
|
+
normalized_str = json_str.replace('\\\\"', '\\"')
|
|
156
|
+
|
|
157
|
+
def replace_func(match):
|
|
158
|
+
field_name = match.group(1)
|
|
159
|
+
json_value = match.group(2)
|
|
160
|
+
escaped_value = json_value.replace('"', '\\"')
|
|
161
|
+
return f'"{field_name}":"{escaped_value}"'
|
|
162
|
+
|
|
163
|
+
return re.sub(r'"(\w+)":"(\{.*?\})"', replace_func, normalized_str)
|
|
164
|
+
|
|
144
165
|
@staticmethod
|
|
145
166
|
def _ensure_minified_json(json_str: str) -> tuple[str, Exception]:
|
|
146
167
|
"""
|
|
@@ -148,27 +169,109 @@ class WebhookParser:
|
|
|
148
169
|
Returns tuple of (minified_json, error)
|
|
149
170
|
"""
|
|
150
171
|
try:
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
processed_str = re.sub(pattern, replace_func, normalized_str)
|
|
161
|
-
|
|
172
|
+
if WebhookParser._is_json_minified(json_str) and not WebhookParser._has_triple_escaped_json_string_field(json_str):
|
|
173
|
+
return json_str, None
|
|
174
|
+
|
|
175
|
+
if WebhookParser._is_json_minified(json_str):
|
|
176
|
+
return WebhookParser._process_over_escaped_minified_json(json_str), None
|
|
177
|
+
|
|
178
|
+
normalized_str = json_str.replace('\\\\"', '\\"')
|
|
179
|
+
processed_str = WebhookParser._process_nested_json_fields(normalized_str)
|
|
180
|
+
|
|
162
181
|
if WebhookParser._is_json_minified(processed_str):
|
|
163
182
|
return processed_str, None
|
|
164
|
-
|
|
183
|
+
|
|
165
184
|
return WebhookParser._minify_json(processed_str)
|
|
166
|
-
|
|
185
|
+
|
|
167
186
|
except json.JSONDecodeError as e:
|
|
168
187
|
return "", Exception(f"EnsureMinifiedJSON: failed to unmarshal JSON: {e}")
|
|
169
188
|
except Exception as e:
|
|
170
189
|
return "", Exception(f"EnsureMinifiedJSON: failed to marshal JSON for minification: {e}")
|
|
171
190
|
|
|
191
|
+
@staticmethod
|
|
192
|
+
def _is_valid_json(json_str: str) -> bool:
|
|
193
|
+
try:
|
|
194
|
+
json.loads(json_str)
|
|
195
|
+
return True
|
|
196
|
+
except json.JSONDecodeError:
|
|
197
|
+
return False
|
|
198
|
+
|
|
199
|
+
@staticmethod
|
|
200
|
+
def _collapse_triple_backslash_quotes(s: str) -> str:
|
|
201
|
+
if '\\\\\\"' not in s:
|
|
202
|
+
return s
|
|
203
|
+
return s.replace('\\\\\\"', '\\"')
|
|
204
|
+
|
|
205
|
+
@staticmethod
|
|
206
|
+
def _collapse_double_backslash_quotes(s: str) -> str:
|
|
207
|
+
if '\\\\"' not in s:
|
|
208
|
+
return s
|
|
209
|
+
return s.replace('\\\\"', '"')
|
|
210
|
+
|
|
211
|
+
@staticmethod
|
|
212
|
+
def _remove_colon_space_before_quoted_value(s: str) -> str:
|
|
213
|
+
if ': \\"' not in s:
|
|
214
|
+
return s
|
|
215
|
+
return s.replace(': \\"', ':\\"')
|
|
216
|
+
|
|
217
|
+
@staticmethod
|
|
218
|
+
def _normalize_over_escaped_quotes(s: str) -> str:
|
|
219
|
+
if '\\\\"' in s:
|
|
220
|
+
return s.replace('\\\\"', '\\"')
|
|
221
|
+
return s
|
|
222
|
+
|
|
223
|
+
@staticmethod
|
|
224
|
+
def _body_forms_for_signature(request_body: str) -> list[str]:
|
|
225
|
+
seen: set[str] = set()
|
|
226
|
+
forms: list[str] = []
|
|
227
|
+
|
|
228
|
+
def add(form: str) -> None:
|
|
229
|
+
if form and form not in seen:
|
|
230
|
+
seen.add(form)
|
|
231
|
+
forms.append(form)
|
|
232
|
+
|
|
233
|
+
collapsed = WebhookParser._collapse_triple_backslash_quotes(request_body)
|
|
234
|
+
if collapsed != request_body and WebhookParser._is_valid_json(collapsed):
|
|
235
|
+
add(collapsed)
|
|
236
|
+
|
|
237
|
+
collapsed_spaced = WebhookParser._remove_colon_space_before_quoted_value(collapsed)
|
|
238
|
+
if collapsed_spaced != request_body and WebhookParser._is_valid_json(collapsed_spaced):
|
|
239
|
+
add(collapsed_spaced)
|
|
240
|
+
|
|
241
|
+
collapsed = WebhookParser._collapse_double_backslash_quotes(request_body)
|
|
242
|
+
if collapsed != request_body and WebhookParser._is_valid_json(collapsed):
|
|
243
|
+
add(collapsed)
|
|
244
|
+
|
|
245
|
+
spaced = WebhookParser._remove_colon_space_before_quoted_value(request_body)
|
|
246
|
+
if spaced != request_body and WebhookParser._is_valid_json(spaced):
|
|
247
|
+
add(spaced)
|
|
248
|
+
|
|
249
|
+
collapsed = WebhookParser._collapse_triple_backslash_quotes(spaced)
|
|
250
|
+
if collapsed != request_body and WebhookParser._is_valid_json(collapsed):
|
|
251
|
+
add(collapsed)
|
|
252
|
+
|
|
253
|
+
if WebhookParser._is_valid_json(request_body):
|
|
254
|
+
add(request_body)
|
|
255
|
+
|
|
256
|
+
normalized = WebhookParser._normalize_over_escaped_quotes(request_body)
|
|
257
|
+
if normalized != request_body and WebhookParser._is_json_minified(normalized) and WebhookParser._is_valid_json(normalized):
|
|
258
|
+
add(normalized)
|
|
259
|
+
|
|
260
|
+
nested_processed = WebhookParser._process_nested_json_fields(request_body)
|
|
261
|
+
if nested_processed != request_body:
|
|
262
|
+
add(nested_processed)
|
|
263
|
+
|
|
264
|
+
minified, err = WebhookParser._ensure_minified_json(request_body)
|
|
265
|
+
if err:
|
|
266
|
+
if not forms:
|
|
267
|
+
raise ValueError("failed to prepare any signature body form") from err
|
|
268
|
+
else:
|
|
269
|
+
add(minified)
|
|
270
|
+
|
|
271
|
+
if not forms:
|
|
272
|
+
raise ValueError("failed to prepare any signature body form")
|
|
273
|
+
return forms
|
|
274
|
+
|
|
172
275
|
@staticmethod
|
|
173
276
|
def _sha256_lower_hex(data: str) -> str:
|
|
174
277
|
return hashlib.sha256(data.encode("utf-8")).hexdigest()
|
|
@@ -179,13 +282,38 @@ class WebhookParser:
|
|
|
179
282
|
relative_path_url: str,
|
|
180
283
|
body: str,
|
|
181
284
|
x_timestamp: str
|
|
182
|
-
) ->
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
285
|
+
) -> str:
|
|
286
|
+
path = relative_path_url if relative_path_url.startswith("/") else f"/{relative_path_url}"
|
|
287
|
+
body_hash = self._sha256_lower_hex(body)
|
|
288
|
+
return f"{http_method.upper()}:{path}:{body_hash}:{x_timestamp}"
|
|
289
|
+
|
|
290
|
+
def _verify_signature(
|
|
291
|
+
self,
|
|
292
|
+
http_method: str,
|
|
293
|
+
relative_path_url: str,
|
|
294
|
+
body: str,
|
|
295
|
+
x_timestamp: str,
|
|
296
|
+
x_signature: str,
|
|
297
|
+
) -> None:
|
|
298
|
+
body_forms = self._body_forms_for_signature(body)
|
|
299
|
+
signature_bytes = base64.b64decode(x_signature)
|
|
300
|
+
|
|
301
|
+
for body_form in body_forms:
|
|
302
|
+
string_to_verify = self._construct_string_to_verify(
|
|
303
|
+
http_method, relative_path_url, body_form, x_timestamp
|
|
304
|
+
)
|
|
305
|
+
try:
|
|
306
|
+
self.public_key.verify(
|
|
307
|
+
signature_bytes,
|
|
308
|
+
string_to_verify.encode("utf-8"),
|
|
309
|
+
padding.PKCS1v15(),
|
|
310
|
+
hashes.SHA256(),
|
|
311
|
+
)
|
|
312
|
+
return
|
|
313
|
+
except InvalidSignature:
|
|
314
|
+
continue
|
|
315
|
+
|
|
316
|
+
raise ValueError("Signature verification failed.")
|
|
189
317
|
|
|
190
318
|
def parse_webhook(
|
|
191
319
|
self,
|
|
@@ -200,33 +328,33 @@ class WebhookParser:
|
|
|
200
328
|
if not x_signature or not x_timestamp:
|
|
201
329
|
raise ValueError("Missing X-SIGNATURE or X-TIMESTAMP header.")
|
|
202
330
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
331
|
+
self._verify_signature(http_method, relative_path_url, body, x_timestamp, x_signature)
|
|
332
|
+
|
|
333
|
+
# Try multiple body transformations for parsing in order of likelihood:
|
|
334
|
+
# 1. Collapsed triple-backslash form (handles over-escaped \\\" → \")
|
|
335
|
+
# 2. Process nested JSON fields (handles bare-quote inner JSON like "field":"{...}")
|
|
336
|
+
# 3. ensureMinifiedJson fallback for pretty-printed bodies
|
|
337
|
+
payload_dict = None
|
|
338
|
+
for candidate in [
|
|
339
|
+
self._collapse_triple_backslash_quotes(body),
|
|
340
|
+
self._process_nested_json_fields(body),
|
|
341
|
+
]:
|
|
342
|
+
try:
|
|
343
|
+
payload_dict = json.loads(candidate)
|
|
344
|
+
break
|
|
345
|
+
except json.JSONDecodeError:
|
|
346
|
+
continue
|
|
347
|
+
|
|
348
|
+
if payload_dict is None:
|
|
349
|
+
processed_body, err = self._ensure_minified_json(body)
|
|
350
|
+
if err:
|
|
351
|
+
raise ValueError(f"Failed to process JSON body: {err}")
|
|
352
|
+
try:
|
|
353
|
+
payload_dict = json.loads(processed_body)
|
|
354
|
+
except json.JSONDecodeError:
|
|
355
|
+
raise ValueError("Invalid JSON in request body.")
|
|
221
356
|
|
|
222
|
-
processed_body, err = self._ensure_minified_json(body)
|
|
223
|
-
if err:
|
|
224
|
-
raise ValueError(f"Failed to process JSON body: {err}")
|
|
225
|
-
|
|
226
357
|
try:
|
|
227
|
-
payload_dict = json.loads(processed_body)
|
|
228
358
|
return FinishNotifyRequest.from_dict(payload_dict)
|
|
229
|
-
except json.JSONDecodeError:
|
|
230
|
-
raise ValueError("Invalid JSON in request body.")
|
|
231
359
|
except Exception as e:
|
|
232
360
|
raise ValueError(f"Failed to parse body into FinishNotifyRequest: {e}")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dana-python
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.9
|
|
4
4
|
Summary: API Client (SDK) for DANA APIs based on https://dashboard.dana.id/api-docs
|
|
5
5
|
Author-email: DANA Package Manager <package-manager@dana.id>
|
|
6
6
|
Maintainer-email: DANA Package Manager <package-manager@dana.id>
|
|
@@ -39,6 +39,7 @@ from tests.fixtures.disbursement import (
|
|
|
39
39
|
get_transfer_to_bank_inquiry_status_request,
|
|
40
40
|
get_transfer_to_dana_inquiry_status_request
|
|
41
41
|
)
|
|
42
|
+
from tests.helpers.disbursement_customer_retry import with_customer_number_retry
|
|
42
43
|
|
|
43
44
|
|
|
44
45
|
class TestDisbursementApi:
|
|
@@ -47,11 +48,16 @@ class TestDisbursementApi:
|
|
|
47
48
|
def test_dana_account_inquiry_success(self, api_instance_disbursement: DisbursementApi):
|
|
48
49
|
"""Should give success response and validate DANA account inquiry functionality"""
|
|
49
50
|
|
|
50
|
-
# Arrange
|
|
51
51
|
request = get_dynamic_dana_account_inquiry_request()
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
partner_reference_no = request.partner_reference_no
|
|
53
|
+
|
|
54
|
+
def run(customer_number: str):
|
|
55
|
+
attempt = get_dynamic_dana_account_inquiry_request()
|
|
56
|
+
attempt.partner_reference_no = partner_reference_no
|
|
57
|
+
attempt.customer_number = customer_number
|
|
58
|
+
return api_instance_disbursement.dana_account_inquiry(attempt)
|
|
59
|
+
|
|
60
|
+
api_response, _ = with_customer_number_retry(run)
|
|
55
61
|
|
|
56
62
|
# Assert - Check response structure and required fields
|
|
57
63
|
assert isinstance(api_response, DanaAccountInquiryResponse)
|
|
@@ -80,10 +86,7 @@ class TestDisbursementApi:
|
|
|
80
86
|
def test_bank_account_inquiry_success(self, api_instance_disbursement: DisbursementApi):
|
|
81
87
|
"""Should give success response and validate bank account inquiry functionality"""
|
|
82
88
|
|
|
83
|
-
# Arrange
|
|
84
89
|
request = get_dynamic_bank_account_inquiry_request()
|
|
85
|
-
|
|
86
|
-
# Act
|
|
87
90
|
api_response = api_instance_disbursement.bank_account_inquiry(request)
|
|
88
91
|
|
|
89
92
|
# Assert - Check response structure and required fields
|
|
@@ -160,11 +163,16 @@ class TestDisbursementApi:
|
|
|
160
163
|
def test_transfer_to_dana_success(self, api_instance_disbursement: DisbursementApi):
|
|
161
164
|
"""Should successfully perform transfer to DANA operation"""
|
|
162
165
|
|
|
163
|
-
# Arrange
|
|
164
166
|
request = get_dynamic_transfer_to_dana_request()
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
167
|
+
partner_reference_no = request.partner_reference_no
|
|
168
|
+
|
|
169
|
+
def run(customer_number: str):
|
|
170
|
+
attempt = get_dynamic_transfer_to_dana_request()
|
|
171
|
+
attempt.partner_reference_no = partner_reference_no
|
|
172
|
+
attempt.customer_number = customer_number
|
|
173
|
+
return api_instance_disbursement.transfer_to_dana(attempt)
|
|
174
|
+
|
|
175
|
+
api_response, _ = with_customer_number_retry(run)
|
|
168
176
|
|
|
169
177
|
# Assert
|
|
170
178
|
assert isinstance(api_response, TransferToDanaResponse)
|
|
@@ -179,13 +187,20 @@ class TestDisbursementApi:
|
|
|
179
187
|
def test_transfer_to_dana_inquiry_status_success(self, api_instance_disbursement: DisbursementApi):
|
|
180
188
|
"""Should successfully inquire transfer to DANA status"""
|
|
181
189
|
|
|
182
|
-
# Arrange - First perform a transfer to DANA to get a valid reference
|
|
183
190
|
transfer_request = get_dynamic_transfer_to_dana_request()
|
|
184
|
-
|
|
185
|
-
|
|
191
|
+
partner_reference_no = transfer_request.partner_reference_no
|
|
192
|
+
|
|
193
|
+
def run_transfer(customer_number: str):
|
|
194
|
+
attempt = get_dynamic_transfer_to_dana_request()
|
|
195
|
+
attempt.partner_reference_no = partner_reference_no
|
|
196
|
+
attempt.customer_number = customer_number
|
|
197
|
+
return api_instance_disbursement.transfer_to_dana(attempt)
|
|
198
|
+
|
|
199
|
+
transfer_response, _ = with_customer_number_retry(run_transfer)
|
|
200
|
+
|
|
186
201
|
# Create inquiry status request using the transfer response
|
|
187
202
|
inquiry_request = get_transfer_to_dana_inquiry_status_request(
|
|
188
|
-
transfer_response.partner_reference_no
|
|
203
|
+
transfer_response.partner_reference_no or partner_reference_no
|
|
189
204
|
)
|
|
190
205
|
|
|
191
206
|
# Wait a bit before checking status
|