infusion 0.0.8 → 0.0.9
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.
- data/README.md +40 -0
- data/lib/infusion/version.rb +1 -1
- metadata +1 -1
data/README.md
CHANGED
@@ -20,9 +20,49 @@ Or install it yourself as:
|
|
20
20
|
Create a file in config/config.yml add the key and server
|
21
21
|
|
22
22
|
config:
|
23
|
+
|
23
24
|
key: "XXXXXXXXXXXXXX"
|
25
|
+
|
24
26
|
server: "https://yourid.infusionsoft.com:443/api/xmlrpc"
|
25
27
|
|
28
|
+
And in your Rails Application, where you require your gem, you can add an initializer and configure like following:
|
29
|
+
|
30
|
+
config/initializers/infusion.rb
|
31
|
+
|
32
|
+
require "infusion"
|
33
|
+
|
34
|
+
Infusion.file_path("#{Rails.root}/config/config.yml")
|
35
|
+
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
# Get a users first and last name using the DataService
|
40
|
+
Infusion.data_load('Contact', contact_id, [:FirstName, :LastName])
|
41
|
+
|
42
|
+
# Update a contact with specific field values
|
43
|
+
Infusion.update(contact_id, { :FirstName => 'first_name', :Email => 'test@test.com' })
|
44
|
+
|
45
|
+
# Add a new Contact
|
46
|
+
Infusion.add_contact({:FirstName => 'first_name', :LastName => 'last_name', :Email => 'test@test.com'})
|
47
|
+
|
48
|
+
# Merge Contact
|
49
|
+
Infusion.merge(contact_id, merge_contact_id)
|
50
|
+
|
51
|
+
# method for add contact to campaign
|
52
|
+
Infusion.campaign(contact_id, campaign_id)
|
53
|
+
|
54
|
+
# find by query this method is for to check subscription
|
55
|
+
fields = ["ProductId", "SubscriptionPlanId", "ItemName", "Qty"]
|
56
|
+
|
57
|
+
# Order Details of user retrieve all items
|
58
|
+
query = {:OrderId => params[:orderId]}
|
59
|
+
|
60
|
+
Infusion.query(query, fields)
|
61
|
+
|
62
|
+
# method to opt in email
|
63
|
+
Infusion.optin(email, message)
|
64
|
+
|
65
|
+
|
26
66
|
## Contributing
|
27
67
|
|
28
68
|
1. Fork it
|
data/lib/infusion/version.rb
CHANGED