The MyTradeMeMethods class contains the methods requried for making calls to the API related to My TradeMe.
예제 #1
0
        /// <summary>
        /// <para>Replies to feedback placed against a listing where the authenticated user was the seller. POST
        /// </para>
        /// REQUIRES AUTHENTICATION.
        /// </summary>
        /// <param name="request">FeedbackReplyRequest</param>
        /// <returns>XDocument: FeedbackResponse.</returns>
        public XDocument RespondToFeedback(FeedbackReplyRequest request)
        {
            if (_myTradeMe == null)
            {
                _myTradeMe = new MyTradeMeMethods(_connection);
            }

            return _myTradeMe.RespondToFeedback(request);
        }
예제 #2
0
        /// <summary>
        /// <para>Returns Pay Now ledger entries for a settlement into the authenticated user’s bank account.
        /// </para>
        /// REQUIRES AUTHENTICATION.
        /// </summary>
        /// <param name="batchId">The ID of the settlement. This can be retrieved from the Pay Now ledger API.</param>
        /// <returns>PayNowLedger.</returns>
        public PayNowLedger GetPayNowLedgerBySettlement(string batchId)
        {
            if (_myTradeMe == null)
            {
                _myTradeMe = new MyTradeMeMethods(_connection);
            }

            return _myTradeMe.GetPayNowLedgerBySettlement(batchId);
        }
예제 #3
0
        /// <summary>
        /// <para>Retrieves the Property Agent report for the authenticated user.
        /// </para>
        /// REQUIRES AUTHENTICATION.
        /// </summary>
        /// <returns>PropertyAgentReport</returns>
        public PropertyAgentReport GetPropertyAgentReport()
        {
            if (_myTradeMe == null)
            {
                _myTradeMe = new MyTradeMeMethods(_connection);
            }

            return _myTradeMe.GetPropertyAgentReport();
        }
예제 #4
0
        /// <summary>
        /// <para>Retrieves the authenticated user’s email preferences. GET
        /// </para>
        /// REQUIRES AUTHENTICATION.
        /// </summary>
        /// <returns>EmailOptions.</returns>
        public EmailOptions GetEmailPreferences()
        {
            if (_myTradeMe == null)
            {
                _myTradeMe = new MyTradeMeMethods(_connection);
            }

            return _myTradeMe.GetEmailPreferences();
        }
예제 #5
0
        /// <summary>
        /// <para>Retrieves a list of delivery addresses for the authenticated user. (GET)
        /// </para>
        /// REQUIRES AUTHENTICATION.
        /// </summary>
        /// <returns>Address.</returns>
        public Address GetListOfDeliveryAddresses()
        {
            if (_myTradeMe == null)
            {
                _myTradeMe = new MyTradeMeMethods(_connection);
            }

            return _myTradeMe.GetListOfDeliveryAddresses();
        }
예제 #6
0
        /// <summary>
        /// <para>Performs the My Trade Me Method:
        /// Deletes the status from a listing in the authenticated user’s Sold Items list. (DELETE).
        /// </para>
        /// REQUIRES AUTHENTICATION.
        /// </summary>
        /// <param name="purchaseId">The ID of the purchase to modify.</param>
        /// <returns>XDocument: StatusResponse.</returns>
        public XDocument DeleteListingStatus(string purchaseId)
        {
            if (_myTradeMe == null)
            {
                _myTradeMe = new MyTradeMeMethods(_connection);
            }

            return _myTradeMe.DeleteDeliveryAddress(purchaseId);
        }
예제 #7
0
        /// <summary>
        /// <para>Performs the My Trade Me Method:
        /// Retrieve a list of Fixed Price Offers.
        /// </para><para>
        /// Creates a query string and performs the request.
        /// </para>
        /// REQUIRES AUTHENTICATION.
        /// </summary>
        /// <returns>FixedPriceOffers.</returns>
        public FixedPriceOffers FixedPriceOffers()
        {
            if (_myTradeMe == null)
            {
                _myTradeMe = new MyTradeMeMethods(_connection);
            }

            return _myTradeMe.FixedPriceOffers();
        }
예제 #8
0
        /// <summary>
        /// <para>Performs the MyTradeMe method:
        /// Retrieve a list of items currently for sale.
        /// </para><para>
        /// Creates a query string using the parameters provided - parameters can be null if they are not required for the request.
        /// </para>
        /// REQUIRES AUTHENTICATION.
        /// </summary>
        /// <param name="criteria">The criteria.</param>
        /// <returns>Items.</returns>
        public Items SellingItemsWithCriteria(SellingItemsCriteria criteria)
        {
            if (_myTradeMe == null)
            {
                _myTradeMe = new MyTradeMeMethods(_connection);
            }

            return _myTradeMe.SellingItemsWithCriteria(criteria);
        }
