o
    l2Æ^N  ã                   @   s@   d Z ddlmZ ddlZddlZddlmZ G dd„ deƒZdS )aø  
    SendinBlue API

    SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to :   - Manage your campaigns and get the statistics   - Manage your contacts   - Send transactional Emails and SMS   - and much more...  You can download our wrappers at https://github.com/orgs/sendinblue  **Possible responses**   | Code | Message |   | :-------------: | ------------- |   | 200  | OK. Successful Request  |   | 201  | OK. Successful Creation |   | 202  | OK. Request accepted |   | 204  | OK. Successful Update/Deletion  |   | 400  | Error. Bad Request  |   | 401  | Error. Authentication Needed  |   | 402  | Error. Not enough credit, plan upgrade needed  |   | 403  | Error. Permission denied  |   | 404  | Error. Object does not exist |   | 405  | Error. Method not allowed  |   | 406  | Error. Not Acceptable  |   # noqa: E501

    OpenAPI spec version: 3.0.0
    Contact: contact@sendinblue.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
é    )Úabsolute_importN)Ú	ApiClientc                   @   sZ   e Zd ZdZddd„Zdd„ Zdd„ Zd	d
„ Zdd„ Zdd„ Z	dd„ Z
dd„ Zdd„ ZdS )ÚAttributesApiz«NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    Ref: https://github.com/swagger-api/swagger-codegen
    Nc                 C   s   |d u rt ƒ }|| _d S ©N)r   Ú
api_client)Úselfr   © r   úS/var/www/html/env/lib/python3.10/site-packages/sib_api_v3_sdk/api/attributes_api.pyÚ__init__   s   
zAttributesApi.__init__c                 K   óB   d|d< |  d¡r| j|||fi |¤ŽS | j|||fi |¤Ž}|S )aÑ  Create contact attribute  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_attribute(attribute_category, attribute_name, create_attribute, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str attribute_category: Category of the attribute (required)
        :param str attribute_name: Name of the attribute (required)
        :param CreateAttribute create_attribute: Values to create an attribute (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        TÚ_return_http_data_onlyÚ	async_req)ÚgetÚcreate_attribute_with_http_info)r   Úattribute_categoryÚattribute_nameÚcreate_attributeÚkwargsÚdatar   r   r	   r   $   ó
   
zAttributesApi.create_attributec                 K   óˆ  g d¢}|  d¡ |  d¡ |  d¡ |  d¡ tƒ }t |d ¡D ]\}}||vr0td| ƒ‚|||< q"|d= d|vsB|d d	u rFtd
ƒ‚d|vsP|d d	u rTtdƒ‚d|vs^|d d	u rbtdƒ‚i }	i }
d|v rp|d |
d< d|v rz|d |
d< g }i }g }i }d	}d|v rŒ|d }| j dg¡|d< | j dg¡|d< ddg}| jj	dd|
|||||d	|| 
d¡| 
d¡| 
dd¡| 
d¡|	d�S )aà  Create contact attribute  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_attribute_with_http_info(attribute_category, attribute_name, create_attribute, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str attribute_category: Category of the attribute (required)
        :param str attribute_name: Name of the attribute (required)
        :param CreateAttribute create_attribute: Values to create an attribute (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        )r   r   r   r   r   Ú_preload_contentÚ_request_timeoutr   zBGot an unexpected keyword argument '%s' to method create_attributer   NzSMissing the required parameter `attribute_category` when calling `create_attribute`r   zOMissing the required parameter `attribute_name` when calling `create_attribute`r   zQMissing the required parameter `create_attribute` when calling `create_attribute`ÚattributeCategoryÚattributeNameúapplication/jsonÚAcceptúContent-Typeúapi-keyúpartner-keyú8/contacts/attributes/{attributeCategory}/{attributeName}ÚPOSTT©
ÚbodyÚpost_paramsÚfilesÚresponse_typeÚauth_settingsr   r   r   r   Úcollection_formats©ÚappendÚlocalsÚsixÚ	iteritemsÚ	TypeErrorÚ
ValueErrorr   Úselect_header_acceptÚselect_header_content_typeÚcall_apir   )r   r   r   r   r   Ú
all_paramsÚparamsÚkeyÚvalr(   Úpath_paramsÚquery_paramsÚheader_paramsÚform_paramsÚlocal_var_filesÚbody_paramsr'   r   r   r	   r   ;   óx   



ÿÿ
ÿÿ
òz-AttributesApi.create_attribute_with_http_infoc                 K   s>   d|d< |  d¡r| j||fi |¤ŽS | j||fi |¤Ž}|S )ai  Delete an attribute  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_attribute(attribute_category, attribute_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str attribute_category: Category of the attribute (required)
        :param str attribute_name: Name of the existing attribute (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        Tr   r   )r   Údelete_attribute_with_http_info)r   r   r   r   r   r   r   r	   Údelete_attribute•   s
   
