Class: Coyodlee::Facades::ProviderAccountsFacade
- Inherits:
-
Object
- Object
- Coyodlee::Facades::ProviderAccountsFacade
- Defined in:
- lib/coyodlee/facades/provider_accounts_facade.rb
Instance Method Summary collapse
- #add(provider_id:, body:) ⇒ Object
- #delete(provider_account_id:) ⇒ Object
- #details(provider_account_id:, params: {}) ⇒ Object
-
#initialize(request_facade) ⇒ ProviderAccountsFacade
constructor
A new instance of ProviderAccountsFacade.
- #provider_accounts ⇒ Object
- #update(body:) ⇒ Object
- #verification_status(provider_account_id:) ⇒ Object
- #verify(body:) ⇒ Object
Constructor Details
#initialize(request_facade) ⇒ ProviderAccountsFacade
Returns a new instance of ProviderAccountsFacade.
4 5 6 |
# File 'lib/coyodlee/facades/provider_accounts_facade.rb', line 4 def initialize(request_facade) @request_facade = request_facade end |
Instance Method Details
#add(provider_id:, body:) ⇒ Object
44 45 46 47 48 49 |
# File 'lib/coyodlee/facades/provider_accounts_facade.rb', line 44 def add(provider_id:, body:) headers = { 'Accept' => 'application/json' } params = { 'providerId' => provider_id } req = @request_facade.build(:post, "providerAccounts", headers: headers, params: params, body: body) @request_facade.execute(req) end |
#delete(provider_account_id:) ⇒ Object
32 33 34 35 36 |
# File 'lib/coyodlee/facades/provider_accounts_facade.rb', line 32 def delete(provider_account_id:) headers = { 'Accept' => 'application/json' } req = @request_facade.build(:delete, "providerAccounts/#{provider_account_id}", headers: headers) @request_facade.execute(req) end |
#details(provider_account_id:, params: {}) ⇒ Object
38 39 40 41 42 |
# File 'lib/coyodlee/facades/provider_accounts_facade.rb', line 38 def details(provider_account_id:, params: {}) headers = { 'Accept' => 'application/json' } req = @request_facade.build(:get, "providerAccounts/#{provider_account_id}", headers: headers, params: params) @request_facade.execute(req) end |
#provider_accounts ⇒ Object
8 9 10 11 12 |
# File 'lib/coyodlee/facades/provider_accounts_facade.rb', line 8 def provider_accounts headers = { 'Accept' => 'application/json' } req = @request_facade.build(:get, 'providerAccounts', headers: headers) @request_facade.execute(req) end |
#update(body:) ⇒ Object
26 27 28 29 30 |
# File 'lib/coyodlee/facades/provider_accounts_facade.rb', line 26 def update(body:) headers = { 'Accept' => 'application/json' } req = @request_facade.build(:put, 'providerAccounts', headers: headers, body: body.to_json) @request_facade.execute(req) end |
#verification_status(provider_account_id:) ⇒ Object
20 21 22 23 24 |
# File 'lib/coyodlee/facades/provider_accounts_facade.rb', line 20 def verification_status(provider_account_id:) headers = { 'Accept' => 'application/json' } req = @request_facade.build(:get, "providerAccounts/verification/#{provider_account_id}", headers: headers) @request_facade.execute(req) end |
#verify(body:) ⇒ Object
14 15 16 17 18 |
# File 'lib/coyodlee/facades/provider_accounts_facade.rb', line 14 def verify(body:) headers = { 'Accept' => 'application/json' } req = @request_facade.build(:put, 'providerAccounts/verification', headers: headers, body: body.to_json) @request_facade.execute(req) end |