Ë
    T>{iýA  ã                   óf   — d Z ddlZddlZddlZddlZddlZddlmZ ddl	m
Z
 h d£Z G d„ de«      Zy)aˆ  
Cashfree Payment Gateway APIs

Cashfree's Payment Gateway APIs provide developers with a streamlined pathway to integrate advanced payment processing capabilities into their applications, platforms and websites.

The version of the OpenAPI document: 2023-08-01
Contact: developers@cashfree.com
Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
é    N)ÚApiValueError>
   ÚmaximumÚminimumÚpatternÚmaxItemsÚminItemsÚ	maxLengthÚ	minLengthÚ
multipleOfÚexclusiveMaximumÚexclusiveMinimumc                   ó^  — e Zd ZdZdZ	 	 	 	 	 	 	 dd„Zd„ Zd„ Zed„ «       Z	ed„ «       Z
ed„ «       Zed	„ «       Zej                  d
„ «       Zed„ «       Zej                  d„ «       Zed„ «       Zej                  d„ «       Zdd„Zd„ Zd„ Zd„ Zd„ Zdd„Zed„ «       Zej                  d„ «       Zy)ÚConfigurationaÆ  This class contains various settings of the API client.

    :param host: Base url.
    :param api_key: Dict to store API key(s).
      Each entry in the dict specifies an API key.
      The dict key is the name of the security scheme in the OAS specification.
      The dict value is the API key secret.
    :param api_key_prefix: Dict to store API prefix (e.g. Bearer).
      The dict key is the name of the security scheme in the OAS specification.
      The dict value is an API key prefix when generating the auth data.
    :param username: Username for HTTP basic authentication.
    :param password: Password for HTTP basic authentication.
    :param access_token: Access token.
    :param server_index: Index to servers configuration.
    :param server_variables: Mapping with string values to replace variables in
      templated server configuration. The validation of enums is performed for
      variables with defined enum values before.
    :param server_operation_index: Mapping from operation ID to an index to server
      configuration.
    :param server_operation_variables: Mapping from operation ID to a mapping with
      string values to replace variables in templated server configuration.
      The validation of enums is performed for variables with defined enum values before.
    :param ssl_ca_cert: str - the path to a file of concatenated CA certificates
      in PEM format.

    :Example:

    API Key Authentication Example.
    Given the following security scheme in the OpenAPI specification:
      components:
        securitySchemes:
          cookieAuth:         # name for the security scheme
            type: apiKey
            in: cookie
            name: JSESSIONID  # cookie name

    You can programmatically set the cookie:

conf = cashfree_pg.Configuration(
    api_key={'cookieAuth': 'abc123'}
    api_key_prefix={'cookieAuth': 'JSESSIONID'}
)

    The following cookie will be added to the HTTP request:
       Cookie: JSESSIONID abc123
    Nc                 ó  — |€dn|| _         	 |€|€dn|| _        |	xs i | _        	 |xs i | _        |
xs i | _        	 d| _        	 i | _        |r|| _        	 i | _        |r|| _        	 d| _        	 || _	        	 || _
        	 || _        	 i | _        	 t        j                  d«      | j                  d<   t        j                  d«      | j                  d<   d| _        	 d| _        	 d| _        	 d| _        	 d	| _        	 d
| _        	 || _        	 d| _        	 d| _        	 d| _        	 d| _        	 t5        j6                  «       dz  | _        	 d| _        	 d| _        	 d| _        	 d| _         	 d
| _!        d| _"        	 d| _#        	 d| _$        y)zConstructor
        Núhttps://sandbox.cashfree.com/pgr   Úcashfree_pgÚpackage_loggerÚurllib3Úurllib3_loggerz%%(asctime)s %(levelname)s %(message)sFTé   Ú z%Y-%m-%dT%H:%M:%S.%f%zz%Y-%m-%d)%Ú
