PaymentMethodsOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

BillingManagementClient's

<xref:payment_methods> attribute.

Constructor

PaymentMethodsOperations(*args, **kwargs)

Methods

delete_by_user

Deletes a payment method owned by the caller.

get_by_billing_account

Gets a payment method available for a billing account. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement.

get_by_billing_profile

Gets a payment method linked with a billing profile. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement.

get_by_user

Gets a payment method owned by the caller.

list_by_billing_account

Lists the payment methods available for a billing account. Along with the payment methods owned by the caller, these payment methods can be attached to a billing profile to make payments. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement.

list_by_billing_profile

Lists payment methods attached to a billing profile. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement.

list_by_user

Lists the payment methods owned by the caller.

delete_by_user

Deletes a payment method owned by the caller.

delete_by_user(payment_method_name: str, **kwargs: Any) -> None

Parameters

Name Description
payment_method_name
Required
str

The ID that uniquely identifies a payment method. Required.

Returns

Type Description

None

Exceptions

Type Description

get_by_billing_account

Gets a payment method available for a billing account. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement.

get_by_billing_account(billing_account_name: str, payment_method_name: str, **kwargs: Any) -> PaymentMethod

Parameters

Name Description
billing_account_name
Required
str

The ID that uniquely identifies a billing account. Required.

payment_method_name
Required
str

The ID that uniquely identifies a payment method. Required.

Returns

Type Description

PaymentMethod. The PaymentMethod is compatible with MutableMapping

Exceptions

Type Description

get_by_billing_profile

Gets a payment method linked with a billing profile. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement.

get_by_billing_profile(billing_account_name: str, billing_profile_name: str, payment_method_name: str, **kwargs: Any) -> PaymentMethodLink

Parameters

Name Description
billing_account_name
Required
str

The ID that uniquely identifies a billing account. Required.

billing_profile_name
Required
str

The ID that uniquely identifies a billing profile. Required.

payment_method_name
Required
str

The ID that uniquely identifies a payment method. Required.

Returns

Type Description

PaymentMethodLink. The PaymentMethodLink is compatible with MutableMapping

Exceptions

Type Description

get_by_user

Gets a payment method owned by the caller.

get_by_user(payment_method_name: str, **kwargs: Any) -> PaymentMethod

Parameters

Name Description
payment_method_name
Required
str

The ID that uniquely identifies a payment method. Required.

Returns

Type Description

PaymentMethod. The PaymentMethod is compatible with MutableMapping

Exceptions

Type Description

list_by_billing_account

Lists the payment methods available for a billing account. Along with the payment methods owned by the caller, these payment methods can be attached to a billing profile to make payments. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement.

list_by_billing_account(billing_account_name: str, **kwargs: Any) -> ItemPaged[PaymentMethod]

Parameters

Name Description
billing_account_name
Required
str

The ID that uniquely identifies a billing account. Required.

Returns

Type Description

An iterator like instance of PaymentMethod

Exceptions

Type Description

list_by_billing_profile

Lists payment methods attached to a billing profile. The operation is supported only for billing accounts with agreement type Microsoft Customer Agreement.

list_by_billing_profile(billing_account_name: str, billing_profile_name: str, **kwargs: Any) -> ItemPaged[PaymentMethodLink]

Parameters

Name Description
billing_account_name
Required
str

The ID that uniquely identifies a billing account. Required.

billing_profile_name
Required
str

The ID that uniquely identifies a billing profile. Required.

Returns

Type Description

An iterator like instance of PaymentMethodLink

Exceptions

Type Description

list_by_user

Lists the payment methods owned by the caller.

list_by_user(**kwargs: Any) -> ItemPaged[PaymentMethod]

Returns

Type Description

An iterator like instance of PaymentMethod

Exceptions

Type Description