Class: PlentyClient::Listing::Market::History

Inherits:
Object
  • Object
show all
Includes:
Endpoint, Request
Defined in:
lib/plenty_client/listing/market/history.rb

Constant Summary collapse

FIND_LISTING_MARKET_HISTORY =
'/listings/markets/histories/{marketListingHistoryId}'.freeze
LIST_LISTING_MARKET_HISTORIES =
'/listings/markets/histories'.freeze
END_LISTING_MARKET_HISTORY =
'/listings/markets/histories/end/{marketListingHistoryId}'.freeze
RELIST_LISTING_MARKET_HISTORY =
'/listings/markets/histories/relist/{marketListingHistoryId}'.freeze
UPDATE_LISTING_MARKET_HISTORY =
'/listings/markets/histories/update/{marketListingHistoryId}'.freeze

Class Method Summary collapse

Methods included from Request

included

Methods included from Endpoint

included

Class Method Details

.end(market_listing_history_id, body = {}) ⇒ Object



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

def end(market_listing_history_id, body = {})
  delete(build_endpoint(END_LISTING_MARKET_HISTORY, market_listing_history: market_listing_history_id), body)
end

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



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

def find(market_listing_history_id, headers = {}, &block)
  get(build_endpoint(FIND_LISTING_MARKET_HISTORY, market_listing_history: market_listing_history_id),
      headers, &block)
end

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



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

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

.relist(market_listing_history_id, body = {}) ⇒ Object



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

def relist(market_listing_history_id, body = {})
  post(build_endpoint(RELIST_LISTING_MARKET_HISTORY, market_listing_history: market_listing_history_id), body)
end

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



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

def update(market_listing_history_id, body = {})
  put(build_endpoint(UPDATE_LISTING_MARKET_HISTORY, market_listing_history: market_listing_history_id), body)
end