sdksio-verizon-apis-sdk 1.4.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +99 -86
  3. data/lib/verizon/client.rb +19 -16
  4. data/lib/verizon/configuration.rb +34 -83
  5. data/lib/verizon/controllers/account_devices_controller.rb +2 -2
  6. data/lib/verizon/controllers/account_requests_controller.rb +1 -1
  7. data/lib/verizon/controllers/account_subscriptions_controller.rb +1 -1
  8. data/lib/verizon/controllers/accounts_controller.rb +3 -3
  9. data/lib/verizon/controllers/anomaly_settings_controller.rb +3 -3
  10. data/lib/verizon/controllers/anomaly_triggers_controller.rb +5 -5
  11. data/lib/verizon/controllers/anomaly_triggers_v2_controller.rb +3 -3
  12. data/lib/verizon/controllers/billing_controller.rb +4 -4
  13. data/lib/verizon/controllers/campaigns_v2_controller.rb +7 -7
  14. data/lib/verizon/controllers/campaigns_v3_controller.rb +5 -5
  15. data/lib/verizon/controllers/client_logging_controller.rb +6 -6
  16. data/lib/verizon/controllers/cloud_connector_devices_controller.rb +6 -6
  17. data/lib/verizon/controllers/cloud_connector_subscriptions_controller.rb +3 -3
  18. data/lib/verizon/controllers/configuration_files_controller.rb +2 -2
  19. data/lib/verizon/controllers/connectivity_callbacks_controller.rb +3 -3
  20. data/lib/verizon/controllers/device_actions_controller.rb +3 -3
  21. data/lib/verizon/controllers/device_diagnostics_controller.rb +2 -2
  22. data/lib/verizon/controllers/device_groups_controller.rb +5 -5
  23. data/lib/verizon/controllers/device_location_callbacks_controller.rb +3 -3
  24. data/lib/verizon/controllers/device_management_controller.rb +29 -29
  25. data/lib/verizon/controllers/device_monitoring_controller.rb +7 -10
  26. data/lib/verizon/controllers/device_profile_management_controller.rb +4 -4
  27. data/lib/verizon/controllers/device_reports_controller.rb +3 -3
  28. data/lib/verizon/controllers/device_service_management_controller.rb +2 -2
  29. data/lib/verizon/controllers/device_sms_messaging_controller.rb +4 -4
  30. data/lib/verizon/controllers/devices_location_subscriptions_controller.rb +2 -2
  31. data/lib/verizon/controllers/devices_locations_controller.rb +7 -7
  32. data/lib/verizon/controllers/diagnostics_callbacks_controller.rb +3 -3
  33. data/lib/verizon/controllers/diagnostics_factory_reset_controller.rb +1 -1
  34. data/lib/verizon/controllers/diagnostics_history_controller.rb +1 -1
  35. data/lib/verizon/controllers/diagnostics_observations_controller.rb +2 -2
  36. data/lib/verizon/controllers/diagnostics_settings_controller.rb +1 -1
  37. data/lib/verizon/controllers/diagnostics_subscriptions_controller.rb +1 -1
  38. data/lib/verizon/controllers/euicc_device_profile_management_controller.rb +5 -5
  39. data/lib/verizon/controllers/exclusions_controller.rb +3 -3
  40. data/lib/verizon/controllers/firmware_v1_controller.rb +5 -5
  41. data/lib/verizon/controllers/firmware_v3_controller.rb +3 -3
  42. data/lib/verizon/controllers/fixed_wireless_qualification_controller.rb +1 -1
  43. data/lib/verizon/controllers/global_reporting_controller.rb +2 -2
  44. data/lib/verizon/controllers/hyper_precise_location_callbacks_controller.rb +3 -3
  45. data/lib/verizon/controllers/m_5g_edge_platforms_controller.rb +2 -2
  46. data/lib/verizon/controllers/m_v2_triggers_controller.rb +61 -0
  47. data/lib/verizon/controllers/managing_esim_profiles_controller.rb +6 -6
  48. data/lib/verizon/controllers/mec_controller.rb +7 -7
  49. data/lib/verizon/controllers/oauth_authorization_controller.rb +3 -3
  50. data/lib/verizon/controllers/performance_metrics_controller.rb +1 -1
  51. data/lib/verizon/controllers/promotion_period_information_controller.rb +4 -4
  52. data/lib/verizon/controllers/retrieve_the_triggers_controller.rb +4 -4
  53. data/lib/verizon/controllers/server_logging_controller.rb +1 -1
  54. data/lib/verizon/controllers/service_endpoints_controller.rb +6 -6
  55. data/lib/verizon/controllers/service_plans_controller.rb +1 -1
  56. data/lib/verizon/controllers/service_profiles_controller.rb +5 -5
  57. data/lib/verizon/controllers/session_management_controller.rb +3 -3
  58. data/lib/verizon/controllers/sim_actions_controller.rb +2 -2
  59. data/lib/verizon/controllers/sim_secure_for_io_t_licenses_controller.rb +2 -2
  60. data/lib/verizon/controllers/sms_controller.rb +3 -3
  61. data/lib/verizon/controllers/software_management_callbacks_v1_controller.rb +3 -3
  62. data/lib/verizon/controllers/software_management_callbacks_v2_controller.rb +4 -4
  63. data/lib/verizon/controllers/software_management_callbacks_v3_controller.rb +4 -4
  64. data/lib/verizon/controllers/software_management_licenses_v1_controller.rb +5 -5
  65. data/lib/verizon/controllers/software_management_licenses_v2_controller.rb +6 -6
  66. data/lib/verizon/controllers/software_management_licenses_v3_controller.rb +3 -3
  67. data/lib/verizon/controllers/software_management_reports_v1_controller.rb +3 -3
  68. data/lib/verizon/controllers/software_management_reports_v2_controller.rb +5 -5
  69. data/lib/verizon/controllers/software_management_reports_v3_controller.rb +3 -3
  70. data/lib/verizon/controllers/software_management_subscriptions_v1_controller.rb +2 -2
  71. data/lib/verizon/controllers/software_management_subscriptions_v2_controller.rb +1 -1
  72. data/lib/verizon/controllers/software_management_subscriptions_v3_controller.rb +1 -1
  73. data/lib/verizon/controllers/targets_controller.rb +4 -4
  74. data/lib/verizon/controllers/thing_space_quality_of_service_api_actions_controller.rb +2 -2
  75. data/lib/verizon/controllers/update_triggers_controller.rb +1 -1
  76. data/lib/verizon/controllers/usage_trigger_management_controller.rb +3 -3
  77. data/lib/verizon/controllers/wireless_network_performance_controller.rb +5 -5
  78. data/lib/verizon/exceptions/hyper_precise_location_result_exception.rb +5 -0
  79. data/lib/verizon/exceptions/rules_engine_rest_error_response_exception.rb +42 -0
  80. data/lib/verizon/http/auth/{oauth_2.rb → thingspace_oauth.rb} +18 -19
  81. data/lib/verizon/http/auth/vz_m2m_token.rb +42 -0
  82. data/lib/verizon/models/account_group_share.rb +55 -0
  83. data/lib/verizon/models/account_group_share_individual.rb +71 -0
  84. data/lib/verizon/models/action_account_group_share.rb +50 -0
  85. data/lib/verizon/models/aggregate_usage_item.rb +13 -2
  86. data/lib/verizon/models/change_plan.rb +69 -0
  87. data/lib/verizon/models/condition_account_group_share.rb +50 -0
  88. data/lib/verizon/models/create_trigger_request_options.rb +2 -2
  89. data/lib/verizon/models/create_trigger_v2_request.rb +113 -0
  90. data/lib/verizon/models/device_id_search.rb +6 -7
  91. data/lib/verizon/models/filter_criteria_account_group_share.rb +51 -0
  92. data/lib/verizon/models/notification.rb +14 -17
  93. data/lib/verizon/models/{oauth_scope_enum.rb → oauth_scope_thingspace_oauth_enum.rb} +18 -3
  94. data/lib/verizon/models/price_plan_trigger.rb +51 -0
  95. data/lib/verizon/models/request_body_for_usage.rb +12 -2
  96. data/lib/verizon/models/{usage_request_body.rb → request_body_for_usage1.rb} +6 -16
  97. data/lib/verizon/models/session_report.rb +15 -2
  98. data/lib/verizon/models/share_plan.rb +73 -0
  99. data/lib/verizon/models/sms_numbers.rb +60 -0
  100. data/lib/verizon/models/trigger_notification.rb +179 -0
  101. data/lib/verizon/models/trigger_type1.rb +2 -2
  102. data/lib/verizon/models/trigger_type2.rb +2 -2
  103. data/lib/verizon/models/trigger_type3.rb +2 -2
  104. data/lib/verizon/models/trigger_v2_response.rb +50 -0
  105. data/lib/verizon/models/triggers_list_options.rb +2 -2
  106. data/lib/verizon/models/update_trigger_request_options.rb +2 -2
  107. data/lib/verizon/models/update_trigger_v2_request.rb +123 -0
  108. data/lib/verizon.rb +20 -4
  109. metadata +21 -5
