lib/mailup/console/recipient.rb in mailup-1.1.0 vs lib/mailup/console/recipient.rb in mailup-1.2.0
- old
+ new
@@ -27,15 +27,16 @@
# @see http://help.mailup.com/display/mailupapi/Console+methods+v1.1#Consolemethodsv1.1-UpdateRecipientDetail
#
# @example
#
# recipient = {
- # :Name => "Joe Public",
- # :Email => "joe@public.com"
+ # idRecipient: "1234"
+ # Name: "Joe Public",
+ # Email: "joe@public.com"
# }
# updated_recipient = mailup.console.recipient.update(recipient)
- # updated_recipient.Name
+ # updated_recipient['Name']
# => "Joe Public"
#
def update(recipient)
@api.put("#{@api.path}/Recipient/Detail", body: recipient)
end
@@ -58,11 +59,11 @@
# fields.size
# => 10
# fields['Items'].first['Description']
# => "Field description..."
#
- def fields
- @api.get("#{@api.path}/Recipient/DynamicFields")
+ def fields(params = {})
+ @api.get("#{@api.path}/Recipient/DynamicFields", params: params)
end
end
end
end
\ No newline at end of file