Class: Reshape::Client

Inherits:
Object
  • Object
show all
Includes:
Categories, Materials, Models, Orders, Price, Printers, Configuration, Connection, Request
Defined in:
lib/reshape/client.rb,
lib/reshape/client/price.rb,
lib/reshape/client/models.rb,
lib/reshape/client/orders.rb,
lib/reshape/client/printers.rb,
lib/reshape/client/materials.rb,
lib/reshape/client/categories.rb

Defined Under Namespace

Modules: Categories, Materials, Models, Orders, Price, Printers

Constant Summary

Constants included from Configuration

Reshape::Configuration::DEFAULT_ADAPTER, Reshape::Configuration::DEFAULT_API_ENDPOINT, Reshape::Configuration::DEFAULT_API_VERSION, Reshape::Configuration::DEFAULT_RESPONSE_FORMAT, Reshape::Configuration::DEFAULT_USER_AGENT, Reshape::Configuration::DEFAULT_WEB_ENDPOINT, Reshape::Configuration::VALID_OPTIONS_KEYS

Instance Method Summary collapse

Methods included from Categories

#categories, #category

Methods included from Price

#price

Methods included from Printers

#printer, #printers

Methods included from Models

#add_model, #add_model_file, #add_model_photo, #delete_model, #model, #model_file_by_version, #model_info, #models, #update_model_info

Methods included from Materials

#material, #materials

Methods included from Orders

#add_to_cart, #cart

Methods included from Request

#delete, #get, #post, #put

Methods included from Configuration

#api_endpoint=, #configure, extended, #options, #reset, #web_endpoint=

Constructor Details

#initialize(options = {}) ⇒ Client

Returns a new instance of Client.



16
17
18
19
20
21
# File 'lib/reshape/client.rb', line 16

def initialize(options={})
  options = Reshape.options.merge(options)
  Configuration::VALID_OPTIONS_KEYS.each do |key|
    send("#{key}=", options[key])
  end
end