@@ -4,55 +4,52 @@
4
4
  # ( https://apimatic.io ).
5
5
 
6
6
  module Verizon
7
- # The notification details of the trigger.
7
+ # Notification Model.
8
8
  class Notification < BaseModel
9
9
  SKIP = Object.new
10
10
  private_constant :SKIP
11
11
 
12
- # The type of notification, i.e. 'DailySummary'.
12
+ # TODO: Write general description for this method
13
13
  # @return [String]
14
14
  attr_accessor :notification_type
15
15
 
16
- # Whether or not the notification should be sent via callback.<br />true<br
17
- # />false.
16
+ # TODO: Write general description for this method
18
17
  # @return [TrueClass | FalseClass]
19
18
  attr_accessor :callback
20
19
 
21
- # Whether or not the notification should be sent via e-mail.<br />true<br
22
- # />false.
20
+ # TODO: Write general description for this method
23
21
  # @return [TrueClass | FalseClass]
24
22
  attr_accessor :email_notification
25
23
 
26
- # Name for the notification group.
24
+ # TODO: Write general description for this method
27
25
  # @return [String]
28
26
  attr_accessor :notification_group_name
29
27
 
30
- # Frequency factor for notification.
28
+ # TODO: Write general description for this method
31
29
  # @return [Integer]
