Class: Vonage::IdentityInsights
- Inherits:
-
Namespace
- Object
- Namespace
- Vonage::IdentityInsights
- Defined in:
- lib/vonage/identity_insights.rb
Defined Under Namespace
Classes: InsightsBuilder
Constant Summary collapse
- VALID_INSIGHT_TYPES =
%i[format sim_swap original_carrier current_carrier].freeze
Instance Method Summary collapse
-
#insights_builder ⇒ InsightsBuilder
Instantiate an InsightsBuilder.
-
#requests(phone_number:, insights: {}, **options) {|builder| ... } ⇒ Vonage::Response
Submit an Identity Insights request.
Instance Method Details
#insights_builder ⇒ InsightsBuilder
Instantiate an InsightsBuilder.
61 62 63 |
# File 'lib/vonage/identity_insights.rb', line 61 def insights_builder InsightsBuilder.new end |
#requests(phone_number:, insights: {}, **options) {|builder| ... } ⇒ Vonage::Response
Submit an Identity Insights request.
The SDK currently supports the following insight types: format, sim_swap, current_carrier, and original_carrier.
for block {|builder| ... }
46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/vonage/identity_insights.rb', line 46 def requests(phone_number:, insights: {}, **) insights = yield insights_builder if block_given? validate_insights(insights) params = { phone_number: phone_number, insights: insights.to_h }.merge() request('/identity-insights/v1/requests', params: params, type: Post) end |