An Ember Ecosystem
For Spree Commerce

spree-ember-core

Extends Ember.Mixin

This mixin is used with the order model, to provide it with a saveToCheckouts method, for using the Spree Checkouts API Endpoint.

Methods

Show Private Methods

_afterCheckoutsSave

private

A method for automatically removing the _useCheckoutsFlag and cleaning up any hanging payment objects after a saveToCheckouts call.

saveToCheckouts

Simply wraps the DS.Model#save method to set the boolean flag _useCheckoutsEndpoint for the duration of that promise. Downstream Serializers and Adapters can call snapshot.attr('_useCheckoutsEndpoint') and react accordingly.


Returns:

Ember.RSVP.Promise:

Returns the promise from save.

Properties

Show Private Properties

_useCheckoutsEndpoint

DS.attr('boolean') private

A flag for telling save internals downstream to use Spree's Checkouts API endpoint, rather than the orders endpoint.


Default: false