Skip to content

Instantly share code, notes, and snippets.

View richiejd's full-sized avatar

Richie Davis richiejd

  • Citadel LLC
  • New York, NY
View GitHub Profile
@richiejd
richiejd / product.json
Created February 5, 2016 18:40
Products Payload
{
"_links": {
"self": {
"href": "/products/20953"
}
},
"box_feature_image": {
"height": 528,
"url": "https://www.birchbox.com/shop/media/catalog/product/cache/1/small_image/640x/9df78eab33525d08d6e5fb8d27136e95/p/e/peripera_peristinthouse_red_set_900x900_1.jpg",
"width": 640
@richiejd
richiejd / gist:3195f58d08a0d589073a
Created March 30, 2015 20:11
Tryin man, I'm tryin

controller

# hits https://github.com/birchbox/birchbox/blob/1d9dd77c1a060de8efdcd04ffd730e04a885e0ed/shop/app/code/local/Birchbox/Reward/controllers/BoxController.php#L10
  def share_box
    response = current_user.box_history.find(params[:box_id]).share_box(current_user.session_id)

    if response["success"]
      respond_with current_user.decorate
    else
 render :json => { :errors => response["message"] }, :status => response["status_code"]
@richiejd
richiejd / gist:ac0854a7423c62a02629
Last active August 29, 2015 14:17
Test 6 export

set the import file to be BBOX-5087_t6_import.csv

subscription_id,box_product_id,shipping_method_code,country_code
973666,13274,SP,US
934390,13225,SP,US
1266647,13252,SP,US

where 973666 has two gws, 934390 has one gws and 1266647 has one bbp