Class: Stigg::Resources::V1::Events::DataExport

Inherits:
Object
  • Object
show all
Defined in:
lib/stigg/resources/v1/events/data_export.rb,
lib/stigg/resources/v1/events/data_export/destinations.rb

Defined Under Namespace

Classes: Destinations

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ DataExport

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of DataExport.

Parameters:



80
81
82
83
# File 'lib/stigg/resources/v1/events/data_export.rb', line 80

def initialize(client:)
  @client = client
  @destinations = Stigg::Resources::V1::Events::DataExport::Destinations.new(client: client)
end

Instance Attribute Details

#destinationsStigg::Resources::V1::Events::DataExport::Destinations (readonly)



9
10
11
# File 'lib/stigg/resources/v1/events/data_export.rb', line 9

def destinations
  @destinations
end

Instance Method Details

#mint_scoped_token(application_origin:, destination_type: nil, x_account_id: nil, x_environment_id: nil, request_options: {}) ⇒ Stigg::Models::V1::Events::DataExportMintScopedTokenResponse

Some parameter documentations has been truncated, see Models::V1::Events::DataExportMintScopedTokenParams for more details.

Mint a scoped JWT for the FE embedded SDK. Lazy-creates the DATA_EXPORT integration if needed.

Parameters:

  • application_origin (String)

    Body param: FE origin the resulting JWT is bound to (provider-side anti-fraud)

  • destination_type (String)

    Body param: Pin the token to a specific warehouse connect flow

  • x_account_id (String)

    Header param: Account ID — optional when authenticating with a user JWT (Bearer

  • x_environment_id (String)

    Header param: Environment ID — required when authenticating with a user JWT (Bea

  • request_options (Stigg::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/stigg/resources/v1/events/data_export.rb', line 32

def mint_scoped_token(params)
  parsed, options = Stigg::V1::Events::DataExportMintScopedTokenParams.dump_request(params)
  header_params = {x_account_id: "x-account-id", x_environment_id: "x-environment-id"}
  @client.request(
    method: :post,
    path: "api/v1/data-export/scoped-token",
    headers: parsed.slice(*header_params.keys).transform_keys(header_params),
    body: parsed.except(*header_params.keys),
    model: Stigg::Models::V1::Events::DataExportMintScopedTokenResponse,
    options: options
  )
end

#trigger_sync(destination_id: nil, x_account_id: nil, x_environment_id: nil, request_options: {}) ⇒ Stigg::Models::V1::Events::DataExportTriggerSyncResponse

Some parameter documentations has been truncated, see Models::V1::Events::DataExportTriggerSyncParams for more details.

Trigger a sync for one destination or all destinations under the provider entity.

Parameters:

  • destination_id (String)

    Body param: Provider destination ID to sync. Omit to sync all destinations.

  • x_account_id (String)

    Header param: Account ID — optional when authenticating with a user JWT (Bearer

  • x_environment_id (String)

    Header param: Environment ID — required when authenticating with a user JWT (Bea

  • request_options (Stigg::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



64
65
66
67
68
69
70
71
72
73
74
75
# File 'lib/stigg/resources/v1/events/data_export.rb', line 64

def trigger_sync(params = {})
  parsed, options = Stigg::V1::Events::DataExportTriggerSyncParams.dump_request(params)
  header_params = {x_account_id: "x-account-id", x_environment_id: "x-environment-id"}
  @client.request(
    method: :post,
    path: "api/v1/data-export/sync",
    headers: parsed.slice(*header_params.keys).transform_keys(header_params),
    body: parsed.except(*header_params.keys),
    model: Stigg::Models::V1::Events::DataExportTriggerSyncResponse,
    options: options
  )
end