pardot_wrapper 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d87fb77d4119b3f4bf43abc2faeb4b567f01c0afdb380e46a9b154b620290275
4
- data.tar.gz: 3254dc23d7820b5d52eede080435a5ed2f7b09f5152506bdec3368bb67fdecde
3
+ metadata.gz: 3d81e7bb1cb350bb035e52ba83069cf32e89c82c15229ff42d76dca4b8790839
4
+ data.tar.gz: bb6e6d6d7283f1df7ac559c8ba25e2eecc1ed4d612441c3eb81ab21ef2a7962e
5
5
  SHA512:
6
- metadata.gz: 8c75eacea8acf6ac59c014b366664425feb43cfd68db19f0137496c09eb06a79513f3c288a2abbc5da083fe259ad5904f5fbc2bcb8da5dfe89062617b244049b
7
- data.tar.gz: 27fc5f383b0dc30127a45b863f115a5c5bfdb06264abf21ab6f2fe17aa0879c6dd1b6969b622073cb866b67e425a863328e2db29336ee13fdbac3b1c00703463
6
+ metadata.gz: 47f8a2e506a050bd43cde8f7a9214b84926b851e6e3f56982ae475ce471503788b730df638ef951c016eff3b823135879de9de86fa7987e12827d51974094e88
7
+ data.tar.gz: f12b903afe767b787005a68e4ebe20a539436c43ffb227064ee9c779f1912d20bc0183e13ab8bf44d418c4d3b4649386bec6df276b19735dd0ede9c7dfdec005
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Douglas Petronilio
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md CHANGED
@@ -29,7 +29,7 @@ gem install pardot_wrapper
29
29
  To start using PardotWrapper, configure the client with your OAuth credentials:
30
30
 
31
31
  ```ruby
32
- client = PardotWrapper.new(access_token, refresh_token, client_id, client_secret)
32
+ client = PardotWrapper.new(access_token, refresh_token, client_id, client_secret, pardot_business_unit_id, :production)
33
33
  ```
34
34
 
35
35
  ## Available Methods
@@ -54,7 +54,7 @@ client.create_prospect(email, additional_params)
54
54
 
55
55
  - Create List Membership
56
56
  ```ruby
57
- client.create_prospect(email, additional_params)
57
+ client.create_list_membership(email, additional_params)
58
58
 
59
59
  ```
60
60
 
data/lib/pardot/client.rb CHANGED
@@ -7,6 +7,7 @@ module Pardot
7
7
  demo: 'https://pi.demo.pardot.com/api/v5/objects',
8
8
  login: 'https://login.salesforce.com'
9
9
  }
10
+ LIST_CUSTOM_FIELDS = "id,name,fieldId,updatedAt,type,isRecordMultipleResponses,salesforceId,isUseValues,isRequired"
10
11
 
11
12
  def initialize(access_token, refresh_token, client_id, client_secret, pardot_business_unit_id, environment = :production)
12
13
  @access_token = access_token
@@ -20,8 +21,8 @@ module Pardot
20
21
  self.class.base_uri BASE_URIS[environment]
21
22
  end
22
23
 
23
- def list_custom_fields
24
- perform_request { self.class.get('/customFields', headers: auth_headers) }
24
+ def list_custom_fields(fields=LIST_CUSTOM_FIELDS)
25
+ perform_request { self.class.get("/custom-fields?fields=#{fields}", headers: auth_headers) }
25
26
  end
26
27
 
27
28
  def get_account
@@ -35,7 +36,7 @@ module Pardot
35
36
 
36
37
  def create_list_membership(prospect_id, list_id)
37
38
  query = { prospect_id: prospect_id, list_id: list_id }
38
- perform_request { self.class.post('/listMemberships', body: query.to_json, headers: auth_headers) }
39
+ perform_request { self.class.post('/list-memberships', body: query.to_json, headers: auth_headers) }
39
40
  end
40
41
 
41
42
  private
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Pardot
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.2"
5
5
  end
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pardot_wrapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - DougPetronilio
@@ -65,11 +65,13 @@ extensions: []
65
65
  extra_rdoc_files: []
66
66
  files:
67
67
  - ".rspec"
68
+ - LICENSE
68
69
  - README.md
69
70
  - Rakefile
70
71
  - lib/pardot/client.rb
71
72
  - lib/pardot/version.rb
72
73
  - lib/pardot_wrapper.rb
74
+ - pardot_wrapper-0.1.0.gem
73
75
  - pardot_wrapper.gemspec
74
76
  - sig/pardot_wrapper.rbs
75
77
  homepage: https://github.com/dougpetronilio/pardot_wrapper