Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Telnyx\Exception\UnknownApiErrorException with message 'Invalid value. Must be one of: true, false, nil.' #73

Open
onurozgurozkan opened this issue Jul 24, 2022 · 0 comments

Comments

@onurozgurozkan
Copy link

onurozgurozkan commented Jul 24, 2022

Hello,

\Telnyx\Telnyx::setApiKey('YOUR_API_KEY');

\Telnyx\OutboundVoiceProfile::Create([
  "billing_group_id" => "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
  "concurrent_call_limit" => 10,
  "daily_spend_limit" => "100.00",
  "daily_spend_limit_enabled" => true,
  "enabled" => true,"max_destination_rate" => 10,
  "name" => "office",
  "service_plan" => "global",
  "tags" => ["office-profile"],
  "traffic_type" => "conversational",
  "usage_payment_method" => "rate-deck",
  "whitelisted_destinations" => ["US","BR","AU"]
]);

Throw an UnknownApiErrorException.

Telnyx\Exception\UnknownApiErrorException with message 'Invalid value. Must be one of: true, false, nil.'
  • When I removed the "daily_spend_limit_enabled" => true, variable, the OutboundVoiceProfile was created.
  • Also I tried variable type as an integer (0,1) like "daily_spend_limit_enabled" => 1 or string ('true', 'false') like "daily_spend_limit_enabled" => "true"

Env

PHP 8.1
I used: Master Branch for supporting PHP 8.1

When I posted "daily_spend_limit_enabled" => true variable manually on the Insomnia app, the exception didn't rise, and OutboundVoiceProfile was created.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant