Package: nomad-broker-cli
nomad_broker_cliNomad payment provider aggregation, including make payments, and customs declaration for orders and etc.This Python package is automatically generated by theOpenAPI Generatorproject:API version: 1.7.0Package version: 1.7.0Build package: org.openapitools.codegen.languages.PythonClientCodegenRequirements.Python >= 3.6Installation & Usagepip installIf the python package is hosted on a repository, you can install directly using:pipinstallgit+https://github.com/GIT_USER_ID/GIT_REPO_ID.git(you may need to runpipwith root permission:sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)Then import the package:importnomad_broker_cliSetuptoolsInstall viaSetuptools.pythonsetup.pyinstall--user(orsudo python setup.py installto install the package for all users)Then import the package:importnomad_broker_cliGetting StartedPlease follow theinstallation procedureand then run the following:importtimeimportnomad_broker_clifrompprintimportpprintfromnomad_broker_cli.apiimportcustoms_apifromnomad_broker_cli.model.base_api_responseimportBaseApiResponsefromnomad_broker_cli.model.customs_codeimportCustomsCodefromnomad_broker_cli.model.customs_identification_requestimportCustomsIdentificationRequestfromnomad_broker_cli.model.customs_identification_responseimportCustomsIdentificationResponsefromnomad_broker_cli.model.customs_payment_redeclare_requestimportCustomsPaymentRedeclareRequestfromnomad_broker_cli.model.customs_payment_requestimportCustomsPaymentRequestfromnomad_broker_cli.model.customs_payment_responseimportCustomsPaymentResponsefromnomad_broker_cli.model.customs_payments_responseimportCustomsPaymentsResponsefromnomad_broker_cli.model.error_api_responseimportErrorApiResponsefromnomad_broker_cli.model.payment_methodimportPaymentMethod# Defining the host is optional and defaults to https://nomad.samarkand-global.cn/broker/v1# See configuration.py for a list of all supported configuration parameters.configuration=nomad_broker_cli.Configuration(host="https://nomad.samarkand-global.cn/broker/v1")# The client must configure the authentication and authorization parameters# in accordance with the API server security policy.# Examples for each auth method are provided below, use the example that# satisfies your auth use case.# Configure API key authorization: authorizationconfiguration.api_key['authorization']='YOUR_API_KEY'# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed# configuration.api_key_prefix['authorization'] = 'Bearer'# Enter a context with an instance of the API clientwithnomad_broker_cli.ApiClient(configuration)asapi_client:# Create an instance of the API classapi_instance=customs_api.CustomsApi(api_client)merchant="wechat.prod"# str | Merchant name to payment company, e.g. wechat.prodcustoms=CustomsCode("GUANGZHOU_ZS")# CustomsCode | Customs code, available options: GUANGZHOU_ZS, HANGZHOU_ZS, NINGBO, ZHENGZHOU_BS, CHONGQING, SHANGHAI_ZS, SHENZHEN, ZHENGZHOU_ZH_ZSorder_no="order_no_example"# str | The internal order number of the merchant system (optional)transaction_id="transaction_id_example"# str | Payment system internal order number (optional)sub_order_no="sub_order_no_example"# str | The internal sub-order number of the merchant system (optional)sub_order_id="sub_order_id_example"# str | The internal sub-order number of the payment company system (optional)payment_method=PaymentMethod("wechatpay")# PaymentMethod | Must be `wechatpay` or `alipay` (optional)try:# GetCustomsPaymentapi_response=api_instance.get_customs_payment(merchant,customs,order_no=order_no,transaction_id=transaction_id,sub_order_no=sub_order_no,sub_order_id=sub_order_id,payment_method=payment_method)pprint(api_response)exceptnomad_broker_cli.ApiExceptionase:print("Exception when calling CustomsApi->get_customs_payment:%s\n"%e)Documentation for API EndpointsAll URIs are relative tohttps://nomad.samarkand-global.cn/broker/v1ClassMethodHTTP requestDescriptionCustomsApiget_customs_paymentGET/customs/payment/{merchant}GetCustomsPaymentCustomsApipost_customs_identificationPOST/customs/identification/{merchant}PostCustomsIdentificationCustomsApipost_customs_paymentPOST/customs/payment/{merchant}PostCustomsPaymentCustomsApiput_customs_paymentPUT/customs/payment/{merchant}PutCustomsPaymentPaymentApiclose_paymentPOST/payment/close/{merchant}/{order_ref}ClosePaymentPaymentApicreate_paymentPOST/payment/{merchant}CreatePaymentPaymentApiinvoke_paymentPOST/payment/invocation/{merchant}InvokePaymentPaymentApiquery_paymentGET/payment/{merchant}QueryPaymentPayoutApiget_abroad_payoutGET/payout/abroad/{merchant}GetAbroadPayoutPayoutApiget_abroad_payout_billGET/payout/bill/abroad/{merchant}GetAbroadPayoutBillPayoutApipost_abroad_payoutPOST/payout/abroad/{merchant}PostAbroadPayoutPayoutApipost_abroad_payout_billPOST/payout/bill/abroad/{merchant}PostAbroadPayoutBillRefundApicreate_refundPOST/refund/{merchant}CreateRefundRefundApiquery_refundGET/refund/{merchant}QueryRefundSettlementApidelete_settlement_receiverDELETE/settlement/receiver/{merchant}DeleteSettlementReceiverSettlementApifinish_settlementPUT/settlement/{merchant}FinishSettlementSettlementApiget_settlementGET/settlement/{merchant}GetSettlementSettlementApiget_settlement_receiverGET/settlement/receiver/{merchant}GetSettlementReceiverSettlementApipost_settlementPOST/settlement/{merchant}PostSettlementSettlementApipost_settlement_receiverPOST/settlement/receiver/{merchant}PostSettlementReceiverDocumentation For ModelsBaseApiResponseCustomsCodeCustomsIdentificationRequestCustomsIdentificationResponseCustomsPaymentOrderCustomsPaymentRedeclareRequestCustomsPaymentRequestCustomsPaymentResponseCustomsPaymentsResponseErrorApiResponseGoodsInfoPaymentCloseResponsePaymentDetailResponsePaymentInvocationRequestPaymentMethodPaymentProductPaymentProductReqPaymentRequestPaymentResponsePaymentTypePayoutBillRequestPayoutRequestPayoutRequestExpressInfoPayoutRequestPayeeInfoPayoutRequestSellerInfoPayoutResponseRefundAccountRefundRequestRefundResponseSettlementReceiverSettlementReceiverRequestSettlementReceiverResponseSettlementRequestSettlementResponseDocumentation For AuthorizationauthorizationType: API keyAPI key parameter name: app-api-keyLocation: URL query stringAuthorben.song@samarkand.globalNotes for Large OpenAPI documentsIf the OpenAPI document is large, imports in nomad_broker_cli.apis and nomad_broker_cli.models may fail with a
RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions:Solution 1:
Use specific imports for apis and models like:from nomad_broker_cli.api.default_api import DefaultApifrom nomad_broker_cli.model.pet import PetSolution 1:
Before importing the package, adjust the maximum recursion limit as shown below:import sys
sys.setrecursionlimit(1500)
import nomad_broker_cli
from nomad_broker_cli.apis import *
from nomad_broker_cli.models import *