Module: Workarea::GlobalE
- Defined in:
- lib/workarea/global_e.rb,
lib/workarea/global_e/error.rb,
lib/workarea/global_e/engine.rb,
lib/workarea/global_e/version.rb,
app/services/workarea/global_e/brand.rb,
app/services/workarea/global_e/parcel.rb,
app/services/workarea/global_e/product.rb,
app/services/workarea/global_e/category.rb,
app/services/workarea/global_e/discount.rb,
app/models/workarea/global_e/fixed_price.rb,
app/services/workarea/global_e/attribute.rb,
app/services/workarea/global_e/order_status.rb,
app/services/workarea/global_e/vat_category.rb,
app/services/workarea/global_e/users_details.rb,
app/services/workarea/global_e/vat_rate_type.rb,
app/models/workarea/global_e/order_api_events.rb,
app/services/workarea/global_e/merchant/brand.rb,
app/services/workarea/global_e/merchant/order.rb,
app/models/workarea/global_e/country_exception.rb,
app/services/workarea/global_e/address_details.rb,
app/services/workarea/global_e/merchant/product.rb,
app/services/workarea/global_e/tracking_details.rb,
app/services/workarea/global_e/cart_user_details.rb,
app/services/workarea/global_e/merchant/category.rb,
app/services/workarea/global_e/merchant/customer.rb,
app/services/workarea/global_e/merchant/discount.rb,
app/services/workarea/global_e/product_meta_data.rb,
app/services/workarea/global_e/checkout_cart_info.rb,
app/services/workarea/global_e/order_status_reason.rb,
app/services/workarea/global_e/user_id_number_type.rb,
app/services/workarea/global_e/order_status_details.rb,
app/workers/workarea/global_e/update_order_dispatch.rb,
app/services/workarea/global_e/merchant/order_refund.rb,
app/services/workarea/global_e/merchant/response_info.rb,
app/services/workarea/global_e/api/update_order_status.rb,
app/services/workarea/global_e/merchant/original_order.rb,
app/services/workarea/global_e/merchant/refund_product.rb,
app/services/workarea/global_e/custom_product_attribute.rb,
app/services/workarea/global_e/merchant/parcel_tracking.rb,
app/services/workarea/global_e/merchant/payment_details.rb,
app/services/workarea/global_e/api/notify_order_refunded.rb,
app/services/workarea/global_e/api/perform_order_payment.rb,
app/services/workarea/global_e/merchant/customer_details.rb,
app/services/workarea/global_e/api/send_order_to_merchant.rb,
app/services/workarea/global_e/update_order_dispatch_request.rb,
app/services/workarea/global_e/api/remove_restricted_products.rb,
app/services/workarea/global_e/api/update_order_shipping_info.rb,
app/services/workarea/global_e/merchant/international_details.rb,
app/services/workarea/global_e/merchant_cart_product_attribute.rb,
app/services/workarea/global_e/update_order_dispatch_exception.rb,
app/services/workarea/global_e/api/update_order_status/canceled.rb,
app/services/workarea/global_e/api/send_order_to_merchant/save_user.rb,
app/services/workarea/global_e/api/send_order_to_merchant/item_pricer.rb
Defined Under Namespace
Modules: Api, Merchant
Classes: AddressDetails, Attribute, Brand, CartUserDetails, Category, CheckoutCartInfo, CountryException, CustomProductAttribute, Discount, Engine, Error, FixedPrice, InsufficientInventory, InventoryCaptureFailure, OrderApiEvents, OrderStatus, OrderStatusDetails, OrderStatusReason, Parcel, Product, ProductMetaData, TrackingDetails, UnpurchasableOrder, UpdateOrderDispatch, UpdateOrderDispatchException, UpdateOrderDispatchRequest, UserDetails, UserIdNumberType, VatCategory, VateRateType
Constant Summary
collapse
- VERSION =
"1.3.0"
Class Method Summary
collapse
Class Method Details
.config ⇒ Object
11
12
13
|
# File 'lib/workarea/global_e.rb', line 11
def self.config
Workarea.config.global_e
end
|
.css_source ⇒ Object
23
24
25
|
# File 'lib/workarea/global_e.rb', line 23
def self.css_source
config.css_source
end
|
.domains ⇒ Object
42
43
44
|
# File 'lib/workarea/global_e.rb', line 42
def self.domains
config.domains
end
|
.enabled? ⇒ Boolean
15
16
17
|
# File 'lib/workarea/global_e.rb', line 15
def self.enabled?
config.enabled && javascript_source.present? && css_source.present?
end
|
.environment ⇒ Object
35
36
37
38
39
40
|
# File 'lib/workarea/global_e.rb', line 35
def self.environment
(config.environment || Rails.env)
.to_s
.downcase
.presence_in(domains.keys) || "qa"
end
|
.free_gift_discount_types ⇒ Object
46
47
48
|
# File 'lib/workarea/global_e.rb', line 46
def self.free_gift_discount_types
config.free_gift_discount_types
end
|
.javascript_source ⇒ Object
19
20
21
|
# File 'lib/workarea/global_e.rb', line 19
def self.javascript_source
config.javascript_source
end
|
.merchant_guid ⇒ Object
27
28
29
|
# File 'lib/workarea/global_e.rb', line 27
def self.merchant_guid
config.merchant_guid
end
|
.report_error(error) ⇒ Object
50
51
52
53
54
55
56
|
# File 'lib/workarea/global_e.rb', line 50
def self.report_error(error)
if defined? ::Raven
Raven.capture_exception error
else
Rails.logger.debug error
end
end
|
.shipping_discount_types ⇒ Object
31
32
33
|
# File 'lib/workarea/global_e.rb', line 31
def self.shipping_discount_types
config.shipping_discount_types
end
|