All URIs are relative to https://api.equinix.com/metal/v1
Method | HTTP request | Description |
---|---|---|
delete_payment_method | DELETE /payment-methods/{id} | Delete the payment method |
find_payment_method_by_id | GET /payment-methods/{id} | Retrieve a payment method |
update_payment_method | PUT /payment-methods/{id} | Update the payment method |
delete_payment_method(id)
Delete the payment method
Deletes the payment method.
- Api Key Authentication (x_auth_token):
import equinix_metal
from equinix_metal.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.equinix.com/metal/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = equinix_metal.Configuration(
host = "https://api.equinix.com/metal/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: x_auth_token
configuration.api_key['x_auth_token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x_auth_token'] = 'Bearer'
# Enter a context with an instance of the API client
with equinix_metal.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = equinix_metal.PaymentMethodsApi(api_client)
id = 'id_example' # str | Payment Method UUID
try:
# Delete the payment method
api_instance.delete_payment_method(id)
except Exception as e:
print("Exception when calling PaymentMethodsApi->delete_payment_method: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | Payment Method UUID |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | no content | - |
401 | unauthorized | - |
404 | not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PaymentMethod find_payment_method_by_id(id, include=include)
Retrieve a payment method
Returns a payment method
- Api Key Authentication (x_auth_token):
import equinix_metal
from equinix_metal.models.payment_method import PaymentMethod
from equinix_metal.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.equinix.com/metal/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = equinix_metal.Configuration(
host = "https://api.equinix.com/metal/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: x_auth_token
configuration.api_key['x_auth_token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x_auth_token'] = 'Bearer'
# Enter a context with an instance of the API client
with equinix_metal.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = equinix_metal.PaymentMethodsApi(api_client)
id = 'id_example' # str | Payment Method UUID
include = ['include_example'] # List[str] | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional)
try:
# Retrieve a payment method
api_response = api_instance.find_payment_method_by_id(id, include=include)
print("The response of PaymentMethodsApi->find_payment_method_by_id:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PaymentMethodsApi->find_payment_method_by_id: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | Payment Method UUID | |
include | List[str] | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | ok | - |
401 | unauthorized | - |
404 | not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PaymentMethod update_payment_method(id, payment_method_update_input, include=include)
Update the payment method
Updates the payment method.
- Api Key Authentication (x_auth_token):
import equinix_metal
from equinix_metal.models.payment_method import PaymentMethod
from equinix_metal.models.payment_method_update_input import PaymentMethodUpdateInput
from equinix_metal.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.equinix.com/metal/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = equinix_metal.Configuration(
host = "https://api.equinix.com/metal/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: x_auth_token
configuration.api_key['x_auth_token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x_auth_token'] = 'Bearer'
# Enter a context with an instance of the API client
with equinix_metal.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = equinix_metal.PaymentMethodsApi(api_client)
id = 'id_example' # str | Payment Method UUID
payment_method_update_input = equinix_metal.PaymentMethodUpdateInput() # PaymentMethodUpdateInput | Payment Method to update
include = ['include_example'] # List[str] | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional)
try:
# Update the payment method
api_response = api_instance.update_payment_method(id, payment_method_update_input, include=include)
print("The response of PaymentMethodsApi->update_payment_method:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PaymentMethodsApi->update_payment_method: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | Payment Method UUID | |
payment_method_update_input | PaymentMethodUpdateInput | Payment Method to update | |
include | List[str] | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | ok | - |
401 | unauthorized | - |
404 | not found | - |
422 | unprocessable entity | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]