Archive

Posts Tagged ‘Tax’

SWS GetAuctionTax Method

May 13, 2011 Leave a comment

Returns the applicable tax of the amount for which the item was auctioned.

Parameters

Name DataType Required
SiteID Long Required
Description The site’s ID number. This can be found using the GetSiteList method.
Amount Decimal Required
Description The amount collected on the auctioned unit.

Returned Parameters

Name DataType
baseAmount Decimal
Description The amount collected on the auctioned unit.
taxAmount Decimal
Description The total of the taxes applicable to the baseAmount.

Example

As with every method we need to pass in credentials. We do this with the LookupUser request object.

We’ll assume you’ve got a web reference, let’s name it SWS, in your Visual Studio project.  At this point we need to our objects.  We’ll need the standard service object, a AuctionProceeds request object and a GetAuctionTax response object. We can define and create those like this:

// Create a request and response objects
SWS.WSSoapClient service = new SWS.WSSoapClient();
SWS.AuctionProceeds request = new SWS.AuctionProceeds();
SWS.GetAuctionTax_Response response;

Here’s my sample code of the Request object.

// GetAuctionTax Request
request.SiteID = 123456;
request.AuctionProceedsAmount = new decimal[] { 326m };

We can call the method and pass across the login object and the request object to return our auction tax amount. It’s a good idea to do this in a Try Catch block.

// Call the method that will load the response object
try
{
  response = service.GetAuctionTax(user_request, request);
}
catch (Exception ex)
{
  MessageBox.Show(ex.Message);
}

Note that if something goes wrong the service will respond with an exception. You’ll want to take a look at that message returned in that exception so it can be debugged.

For a full list of methods see SWS Methods.

Categories: API General, Auction, Tax Tags: ,

SWS UpdateRentalSettings Method

March 17, 2011 Leave a comment

Allows you to change the primary contact, secondary contact, tax exempt status, delinquency schedule, delinquency step and overlock status of the specified rental.

Parameters

Name DataType Is Required
DelExempt Boolean Optional
Description Sets the unit to exempt for the delinquency processing (“True”) or to be processed normally (“False”). Default is “False”.
DelScheduleID Long Optional
Description Changes the delinquency schedule that is assigned to the unit. You can get the ID, name and description using the GetDelinqSchedule method.
DelStep Integer Optional
Description Set the delinquency step number of the unit. This is the level of delinquency that applies to the unit’s delinquency status. This cannot be a negative number.
OverlockStatus OverlockStatus Optional
Description Sets the overlock status of the rental.
Available values:

  • NOT_OVERLOCKED
  • PENDING_OVERLOCK
  • OVERLOCKED
  • PENDING_LOCK_REMOVAL
PrimaryContact Long Optional
Description Assigns an existing contact as the primary rental contact to the rental via the contact ID.
PrimaryContactAddressID Long Optional
Description The address’s ID number for the address that should be assigned to the new primary contact. This is required if the PrimaryContact parameter is used.
PrimaryContactPhoneID Long Optional
Description The ID of the phone number you wish to add to the primary contact. This is required if the PrimaryContact parameter is used.
RentalId Long Required
Description The rental item’s ID number. This is returned when using the MakeReservation method or can be searched for using the SearchBy method.
SecondaryContact Long Optional
Description Assigns an existing contact as the secondary rental contact to the rental via the contact ID.
SecondaryContactAddressID Long Optional
Description The address’s ID number for the address that should be assigned to the secondary contact. This is required if the SecondaryContact parameter is used.
SecondaryContactPhoneID Long Optional
Description The ID of the phone number you wish to add to the secondary contact. This is required if the SecondaryContact parameter is used.
TaxExempt Boolean Optional
Description Indicates if the rental should not be charged taxes (“True”) of if taxes should apply normally (“False”). The default is “False”. This applies per rental so each rental that is tax exempt needs to be updated. This does not apply to retail that is handled separately.
TaxInfo String Optional
Description The tax id, if the rental should be tax exempt. This is required if you use the TaxExempt parameter.

Returned Parameters

Name DataType
AccountID Long
Description The account’s ID number.
DelExempt Boolean
Description Indicates that the unit is set to be exempt from delinquency processing (“True”) or if it will process normally (“False”). The default is “False”.
DelSchedule Long
Description The delinquency schedule’s ID number.
DelStep Integer
Description The current step number within the delinquency schedule that applies to the unit’s delinquency status. This cannot be a negative number.
EndDate DateTime
Description The date the rental was terminated and the customer moved out.
LTD DateTime
Description The date that the customer has leased
MoveOutDate DateTime
Description The date the customer vacated the rental.
OverlockStatus OverlockStatus
Description The current overlock status of the rental.
Available values:

  • NOT_OVERLOCKED
  • PENDING_OVERLOCK
  • OVERLOCKED
  • PENDING_LOCK_REMOVAL
PrimaryContactUpdated Boolean
Description Indicates if the primary contact was updated successfully (“True”) or not (“False”).
PTD DateTime
Description The date through which the customer has paid on their rental.
RentalID Long
Description The rental item’s ID number.
SecondaryContactUpdated Boolean
Description Indicates if the secondary contact was updated successfully (“True”) or not (“False”).
StartDate DateTime
Description The date the customer first moved into the unit.
TaxExempt Boolean
Description Indicates that the unit is set to be exempt from taxes (“True”) or if it will be taxed normally (“False”). The default is “False”.
TaxExemptInfo String
Description The tax ID number if the rental is tax exempt.

Example

As with every method we need to pass in credentials. We do this with the LookupUser request object.

We will assume you have a web reference, let us name it SWS, in your Visual Studio project. At this point we need to define our objects.  We will need the standard service object, an UpdateRentalSettings request object, and an UpdateRentalSettings response object. We can define and create those like this:

' Create a request and response objects
SWS.WSSoapClient service = new SWS.WSSoapClient();
SWS.UpdateRentalSettings_Request request = new SWS.UpdateRentalSettings_Request();
SWS.UpdateRentalSettings_Response response;

Here is a sample code of the request object:

// UpdateRentalSettings Request
request.RentalId = 123546;
request.PrimaryContact = 123456;
request.PrimaryContactAddressID = 123456;
request.PrimaryContactPhoneID = 123456;

Finally we can call the method and pass across the login object and the request object to retrieve our requested information. It’s a good idea to do this in a Try Catch block.

// Call the method that will load the response object
try
{
  response = service.UpdateRentalSettings(user_request, request);
}
catch (Exception ex)
{
  MessageBox.Show(ex.Message);
}

Note that if something goes wrong the service will respond with an exception. You will want to capture the message in the exception so it can be debugged.

For a full list of methods see SWS Methods.