32
30
  attr_accessor :notification_frequency_factor
33
31
 
34
- # Frequency interval for notification.
32
+ # TODO: Write general description for this method
35
33
  # @return [String]
36
34
  attr_accessor :notification_frequency_interval
37
35
 
38
- # E-mail address(es) where the notification should be delivered.
36
+ # TODO: Write general description for this method
39
37
  # @return [String]
40
38
  attr_accessor :external_email_recipients
41
39
 
42
- # SMS notification.
40
+ # TODO: Write general description for this method
43
41
  # @return [TrueClass | FalseClass]
44
42
  attr_accessor :sms_notification
45
43
 
46
- # List of SMS numbers.
47
- # @return [Array[SMSNumber]]
44
+ # TODO: Write general description for this method
45
+ # @return [Array[SmsNumbers]]
48
46
  attr_accessor :sms_numbers
49
47
 
50
- # List of SMS numbers.
48
+ # TODO: Write general description for this method
51
49
  # @return [TrueClass | FalseClass]
52
50
  attr_accessor :reminder
53
51
 
54
- # Severity level associated with the notification. Examples would be:<br
55
- # />Major<br />Minor<br />Critical<br />NotApplicable.
52
+ # TODO: Write general description for this method
56
53
  # @return [String]
57
54
  attr_accessor :severity
58
55
 
@@ -154,7 +151,7 @@ module Verizon
154
151
  unless hash['smsNumbers'].nil?
155
152
  sms_numbers = []
156
153
  hash['smsNumbers'].each do |structure|
157
- sms_numbers << (SMSNumber.from_hash(structure) if structure)
154
+ sms_numbers << (SmsNumbers.from_hash(structure) if structure)
158
155
  end
159
156
  end
160
157
 
@@ -5,8 +5,8 @@
5
5
 
6
6
  module Verizon
7
7
  # OAuth 2 scopes supported by the API
