-
Notifications
You must be signed in to change notification settings - Fork 0
/
16df12ec.2848e031.js
1 lines (1 loc) · 77.8 KB
/
16df12ec.2848e031.js
1
(window.webpackJsonp=window.webpackJsonp||[]).push([[19],{115:function(e,n,t){"use strict";t.r(n),t.d(n,"frontMatter",(function(){return s})),t.d(n,"metadata",(function(){return d})),t.d(n,"Highlight",(function(){return b})),t.d(n,"rightToc",(function(){return p})),t.d(n,"default",(function(){return u}));var a=t(2),i=t(6),r=(t(0),t(250)),o=t(252),l=t(257),c=t(258),s={id:"PlaygroundTransacoes",title:"Playground Transa\xe7\xf5es",hide_title:!0,sidebar_label:"Playground Transactions"},d={id:"AmbienteTestes/PlaygroundTransacoes",isDocsHomePage:!1,title:"Playground Transa\xe7\xf5es",description:"Playground: Transactions",source:"@site/docs\\AmbienteTestes\\PlaygroundTransacoes.md",permalink:"/documentation/docs/AmbienteTestes/PlaygroundTransacoes",sidebar_label:"Playground Transactions",sidebar:"someSidebar",previous:{title:"Introdu\xe7\xe3o ao Playground",permalink:"/documentation/docs/AmbienteTestes/IntroducaoPlayground"},next:{title:"Playground Carn\xea",permalink:"/documentation/docs/AmbienteTestes/PlaygroundCarne"}},b=function(e){var n=e.children,t=e.color;return Object(r.b)("span",{style:{backgroundColor:t,borderRadius:"2px",color:"#fff",padding:"0.2rem"}},n)},p=[{value:'<Highlight color="#009615">POST</Highlight> /v1/charge',id:"post-v1charge",children:[]},{value:'<Highlight color="#00BBCE">GET</Highlight> /v1/charge/:id',id:"get-v1chargeid",children:[]},{value:'<Highlight color="#fcaf17">PUT</Highlight> /v1/charge/:id/metadata',id:"put-v1chargeidmetadata",children:[]},{value:'<Highlight color="#fcaf17">PUT</Highlight> /v1/charge/:id/billet',id:"put-v1chargeidbillet",children:[]},{value:'<Highlight color="#fcaf17">PUT</Highlight> /v1/charge/:id/cancel',id:"put-v1chargeidcancel",children:[]},{value:'<Highlight color="#009615">POST</Highlight> /v1/charge/:id/pay',id:"post-v1chargeidpay",children:[]},{value:'<Highlight color="#009615">POST</Highlight> /v1/charge/:id/billet/resend',id:"post-v1chargeidbilletresend",children:[]},{value:'<Highlight color="#009615">POST</Highlight> /v1/charge/:id/history',id:"post-v1chargeidhistory",children:[]},{value:'<Highlight color="#009615">POST</Highlight> /v1/charge/:id/link',id:"post-v1chargeidlink",children:[]},{value:'<Highlight color="#fcaf17">PUT</Highlight> /v1/charge/:id/link',id:"put-v1chargeidlink",children:[]},{value:'<Highlight color="#009615">POST</Highlight> /v1/charge/:id/balance-sheet',id:"post-v1chargeidbalance-sheet",children:[]},{value:'<Highlight color="#fcaf17">PUT</Highlight> /v1/charge/:id/settle',id:"put-v1chargeidsettle",children:[]}],m={Highlight:b,rightToc:p};function u(e){var n=e.components,t=Object(i.a)(e,["components"]);return Object(r.b)("wrapper",Object(a.a)({},m,t,{components:n,mdxType:"MDXLayout"}),Object(r.b)("h1",{className:"titulo"},"Playground: Transactions"),Object(r.b)("div",{className:"subtitulo"},Object(r.b)("p",null,"To acess the sandbox environmet you will need a Gerencianet account. ",Object(r.b)("a",{href:"https://gerencianet.com.br/#abrirconta",title:"Cadastro ao nosso sistema, seja nosso cliente",target:"_blank"},"Create your account"),"."),Object(r.b)("p",null,'The Playground (also called as "sandbox") it is a development/test environment in which the integrator, regardless of the operation to be performed, can use to learn about the payment mechanism and flow in a 100% test and uncomplicated environment. Know more about the Gerencianet\'s sandbox environment.'),Object(r.b)("p",null,"Creating a charge (transaction) via integration with the Gerencianet API has two steps: "),Object(r.b)("ol",null,Object(r.b)("li",{parentName:"ol"},"First generate the transaction (or charge) through the endpoint ",Object(r.b)("inlineCode",{parentName:"li"},"POST /v1/charge"),";"),Object(r.b)("li",{parentName:"ol"},"Finally, associate the generated transaction with a payment method through the endpoint ",Object(r.b)("inlineCode",{parentName:"li"},"POST /v1/charge/:id/pay"),".")),Object(r.b)("p",null,"After using the ",Object(r.b)("inlineCode",{parentName:"p"},"POST /v1/charge")," endpoint, the transaction will already be created and, from this moment on, it will be possible to associate it with the payment method such as boleto or credit card."),Object(r.b)("p",null,'Next, check all the endpoints present in our Playground, within the "Transactions": '),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},Object(r.b)(b,{color:"#009615",mdxType:"Highlight"},"POST")," ",Object(r.b)("a",{href:"../AmbienteTestes/PlaygroundTransacoes#post-v1charge"},"/v1/charge")," (creates a new transaction) "),Object(r.b)("li",{parentName:"ul"},Object(r.b)(b,{color:"#00BBCE",mdxType:"Highlight"},"GET")," ",Object(r.b)("a",{href:"../AmbienteTestes/PlaygroundTransacoes#get-v1chargeid"},"/v1/charge/:id "),"(return existing transaction information)"),Object(r.b)("li",{parentName:"ul"},Object(r.b)(b,{color:"#fcaf17",mdxType:"Highlight"},"PUT")," ",Object(r.b)("a",{href:"../AmbienteTestes/PlaygroundTransacoes#put-v1chargeidmetadata"},"/v1/charge/:id/metadata "),' (includes "notification_url" and "custom_id" in a existing transaction)'),Object(r.b)("li",{parentName:"ul"},Object(r.b)(b,{color:"#fcaf17",mdxType:"Highlight"},"PUT")," ",Object(r.b)("a",{href:"../AmbienteTestes/PlaygroundTransacoes#put-v1chargeidbillet"},"/v1/charge/:id/billet")," (change due date of an existing transaction)"),Object(r.b)("li",{parentName:"ul"},Object(r.b)(b,{color:"#fcaf17",mdxType:"Highlight"},"PUT")," ",Object(r.b)("a",{href:"../AmbienteTestes/PlaygroundTransacoes#put-v1chargeidcancel"},"/v1/charge/:id/cancel")," (cancel an existing transaction)"),Object(r.b)("li",{parentName:"ul"},Object(r.b)(b,{color:"#009615",mdxType:"Highlight"},"POST")," ",Object(r.b)("a",{href:"../AmbienteTestes/PlaygroundTransacoes#post-v1chargeidpay"},"/v1/charge/:id/pay")," (associates payment method to a transaction already created)"),Object(r.b)("li",{parentName:"ul"},Object(r.b)(b,{color:"#009615",mdxType:"Highlight"},"POST")," ",Object(r.b)("a",{href:"../AmbienteTestes/PlaygroundTransacoes#post-v1chargeidbilletresend"},"/v1/charge/:id/billet/resend")," (resending the charge to the desired email )"),Object(r.b)("li",{parentName:"ul"},Object(r.b)(b,{color:"#009615",mdxType:"Highlight"},"POST")," ",Object(r.b)("a",{href:"../AmbienteTestes/PlaygroundTransacoes#post-v1chargeidhistory"},"/v1/charge/:id/history")," (add description to transaction history)"),Object(r.b)("li",{parentName:"ul"},Object(r.b)(b,{color:"#009615",mdxType:"Highlight"},"POST")," ",Object(r.b)("a",{href:"../AmbienteTestes/PlaygroundTransacoes#post-v1chargeidlink"},"/v1/charge/:id/link")," (returns a link to a Gerencianet payment page)"),Object(r.b)("li",{parentName:"ul"},Object(r.b)(b,{color:"#fcaf17",mdxType:"Highlight"},"PUT")," ",Object(r.b)("a",{href:"../AmbienteTestes/PlaygroundTransacoes#put-v1chargeidlink"},"/v1/charge/:id/link")," (change some parameters/attributes of an existing payment link)"),Object(r.b)("li",{parentName:"ul"},Object(r.b)(b,{color:"#009615",mdxType:"Highlight"},"POST")," ",Object(r.b)("a",{href:"../AmbienteTestes/PlaygroundTransacoes#post-v1chargeidbalance-sheet"},"/v1/charge/:id/balance-sheet")," (define that the transaction will be of the balance sheet type)"),Object(r.b)("li",{parentName:"ul"},Object(r.b)(b,{color:"#fcaf17",mdxType:"Highlight"},"PUT")," ",Object(r.b)("a",{href:"../AmbienteTestes/PlaygroundTransacoes#put-v1chargeidsettle"},"/v1/charge/:id/settle")," (mark as paid [manual] a certain transaction)")),Object(r.b)("br",null),Object(r.b)("hr",null),Object(r.b)("h3",{id:"post-v1charge"},Object(r.b)(b,{color:"#009615",mdxType:"Highlight"},"POST")," /v1/charge"),Object(r.b)("p",null,"Allows you to create a new transaction; returns a transaction identifier code named ",Object(r.b)("inlineCode",{parentName:"p"},"charge_id"),"."),Object(r.b)("p",null,"Only after generating the transaction will it be associated with a payment method, which can be boleto or credit card."),Object(r.b)("p",null,"In the following image, you can see the page of our test environment, which contains the resources linked to the ",Object(r.b)("inlineCode",{parentName:"p"},"POST /v1/charge")," method that are available for use: "),Object(r.b)("a",{href:Object(o.a)("img/postcharge.png"),target:"_blank"},Object(r.b)("img",{src:Object(o.a)("img/postcharge.png")})),Object(r.b)("p",null,"The following is a simple JSON that can be used to create a charge (still no payment method defined) in the Playground. In this case, this JSON defines that the charge must have a product named ",Object(r.b)("code",null,"Meu Produto"),", value ",Object(r.b)("code",null,"8900")," (which is equivalent to BRL 89.00) and quantity ",Object(r.b)("code",null," 1"),". Also, you can see the predicted output and validation schema with all attributes (mandatory and optional) available for this method: "),Object(r.b)(l.a,{defaultValue:"entrada",values:[{label:"Dados de Entrada",value:"entrada"},{label:"Dados de Sa\xedda",value:"saida"},{label:"Schema",value:"schema"}],mdxType:"Tabs"},Object(r.b)(c.a,{value:"entrada",mdxType:"TabItem"},Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-json"}),'{\n "items": [\n {\n "name": "Meu Produto",\n "value": 8900,\n "amount": 1\n }\n ]\n}\n'))),Object(r.b)(c.a,{value:"saida",mdxType:"TabItem"},Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-json"}),'{\n "code": 200, // retorno HTTP "200" informando que o pedido foi bem sucedido\n "data": {\n "charge_id": numero_charge_id, // n\xfamero da ID referente \xe0 transa\xe7\xe3o gerada\n "status": "new", // cobran\xe7a gerada, aguardando defini\xe7\xe3o da forma de pagamento\n "total": 8900, // valor total da transa\xe7\xe3o (em centavos, sendo 8900 = R$89,00)\n "custom_id": null, // identificador pr\xf3prio opcional\n "created_at": "2016-06-24 14:58:46" // data e hora da cria\xe7\xe3o da transa\xe7\xe3o\n }\n}\n'))),Object(r.b)(c.a,{value:"schema",mdxType:"TabItem"},Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-json"}),'{\n "id": "/Charge",\n "type": "object",\n "properties": {\n "items": {\n "id": "/MarketplaceItem",\n "type": "array",\n "minItems": 1,\n "items": {\n "type": "object",\n "properties": {\n "name": {\n "type": "string",\n "minLength": 1,\n "maxLength": 255,\n "pattern": "^[^<>]+$"\n },\n "value": {\n "type": "integer",\n "minimum": 0\n },\n "amount": {\n "type": "integer",\n "minimum": 1,\n "exclusiveMinimum": false\n },\n "marketplace": {\n "type": "object",\n "properties": {\n "repasses": {\n "id": "/Repass",\n "type": "array",\n "minItems": 1,\n "items": {\n "type": "object",\n "properties": {\n "payee_code": {\n "type": "string",\n "pattern": "^[a-fA-F0-9]{32}$"\n },\n "percentage": {\n "type": "integer",\n "minimum": 0,\n "maximum": 10000\n }\n },\n "required": [\n "payee_code",\n "percentage"\n ]\n }\n }\n },\n "required": [\n "repasses"\n ]\n }\n },\n "required": [\n "name",\n "value"\n ]\n }\n },\n "shippings": {\n "id": "/Shipping",\n "type": "array",\n "minItems": 1,\n "items": {\n "type": "object",\n "properties": {\n "name": {\n "type": "string",\n "maxLength": 255\n },\n "value": {\n "type": "integer",\n "minimum": 0\n },\n "payee_code": {\n "type": "string",\n "pattern": "^[a-fA-F0-9]{32}$"\n }\n },\n "required": [\n "name",\n "value"\n ]\n }\n },\n "metadata": {\n "type": "object",\n "properties": {\n "custom_id": {\n "type": [\n "string",\n "null"\n ],\n "maxLength": "255"\n },\n "notification_url": {\n "type": [\n "string",\n "null"\n ],\n "pattern": "^https?://.+",\n "maxLength": "255"\n }\n }\n }\n },\n "required": [\n "items"\n ]\n}\n')))),Object(r.b)("br",null),Object(r.b)("hr",null),Object(r.b)("h3",{id:"get-v1chargeid"},Object(r.b)(b,{color:"#00BBCE",mdxType:"Highlight"},"GET")," /v1/charge/:id"),Object(r.b)("p",null,"Allows you to return information from an existing transaction."),Object(r.b)("p",null,"In the following image, you can see the page of our test environment, which contains the resources linked to the ",Object(r.b)("inlineCode",{parentName:"p"},"GET /v1/charge/:id")," method that are available for use: "),Object(r.b)("a",{href:Object(o.a)("img/getchargeid.png"),target:"_blank"},Object(r.b)("img",{src:Object(o.a)("img/getchargeid.png")})),Object(r.b)("p",null,"The following is a simple JSON that can be used to fetch information from some transaction in the Playground. By informing the ",Object(r.b)("inlineCode",{parentName:"p"},"charge_id")," input parameter, information about the existing transaction will be returned, as you can see in the expected output available for this method: "),Object(r.b)(l.a,{defaultValue:"entrada",values:[{label:"Dados de Entrada",value:"entrada"},{label:"Dados de Sa\xedda",value:"saida"}],mdxType:"Tabs"},Object(r.b)(c.a,{value:"entrada",mdxType:"TabItem"},Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{}),' Input parameter: inform the "charge_id" of the transaction \n'))),Object(r.b)(c.a,{value:"saida",mdxType:"TabItem"},Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-json"}),'{\n "code": 200, // retorno HTTP "200" informando que o pedido foi bem sucedido\n "data": {\n "charge_id": 1234567, // n\xfamero da ID referente \xe0 transa\xe7\xe3o gerada\n "total": 8900, // valor total da transa\xe7\xe3o (em centavos, sendo 8900 = R$89,00)\n "status": "waiting", // forma de pagamento selecionada, aguardando a confirma\xe7\xe3o do pagamento (o termo "waiting" equivale a "aguardando")\n "custom_id": null, // identificador pr\xf3prio opcional\n "created_at": "2018-10-31 10:18:21", // data e hora da cria\xe7\xe3o da transa\xe7\xe3o\n "notification_url": null,\n "items": [\n {\n "name": "Meu Produto", // nome de seu item, produto ou servi\xe7o\n "value": 8900, // valor, em centavos. Por exemplo: 8900 (equivale a R$ 89,00)\n "amount": 1 // quantidade do item ou produto\n }\n ],\n "history": [\n {\n "message": "Cobran\xe7a criada",\n "created_at": "2018-10-31 10:18:21"\n },\n {\n "message": "Pagamento via boleto aguardando confirma\xe7\xe3o",\n "created_at": "2018-10-31 10:19:05"\n } \n ],\n "customer": {\n "name": "Gorbadoc Oldbuck",\n "cpf": "94271564656",\n "email": "email_do_cliente@servidor.com.br",\n "phone_number": "5144916523",\n "address": {\n "street": "Avenida Juscelino Kubitschek",\n "number": "909",\n "complement": null,\n "neighborhood": "Bauxita",\n "city": "Ouro Preto",\n "state": "MG",\n "zipcode": "35400000"\n }\n },\n "payment": {\n "method": "banking_billet", // forma de pagamento da cobran\xe7a (banking_billet equivale a boleto banc\xe1rio)\n "created_at": "2018-10-31 10:19:05",\n "message": "Usando o atributo message, este conte\xfado \xe9 exibido no campo OBSERVA\xc7\xc3O da cobran\xe7a emitida via API\\n ... e tamb\xe9m no campo OBSERVA\xc7\xc3O DO VENDEDOR nos e-mails de cobran\xe7a enviados ao cliente\\n \xc9 poss\xedvel utilizar at\xe9 4 linhas de conte\xfado, com no m\xe1ximo 100 caracteres por linha\\n Essa mensagem poder\xe1 ser vista nos e-mails relacionados \xe0 cobran\xe7a, no boleto ou carn\xea",\n "banking_billet": {\n "barcode": "00000.00000 00000.000000 00000.000000 0 00000000000000",\n "link": "link_https_para_acesso_ao_boleto", // link da transa\xe7\xe3o gerada\n "pdf": {\n "charge": "link_https_do_pdf_da_cobranca" // link do PDF da cobran\xe7a\n },\n "expire_at": "2018-12-30", // data de vencimento da cobran\xe7a no seguinte formato: 2018-12-30 (ou seja, equivale a 30/12/2018)\n "configurations": {\n "interest": 33, // valor cobrado de juros por dia ap\xf3s a data de vencimento (neste caso, 33 equivale a 0,033%)\n "fine": 200 // valor cobrado de multa ap\xf3s o vencimento (neste caso, 200 equivale a 2%)\n }\n }\n }\n }\n}\n')))),Object(r.b)("br",null),Object(r.b)("hr",null),Object(r.b)("h3",{id:"put-v1chargeidmetadata"},Object(r.b)(b,{color:"#fcaf17",mdxType:"Highlight"},"PUT")," /v1/charge/:id/metadata"),Object(r.b)("p",null,"Allows you to include information such as ",Object(r.b)("code",null,"notification_url")," and ",Object(r.b)("code",null,"custom_id")," to an existing transaction.This endpoint is ",Object(r.b)("strong",{parentName:"p"},"extremely important")," to update your transaction's notification URL or modify the ",Object(r.b)("code",null,"custom_id")," previously associated with your transactions. "),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},Object(r.b)("code",null,"notification_url"),": is a valid URL address that will receive transaction status change notifications"),Object(r.b)("li",{parentName:"ul"},Object(r.b)("code",null,"custom_id"),": allows associating a Gerencianet transaction with a specific ID of your system or application, allowing you to identify it if you have a specific ID and want to keep it.")),Object(r.b)("p",null,Object(r.b)("strong",{parentName:"p"},"Use cases for this endpoint:")),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},"Integrator changed the server IP that was associated in the subscription/transactions notification URL; ")),Object(r.b)("p",null,"-Integrator has updated the notification URL for new transactions that are created (",Object(r.b)("code",null,"createCharge"),"), but needs to update also on previous transactions (",Object(r.b)("code",null,"updateChargeMetadata"),") that were generated and that are associated with the incorrect/outdated URL; "),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},Object(r.b)("p",{parentName:"li"},'SSL (https) was installed on the client\'s server and even if the client defines a 301 or 302 redirection rule, it will be necessary to define the new URL in transactions that have the "old" URL; ')),Object(r.b)("li",{parentName:"ul"},Object(r.b)("p",{parentName:"li"},"Integrator generated charges and had not informed the notification URL when sending the transaction creation request; ")),Object(r.b)("li",{parentName:"ul"},Object(r.b)("p",{parentName:"li"},"Modify or add information next to the ",Object(r.b)("code",null,"custom_id")," attribute associated with previously generated transactions; ")),Object(r.b)("li",{parentName:"ul"},Object(r.b)("p",{parentName:"li"},"And others possible scenarios."))),Object(r.b)("p",null,"In the following image, you can see the screen of our test environment, which contains the resources linked to the ",Object(r.b)("code",null,"PUT /v1/charge/:id/metadata")," method that are available for use: "),Object(r.b)("a",{href:Object(o.a)("img/putchargemetadata.png"),target:"_blank"},Object(r.b)("img",{src:Object(o.a)("img/putchargemetadata.png")})),Object(r.b)("p",null,"The following is a simple JSON that can be used to change the notification URL and/or custom_id of an existing transaction in the Playground. Also, you can see the predicted output and validation schema with all attributes (mandatory and optional) available for this method. Remembering that you need to inform the ",Object(r.b)("inlineCode",{parentName:"p"},"charge_id")," input parameter of the desired transaction: "),Object(r.b)(l.a,{defaultValue:"entrada",values:[{label:"Dados de Entrada",value:"entrada"},{label:"Dados de Sa\xedda",value:"saida"},{label:"Schema",value:"schema"}],mdxType:"Tabs"},Object(r.b)(c.a,{value:"entrada",mdxType:"TabItem"},Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-json"}),'{\n "notification_url": null,\n "custom_id": null\n}\n'))),Object(r.b)(c.a,{value:"saida",mdxType:"TabItem"},Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-json"}),'{\n "code": 200 // retorno HTTP "200" informando que o pedido foi bem sucedido\n}\n'))),Object(r.b)(c.a,{value:"schema",mdxType:"TabItem"},Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-json"}),'{\n "type": "object",\n "minProperties": 1,\n "id": "/ChargeMetadataUpdate",\n "properties": {\n "notification_url": {\n "type": [\n "string",\n "null"\n ],\n "pattern": "^https?://.+",\n "minLength": "1",\n "maxLength": "255"\n },\n "custom_id": {\n "type": "string",\n "minLength": "1",\n "maxLength": "255",\n "pattern": "^[a-zA-Z0-9\\\\_\\\\-\\\\s]+$"\n }\n }\n}\n')))),Object(r.b)("br",null),Object(r.b)("hr",null),Object(r.b)("h3",{id:"put-v1chargeidbillet"},Object(r.b)(b,{color:"#fcaf17",mdxType:"Highlight"},"PUT")," /v1/charge/:id/billet"),Object(r.b)("p",null,"Allows you to change the due date of a transaction in which the payment method is a boleto (",Object(r.b)("inlineCode",{parentName:"p"},"banking_billet"),") and which has not yet been paid. The due date format must follow the following pattern: ",Object(r.b)("inlineCode",{parentName:"p"},"YYYY-MM-DD"),"."),Object(r.b)("p",null,"In the following image, you can see the screen of our test environment, which contains the resources linked to the ",Object(r.b)("inlineCode",{parentName:"p"},"PUT /v1/charge/:id/billet")," method that are available for use: "),Object(r.b)("a",{href:Object(o.a)("img/putchargeidbillet.png"),target:"_blank"},Object(r.b)("img",{src:Object(o.a)("img/putchargeidbillet.png")})),Object(r.b)("p",null,"The following is a simple JSON that can be used to change the due date of a boleto in the Playground - in this case, the new due date of the boleto will be ",Object(r.b)("inlineCode",{parentName:"p"},"2021-12-30")," (equivalent to ",Object(r.b)("inlineCode",{parentName:"p"},"30/12 /2021"),"). Also, you can see the predicted output and validation schema with all attributes (mandatory and optional) available for this method. Remembering that it is necessary to inform the charge_id input parameter of the desired transaction: "),Object(r.b)(l.a,{defaultValue:"entrada",values:[{label:"Dados de Entrada",value:"entrada"},{label:"Dados de Sa\xedda",value:"saida"},{label:"Schema",value:"schema"}],mdxType:"Tabs"},Object(r.b)(c.a,{value:"entrada",mdxType:"TabItem"},Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-json"}),'{\n "expire_at": "2021-12-30"\n}\n'))),Object(r.b)(c.a,{value:"saida",mdxType:"TabItem"},Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-json"}),'{\n "code": 200 // retorno HTTP "200" informando que o pedido foi bem sucedido\n}\n'))),Object(r.b)(c.a,{value:"schema",mdxType:"TabItem"},Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-json"}),'{\n "id": "/ChargeBilletUpdate",\n "type": "object",\n "properties": {\n "expire_at": {\n "type": "string",\n "pattern": "^[12][0-9]{3}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12][0-9]|3[01])$"\n }\n },\n "required": [\n "expire_at"\n ]\n}\n')))),Object(r.b)("br",null),Object(r.b)("hr",null),Object(r.b)("h3",{id:"put-v1chargeidcancel"},Object(r.b)(b,{color:"#fcaf17",mdxType:"Highlight"},"PUT")," /v1/charge/:id/cancel"),Object(r.b)("p",null,"Through this ",Object(r.b)("em",{parentName:"p"},"endpoint")," it is possible to cancel a created transaction."),Object(r.b)("p",null,"Only transactions with ",Object(r.b)("inlineCode",{parentName:"p"},"new"),", ",Object(r.b)("inlineCode",{parentName:"p"},"waiting"),", ",Object(r.b)("inlineCode",{parentName:"p"},"unpaid")," or ",Object(r.b)("inlineCode",{parentName:"p"},"link")," status can be cancelled. Once a transaction is cancelled, there is only one condition for this status to be changed again: if the customer prints the slip before the integrator cancels the transaction, he or she can make the payment normally at a bank branch."),Object(r.b)("p",null,"In this case, the integrator and the payer receive payment confirmation as usual and the billing status is changed from ",Object(r.b)("inlineCode",{parentName:"p"},"canceled")," to ",Object(r.b)("inlineCode",{parentName:"p"},"paid"),"."),Object(r.b)("p",null,"In the following image, you can see the screen of our test environment, which contains the resources linked to the PUT /v1/charge/:id/cancel method that are available for use: "),Object(r.b)("a",{href:Object(o.a)("img/putchargeidcancel.png"),target:"_blank"},Object(r.b)("img",{src:Object(o.a)("img/putchargeidcancel.png")})),Object(r.b)("p",null,"The following is a simple JSON that can be used to cancel a transaction created in Playground. Also, you can look at the predicted output available for this method. Remembering that you need to inform the ",Object(r.b)("inlineCode",{parentName:"p"},"charge_id")," input parameter of the desired transaction: "),Object(r.b)(l.a,{defaultValue:"entrada",values:[{label:"Dados de Entrada",value:"entrada"},{label:"Dados de Sa\xedda",value:"saida"}],mdxType:"Tabs"},Object(r.b)(c.a,{value:"entrada",mdxType:"TabItem"},Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-j"}),'Input parameter: inform the "charge_id" of the transaction \n'))),Object(r.b)(c.a,{value:"saida",mdxType:"TabItem"},Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-json"}),'{\n "code": 200 // retorno HTTP "200" informando que o pedido foi bem sucedido\n}\n')))),Object(r.b)("br",null),Object(r.b)("hr",null),Object(r.b)("h3",{id:"post-v1chargeidpay"},Object(r.b)(b,{color:"#009615",mdxType:"Highlight"},"POST")," /v1/charge/:id/pay"),Object(r.b)("p",null,"Allows you to associate a payment method with an already created transaction."),Object(r.b)("p",null,"After generating a transaction through the endpoint ",Object(r.b)("code",null,"POST /v1/charge"),", it is settled with the status of ",Object(r.b)("code",null,"new")," (new), that is, a new transaction was generated, however, no payment method has been assigned to her."),Object(r.b)("p",null,"To define a payment method for the created transaction, the integrator can choose between ",Object(r.b)("code",null,"banking_billet")," or ",Object(r.b)("code",null,"credit_card")," (boleto bancario and credit card, respectively)."),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},Object(r.b)("p",{parentName:"li"},Object(r.b)("em",{parentName:"p"},"Boleto Banc\xe1rio"),": the transaction goes through a status change cycle, being initially created with the status of ",Object(r.b)("code",null,"new")," (new) and, when defining the payment method, the status will be ",Object(r.b)("code",null,"waiting")," (waiting). This means that the boleto has been successfully generated, but has not yet been paid. When choosing boleto bancario, the consumer response will already have the typed line, barcode and link to access the boleto;")),Object(r.b)("li",{parentName:"ul"},Object(r.b)("p",{parentName:"li"},Object(r.b)("em",{parentName:"p"},"Credit Card"),": the main difference for the boleto is related to the need to use a code called \u201cpayment_token\u201d. In the Playground, you can generate your token by clicking on the ",Object(r.b)("em",{parentName:"p"},"\u201cGerar payment token\u201d")," button and pasting it into the ",Object(r.b)("code",null,"payment_token"),' attribute. In the production environment, obtaining the "payment_token" is done by consuming a Javascript code available in your account.'))),Object(r.b)("p",null,"In the following image, you can see the screen of our test environment, which contains the resources linked to the ",Object(r.b)("code",null,"POST /v1/charge/:id/pay")," method that are available for use: "),Object(r.b)("a",{href:Object(o.a)("img/postchargeidpay.png"),target:"_blank"},Object(r.b)("img",{src:Object(o.a)("img/postchargeidpay.png")})),Object(r.b)("p",null,"The following is a simple JSON that can be used to associate a payment method with a transaction already created in Playground - the integrator can choose between ",Object(r.b)("inlineCode",{parentName:"p"},"banking_billet")," or ",Object(r.b)("inlineCode",{parentName:"p"},"credit_card"),". Also, you can see the predicted output and validation schema with all attributes (mandatory and optional) available for this method. Remembering that you need to inform the ",Object(r.b)("inlineCode",{parentName:"p"},"charge_id")," input parameter of the desired transaction: "),Object(r.b)(l.a,{defaultValue:"entradaCartao",values:[{label:"Dados de Entrada (cart\xe3o)",value:"entradaCartao"},{label:"Dados de Entrada (boleto)",value:"entradaBoleto"},{label:"Dados de Sa\xedda (cart\xe3o)",value:"saidaCartao"},{label:"Dados de Sa\xedda (boleto)",value:"saidaBoleto"},{label:"Schema",value:"schema"}],mdxType:"Tabs"},Object(r.b)(c.a,{value:"entradaCartao",mdxType:"TabItem"},Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-json"}),'{\n "payment": {\n "credit_card": {\n "customer": {\n "name": "Gorbadoc Oldbuck",\n "cpf": "94271564656",\n "email": "email_do_cliente@servidor.com.br",\n "birth": "1990-08-29",\n "phone_number": "5144916523"\n },\n "installments": 1,\n "payment_token": "",\n "billing_address": {\n "street": "Avenida Juscelino Kubitschek",\n "number": "909",\n "neighborhood": "Bauxita",\n "zipcode": "35400000",\n "city": "Ouro Preto",\n "complement": "",\n "state": "MG"\n }\n }\n }\n}\n'))),Object(r.b)(c.a,{value:"entradaBoleto",mdxType:"TabItem"},Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-json"}),'{\n "payment": {\n "banking_billet": {\n "customer": {\n "name": "Gorbadoc Oldbuck",\n "cpf": "94271564656",\n "email": "email_do_cliente@servidor.com.br",\n "phone_number": "5144916523",\n "address": {\n "street": "Avenida Juscelino Kubitschek",\n "number": "909",\n "neighborhood": "Bauxita",\n "zipcode": "35400000",\n "city": "Ouro Preto",\n "complement": "",\n "state": "MG"\n }\n },\n "expire_at": "2018-12-30",\n "configurations": {\n "fine": 200,\n "interest": 33\n },\n "message": "Usando o atributo message, este conte\xfado \xe9 exibido no campo OBSERVA\xc7\xc3O da cobran\xe7a emitida via API \\n ... e tamb\xe9m no campo OBSERVA\xc7\xc3O DO VENDEDOR nos e-mails de cobran\xe7a enviados ao cliente \\n \xc9 poss\xedvel utilizar at\xe9 4 linhas de conte\xfado, com no m\xe1ximo 100 caracteres por linha \\n Essa mensagem poder\xe1 ser vista nos e-mails relacionados \xe0 cobran\xe7a, no boleto ou carn\xea"\n }\n }\n}\n'))),Object(r.b)(c.a,{value:"saidaCartao",mdxType:"TabItem"},Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-json"}),'{\n "code": 200, // retorno HTTP "200" informando que o pedido foi bem sucedido\n "data": {\n "installments": 1, // n\xfamero de parcelas em que o pagamento deve ser dividido\n "installment_value": 8900, // valor da parcela. Por exemplo: 8900 (equivale a R$ 89,00)\n "charge_id": numero_charge_id, // n\xfamero da ID referente \xe0 transa\xe7\xe3o gerada\n "status": "waiting", // forma de pagamento selecionada, aguardando a confirma\xe7\xe3o do pagamento ("waiting" equivale a "aguardando")\n "total": 8900, // valor, em centavos. Por exemplo: 8900 (equivale a R$ 89,00)\n "payment": "credit_card" // forma de pagamento associada \xe0 esta transa\xe7\xe3o ("credit_card" equivale a "cart\xe3o de cr\xe9dito")\n }\n}\n'))),Object(r.b)(c.a,{value:"saidaBoleto",mdxType:"TabItem"},Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-json"}),'{\n "code": 200, // retorno HTTP "200" informando que o pedido foi bem sucedido\n "data": {\n "barcode": "00000.00000 00000.000000 00000.000000 0 00000000000000", // linha digit\xe1vel do boleto\n "link": "link_https_para_acesso_ao_boleto", // link do boleto gerado\n "pdf": {\n "charge": "link_https_do_pdf_da_cobranca" // link do PDF da cobran\xe7a\n }, \n "expire_at": "2018-12-30", // data de vencimento do boleto no seguinte formato: 2018-12-30 (ou seja, equivale a 30/12/2018)\n "charge_id": numero_charge_id, // n\xfamero da ID referente \xe0 transa\xe7\xe3o gerada\n "status": "waiting", // forma de pagamento selecionada, aguardando a confirma\xe7\xe3o do pagamento ("waiting" equivale a "aguardando")\n "total": 8900, // valor, em centavos. Por exemplo: 8900 (equivale a R$ 89,00)\n "payment": "banking_billet" // forma de pagamento associada \xe0 esta transa\xe7\xe3o ("banking_billet" equivale a "boleto banc\xe1rio")\n }\n}\n'))),Object(r.b)(c.a,{value:"schema",mdxType:"TabItem"},Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-json"}),'{\n "type": "object",\n "id": "/Pay",\n "properties": {\n "payment": {\n "type": "object",\n "maxProperties": 1,\n "minProperties": 1,\n "properties": {\n "banking_billet": {\n "type": "object",\n "id": "/Billet",\n "properties": {\n "customer": {\n "type": "object",\n "id": "/BasicCustomer",\n "properties": {\n "name": {\n "type": [\n "string",\n "null"\n ],\n "minLength": 1,\n "maxLength": 255,\n "pattern": "^[ ]*(.+[ ]+)+.+[ ]*$"\n },\n "cpf": {\n "type": [\n "string",\n "null"\n ],\n "minLength": 11,\n "maxLength": 11\n },\n "email": {\n "type": [\n "string",\n "null"\n ],\n "maxLength": 255,\n "pattern": "^[A-Za-z0-9_\\\\-]+(?:[.][A-Za-z0-9_\\\\-]+)*@[A-Za-z0-9_]+(?:[-.][A-Za-z0-9_]+)*\\\\.[A-Za-z0-9_]+$"\n },\n "phone_number": {\n "type": "string",\n "pattern": "^[1-9]{2}9?[0-9]{8}$"\n },\n "birth": {\n "type": [\n "string",\n "null"\n ],\n "pattern": "^[12][0-9]{3}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12][0-9]|3[01])$"\n },\n "address": {\n "type": "object",\n "id": "/AddressOptional",\n "properties": {\n "street": {\n "type": [\n "string",\n "null"\n ],\n "minLength": 0,\n "maxLength": 200\n },\n "number": {\n "type": [\n "string",\n "null",\n "integer"\n ],\n "minLength": 0,\n "maxLength": 55\n },\n "neighborhood": {\n "type": [\n "string",\n "null"\n ],\n "minLength": 0,\n "maxLength": 255\n },\n "zipcode": {\n "type": [\n "string",\n "null"\n ],\n "pattern": "^[0-9]{8}$"\n },\n "city": {\n "type": [\n "string",\n "null"\n ],\n "minLength": 0,\n "maxLength": 50\n },\n "complement": {\n "type": [\n "string",\n "null"\n ],\n "minLength": 0,\n "maxLength": 45\n },\n "state": {\n "type": [\n "string",\n "null"\n ],\n "pattern": "^(?:A[CLPM]|BA|CE|DF|ES|GO|M[ATSG]|P[RBAEI]|R[JNSOR]|S[CEP]|TO)$"\n }\n }\n },\n "juridical_person": {\n "type": "object",\n "id": "/JuridicalPerson",\n "properties": {\n "corporate_name": {\n "type": [\n "string",\n "null"\n ],\n "minLength": 1,\n "maxLength": 255\n },\n "cnpj": {\n "type": [\n "string",\n "null"\n ],\n "minLength": 14,\n "maxLength": 14\n }\n },\n "required": [\n "corporate_name",\n "cnpj"\n ]\n }\n },\n "required": [\n "phone_number"\n ]\n },\n "expire_at": {\n "type": "string",\n "pattern": "^[12][0-9]{3}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12][0-9]|3[01])$"\n },\n "discount": {\n "type": "object",\n "id": "/Discount",\n "properties": {\n "type": {\n "type": "string",\n "enum": [\n "percentage",\n "currency"\n ]\n },\n "value": {\n "type": "integer",\n "minimum": 1\n }\n },\n "required": [\n "type",\n "value"\n ]\n },\n "conditional_discount": {\n "id": "/ConditionalDiscount",\n "type": "object",\n "properties": {\n "type": {\n "type": "string",\n "enum": [\n "percentage",\n "currency"\n ]\n },\n "value": {\n "type": "integer",\n "minimum": 1\n },\n "until_date": {\n "type": "string",\n "pattern": "^[12][0-9]{3}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12][0-9]|3[01])$"\n }\n },\n "required": [\n "type",\n "value",\n "until_date"\n ]\n },\n "instructions": {\n "type": "array",\n "minItems": 1,\n "maxItems": 4,\n "items": {\n "type": "string",\n "minLength": 1,\n "maxLength": 90\n }\n },\n "configurations": {\n "type": "object",\n "id": "/Configurations",\n "minProperties": 1,\n "properties": {\n "fine": {\n "type": "integer",\n "minimum": 0,\n "maximum": 1000\n },\n "interest": {\n "type": "integer",\n "minimum": 0,\n "maximum": 330\n }\n }\n },\n "message": {\n "type": "string",\n "pattern": "^[^\\n]{0,100}(\\n[^\\n]{0,100}){0,3}$"\n }\n },\n "required": [\n "customer",\n "expire_at"\n ]\n },\n "credit_card": {\n "type": "object",\n "id": "/CreditCard",\n "properties": {\n "customer": {\n "type": "object",\n "id": "/FullCustomer",\n "properties": {\n "name": {\n "type": [\n "string",\n "null"\n ],\n "minLength": 1,\n "maxLength": 255,\n "pattern": "^[ ]*(.+[ ]+)+.+[ ]*$"\n },\n "cpf": {\n "type": [\n "string",\n "null"\n ],\n "minLength": 11,\n "maxLength": 11\n },\n "email": {\n "type": "string",\n "maxLength": 255,\n "pattern": "^[A-Za-z0-9_\\\\-]+(?:[.][A-Za-z0-9_\\\\-]+)*@[A-Za-z0-9_]+(?:[-.][A-Za-z0-9_]+)*\\\\.[A-Za-z0-9_]+$"\n },\n "phone_number": {\n "type": "string",\n "pattern": "^[1-9]{2}9?[0-9]{8}$"\n },\n "birth": {\n "type": "string",\n "pattern": "^[12][0-9]{3}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12][0-9]|3[01])$"\n },\n "address": {\n "type": "object",\n "id": "/Address",\n "properties": {\n "street": {\n "type": "string",\n "minLength": 1,\n "maxLength": 200\n },\n "number": {\n "type": [\n "string",\n "integer"\n ],\n "minLength": 1,\n "maxLength": 55\n },\n "neighborhood": {\n "type": "string",\n "minLength": 1,\n "maxLength": 255\n },\n "zipcode": {\n "type": "string",\n "pattern": "^[0-9]{8}$"\n },\n "city": {\n "type": "string",\n "minLength": 1,\n "maxLength": 50\n },\n "complement": {\n "type": [\n "string",\n "null"\n ],\n "minLength": 0,\n "maxLength": 45\n },\n "state": {\n "type": "string",\n "pattern": "^(?:A[CLPM]|BA|CE|DF|ES|GO|M[ATSG]|P[RBAEI]|R[JNSOR]|S[CEP]|TO)$"\n }\n },\n "required": [\n "street",\n "number",\n "neighborhood",\n "zipcode",\n "city",\n "state"\n ]\n },\n "juridical_person": {\n "type": "object",\n "id": "/JuridicalPerson",\n "properties": {\n "corporate_name": {\n "type": [\n "string",\n "null"\n ],\n "minLength": 1,\n "maxLength": 255\n },\n "cnpj": {\n "type": [\n "string",\n "null"\n ],\n "minLength": 14,\n "maxLength": 14\n }\n },\n "required": [\n "corporate_name",\n "cnpj"\n ]\n }\n },\n "required": [\n "email",\n "phone_number",\n "birth"\n ]\n },\n "installments": {\n "type": "integer",\n "minimum": 1,\n "maximum": 12,\n "exclusiveMinimum": false,\n "exclusiveMaximum": false\n },\n "discount": {\n "type": "object",\n "id": "/Discount",\n "properties": {\n "type": {\n "type": "string",\n "enum": [\n "percentage",\n "currency"\n ]\n },\n "value": {\n "type": "integer",\n "minimum": 1\n }\n },\n "required": [\n "type",\n "value"\n ]\n },\n "billing_address": {\n "type": "object",\n "id": "/Address",\n "properties": {\n "street": {\n "type": "string",\n "minLength": 1,\n "maxLength": 200\n },\n "number": {\n "type": [\n "string",\n "integer"\n ],\n "minLength": 1,\n "maxLength": 55\n },\n "neighborhood": {\n "type": "string",\n "minLength": 1,\n "maxLength": 255\n },\n "zipcode": {\n "type": "string",\n "pattern": "^[0-9]{8}$"\n },\n "city": {\n "type": "string",\n "minLength": 1,\n "maxLength": 50\n },\n "complement": {\n "type": [\n "string",\n "null"\n ],\n "minLength": 0,\n "maxLength": 45\n },\n "state": {\n "type": "string",\n "pattern": "^(?:A[CLPM]|BA|CE|DF|ES|GO|M[ATSG]|P[RBAEI]|R[JNSOR]|S[CEP]|TO)$"\n }\n },\n "required": [\n "street",\n "number",\n "neighborhood",\n "zipcode",\n "city",\n "state"\n ]\n },\n "payment_token": {\n "type": "string",\n "pattern": "^[a-fA-F0-9]{40}$"\n },\n "message": {\n "type": "string",\n "pattern": "^[^\\n]{0,100}(\\n[^\\n]{0,100}){0,3}$"\n }\n },\n "required": [\n "customer",\n "billing_address",\n "payment_token"\n ]\n }\n }\n }\n },\n "required": [\n "payment"\n ]\n}\n')))),Object(r.b)("p",null,"In the case of the tab ",Object(r.b)("em",null,'"Dados de Entrada (boleto)"'),", is being generated a boleto due on 12/30/2018, we are using a message to inform the customer about something, and if the charge is paid after the due date, a 2% fine and 0.033% interest per day will be charged."),Object(r.b)("p",null,"In the case of the tab ",Object(r.b)("em",null,'"Dados de Entrada (cart\xe3o)"'),", the ",Object(r.b)("code",null,"payment_token")," is the payment token required when paying via card. In the Playground, it is obtained just by clicking the ",Object(r.b)("em",null,'"Gerar payment token"')," button and pasting it inside the ",Object(r.b)("code",null,"payment_token"),' attribute. If it was in a production environment, it would be obtained through the Javascript code available for each Gestornet account - for boleto the "payment_token" is not necessary.'),Object(r.b)("div",{className:"admonition admonition-tip alert alert--success"},Object(r.b)("div",Object(a.a)({parentName:"div"},{className:"admonition-heading"}),Object(r.b)("h5",{parentName:"div"},Object(r.b)("span",Object(a.a)({parentName:"h5"},{className:"admonition-icon"}),Object(r.b)("svg",Object(a.a)({parentName:"span"},{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"16",viewBox:"0 0 12 16"}),Object(r.b)("path",Object(a.a)({parentName:"svg"},{fillRule:"evenodd",d:"M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"})))),"information")),Object(r.b)("div",Object(a.a)({parentName:"div"},{className:"admonition-content"}),Object(r.b)("p",{parentName:"div"},"When using the ",Object(r.b)("inlineCode",{parentName:"p"},"message")," attribute, you must use the ",Object(r.b)("inlineCode",{parentName:"p"},"\\n"),' operator to "break" the line. In the code we provide we have already included this operator.'))),Object(r.b)("br",null),Object(r.b)("hr",null),Object(r.b)("h3",{id:"post-v1chargeidbilletresend"},Object(r.b)(b,{color:"#009615",mdxType:"Highlight"},"POST")," /v1/charge/:id/billet/resend"),Object(r.b)("p",null,"Allows you to resend the boleto to some email address."),Object(r.b)("p",null,"In the following image, you can see the screen of our test environment, which contains the resources linked to the ",Object(r.b)("inlineCode",{parentName:"p"},"POST /v1/charge/:id/billet/resend")," method that are available for use: "),Object(r.b)("a",{href:Object(o.a)("img/postchargebilletresend.png"),target:"_blank"},Object(r.b)("img",{src:Object(o.a)("img/postchargebilletresend.png")})),Object(r.b)("p",null,'Next, a simple JSON that can be used to resend a boleto created in Playground by e-mail - in this case, it will define that the address "',Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"mailto:email_do_cliente@servidor.com.br"}),"email_do_cliente@servidor.com.br"),'" will receive the boleto that was created in a tests. Also, you can see the predicted output and validation schema with all attributes (mandatory and optional) available for this method. Remembering that you need to inform the ',Object(r.b)("inlineCode",{parentName:"p"},"charge_id")," input parameter of the desired transaction: "),Object(r.b)(l.a,{defaultValue:"entrada",values:[{label:"Dados de Entrada",value:"entrada"},{label:"Dados de Sa\xedda",value:"saida"},{label:"Schema",value:"schema"}],mdxType:"Tabs"},Object(r.b)(c.a,{value:"entrada",mdxType:"TabItem"},Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-json"}),'{\n"email": "email_do_cliente@servidor.com.br"\n}\n'))),Object(r.b)(c.a,{value:"saida",mdxType:"TabItem"},Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-json"}),'{\n"code": 200 // retorno HTTP "200" informando que o pedido foi bem sucedido\n}\n'))),Object(r.b)(c.a,{value:"schema",mdxType:"TabItem"},Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-json"}),'{\n"id": "/ChargeBilletResend",\n"type": "object",\n"properties": {\n "email": {\n "type": "string",\n "maxLength": 255,\n "pattern": "^[A-Za-z0-9_\\\\-]+(?:[.][A-Za-z0-9_\\\\-]+)*@[A-Za-z0-9_]+(?:[-.][A-Za-z0-9_]+)*\\\\.[A-Za-z0-9_]+$"\n }\n},\n"required": [\n "email"\n]\n}\n')))),Object(r.b)("br",null),Object(r.b)("hr",null),Object(r.b)("h3",{id:"post-v1chargeidhistory"},Object(r.b)(b,{color:"#009615",mdxType:"Highlight"},"POST")," /v1/charge/:id/history"),Object(r.b)("p",null,"The history of a transaction represents all the actions that have been done with that transaction up to the present time. You can add custom messages to this history using the ",Object(r.b)("inlineCode",{parentName:"p"},"/v1/charge/:id/history")," endpoint."),Object(r.b)("p",null,"Personalized messages do not influence in the transaction itself, only its history. To do so, you must inform the ",Object(r.b)("inlineCode",{parentName:"p"},"charge_id")," of the desired transaction. This description must have a minimum of one character and a maximum of 255 characters."),Object(r.b)("p",null,"In the following image, you can see the screen of our test environment, which contains the resources linked to the ",Object(r.b)("inlineCode",{parentName:"p"},"POST /v1/charge/:id/history")," method that are available for use: "),Object(r.b)("a",{href:Object(o.a)("img/postchargehistory.png"),target:"_blank"},Object(r.b)("img",{src:Object(o.a)("img/postchargehistory.png")})),Object(r.b)("p",null,'The following is a simple JSON that can be used to add a description to a given transaction in the Playground - in this case, it will add the description "Camisa Polo tamanho G cor azul". Also, you can see the predicted output and validation schema with all attributes (mandatory and optional) available for this method. Remembering that you need to inform the ',Object(r.b)("inlineCode",{parentName:"p"},"charge_id")," input parameter of the desired transaction: "),Object(r.b)(l.a,{defaultValue:"entrada",values:[{label:"Dados de Entrada",value:"entrada"},{label:"Dados de Sa\xedda",value:"saida"},{label:"Schema",value:"schema"}],mdxType:"Tabs"},Object(r.b)(c.a,{value:"entrada",mdxType:"TabItem"},Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-json"}),'{\n"description": "Camisa Polo tamanho G cor azul"\n}\n'))),Object(r.b)(c.a,{value:"saida",mdxType:"TabItem"},Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-json"}),'{\n"code": 200 // retorno HTTP "200" informando que o pedido foi bem sucedido\n}\n'))),Object(r.b)(c.a,{value:"schema",mdxType:"TabItem"},Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-json"}),'{\n"type": "object",\n"id": "/ChargeHistory",\n"properties": {\n "description": {\n "type": "string",\n "maxLength": "255",\n "minLength": "1"\n }\n},\n"required": [\n "description"\n]\n}\n')))),Object(r.b)("br",null),Object(r.b)("hr",null),Object(r.b)("h3",{id:"post-v1chargeidlink"},Object(r.b)(b,{color:"#009615",mdxType:"Highlight"},"POST")," /v1/charge/:id/link"),Object(r.b)("p",null,"Allows you to return a link to a Gerencianet payment page. In other words, the integrator generates a charge and then, instead of defining the payment via boleto or credit card, the integrator can request a link, even choosing whether the payment page should accept boleto, card or both."),Object(r.b)("p",null,"In addition, the integrator sets a due date for the payment page, that is, after the date defined by the integrator, the payment screen link will no longer be valid. The integrator can define the discount for boleto or card, and can also inform whether or not he wants to collect the customer's address."),Object(r.b)("p",null,"This payment screen is not a payment definition such as a boleto or card, but an intermediary. It is useful when the integrator does not want to implement its own payment page, for example."),Object(r.b)("p",null,"In the following image, you can see the screen of our test environment, which contains the resources linked to the ",Object(r.b)("inlineCode",{parentName:"p"},"POST /v1/charge/:id/link")," method that are available for use: "),Object(r.b)("a",{href:Object(o.a)("img/postchargelink.png"),target:"_blank"},Object(r.b)("img",{src:Object(o.a)("img/postchargelink.png")})),Object(r.b)("p",null,"The following is a simple JSON that can be used to return a link to a Gerencianet payment page. To use it, you must previously create a transaction and, in the ",Object(r.b)("inlineCode",{parentName:"p"},"id")," field, provide the ",Object(r.b)("inlineCode",{parentName:"p"},"charge_id")," of the transaction that was created earlier. Thus, a link will be returned that will allow the customer to go to a payment screen previously configured by the integrator."),Object(r.b)("p",null,"Also, you can see the predicted output and validation schema with all tags (mandatory and optional) available for this method. Remembering that it is also necessary to inform the input parameter ",Object(r.b)("inlineCode",{parentName:"p"},"charge_id")," of the desired transaction and created previously: "),Object(r.b)(l.a,{defaultValue:"entrada",values:[{label:"Dados de Entrada",value:"entrada"},{label:"Dados de Sa\xedda",value:"saida"},{label:"Schema",value:"schema"}],mdxType:"Tabs"},Object(r.b)(c.a,{value:"entrada",mdxType:"TabItem"},Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-json"}),'{\n"message": "Escreva aqui, se quiser, uma mensagem ao seu cliente, limite de 80 caracteres",\n"expire_at": "2021-12-20",\n"request_delivery_address": false,\n"payment_method": "all"\n}\n'))),Object(r.b)(c.a,{value:"saida",mdxType:"TabItem"},Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-json"}),'{\n"code": 200, // retorno HTTP "200" informando que o pedido foi bem sucedido\n"data": {\n "charge_id": 1234567, // n\xfamero da ID referente \xe0 transa\xe7\xe3o gerada\n "status": "link", // indica que trata-se de uma cobran\xe7a que est\xe1 associada a um link de pagamento\n "total": 5900, // valor total da transa\xe7\xe3o (em centavos, sendo 5900 = R$59,00)\n "custom_id": null, // identificador pr\xf3prio opcional\n "payment_url": "https://pagamento.gerencianet.com.br/8fb4790a-bd16-4268-8118-9cf17ba4a4aa", // link https do link de pagamento\n "payment_method": "all", // formas de pagamento permitidas (all = cart\xe3o e boleto)\n "conditional_discount_date": null, // se usado, refere-se a data m\xe1xima que o desconto condicional ser\xe1 concedido\n "request_delivery_address": false, // solicitar endere\xe7o de entrega do comprador?\n "message": "Escreva aqui, se quiser, uma mensagem ao seu cliente, limite de 80 caracteres", // mensagem para o pagador com at\xe9 80 caracteres\n "expire_at": "2021-12-20", // data de vencimento da tela de pagamento e do pr\xf3prio boleto\n "created_at": "2021-10-31 11:14:11" // data e hora da cria\xe7\xe3o do link\n}\n}\n'))),Object(r.b)(c.a,{value:"schema",mdxType:"TabItem"},Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-json"}),'{\n"id": "/ChargeLink",\n"type": "object",\n"properties": {\n "billet_discount": {\n "type": "integer",\n "minimum": 1,\n "maximum": 99999999\n },\n "card_discount": {\n "type": "integer",\n "minimum": 1,\n "maximum": 99999999\n },\n "conditional_discount": {\n "id": "/ConditionalDiscount",\n "type": "object",\n "properties": {\n "type": {\n "type": "string",\n "enum": [\n "percentage",\n "currency"\n ]\n },\n "value": {\n "type": "integer",\n "minimum": 1\n },\n "until_date": {\n "type": "string",\n "pattern": "^[12][0-9]{3}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12][0-9]|3[01])$"\n }\n },\n "required": [\n "type",\n "value",\n "until_date"\n ]\n },\n "message": {\n "type": "string",\n "pattern": "^[^\\n]{0,100}(\\n[^\\n]{0,100}){0,3}$"\n },\n "expire_at": {\n "type": "string",\n "pattern": "^[12][0-9]{3}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12][0-9]|3[01])$"\n },\n "request_delivery_address": {\n "type": "boolean"\n },\n "payment_method": {\n "enum": [\n "banking_billet",\n "credit_card",\n "all"\n ]\n }\n},\n"required": [\n "request_delivery_address",\n "expire_at",\n "payment_method"\n]\n}\n')))),"This JSON will return a link that will give access to a payment screen. Note that this link on the payment screen will be valid until 12/20/2018, we are not asking for our customer's delivery address and the payment method allowed is boleto and card (which could also have used ``banking_billet`` to allow payment via boleto or ``credit_card`` for card only).",Object(r.b)("p",null,"There are other possibilities, such as, for example, granting a discount according to the payment method, it would be enough to use the ",Object(r.b)("inlineCode",{parentName:"p"},"billet_discount"),' attributes - see in the "Schema" tab all the possible attributes to be used.'),Object(r.b)("br",null),Object(r.b)("hr",null),Object(r.b)("h3",{id:"put-v1chargeidlink"},Object(r.b)(b,{color:"#fcaf17",mdxType:"Highlight"},"PUT")," /v1/charge/:id/link"),Object(r.b)("p",null,"Allows you to update (change) certain parameters/attributes of a payment link created through ",Object(r.b)("inlineCode",{parentName:"p"},"POST /v1/charge/:id/link"),", as long as the payment has not been confirmed. Some information that can be updated: payment method, insert discount and message to the customer, payment link expiration date and change (or not) the buyer's delivery address."),Object(r.b)("p",null,"In the following image, you can see the page of our test environment, which contains the resources linked to the ",Object(r.b)("inlineCode",{parentName:"p"},"PUT /v1/charge/:id/link")," method that are available for use:"),Object(r.b)("a",{href:Object(o.a)("img/PUTchargeidlink.png"),target:"_blank"},Object(r.b)("img",{src:Object(o.a)("img/PUTchargeidlink.png")})),Object(r.b)("p",null,"The following is a simple JSON that can be used to update (change) certain parameters/attributes of a payment link created through ",Object(r.b)("inlineCode",{parentName:"p"},"POST /v1/charge/:id/link"),", as long as the payment has not been confirmed. Also, you can see the predicted output and validation schema with all tags (mandatory and optional) available for this method. Remembering that you also need to inform the ",Object(r.b)("inlineCode",{parentName:"p"},"charge_id")," input parameter of the desired transaction: "),Object(r.b)(l.a,{defaultValue:"entrada",values:[{label:"Dados de Entrada",value:"entrada"},{label:"Dados de Sa\xedda",value:"saida"},{label:"Schema",value:"schema"}],mdxType:"Tabs"},Object(r.b)(c.a,{value:"entrada",mdxType:"TabItem"},Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-json"}),'{\n"expire_at": "2021-12-30",\n"request_delivery_address": false,\n"payment_method": "all"\n}\n'))),Object(r.b)(c.a,{value:"saida",mdxType:"TabItem"},Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-json"}),'{\n"code": 200 // retorno HTTP "200" informando que o pedido foi bem sucedido\n}\n'))),Object(r.b)(c.a,{value:"schema",mdxType:"TabItem"},Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-json"}),'{\n"id": "/ChargeLinkUpdate",\n"type": "object",\n"properties": {\n "billet_discount": {\n "type": [\n "integer",\n "null"\n ],\n "minimum": 1,\n "maximum": 99999999\n },\n "card_discount": {\n "type": [\n "integer",\n "null"\n ],\n "minimum": 1,\n "maximum": 99999999\n },\n "conditional_discount": {\n "oneOf": [\n {\n "type": [\n "null"\n ]\n },\n {\n "id": "/ConditionalDiscount",\n "type": "object",\n "properties": {\n "type": {\n "type": "string",\n "enum": [\n "percentage",\n "currency"\n ]\n },\n "value": {\n "type": "integer",\n "minimum": 1\n },\n "until_date": {\n "type": "string",\n "pattern": "^[12][0-9]{3}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12][0-9]|3[01])$"\n }\n },\n "required": [\n "type",\n "value",\n "until_date"\n ]\n }\n ]\n },\n "message": {\n "type": [\n "string",\n "null"\n ],\n "pattern": "^[^\\n]{1,100}(\\n[^\\n]{0,100}){0,3}$"\n },\n "expire_at": {\n "type": "string",\n "pattern": "^[12][0-9]{3}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12][0-9]|3[01])$"\n },\n "request_delivery_address": {\n "type": "boolean"\n },\n "payment_method": {\n "enum": [\n "banking_billet",\n "credit_card",\n "all"\n ]\n }\n},\n"required": [\n "expire_at"\n]\n}\n')))),Object(r.b)("br",null),Object(r.b)("h3",{id:"post-v1chargeidbalance-sheet"},Object(r.b)(b,{color:"#009615",mdxType:"Highlight"},"POST")," /v1/charge/:id/balance-sheet"),Object(r.b)("p",null,"You can define that the transaction will be of the balance sheet type. This is a model used by condominiums and accounting firms."),Object(r.b)("p",null,"In the following image, you can see the screen of our test environment, which contains the resources linked to the ",Object(r.b)("inlineCode",{parentName:"p"},"POST /v1/charge/:id/balance-sheet")," method that are available for use: "),Object(r.b)("a",{href:Object(o.a)("img/balance.png"),target:"_blank"},Object(r.b)("img",{src:Object(o.a)("img/balance.png")})),Object(r.b)("p",null,"The following is a simple JSON that can be used to define that a transaction will be of the balance sheet type. To use it, you must previously create a transaction and, in the ",Object(r.b)("inlineCode",{parentName:"p"},"id")," field, provide the ",Object(r.b)("inlineCode",{parentName:"p"},"charge_id")," of the transaction that was created earlier. Thus, it will be defined that such a transaction will be of the balance sheet type, and the next (and last) step will be to consume the endpoint responsible for defining the payment type boleto (which is ","[POST /v1/charge/:id/pay]","(#post- v1chargeidpay))."),Object(r.b)("p",null,"Also, you can see the predicted output and validation schema with all tags (mandatory and optional) available for this method. Remembering that it is also necessary to inform the input parameter ",Object(r.b)("inlineCode",{parentName:"p"},"charge_id")," of the desired transaction and created previously: "),Object(r.b)(l.a,{defaultValue:"entrada",values:[{label:"Dados de Entrada",value:"entrada"},{label:"Dados de Sa\xedda",value:"saida"},{label:"Schema",value:"schema"}],mdxType:"Tabs"},Object(r.b)(c.a,{value:"entrada",mdxType:"TabItem"},Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-json"}),'{\n"title": "Balancete Demonstrativo",\n"body": [\n {\n "header": "Demonstrativo de Consumo",\n "tables": [\n {\n "rows": [\n [\n {\n "align": "left",\n "color": "#000000",\n "style": "bold",\n "text": "Exemplo de despesa",\n "colspan": 2\n },\n {\n "align": "left",\n "color": "#000000",\n "style": "bold",\n "text": "Total lan\xe7ado",\n "colspan": 2\n }\n ],\n [\n {\n "align": "left",\n "color": "#000000",\n "style": "normal",\n "text": "Instala\xe7\xe3o",\n "colspan": 2\n },\n {\n "align": "left",\n "color": "#000000",\n "style": "normal",\n "text": "R$ 100,00",\n "colspan": 2\n }\n ]\n ]\n }\n ]\n },\n {\n "header": "Balancete Geral",\n "tables": [\n {\n "rows": [\n [\n {\n "align": "left",\n "color": "#000000",\n "style": "normal",\n "text": "Confira na documenta\xe7\xe3o da Gerencianet todas as configura\xe7\xf5es poss\xedveis de um boleto balancete.",\n "colspan": 4\n }\n ]\n ]\n }\n ]\n }\n]\n}\n'))),Object(r.b)(c.a,{value:"saida",mdxType:"TabItem"},Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-json"}),'{\n"code": 200 // retorno HTTP "200" informando que o pedido foi bem sucedido\n}\n'))),Object(r.b)(c.a,{value:"schema",mdxType:"TabItem"},Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-json"}),'{\n"id": "/BalanceSheet",\n"type": "object",\n"additionalProperties": false,\n"properties": {\n "title": {\n "type": "string",\n "minLength": 3,\n "maxLength": 255\n },\n "body": {\n "type": "array",\n "maxItems": 2,\n "minItems": 1,\n "uniqueItems": false,\n "additionalItems": false,\n "items": {\n "type": "object",\n "minProperties": 1,\n "maxProperties": 2,\n "additionalProperties": false,\n "properties": {\n "header": {\n "type": "string",\n "minLength": 3,\n "maxLength": 255\n },\n "tables": {\n "type": "array",\n "minItems": 1,\n "additionalItems": false,\n "items": {\n "type": "object",\n "minProperties": 1,\n "additionalProperties": false,\n "properties": {\n "rows": {\n "type": "array",\n "minItems": 1,\n "uniqueItems": false,\n "additionalItems": false,\n "items": {\n "type": "array",\n "maxItems": 4,\n "minItems": 1,\n "additionalItems": false,\n "items": {\n "type": "object",\n "additionalProperties": false,\n "properties": {\n "align": {\n "type": "string",\n "enum": [\n "left",\n "center",\n "right"\n ]\n },\n "color": {\n "type": "string",\n "pattern": "^#[0-9a-fA-F]{6}$"\n },\n "style": {\n "type": "string",\n "enum": [\n "normal",\n "italic",\n "bold",\n "underline",\n "line-through"\n ]\n },\n "text": {\n "type": "string",\n "maxLength": 255\n },\n "colspan": {\n "type": "integer",\n "enum": [\n 1,\n 2,\n 3,\n 4\n ]\n }\n },\n "required": [\n "align",\n "color",\n "style",\n "text",\n "colspan"\n ]\n }\n }\n }\n },\n "required": [\n "rows"\n ]\n }\n }\n },\n "required": [\n "header",\n "tables"\n ]\n }\n }\n},\n"required": [\n "title",\n "body"\n]\n}\n')))),Object(r.b)("p",null,"This JSON will define that the transaction will be of the balance sheet type. The next (and last) step will be to consume the endpoint responsible for the boleto definition (which is ",Object(r.b)("a",Object(a.a)({parentName:"p"},{href:"#post-v1chargeidpay"}),"POST /v1/charge/:id/pay"),") and this boleto will come out in the balance sheet standard. See an example of this type of ticket in this image. "),Object(r.b)("br",null),Object(r.b)("hr",null),Object(r.b)("h3",{id:"put-v1chargeidsettle"},Object(r.b)(b,{color:"#fcaf17",mdxType:"Highlight"},"PUT")," /v1/charge/:id/settle"),Object(r.b)("p",null,"Allows you to mark as paid (manual paid) a certain transaction."),Object(r.b)("p",null,"In the following image, you can see the page of our test environment, which contains the resources linked to the ",Object(r.b)("inlineCode",{parentName:"p"},"PUT /v1/charge/:id/settle")," method that are available for use: "),Object(r.b)("a",{href:Object(o.a)("img/settleCharge.png"),target:"_blank"},Object(r.b)("img",{src:Object(o.a)("img/settleCharge.png")})),Object(r.b)("p",null,"The following is a simple JSON that can be used to mark a transaction created in Playground as paid. Also, you can look at the predicted output available for this method. Remembering that you also need to inform the ",Object(r.b)("inlineCode",{parentName:"p"},"charge_id")," input parameter of the desired transaction: "),Object(r.b)(l.a,{defaultValue:"entrada",values:[{label:"Dados de Entrada",value:"entrada"},{label:"Dados de Sa\xedda",value:"saida"}],mdxType:"Tabs"},Object(r.b)(c.a,{value:"entrada",mdxType:"TabItem"},Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-code"}),'Input parameter: inform the "charge_id" of the transaction \n'))),Object(r.b)(c.a,{value:"saida",mdxType:"TabItem"},Object(r.b)("pre",null,Object(r.b)("code",Object(a.a)({parentName:"pre"},{className:"language-json"}),'{\n "code": 200 // retorno HTTP "200" informando que o pedido foi bem sucedido\n}\n'))))))}u.isMDXComponent=!0},250:function(e,n,t){"use strict";t.d(n,"a",(function(){return b})),t.d(n,"b",(function(){return u}));var a=t(0),i=t.n(a);function r(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,a)}return t}function l(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?o(Object(t),!0).forEach((function(n){r(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):o(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function c(e,n){if(null==e)return{};var t,a,i=function(e,n){if(null==e)return{};var t,a,i={},r=Object.keys(e);for(a=0;a<r.length;a++)t=r[a],n.indexOf(t)>=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a<r.length;a++)t=r[a],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var s=i.a.createContext({}),d=function(e){var n=i.a.useContext(s),t=n;return e&&(t="function"==typeof e?e(n):l(l({},n),e)),t},b=function(e){var n=d(e.components);return i.a.createElement(s.Provider,{value:n},e.children)},p={inlineCode:"code",wrapper:function(e){var n=e.children;return i.a.createElement(i.a.Fragment,{},n)}},m=i.a.forwardRef((function(e,n){var t=e.components,a=e.mdxType,r=e.originalType,o=e.parentName,s=c(e,["components","mdxType","originalType","parentName"]),b=d(t),m=a,u=b["".concat(o,".").concat(m)]||b[m]||p[m]||r;return t?i.a.createElement(u,l(l({ref:n},s),{},{components:t})):i.a.createElement(u,l({ref:n},s))}));function u(e,n){var t=arguments,a=n&&n.mdxType;if("string"==typeof e||a){var r=t.length,o=new Array(r);o[0]=m;var l={};for(var c in n)hasOwnProperty.call(n,c)&&(l[c]=n[c]);l.originalType=e,l.mdxType="string"==typeof e?e:a,o[1]=l;for(var s=2;s<r;s++)o[s]=t[s];return i.a.createElement.apply(null,o)}return i.a.createElement.apply(null,t)}m.displayName="MDXCreateElement"},251:function(e,n,t){"use strict";var a=t(0),i=t(35);n.a=function(){return Object(a.useContext)(i.a)}},252:function(e,n,t){"use strict";t.d(n,"a",(function(){return r}));var a=t(251),i=t(253);function r(e,{forcePrependBaseUrl:n=!1,absolute:t=!1}={}){const{siteConfig:{baseUrl:r="/",url:o}={}}=Object(a.a)();if(!e)return e;if(n)return r+e;if(!Object(i.a)(e))return e;const l=r+e.replace(/^\//,"");return t?o+l:l}},253:function(e,n,t){"use strict";function a(e){return!1===/^(https?:|\/\/|mailto:|tel:)/.test(e)}t.d(n,"a",(function(){return a}))},254:function(e,n,t){"use strict";function a(e){var n,t,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e))for(n=0;n<e.length;n++)e[n]&&(t=a(e[n]))&&(i&&(i+=" "),i+=t);else for(n in e)e[n]&&(i&&(i+=" "),i+=n);return i}n.a=function(){for(var e,n,t=0,i="";t<arguments.length;)(e=arguments[t++])&&(n=a(e))&&(i&&(i+=" "),i+=n);return i}},255:function(e,n,t){"use strict";var a=t(0);const i=Object(a.createContext)({tabGroupChoices:{},setTabGroupChoices:()=>{},isAnnouncementBarClosed:!1,closeAnnouncementBar:()=>{}});n.a=i},256:function(e,n,t){"use strict";var a=t(0),i=t(255);n.a=function(){return Object(a.useContext)(i.a)}},257:function(e,n,t){"use strict";var a=t(0),i=t.n(a),r=t(256),o=t(254),l=t(92),c=t.n(l);const s=37,d=39;n.a=function(e){const{block:n,children:t,defaultValue:l,values:b,groupId:p}=e,{tabGroupChoices:m,setTabGroupChoices:u}=Object(r.a)(),[h,g]=Object(a.useState)(l);if(null!=p){const e=m[p];null!=e&&e!==h&&b.some(n=>n.value===e)&&g(e)}const O=e=>{g(e),null!=p&&u(p,e)},j=[];return i.a.createElement("div",null,i.a.createElement("ul",{role:"tablist","aria-orientation":"horizontal",className:Object(o.a)("tabs",{"tabs--block":n})},b.map(({value:e,label:n})=>i.a.createElement("li",{role:"tab",tabIndex:"0","aria-selected":h===e,className:Object(o.a)("tabs__item",c.a.tabItem,{"tabs__item--active":h===e}),key:e,ref:e=>j.push(e),onKeyDown:e=>((e,n,t)=>{switch(t.keyCode){case d:((e,n)=>{const t=e.indexOf(n)+1;e[t]?e[t].focus():e[0].focus()})(e,n);break;case s:((e,n)=>{const t=e.indexOf(n)-1;e[t]?e[t].focus():e[e.length-1].focus()})(e,n)}})(j,e.target,e),onFocus:()=>O(e),onClick:()=>O(e)},n))),i.a.createElement("div",{role:"tabpanel",className:"margin-vert--md"},a.Children.toArray(t).filter(e=>e.props.value===h)[0]))}},258:function(e,n,t){"use strict";var a=t(0),i=t.n(a);n.a=function(e){return i.a.createElement("div",null,e.children)}}}]);