+
    i
                        ^ RI HtHtHt ^ RIHt ]! R]4      t]! 4       t]P                  RR.R7      R 4       t
]P                  RR.R7      R	 4       t]P                  R
R.R7      R 4       t]P                  R
R.R7      R 4       t]P                  RR.R7      R 4       t]P                  RR.R7      R 4       t]P                  RR.R7      R 4       t]P                  RR.R7      R 4       t]P                  RR.R7      R 4       t]P                  RR.R7      R 4       t]P                  RR.R7      R 4       t]P                  RR.R7      R 4       t]P                  RR.R7      R 4       t]P                  RR.R7      R 4       tR # )!    )	Blueprintjsonifyrequest)BusinessCentralServicebusiness_centralz
/customersGET)methodsc                      \         P                  4       p \        V 4      ^3#   \         d#   p\        R\	        T4      /4      R3u Rp?# Rp?ii ; i)z(Obtiene una lista de todos los clientes.error  N)serviceget_customersr   	Exceptionstr)	customerses     mC:\Users\victor.barrera\Documents\proyectos\elepV3\Elep\src\App\api\controller\business_central_controller.pyr   r      sN    /))+	y!3&& /Q()3../    # AAAAPOSTc                     \         P                  '       g   \        RR/4      R3# \         P                  ! 4       p \        P                  V 4      p\        V4      ^3#   \         d#   p\        R\        T4      /4      R3u Rp?# Rp?ii ; i)zCrea un nuevo cliente.r   "La solicitud debe ser de tipo JSON  r   N)r   is_jsonr   get_jsonr   create_customerr   r   )datanew_customerr   s      r   r   r      s}    /G%IJKSPP!..t4|$c)) /Q()3../'   A A 6A B)B BBz/customers/<int:customer_id>PATCHc                    \         P                  '       g   \        RR/4      R3# \         P                  ! 4       p\        P                  W4      p\        V4      ^3#   \         d#   p\        R\        T4      /4      R3u Rp?# Rp?ii ; i)zModifica un cliente existente.r   r   r   r   N)r   r   r   r   r   modify_customerr   r   )customer_idr   updated_customerr   s   &   r   r!   r!   $   s    /G%IJKSPP!"22;E'(#-- /Q()3../r   DELETEc                     \         P                  V 4       R#   \         d#   p\        R\	        T4      /4      R3u Rp?# Rp?ii ; i)zElimina un cliente.r   r   N    )r   delete_customerr   r   r   )r"   r   s   & r   r)   r)   0   sC    /, /Q()3../s    AAAAz/itemsc                      \         P                  4       p \        V 4      ^3#   \         d#   p\        R\	        T4      /4      R3u Rp?# Rp?ii ; i)u&   Obtiene una lista de todos los ítems.r   r   N)r   	get_itemsr   r   r   )itemsr   s     r   r+   r+   ;   sM    /!!#u~s"" /Q()3../r   c                     \         P                  '       g   \        RR/4      R3# \         P                  ! 4       p \        P                  V 4      p\        V4      ^3#   \         d#   p\        R\        T4      /4      R3u Rp?# Rp?ii ; i)u   Crea un nuevo ítem.r   r   r   r   N)r   r   r   r   r   create_itemr   r   )r   new_itemr   s      r   r.   r.   D   s}    /G%IJKSPP!&&t,x #%% /Q()3../r   z	/contactsc                      \         P                  4       p \        V 4      ^3#   \         d#   p\        R\	        T4      /4      R3u Rp?# Rp?ii ; i)z)Obtiene una lista de todos los contactos.r   r   N)r   get_contactsr   r   r   contactsr   s     r   r1   r1   R   sN    /'')x #%% /Q()3../r   z/salespersonsc                      \         P                  4       p \        V 4      ^3#   \         d#   p\        R\	        T4      /4      R3u Rp?# Rp?ii ; i)z*Obtiene una lista de todos los vendedores.r   r   N)r   get_salespersonsr   r   r   )salespersonsr   s     r   r5   r5   ]   sN    ///1|$c)) /Q()3../r   z/quotesc                      \         P                  4       p \        V 4      ^3#   \         d#   p\        R\	        T4      /4      R3u Rp?# Rp?ii ; i)u#   Obtiene las líneas de cotización.r   r   N)r   get_quote_linesr   r   r   )quotesr   s     r   r8   r8   h   sM    /((*v## /Q()3../r   c                     \         P                  '       g   \        RR/4      R3# \         P                  ! 4       p \        P                  V 4      p\        V4      ^3#   \         d#   p\        R\        T4      /4      R3u Rp?# Rp?ii ; i)u   Crea una nueva cotización.r   r   r   r   N)r   r   r   r   r   create_quoter   r   )r   	new_quoter   s      r   r;   r;   q   s}    /G%IJKSPP!((.	y!3&& /Q()3../r   z,/quotes/<system_id>/<quote_no>/<int:line_no>c                     \         P                  WV4       R#   \         d#   p\        R\	        T4      /4      R3u Rp?# Rp?ii ; i)u.   Elimina una línea de cotización específica.r   r   Nr&   )r   delete_quote_liner   r   r   )	system_idquote_noline_nor   s   &&& r   r>   r>   }   sE    /!!)w? /Q()3../s    AAAAz/contacts-bufferc                      \         P                  4       p \        V 4      ^3#   \         d#   p\        R\	        T4      /4      R3u Rp?# Rp?ii ; i)z!Obtiene los contactos del buffer.r   r   N)r   get_contact_bufferr   r   r   r2   s     r   rC   rC      sN    /--/x #%% /Q()3../r   c                     \         P                  '       g   \        RR/4      R3# \         P                  ! 4       p \        P                  V 4      p\        V4      ^3#   \         d#   p\        R\        T4      /4      R3u Rp?# Rp?ii ; i)z$Crea un nuevo contacto en el buffer.r   r   r   r   N)r   r   r   r   r   create_contact_bufferr   r   )r   new_contactr   s      r   rE   rE      s}    /G%IJKSPP!33D9{#S(( /Q()3../r   z/opportunitiesc                      \         P                  4       p \        V 4      ^3#   \         d#   p\        R\	        T4      /4      R3u Rp?# Rp?ii ; i)z-Obtiene una lista de todas las oportunidades.r   r   N)r   get_opportunitiesr   r   r   )opportunitiesr   s     r   rH   rH      sN    /113}%s** /Q()3../r   N)flaskr   r   r   )App.api.services.business_central_Servicer   __name__business_central_routerr   router   r   r!   r)   r+   r.   r1   r5   r8   r;   r>   rC   rE   rH        r   <module>rQ      sM   . - L $$6A  !
" |eW=/ >/ |fX>	/ ?	/ =yQ	/ R	/ =zR/ S/ x%9/ :/ x&:	/ ;	/ {UG</ =/ @/ A/ y5':/ ;/ y6(;	/ <	/ MX`Wab/ c/ 1E7C/ D/ 1F8D	/ E	/ /%A/ B/rP   