File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,14 +45,14 @@ def create_order_activity_event(data = {})
4545 # Returns a Drip::Response.
4646 # See https://developer.drip.com/#create-or-update-a-batch-of-orders
4747 def create_order_activity_events ( records = [ ] )
48- records . each_with_index do |rec , i |
49- raise ArgumentError , "email: or person_id: parameter required in record #{ i } " if !rec . key? ( :email ) && !rec . key? ( :person_id )
48+ records . each_with_index do |record , i |
49+ raise ArgumentError , "email: or person_id: parameter required in record #{ i } " if !record . key? ( :email ) && !record . key? ( :person_id )
5050
5151 %i[ provider action order_id ] . each do |key |
52- raise ArgumentError , "#{ key } : parameter required in record #{ i } " unless rec . key? ( key )
52+ raise ArgumentError , "#{ key } : parameter required in record #{ i } " unless record . key? ( key )
5353 end
5454
55- rec [ :occurred_at ] = Time . now . iso8601 unless rec . key? ( :occurred_at )
55+ record [ :occurred_at ] = Time . now . iso8601 unless record . key? ( :occurred_at )
5656 end
5757
5858 make_json_request :post , "v3/#{ account_id } /shopper_activity/order/batch" , records
You can’t perform that action at this time.
0 commit comments