Module: PlentyClient::Listing::Market

Includes:
Endpoint, Request
Defined in:
lib/plenty_client.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/market/directory.rb

Defined Under Namespace

Classes: Directory, History, Info, Text

Constant Summary collapse

FIND_LISTING_MARKET =
'/listings/markets/{marketListingId}'.freeze
LIST_LISTING_MARKETS =
'/listings/markets'.freeze
CREATE_LISTING_MARKET =
'/listings/markets'.freeze
UPDATE_LISTING_MARKET =
'/listings/markets/{marketListingId}'.freeze
DELETE_LISTING_MARKET =
'/listings/markets/{marketListingId}'.freeze
START_LISTING_MARKET =
'/listings/markets/start/{marketListingId}'.freeze
VERIFY_LISTING_MARKET =
'/listings/markets/verify/{marketListingId}'.freeze

Class Method Summary collapse

Methods included from Request

included

Methods included from Endpoint

included

Class Method Details

.create(body = {}) ⇒ Object



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

def create(body = {})
  post(build_endpoint(CREATE_LISTING_MARKET), body)
end

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



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

def destroy(market_listing_id, body = {})
  delete(build_endpoint(DELETE_LISTING_MARKET, market_listing: market_listing_id), body)
end

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



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

def find(market_listing_id, headers = {}, &block)
  get(build_endpoint(FIND_LISTING_MARKET, market_listing: market_listing_id), headers, &block)
end

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



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

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

.start(market_listing_id, body = {}) ⇒ Object



36
37
38
# File 'lib/plenty_client/listing/market.rb', line 36

def start(market_listing_id, body = {})
  post(build_endpoint(START_LISTING_MARKET, market_listing: market_listing_id), body)
end

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



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

def update(market_listing_id, body = {})
  put(build_endpoint(UPDATE_LISTING_MARKET, market_listing: market_listing_id), body)
end

.verify(market_listing_id, body = {}) ⇒ Object



40
41
42
# File 'lib/plenty_client/listing/market.rb', line 40

def verify(market_listing_id, body = {})
  post(build_endpoint(VERIFY_LISTING_MARKET, market_listing: market_listing_id), body)
end