예제 #9
0
        /// <summary>
        /// <para>Sets the authenticated user’s email preferences. POST
        /// </para>
        /// REQUIRES AUTHENTICATION.
        /// </summary>
        /// <param name="request">EmailOptions</param>
        /// <returns>XDocument: EmailOptions.</returns>
        public XDocument SetEmailPreferences(EmailOptions request)
        {
            if (_myTradeMe == null)
            {
                _myTradeMe = new MyTradeMeMethods(_connection);
            }

            return _myTradeMe.SetEmailPreferences(request);
        }
예제 #10
0
        /// <summary>
        /// <para>Performs the My Trade Me Method:
        /// Creates or updates the note on a listing. POST
        /// </para>
        /// REQUIRES AUTHENTICATION.
        /// </summary>
        /// <param name="request">SaveNoteRequest.</param>
        /// <returns>XDocument: NoteResponse.</returns>
        public XDocument AddNote(SaveNoteRequest request)
        {
            if (_myTradeMe == null)
            {
                _myTradeMe = new MyTradeMeMethods(_connection);
            }

            return _myTradeMe.AddNote(request);
        }
예제 #11
0
        /// <summary>
        /// <para>Performs the MyTradeMe method:
        /// Retrieve a list of items currently for sale
        /// </para><para>
        /// using the "query" string provided - should be the  "MyTradeMe/SellingItems/All.xml" part of the url.
        /// It shouldn't include "http://api.trademe.co.nz/v1/".
        /// </para>
        /// REQUIRES AUTHENTICATION.
        /// </summary>
        /// <param name="query">The query string that will be added to the base url and used to connect to the API.</param>
        /// <returns>SellingItems.</returns>
        public Items SellingItems(string query)
        {
            if (_myTradeMe == null)
            {
                _myTradeMe = new MyTradeMeMethods(_connection);
            }

            return _myTradeMe.SellingItems(query);
        }
예제 #12
0
        /// <summary>
        /// <para>Adds a member to the authenticated user’s blacklist. POST
        /// </para>
        /// REQUIRES AUTHENTICATION.
        /// </summary>
        /// <param name="request">BlacklistRequest</param>
        /// <returns>XDocument: BlacklistResponse.</returns>
        public XDocument AddMemberToBlackList(BlacklistRequest request)
        {
            if (_myTradeMe == null)
            {
                _myTradeMe = new MyTradeMeMethods(_connection);
            }

            return _myTradeMe.AddMemberToBlackList(request);
        }
예제 #13
0
        /// <summary>
        /// <para>Saves a status to a listing in the authenticated user’s Sold Items list. (POST)
        /// </para>
        /// REQUIRES AUTHENTICATION.
        /// </summary>
        /// <param name="purchaseId">The ID of the purchase.</param>
        /// <param name="stat">The status you want to save, should be one of the following: EmailSent, PaymentReceived, GoodsShipped, SaleCompleted.</param>
        /// <returns>StatusResponse.</returns>
        public StatusResponse SaveOrUpdateListingStatus(string purchaseId, string stat)
        {
            if (_myTradeMe == null)
            {
                _myTradeMe = new MyTradeMeMethods(_connection);
            }

            return _myTradeMe.SaveOrUpdateListingStatus(purchaseId, stat);
        }
예제 #14
0
        /// <summary>
        /// <para>Performs the My Trade Me Method:
        /// Adds a listing to the authenticated user’s watchlist 
        /// with the option to control when and if an email is sent to the member warning that the auction is closing soon.
        /// </para>
        /// REQUIRES AUTHENTICATION.
        /// </summary>
        /// <param name="request">SaveToWatchlistRequest.</param>
        /// <returns>XDocument: WatchListResponse.</returns>
        public XDocument SaveListingToWatchlist(SaveToWatchlistRequest request)
        {
            if (_myTradeMe == null)
            {
                _myTradeMe = new MyTradeMeMethods(_connection);
            }

            return _myTradeMe.SaveListingToWatchlist(request);
        }
예제 #15
0
        /// <summary>
        /// <para>Removes a delivery address from the authenticated user’s profile. (DELETE).
        /// </para>
        /// REQUIRES AUTHENTICATION.
        /// </summary>
        /// <param name="deliveryId">deliveryId</param>
        /// <returns>XDocument: StatusResponse.</returns>
        public XDocument DeleteDeliveryAddress(string deliveryId)
        {
            if (_myTradeMe == null)
            {
                _myTradeMe = new MyTradeMeMethods(_connection);
            }

            return _myTradeMe.DeleteDeliveryAddress(deliveryId);
        }
