Last active
May 2, 2017 21:26
-
-
Save deniscsz/f3205df6874532748209eb503d5c49a6 to your computer and use it in GitHub Desktop.
Design do Json para WS de impostos
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Envio | |
| { | |
| "store_id" : "000001", | |
| "customerDocument" : "23752357118", | |
| "items" : [ | |
| {"sku": "teste-produto-20", "price": 159.90, "qty": 1}, | |
| {"sku": "teste-produto-30", "price": 213.40, "qty": 2} | |
| ], | |
| "discount" : 0, | |
| "shippingMethod" : "correios_pac", | |
| "shipping" : 23.5 | |
| } | |
| // Retorno | |
| // Caso simples (caso não façamos com imposto por item) | |
| { | |
| "totals" : [ | |
| { "ICMS": 15.65 }, | |
| { "PIS": 3.77 } | |
| ] | |
| } | |
| // Retorno | |
| // Caso para impostos individuais por item do carrinho | |
| { | |
| "totals" : [ | |
| { "ICMS": 15.65 }, | |
| { "PIS": 3.77 } | |
| ], | |
| "items": [ | |
| { | |
| "sku": "teste-produto-20", | |
| "tax": [ | |
| { "ICMS": 4.65 }, | |
| { "PIS": 0.89 } | |
| ] | |
| }, | |
| { | |
| "sku": "teste-produto-30", | |
| "tax": [ | |
| { "ICMS": 11.00 }, | |
| { "PIS": 2.88 } | |
| ] | |
| } | |
| ] | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment