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

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

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:



68
69
70
# File 'lib/metronome_sdk/resources/v1/settings/billing_providers.rb', line 68

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:



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

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:



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

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