예제 #16
0
        /// <summary>
        /// <para>Performs the My Trade Me Method:
        /// Retrieve a list of unsold items
        /// </para><para>
        /// using the "query" string provided - should be the  "MyTradeMe/UnsoldItems.xml" part of the url
        /// it shouldn't include "http://api.trademe.co.nz/v1/".
        /// </para>
        /// REQUIRES AUTHENTICATION.
        /// </summary>
        /// <param name="query">The query string that will be added to the base url and used to connect to the API.</param>
        /// <returns>UnsoldItems.</returns>
        public UnsoldItems UnsoldItems(string query)
        {
            if (_myTradeMe == null)
            {
                _myTradeMe = new MyTradeMeMethods(_connection);
            }

            return _myTradeMe.UnsoldItems(query);
        }
예제 #17
0
        /// <summary>
        /// <para>Performs the My Trade Me Method:
        /// Save a listing to a member’s watchlist (DELETE).
        /// </para><para>
        /// Will remove the listing with the listingId provided from the members watchlist.
        /// Creates a query string using the listingId provided.
        /// </para>
        /// REQUIRES AUTHENTICATION.
        /// </summary>
        /// <param name="listingId">The id of the listing that will be removed from the watchlist.</param>
        /// <returns>XDocument.</returns>
        public XDocument DeleteListingFromWatchlist(string listingId)
        {
            if (_myTradeMe == null)
            {
                _myTradeMe = new MyTradeMeMethods(_connection);
            }

            return _myTradeMe.DeleteListingFromWatchlist(listingId);
        }
예제 #18
0
        /// <summary>
        /// <para>Modifies a delivery addresses in the authenticated user’s profile. POST
        /// </para>
        /// REQUIRES AUTHENTICATION.
        /// </summary>
        /// <param name="request">DeliveryAddress</param>
        /// <returns>XDocument: DeliveryAddressResponse.</returns>
        public XDocument UpdateDeliveryAddress(DeliveryAddress request)
        {
            if (_myTradeMe == null)
            {
                _myTradeMe = new MyTradeMeMethods(_connection);
            }

            return _myTradeMe.UpdateDeliveryAddress(request);
        }
예제 #19
0
        /// <summary>
        /// <para>Performs the My Trade Me Method:
        /// Removes the note from a listing. DELETE
        /// </para>
        /// REQUIRES AUTHENTICATION.
        /// </summary>
        /// <param name="listingId">The id of the listing that will be removed from the watchlist.</param>
        /// <param name="noteId">The ID of the note.</param>
        /// <param name="offerId">The ID of the offer the note is associated with. Should be 0 if the note is not associated with a fixed price offer.</param>
        /// <returns>XDocument: NoteResponse.</returns>
        public XDocument DeleteNote(string listingId, string noteId, string offerId)
        {
            if (_myTradeMe == null)
            {
                _myTradeMe = new MyTradeMeMethods(_connection);
            }

            return _myTradeMe.DeleteNote(listingId, noteId, offerId);
        }
예제 #20
0
        /// <summary>
        /// <para>Modifies feedback the authenticated user has posted against a listing. POST
        /// </para>
        /// REQUIRES AUTHENTICATION.
        /// </summary>
        /// <param name="request">FeedbackUpdateRequest</param>
        /// <returns>XDocument: FeedbackResponse.</returns>
        public XDocument UpdateFeedback(FeedbackUpdateRequest request)
        {
            if (_myTradeMe == null)
            {
                _myTradeMe = new MyTradeMeMethods(_connection);
            }

            return _myTradeMe.UpdateFeedback(request);
        }
예제 #21
0
        /// <summary>
        /// <para>Retrieves a list of all the members on the authenticated user’s blacklist. GET
        /// </para>
        /// REQUIRES AUTHENTICATION.
        /// </summary>
        /// <returns>Blacklist</returns>
        public Blacklist GetBlacklistedMembers()
        {
            if (_myTradeMe == null)
            {
                _myTradeMe = new MyTradeMeMethods(_connection);
            }

            return _myTradeMe.GetBlacklistedMembers();
        }
예제 #22
0
        /// <summary>
        /// <para>Performs the My Trade Me Method:
        /// Retrieve a member’s watchlist
        /// </para><para>using the "query" string provided - should be the  "MyTradeMe/Watchlist.xml part of the url.
        /// It shouldn't include "http://api.trademe.co.nz/v1/".
        /// </para>
        /// REQUIRES AUTHENTICATION.
        /// </summary>
        /// <param name="query">The query string that will be added to the base url and used to connect to the API.</param>
        /// <returns>Watchlist.</returns>
        public Watchlist Watchlist(string query)
        {
            if (_myTradeMe == null)
            {
                _myTradeMe = new MyTradeMeMethods(_connection);
            }

            return _myTradeMe.Watchlist(query);
        }
