Sha256: 8e2d04abb91875f5a541b865039cadfeb96e58751d6396753fd6ea18321e3207
Contents?: true
Size: 1.99 KB
Versions: 8
Compression:
Stored size: 1.99 KB
Contents
require_relative '../service' module Adyen class AllowedOriginsMerchantLevelApi < Service attr_accessor :service, :version def initialize(client, version = DEFAULT_VERSION) super(client, version, 'Management') end def delete_allowed_origin(merchant_id, api_credential_id, origin_id, headers: {}) endpoint = '/merchants/{merchantId}/apiCredentials/{apiCredentialId}/allowedOrigins/{originId}'.gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(%r{^/}, '') endpoint = format(endpoint, merchant_id, api_credential_id, origin_id) action = { method: 'delete', url: endpoint } @client.call_adyen_api(@service, action, {}, headers, @version) end def list_allowed_origins(merchant_id, api_credential_id, headers: {}) endpoint = '/merchants/{merchantId}/apiCredentials/{apiCredentialId}/allowedOrigins'.gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(%r{^/}, '') endpoint = format(endpoint, merchant_id, api_credential_id) action = { method: 'get', url: endpoint } @client.call_adyen_api(@service, action, {}, headers, @version) end def get_allowed_origin(merchant_id, api_credential_id, origin_id, headers: {}) endpoint = '/merchants/{merchantId}/apiCredentials/{apiCredentialId}/allowedOrigins/{originId}'.gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(%r{^/}, '') endpoint = format(endpoint, merchant_id, api_credential_id, origin_id) action = { method: 'get', url: endpoint } @client.call_adyen_api(@service, action, {}, headers, @version) end def create_allowed_origin(request, merchant_id, api_credential_id, headers: {}) endpoint = '/merchants/{merchantId}/apiCredentials/{apiCredentialId}/allowedOrigins'.gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(%r{^/}, '') endpoint = format(endpoint, merchant_id, api_credential_id) action = { method: 'post', url: endpoint } @client.call_adyen_api(@service, action, request, headers, @version) end end end
Version data entries
8 entries across 8 versions & 1 rubygems