Class: Monobank::Corporate::Client
- Inherits:
-
Object
- Object
- Monobank::Corporate::Client
- Defined in:
- lib/monobank/corporate/client.rb
Instance Method Summary collapse
- #auth_check(request_id:) ⇒ Object
- #auth_request(callback: nil) ⇒ Object
- #client_info(request_id:) ⇒ Object
-
#initialize(private_key:, key_id:) ⇒ Client
constructor
A new instance of Client.
- #registration(public_key:, name:, description:, contact_person:, phone:, email:, logo:) ⇒ Object
- #registration_status(public_key:) ⇒ Object
- #set_webhook(url:) ⇒ Object
- #settings ⇒ Object
- #statement(request_id:, account_id:, from:, to: nil) ⇒ Object
Constructor Details
#initialize(private_key:, key_id:) ⇒ Client
Returns a new instance of Client.
14 15 16 17 |
# File 'lib/monobank/corporate/client.rb', line 14 def initialize(private_key:, key_id:) @private_key = private_key @key_id = key_id end |
Instance Method Details
#auth_check(request_id:) ⇒ Object
39 40 41 |
# File 'lib/monobank/corporate/client.rb', line 39 def auth_check(request_id:) Personal::AuthCheck.new(auth: auth(request_id:)).call end |
#auth_request(callback: nil) ⇒ Object
35 36 37 |
# File 'lib/monobank/corporate/client.rb', line 35 def auth_request(callback: nil) Personal::AuthRequest.new(callback:, auth:).call end |
#client_info(request_id:) ⇒ Object
43 44 45 |
# File 'lib/monobank/corporate/client.rb', line 43 def client_info(request_id:) Personal::ClientInfo.new(auth: auth(request_id:)).call end |
#registration(public_key:, name:, description:, contact_person:, phone:, email:, logo:) ⇒ Object
19 20 21 |
# File 'lib/monobank/corporate/client.rb', line 19 def registration(public_key:, name:, description:, contact_person:, phone:, email:, logo:) Personal::Registration.new(public_key:, name:, description:, contact_person:, phone:, email:, logo:, auth:).call end |
#registration_status(public_key:) ⇒ Object
23 24 25 |
# File 'lib/monobank/corporate/client.rb', line 23 def registration_status(public_key:) Personal::RegistrationStatus.new(public_key:, auth:).call end |
#set_webhook(url:) ⇒ Object
27 28 29 |
# File 'lib/monobank/corporate/client.rb', line 27 def set_webhook(url:) Personal::CorporateWebhook.new(url: url, auth:).call end |