customer

package
v0.1.25 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 3, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessModule

type AccessModule struct {
	// An integer that indicates an access module's ID.
	ID int `json:"Id,omitempty"`

	// An string that indicates an access module's name.
	Name string `json:"Name,omitempty"`

	// An integer that indicates the parent ID of an access module.
	ParentID *int `json:"ParentId,omitempty"`
}

AccessModule represents data for privileges that may be enabled or disabled for a customer

type AddCustomerParams

type AddCustomerParams struct {
	Customer Customer
}

AddCustomerParams object contains the properties necessary to create a new Customer via the API.

func NewAddCustomerParams

func NewAddCustomerParams() AddCustomerParams

NewAddCustomerParams creates an object with the parameters necessary to provide to the AddCustomer function in order to create a Customer via the API.

type AddCustomerUserParams

type AddCustomerUserParams struct {
	Customer     CustomerGetOK
	CustomerUser CustomerUser
}

AddCustomerUserParams object contains the properties necessary to create a new Customer User via the API.

func NewAddCustomerUserParams

func NewAddCustomerUserParams() *AddCustomerUserParams

NewAddCustomerUserParams creates an object with the parameters necessary to provide to the AddCustomerUser function in order to create a Customer User via the API.

type Customer

type Customer struct {
	// A string that is reserved for future use.
	AccountID string `json:"AccountId,omitempty"`

	// A string identifying the street address for the customer.
	Address1 string `json:"Address1,omitempty"`

	// A string providing additional location information for the customer.
	// Typically, this parameter is used to define a suite number or an
	// apartment number.
	Address2 string `json:"Address2,omitempty"`

	// A string identifying the city associated with the customer's address.
	City string `json:"City,omitempty"`

	// A string identifying the state associated with the customer's address.
	// If the country associated with this account is "United States," then
	// valid values for this parameter are restricted to the two character
	// state abbreviations defined in the State/Province section in Appendix D.
	// of the Web Services REST API (Partner) document
	State string `json:"State,omitempty"`

	// A string identifying the ZIP code associated with a customers's address.
	ZIP string `json:"Zip,omitempty"`

	// A string identifying the country associated with the customers's
	// address. Valid values for this parameter must be an exact match to a
	// country defined in the Country section in Appendix D of the Web Services
	// REST API (Partner) document
	Country string `json:"Country,omitempty"`

	// A 64-bit integer that is reserved for future use.
	BandwidthUsageLimit int64 `json:"BandwidthUsageLimit,omitempty"`

	// A string that is reserved for future use.
	BillingAccountTag string `json:"BillingAccountTag,omitempty"`

	// A string identifying the billing address for the customer.
	BillingAddress1 string `json:"BillingAddress1,omitempty"`

	// A string providing additional location information for the billing
	// address associated with the customer. Typically, this parameter is
	// used to define a suite number or an apartment number.
	BillingAddress2 string `json:"BillingAddress2,omitempty"`

	// A string identifying the city associated with the customers's
	// billing address.
	BillingCity string `json:"BillingCity,omitempty"`

	// A string identifying the billing e-mail address associated with the
	// customer.
	BillingContactEmail string `json:"BillingContactEmail,omitempty"`

	// A string identifying the billing fax number associated with the
	// customer.
	BillingContactFax string `json:"BillingContactFax,omitempty"`

	// A string identifying the billing contact first name of the customer.
	BillingContactFirstName string `json:"BillingContactFirstName,omitempty"`

	// A string identifying the billing contact last name of the customer.
	BillingContactLastName string `json:"BillingContactLastName,omitempty"`

	// A string identifying the billing contact cell phone number of the
	// customer.
	BillingContactMobile string `json:"BillingContactMobile,omitempty"`

	// A string identifying the billing contact main phone number of the
	// customer.
	BillingContactPhone string `json:"BillingContactPhone,omitempty"`

	// A string identifying the billing contact title of the customer.
	BillingContactTitle string `json:"BillingContactTitle,omitempty"`

	// A string identifying the country associated with the customer's
	// billing address. Valid values for this parameter must be an exact match
	// to a country defined in the Country section in Appendix D of the Web
	// Services REST API (Partner) document
	BillingCountry string `json:"BillingCountry,omitempty"`

	// A string that is reserved for future use.
	BillingRateInfo string `json:"BillingRateInfo,omitempty"`

	// A string identifying the state associated with the customer's billing
	// address. If the country associated with this account is "United States,"
	// then valid values for this parameter are restricted to the two character
	// state abbreviations defined in the State/Province section in Appendix D
	// of the Web Services REST API (Partner) document
	BillingState string `json:"BillingState,omitempty"`

	// A string identifying the ZIP code associated with a customer's address.
	BillingZIP string `json:"BillingZip,omitempty"`

	// A string identifying the e-mail address associated with the customer.
	ContactEmail string `json:"ContactEmail,omitempty"`

	// A string identifying the fax number associated with the customer.
	ContactFax string `json:"ContactFax,omitempty"`

	// A string identifying the first name of the customer.
	ContactFirstName string `json:"ContactFirstName,omitempty"`

	// A string identifying the last name of the customer.
	ContactLastName string `json:"ContactLastName,omitempty"`

	// A string identifying the cell phone number of the customer.
	ContactMobile string `json:"ContactMobile,omitempty"`

	// A string identifying the main phone number of the customer.
	ContactPhone string `json:"ContactPhone,omitempty"`

	// A string identifying the title of the customer.
	ContactTitle string `json:"ContactTitle,omitempty"`

	// A string identifying the company name of the customer
	CompanyName string `json:"CompanyName,omitempty"`

	// A 64-bit integer that is reserved for future use.
	DataTransferredUsageLimit int64 `json:"DataTransferredUsageLimit,omitempty"`

	// A string that may contain any notes associated to the customer.
	Notes string `json:"Notes,omitempty"`

	// Required when providing a PCC token. An integer that contains the Partner
	// User ID associated with the PCC token provided.
	PartnerUserID int `json:"PartnerUserId,omitempty"`

	// A string that should always be set to "STND"
	ServiceLevelCode string `json:"ServiceLevelCode,omitempty"`

	// A string identifying the website for the customer
	Website string `json:"Website,omitempty"`

	// An integer that indicates whether the customer is active or inactive
	// 0: Indicates that the customer is inactive
	// 1: Indicates that the customer is active
	Status int `json:"Status,omitempty"`
}

