Class: Vend::Store

Inherits:
Object
  • Object
show all
Includes:
HasResources
Defined in:
lib/vend/store.rb

Instance Method Summary collapse

Methods included from HasResources

included

Constructor Details

#initialize(name, username, password) ⇒ Store

Returns a new instance of Store.



9
10
11
# File 'lib/vend/store.rb', line 9

def initialize name, username, password
  @name, @credentials = name, [ username, password ]
end

Instance Method Details

#get(options) ⇒ Object

Dispatch a request using HTTP GET



15
16
17
# File 'lib/vend/store.rb', line 15

def get options
  dispatch :get, options
end

#post(options) ⇒ Object

Dispatch a request using HTTP POST



21
22
23
# File 'lib/vend/store.rb', line 21

def post options
  dispatch :post, options
end