Class: Oshpark::Price

Inherits:
Object
  • Object
show all
Includes:
Model
Defined in:
lib/oshpark/price.rb

Class Method Summary collapse

Methods included from Model

#dirty?, included, #initialize

Class Method Details

.attrsObject



4
5
6
# File 'lib/oshpark/price.rb', line 4

def self.attrs
  %w| width_in_mils height_in_mils pcb_layers quantity quantity_multiple minimum_quantity minimum_square_inches batches batch_cost subtotal |
end

.price_for(width, height, pcb_layers, quantity = nil) ⇒ Object



10
11
12
13
# File 'lib/oshpark/price.rb', line 10

def self.price_for width, height, pcb_layers, quantity = nil
  json = Oshpark::client.pricing width, height, pcb_layers, quantity
  from_json json['pricing']
end