Customer represents data for a Customer that is a child object of the associated Partner. Customers contain Customer Users that are used to login to my.edgecast.com (the MCC). For more information on user management, please review the Web Services REST API (Partner) document available at the below url: https://partner.edgecast.com/support/default.aspx

type CustomerGetOK

type CustomerGetOK struct {
	Customer
	// An integer that indicates a customer's ID.
	ID int32 `json:"Id,omitempty"` // read-only

	// A string that indicates the unique custom identifier assigned to a
	// customer. This value was assigned to the customer by your organization.
	CustomID string `json:"CustomId,omitempty"` // read-only

	// A string, also referred to as Account Number, that represents the
	// hexadecimal value of the ID
	HexID string `json:"HexId,omitempty"` // read-only

	// A string indicating the date and time (UTC) for the last time that the
	// usage limit was updated. Syntax: YYYY-MM-DD hh:mm:ssZ
	UsageLimitUpdateDate string `json:"UsageLimitUpdateDate,omitempty"` // read-only

	// An integer identifying the Partner associated with this Customer
	PartnerID int `json:"PartnerId,omitempty"` // read-only

	// A string representing the Partner name associated with this Customer
	PartnerName string `json:"PartnerName,omitempty"` // read-only

	// An integer identifying the Wholesaler associated with Partner that is
	// then associated with this Customer
	WholesaleID int `json:"WholesaleId,omitempty"` // read-only

	// A string representing the Wholsaler name associated with Partner that is
	// then associated with this Customer
	WholesaleName string `json:"WholesaleName,omitempty"` // read-only
}

