Class: MetronomeSDK::Resources::V1::Settings::BillingProviders

Inherits:
Object
  • Object
show all
Defined in:
lib/metronome_sdk/resources/v1/settings/billing_providers.rb

Overview

Use these endpoints to configure a billing API key, a webhook secret, or invoice finalization behavior.

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ BillingProviders

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 BillingProviders.

Parameters:



70
71
72
# File 'lib/metronome_sdk/resources/v1/settings/billing_providers.rb', line 70

def initialize(client:)
  @client = client
end

Instance Method Details

#create(billing_provider:, configuration:, delivery_method:, request_options: {}) ⇒ MetronomeSDK::Models::V1::Settings::BillingProviderCreateResponse

Some parameter documentations has been truncated, see Models::V1::Settings::BillingProviderCreateParams for more details.

Set up account-level configuration for a billing provider. Once configured, individual contracts across customers can be mapped to this configuration using the returned delivery_method_id.

Parameters:

Returns:

See Also:



31
32
33
34
35
36
37
38
39
40
# File 'lib/metronome_sdk/resources/v1/settings/billing_providers.rb', line 31

def create(params)
  parsed, options = MetronomeSDK::V1::Settings::BillingProviderCreateParams.dump_request(params)
  @client.request(
    method: :post,
    path: "v1/setUpBillingProvider",
    body: parsed,
    model: MetronomeSDK::Models::V1::Settings::BillingProviderCreateResponse,
    options: options
  )
end

#list(next_page: nil, request_options: {}) ⇒ MetronomeSDK::Models::V1::Settings::BillingProviderListResponse

Lists all configured billing providers and their delivery method configurations for your account. Returns provider details, delivery method IDs, and configuration settings needed for mapping individual customer contracts to billing integrations.

Parameters:

  • next_page (String, nil)

    The cursor to the next page of results

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

Returns:

See Also:



56
57
58
59
60
61
62
63
64
65
# File 'lib/metronome_sdk/resources/v1/settings/billing_providers.rb', line 56

def list(params = {})
  parsed, options = MetronomeSDK::V1::Settings::BillingProviderListParams.dump_request(params)
  @client.request(
    method: :post,
    path: "v1/listConfiguredBillingProviders",
    body: parsed,
    model: MetronomeSDK::Models::V1::Settings::BillingProviderListResponse,
    options: options
  )
end