_base_pathÚserver_indexÚserver_operation_indexÚserver_variablesÚserver_operation_variablesÚtemp_folder_pathÚapi_keyÚapi_key_prefixÚrefresh_api_key_hookÚusernameÚpasswordÚaccess_tokenÚloggerÚloggingÚ	getLoggerÚlogger_formatÚlogger_stream_handlerÚlogger_file_handlerÚlogger_fileÚdebugÚ
verify_sslÚssl_ca_certÚ	cert_fileÚkey_fileÚassert_hostnameÚtls_server_nameÚmultiprocessingÚ	cpu_countÚconnection_pool_maxsizeÚproxyÚproxy_headersÚsafe_chars_for_path_paramÚretriesÚclient_side_validationÚsocket_optionsÚdatetime_formatÚdate_format)ÚselfÚhostr   r   r!   r"   r#   r   r   r   r   r-   s               úW/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/cashfree_pg/configuration.pyÚ__init__zConfiguration.__init__P   s"  € ð @D¸|Ñ;ÐQUˆŒð	à!-Ð!5¸$¸,™AÈLˆÔØ&<Ò&BÀˆÔ#ð	à 0Ò 6°BˆÔØ*DÒ*JÈˆÔ'ð	à $ˆÔð	ð ˆŒÙØ"ˆDŒLð	à ˆÔÙØ"0ˆDÔð	à$(ˆÔ!ð	à ˆŒð	à ˆŒð	à(ˆÔð	àˆŒð	ä(/×(9Ñ(9¸-Ó(Hˆ�‰Ð$Ñ%Ü(/×(9Ñ(9¸)Ó(Dˆ�‰Ð$Ñ%ØDˆÔð	à%)ˆÔ"ð	à#'ˆÔ ð	àˆÔð	àˆŒ
ð	ð ˆŒð	ð 'ˆÔð	àˆŒð	àˆŒð	à#ˆÔð	à#ˆÔð	ô (7×'@Ñ'@Ó'BÀQÑ'FˆÔ$ð	ð ˆŒ
ð	à!ˆÔð	à)+ˆÔ&ð	àˆŒð	ð '+ˆÔ#à"ˆÔð	ð  8ˆÔð	ð &ˆÔð	ó    c           	      óx  — | j                   }|j                  |«      }||t        | «      <   | j                  j	                  «       D ]+  \  }}|dvsŒt        ||t        j                  ||«      «       Œ- t        j                  | j                  «      |_        | j                  |_	        | j                  |_
        |S )N)r$   r)   )Ú	__class__Ú__new__ÚidÚ__dict__ÚitemsÚsetattrÚcopyÚdeepcopyr$   r*   r+   )r=   ÚmemoÚclsÚresultÚkÚvs         r?   Ú__deepcopy__zConfiguration.__deepcopy__Í   sš   € Ø�n‰nˆØ—‘˜SÓ!ˆØˆŒR�‹X‰Ø—M‘M×'Ñ'Ó)ò 	;‰DˆAˆqØÐ9Ò9Ü˜ ¤4§=¡=°°DÓ#9Õ:ð	;ô Ÿ	™	 $§+¡+Ó.ˆŒà!×-Ñ-ˆÔØ—z‘zˆŒØˆrA   c                 ó2   — t         j                  | ||«       y ©N)ÚobjectÚ__setattr__)r=   ÚnameÚvalues      r?   rT   zConfiguration.__setattr__Û   s   € Ü×Ñ˜4  uÕ-rA   c                 ó   — || _         y)zÄSet default instance of configuration.

        It stores default configuration, which can be
        returned by get_default_copy method.

        :param default: object of Configuration
        N)Ú_default)rL   Údefaults     r?   Úset_defaultzConfiguration.set_defaultÞ   s   € ð ˆ�rA   c                 ó"   — | j                  «       S )z™Deprecated. Please use `get_default` instead.

        Deprecated. Please use `get_default` instead.

        :return: The configuration object.
        )Úget_default©rL   s    r?   Úget_default_copyzConfiguration.get_default_copyé   s   € ð �‰Ó Ð rA   c                 óP   — | j                   €t        «       | _         | j                   S )zúReturn the default configuration.

        This method returns newly created, based on default constructor,
        object of Configuration class or returns a copy of default
        configuration.

        :return: The configuration object.
        )rX   r   r]   s    r?   r\   zConfiguration.get_defaultó   s!   € ð �<‰<ÐÜ(›?ˆCŒLØ�|‰|ÐrA   c                 ó   — | j                   S )úîThe logger file.

        If the logger_file is None, then add stream handler and remove file
        handler. Otherwise, add file handler and remove stream handler.

        :param value: The logger_file path.
        :type: str
        )Ú_Configuration__logger_file©r=   s    r?   r*   zConfiguration.logger_file  s   € ð ×!Ñ!Ð!rA   c                 ó8  — || _         | j                   r‡t        j                  | j                   «      | _        | j                  j	                  | j
                  «       | j                  j                  «       D ]   \  }}|j                  | j                  «       Œ" yy)ra   N)	rb   r%   ÚFileHandlerr)   ÚsetFormatterÚlogger_formatterr$   rG   Ú
