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

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

Defined Under Namespace

Classes: BillingProviders

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Settings

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

Parameters:



48
49
50
51
# File 'lib/metronome_sdk/resources/v1/settings.rb', line 48

def initialize(client:)
  @client = client
  @billing_providers = MetronomeSDK::Resources::V1::Settings::BillingProviders.new(client: client)
end

Instance Attribute Details

#billing_providersMetronomeSDK::Resources::V1::Settings::BillingProviders (readonly)



8
9
10
# File 'lib/metronome_sdk/resources/v1/settings.rb', line 8

def billing_providers
  @billing_providers
end

Instance Method Details

#upsert_avalara_credentials(avalara_environment: , avalara_password: , avalara_username: , delivery_method_ids: , request_options: {}) ⇒ MetronomeSDK::Models::V1::SettingUpsertAvalaraCredentialsResponse

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

Set the Avalara credentials for some specified ‘delivery_method_ids`, which can be found in the `/listConfiguredBillingProviders` response. This maps the Avalara credentials to the appropriate billing entity. These credentials are only used for PLG Invoicing today.

Parameters:

Returns:

See Also:



34
35
36
37
38
39
40
41
42
43
# File 'lib/metronome_sdk/resources/v1/settings.rb', line 34

def upsert_avalara_credentials(params)
  parsed, options = MetronomeSDK::V1::SettingUpsertAvalaraCredentialsParams.dump_request(params)
  @client.request(
    method: :post,
    path: "v1/upsertAvalaraCredentials",
    body: parsed,
    model: MetronomeSDK::Models::V1::SettingUpsertAvalaraCredentialsResponse,
    options: options
  )
end