0.0
The project is in a healthy, maintained state
A gem PardotWrapper é uma biblioteca Ruby projetada para simplificar a interação com a API do Pardot, especificamente com a versão 5. Ela oferece uma interface clara e objetiva para realizar operações comuns, como visualizar informações de conta, criar prospects e gerenciar associações de listas. Esta gem abstrai as complexidades das chamadas de API e do tratamento de dados, permitindo que os desenvolvedores se concentrem na lógica de negócios principal de suas aplicações.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
~> 3.0

Runtime

 Project Readme

PardotWrapper Gem

Description

PardotWrapper is a Ruby gem designed to simplify interactions with the Pardot API version 5. This gem provides a straightforward and efficient way to integrate Pardot's functionalities into Ruby applications, offering basic functionalities such as listing custom fields, viewing account information, creating prospects, and managing list memberships.

Installation

Add this line to your application's Gemfile:

gem 'pardot_wrapper'

And then execute:

bundle install

Or install it yourself as:

gem install pardot_wrapper

Usage

To start using PardotWrapper, configure the client with your OAuth credentials:

client = PardotWrapper.new(access_token, refresh_token, client_id, client_secret, pardot_business_unit_id, :production)

Available Methods

  • List Custom Fields
client.list_custom_fields
  • View Account information
client.get_account
  • Create Prospect
client.create_prospect(email, additional_params)
  • Create List Membership
client.create_list_membership(email, additional_params)

Handling Expired Tokens

PardotWrapper handles the renewal of the access token automatically using the provided refresh_token.

Configuration

For setting up the gem in a Rails environment, you might consider placing the initialization inside an initializer, such as config/initializers/pardot_wrapper.rb.

Tests

The gem includes a suite of unit tests using RSpec. To run the tests, execute:

bundle exec rspec

Contributions

Contributions to PardotWrapper are welcome! To contribute:

  1. Fork the project.
  2. Create a feature branch (git checkout -b my-new-feature).
  3. Commit your changes (git commit -am 'Add some feature').
  4. Push to the branch (git push origin my-new-feature).
  5. Create a new Pull Request.

License

This gem is available under the MIT License. See the LICENSE file for more details.