예제 #23
0
        /// <summary>
        /// <para>Retrieves information about fees for a single listing.
        /// </para>
        /// REQUIRES AUTHENTICATION.
        /// </summary>
        /// <param name="listingId">The ID of listing</param>
        /// <returns>SellingFee.</returns>
        public SellingFee GetLisingFees(string listingId)
        {
            if (_myTradeMe == null)
            {
                _myTradeMe = new MyTradeMeMethods(_connection);
            }

            return _myTradeMe.GetLisingFees(listingId);
        }
예제 #24
0
        /// <summary>
        /// <para>Performs the My Trade Me Method:
        /// Retrieve a member’s watchlist.
        /// </para><para>Creates a query string using the parameters provided - parameters can be null if they are not required for the request.
        /// </para>
        /// REQUIRES AUTHENTICATION.
        /// </summary>
        /// <param name="criteria">The criteria.</param>
        /// <param name="page">Page number.</param>
        /// <param name="rows">Number of rows per page.</param>
        /// <returns>Watchlist.</returns>
        public Watchlist Watchlist(WatchlistCriteria criteria, string page, string rows)
        {
            if (_myTradeMe == null)
            {
                _myTradeMe = new MyTradeMeMethods(_connection);
            }

            return _myTradeMe.Watchlist(criteria, page, rows);
        }
예제 #25
0
        /// <summary>
        /// <para>Retrieves the note for a listing, if there is one. GET
        /// </para>
        /// REQUIRES AUTHENTICATION.
        /// </summary>
        /// <param name="listingId">The ID of the listing to retrieve the note for.</param>
        /// <returns>NoteResponse.</returns>
        public NoteResponse GetNote(string listingId)
        {
            if (_myTradeMe == null)
            {
                _myTradeMe = new MyTradeMeMethods(_connection);
            }

            return _myTradeMe.GetNote(listingId);
        }
예제 #26
0
        /// <summary>
        /// <para>Performs the My Trade Me Method:
        /// Retrieve a list of won items
        /// </para><para>
        /// using the "query" string provided - should be the  "MyTradeMe/Won.xml" part of the url.
        /// It shouldn't include "http://api.trademe.co.nz/v1/". 
        /// </para>
        /// REQUIRES AUTHENTICATION.
        /// </summary>
        /// <param name="query">The query string that will be added to the base url and used to connect to the API.</param>
        /// <returns>WonItems.</returns>
        public WonItems WonItems(string query)
        {
            if (_myTradeMe == null)
            {
                _myTradeMe = new MyTradeMeMethods(_connection);
            }

            return _myTradeMe.WonItems(query);
        }
예제 #27
0
        /// <summary>
        /// <para>Retrieves a list of product codes and stock levels associated with the authenticated user’s active listings. 
        /// The results will return data from feeds and My Products.
        /// </para>
        /// REQUIRES AUTHENTICATION.
        /// </summary>
        /// <returns>ProductMappings.</returns>
        public ProductMappings GetProductMappings()
        {
            if (_myTradeMe == null)
            {
                _myTradeMe = new MyTradeMeMethods(_connection);
            }

            return _myTradeMe.GetProductMappings();
        }
예제 #28
0
        /// <summary>
        /// <para>Performs the My Trade Me Method:
        /// Retrieve a list of won items.
        /// </para><para>
        /// Creates a query string using the parameters provided - parameters can be null if they are not required for the request.
        /// </para>
        /// REQUIRES AUTHENTICATION.
        /// </summary>
        /// <param name="criteria">The criteria.</param>
        /// <param name="page">Page number.</param>
        /// <param name="rows">Number of rows per page.</param>
        /// <returns>WonItems.</returns>
        public WonItems WonItems(WonItemsCriteria criteria, string page, string rows)
        {
            if (_myTradeMe == null)
            {
                _myTradeMe = new MyTradeMeMethods(_connection);
            }

            return _myTradeMe.WonItems(criteria, page, rows);
        }
예제 #29
0
        /// <summary>
        /// <para>Retrieve sales statistics for the authenticated user.
        /// </para>
        /// REQUIRES AUTHENTICATION.
        /// </summary>
        /// <returns>WeeklySales</returns>
        public WeeklySales GetWeeklySalesStats()
        {
            if (_myTradeMe == null)
            {
                _myTradeMe = new MyTradeMeMethods(_connection);
            }

            return _myTradeMe.GetWeeklySalesStats();
        }
예제 #30
0
        /// <summary>
        /// <para>Removes a member from the authenticated user’s blacklist. DELETE
        /// </para>
        /// REQUIRES AUTHENTICATION.
        /// </summary>
        /// <param name="memberId">memberId</param>
        /// <returns>XDocument: BlacklistResponse.</returns>
        public XDocument RemoveMemberFromBlacklist(string memberId)
        {
            if (_myTradeMe == null)
            {
                _myTradeMe = new MyTradeMeMethods(_connection);
            }

            return _myTradeMe.RemoveMemberFromBlacklist(memberId);
        }