Class: Finicity::V2::Request::PartnerAuthentication
- Inherits:
-
Object
- Object
- Finicity::V2::Request::PartnerAuthentication
- Extended by:
- HTTPClient::IncludeClient
- Defined in:
- lib/finicity/v2/request/partner_authentication.rb
Instance Method Summary collapse
-
#authenticate ⇒ Object
Instance Methods.
- #body ⇒ Object
- #headers ⇒ Object
- #url ⇒ Object
Instance Method Details
#authenticate ⇒ Object
Instance Methods
12 13 14 |
# File 'lib/finicity/v2/request/partner_authentication.rb', line 12 def authenticate http_client.post(url, body, headers) end |
#body ⇒ Object
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/finicity/v2/request/partner_authentication.rb', line 16 def body builder = ::Nokogiri::XML::Builder.new do |xml| xml.credentials do xml.partnerId(::Finicity.config.partner_id) xml.partnerSecret(::Finicity.config.partner_secret) end end builder.doc.root.to_s end |
#headers ⇒ Object
27 28 29 30 31 32 |
# File 'lib/finicity/v2/request/partner_authentication.rb', line 27 def headers { 'Finicity-App-Key' => ::Finicity.config.app_key, 'Content-Type' => 'application/xml' } end |
#url ⇒ Object
34 35 36 |
# File 'lib/finicity/v2/request/partner_authentication.rb', line 34 def url ::URI.join(::Finicity.config.base_url, 'v2/partners/authentication') end |