Class: Fassbinder::SellerBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/fassbinder/seller_builder.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeSellerBuilder

Returns a new instance of SellerBuilder.



5
6
7
# File 'lib/fassbinder/seller_builder.rb', line 5

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

Instance Attribute Details

#sellerObject (readonly)

Returns the value of attribute seller.



3
4
5
# File 'lib/fassbinder/seller_builder.rb', line 3

def seller
  @seller
end

Instance Method Details

#add_location(hash) ⇒ Object



21
22
23
24
25
26
# File 'lib/fassbinder/seller_builder.rb', line 21

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

#id=(id) ⇒ Object



9
10
11
# File 'lib/fassbinder/seller_builder.rb', line 9

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

#name=(name) ⇒ Object



13
14
15
# File 'lib/fassbinder/seller_builder.rb', line 13

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

#rating=(rating) ⇒ Object



17
18
19
# File 'lib/fassbinder/seller_builder.rb', line 17

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