Class: Starling::Services::AddressesService

Inherits:
BaseService
  • Object
show all
Defined in:
lib/starling/services/addresses_service.rb

Overview

A service for accessing the Address API

Instance Method Summary collapse

Methods inherited from BaseService

#initialize

Constructor Details

This class inherits a constructor from Starling::Services::BaseService

Instance Method Details

#get(params: {}, headers: {}) ⇒ Resources::AddressesResource

Raises:

  • (Errors::ApiError)

    if the HTTP request returns a status indicating that it was unsuccessful


12
13
14
15
16
17
# File 'lib/starling/services/addresses_service.rb', line 12

def get(params: {}, headers: {})
  response = api_service.make_request(:get, '/addresses', params: params,
                                                          headers: headers)

  resource.new(response: response)
end