Class: BigCommerce::Api

Inherits:
Object
  • Object
show all
Defined in:
lib/bigcommerce/api.rb

Instance Method Summary (collapse)

Constructor Details

- (Api) initialize(configuration)

A new instance of Api



4
5
6
# File 'lib/bigcommerce/api.rb', line 4

def initialize(configuration)
	@connection = Connection.new(configuration)
end

Instance Method Details

- (Object) get_categories



20
21
22
# File 'lib/bigcommerce/api.rb', line 20

def get_categories
	@connection.get '/categories'
end

- (Object) get_category(id)



24
25
26
# File 'lib/bigcommerce/api.rb', line 24

def get_category(id)
	@connection.get '/categories/' + id
end

- (Object) get_customer(id)



52
53
54
# File 'lib/bigcommerce/api.rb', line 52

def get_customer(id)
	@connection.get '/customers/' + id
end

- (Object) get_customers



48
49
50
# File 'lib/bigcommerce/api.rb', line 48

def get_customers
	@connection.get '/customers'
end

- (Object) get_order(id)



40
41
42
# File 'lib/bigcommerce/api.rb', line 40

def get_order(id)
	@connection.get '/orders/' + id
end

- (Object) get_order_products(id)



44
45
46
# File 'lib/bigcommerce/api.rb', line 44

def get_order_products(id)
	@connection.get '/orders/' + id + '/products'
end

- (Object) get_orders



28
29
30
# File 'lib/bigcommerce/api.rb', line 28

def get_orders
	@connection.get('/orders')
end

- (Object) get_orders_by_date(date)



32
33
34
# File 'lib/bigcommerce/api.rb', line 32

def get_orders_by_date(date)
	@connection.get '/orders?min_date_created=' + CGI::escape(date)
end

- (Object) get_orders_count



36
37
38
# File 'lib/bigcommerce/api.rb', line 36

def get_orders_count
	get_count @connection.get '/orders/count'
end

- (Object) get_product(id)



16
17
18
# File 'lib/bigcommerce/api.rb', line 16

def get_product(id)
	@connection.get '/products/' + id
end

- (Object) get_products



12
13
14
# File 'lib/bigcommerce/api.rb', line 12

def get_products
	@connection.get '/products'
end

- (Object) get_time



8
9
10
# File 'lib/bigcommerce/api.rb', line 8

def get_time
	@connection.get '/time'
end