class IronBank::Endpoint

Identify and return the proper base URL for a given Zuora domain.

Constants

APISANDBOX
PRODUCTION
SERVICES

Attributes

domain[R]

Public Class Methods

base_url(domain = "") click to toggle source
# File lib/iron_bank/endpoint.rb, line 13
def self.base_url(domain = "")
  new(domain).base_url
end
new(domain) click to toggle source
# File lib/iron_bank/endpoint.rb, line 32
def initialize(domain)
  @domain = domain
end

Public Instance Methods

base_url() click to toggle source
# File lib/iron_bank/endpoint.rb, line 17
def base_url
  case domain
  when PRODUCTION
    "https://rest.zuora.com/"
  when SERVICES
    "https://#{domain}/".downcase
  when APISANDBOX
    "https://rest.apisandbox.zuora.com/"
  end
end