{"id":17458122,"url":"https://github.com/pocesar/node-moip2","last_synced_at":"2025-03-21T03:33:29.536Z","repository":{"id":31078249,"uuid":"34637226","full_name":"pocesar/node-moip2","owner":"pocesar","description":"Typescript para Moip API 2.0","archived":false,"fork":false,"pushed_at":"2018-12-03T17:49:55.000Z","size":95,"stargazers_count":5,"open_issues_count":4,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-18T06:28:14.242Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pocesar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-27T00:05:16.000Z","updated_at":"2019-05-26T01:41:37.000Z","dependencies_parsed_at":"2022-09-01T03:01:08.925Z","dependency_job_id":null,"html_url":"https://github.com/pocesar/node-moip2","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pocesar%2Fnode-moip2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pocesar%2Fnode-moip2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pocesar%2Fnode-moip2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pocesar%2Fnode-moip2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pocesar","download_url":"https://codeload.github.com/pocesar/node-moip2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244105795,"owners_count":20398920,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-18T03:54:58.067Z","updated_at":"2025-03-21T03:33:29.227Z","avatar_url":"https://github.com/pocesar.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![npm version](https://badge.fury.io/js/%40pocesar%2Fmoip2.svg)](https://badge.fury.io/js/%40pocesar%2Fmoip2)\n\n# Moip 2\n\nTypescript Moip API 2.0 para Node.js\n\n## Install\n\n```\n$ npm install @pocesar/moip2 --save\n```\n\n## Usage\n\n```js\nvar Moip = require('@pocesar/moip2').Moip;\n\nvar moip = new Moip('token', 'chave', true);\n\nmoip.createCustomer({\n    birthDate: '0000-00-00',\n    email: 'email@example.com',\n    fullname: 'Full Name',\n    ownId: 'ownUserId',\n    phone: {\n        areaCode: '00',\n        countryCode: '00',\n        number: '00000000'\n    },\n    taxDocument: {\n        number: '00000000',\n        type: 'CPF'\n    },\n    shippingAddress:{\n        city: 'Cidade',\n        complement: 'Complemento',\n        country: 'BRA',\n        district: 'Bairro',\n        state: 'XX',\n        street: 'RUA',\n        streetNumber: 'NUMERO',\n        zipCode: '00000000'\n    }\n}).then(function(customer){\n    delete customer._links;\n\n    return this.createOrder({\n        amount: {\n            currency: 'BRL',\n            subtotals: {}\n        },\n        customer: customer,\n        items: [{\n            detail: '',\n            price: 50000,\n            product: 'Compra',\n            quantity: 1\n        }],\n        ownId: 'ownOrderId'\n    });\n}).then(function(order){\n\n    return this.createPayment({\n        fundingInstrument: {\n            method: 'BOLETO',\n            boleto: {\n                expirationDate: '2015-05-12',\n                instructionLines: {\n                    first: 'first',\n                    second: 'second',\n                    third: 'thid'\n                }\n            }\n        }\n    }, order.id);\n}).then(function(payment){\n    console.log('Sucesso!', payment);\n}).catch('MoipError', function(err){\n    err.errors.forEach(function(e){\n        console.log(e.code + ' \u003e ' + e.path + ' \u003e ' + e.description);\n    });\n}).catch(console.error.bind(console));\n```\n\n## Debug\n\nSetting the `DEBUG=moip2,moip2:full` environment variable will make the library display all the requests being made\n\n## License\n\nGPLv3","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpocesar%2Fnode-moip2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpocesar%2Fnode-moip2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpocesar%2Fnode-moip2/lists"}