Class: NewStoreApi::StripeWebhookNotificationsController

Inherits:
BaseController
  • Object
show all
Defined in:
lib/new_store_api/controllers/stripe_webhook_notifications_controller.rb

Overview

StripeWebhookNotificationsController

Constant Summary

Constants inherited from BaseController

BaseController::GLOBAL_ERRORS

Instance Attribute Summary

Attributes inherited from BaseController

#config, #http_call_back

Instance Method Summary collapse

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_stripe_event(platform_account, body, environment: 'test') ⇒ Object

🚧 BETA: This endpoint is in beta and may change.
See API Lifecycle Documentation for details.
description here

Parameters:

  • platform_account (String)

    Required parameter: TODO: type

  • body (Object)

    Required parameter: TODO: type description here

  • environment (String) (defaults to: 'test')

    Optional parameter: Example:test

Returns:

  • (Object)

    Response from the API call.



23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/new_store_api/controllers/stripe_webhook_notifications_controller.rb', line 23

def create_stripe_event(,
                        body,
                        environment: 'test')
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/payment/notifications/newstore/stripe/{platform_account}',
                                 Server::API)
               .template_param(new_parameter(, key: 'platform_account')
                                .should_encode(true))
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body))
               .query_param(new_parameter(environment, key: 'environment'))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(APIHelper.method(:json_serialize)))
    .response(new_response_handler
                .deserializer(APIHelper.method(:json_deserialize)))
    .execute
end