Class: Vonage::IdentityInsights::InsightsBuilder
- Inherits:
-
Object
- Object
- Vonage::IdentityInsights::InsightsBuilder
- Defined in:
- lib/vonage/identity_insights/insights_builder.rb
Instance Method Summary collapse
-
#add_current_carrier ⇒ InsightsBuilder
Add a Current Carrier insight.
-
#add_format ⇒ InsightsBuilder
Add a Format insight.
-
#add_original_carrier ⇒ InsightsBuilder
Add an Original Carrier insight.
-
#add_sim_swap(period: nil) ⇒ InsightsBuilder
Add a Sim Swap insight.
-
#initialize ⇒ InsightsBuilder
constructor
A new instance of InsightsBuilder.
-
#to_h ⇒ Hash
Convert the InsightsBuilder to a Hash.
Constructor Details
#initialize ⇒ InsightsBuilder
Returns a new instance of InsightsBuilder.
6 7 8 |
# File 'lib/vonage/identity_insights/insights_builder.rb', line 6 def initialize @insights = {} end |
Instance Method Details
#add_current_carrier ⇒ InsightsBuilder
Add a Current Carrier insight.
45 46 47 48 |
# File 'lib/vonage/identity_insights/insights_builder.rb', line 45 def add_current_carrier @insights[:current_carrier] = {} self end |
#add_format ⇒ InsightsBuilder
Add a Format insight.
16 17 18 19 |
# File 'lib/vonage/identity_insights/insights_builder.rb', line 16 def add_format @insights[:format] = {} self end |
#add_original_carrier ⇒ InsightsBuilder
Add an Original Carrier insight.
56 57 58 59 |
# File 'lib/vonage/identity_insights/insights_builder.rb', line 56 def add_original_carrier @insights[:original_carrier] = {} self end |
#add_sim_swap(period: nil) ⇒ InsightsBuilder
Add a Sim Swap insight.
29 30 31 32 33 34 35 36 37 |
# File 'lib/vonage/identity_insights/insights_builder.rb', line 29 def add_sim_swap(period: nil) params = {} if period validate_sim_swap_period(period) params[:period] = period end @insights[:sim_swap] = params self end |
#to_h ⇒ Hash
Convert the InsightsBuilder to a Hash.
64 65 66 |
# File 'lib/vonage/identity_insights/insights_builder.rb', line 64 def to_h @insights end |