PeacemakerWeb.AdminController (Peacemaker v3.3.5-rc.7) View Source

Link to this section Summary

Link to this section Functions

Link to this function

change_account_password(conn, map)

View Source
Link to this function

change_maropost_tags(conn, params)

View Source
Link to this function

clear_subscription_inactive_reason(conn, map)

View Source
Link to this function

create_new_purchasable_class(conn, map)

View Source

Provides support for ForestAdmin to create new classes available for purchase.

This is primarily used for the process of turning a Live-Class into a new On-Demand class that customers are able to purchase.

To ensure that we're working with the freshest sets of data, we perform the following:

  1. Create a new product in Sticky (via Prismic.sync_class)

  2. Ensure that ALL products in Sticky.io are synced with the WealthFit Database. Any products that are deleted through Sticky's dashboard should also be deleted. (via Peacemaker.Product.sync_products)

  3. With the new Product created in Sticky and synced to the WealthFit database, we can then cleanly add the new product to the existing Sticky offer. Perform those syncing prior to updating the Offers is crucial in catching the case where we manually remove a product from the offer's list via Sticky.io's dashboard. Sticky's API requires the end-state of products to be attached to the offer(as opposed to appending them). This makes updating offers through the API a bit cumbersome because we need to ensure that we know exactly which products we want to be set as the offer when we submit the request.

  4. We make a call to Sticky to get a list of all products attached to the Tripwire Offer Id (the primary offer containing all our single-class purchases), and compare them with all Tripwire Products in the WealthFit database to produce the final list of products we want to set into the offer.

Tripwire products are currently determined where their sku contains "TW-INV"
Link to this function

get_all_courses(conn, params)

View Source
Link to this function

get_all_maropost_tags(conn, params)

View Source
Link to this function

get_maropost_tags(conn, params)

View Source
Link to this function

get_phone_from_sticky_customer(customer_id, arg2)

View Source
Link to this function

get_phone_from_sticky_prospect(prospect_id)

View Source
Link to this function

get_plan_attributes(conn, map)

View Source
Link to this function

get_sticky_prospect_id_from_email(email, retry \\ 0)

View Source
Link to this function

parse_mixpanel_profile_url(tracking_id)

View Source
Link to this function

parse_sticky_order_history_url(customer_id)

View Source
Link to this function

refresh_gotowebinar_token(conn, params)

View Source
Link to this function

refresh_zoom_token(conn, params)

View Source
Link to this function

set_account_expire_date(conn, map)

View Source
Link to this function

sync_all_classes(conn, params)

View Source
Link to this function

sync_attributes(conn, map)

View Source
Link to this function

sync_course(conn, params)

View Source
Link to this function

sync_intensives(conn, params)

View Source
Link to this function

sync_live_classes(conn, params)

View Source
Link to this function

sync_order_csv(conn, params)

View Source
Link to this function

sync_webinars(conn, params)

View Source
Link to this function

transform_csv(conn, map)

View Source