CustomerGetOK is used specifically when retrieving a Customer and contains additional read-only properties.

type CustomerService

type CustomerService struct {
	// contains filtered or unexported fields
}

Customer service interacts with the EdgeCast API for Customer

func New

func New(config edgecast.SDKConfig) (*CustomerService, error)

New creates a new Customer service

func (*CustomerService) AddCustomer

func (svc *CustomerService) AddCustomer(
	params AddCustomerParams,
) (string, error)

AddCustomer creates a new Customer under the Partner associated with the API token used for this request.

func (*CustomerService) AddCustomerUser

func (svc *CustomerService) AddCustomerUser(
	params AddCustomerUserParams,
) (int, error)

AddCustomerUser creates a Customer User under the provided (parent) Customer

func (*CustomerService) DeleteCustomer

func (svc *CustomerService) DeleteCustomer(params DeleteCustomerParams) error

DeleteCustomer deletes the provided Customer

func (*CustomerService) DeleteCustomerUser

func (svc *CustomerService) DeleteCustomerUser(
	params DeleteCustomerUserParams,
) error

DeleteCustomerUser deletes a Customer User from the parent Customer account

func (*CustomerService) GetAvailableCustomerServices

func (svc *CustomerService) GetAvailableCustomerServices() (*[]Service, error)

GetAvailableCustomerServices retrieves all services available for a partner to enable on the customers they manage

func (*CustomerService) GetCustomer

func (svc *CustomerService) GetCustomer(
	params GetCustomerParams,
) (*CustomerGetOK, error)

GetCustomer retrieves a Customer's information for the provided Hex Account Number

func (*CustomerService) GetCustomerAccessModules

func (svc *CustomerService) GetCustomerAccessModules(
	params GetCustomerAccessModulesParams,
) (*[]AccessModule, error)

GetCustomerAccessModules retrieves a list of all access modules (features) that may be enabled or disabled for the provided customer

func (*CustomerService) GetCustomerDeliveryRegion

func (svc *CustomerService) GetCustomerDeliveryRegion(
	params GetCustomerDeliveryRegionParams,
) (*DeliveryRegion, error)

GetCustomerDeliveryRegion retrieves the current active delivery region for the provided customer

func (*CustomerService) GetCustomerDomainTypes

func (svc *CustomerService) GetCustomerDomainTypes() (*[]DomainType, error)

GetCustomerDomainTypes retrieves all available domain types

func (*CustomerService) GetCustomerServices

func (svc *CustomerService) GetCustomerServices(
	params GetCustomerServicesParams,
) (*[]Service, error)

GetCustomerServices gets the list of services available to the provided customer and whether each service is enabled or disabled.

func (*CustomerService) GetCustomerUser

func (svc *CustomerService) GetCustomerUser(
	params GetCustomerUserParams,
) (*CustomerUserGetOK, error)

GetCustomerUser retrieves a Customer User

func (*CustomerService) UpdateCustomer

func (svc *CustomerService) UpdateCustomer(params UpdateCustomerParams) error

UpdateCustomer updates a Customer's information

func (*CustomerService) UpdateCustomerAccessModule

func (svc *CustomerService) UpdateCustomerAccessModule(
	params UpdateCustomerAccessModuleParams,
) error

UpdateCustomerAccessModule enables or disables the provided access module (feature) for the provided customer

func (*CustomerService) UpdateCustomerDeliveryRegion

func (svc *CustomerService) UpdateCustomerDeliveryRegion(
	params UpdateCustomerDeliveryRegionParams,
) error

UpdateCustomerDeliveryRegion changes the delivery region for the provided customer

func (*CustomerService) UpdateCustomerDomainURL

func (svc *CustomerService) UpdateCustomerDomainURL(
	params UpdateCustomerDomainURLParams,
) error

UpdateCustomerDomainURL changes the domain associated with the customer CDN URLs

