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);
        }