Class: Seekmodo::Sdk::Storefront::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/seekmodo/sdk/storefront/client.rb

Defined Under Namespace

Classes: BundleSurface, RecommendSurface

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ Client

Returns a new instance of Client.



11
12
13
14
15
# File 'lib/seekmodo/sdk/storefront/client.rb', line 11

def initialize(config)
  @transport = Transport.new(**config)
  @recommend = RecommendSurface.new(@transport)
  @bundle = BundleSurface.new(@transport)
end

Instance Attribute Details

#bundleObject (readonly)

Returns the value of attribute bundle.



9
10
11
# File 'lib/seekmodo/sdk/storefront/client.rb', line 9

def bundle
  @bundle
end

#recommendObject (readonly)

Returns the value of attribute recommend.



9
10
11
# File 'lib/seekmodo/sdk/storefront/client.rb', line 9

def recommend
  @recommend
end

#transportObject (readonly)

Returns the value of attribute transport.



9
10
11
# File 'lib/seekmodo/sdk/storefront/client.rb', line 9

def transport
  @transport
end

Instance Method Details

#chat(args = {}, opts = {}) ⇒ Object



29
30
31
# File 'lib/seekmodo/sdk/storefront/client.rb', line 29

def chat(args = {}, opts = {})
  @transport.call("chat", args, opts)
end

#event(args = {}, opts = {}) ⇒ Object



33
34
35
# File 'lib/seekmodo/sdk/storefront/client.rb', line 33

def event(args = {}, opts = {})
  @transport.call("events", args, opts)
end

#search(args = {}, opts = {}) ⇒ Object



17
18
19
# File 'lib/seekmodo/sdk/storefront/client.rb', line 17

def search(args = {}, opts = {})
  @transport.call("search", args, opts)
end

#search_by_image(args = {}, opts = {}) ⇒ Object



25
26
27
# File 'lib/seekmodo/sdk/storefront/client.rb', line 25

def search_by_image(args = {}, opts = {})
  @transport.call("search.byImage", args, opts)
end

#suggest(args = {}, opts = {}) ⇒ Object



21
22
23
# File 'lib/seekmodo/sdk/storefront/client.rb', line 21

def suggest(args = {}, opts = {})
  @transport.call("suggest", args, opts)
end