Class: MWS::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby-mws/base.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Base

Returns a new instance of Base.


7
8
9
# File 'lib/ruby-mws/base.rb', line 7

def initialize(options={})
  @connection = MWS::Connection.new(options)
end

Instance Attribute Details

#connectionObject

Returns the value of attribute connection


5
6
7
# File 'lib/ruby-mws/base.rb', line 5

def connection
  @connection
end

Class Method Details

.server_timeObject

serves as a server ping


25
26
27
# File 'lib/ruby-mws/base.rb', line 25

def self.server_time
  MWS::Connection.server_time
end

Instance Method Details

#inventoryObject


15
16
17
# File 'lib/ruby-mws/base.rb', line 15

def inventory
  @inventory ||= MWS::API::Inventory.new(@connection)
end

#ordersObject


11
12
13
# File 'lib/ruby-mws/base.rb', line 11

def orders
  @orders ||= MWS::API::Order.new(@connection)
end

#reportsObject


19
20
21
# File 'lib/ruby-mws/base.rb', line 19

def reports
  @reports ||= MWS::API::Report.new(@connection)
end