redemais-white-label-python-sdk 1.0.0__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.
@@ -0,0 +1,5 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Seu Nome
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy...
@@ -0,0 +1,21 @@
1
+ Metadata-Version: 2.4
2
+ Name: redemais-white-label-python-sdk
3
+ Version: 1.0.0
4
+ Summary: Client de comunicaçao c/ API White Label da Rede+
5
+ Author-email: Filipe Coelho <filipe@fmconsult.com.br>
6
+ License: MIT License
7
+
8
+ Copyright (c) 2025 Seu Nome
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy...
11
+
12
+ Project-URL: Homepage, https://github.com/seuuser/minha-biblioteca
13
+ Project-URL: Bug Tracker, https://github.com/seuuser/minha-biblioteca/issues
14
+ Keywords: sdk,api,redemais,whitelabel,fmconsult
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: License :: OSI Approved :: MIT License
17
+ Classifier: Operating System :: OS Independent
18
+ Requires-Python: >=3.11
19
+ Description-Content-Type: text/markdown
20
+ License-File: LICENSE
21
+ Dynamic: license-file
File without changes
@@ -0,0 +1,26 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "redemais-white-label-python-sdk"
7
+ version = "1.0.0"
8
+ description = "Client de comunicaçao c/ API White Label da Rede+"
9
+ readme = "README.md"
10
+ requires-python = ">=3.11"
11
+ license = {file = "LICENSE"}
12
+ authors = [
13
+ {name = "Filipe Coelho", email = "filipe@fmconsult.com.br"},
14
+ ]
15
+ keywords = ["sdk", "api", "redemais", "whitelabel", "fmconsult"]
16
+ classifiers = [
17
+ "Programming Language :: Python :: 3",
18
+ "License :: OSI Approved :: MIT License",
19
+ "Operating System :: OS Independent",
20
+ ]
21
+
22
+ dependencies = []
23
+
24
+ [project.urls]
25
+ "Homepage" = "https://github.com/seuuser/minha-biblioteca"
26
+ "Bug Tracker" = "https://github.com/seuuser/minha-biblioteca/issues"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
File without changes
@@ -0,0 +1,21 @@
1
+ import os, base64, logging
2
+ from fmconsult.http.api import ApiBase
3
+
4
+ class RedeMaisWhiteLabelApi(ApiBase):
5
+
6
+ def __init__(self):
7
+ try:
8
+ self.api_token = os.environ['redemais.whitelabel.api.token']
9
+ self.api_environment = os.environ['redemais.whitelabel.api.environment']
10
+ self.id_cliente = os.environ('redemais.whitelabel.api.id_cliente')
11
+ self.id_contrato_plano = os.environ('redemais.whitelabel.api.id_contrato_plano')
12
+
13
+ self.headers = {
14
+ 'x-api-key': self.api_token
15
+ }
16
+
17
+ url_endpoint = (lambda env: 'prd-v1' if env == 'live' else 'hml-v1' if env == 'sandbox' else None)(self.environment)
18
+
19
+ self.base_url = f'https://ddt8urmaeb.execute-api.us-east-1.amazonaws.com/{url_endpoint}/rms1'
20
+ except:
21
+ raise
@@ -0,0 +1,40 @@
1
+ import logging, jsonpickle
2
+ from http import HTTPMethod
3
+ from fmconsult.utils.url import UrlUtil
4
+ from redemais.whitelabel.api import RedeMaisWhiteLabelApi
5
+ from redemais.whitelabel.dtos.beneficiario import Beneficiario
6
+
7
+ class Beneficiarios(RedeMaisWhiteLabelApi):
8
+
9
+ def adesao(self, data:Beneficiario, id_tipo_plano: int):
10
+ try:
11
+ logging.info(f'add new person...')
12
+ payload = {
13
+ "idClienteContrato": int(self.id_contrato_plano),
14
+ "idBeneficiarioTipo": 1,
15
+ "nome": data.nome,
16
+ "codigoExterno": data.codigo_externo,
17
+ "idCliente": int(self.id_cliente),
18
+ "cpf": data.cpf,
19
+ "dataNascimento": data.data_nascimento,
20
+ "sexo": data.sexo,
21
+ "celular": data.celular,
22
+ "email": data.email,
23
+ "cep": data.cep,
24
+ "logradouro": data.endereco,
25
+ "numero": data.numero_endereco,
26
+ "complemento": data.complemento_endereco,
27
+ "bairro": data.bairro,
28
+ "cidade": data.cidade,
29
+ "uf": data.uf,
30
+ "tipoPlano": id_tipo_plano
31
+ }
32
+
33
+ if not data.cpf_titular is None:
34
+ payload['cpfTitular'] = data.cpf_titular
35
+
36
+ self.endpoint_url = UrlUtil().make_url(self.base_url, ['adesao'])
37
+ res = self.call_request(HTTPMethod.POST, self.endpoint_url, None, payload=payload)
38
+ return jsonpickle.decode(res)
39
+ except:
40
+ raise
@@ -0,0 +1,25 @@
1
+ from dataclasses import dataclass, asdict
2
+ from typing import Optional
3
+ from fmconsult.utils.object import CustomObject
4
+
5
+ @dataclass
6
+ class Beneficiario(CustomObject):
7
+ nome: str
8
+ codigo_externo: str
9
+ cpf: str
10
+ data_nascimento: str
11
+ sexo: str
12
+ celular: str
13
+ email: str
14
+ cep: str
15
+ endereco: str
16
+ numero_endereco: str
17
+ complemento_endereco: str
18
+ bairro: str
19
+ cidade: str
20
+ uf: str
21
+ cpf_titular: Optional[str] = None
22
+
23
+ def to_dict(self):
24
+ data = asdict(self)
25
+ return data
@@ -0,0 +1,21 @@
1
+ Metadata-Version: 2.4
2
+ Name: redemais-white-label-python-sdk
3
+ Version: 1.0.0
4
+ Summary: Client de comunicaçao c/ API White Label da Rede+
5
+ Author-email: Filipe Coelho <filipe@fmconsult.com.br>
6
+ License: MIT License
7
+
8
+ Copyright (c) 2025 Seu Nome
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy...
11
+
12
+ Project-URL: Homepage, https://github.com/seuuser/minha-biblioteca
13
+ Project-URL: Bug Tracker, https://github.com/seuuser/minha-biblioteca/issues
14
+ Keywords: sdk,api,redemais,whitelabel,fmconsult
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: License :: OSI Approved :: MIT License
17
+ Classifier: Operating System :: OS Independent
18
+ Requires-Python: >=3.11
19
+ Description-Content-Type: text/markdown
20
+ License-File: LICENSE
21
+ Dynamic: license-file
@@ -0,0 +1,15 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ src/__init__.py
5
+ src/redemais/__init__.py
6
+ src/redemais/whitelabel/__init__.py
7
+ src/redemais/whitelabel/api.py
8
+ src/redemais/whitelabel/apis/__init__.py
9
+ src/redemais/whitelabel/apis/beneficiarios.py
10
+ src/redemais/whitelabel/dtos/__init__.py
11
+ src/redemais/whitelabel/dtos/beneficiario.py
12
+ src/redemais_white_label_python_sdk.egg-info/PKG-INFO
13
+ src/redemais_white_label_python_sdk.egg-info/SOURCES.txt
14
+ src/redemais_white_label_python_sdk.egg-info/dependency_links.txt
15
+ src/redemais_white_label_python_sdk.egg-info/top_level.txt