Class: BBGAPI::Blocks_Products
- Inherits:
-
Object
- Object
- BBGAPI::Blocks_Products
- Defined in:
- lib/bbgapi/blocks_products.rb
Class Method Summary collapse
Class Method Details
.list ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/bbgapi/blocks_products.rb', line 16 def self.list partial = '/api/block_products' api_response = BBGAPI::Client.geturl(partial,"") api_response.each {|x| puts "\n" puts "Cost: #{x["cost"]}" puts "ID: #{x["id"]}" puts "Description: #{x["description"]}" } puts "\n" end |
.menulist ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/bbgapi/blocks_products.rb', line 3 def self. choose do || puts "Blocks" puts "----------------------------------------" .prompt = "Which Action?" .choices(:list) {self.list} .choices(:create) {self.tbi} .choices(:update) {self.tbi} .choices(:delete) {self.tbi} end end |
.raw ⇒ Object
29 30 31 32 33 |
# File 'lib/bbgapi/blocks_products.rb', line 29 def self.raw partial = '/api/block_products' api_response = BBGAPI::Client.geturl(partial,"") return api_response end |
.tbi ⇒ Object
36 37 38 |
# File 'lib/bbgapi/blocks_products.rb', line 36 def self.tbi puts "This is not yet implemented" end |