Skip to content

Commit

Permalink
Add PAC SEDEX Industrial
Browse files Browse the repository at this point in the history
  • Loading branch information
Serrones committed Dec 18, 2019
1 parent 1665c4b commit f9e1131
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 2 deletions.
24 changes: 24 additions & 0 deletions correios/models/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,13 +480,37 @@
'category': 'CARTA_REGISTRADA',
'display_name': 'Carta Comercial',
},
"04812": {
"id": 124899,
"description": "PAC CONTRATO - UO",
"category": "PAC",
"display_name": "PAC",
"max_weight": 30000,
"symbol": "standard",
"default_extra_services": [EXTRA_SERVICE_RR],
"min_declared_value": Decimal("19.50"),
"max_declared_value": Decimal("3000.00"),
},
"04316": {
"id": 124900,
"description": "SEDEX CONTRATO - UO",
"category": "SEDEX",
"max_weight": 30000,
"display_name": "SEDEX",
"symbol": "express",
"default_extra_services": [EXTRA_SERVICE_RR],
"min_declared_value": Decimal("19.50"),
"max_declared_value": Decimal("10000.00"),
},
} # type: Dict[str, dict]

SERVICE_PAC = '04669'
SERVICE_SEDEX = '04162'
SERVICE_SEDEX10 = '40215'
SERVICE_SEDEX12 = '40169'
SERVICE_E_SEDEX = '81019'
SERVICE_PAC_INDUSTRIAL = "04812"
SERVICE_SEDEX_INDUSTRIAL = "04316"

INSURANCE_VALUE_THRESHOLD_PAC = Decimal("50.00") # R$
INSURANCE_VALUE_THRESHOLD_SEDEX = Decimal("75.00") # R$
Expand Down
8 changes: 6 additions & 2 deletions correios/models/posting.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@
INSURANCE_VALUE_THRESHOLD_PAC,
INSURANCE_VALUE_THRESHOLD_SEDEX,
SERVICE_PAC,
SERVICE_SEDEX
SERVICE_PAC_INDUSTRIAL,
SERVICE_SEDEX,
SERVICE_SEDEX_INDUSTRIAL
)
from .user import Contract # noqa: F401
from .user import ExtraService, PostingCard, Service
Expand All @@ -55,7 +57,9 @@

INSURANCE_VALUE_THRESHOLDS = {
Service.get(SERVICE_PAC).code: INSURANCE_VALUE_THRESHOLD_PAC,
Service.get(SERVICE_SEDEX).code: INSURANCE_VALUE_THRESHOLD_SEDEX
Service.get(SERVICE_PAC_INDUSTRIAL).code: INSURANCE_VALUE_THRESHOLD_PAC, # noqa
Service.get(SERVICE_SEDEX).code: INSURANCE_VALUE_THRESHOLD_SEDEX,
Service.get(SERVICE_SEDEX_INDUSTRIAL).code: INSURANCE_VALUE_THRESHOLD_SEDEX, # noqa
}


Expand Down
2 changes: 2 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ class Meta:
data.SERVICE_SEDEX,
data.SERVICE_SEDEX10,
data.SERVICE_SEDEX12,
data.SERVICE_PAC_INDUSTRIAL,
data.SERVICE_SEDEX_INDUSTRIAL,
]


Expand Down

0 comments on commit f9e1131

Please sign in to comment.