addHandler©r=   rV   Ú_r$   s       r?   r*   zConfiguration.logger_file  sƒ   € ð #ˆÔØ×Òô (/×':Ñ':¸4×;MÑ;MÓ'NˆDÔ$Ø×$Ñ$×1Ñ1°$×2GÑ2GÔHØ!Ÿ[™[×.Ñ.Ó0ò <‘	��6Ø×!Ñ! $×":Ñ":Õ;ñ<ð rA   c                 ó   — | j                   S )úaDebug status

        :param value: The debug status, True or False.
        :type: bool
        )Ú_Configuration__debugrc   s    r?   r+   zConfiguration.debug   s   € ð �|‰|ÐrA   c                 ó„  — || _         | j                   rW| j                  j                  «       D ]$  \  }}|j                  t        j
                  «       Œ& dt        j                  _        y| j                  j                  «       D ]$  \  }}|j                  t        j                  «       Œ& dt        j                  _        y)rl   é   r   N)
rm   r$   rG   ÚsetLevelr%   ÚDEBUGÚhttplibÚHTTPConnectionÚ
debuglevelÚWARNINGri   s       r?   r+   zConfiguration.debug)  s”   € ð ˆŒØ�<Š<à!Ÿ[™[×.Ñ.Ó0ò /‘	��6Ø—‘¤§¡Õ.ð/ð 12ŒG×"Ñ"Õ-ð "Ÿ[™[×.Ñ.Ó0ò 1‘	��6Ø—‘¤§¡Õ0ð1ð 12ŒG×"Ñ"Õ-rA   c                 ó   — | j                   S )úŸThe logger format.

        The logger_formatter will be updated when sets logger_format.

        :param value: The format string.
        :type: str
        )Ú_Configuration__logger_formatrc   s    r?   r'   zConfiguration.logger_format?  s   € ð ×#Ñ#Ð#rA   c                 óZ   — || _         t        j                  | j                   «      | _        y)rw   N)rx   r%   Ú	Formatterrg   ©r=   rV   s     r?   r'   zConfiguration.logger_formatJ  s%   € ð  %ˆÔÜ '× 1Ñ 1°$×2FÑ2FÓ GˆÕrA   c                 ó   — | j                   �| j                  | «       | j                  j                  ||�| j                  j                  |«      nd«      }|r&| j                  j                  |«      }|r|›d|›�S |S y)zÔGets API key (with prefix if set).

        :param identifier: The identifier of apiKey.
        :param alias: The alternative identifier of apiKey.
        :return: The token for api key authentication.
        Nú )r    r   Úgetr   )r=   Ú
identifierÚaliasÚkeyÚprefixs        r?   Úget_api_key_with_prefixz%Configuration.get_api_key_with_prefixV  s|   € ð ×$Ñ$Ð0Ø×%Ñ% dÔ+Ø�l‰l×Ñ˜zÀeÐFW¨4¯<©<×+;Ñ+;¸EÔ+BÐ]aÓbˆÙØ×(Ñ(×,Ñ,¨ZÓ8ˆFÙÚ"(©#Ð.Ð.à�
ð rA   c                 óÔ   — d}| j                   �| j                   }d}| j                  �| j                  }t        j                  j	                  |dz   |z   ¬«      j                  d«      S )zsGets HTTP basic authentication header (string).

        :return: The token for basic HTTP authentication.
        r   ú:)Ú
basic_authÚauthorization)r!   r"   r   ÚutilÚmake_headersr~   )r=   r!   r"   s      r?   Úget_basic_auth_tokenz"Configuration.get_basic_auth_tokeng  sf   € ð
 ˆØ�=‰=Ð$Ø—}‘}ˆHØˆØ�=‰=Ð$Ø—}‘}ˆHÜ�|‰|×(Ñ(Ø #‘~¨Ñ0ð )ó 
ç
‰#ˆoÓ
ð	rA   c                 ó�  — i }d| j                   v rddd| j                  d«      dœ|d<   d| j                   v rddd| j                  d«      dœ|d<   d| j                   v rddd	| j                  d«      dœ|d<   d
| j                   v rddd| j                  d
«      dœ|d
<   d| j                   v rddd| j                  d«      dœ|d<   |S )zfGets Auth Settings dict for api client.

        :return: The Auth Settings information dict.
        Ú	XClientIDr   Úheaderzx-client-id)ÚtypeÚinr�   rV   ÚXClientSecretzx-client-secretÚXClientSignatureHeaderzx-client-signatureÚXPartnerAPIKeyzx-partner-apikeyÚXPartnerMerchantIDzx-partner-merchantid)r   rƒ   )r=   Úauths     r?   Úauth_settingszConfiguration.auth_settingsv  s  € ð
 ˆØ˜$Ÿ,™,Ñ&à!ØØ$Ø×5Ñ5Øóñ	!ˆD�Ñð ˜dŸl™lÑ*à!ØØ(Ø×5Ñ5Ø#óñ	%ˆD�Ñ!ð $ t§|¡|Ñ3à!ØØ+Ø×5Ñ5Ø,óñ	.ˆDÐ)Ñ*ð ˜tŸ|™|Ñ+à!ØØ)Ø×5Ñ5Ø$óñ	&ˆDÐ!Ñ"ð   4§<¡<Ñ/à!ØØ-Ø×5Ñ5Ø(óñ	*ˆDÐ%Ñ&ð ˆrA   c                 ó`   — dj                  t        j                  t        j                  ¬«      S )zbGets the essential information for debugging.

        :return: The report for debugging.
        zxPython SDK Debug Report:
OS: {env}
Python Version: {pyversion}
Version of the API: 2023-08-01
SDK Package Version: 5.0.5)ÚenvÚ	pyversion)ÚformatÚsysÚplatformÚversionrc   s    r?   Úto_debug_reportzConfiguration.to_debug_report«  s$   € ð
,÷
 ‰vœ#Ÿ,™,´#·+±+ˆvÓ>ð	?rA   c                 ó   — dddœdddœgS )zSGets an array of host settings

        :return: An array of host settings
        r   zSandbox server)ÚurlÚdescriptionzhttps://api.cashfree.com/pgzProduction server© rc   s    r?   Úget_host_settingszConfiguration.get_host_settings·  s&   € ð 9Ø/ñð
 5Ø2ñð	
