Skip to content

Instantly share code, notes, and snippets.

'use strict';
angular.module('angularTrainingApp')
.directive('multiple', function () {
return {
scope: true,
link: function (scope, element, attrs) {
@IanSaunders
IanSaunders / capture
Last active August 29, 2015 14:13
capture card
StripeToken token = new StripeToken();
token.setCardDetailsID("card details id");
token.setStripeCustomerID("stripe customer id");
if(token_.getAccountID() == null) {
Account account = new Account();
account.getProfile().setFirstName("First Name");
account = Account.create(account);
token_.setAccountID(account.getID());
{
totalAmount : 10,
totalTax : 3,
totalDiscount : 2
prices : [
{
name: 'widgets',
amount: 6,
tax: 2
discount 1
{
amount : 10,
tax : 3,
discount : 2,
prices : [
{
name: 'widgets',
amount: 6,
tax: 2
discount 1
{
"executionTime" : 128961021702,
"results" : [ {
"@type" : "apiQuote",
"organizationID" : "ORG-11C2C2E7-B5C2-472F-AFFC-8808337B",
"productID" : "PRO-0A968B11-1D02-4D88-AD8B-0126DD48",
"productName" : "Foo",
"productRatePlanID" : "PRP-4014DEEA-824C-4DD3-8D58-FD163A74",
"productRatePlanName" : "bar",
"type" : "RecurringPeriod",
{
"results" : [ {
"productID" : "PRO-0A968B11-1D02-4D88-AD8B-0126DD48",
"productName" : "Foo",
"productRatePlanID" : "PRP-4014DEEA-824C-4DD3-8D58-FD163A74",
"productRatePlanName" : "bar",
"type" : "RecurringPeriod",
"currency" : "USD",
"pricingComponents" : [ {
"name" : "Bandwidth",
@IanSaunders
IanSaunders / quote 5
Last active August 29, 2015 14:19
quote 5
{
"results" : [ {
"productName" : "Foo",
"productRatePlanName" : "bar",
"type" : "RecurringPeriod",
"currency" : "USD",
"breakdown" : [ {
"name" : "Bandwidth",
"type" : "subscription",
"value" : 5,
{
"executionTime" : 4790105171,
"results" : [ {
"@type" : "apiQuote",
"subTotal" : 155.00,
"total" : 149.50,
"tax" : 0.00,
"discount" : 5.50,
"currency" : "USD",
{
"product":"foo",
"productRatePlan":"bar",
"values":[
{
"pricingComponentName":"Bandwidth",
"quantity":5
},
{
"pricingComponentName":"Foo",
{
"executionTime" : 25683266,
"results" : [ {
"@type" : "apiQuote",
"subtotal" : 155.00,
"total" : 152.50,
"tax" : 0.00,
"discount" : 2.50,
"currency" : "USD",
"productName" : "Foo",