func (*CustomerService) UpdateCustomerServices

func (svc *CustomerService) UpdateCustomerServices(
	params UpdateCustomerServicesParams,
) error

UpdateCustomerServices enables or disables the provided services based on the status provided.

func (*CustomerService) UpdateCustomerUser

func (svc *CustomerService) UpdateCustomerUser(
	params UpdateCustomerUserParams,
) error

UpdateCustomerUser updates a Customer User

type CustomerUser

type CustomerUser struct {
	// A string identifying the street address for the user.
	Address1 string `json:"Address1,omitempty"`

	// A string providing additional location information for the user.
	// Typically, this parameter is used to define a suite number or an
	// apartment number.
	Address2 string `json:"Address2,omitempty"`

	// A string identifying the city associated with the user's address.
	City string `json:"City,omitempty"`

	// A string identifying the state associated with the user's address.
	// If the country associated with this account is "United States," then
	// valid values for this parameter are restricted to the two character
	// state abbreviations defined in the State/Province section in Appendix D.
	// of the Web Services REST API (Partner) document
	State string `json:"State,omitempty"`

	// A string identifying the ZIP code associated with a user's address.
	ZIP string `json:"Zip,omitempty"`

	// A string identifying the country associated with the user's address.
	// Valid values for this parameter must be an exact match to a country
	// defined in the Country section in Appendix D of the Web Services REST
	// API (Partner) document
	Country string `json:"Country,omitempty"`

	// A string identifying the cell phone number of the user.
	Mobile string `json:"Mobile,omitempty"`

	// A string identifying the main phone number of the user.
	Phone string `json:"Phone,omitempty"`

	// A string identifying the fax number associated with the user.
	Fax string `json:"Fax,omitempty"`

	// Required. A string identifying the e-mail address associated with the
	// user. The user will use this e-mail address to log in to the MCC.
	// The specified e-mail address must be unique.
	Email string `json:"Email,omitempty"`

	// A string identifying the title of the user.
	Title string `json:"Title,omitempty"`

	// Required. A string identifying the first name of the user.
	FirstName string `json:"FirstName,omitempty"`

	// Required. A string identifying the last name of the user.
	LastName string `json:"LastName,omitempty"`

	// Determines whether the user will be the administrator for that
	// customer's MCC account. An MCC administrator has complete access to all
	// MCC configuration pages that are available for that customer. Keep in
	// mind that there can only be a single administrator per customer account
	// and that user cannot be deleted. Valid values for this parameter are:
	// 0: Indicates that the user will not be an administrator.
	// This is the default value.
	// 1: Indicates that the user will be assigned the administrator role
	// for the specified customer account. It is important to note that the
	// first user to be assigned the administrator will become the permanent
	// administrator for that customer account.
	IsAdmin int8 `json:"IsAdmin,omitempty"`
}

CustomerUser represents data for a Customer User that is a child object of the associated Customer. Customer Users are used to login to my.edgecast.com (the MCC) and are associated with API tokens for legacy APIs and oath2 clients. For more information on user management, please review the Web Services REST API (Partner) document available at the below url: https://partner.edgecast.com/support/default.aspx

type CustomerUserGetOK

type CustomerUserGetOK struct {
	CustomerUser

	// A string indicating the date and time (UTC) for the last time that the
	// user logged into the MCC. Syntax: YYYY-MM-DD hh:mm:ssZ
	LastLoginDate string `json:"LastLoginDate,omitempty"` // read-only

	// An integer that indicates a user's ID.
	ID int `json:"Id,omitempty"` // read-only

	// A string that indicates the unique custom identifier assigned to a user.
	// This value was assigned to the user by your organization.
	CustomID string `json:"CustomId"` // read-only
}

CustomerUserGetOK is used specifically when retrieving a Customer User and contains additional read-only properties.

type DeleteCustomerParams

type DeleteCustomerParams struct {
	Customer CustomerGetOK
}

DeleteCustomerParams object contains the properties necessary to delete a Customer via the API.

