Details

    • Type: New Feature
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: None
    • Fix Version/s: 1.5
    • Component/s: None
    • Labels:
      None

      Description

      Implement, test and document required APIs for the "Member" component classes. All APIs should follow our "new standards" (refer to the May 30 comment section here: http://issues.civicrm.org/jira/browse/CRM-983).

      MembershipType APIs
      ==================

      • create_membership_type
      • get_membership_types
      • update_membership_type
      • delete_membership_type

      MembershipStatus APIs
      ==================

      • create_membership_status
      • get_membership_statuses
      • update_membership_status
      • delete_membership_status

      Membership APIs
      ==============
      Membership APIs generally deal with one contact and (mostly) with one Membership record. Contact ID and MembershipType ID are passed as input params (we don't pass objects as input params).

      • create_contact_membership : Requires contact ID and membership type. Other input params are optional. Default start date = current date; default end date and status are calculated based on membership type and membership status rules.
      • get_contact_memberships: Requires contact ID, returns array of all memberships - including Membership properties. Also resolve and include the Membership Type "name" and Relationship Type "name".

      NOTE: We also need this API to return memberships for contacts that are members based on their relationship to a direct member. Example: If contact_individual cid=23 is a "Household Member" of a contact_household (cid=21) record which has a Membership record - AND the MembershipType of this Membership record has a populated relationship_type_id value of 7 (Household Member of) - then get_contact_memberships should return the Membership record for both cid 23 and for cid 21.

      • update_contact_membership
      • delete_membership
      • calc_membership_status: This API uses the "rules" encoded in the membership_status table to derive the MembershipStatus of a given Membership record. Requires Membership ID as input. Returns the MembershipStatus ID and Name. (This API will be used by the cron job that we implement to periodically update

      Contribution APIs
      ==============
      Extend create, get, update contribution APIs to handle the two additional Contribution properties:

      • pay_for_entity_table
      • pay_for_entity_id

        Attachments

          Activity

            People

            • Assignee:
              manish Manish Zope
              Reporter:
              dgg David Greenberg
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: