'
Show / Hide Table of Contents

Class AddressController

The Address Controller is a controller that allows address data to be retrieved and updated within the Ayuda Platform.

Namespace: Ayuda.BMS.Splash.Areas.Pi.Controllers
Remarks

This web service can be accessed using an address similar to the following: https://[AYUDA DEPLOYMENT URL]/Juice/Pi/Address

Methods

Create(AddressModel)

Creates a new address.

Declaration
public JsonResult Create(AddressModel model)
Parameters
Type Name Description
AddressModel model

Model of the address () to be created.

Returns
Type Description
System.Web.Mvc.JsonResult

The ID associated with the new address if successfully created.

CreateAdvertiserAddress(Guid, Guid, Boolean)

Creates a link between an advertiser and an address in form of .

Declaration
public JsonResult CreateAdvertiserAddress(Guid advertiserID, Guid addressID, bool IsPrimary)
Parameters
Type Name Description
System.Guid advertiserID

Guid: Advertiser ID.

System.Guid addressID

Guid: Address ID.

System.Boolean IsPrimary

Boolean: Is the address a primary address.

Returns
Type Description
System.Web.Mvc.JsonResult

The newly created .

CreateAgencyAddress(Guid, Guid, Boolean)

Creates a link between an agency and an address in form of

Declaration
public JsonResult CreateAgencyAddress(Guid agencyID, Guid addressID, bool IsPrimary)
Parameters
Type Name Description
System.Guid agencyID

Guid: Agency ID.

System.Guid addressID

Guid: Address ID.

System.Boolean IsPrimary

Boolean: Is the address a primary address.

Returns
Type Description
System.Web.Mvc.JsonResult

The newly created .

CreateContactAddress(Guid, Guid, Boolean)

Creates a link between a contact and an address in form of

Declaration
public JsonResult CreateContactAddress(Guid contactID, Guid addressID, bool IsPrimary)
Parameters
Type Name Description
System.Guid contactID

Guid: Contact ID.

System.Guid addressID

Guid: Address ID.

System.Boolean IsPrimary

Boolean: Is the address a primary address.

Returns
Type Description
System.Web.Mvc.JsonResult

The newly created .

CreateSiteAddress(Guid, Guid, Boolean)

Creates a link between a site and an address in form of .

Declaration
public JsonResult CreateSiteAddress(Guid siteID, Guid addressID, bool IsPrimary)
Parameters
Type Name Description
System.Guid siteID

Guid: Site ID.

System.Guid addressID

Guid: Address ID.

System.Boolean IsPrimary

Boolean: Is the address a primary address.

Returns
Type Description
System.Web.Mvc.JsonResult

The newly created .

Delete(Guid)

Deletes a specific address.

Declaration
public JsonResult Delete(Guid id)
Parameters
Type Name Description
System.Guid id

id of the address.

Returns
Type Description
System.Web.Mvc.JsonResult

true If the deletion was successful.

DeleteAdvertiserAddress(Guid)

Deletes the specified advertiser address.

Declaration
public JsonResult DeleteAdvertiserAddress(Guid businessAddressID)
Parameters
Type Name Description
System.Guid businessAddressID

Guid: BusinessAddressID (from the ).

Returns
Type Description
System.Web.Mvc.JsonResult

true If the deletion was successful.

DeleteAgencyAddress(Guid)

Deletes the specified agency address.

Declaration
public JsonResult DeleteAgencyAddress(Guid businessAddressID)
Parameters
Type Name Description
System.Guid businessAddressID

Guid: BusinessAddressID (from the )

Returns
Type Description
System.Web.Mvc.JsonResult

true If the deletion was successful.

DeleteContactAddress(Guid)

Deletes the specified ContactAddress

Declaration
public JsonResult DeleteContactAddress(Guid contactAddressID)
Parameters
Type Name Description
System.Guid contactAddressID

Guid: ContactAddress ID

Returns
Type Description
System.Web.Mvc.JsonResult

true If the deletion was successful.

DeleteSiteAddress(Guid)

Deletes the specified SiteAddress

Declaration
public JsonResult DeleteSiteAddress(Guid siteAddressID)
Parameters
Type Name Description
System.Guid siteAddressID

Guid: SiteAddress ID

Returns
Type Description
System.Web.Mvc.JsonResult

true If the deletion was successful.

GetAddress(Guid)

Returns a specific address.

Declaration
public JsonResult GetAddress(Guid id)
Parameters
Type Name Description
System.Guid id

id of the address.

Returns
Type Description
System.Web.Mvc.JsonResult

.

GetAdvertiserAddress(Guid)

Returns the address (or addresses) associated to the specified advertiser.

Declaration
public JsonResult GetAdvertiserAddress(Guid advertiserID)
Parameters
Type Name Description
System.Guid advertiserID

Guid: Advertiser ID.

Returns
Type Description
System.Web.Mvc.JsonResult

List of .

GetAgencyAddress(Guid)

Returns the address (or addresses) associated to the specified agency.

Declaration
public JsonResult GetAgencyAddress(Guid agencyID)
Parameters
Type Name Description
System.Guid agencyID

Guid: Agency ID.

Returns
Type Description
System.Web.Mvc.JsonResult

List of .

GetContactAddress(Guid)

Returns the address (or addresses) associated to the specified contact.

Declaration
public JsonResult GetContactAddress(Guid contactID)
Parameters
Type Name Description
System.Guid contactID

Guid: Contact ID.

Returns
Type Description
System.Web.Mvc.JsonResult

List of .

GetSiteAddress(Guid)

Returns the address (or addresses) associated to the specified site.

Declaration
public JsonResult GetSiteAddress(Guid siteID)
Parameters
Type Name Description
System.Guid siteID

Guid: Site ID.

Returns
Type Description
System.Web.Mvc.JsonResult

List of .

Update(Guid, String, String, String, String, Nullable<Guid>)

Update an address with the specified parameters.

Declaration
public JsonResult Update(Guid id, string address1, string address2, string city, string postalCode, Guid? stateID)
Parameters
Type Name Description
System.Guid id

Guid: ID of the address.

System.String address1

String: Address line 1 (Optional).

System.String address2

String: Address line 2 (Optional).

System.String city

String: City (Optional).

System.String postalCode

String: Postal code (Optional).

System.Nullable<System.Guid> stateID

Guid: State ID (Optional).

Returns
Type Description
System.Web.Mvc.JsonResult

true if the update was successful.

Back to top Generated by DocFX