Esempio n. 1
0
func (a *NotificationContacts) List() ([]byte, error) {
	cs := cloudsigma.NewNotificationContacts()
	args := cs.NewList()
	args, err := cloud.setArgs(args)
	if err != nil {
		return nil, err
	}
	return cloud.sendRequest(args)
}
Esempio n. 2
0
func (a *NotificationContacts) Create(email string, name string, phone string) ([]byte, error) {
	o := []cloudsigma.ContactRequest{{Email: email, Name: name, Phone: phone}}
	cs := cloudsigma.NewNotificationContacts()
	args := cs.NewCreate(o)
	args, err := cloud.setArgs(args)
	if err != nil {
		e := errors.New(err.Error() + " Ensure phone number starts with a +.")
		return nil, e
	}
	return cloud.sendRequest(args)
}