func NewDeleteCustomerParams

func NewDeleteCustomerParams() *DeleteCustomerParams

NewDeleteCustomerParams creates an object with the parameters necessary to provide to the DeleteCustomer function in order to delete a Customer via the API.

type DeleteCustomerUserParams

type DeleteCustomerUserParams struct {
	Customer     CustomerGetOK
	CustomerUser CustomerUserGetOK
}

DeleteCustomerUserParams object contains the properties necessary to delete a Customer User via the API.

func NewDeleteCustomerUserParams

func NewDeleteCustomerUserParams() *DeleteCustomerUserParams

NewDeleteCustomerUserParams creates an object with the parameters necessary to provide to the DeleteCustomerUser function in order to delete a Customer User via the API.

type DeliveryRegion

type DeliveryRegion struct {
	AccountNumber    string `json:"AccountNumber,omitempty"`
	CustomID         string `json:"CustomId,omitempty"`
	DeliveryRegionID int    `json:"DeliveryRegionId,omitempty"`
}

type DomainType

type DomainType struct {
	// An integer that indicates the domain type's ID.
	Id int

	// A string identifying the domain type name.
	Name string
}

DomainType represents data for domain types available when updating a customer's URLs

type GetCustomerAccessModulesParams

type GetCustomerAccessModulesParams struct {
	Customer CustomerGetOK
}

GetCustomerAccessModulesParams object contains the properties necessary to retrieve a Customer's access modules via the API.

func NewGetCustomerAccessModulesParams

func NewGetCustomerAccessModulesParams() *GetCustomerAccessModulesParams

NewGetCustomerAccessModulesParams creates an object with the parameters necessary to provide to the GetCustomerAccessModules function in order to retrieve a customer's access modules via the API.

type GetCustomerDeliveryRegionParams

type GetCustomerDeliveryRegionParams struct {
	Customer CustomerGetOK
}

GetCustomerDeliveryRegionParams object contains the properties necessary to retrieve a Customer's available delivery regions via the API.

func NewGetCustomerDeliveryRegionParams

func NewGetCustomerDeliveryRegionParams() *GetCustomerDeliveryRegionParams

NewGetCustomerDeliveryRegionParams creates an object with the parameters necessary to provide to the GetCustomerDeliveryRegion function in order to retrieve available delivery regions for a Customer via the API.

type GetCustomerParams

type GetCustomerParams struct {
	AccountNumber string
}

GetCustomerParams object contains the properties necessary to retrieve a Customer via the API.

func NewGetCustomerParams

func NewGetCustomerParams() *GetCustomerParams

NewGetCustomerParams creates an object with the parameters necessary to provide to the GetCustomer function in order to retrieve a Customer via the API.

type GetCustomerServicesParams

type GetCustomerServicesParams struct {
	Customer CustomerGetOK
}

GetCustomerServicesParams object contains the properties necessary to retrieve a Customer's available services via the API.

func NewGetCustomerServicesParams

func NewGetCustomerServicesParams() *GetCustomerServicesParams

NewGetCustomerServicesParams creates an object with the parameters necessary to provide to the GetCustomerServices function in order to retrieve available services for a Customer via the API.

type GetCustomerUserParams

type GetCustomerUserParams struct {
	Customer       CustomerGetOK
	CustomerUserID int
}

GetCustomerUserParams object contains the properties necessary to retrieve a Customer User via the API.

func NewGetCustomerUserParams

func NewGetCustomerUserParams() *GetCustomerUserParams

NewGetCustomerUserParams creates an object with the parameters necessary to provide to the GetCustomerUser function in order to retrieve a Customer User via the API.

type Service

type Service struct {
	// An integer that indicates a services's ID.
	ID int `json:"Id,omitempty"`

	// A string identifying the name of the service.
	Name string `json:"Name,omitempty"`

	// An integer that represents a service's parent ID
	ParentID int `json:"ParentId,omitempty"`

	// An integer that indicates whether the service is active or inactive
	// 0: Indicates that the service is inactive
	// 1: Indicates that the service is active
	Status int8 `json:"Status,omitempty"`
}

