コード例 #1
0
ファイル: GetCharitiesCall.cs プロジェクト: fudder/cs493
        /// <summary>
        /// Searches for nonprofit charity organizations that meet the
        /// criteria specified in the request.
        /// It is recommended that you use at least one input filter, because this call
        /// no longer returns all charities when made without filters.
        /// </summary>
        /// 
        /// <param name="CharityID">
        /// A unique identification number assigned by eBay to registered nonprofit
        /// charity organizations.
        /// </param>
        ///
        /// <param name="CharityName">
        /// A name assigned to a specified nonprofit
        /// organization. Accepts full charity nonprofit name
        /// or partial name as input. For example, enter a
        /// CharityName of "heart" (case-insensitive) to
        /// return all charity nonprofits that start with
        /// "heart." Use with a MatchType value of "Contains"
        /// to return all charity nonprofits that contain the
        /// string "heart."
        /// </param>
        ///
        /// <param name="Query">
        /// Accepts a case-insensitive string used to
        /// find a nonprofit charity organization. Default
        /// behavior is to search the CharityName field. Use
        /// with an IncludeDescription value of true to
        /// include the Mission field in the search.
        /// </param>
        ///
        /// <param name="CharityRegion">
        /// Region that the nonprofit charity organization is associated
        /// with. A specific nonprofit charity organization may be associated
        /// with only one region. Meaning of input values differs depending on
        /// the site. See GetCharities in the API Developer's Guide for the meaning
        /// of each input/output value. CharityRegion input value must be
        /// valid for that SiteID.
        /// </param>
        ///
        /// <param name="CharityDomain">
        /// Domain (mission area) that a nonprofit charity organization
        /// belongs to. Nonprofit charity organizations may belong to multiple
        /// mission areas. Meaning of input values differs depending on the
        /// site. See GetCharities in the API Developer's Guide for the meaning
        /// of each input/output value. CharityDomain input value must be valid for
        /// that SiteID.
        /// </param>
        ///
        /// <param name="IncludeDescription">
        /// Used with Query to search for charity nonprofit
        /// organizations. A value of true will search the Mission field as
        /// well as the CharityName field for a string specified in Query.
        /// </param>
        ///
        /// <param name="MatchType">
        /// Indicates the type of string matching to use when a value is submitted in
        /// CharityName. If no value is specified, default behavior is "StartsWith."
        /// Does not apply to Query.
        /// </param>
        ///
        /// <param name="Featured">
        /// Used to decide if the search is only for featured charities.
        /// A value of true will search for only featured charities.
        /// </param>
        ///
        public CharityInfoTypeCollection GetCharities(string CharityID, string CharityName, string Query, int CharityRegion, int CharityDomain, bool IncludeDescription, StringMatchCodeType MatchType, bool Featured)
        {
            this.CharityID = CharityID;
            this.CharityName = CharityName;
            this.Query = Query;
            this.CharityRegion = CharityRegion;
            this.CharityDomain = CharityDomain;
            this.IncludeDescription = IncludeDescription;
            this.MatchType = MatchType;
            this.Featured = Featured;

            Execute();
            return ApiResponse.Charity;
        }
コード例 #2
0
ファイル: GetCharitiesCall.cs プロジェクト: mccj/eBay.Service
        /// <summary>
        /// The <b>GetCharities</b> call is used to search for nonprofit organizations that are registered with the eBay for Charity program. This call allows users to search for a specific nonprofit organization, or to search for multiple nonprofit organizations from a particular category, and/or geographical region, or by using a search string.
        /// </summary>
        ///
        /// <param name="CharityID">
        /// A unique identification number assigned to a nonprofit
        /// organization when that organization registers with the PayPal Giving Fund. If a <b>CharityID</b> value is used in the request, all other search filters set in the call request will be ignored, as the call will only search for the specified nonprofit organization.
        /// </param>
        ///
        /// <param name="CharityName">
        /// This field will accept the full or partial name of a registered nonprofit organization. For example, if you pass in a value of <b>heart</b>, all registered nonprofit organizations with "heart" in their name may be returned in the response. If the <b>MatchType</b> field is used and set to <code>StartsWith</code>, the phrase "heart" must come at the beginning of the nonprofit organization's name. However, if the <b>MatchType</b> field is used and set to <code>Contains</code>, or is not used at all, all registered nonprofit organizations with "heart" in their name should be returned in the response. The string passed in this field is not case-sensitive.
        /// <br/><br/>
        /// </param>
        ///
        /// <param name="Query">
        /// This field accept any string up to 350 characters in length. The functionality of this field is similar to the <b>CharityName</b> field, except that the call will also search for the supplied query string within the charity's mission statement (which is returned under the <b>Charity.Mission</b> field in the response) as long as the <b>IncludeDescription</b> field is included in the call request and set to <code>true</code>. If you pass in a value of <b>heart</b>, all registered nonprofit organizations with "heart" in their name or in their mission statement may be returned in the response.
        /// <br/><br/>
        /// The string passed in this field is not case-sensitive. The <b>MatchType</b> field will have no effect if the <b>Query</b> field is used, as the <b>MatchType</b> field will only have an effect if a <b>CharityName</b> string field is included.
        /// <br/><br/>
        /// </param>
        ///
        /// <param name="CharityRegion">
        /// This field can be used to search for registered nonprofit organizations within a specified geographical region. Each geographical region will have an integer value associated with it. This integer value is what is passed in to this field.
        /// </param>
        ///
        /// <param name="CharityDomain">
        /// This field can be used to search for registered nonprofit organizations within a specified charity domain or category. Each charity domain will have an integer value associated with it. This integer value is what is passed in to this field. Nonprofit organizations can be associated with multiple charity domains.
        /// </param>
        ///
        /// <param name="IncludeDescription">
        /// This field should be included and set to <code>true</code> if the <b>Query</b> field is used, and the user wishes to search the charity's name and its mission statement. If this field is omitted or included and set to <code>false</code>, the call will only search charity names for the specified string in the  <b>Query</b> field.
        /// </param>
        ///
        /// <param name="MatchType">
        /// This filter is used if the user wants to specify where to look for the string specified in the <b>CharityName</b> field. The enumeration value input into this field controls the type of string matching to use when a value is submitted in the
        /// <b>CharityName</b> field. If this field is omitted, and a <b>CharityName</b> string is used, this parameter value defaults to <code>StartsWith</code>.
        /// <br/><br/>
        /// This field is no applicable when a <b>Query</b> value is used.
        /// <br/><br/>
        /// </param>
        ///
        /// <param name="Featured">
        /// This boolean field is used and set to <code>true</code> if the user wants to search for nonprofit organizations currently featured on the eBay for Charity site.
        /// </param>
        ///
        /// <param name="CampaignID">
        /// Reserved for future use.
        /// </param>
        ///
        public CharityInfoTypeCollection GetCharities(string CharityID, string CharityName, string Query, int CharityRegion, int CharityDomain, bool IncludeDescription, StringMatchCodeType MatchType, bool Featured, long CampaignID)
        {
            this.CharityID          = CharityID;
            this.CharityName        = CharityName;
            this.Query              = Query;
            this.CharityRegion      = CharityRegion;
            this.CharityDomain      = CharityDomain;
            this.IncludeDescription = IncludeDescription;
            this.MatchType          = MatchType;
            this.Featured           = Featured;
            this.CampaignID         = CampaignID;

            Execute();
            return(ApiResponse.Charity);
        }