Class: Loqate::Gateway
- Inherits:
-
Object
- Object
- Loqate::Gateway
- Defined in:
- lib/loqate/gateway.rb
Overview
Acts as a single point of entry for a defined group of API’s.
Instance Attribute Summary collapse
-
#config ⇒ Configuration
readonly
The gem configuration.
Instance Method Summary collapse
-
#address ⇒ Address::Gateway
Gateway to the Address APIs.
-
#bank ⇒ Bank::Gateway
Gateway to the Bank verification APIs.
-
#email ⇒ Email::Gateway
Gateway to the Email verification APIs.
-
#geocoding ⇒ Geocoding::Gateway
Gateway to the Geocoding APIs.
-
#initialize(**options) ⇒ Gateway
constructor
Creates a new gateway.
-
#phone ⇒ Phone::Gateway
Gateway to the Phone number API.
Constructor Details
#initialize(**options) ⇒ Gateway
Creates a new gateway.
25 26 27 28 |
# File 'lib/loqate/gateway.rb', line 25 def initialize(**) @config = Configuration.new(**) @client = Client.new(config) end |
Instance Attribute Details
#config ⇒ Configuration (readonly)
The gem configuration.
14 15 16 |
# File 'lib/loqate/gateway.rb', line 14 def config @config end |
Instance Method Details
#address ⇒ Address::Gateway
Gateway to the Address APIs.
34 35 36 |
# File 'lib/loqate/gateway.rb', line 34 def address @address ||= Address::Gateway.new(client) end |
#bank ⇒ Bank::Gateway
Gateway to the Bank verification APIs.
66 67 68 |
# File 'lib/loqate/gateway.rb', line 66 def bank @bank ||= Bank::Gateway.new(client) end |
#email ⇒ Email::Gateway
Gateway to the Email verification APIs.
58 59 60 |
# File 'lib/loqate/gateway.rb', line 58 def email @email ||= Email::Gateway.new(client) end |
#geocoding ⇒ Geocoding::Gateway
Gateway to the Geocoding APIs.
42 43 44 |
# File 'lib/loqate/gateway.rb', line 42 def geocoding @geocoding ||= Geocoding::Gateway.new(client) end |
#phone ⇒ Phone::Gateway
Gateway to the Phone number API.
50 51 52 |
# File 'lib/loqate/gateway.rb', line 50 def phone @phone ||= Phone::Gateway.new(client) end |