team-telnyx / telnyx-ruby

Telnyx API Ruby Client
https://developers.telnyx.com/docs/api/v2/overview
MIT License
24 stars 17 forks source link

Add the possibility to set `id` attribute on Telnyx::Call object #7

Closed igorffs closed 5 years ago

igorffs commented 5 years ago

Since the id can be call_control_id after Telnyx::Call.create, which is generated dynamically after this call, we need to check its definition in order to be able to initialize an empty object.

With this, we should be able to do the following:

call = Telnyx::Call.new call.id = "some-id"

But the id attribute will always assume the call_control_id coming from the request after running Telnyx::Call.create.