Sha256: e62fcc640cc44aa938d637d8d8c45c30e627770cb293575409c3debcb74a1213

Contents?: true

Size: 501 Bytes

Versions: 7

Compression:

Stored size: 501 Bytes

Contents

module Fassbinder
  class SellerBuilder
    attr_reader :seller

    def initialize
      @seller = Kosher::Seller.new
    end

    def id=(id)
      @seller.id = id
    end

    def name=(name)
      @seller.name = name
    end

    def rating=(rating)
      @seller.rating = rating.to_f
    end

    def add_location(hash)
      location = Kosher::Location.new
      location.country = hash['CountryCode']
      location.state = hash['StateCode']
      @seller.location = location
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
fassbinder-0.0.15 lib/fassbinder/seller_builder.rb
fassbinder-0.0.14 lib/fassbinder/seller_builder.rb
fassbinder-0.0.13 lib/fassbinder/seller_builder.rb
fassbinder-0.0.12 lib/fassbinder/seller_builder.rb
fassbinder-0.0.11 lib/fassbinder/seller_builder.rb
fassbinder-0.0.10 lib/fassbinder/seller_builder.rb
fassbinder-0.0.9 lib/fassbinder/seller_builder.rb