Cart - danopia/deviantart-difi GitHub Wiki

emptyCart

Usage

Used to empty shopping cart on dA.

Params

  • checkout_type: ???

Response

Unknown, need to check

addCoupon

Usage

Adds a coupon for discount

Params

  • checkout_type: ???
  • promo_code: string

Response

Unknown, need to check

changeSub

Usage

Changing sub?

Params

More research needed

  • checkout_type: number (old sub type?)
  • fromVal: number (itemId)
  • toVal: number (i.e. 22869)
  • rebill_old: number (0 off |1 on)
  • rebill_new: number (0 off |1 on)
  • user_id (or 0?) : number

getCart

Usage

Retrieving cart contents

Params

  • checkout_type

Response

Cart details including if promo code used.

getCartWithoutRebalance

Usage

Retrieving cart contents, difference to getCart unknown

Params

  • checkout_type

Response

Cart details including if promo code used.

cartQuantities

Usage

  • Update quantities of item in cart
  • Removing an item from cart

Params

  • checkout_type: number (e.g. "1")
  • quantity: number (e.g. "5" for five items, "0" to remove the item)
  • product_id: number (e.g. "89927439")
  • frame_id: Unknown as to what this is
  • for_userid: number ("0" if for yourself)

removeAddress

Usage

Remove address either shipping or billing

Params

  • address_id: number

addAddress

Usage

Add address either shipping or billing

Params

  • FirstName: string
  • LastName: string
  • Address1: string
  • Address2: string
  • Address3: string
  • City: string
  • State: string
  • Zip: number
  • Country: string
  • Phone: number?
  • type_id: number (2 = ship, 3 = bill)

removeAddress

Usage

Remove address either shipping or billing

Params

  • address_id: number

shippingMethods

Usage

Shows shipping methods?

Params

  • hash: sha1 hash of addressId + values in shipment array
  • node_id: number (unknown location)
  • checkout_type
  • address_id: number
  • cart_id: number from shipment array

removeStoredCard

Usage

Removes credit/debit card

Params

  • card_id: number

removeCoupon

undocumented

Params

  • checkout_type
  • code