Sha256: 05a0dc3e6837486b629cf98454aa44c7004bb6933f2e90d4e13dd78ea5ccfae7
Contents?: true
Size: 722 Bytes
Versions: 5
Compression:
Stored size: 722 Bytes
Contents
class PartyFactory include ActiveMerchant::Shipping def self.build(carrier = :fedex, attrs = {}) default_location = Location.new( :country => 'US', :state => 'MA', :address1 => '4 Yawkey Way', :city => 'Boston', :state => 'MA', :zip => '02215' ) default_contact = Contact.new( :name => 'John Smith', :company => 'Red Sox', :phone_number => '1-555-867-5309', :fax_number => '1-555-867-5310', :email_address => 'user@example.com' ) default_attrs = { :location => default_location, :contact => default_contact, :account_number => '5555555' } Party.new(default_attrs.merge(attrs)) end end
Version data entries
5 entries across 5 versions & 1 rubygems