ð 		
rA   c           	      óÒ  — |€| j                   S |€i n|}|€| j                  «       n|}	 ||   }|d   }|j                  di «      j                  «       D ]_  \  }}|j                  ||d   «      }d|v r)||d   vr"t        dj	                  |||   |d   «      «      ‚|j                  d|z   dz   |«      }Œa |S # t        $ r% t        dj	                  |t        |«      «      «      ‚w xY w)	a  Gets host URL based on the index and variables
        :param index: array index of the host settings
        :param variables: hash of variable and the corresponding value
        :param servers: an array of host settings or None
        :return: URL based on host settings
        zIInvalid index {0} when selecting the host settings. Must be less than {1}rŸ   Ú	variablesÚdefault_valueÚenum_valueszFThe variable `{0}` in the host URL has invalid value {1}. Must be {2}.ú{ú})	r   r¢   Ú
IndexErrorÚ
ValueErrorr™   Úlenr~   rG   Úreplace)	r=   Úindexr¤   ÚserversÚserverrŸ   Úvariable_nameÚvariableÚ
used_values	            r?   Úget_host_from_settingsz$Configuration.get_host_from_settingsÇ  s0  € ð ˆ=Ø—?‘?Ð"à#Ð+‘B°ˆ	Ø.5¨o�$×(Ñ(Ô*À7ˆð	EØ˜U‘^ˆFð �U‰mˆð (.§z¡z°+¸rÓ'B×'HÑ'HÓ'Jò 	EÑ#ˆM˜8Ø"Ÿ™Ø˜x¨Ñ8ó:ˆJð  Ñ(Ø"¨(°=Ñ*AÑAÜ ð(ß(.©Ø% y°Ñ'?Ø  Ñ/ó)1ó2ð 2ð —+‘+˜c MÑ1°CÑ7¸ÓD‰Cð	Eð ˆ
øô- ò 	EÜð(ß(.©¨u´c¸'³lÓ(CóEð Eð	Eús   ªB8 Â8.C&c                 óP   — | j                  | j                  | j                  ¬«      S )zReturn generated host.)r¤   )r³   r   r   rc   s    r?   r>   zConfiguration.hostî  s&   € ð ×*Ñ*¨4×+<Ñ+<È×H]ÑH]Ð*Ó^Ð^rA   c                 ó    — || _         d| _        y)zFix base path.N)r   r   r{   s     r?   r>   zConfiguration.hostó  s   € ð  ˆŒØ ˆÕrA   )NNNNNNNNNNNrR   )NN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__rX   r@   rP   rT   ÚclassmethodrZ   r^   r\   Úpropertyr*   Úsetterr+   r'   rƒ   rŠ   r•   r�   r¢   r³   r>   r¡   rA   r?   r   r      sI  „ ñ-ð^ €Hà Ø.2Ø)-Ø"Ø59ØIMØ!ó{òzò.ð ñó ðð ñ!ó ð!ð ñó ðð ñ	"ó ð	"ð ×Ññ<ó ð<ð$ ñó ðð ‡\�\ñ2ó ð2ð* ñ$ó ð$ð ×Ññ	Hó ð	Hóò"ò3òj
?ò
ó %ðN ñ_ó ð_ð 
‡[�[ñ!ó ñ!rA   r   )r¹   rI   r%   r2   rš   r   Úhttp.clientÚclientrr   Úcashfree_pg.exceptionsr   ÚJSON_SCHEMA_VALIDATION_KEYWORDSrS   r   r¡   rA   r?   ú<module>rÁ      s7   ðñ
ó Û Û Û 
Û å Ý 0ò#Ð ôY!�Fõ Y!rA   