Class: Tikkie::Api::V1::Requests::Users
- Inherits:
-
Object
- Object
- Tikkie::Api::V1::Requests::Users
- Defined in:
- lib/tikkie/api/v1/requests/users.rb
Overview
Users operations at Tikkie.
Instance Method Summary collapse
- #create(platform_token, options = {}) ⇒ Object
-
#initialize(request) ⇒ Users
constructor
A new instance of Users.
- #list(platform_token) ⇒ Object
Constructor Details
#initialize(request) ⇒ Users
Returns a new instance of Users.
9 10 11 |
# File 'lib/tikkie/api/v1/requests/users.rb', line 9 def initialize(request) @request = request end |
Instance Method Details
#create(platform_token, options = {}) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/tikkie/api/v1/requests/users.rb', line 18 def create(platform_token, = {}) params = { name: .fetch(:name), phoneNumber: .fetch(:phone_number), iban: .fetch(:iban), bankAccountLabel: .fetch(:bank_account_label) } response = @request.post("/tikkie/platforms/#{platform_token}/users", params) Tikkie::Api::V1::Responses::User.new(response) end |