class GiftRocket::Recipient
Attributes
email[RW]
name[RW]
Public Class Methods
new(options)
click to toggle source
# File lib/gift_rocket/recipient.rb, line 8 def initialize(options) @name = options[:name] @email = options[:email] raise GiftRocket::Error::MissingRecipientEmail.new('Recipient email not specified') if @email.nil? || @email.empty? raise GiftRocket::Error::MissingRecipientName.new('Recipient name not specified') if @name.nil? || @name.empty? end
Public Instance Methods
params()
click to toggle source
# File lib/gift_rocket/recipient.rb, line 17 def params {'gift[recipient_email]' => @email, 'gift[recipient_name]' => @name} end