Class: PlentyClient::Listing::Market::Text

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

Constant Summary collapse

FIND_LISTING_MARKET_TEXT =
'/listings/markets/texts/{marketTextId}'
LIST_LISTING_MARKET_TEXTS =
'/listings/markets/texts'
CREATE_LISTING_MARKET_TEXT =
'/listings/markets/texts'
UPDATE_LISTING_MARKET_TEXT =
'/listings/markets/texts/{marketTextId}'
DELETE_LISTING_MARKET_TEXT =
'/listings/markets/texts/{marketTextId}'

Class Method Summary collapse

Methods included from Request

included

Methods included from Endpoint

included

Class Method Details

.create(body = {}) ⇒ Object



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

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

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



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

def destroy(market_text_id, body = {})
  delete(build_endpoint(DELETE_LISTING_MARKET_TEXT, market_text: market_text_id), body)
end

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



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

def find(market_text_id, headers = {}, &block)
  get(build_endpoint(FIND_LISTING_MARKET_TEXT, market_text: market_text_id), headers, &block)
end

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



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

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

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



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

def update(market_text_id, body = {})
  put(build_endpoint(UPDATE_LISTING_MARKET_TEXT, market_text: market_text_id), body)
end