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:



62
63
64
65
# File 'lib/stigg/resources/v1/events/data_export.rb', line 62

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, request_options: {}) ⇒ Stigg::Models::V1::Events::DataExportMintScopedTokenResponse

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

Parameters:

  • application_origin (String)

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

  • destination_type (String)

    Pin the token to a specific warehouse connect flow

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

Returns:

See Also:



25
26
27
28
29
30
31
32
33
34
# File 'lib/stigg/resources/v1/events/data_export.rb', line 25

def mint_scoped_token(params)
  parsed, options = Stigg::V1::Events::DataExportMintScopedTokenParams.dump_request(params)
  @client.request(
    method: :post,
    path: "api/v1/data-export/scoped-token",
    body: parsed,
    model: Stigg::Models::V1::Events::DataExportMintScopedTokenResponse,
    options: options
  )
end

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

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

Parameters:

  • destination_id (String)

    Provider destination ID to sync. Omit to sync all destinations.

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

Returns:

See Also:



48
49
50
51
52
53
54
55
56
57
# File 'lib/stigg/resources/v1/events/data_export.rb', line 48

def trigger_sync(params = {})
  parsed, options = Stigg::V1::Events::DataExportTriggerSyncParams.dump_request(params)
  @client.request(
    method: :post,
    path: "api/v1/data-export/sync",
    body: parsed,
    model: Stigg::Models::V1::Events::DataExportTriggerSyncResponse,
    options: options
  )
end