Module: Zaikio::Procurement

Defined in:
lib/zaikio/procurement.rb,
lib/zaikio/procurement/job.rb,
lib/zaikio/procurement/sku.rb,
lib/zaikio/procurement/base.rb,
lib/zaikio/procurement/site.rb,
lib/zaikio/procurement/order.rb,
lib/zaikio/procurement/person.rb,
lib/zaikio/procurement/address.rb,
lib/zaikio/procurement/article.rb,
lib/zaikio/procurement/pricing.rb,
lib/zaikio/procurement/variant.rb,
lib/zaikio/procurement/version.rb,
lib/zaikio/procurement/delivery.rb,
lib/zaikio/procurement/material.rb,
lib/zaikio/procurement/quantity.rb,
lib/zaikio/procurement/supplier.rb,
lib/zaikio/procurement/line_item.rb,
lib/zaikio/procurement/availability.rb,
lib/zaikio/procurement/configuration.rb,
lib/zaikio/procurement/variant_search.rb,
lib/zaikio/procurement/order_line_item.rb,
lib/zaikio/procurement/contract_request.rb,
lib/zaikio/procurement/material_requirement.rb

Defined Under Namespace

Classes: Address, Article, Availability, Base, Configuration, ContractRequest, Delivery, Job, LineItem, Material, MaterialRequirement, Order, OrderLineItem, Person, Pricing, Quantity, Site, Sku, Supplier, Variant, VariantSearch

Constant Summary collapse

VERSION =
"2.2.0".freeze

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configurationObject

Returns the value of attribute configuration.



31
32
33
# File 'lib/zaikio/procurement.rb', line 31

def configuration
  @configuration
end

Class Method Details

.configure {|configuration| ... } ⇒ Object

Yields:



35
36
37
38
39
40
41
# File 'lib/zaikio/procurement.rb', line 35

def configure
  self.connection = nil
  self.configuration ||= Configuration.new
  yield(configuration)

  Base.connection = create_connection
end

.create_connectionObject



47
48
49
# File 'lib/zaikio/procurement.rb', line 47

def create_connection
  self.connection = Zaikio::Client.create_connection(configuration)
end

.with_token(token, &block) ⇒ Object



43
44
45
# File 'lib/zaikio/procurement.rb', line 43

def with_token(token, &block)
  Zaikio::Client.with_token(token, &block)
end