Service represents data for services (features) available to be enabled or disabled for your Customer

type UpdateCustomerAccessModuleParams

type UpdateCustomerAccessModuleParams struct {
	Customer CustomerGetOK

	// A list of integers that indicate the AccessModule.ID values to enable or
	// disable
	AccessModuleIDs []int

	// An integer that indicates whether the service will be activated or
	// inactivated
	// 0: Indicates that the service is inactive
	// 1: Indicates that the service is active
	Status int
}

UpdateCustomerAccessModuleParams object contains the properties necessary to update a Customer's access modules enablement status via the API.

func NewUpdateCustomerAccessModuleParams

func NewUpdateCustomerAccessModuleParams() *UpdateCustomerAccessModuleParams

NewUpdateCustomerAccessModuleParams creates an object with the parameters necessary to provide to the UpdateCustomerAccessModule function in order to update a customer's access modules enablement status via the API.

type UpdateCustomerDeliveryRegionParams

type UpdateCustomerDeliveryRegionParams struct {
	Customer         CustomerGetOK
	DeliveryRegionID int
}

UpdateCustomerDeliveryRegionParams object contains the properties necessary to update a Customer's available delivery region via the API.

func NewUpdateCustomerDeliveryRegionParams

func NewUpdateCustomerDeliveryRegionParams() *UpdateCustomerDeliveryRegionParams

NewUpdateCustomerDeliveryRegionParams creates an object with the parameters necessary to provide to the UpdateCustomerDeliveryRegion function in order to update a delivery region for a Customer via the API.

type UpdateCustomerDomainURLParams

type UpdateCustomerDomainURLParams struct {
	Customer CustomerGetOK

	// An integer that indicates the DomainType.ID value.
	DomainType int

	// A string representing the Domain URL to update
	Url string
}

UpdateCustomerDomainURLParams object contains the properties necessary to update a Customer's URLs via the API.

func NewUpdateCustomerDomainURLParams

func NewUpdateCustomerDomainURLParams() *UpdateCustomerDomainURLParams

NewUpdateCustomerDomainURLParams creates an object with the parameters necessary to provide to the UpdateCustomerDomainURL function in order to update a customer's domain URL via the API.

type UpdateCustomerParams

type UpdateCustomerParams struct {
	Customer CustomerGetOK
}

UpdateCustomerParams object contains the properties necessary to update a Customer via the API.

func NewUpdateCustomerParams

func NewUpdateCustomerParams() *UpdateCustomerParams

NewUpdateCustomerParams creates an object with the parameters necessary to provide to the UpdateCustomer function in order to update a Customer via the API.

type UpdateCustomerServicesParams

type UpdateCustomerServicesParams struct {
	Customer CustomerGetOK
	// Array of integers representing Service.ID values to be enabled or disabled
	ServiceIDs []int

	// An integer that indicates whether the service will be activated or
	// inactivated
	// 0: Indicates that the service is inactive
	// 1: Indicates that the service is active
	Status int
}

UpdateCustomerServicesParams object contains the properties necessary to update a Customer's available services via the API.

func NewUpdateCustomerServicesParams

func NewUpdateCustomerServicesParams() *UpdateCustomerServicesParams

NewUpdateCustomerServicesParams creates an object with the parameters necessary to provide to the UpdateCustomerServices function in order to update available services for a Customer via the API.

type UpdateCustomerUserParams

type UpdateCustomerUserParams struct {
	Customer     CustomerGetOK
	CustomerUser CustomerUserGetOK
}

UpdateCustomerUserParams object contains the properties necessary to update a Customer User via the API.

func NewUpdateCustomerUserParams

func NewUpdateCustomerUserParams() *UpdateCustomerUserParams

NewUpdateCustomerUserParams creates an object with the parameters necessary to provide to the UpdateCustomerUser function in order to update a Customer User via the API.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL