Class: VericredClient::ProviderNotificationSubscriptionsApi
- Inherits:
-
Object
- Object
- VericredClient::ProviderNotificationSubscriptionsApi
- Defined in:
- lib/vericred_client/api/provider_notification_subscriptions_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_provider_notification_subscription(opts = {}) ⇒ NotificationSubscriptionResponse
Subscribe Subscribe to receive webhook notifications when providers join or leave a network.
-
#create_provider_notification_subscription_with_http_info(opts = {}) ⇒ Array<(NotificationSubscriptionResponse, Fixnum, Hash)>
Subscribe Subscribe to receive webhook notifications when providers join or leave a network.
-
#delete_provider_notification_subscription(nonce, opts = {}) ⇒ nil
Unsubscribe Unsubscribe from an existing webhook notification.
-
#delete_provider_notification_subscription_with_http_info(nonce, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Unsubscribe Unsubscribe from an existing webhook notification.
-
#initialize(api_client = ApiClient.default) ⇒ ProviderNotificationSubscriptionsApi
constructor
A new instance of ProviderNotificationSubscriptionsApi.
-
#notify_provider_notification_subscription(opts = {}) ⇒ nil
Webhook Webhook notifications are sent when there are events relevant to a subscription.
-
#notify_provider_notification_subscription_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Webhook Webhook notifications are sent when there are events relevant to a subscription.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ ProviderNotificationSubscriptionsApi
Returns a new instance of ProviderNotificationSubscriptionsApi.
990 991 992 |
# File 'lib/vericred_client/api/provider_notification_subscriptions_api.rb', line 990 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
988 989 990 |
# File 'lib/vericred_client/api/provider_notification_subscriptions_api.rb', line 988 def api_client @api_client end |
Instance Method Details
#create_provider_notification_subscription(opts = {}) ⇒ NotificationSubscriptionResponse
Subscribe Subscribe to receive webhook notifications when providers join or leave a network. The request must include a list of National Provider Index (NPI) numbers for providers, a callback URL where notifications should be sent, and either a plan ID or a network ID. The response will include a ‘nonce` value. The `nonce` will be included in all webhook notifications originating from this subscription and will be used as the identifier for all subsequent requests. The `network_id` and `plan_id` are mutually exclusive. The request must include a value for one of the fields, but cannot include both. Examples of valid request bodies are as follows: “` { "npis": ["2712589", "8498549", "19528190"], "plan_id": 1, "callback_url": "example.com/webhook" } “` “` { "npis": ["2712589", "8498549", "19528190"], "network_id": 1, "callback_url": "example.com/webhook" } “`
999 1000 1001 1002 |
# File 'lib/vericred_client/api/provider_notification_subscriptions_api.rb', line 999 def create_provider_notification_subscription(opts = {}) data, _status_code, _headers = create_provider_notification_subscription_with_http_info(opts) return data end |
#create_provider_notification_subscription_with_http_info(opts = {}) ⇒ Array<(NotificationSubscriptionResponse, Fixnum, Hash)>
Subscribe Subscribe to receive webhook notifications when providers join or leave a network. The request must include a list of National Provider Index (NPI) numbers for providers, a callback URL where notifications should be sent, and either a plan ID or a network ID. The response will include a `nonce` value. The `nonce` will be included in all webhook notifications originating from this subscription and will be used as the identifier for all subsequent requests. The `network_id` and `plan_id` are mutually exclusive. The request must include a value for one of the fields, but cannot include both. Examples of valid request bodies are as follows: ``` { "npis": ["2712589", "8498549", "19528190"], "plan_id": 1, "callback_url": "example.com/webhook" } ``` ``` { "npis": ["2712589", "8498549", "19528190"], "network_id": 1, "callback_url": "example.com/webhook" } ```
1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 |
# File 'lib/vericred_client/api/provider_notification_subscriptions_api.rb', line 1009 def create_provider_notification_subscription_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ProviderNotificationSubscriptionsApi.create_provider_notification_subscription ..." end # resource path local_var_path = "/providers/subscription".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'root']) auth_names = ['Vericred-Api-Key'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'NotificationSubscriptionResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: ProviderNotificationSubscriptionsApi#create_provider_notification_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_provider_notification_subscription(nonce, opts = {}) ⇒ nil
Unsubscribe Unsubscribe from an existing webhook notification.
1054 1055 1056 1057 |
# File 'lib/vericred_client/api/provider_notification_subscriptions_api.rb', line 1054 def delete_provider_notification_subscription(nonce, opts = {}) delete_provider_notification_subscription_with_http_info(nonce, opts) return nil end |
#delete_provider_notification_subscription_with_http_info(nonce, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Unsubscribe Unsubscribe from an existing webhook notification.
1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 |
# File 'lib/vericred_client/api/provider_notification_subscriptions_api.rb', line 1064 def delete_provider_notification_subscription_with_http_info(nonce, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ProviderNotificationSubscriptionsApi.delete_provider_notification_subscription ..." end # verify the required parameter 'nonce' is set fail ArgumentError, "Missing the required parameter 'nonce' when calling ProviderNotificationSubscriptionsApi.delete_provider_notification_subscription" if nonce.nil? # resource path local_var_path = "/providers/subscription/{nonce}".sub('{format}','json').sub('{' + 'nonce' + '}', nonce.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = [] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['Vericred-Api-Key'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProviderNotificationSubscriptionsApi#delete_provider_notification_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#notify_provider_notification_subscription(opts = {}) ⇒ nil
Webhook Webhook notifications are sent when there are events relevant to a subscription. Notifications will be sent to the callback URL that was provided in the original request. The endpoint handling this request should respond with a successful status code (200 <= Status Code < 300). If a successful status code is not returned the notification will be sent again at a regular interval.
1110 1111 1112 1113 |
# File 'lib/vericred_client/api/provider_notification_subscriptions_api.rb', line 1110 def notify_provider_notification_subscription(opts = {}) notify_provider_notification_subscription_with_http_info(opts) return nil end |
#notify_provider_notification_subscription_with_http_info(opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Webhook Webhook notifications are sent when there are events relevant to a subscription. Notifications will be sent to the callback URL that was provided in the original request. The endpoint handling this request should respond with a successful status code (200 <= Status Code < 300). If a successful status code is not returned the notification will be sent again at a regular interval.
1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 |
# File 'lib/vericred_client/api/provider_notification_subscriptions_api.rb', line 1120 def notify_provider_notification_subscription_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ProviderNotificationSubscriptionsApi.notify_provider_notification_subscription ..." end # resource path local_var_path = "/CALLBACK_URL".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = [] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'root']) auth_names = ['Vericred-Api-Key'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: ProviderNotificationSubscriptionsApi#notify_provider_notification_subscription\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |