bgetting-hominid 1.1.6 → 1.1.7
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION.yml +1 -1
- data/hominid.gemspec +1 -1
- data/lib/hominid.rb +27 -2
- metadata +1 -1
data/VERSION.yml
CHANGED
data/hominid.gemspec
CHANGED
data/lib/hominid.rb
CHANGED
@@ -86,7 +86,32 @@ class Hominid
|
|
86
86
|
# :subject = (boolean) Filter by exact values, or search within content for filter values.
|
87
87
|
@campaigns = call("campaigns", filters, start, limit)
|
88
88
|
end
|
89
|
-
|
89
|
+
|
90
|
+
# Attach Ecommerce Order Information to a Campaign.
|
91
|
+
# The order hash should be structured as follows:
|
92
|
+
#
|
93
|
+
# :id = (string) the order id
|
94
|
+
# :campaign_id = (string) the campaign id to track the order (mc_cid query string).
|
95
|
+
# :email_id = (string) email id of the subscriber (mc_eid query string)
|
96
|
+
# :total = (double) Show only campaigns with this from_name.
|
97
|
+
# :shipping = (string) *optional - the total paid for shipping fees.
|
98
|
+
# :tax = (string) *optional - the total tax paid.
|
99
|
+
# :store_id = (string) a unique id for the store sending the order in
|
100
|
+
# :store_name = (string) *optional - A readable name for the store, typicaly the hostname.
|
101
|
+
# :plugin_id = (string) the MailChimp-assigned Plugin Id. Using 1214 for the moment.
|
102
|
+
# :items = (array) the individual line items for an order, using the following keys:
|
103
|
+
#
|
104
|
+
# :line_num = (integer) *optional - line number of the item on the order
|
105
|
+
# :product_id = (integer) internal product id
|
106
|
+
# :product_name = (string) the name for the product_id associated with the item
|
107
|
+
# :category_id = (integer) internal id for the (main) category associated with product
|
108
|
+
# :category_name = (string) the category name for the category id
|
109
|
+
# :qty = (double) the quantity of items ordered
|
110
|
+
# :cost = (double) the cost of a single item (i.e., not the extended cost of the line)
|
111
|
+
def campaign_ecomm_add_order(order)
|
112
|
+
@campaign = call("campaignEcommAddOrder", order)
|
113
|
+
end
|
114
|
+
|
90
115
|
def create_campaign(type = 'regular', options = {}, content = {}, segment_options = {}, type_opts = {})
|
91
116
|
# Create a new campaign
|
92
117
|
@campaign = call("campaignCreate", type, options, content, segment_options, type_opts)
|
@@ -236,4 +261,4 @@ class Hominid
|
|
236
261
|
rescue Exception => error
|
237
262
|
raise HominidCommunicationError.new(error.message)
|
238
263
|
end
|
239
|
-
end
|
264
|
+
end
|