Class: NewStoreApi::NotificationsController
- Inherits:
-
BaseController
- Object
- BaseController
- NewStoreApi::NotificationsController
- Defined in:
- lib/new_store_api/controllers/notifications_controller.rb
Overview
NotificationsController
Constant Summary
Constants inherited from BaseController
Instance Attribute Summary
Attributes inherited from BaseController
Instance Method Summary collapse
-
#create_notification(event_name, x_request_id, x_new_store_tenant, idempotency_key: nil, body: nil) ⇒ void
🚧 BETA: This endpoint is in beta and may change.
Methods inherited from BaseController
#initialize, #new_parameter, #new_request_builder, #new_response_handler, user_agent
Constructor Details
This class inherits a constructor from NewStoreApi::BaseController
Instance Method Details
#create_notification(event_name, x_request_id, x_new_store_tenant, idempotency_key: nil, body: nil) ⇒ void
This method returns an undefined value.
🚧 BETA: This endpoint is in beta and may change.here description here here here
See API Lifecycle Documentation for details.28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
# File 'lib/new_store_api/controllers/notifications_controller.rb', line 28 def create_notification(event_name, x_request_id, x_new_store_tenant, idempotency_key: nil, body: nil) @api_call .request(new_request_builder(HttpMethodEnum::POST, '/checkout/rtbf-notifications', Server::API) .header_param(new_parameter(event_name, key: 'Event-Name')) .header_param(new_parameter(x_request_id, key: 'X-Request-Id')) .header_param(new_parameter(x_new_store_tenant, key: 'X-NewStore-Tenant')) .header_param(new_parameter('application/json', key: 'Content-Type')) .header_param(new_parameter(idempotency_key, key: 'Idempotency-Key')) .body_param(new_parameter(body)) .body_serializer(proc do |param| param.to_json unless param.nil? end) .auth(Single.new('oauth'))) .response(new_response_handler .is_response_void(true)) .execute end