Module: PlentyClient::Listing

Includes:
Endpoint, Request
Defined in:
lib/plenty_client.rb,
lib/plenty_client/listing.rb,
lib/plenty_client/listing/type.rb,
lib/plenty_client/listing/market.rb,
lib/plenty_client/listing/market/info.rb,
lib/plenty_client/listing/market/text.rb,
lib/plenty_client/listing/market/history.rb,
lib/plenty_client/listing/layout_template.rb,
lib/plenty_client/listing/option_template.rb,
lib/plenty_client/listing/market/directory.rb,
lib/plenty_client/listing/shipping_profile.rb,
lib/plenty_client/listing/stock_dependence_type.rb

Defined Under Namespace

Modules: Market Classes: LayoutTemplate, OptionTemplate, ShippingProfile, StockDependenceType, Type

Constant Summary collapse

FIND_LISTING =
'/listings/{listingId}'
LIST_LISTINGS =
'/listings'
CREATE_LISTING =
'/listings'
UPDATE_LISTING =
'/listings/{listingId}'
DELETE_LISTING =
'/listings/{listingId}'

Class Method Summary collapse

Methods included from Request

included

Methods included from Endpoint

included

Class Method Details

.create(body = {}) ⇒ Object



23
24
25
# File 'lib/plenty_client/listing.rb', line 23

def create(body = {})
  post(CREATE_LISTING, body)
end

.destroy(listing_id, body = {}) ⇒ Object



31
32
33
# File 'lib/plenty_client/listing.rb', line 31

def destroy(listing_id, body = {})
  delete(build_endpoint(DELETE_LISTING, listing: listing_id), body)
end

.find(listing_id = nil, headers = {}, &block) ⇒ Object



19
20
21
# File 'lib/plenty_client/listing.rb', line 19

def find(listing_id = nil, headers = {}, &block)
  get(build_endpoint(FIND_LISTING, listing: listing_id), headers, &block)
end

.list(headers = {}, &block) ⇒ Object



15
16
17
# File 'lib/plenty_client/listing.rb', line 15

def list(headers = {}, &block)
  get(build_endpoint(LIST_LISTINGS), headers, &block)
end

.update(listing_id, body = {}) ⇒ Object



27
28
29
# File 'lib/plenty_client/listing.rb', line 27

def update(listing_id, body = {})
  post(build_endpoint(UPDATE_LISTING, listing: listing_id), body)
end