zAttributesApi.delete_attributec                 K   s\  ddg}|  d¡ |  d¡ |  d¡ |  d¡ tƒ }t |d ¡D ]\}}||vr0td| ƒ‚|||< q"|d= d|vsB|d d	u rFtd
ƒ‚d|vsP|d d	u rTtdƒ‚i }i }	d|v rb|d |	d< d|v rl|d |	d< g }
i }g }i }d	}| j dg¡|d< | j dg¡|d< ddg}| jj	dd|	|
||||d	|| 
d¡| 
d¡| 
dd¡| 
d¡|d�S )ax  Delete an attribute  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_attribute_with_http_info(attribute_category, attribute_name, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str attribute_category: Category of the attribute (required)
        :param str attribute_name: Name of the existing attribute (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        r   r   r   r   r   r   r   zBGot an unexpected keyword argument '%s' to method delete_attributeNzSMissing the required parameter `attribute_category` when calling `delete_attribute`zOMissing the required parameter `attribute_name` when calling `delete_attribute`r   r   r   r   r   r   r   r    ÚDELETETr"   r)   )r   r   r   r   r3   r4   r5   r6   r(   r7   r8   r9   r:   r;   r<   r'   r   r   r	   r>   «   sn   



ÿÿ
ÿÿ
òz-AttributesApi.delete_attribute_with_http_infoc                 K   s6   d|d< |  d¡r| jdi |¤ŽS | jdi |¤Ž}|S )a³  List all attributes  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_attributes(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :return: GetAttributes
                 If the method is called asynchronously,
                 returns the request thread.
        Tr   r   Nr   )r   Úget_attributes_with_http_info)r   r   r   r   r   r	   Úget_attributesþ   s
   
zAttributesApi.get_attributesc                 K   sø   g }|  d¡ |  d¡ |  d¡ |  d¡ tƒ }t |d ¡D ]\}}||vr.td| ƒ‚|||< q |d= i }i }g }i }	g }
i }d}| j dg¡|	d	< | j dg¡|	d
< ddg}| jjdd|||	||
|d|| 	d¡| 	d¡| 	dd¡| 	d¡|d�S )aÂ  List all attributes  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_attributes_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :return: GetAttributes
                 If the method is called asynchronously,
                 returns the request thread.
        r   r   r   r   r   z@Got an unexpected keyword argument '%s' to method get_attributesNr   r   r   r   r   z/contacts/attributesÚGETÚGetAttributesTr"   )
r*   r+   r,   r-   r.   r   r0   r1   r2   r   )r   r   r3   r4   r5   r6   r(   r7   r8   r9   r:   r;   r<   r'   r   r   r	   rA     sZ   



ÿÿ
ÿÿ
òz+AttributesApi.get_attributes_with_http_infoc                 K   r   )aÚ  Update contact attribute  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_attribute(attribute_category, attribute_name, update_attribute, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str attribute_category: Category of the attribute (required)
        :param str attribute_name: Name of the existing attribute (required)
        :param UpdateAttribute update_attribute: Values to update an attribute (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        Tr   r   )r   Úupdate_attribute_with_http_info)r   r   r   Úupdate_attributer   r   r   r   r	   rF   W  r   zAttributesApi.update_attributec                 K   r   )aé  Update contact attribute  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_attribute_with_http_info(attribute_category, attribute_name, update_attribute, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str attribute_category: Category of the attribute (required)
        :param str attribute_name: Name of the existing attribute (required)
        :param UpdateAttribute update_attribute: Values to update an attribute (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        )r   r   rF   r   r   r   r   r   zBGot an unexpected keyword argument '%s' to method update_attributer   NzSMissing the required parameter `attribute_category` when calling `update_attribute`r   zOMissing the required parameter `attribute_name` when calling `update_attribute`rF   zQMissing the required parameter `update_attribute` when calling `update_attribute`r   r   r   r   r   r   r   r    ÚPUTTr"   r)   )r   r   r   rF   r   r3   r4   r5   r6   r(   r7   r8   r9   r:   r;   r<   r'   r   r   r	   rE   n  r=   z-AttributesApi.update_attribute_with_http_infor   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r
   r   r   r?   r>   rB   rA   rF   rE   r   r   r   r	   r      s    
ZSEr   )	rK   Ú
__future__r   Úrer,   Úsib_api_v3_sdk.api_clientr   Úobjectr   r   r   r   r	   Ú<module>   s   