8
- class OauthScopeEnum
9
- OAUTH_SCOPE_ENUM = [
8
+ class OauthScopeThingspaceOauthEnum
9
+ OAUTH_SCOPE_THINGSPACE_OAUTH_ENUM = [
10
10
  # Grant read-only access to discovery data
11
11
  DISCOVERYREAD = 'discovery:read'.freeze,
12
12
 
@@ -32,6 +32,21 @@ module Verizon
32
32
  # TODO: Write general description for TS_APPLICATION_RO
33
33
  TS_APPLICATION_RO = 'ts.application.ro'.freeze,
34
34
 
35
+ # TODO: Write general description for EDGEDISCOVERYREAD
36
+ EDGEDISCOVERYREAD = 'edge:discovery:read'.freeze,
37
+
38
+ # TODO: Write general description for EDGESERVICEPROFILEREAD
39
+ EDGESERVICEPROFILEREAD = 'edge:serviceprofile:read'.freeze,
40
+
41
+ # TODO: Write general description for EDGESERVICEPROFILEWRITE
42
+ EDGESERVICEPROFILEWRITE = 'edge:serviceprofile:write'.freeze,
43
+
44
+ # TODO: Write general description for EDGESERVICEREGISTRYREAD
45
+ EDGESERVICEREGISTRYREAD = 'edge:serviceregistry:read'.freeze,
46
+
47
+ # TODO: Write general description for EDGESERVICEREGISTRYWRITE
48
+ EDGESERVICEREGISTRYWRITE = 'edge:serviceregistry:write'.freeze,
49
+
35
50
  # read access
36
51
  READ = 'read'.freeze,
37
52
 
@@ -42,7 +57,7 @@ module Verizon
42
57
  def self.validate(value)
43
58
  return false if value.nil?
44
59
 
45
- OAUTH_SCOPE_ENUM.include?(value)
60
+ OAUTH_SCOPE_THINGSPACE_OAUTH_ENUM.include?(value)
46
61
  end
47
62
  end
48
63
  end
@@ -0,0 +1,51 @@
1
+ # verizon
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module Verizon
7
+ # PricePlanTrigger Model.
8
+ class PricePlanTrigger < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [AccountGroupShare]
14
+ attr_accessor :account_group_share
15
+
16
+ # A mapping from model property names to API property names.
17
+ def self.names
18
+ @_hash = {} if @_hash.nil?
19
+ @_hash['account_group_share'] = 'accountGroupShare'
20
+ @_hash
21
+ end
22
+
23
+ # An array for optional fields
24
+ def self.optionals
25
+ %w[
26
+ account_group_share
27
+ ]
28
+ end
29
+
30
+ # An array for nullable fields
31
+ def self.nullables
32
+ []
33
+ end
34
+
35
+ def initialize(account_group_share = SKIP)
36
+ @account_group_share = account_group_share unless account_group_share == SKIP
37
+ end
38
+
39
+ # Creates an instance of the object from a hash.
40
+ def self.from_hash(hash)
41
+ return nil unless hash
42
+
43
+ # Extract variables from the hash.
44
+ account_group_share = AccountGroupShare.from_hash(hash['accountGroupShare']) if
45
+ hash['accountGroupShare']
46
+
47
+ # Create object from extracted values.
48
+ PricePlanTrigger.new(account_group_share)
49
+ end
50
+ end
51
+ end
@@ -10,6 +10,10 @@ module Verizon
10
10
  SKIP = Object.new
11
11
  private_constant :SKIP
12
12
 
13
+ # TODO: Write general description for this method
14
+ # @return [String]
15
+ attr_accessor :account_id
16
+
13
17
  # TODO: Write general description for this method
14
18
  # @return [Array[ReadySimDeviceId]]
15
19
  attr_accessor :device_id
@@ -25,6 +29,7 @@ module Verizon
25
29
  # A mapping from model property names to API property names.
26
30
  def self.names
27
31
  @_hash = {} if @_hash.nil?
32
+ @_hash['account_id'] = 'accountId'
28
33
  @_hash['device_id'] = 'deviceId'
29
34
  @_hash['start_time'] = 'startTime'
30
35
  @_hash['end_time'] = 'endTime'
@@ -34,6 +39,7 @@ module Verizon
34
39
  # An array for optional fields
35
40
  def self.optionals
36
41
  %w[
42
+ account_id
37
43
  device_id
38
44
  start_time
39
45
  end_time
@@ -45,9 +51,11 @@ module Verizon
45
51
  []
46
52
  end
47
53
 
48
- def initialize(device_id = SKIP,
54
+ def initialize(account_id = SKIP,
55
+ device_id = SKIP,
49
56
  start_time = SKIP,
50
57
  end_time = SKIP)
58
+ @account_id = account_id unless account_id == SKIP
51
59
  @device_id = device_id unless device_id == SKIP
52
60
  @start_time = start_time unless start_time == SKIP
53
61
  @end_time = end_time unless end_time == SKIP
@@ -58,6 +66,7 @@ module Verizon
58
66
  return nil unless hash
59
67
 
60
68
  # Extract variables from the hash.
69
+ account_id = hash.key?('accountId') ? hash['accountId'] : SKIP
61
70
  # Parameter is an array, so we need to iterate through it
62
71
  device_id = nil
63
72
  unless hash['deviceId'].nil?
@@ -80,7 +89,8 @@ module Verizon
80
89
  end
81
90
 
82
91
  # Create object from extracted values.
83
- RequestBodyForUsage.new(device_id,
92
+ RequestBodyForUsage.new(account_id,
93
+ device_id,
84
94
  start_time,
85
95
  end_time)
86
96
  end
@@ -5,15 +5,11 @@
5
5
 
6
6
  require 'date'
7
7
  module Verizon
8
- # UsageRequestBody Model.
9
- class UsageRequestBody < BaseModel
8
+ # RequestBodyForUsage1 Model.
9
+ class RequestBodyForUsage1 < BaseModel
10
10
  SKIP = Object.new
11
11
  private_constant :SKIP
12
12
 
13
- # TODO: Write general description for this method
14
- # @return [String]
15
- attr_accessor :account_id
16
-
17
13
  # TODO: Write general description for this method
18
14
  # @return [Array[ReadySimDeviceId]]
19
15
  attr_accessor :device_id
@@ -29,7 +25,6 @@ module Verizon
29
25
  # A mapping from model property names to API property names.
30
26
  def self.names
31
27
  @_hash = {} if @_hash.nil?
32
- @_hash['account_id'] = 'accountId'
33
28
  @_hash['device_id'] = 'deviceId'
34
29
  @_hash['start_time'] = 'startTime'
35
30
  @_hash['end_time'] = 'endTime'
@@ -39,7 +34,6 @@ module Verizon
39
34
  # An array for optional fields
40
35
  def self.optionals
41
36
  %w[
42
- account_id
43
37
  device_id
44
38
  start_time
45
39
  end_time
@@ -51,11 +45,9 @@ module Verizon
51
45
  []
52
46
  end
53
47
 
54
- def initialize(account_id = SKIP,
55
- device_id = SKIP,
48
+ def initialize(device_id = SKIP,
56
49
  start_time = SKIP,
57
50
  end_time = SKIP)
58
- @account_id = account_id unless account_id == SKIP
59
51
  @device_id = device_id unless device_id == SKIP
60
52
  @start_time = start_time unless start_time == SKIP
61
53
  @end_time = end_time unless end_time == SKIP
@@ -66,7 +58,6 @@ module Verizon
66
58
  return nil unless hash
67
59
 
68
60
  # Extract variables from the hash.
69
- account_id = hash.key?('accountId') ? hash['accountId'] : SKIP
70
61
  # Parameter is an array, so we need to iterate through it
71
62
  device_id = nil
72
63
  unless hash['deviceId'].nil?
@@ -89,10 +80,9 @@ module Verizon
89
80
  end
90
81
 
91
82
  # Create object from extracted values.
92
- UsageRequestBody.new(account_id,
93
- device_id,
94
- start_time,
95
- end_time)
83
+ RequestBodyForUsage1.new(device_id,
84
+ start_time,
85
+ end_time)
96
86
  end
97
87
 
98
88
  def to_custom_start_time
@@ -25,12 +25,20 @@ module Verizon
25
25
  # @return [String]
26
26
  attr_accessor :txid
27
27
 
28
+ # A unique string that associates the request with the location report
29
+ # information that is sent in asynchronous callback message.ThingSpace will
30
+ # send a separate callback message for each device that was in the request.
31
+ # All of the callback messages will have the same txid.
32
+ # @return [Object]
33
+ attr_accessor :example
34
+
28
35
  # A mapping from model property names to API property names.
29
36
  def self.names
30
37
  @_hash = {} if @_hash.nil?
31
38
  @_hash['sessions'] = 'sessions'
32
39
  @_hash['id'] = 'id'
33
40
  @_hash['txid'] = 'txid'
41
+ @_hash['example'] = 'example'
34
42
  @_hash
35
43
  end
36
44
 
@@ -38,6 +46,7 @@ module Verizon
38
46
  def self.optionals
39
47
  %w[
40
48
  sessions
49
+ example
41
50
  ]
42
51
  end
43
52
 
@@ -50,10 +59,12 @@ module Verizon
50
59
 
51
60
  def initialize(id = nil,
52
61
  txid = nil,
53
- sessions = SKIP)
62
+ sessions = SKIP,
63
+ example = SKIP)
54
64
  @sessions = sessions unless sessions == SKIP
55
65
  @id = id
56
66
  @txid = txid
67
+ @example = example unless example == SKIP
57
68
  end
58
69
 
59
70
  # Creates an instance of the object from a hash.
@@ -73,11 +84,13 @@ module Verizon
73
84
  end
74
85
 
75
86
  sessions = SKIP unless hash.key?('sessions')
87
+ example = hash.key?('example') ? hash['example'] : SKIP
76
88
 
77
89
  # Create object from extracted values.
78
90
  SessionReport.new(id,
79
91
  txid,
80
- sessions)
92
+ sessions,
93
+ example)
81
94
  end
82
95
  end
83
96
  end
@@ -0,0 +1,73 @@
1
+ # verizon
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module Verizon
7
+ # SharePlan Model.
8
+ class SharePlan < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [String]
14
+ attr_accessor :from_carrier_code
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [String]
18
+ attr_accessor :to_carrier_code
19
+
20
+ # TODO: Write general description for this method
21
+ # @return [Integer]
22
+ attr_accessor :criteria_percentage
23
+
24
+ # A mapping from model property names to API property names.
25
+ def self.names
26
+ @_hash = {} if @_hash.nil?
27
+ @_hash['from_carrier_code'] = 'fromCarrierCode'
28
+ @_hash['to_carrier_code'] = 'toCarrierCode'
29
+ @_hash['criteria_percentage'] = 'criteriaPercentage'
30
+ @_hash
31
+ end
32
+
33
+ # An array for optional fields
34
+ def self.optionals
35
+ %w[
36
+ from_carrier_code
37
+ to_carrier_code
38
+ criteria_percentage
39
+ ]
40
+ end
41
+
42
+ # An array for nullable fields
43
+ def self.nullables
44
+ []
45
+ end
46
+
47
+ def initialize(from_carrier_code = SKIP,
48
+ to_carrier_code = SKIP,
49
+ criteria_percentage = SKIP)
50
+ @from_carrier_code = from_carrier_code unless from_carrier_code == SKIP
51
+ @to_carrier_code = to_carrier_code unless to_carrier_code == SKIP
52
+ @criteria_percentage = criteria_percentage unless criteria_percentage == SKIP
53
+ end
54
+
55
+ # Creates an instance of the object from a hash.
56
+ def self.from_hash(hash)
57
+ return nil unless hash
58
+
59
+ # Extract variables from the hash.
60
+ from_carrier_code =
61
+ hash.key?('fromCarrierCode') ? hash['fromCarrierCode'] : SKIP
62
+ to_carrier_code =
63
+ hash.key?('toCarrierCode') ? hash['toCarrierCode'] : SKIP
64
+ criteria_percentage =
65
+ hash.key?('criteriaPercentage') ? hash['criteriaPercentage'] : SKIP
66
+
67
+ # Create object from extracted values.
68
+ SharePlan.new(from_carrier_code,
69
+ to_carrier_code,
70
+ criteria_percentage)
71
+ end
72
+ end
73
+ end
@@ -0,0 +1,60 @@
1
+ # verizon
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module Verizon
7
+ # SmsNumbers Model.
8
+ class SmsNumbers < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [String]
14
+ attr_accessor :number
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [String]
18
+ attr_accessor :carrier
19
+
20
+ # A mapping from model property names to API property names.
21
+ def self.names
22
+ @_hash = {} if @_hash.nil?
23
+ @_hash['number'] = 'number'
24
+ @_hash['carrier'] = 'carrier'
25
+ @_hash
26
+ end
27
+
28
+ # An array for optional fields
29
+ def self.optionals
30
+ %w[
31
+ number
32
+ carrier
33
+ ]
34
+ end
35
+
36
+ # An array for nullable fields
37
+ def self.nullables
38
+ []
39
+ end
40
+
41
+ def initialize(number = SKIP,
42
+ carrier = SKIP)
43
+ @number = number unless number == SKIP
44
+ @carrier = carrier unless carrier == SKIP
45
+ end
46
+
47
+ # Creates an instance of the object from a hash.
48
+ def self.from_hash(hash)
49
+ return nil unless hash
50
+
51
+ # Extract variables from the hash.
52
+ number = hash.key?('number') ? hash['number'] : SKIP
53
+ carrier = hash.key?('carrier') ? hash['carrier'] : SKIP
54
+
55
+ # Create object from extracted values.
56
+ SmsNumbers.new(number,
57
+ carrier)
58
+ end
59
+ end
60
+ end
@@ -0,0 +1,179 @@
1
+ # verizon
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module Verizon
7
+ # The notification details of the trigger.
8
+ class TriggerNotification < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # The type of notification, i.e. 'DailySummary'.
13
+ # @return [String]
14
+ attr_accessor :notification_type
15
+
16
+ # Whether or not the notification should be sent via callback.<br />true<br
17
+ # />false.
18
+ # @return [TrueClass | FalseClass]
19
+ attr_accessor :callback
20
+
21
+ # Whether or not the notification should be sent via e-mail.<br />true<br
22
+ # />false.
23
+ # @return [TrueClass | FalseClass]
24
+ attr_accessor :email_notification
25
+
26
+ # Name for the notification group.
27
+ # @return [String]
28
+ attr_accessor :notification_group_name
29
+
30
+ # Frequency factor for notification.
31
+ # @return [Integer]
32
+ attr_accessor :notification_frequency_factor
33
+
34
+ # Frequency interval for notification.
35
+ # @return [String]
36
+ attr_accessor :notification_frequency_interval
37
+
38
+ # E-mail address(es) where the notification should be delivered.
39
+ # @return [String]
40
+ attr_accessor :external_email_recipients
41
+
42
+ # SMS notification.
43
+ # @return [TrueClass | FalseClass]
44
+ attr_accessor :sms_notification
45
+
46
+ # List of SMS numbers.
47
+ # @return [Array[SMSNumber]]
48
+ attr_accessor :sms_numbers
49
+
50
+ # List of SMS numbers.
51
+ # @return [TrueClass | FalseClass]
52
+ attr_accessor :reminder
53
+
54
+ # Severity level associated with the notification. Examples would be:<br
55
+ # />Major<br />Minor<br />Critical<br />NotApplicable.
56
+ # @return [String]
57
+ attr_accessor :severity
58
+
59
+ # A mapping from model property names to API property names.
60
+ def self.names
61
+ @_hash = {} if @_hash.nil?
62
+ @_hash['notification_type'] = 'notificationType'
63
+ @_hash['callback'] = 'callback'
64
+ @_hash['email_notification'] = 'emailNotification'
65
+ @_hash['notification_group_name'] = 'notificationGroupName'
66
+ @_hash['notification_frequency_factor'] = 'notificationFrequencyFactor'
67
+ @_hash['notification_frequency_interval'] =
68
+ 'notificationFrequencyInterval'
69
+ @_hash['external_email_recipients'] = 'externalEmailRecipients'
70
+ @_hash['sms_notification'] = 'smsNotification'
71
+ @_hash['sms_numbers'] = 'smsNumbers'
72
+ @_hash['reminder'] = 'reminder'
73
+ @_hash['severity'] = 'severity'
74
+ @_hash
75
+ end
76
+
77
+ # An array for optional fields
78
+ def self.optionals
79
+ %w[
80
+ notification_type
81
+ callback
82
+ email_notification
83
+ notification_group_name
84
+ notification_frequency_factor
85
+ notification_frequency_interval
86
+ external_email_recipients
87
+ sms_notification
88
+ sms_numbers
89
+ reminder
90
+ severity
91
+ ]
92
+ end
93
+
94
+ # An array for nullable fields
95
+ def self.nullables
96
+ []
97
+ end
98
+
99
+ def initialize(notification_type = SKIP,
100
+ callback = SKIP,
101
+ email_notification = SKIP,
102
+ notification_group_name = SKIP,
103
+ notification_frequency_factor = SKIP,
104
+ notification_frequency_interval = SKIP,
105
+ external_email_recipients = SKIP,
106
+ sms_notification = SKIP,
107
+ sms_numbers = SKIP,
108
+ reminder = SKIP,
109
+ severity = SKIP)
110
+ @notification_type = notification_type unless notification_type == SKIP
111
+ @callback = callback unless callback == SKIP
112
+ @email_notification = email_notification unless email_notification == SKIP
113
+ @notification_group_name = notification_group_name unless notification_group_name == SKIP
114
+ unless notification_frequency_factor == SKIP
115
+ @notification_frequency_factor =
116
+ notification_frequency_factor
117
+ end
118
+ unless notification_frequency_interval == SKIP
119
+ @notification_frequency_interval =
120
+ notification_frequency_interval
121
+ end
122
+ unless external_email_recipients == SKIP
123
+ @external_email_recipients =
124
+ external_email_recipients
125
+ end
126
+ @sms_notification = sms_notification unless sms_notification == SKIP
127
+ @sms_numbers = sms_numbers unless sms_numbers == SKIP
128
+ @reminder = reminder unless reminder == SKIP
129
+ @severity = severity unless severity == SKIP
130
+ end
131
+
132
+ # Creates an instance of the object from a hash.
133
+ def self.from_hash(hash)
134
+ return nil unless hash
135
+
136
+ # Extract variables from the hash.
137
+ notification_type =
138
+ hash.key?('notificationType') ? hash['notificationType'] : SKIP
139
+ callback = hash.key?('callback') ? hash['callback'] : SKIP
140
+ email_notification =
141
+ hash.key?('emailNotification') ? hash['emailNotification'] : SKIP
142
+ notification_group_name =
143
+ hash.key?('notificationGroupName') ? hash['notificationGroupName'] : SKIP
144
+ notification_frequency_factor =
145
+ hash.key?('notificationFrequencyFactor') ? hash['notificationFrequencyFactor'] : SKIP
146
+ notification_frequency_interval =
147
+ hash.key?('notificationFrequencyInterval') ? hash['notificationFrequencyInterval'] : SKIP
148
+ external_email_recipients =
149
+ hash.key?('externalEmailRecipients') ? hash['externalEmailRecipients'] : SKIP
150
+ sms_notification =
151
+ hash.key?('smsNotification') ? hash['smsNotification'] : SKIP
152
+ # Parameter is an array, so we need to iterate through it
153
+ sms_numbers = nil
154
+ unless hash['smsNumbers'].nil?
155
+ sms_numbers = []
156
+ hash['smsNumbers'].each do |structure|
157
+ sms_numbers << (SMSNumber.from_hash(structure) if structure)
158
+ end
159
+ end
160
+
161
+ sms_numbers = SKIP unless hash.key?('smsNumbers')
162
+ reminder = hash.key?('reminder') ? hash['reminder'] : SKIP
163
+ severity = hash.key?('severity') ? hash['severity'] : SKIP
164
+
165
+ # Create object from extracted values.
166
+ TriggerNotification.new(notification_type,
167
+ callback,
168
+ email_notification,
169
+ notification_group_name,
170
+ notification_frequency_factor,
171
+ notification_frequency_interval,
172
+ external_email_recipients,
173
+ sms_notification,
174
+ sms_numbers,
175
+ reminder,
176
+ severity)
177
+ end
178
+ end
179
+ end
@@ -28,7 +28,7 @@ module Verizon
28
28
  attr_accessor :anomaly_trigger_request
29
29
 
30
30
  # The notification details of the trigger.
31
- # @return [Notification]
31
+ # @return [TriggerNotification]
32
32
  attr_accessor :notification
33
33
 
34
34
  # A mapping from model property names to API property names.
@@ -81,7 +81,7 @@ module Verizon
81
81
  account_name = hash.key?('accountName') ? hash['accountName'] : SKIP
82
82
  anomaly_trigger_request = AnomalyTriggerRequest.from_hash(hash['anomalyTriggerRequest']) if
83
83
  hash['anomalyTriggerRequest']
84
- notification = Notification.from_hash(hash['notification']) if hash['notification']
84
+ notification = TriggerNotification.from_hash(hash['notification']) if hash['notification']
85
85
 
86
86
  # Create object from extracted values.
87
87
  TriggerType1.new(name,