getoccasion / occasion-sdk-js Goto Github PK
View Code? Open in Web Editor NEWThe Occasion Javascript SDK
License: MIT License
The Occasion Javascript SDK
License: MIT License
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.
// 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
})
}
Dependabot couldn't resolve your project's dependencies as it couldn't access activeresource.js.
You can grant Dependabot access to activeresource.js 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.
occasion-sdk-js/build/occasion-sdk.js
Lines 452 to 457 in 1a9cacf
@todo
comment in 1a9cacf. It's been assigned to @nicklandgrebe because they committed the code.product.attendeeQuestions
so I can use them in my displays to generate attendee fields for each questionproduct.attendeeQuestions
into ActiveResource.Collection
s, so they can be iterated over like so: product.attendeeQuestions.each (question) => { ... }
product.attendeeQuestions
Order#retrieveInformation
that uses same format as calculatePrice
but for /api/v1/orders/information
endpointproduct.firstTimeSlotStartsAt
in moment objecttimeSlot.startsAt
in moment objecttimeSlot.duration
in moment.duration objectmonthlyTimeSlotDaysBatchSize
to request month of timeSlotsmonthlyTimeSlotPreloadSize
months so calendar.nextPage()
easily loads the next month of time Slotsoccasion-sdk-js/build/occasion-sdk.js
Lines 74 to 79 in 982ba4a
@todo
comment in 982ba4a when #41 was merged. cc @GetOccasion.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
product.requiresTimeSlotsSelection
in Order#construct
occasion-sdk-js/src/construct_calendar.js
Lines 1 to 6 in 982ba4a
@todo
comment in 982ba4a when #41 was merged. cc @GetOccasion.Attendee
resource that relates to orderOrder.hasMany('attendees', autosave: true)
occasion-sdk-js/src/product.js
Lines 7 to 12 in 1a9cacf
@todo
comment in 1a9cacf. It's been assigned to @nicklandgrebe because they committed the code.occasion-sdk-js/build/occasion-sdk.js
Lines 435 to 440 in 5f349a3
@todo
comment in 5f349a3. It's been assigned to @nicklandgrebe because they committed the code.We've added to the code base three new models - Campaign, FacebookCampaign, and GoogleAdwordsCampaign. The latter two inherit from Campaign in a STI structure.
Merchant's can have many campaigns. But we need to be able to set the necessary values for these campaigns through the SDK.
Ping @kieranklaassen or @boguth for more details.
occasion-sdk-js/build/occasion-sdk.js
Lines 111 to 116 in 5f349a3
TODO
comment in 5f349a3. It's been assigned to @nicklandgrebe because they committed the code.afterRequest
callback to order that:
attendees().build
if order.quantity has increased above attendees.size()
attendees().pop
if order.quantity has decreased below attendees.size()
afterRequest
logicbuild
logicpop
logicDetect 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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.