The MyTradeMeMethods class contains the methods requried for making calls to the API related to My TradeMe.
Esempio n. 1
0
        /// <summary>
        /// <para>Performs the Fixed Price Offer 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 FixedPriceOffersToMember()
        {
            if (_fixedPrice == null)
            {
                _fixedPrice = new FixedPriceOfferMethods(_connection);
            }

            return _fixedPrice.FixedPriceOffersToMember();
        }
Esempio n. 2
0
        // Fixed Price Offer Methods
        /// <summary>
        /// <para>Performs the Fixed Price Offer Method:
        /// Retrieve a list of Fixed Price Offers
        /// </para><para>
        /// using the "query" string provided - should be the  "MyTradeMe/FixedPriceOffers.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>FixedPriceOffers.</returns>
        public FixedPriceOffers FixedPriceOffers(string query)
        {
            if (_fixedPrice == null)
            {
                _fixedPrice = new FixedPriceOfferMethods(_connection);
            }

            return _fixedPrice.FixedPriceOffers(query);
        }
Esempio n. 3
0
        /// <summary>
        /// <para>Performs the Fixed Price Offer Method:
        /// Withdraws an offer that is current and not expired, accepted or rejected by all users. POST
        /// </para>
        /// REQUIRES AUTHENTICATION.
        /// </summary>
        /// <param name="request">The object that will be serialized into xml and then sent in a POST message.</param>
        /// <returns>XDocument: FixedPriceOfferResponse</returns>
        public XDocument WithdrawFixedPriceOffer(FixedPriceOfferWithdrawalRequest request)
        {
            if (_fixedPrice == null)
            {
                _fixedPrice = new FixedPriceOfferMethods(_connection);
            }

            return _fixedPrice.WithdrawFixedPriceOffer(request);
        }
Esempio n. 4
0
        /// <summary>
        /// <para>Performs the Fixed Price Offer method:
        /// Returns a list of members you can make a fixed price offer to for a particular auction. GET
        /// </para>
        /// REQUIRE AUTHENTICATION.
        /// </summary>
        /// <param name="listingId">The listing ID of the auction you wish to make a fixed price offer for. The listing must be closed.</param>
        /// <param name="filter">Filters the returned list to a subset of possible members 
        /// (“All”, “Bidders” – only return bidders, “Watchers” – only return watchers).</param>
        /// <returns>FixedPriceOfferMembersResponse</returns>
        public FixedPriceOfferMembersResponse RetrieveListOfMembersForFixedPriceOffer(string listingId, string filter)
        {
            if (_fixedPrice == null)
            {
                _fixedPrice = new FixedPriceOfferMethods(_connection);
            }

            return _fixedPrice.RetrieveListOfMembersForFixedPriceOffer(listingId, filter);
        }
Esempio n. 5
0
        /// <summary>
        /// <para>Performs the Fixed Price Offer Method:
        /// Accepts or rejects a fixed price offer. POST
        /// </para>
        /// REQUIRES AUTHENTICATION.
        /// </summary>
        /// <param name="request">The object that will be serialized into xml and then sent in a POST message.</param>
        /// <returns>XDocument: FixedPriceOfferResponse</returns>
        public XDocument RespondToFixedPriceOffer(FixedPriceOfferRequest request)
        {
            if (_fixedPrice == null)
            {
                _fixedPrice = new FixedPriceOfferMethods(_connection);
            }

            return _fixedPrice.RespondToFixedPriceOffer(request);
        }
Esempio n. 6
0
        /// <summary>
        /// <para>Performs the Fixed Price Offer Method:
        /// Makes a fixed price offer for an auction to the specified members. POST
        /// </para>
        /// REQUIRES AUTHENTICATION.
        /// </summary>
        /// <param name="request">The object that will be serialized into xml and then sent in a POST message.</param>
        /// <returns>XDocument: FixedPriceOfferResponse</returns>
        public XDocument MakeFixedPriceOffer(FixedPriceOfferToMembersRequest request)
        {
            if (_fixedPrice == null)
            {
                _fixedPrice = new FixedPriceOfferMethods(_connection);
            }

            return _fixedPrice.MakeFixedPriceOffer(request);
        }