Module: PlentyClient::Market::Credentials

Includes:
Endpoint, Request
Defined in:
lib/plenty_client/market/credentials.rb

Constant Summary collapse

LIST_MARKET_CREDENTIALS =
'/markets/credentials'.freeze
FIND_MARKET_CREDENTIALS =
'/markets/credentials/{credentialsId}'.freeze
CREATE_MARKET_CREDENTIALS =
'/markets/credentials'.freeze
UPDATE_MARKET_CREDENTIALS =
'/markets/credentials/{credentialsId}'.freeze
DELETE_MARKET_CREDENTIALS =
'/markets/credentials/{credentialsId}'.freeze

Class Method Summary collapse

Methods included from Request

included

Methods included from Endpoint

included

Class Method Details

.create(body = {}) ⇒ Object



22
23
24
# File 'lib/plenty_client/market/credentials.rb', line 22

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

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



30
31
32
# File 'lib/plenty_client/market/credentials.rb', line 30

def destroy(credentials_id, body = {})
  delete(build_endpoint(DELETE_MARKET_CREDENTIALS, credentials: credentials_id), body)
end

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



18
19
20
# File 'lib/plenty_client/market/credentials.rb', line 18

def find(credentials_id, headers = {}, &block)
  get(build_endpoint(FIND_MARKET_CREDENTIALS, credentials: credentials_id), headers, &block)
end

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



14
15
16
# File 'lib/plenty_client/market/credentials.rb', line 14

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

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



26
27
28
# File 'lib/plenty_client/market/credentials.rb', line 26

def update(credentials_id, body = {})
  put(build_endpoint(UPDATE_MARKET_CREDENTIALS, credentials: credentials_id), body)
end