|
1
|
|
|
# -*- coding: utf-8 -*- |
|
|
|
|
|
|
2
|
|
|
# ############################################################################# |
|
3
|
|
|
# |
|
4
|
|
|
# The MIT License (MIT) |
|
5
|
|
|
# |
|
6
|
|
|
# Copyright (c) 2016 Trocafone |
|
7
|
|
|
# |
|
8
|
|
|
# Permission is hereby granted, free of charge, to any person obtaining a copy |
|
9
|
|
|
# of this software and associated documentation files (the "Software"), to deal |
|
10
|
|
|
# in the Software without restriction, including without limitation the rights |
|
11
|
|
|
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
12
|
|
|
# copies of the Software, and to permit persons to whom the Software is |
|
13
|
|
|
# furnished to do so, subject to the following conditions: |
|
14
|
|
|
# |
|
15
|
|
|
# The above copyright notice and this permission notice shall be included in |
|
16
|
|
|
# all copies or substantial portions of the Software. |
|
17
|
|
|
# |
|
18
|
|
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
19
|
|
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
20
|
|
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
|
21
|
|
|
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
22
|
|
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
|
23
|
|
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
|
24
|
|
|
# SOFTWARE. |
|
25
|
|
|
# |
|
26
|
|
|
############################################################################### |
|
27
|
|
|
|
|
28
|
|
|
from . import EntityBase |
|
|
|
|
|
|
29
|
|
|
from voluptuous import Schema |
|
|
|
|
|
|
30
|
|
|
|
|
31
|
|
|
|
|
32
|
|
|
class Pessoa(EntityBase): |
|
|
|
|
|
|
33
|
|
|
def __init__(self, nome="", logradouro="", numero="", complemento="", |
|
|
|
|
|
|
34
|
|
|
bairro="", referencia="", cidade="", uf="", cep="", ddd="", |
|
|
|
|
|
|
35
|
|
|
telefone="", email=""): |
|
|
|
|
|
|
36
|
|
|
super(Pessoa, self).__init__(locals()) |
|
37
|
|
|
|
|
38
|
|
|
def get_schema(self): |
|
|
|
|
|
|
39
|
|
|
self.schema = Schema({ |
|
|
|
|
|
|
40
|
|
|
'nome': str, |
|
41
|
|
|
'logradouro': str, |
|
42
|
|
|
'numero': str, |
|
43
|
|
|
'complemento': str, |
|
44
|
|
|
'bairro': str, |
|
45
|
|
|
'referencia': str, |
|
46
|
|
|
'cidade': str, |
|
47
|
|
|
'uf': str, |
|
48
|
|
|
'cep': str, |
|
49
|
|
|
'ddd': str, |
|
50
|
|
|
'telefone': str, |
|
51
|
|
|
'email': str |
|
52
|
|
|
}) |
|
53
|
|
|
|
|
54
|
|
|
|
|
55
|
|
|
class RequestSolicitarPostagemReversa(EntityBase): |
|
|
|
|
|
|
56
|
|
|
|
|
57
|
|
|
def __init__(self, cod_administrativo, codigo_servico, cartao, |
|
|
|
|
|
|
58
|
|
|
destinatario, coletas_solicitadas): |
|
59
|
|
|
pass |
|
60
|
|
|
|
The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:
If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.