Skip to content

Latest commit

 

History

History
164 lines (115 loc) · 4.17 KB

BillingAddressApi.md

File metadata and controls

164 lines (115 loc) · 4.17 KB

Fastly.BillingAddressApi

const apiInstance = new Fastly.BillingAddressApi();

Methods

Note

All URIs are relative to https://api.fastly.com

Method HTTP request Description
addBillingAddr POST /customer/{customer_id}/billing_address Add a billing address to a customer
deleteBillingAddr DELETE /customer/{customer_id}/billing_address Delete a billing address
getBillingAddr GET /customer/{customer_id}/billing_address Get a billing address
updateBillingAddr PATCH /customer/{customer_id}/billing_address Update a billing address

addBillingAddr

addBillingAddr({ customer_id, [billing_address_request] })

Add a billing address to a customer.

Example

const options = {
  customer_id: "customer_id_example", // required
  billing_address_request: {"skip_verification":false,"data":{"type":"billing_address","attributes":{"address_1":"80719 Dorothea Mountain","address_2":"Apt. 652","city":"New Rasheedville","state":"DE","country":"US","postal_code":"53538-5902"}}},
};

apiInstance.addBillingAddr(options)
  .then((data) => {
    console.log(data, "API called successfully.");
  })
  .catch((error) => {
    console.error(error);
  });

Options

Name Type Description Notes
customer_id String Alphanumeric string identifying the customer.
billing_address_request BillingAddressRequest Billing address [optional]

Return type

BillingAddressResponse

deleteBillingAddr

deleteBillingAddr({ customer_id })

Delete a customer's billing address.

Example

const options = {
  customer_id: "customer_id_example", // required
};

apiInstance.deleteBillingAddr(options)
  .then(() => {
    console.log('API called successfully.');
  })
  .catch((error) => {
    console.error(error);
  });

Options

Name Type Description Notes
customer_id String Alphanumeric string identifying the customer.

Return type

null (empty response body)

getBillingAddr

getBillingAddr({ customer_id })

Get a customer's billing address.

Example

const options = {
  customer_id: "customer_id_example", // required
};

apiInstance.getBillingAddr(options)
  .then((data) => {
    console.log(data, "API called successfully.");
  })
  .catch((error) => {
    console.error(error);
  });

Options

Name Type Description Notes
customer_id String Alphanumeric string identifying the customer.

Return type

BillingAddressResponse

updateBillingAddr

updateBillingAddr({ customer_id, [update_billing_address_request] })

Update a customer's billing address. You may update only part of the customer's billing address.

Example

const options = {
  customer_id: "customer_id_example", // required
  update_billing_address_request: {"skip_verification":false,"data":{"type":"billing_address","id":"3DTWpamEUGISvrUiDWkesQ","attributes":{"state":"DE"}}},
};

apiInstance.updateBillingAddr(options)
  .then((data) => {
    console.log(data, "API called successfully.");
  })
  .catch((error) => {
    console.error(error);
  });

Options

Name Type Description Notes
customer_id String Alphanumeric string identifying the customer.
update_billing_address_request UpdateBillingAddressRequest One or more billing address attributes [optional]

Return type

BillingAddressResponse

[Back to top] [Back to API list] [Back to README]