require 'fastly'
api_instance = Fastly::ContactApi.newNote
All URIs are relative to https://api.fastly.com
| Method | HTTP request | Description |
|---|---|---|
| create_contacts | POST /customer/{customer_id}/contacts | Add a new customer contact |
| delete_contact | DELETE /customer/{customer_id}/contacts/{contact_id} | Delete a contact |
| list_contacts | GET /customer/{customer_id}/contacts | List contacts |
create_contacts(opts): <ContactResponse> # Add a new customer contactCreate a contact.
api_instance = Fastly::ContactApi.new
opts = {
customer_id: 'customer_id_example', # String | Alphanumeric string identifying the customer.
user_id: 'user_id_example', # String | The alphanumeric string representing the user for this customer contact.
contact_type: 'primary', # String | The type of contact.
name: 'name_example', # String | The name of this contact, when user_id is not provided.
email: 'email_example', # String | The email of this contact, when a user_id is not provided.
phone: 'phone_example', # String | The phone number for this contact. Required for primary, technical, and security contact types.
customer_id: 'customer_id_example', # String | The alphanumeric string representing the customer for this customer contact.
}
begin
# Add a new customer contact
result = api_instance.create_contacts(opts)
p result
rescue Fastly::ApiError => e
puts "Error when calling ContactApi->create_contacts: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| customer_id | String | Alphanumeric string identifying the customer. | |
| user_id | String | The alphanumeric string representing the user for this customer contact. | [optional] |
| contact_type | String | The type of contact. | [optional] |
| name | String | The name of this contact, when user_id is not provided. | [optional] |
| String | The email of this contact, when a user_id is not provided. | [optional] | |
| phone | String | The phone number for this contact. Required for primary, technical, and security contact types. | [optional] |
| customer_id | String | The alphanumeric string representing the customer for this customer contact. | [optional] |
[Back to top] [Back to API list] [Back to README]
delete_contact(opts): <InlineResponse200> # Delete a contactDelete a contact.
api_instance = Fastly::ContactApi.new
opts = {
customer_id: 'customer_id_example', # String | Alphanumeric string identifying the customer.
contact_id: 'contact_id_example', # String | An alphanumeric string identifying the customer contact.
}
begin
# Delete a contact
result = api_instance.delete_contact(opts)
p result
rescue Fastly::ApiError => e
puts "Error when calling ContactApi->delete_contact: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| customer_id | String | Alphanumeric string identifying the customer. | |
| contact_id | String | An alphanumeric string identifying the customer contact. |
[Back to top] [Back to API list] [Back to README]
list_contacts(opts): <Array<SchemasContactResponse>> # List contactsList all contacts from a specified customer ID.
api_instance = Fastly::ContactApi.new
opts = {
customer_id: 'customer_id_example', # String | Alphanumeric string identifying the customer.
}
begin
# List contacts
result = api_instance.list_contacts(opts)
p result
rescue Fastly::ApiError => e
puts "Error when calling ContactApi->list_contacts: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| customer_id | String | Alphanumeric string identifying the customer. |