Git Product home page Git Product logo

occasion-sdk-js's People

Contributors

dependabot-support avatar kieranklaassen avatar nicklandgrebe avatar pelletencate avatar

Stargazers

 avatar

Watchers

 avatar  avatar

occasion-sdk-js's Issues

Dependabot needs permission to see moxios

Dependabot couldn't resolve your project's dependencies as it couldn't access moxios.

You can grant Dependabot access to moxios by adding the repository here. We'll automatically close this issue and kick off another update run once permission is granted.

You can mention @dependabot in the comments below to contact the Dependabot team.

Remove gift card if its transaction errors

    // Creates a transaction with a payment method and an amount
    //
    // @param [PaymentMethod] paymentMethod the payment method to charge
    // @param [Number] amount the amount to charge to the payment method
    // @return [Transaction] the built transaction representing the charge
    charge(paymentMethod, amount) {
      if (
        this.transactions()
          .target()
          .detect(t => t.paymentMethod() == paymentMethod)
      )
        return

      return this.transactions().build({
        amount: amount,
        paymentMethod: paymentMethod
      })
    }

Remove includes({ product: 'merchant' }) when AR supports owner assignment to ha...

// @todo Remove includes({ product: 'merchant' }) when AR supports owner assignment to has_many children
// in non-load queries
}, {
key: '__constructCalendar',
value: function __constructCalendar(month, preload, prevPagePromise) {


This issue was generated by todo based on a @todo comment in 1a9cacf. It's been assigned to @nicklandgrebe because they committed the code.

Add ActiveResource.Collection transforms for product attendeeQuestions

Stories

  • As a developer, I want to be able to easily iterate over product.attendeeQuestions so I can use them in my displays to generate attendee fields for each question

Implementation Plan

  • Transform product.attendeeQuestions into ActiveResource.Collections, so they can be iterated over like so: product.attendeeQuestions.each (question) => { ... }

TODOs

  • Transform product.attendeeQuestions

Add Order#retrieveInformation method

Stories

  • As a developer, I want to be able to call a method to refresh my order with price and quantity information

Implementation

  • Add Order#retrieveInformation that uses same format as calculatePrice but for /api/v1/orders/information endpoint

Add Product#constructCalendar that builds first set of timeSlots given monthlyTimeSlotDaysBatchSize

Stories

  • As a developer, I want to be able to easily display a calendar of time slots for given product for any given month to my customers

TODOs

  • Write specs
  • Wrap product.firstTimeSlotStartsAt in moment object
  • Wrap timeSlot.startsAt in moment object
  • Wrap timeSlot.duration in moment.duration object
  • Interpret monthlyTimeSlotDaysBatchSize to request month of timeSlots
  • Return Collection of formatted moment durations + timeSlots by day
  • Preload monthlyTimeSlotPreloadSize months so calendar.nextPage() easily loads the next month of time Slots

Remove includes({ product: 'merchant' }) when AR supports owner assignment to ha...

// @todo Remove includes({ product: 'merchant' }) when AR supports owner assignment to has_many children
// in non-load queries
Occasion.__constructCalendar = function __constructCalendar(month) {
var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
calendar = _ref.calendar,
monthlyTimeSlotDaysBatchSize = _ref.monthlyTimeSlotDaysBatchSize,


This issue was generated by todo based on a @todo comment in 982ba4a when #41 was merged. cc @GetOccasion.

Auto-select timeSlots in Order#construct when product does not require timeSlot selection

Stories

  • As an SDK developer, I want the SDK to automatically select timeSlots for products that are sessions or only have one timeSlots

Implementation Plan

When product.requiresTimeSlotsSelection is false, determine if product sellsSessions, and if so, load/select all timeSlots for session, otherwise load the 1 timeSlot for the product and select it

TODO

  • Add check for product.requiresTimeSlotsSelection in Order#construct
  • If flag present, load product timeSlots
  • After loading timeSlots, assign them to order

Remove includes({ product: 'merchant' }) when AR supports owner assignment to ha...

// @todo Remove includes({ product: 'merchant' }) when AR supports owner assignment to has_many children
// in non-load queries
Occasion.__constructCalendar = function __constructCalendar(month, {
calendar,
monthlyTimeSlotDaysBatchSize,
monthlyTimeSlotPreloadSize,


This issue was generated by todo based on a @todo comment in 982ba4a when #41 was merged. cc @GetOccasion.

Add order attendees

Stories

  • As a developer, I want to be able to specify personal info of attendees that will be at the event

Implementation

  • Add Attendee resource that relates to order
  • Order.hasMany('attendees', autosave: true)

Remove includes({ product: 'merchant' }) when AR supports owner assignment to ha...

// @todo Remove includes({ product: 'merchant' }) when AR supports owner assignment to has_many children
// in non-load queries
__constructCalendar(month, preload, prevPagePromise) {
var timeZone = this.merchant().timeZone;
var today = moment.tz(timeZone);


This issue was generated by todo based on a @todo comment in 1a9cacf. It's been assigned to @nicklandgrebe because they committed the code.

Remove includes({ product: 'merchant' }) when AR supports owner assignment to ha...

// @todo Remove includes({ product: 'merchant' }) when AR supports owner assignment to has_many children
// in non-load queries
__constructCalendar(month, preload, prevPagePromise) {
var timeZone = this.merchant().timeZone;
var today = moment.tz(timeZone);


This issue was generated by todo based on a @todo comment in 5f349a3. It's been assigned to @nicklandgrebe because they committed the code.

Increase or decrease order.attendees size according to updates to quantity using `afterRequest` callback

Stories

  • As a developer, when the quantity of my order changes, I want to have attendees built onto or popped off the order so that attendees size always matches quantity

Implementation Plan

  • Add afterRequest callback to order that:
    • Iteratively calls attendees().build if order.quantity has increased above attendees.size()
    • Iteratively calls attendees().pop if order.quantity has decreased below attendees.size()

TODOs

  • Add afterRequest logic
  • Add build logic
  • Add pop logic

Fix changing outstandingBalance

Stories

  • As a customer, when I add a coupon or modify the price in other ways with a gift card added, the charge applied to the gift card should automatically adjust accordingly

Implementation

Detect when outstandingBalance != 0 and gift cards applied, and try to change the gift card balance to account for the outstandingBalance, otherwise apply the outstandingBalance to the credit card or cash transaction

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.