Skip to content
This repository was archived by the owner on Jan 20, 2024. It is now read-only.
4 changes: 4 additions & 0 deletions config/endpoints.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
base_api_url: 'https://placeholder.rest.marketingcloudapis.com'
request_token_url: 'https://placeholder.rest.marketingcloudapis.com/v1/requestToken'
soap_wsdl_endpoint: 'https://placeholder.soap.marketingcloudapis.com/etframework.wsdl'
soap_service_endpoint: 'https://placeholder.soap.marketingcloudapis.com/Service.asmx'
25 changes: 25 additions & 0 deletions lib/marketingcloudsdk/exact_target_endpoints.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
module MarketingCloudSDK
class ExactTargetEndpoints

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't Exact target name "deprecated"?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call, think I'll rename TenantSpecificEndpoints

def self.config
YAML.load_file(
File.join('config', 'endpoints.yml')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe consider naming this marketing_cloud_endpoints or similar?
it's possible that applications that use this gem also use other 3rd parties, so just "endpoints" will not be specific enough

)
end

def self.base_api_url
@base_api_url ||= config['base_api_url']
end

def self.request_token_url
@request_token_url ||= config['request_token_url']
end

def self.soap_wsdl_endpoint
@soap_wsdl_endpoint ||= config['soap_wsdl_endpoint']
end

def self.soap_service_endpoint
@soap_service_endpoint ||= config['soap_service_endpoint']
end
end
end