Class: ActiveMerchant::Fulfillment::Service

Inherits:
Object
  • Object
show all
Includes:
PostsData, RequiresParameters
Defined in:
lib/active_fulfillment/fulfillment/service.rb

Direct Known Subclasses

AmazonService, ShipwireService, WebgistixService

Instance Method Summary collapse

Methods included from PostsData

included, #ssl_get, #ssl_post

Methods included from RequiresParameters

#requires!

Constructor Details

#initialize(options = {}) ⇒ Service

Returns a new instance of Service.



8
9
10
11
12
13
# File 'lib/active_fulfillment/fulfillment/service.rb', line 8

def initialize(options = {})
  check_test_mode(options)
  
  @options = {}
  @options.update(options)
end

Instance Method Details

#test?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/active_fulfillment/fulfillment/service.rb', line 19

def test?
  @options[:test] || Base.mode == :test
end

#test_mode?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/active_fulfillment/fulfillment/service.rb', line 15

def test_mode?
  false
end