Module: Workarea::Orderbot

Defined in:
lib/workarea/orderbot.rb,
lib/workarea/orderbot/engine.rb,
lib/workarea/orderbot/gateway.rb,
lib/workarea/orderbot/version.rb,
lib/workarea/orderbot/response.rb,
lib/workarea/orderbot/bogus_gateway.rb,
app/services/workarea/orderbot/order.rb,
lib/workarea/orderbot/authentication.rb,
app/services/workarea/orderbot/filters.rb,
app/models/workarea/orderbot/import_log.rb,
app/workers/workarea/orderbot/save_order.rb,
app/services/workarea/orderbot/order/item.rb,
app/services/workarea/orderbot/child_product.rb,
app/services/workarea/orderbot/parent_product.rb,
app/workers/workarea/orderbot/pricing_importer.rb,
app/workers/workarea/orderbot/product_importer.rb,
app/models/workarea/orderbot/pricing_import_data.rb,
app/models/workarea/orderbot/product_import_data.rb,
app/workers/workarea/orderbot/inventory_importer.rb,
app/workers/workarea/orderbot/fulfillment_importer.rb,
app/services/workarea/orderbot/order/tender/general.rb,
app/workers/workarea/orderbot/pricing/import_pricing.rb,
app/services/workarea/orderbot/order/tender/gift_card.rb,
app/services/workarea/orderbot/order/tender/credit_card.rb,
app/services/workarea/orderbot/order/tender/store_credit.rb,
app/workers/workarea/orderbot/inventory/import_inventory.rb,
app/workers/workarea/orderbot/product/import_child_products.rb,
app/workers/workarea/orderbot/product/import_parent_products.rb,
app/workers/workarea/orderbot/fulfillment/import_fulfillments.rb

Defined Under Namespace

Modules: Authentication, Filters, Fulfillment, Inventory, Pricing, Product Classes: BogusGateway, ChildProduct, Engine, FulfillmentImporter, Gateway, ImportLog, InventoryImporter, Order, ParentProduct, PricingImportData, PricingImporter, ProductImportData, ProductImporter, Response, SaveOrder

Constant Summary collapse

VERSION =
"1.0.2".freeze

Class Method Summary collapse

Class Method Details

.api_configured?Boolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/workarea/orderbot.rb', line 27

def self.api_configured?
  api_user_name.present? && api_password.present?
end

.api_passwordObject



23
24
25
# File 'lib/workarea/orderbot.rb', line 23

def self.api_password
  Workarea.config.orderbot_api_password
end

.api_user_nameObject



19
20
21
# File 'lib/workarea/orderbot.rb', line 19

def self.api_user_name
  Workarea.config.orderbot_api_email_address
end

.configObject



15
16
17
# File 'lib/workarea/orderbot.rb', line 15

def self.config
  Workarea.config.orderbot
end

.gatewayObject



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

def self.gateway
  if Rails.env.test?
    Orderbot::BogusGateway.new
  else
    Orderbot::Gateway.new(api_user_name: api_user_name, api_password: api_password, test: test?)
  end
end

.test?Boolean

Returns:

  • (Boolean)


31
32
33
# File 'lib/workarea/orderbot.rb', line 31

def self.test?
  Workarea.config.use_orderbot_staging_environment
end