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.
Files changed (4) hide show
  1. data/VERSION.yml +1 -1
  2. data/hominid.gemspec +1 -1
  3. data/lib/hominid.rb +27 -2
  4. metadata +1 -1
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 1
3
3
  :minor: 1
4
- :patch: 5
4
+ :patch: 7
data/hominid.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{hominid}
5
- s.version = "1.1.6"
5
+ s.version = "1.1.7"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Brian Getting"]
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bgetting-hominid
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.6
4
+ version: 1.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Getting