mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-14 07:00:01 -04:00
Merge branch 'master' into production
This commit is contained in:
commit
77a09c86e0
149 changed files with 29604 additions and 1304 deletions
|
@ -18,7 +18,6 @@ cache:
|
|||
- bower_components
|
||||
|
||||
before_install:
|
||||
- "gem install sass"
|
||||
- export COCO_TRAVIS_TEST=1
|
||||
- npm install -g npm@latest
|
||||
|
||||
|
@ -29,5 +28,5 @@ before_script:
|
|||
- "sleep 10" # to give node a chance to start
|
||||
|
||||
script:
|
||||
- "./node_modules/jasmine-node/bin/jasmine-node test/server/ --coffee --captureExceptions"
|
||||
- "./node_modules/karma/bin/karma start --browsers Firefox --single-run --reporters progress"
|
||||
- "npm run jasmine"
|
||||
|
|
|
@ -250,6 +250,7 @@ module.exports.getPrepaidCodeAmount = getPrepaidCodeAmount = (price=999, users=0
|
|||
total
|
||||
|
||||
module.exports.filterMarkdownCodeLanguages = (text) ->
|
||||
return '' unless text
|
||||
currentLanguage = me.get('aceConfig')?.language or 'python'
|
||||
excludedLanguages = _.without ['javascript', 'python', 'coffeescript', 'clojure', 'lua', 'io'], currentLanguage
|
||||
exclusionRegex = new RegExp "```(#{excludedLanguages.join('|')})\n[^`]+```\n?", 'gm'
|
||||
|
|
|
@ -64,6 +64,7 @@ module.exports = class SimulateTabView extends CocoView
|
|||
# Work around simulator getting super slow on Chrome
|
||||
fetchAndSimulateTaskOriginal = @simulator.fetchAndSimulateTask
|
||||
@simulator.fetchAndSimulateTask = =>
|
||||
return if @destroyed
|
||||
if @simulator.simulatedByYou >= 20
|
||||
console.log '------------------- Destroying Simulator and making a new one -----------------'
|
||||
@simulator.destroy()
|
||||
|
|
|
@ -284,7 +284,7 @@ module.exports = class SpellView extends CocoView
|
|||
ar = str.match(/^\s*/)
|
||||
ar.pop().length
|
||||
|
||||
colors = ['50,150,200', '200,150,50']
|
||||
colors = [{border: '74,144,226', fill: '108,162,226'}, {border: '132,180,235', fill: '230,237,245'}]
|
||||
|
||||
for row in [0..@aceSession.getLength()]
|
||||
foldWidgets[row] = @aceSession.getFoldWidget(row) unless foldWidgets[row]?
|
||||
|
@ -316,17 +316,19 @@ module.exports = class SpellView extends CocoView
|
|||
w = 4 * config.characterWidth
|
||||
fw = config.characterWidth * ( @aceSession.getScreenLastRowColumn(range.start.row) - xstart )
|
||||
|
||||
html.push [
|
||||
'<div style="',
|
||||
"position: absolute; top: #{to}px; left: #{l}px; width: #{fw+bw}px; height: #{config.lineHeight}px; background-color: rgba(#{color},0.2);"
|
||||
"border: #{bw}px solid rgba(#{color},0.4); border-left: none",
|
||||
'"></div>' ].join ''
|
||||
|
||||
html.push [
|
||||
'<div style="',
|
||||
"position: absolute; top: #{t}px; left: #{l}px; width: #{w}px; height: #{h}px; background-color: rgba(#{color},0.2);"
|
||||
"border-right: #{bw}px solid rgba(#{color},0.4);",
|
||||
'"></div>' ].join ''
|
||||
html.push """
|
||||
<div style=
|
||||
"position: absolute; top: #{to}px; left: #{l}px; width: #{fw+bw}px; height: #{config.lineHeight}px;
|
||||
border: #{bw}px solid rgba(#{color.border},1); border-left: none;"
|
||||
></div>
|
||||
<div style=
|
||||
"position: absolute; top: #{t}px; left: #{l}px; width: #{w}px; height: #{h}px; background-color: rgba(#{color.fill},0.5);
|
||||
border-right: #{bw}px solid rgba(#{color.border},1); border-bottom: #{bw}px solid rgba(#{color.border},1);"
|
||||
></div>
|
||||
<div style=
|
||||
"position: absolute; top: #{t + h}px; left: #{l}px; width: #{500}px; height: #{bw}px; background-color: rgba(#{color.border},1);"
|
||||
></div>
|
||||
"""
|
||||
|
||||
fillACE: ->
|
||||
@ace.setValue @spell.source
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
#!/bin/bash
|
||||
|
||||
# full script path
|
||||
_scriptDir="$(cd "$(dirname "$0")" && pwd -P)"
|
||||
|
||||
cd $_scriptDir
|
||||
cd ../
|
||||
node_modules/jasmine-node/bin/jasmine-node test/server/ --coffee --autotest --captureExceptions
|
||||
echo
|
||||
echo coco-server-test-runner is deprecated.
|
||||
echo Instead, use \"npm run jasmine\" to run server tests
|
||||
echo
|
|
@ -1,8 +1,4 @@
|
|||
#!/bin/bash
|
||||
|
||||
# full script path
|
||||
_scriptDir="$(cd "$(dirname "$0")" && pwd -P)"
|
||||
|
||||
cd $_scriptDir
|
||||
cd ../
|
||||
node_modules/.bin/nodemon . --ext ".coffee|.js" --watch server --watch server.coffee --unittest
|
||||
echo
|
||||
echo coco-test-server is deprecated.
|
||||
echo Instead, use \"npm run jasmine\" to run server tests
|
||||
echo
|
|
@ -40,7 +40,7 @@
|
|||
"nodemon": "nodemon",
|
||||
"jasmine-node": "jasmine-node",
|
||||
"multicore": "coffee multicore.coffee",
|
||||
"nodemon": "nodemon"
|
||||
"jasmine": "jasmine"
|
||||
},
|
||||
"main": "index.js",
|
||||
"keywords": [
|
||||
|
@ -98,8 +98,7 @@
|
|||
"css-brunch": "^1.7.0",
|
||||
"fs-extra": "^0.26.2",
|
||||
"jade-brunch": "1.7.5",
|
||||
"jasmine-node": "1.13.x",
|
||||
"jasmine-spec-reporter": "~0.3.0",
|
||||
"jasmine": "^2.3.2",
|
||||
"javascript-brunch": "> 1.0 < 1.8",
|
||||
"karma": "~0.13",
|
||||
"karma-chrome-launcher": "~0.1.2",
|
||||
|
@ -112,6 +111,7 @@
|
|||
"karma-requirejs": "~0.2.1",
|
||||
"karma-script-launcher": "~0.1.0",
|
||||
"marked": "0.2.x",
|
||||
"nock": "^2.17.0",
|
||||
"nodemon": "1.6.1",
|
||||
"requirejs": "~2.1.10",
|
||||
"sass-brunch": "https://github.com/basicer/sass-brunch-bleeding/archive/1.9.1-bleeding.tar.gz",
|
||||
|
|
|
@ -10,9 +10,9 @@ http = require 'http'
|
|||
log = require 'winston'
|
||||
serverSetup = require './server_setup'
|
||||
|
||||
module.exports.startServer = ->
|
||||
module.exports.startServer = (done) ->
|
||||
app = createAndConfigureApp()
|
||||
http.createServer(app).listen(app.get('port'))
|
||||
http.createServer(app).listen app.get('port'), -> done?()
|
||||
log.info('Express SSL server listening on port ' + app.get('port'))
|
||||
app
|
||||
|
||||
|
|
|
@ -504,6 +504,7 @@ module.exports = class Handler
|
|||
if not idOrSlug or idOrSlug is 'undefined'
|
||||
console.error "What? Why are we fetching the slug: #{idOrSlug}?"
|
||||
console.trace()
|
||||
return done null, null
|
||||
query = @modelClass.findOne {slug: idOrSlug}
|
||||
query.select projection if projection
|
||||
query.exec (err, document) ->
|
||||
|
|
|
@ -4,9 +4,6 @@ mongoose = require 'mongoose'
|
|||
Grid = require 'gridfs-stream'
|
||||
mongooseCache = require 'mongoose-cache'
|
||||
|
||||
global.testing = testing = '--unittest' in process.argv
|
||||
|
||||
|
||||
module.exports.connect = () ->
|
||||
address = module.exports.generateMongoConnectionString()
|
||||
winston.info "Connecting to Mongo with connection string #{address}"
|
||||
|
@ -22,15 +19,15 @@ module.exports.connect = () ->
|
|||
mongooseCache.install(mongoose, {max: 1000, maxAge: maxAge, debug: false}, Aggregate)
|
||||
|
||||
module.exports.generateMongoConnectionString = ->
|
||||
if not testing and config.tokyo
|
||||
if not global.testing and config.tokyo
|
||||
address = config.mongo.mongoose_tokyo_replica_string
|
||||
else if not testing and config.saoPaulo
|
||||
else if not global.testing and config.saoPaulo
|
||||
address = config.mongo.mongoose_saoPaulo_replica_string
|
||||
else if not testing and config.mongo.mongoose_replica_string
|
||||
else if not global.testing and config.mongo.mongoose_replica_string
|
||||
address = config.mongo.mongoose_replica_string
|
||||
else
|
||||
dbName = config.mongo.db
|
||||
dbName += '_unittest' if testing
|
||||
dbName += '_unittest' if global.testing
|
||||
address = config.mongo.host + ':' + config.mongo.port
|
||||
if config.mongo.username and config.mongo.password
|
||||
address = config.mongo.username + ':' + config.mongo.password + '@' + address
|
||||
|
|
6
server/lib/apple_utils.coffee
Normal file
6
server/lib/apple_utils.coffee
Normal file
|
@ -0,0 +1,6 @@
|
|||
config = require '../../server_config'
|
||||
|
||||
module.exports.verifyReceipt = (receipt, done) ->
|
||||
formFields = { 'receipt-data': receipt }
|
||||
request.post {url: config.apple.verifyURL, json: formFields}, (err, res, body) ->
|
||||
done(err, body)
|
|
@ -9,6 +9,7 @@ hipchat = require '../hipchat'
|
|||
config = require '../../server_config'
|
||||
request = require 'request'
|
||||
async = require 'async'
|
||||
apple_utils = require '../lib/apple_utils'
|
||||
|
||||
products = {
|
||||
'gems_5': {
|
||||
|
@ -99,11 +100,9 @@ PaymentHandler = class PaymentHandler extends Handler
|
|||
#- Apple payments
|
||||
|
||||
handleApplePaymentPost: (req, res, receipt, transactionID, localPrice) ->
|
||||
formFields = { 'receipt-data': receipt }
|
||||
|
||||
#- verify receipt with Apple
|
||||
|
||||
verifyReq = request.post({url: config.apple.verifyURL, json: formFields}, (err, verifyRes, body) =>
|
||||
apple_utils.verifyReceipt(receipt, (err, body) =>
|
||||
if err or not body?.receipt?.in_app or (not body?.bundle_id is 'com.codecombat.CodeCombat')
|
||||
console.warn 'apple receipt error?', err, body
|
||||
@logPaymentError(req, 'Unable to verify apple receipt')
|
||||
|
|
|
@ -80,8 +80,8 @@ PrepaidHandler = class PrepaidHandler extends Handler
|
|||
User.findById(req.body.userID).exec (err, user) =>
|
||||
return @sendDatabaseError(res, err) if err
|
||||
return @sendNotFoundError(res, 'User for given ID not found') if not user
|
||||
userID = user.get('_id')
|
||||
return @sendSuccess(res, @formatEntity(req, prepaid)) if user.get('coursePrepaidID')
|
||||
userID = user.get('_id')
|
||||
|
||||
query =
|
||||
_id: prepaid.get('_id')
|
||||
|
|
|
@ -197,8 +197,14 @@ module.exports.loginUser = loginUser = (req, res, user, send=true, next=null) ->
|
|||
)
|
||||
)
|
||||
|
||||
module.exports.idCounter = 0
|
||||
|
||||
module.exports.makeNewUser = makeNewUser = (req) ->
|
||||
user = new User({anonymous: true})
|
||||
if global.testing
|
||||
# allows tests some control over user id creation
|
||||
newID = _.pad((module.exports.idCounter++).toString(16), 24, '0')
|
||||
user.set('_id', newID)
|
||||
user.set 'testGroupNumber', Math.floor(Math.random() * 256) # also in app/core/auth
|
||||
lang = languages.languageCodeFromAcceptedLanguages req.acceptedLanguages
|
||||
user.set 'preferredLanguage', lang if lang[...2] isnt 'en'
|
||||
|
|
|
@ -149,7 +149,7 @@ UserSchema.statics.updateServiceSettings = (doc, callback) ->
|
|||
doc.updatedMailChimp = true
|
||||
callback?()
|
||||
|
||||
mc?.lists.subscribe params, onSuccess, onFailure unless config.unittest
|
||||
mc?.lists.subscribe params, onSuccess, onFailure
|
||||
|
||||
UserSchema.statics.statsMapping =
|
||||
edits:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
config = {}
|
||||
|
||||
config.unittest = process.argv.indexOf('--unittest') > -1
|
||||
config.unittest = global.testing
|
||||
|
||||
config.tokyo = process.env.TOKYO or false
|
||||
config.saoPaulo = process.env.SAOPAULO or false
|
||||
|
|
13
spec/fixtures/db-discount-handler-test-1.json
vendored
Normal file
13
spec/fixtures/db-discount-handler-test-1.json
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/coupons/DNE",
|
||||
"status": 404,
|
||||
"response": {
|
||||
"error": {
|
||||
"type": "invalid_request_error"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
11
spec/fixtures/db-discount-handler-test-2.json
vendored
Normal file
11
spec/fixtures/db-discount-handler-test-2.json
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/coupons/20pct",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "20pct"
|
||||
}
|
||||
}
|
||||
]
|
11
spec/fixtures/db-discount-handler-test-3.json
vendored
Normal file
11
spec/fixtures/db-discount-handler-test-3.json
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/coupons/500off",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "500off"
|
||||
}
|
||||
}
|
||||
]
|
1
spec/fixtures/db-discount-handler-test-4.json
vendored
Normal file
1
spec/fixtures/db-discount-handler-test-4.json
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
[]
|
11
spec/fixtures/db-discount-handler-test-5.json
vendored
Normal file
11
spec/fixtures/db-discount-handler-test-5.json
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/coupons/500off",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "500off"
|
||||
}
|
||||
}
|
||||
]
|
99
spec/fixtures/db-discount-handler-test-6.json
vendored
Normal file
99
spec/fixtures/db-discount-handler-test-6.json
vendored
Normal file
|
@ -0,0 +1,99 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/tokens",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "tok_17GCUnKaReE7xLUdVx6ixF1h",
|
||||
"card": {
|
||||
"id": "card_17GCUnKaReE7xLUdZ8FpRcR5"
|
||||
},
|
||||
"type": "card"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VCuNWxO5eWsQG",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "normal@jo.com",
|
||||
"metadata": {
|
||||
"id": "00000000000000000000005d"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCUnKaReE7xLUdZ8FpRcR5",
|
||||
"customer": "cus_7VCuNWxO5eWsQG"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VCuNWxO5eWsQG/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VCuZWrSt0bF8c",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452363418,
|
||||
"current_period_start": 1449685018,
|
||||
"customer": "cus_7VCuNWxO5eWsQG",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "500off"
|
||||
},
|
||||
"customer": "cus_7VCuNWxO5eWsQG",
|
||||
"subscription": "sub_7VCuZWrSt0bF8c"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "00000000000000000000005d"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VCuNWxO5eWsQG/subscriptions/sub_7VCuZWrSt0bF8c",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VCuZWrSt0bF8c",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452363418,
|
||||
"current_period_start": 1449685018,
|
||||
"customer": "cus_7VCuNWxO5eWsQG",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "500off"
|
||||
},
|
||||
"customer": "cus_7VCuNWxO5eWsQG",
|
||||
"subscription": "sub_7VCuZWrSt0bF8c"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "00000000000000000000005d"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
}
|
||||
]
|
127
spec/fixtures/db-discount-handler-test-7.json
vendored
Normal file
127
spec/fixtures/db-discount-handler-test-7.json
vendored
Normal file
|
@ -0,0 +1,127 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/coupons/20pct",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "20pct"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VCuNWxO5eWsQG",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VCuNWxO5eWsQG",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "20pct"
|
||||
},
|
||||
"customer": "cus_7VCuNWxO5eWsQG"
|
||||
},
|
||||
"email": "normal@jo.com",
|
||||
"metadata": {
|
||||
"id": "00000000000000000000005d"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCUnKaReE7xLUdZ8FpRcR5",
|
||||
"customer": "cus_7VCuNWxO5eWsQG"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VCuZWrSt0bF8c",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452363418,
|
||||
"current_period_start": 1449685018,
|
||||
"customer": "cus_7VCuNWxO5eWsQG",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "500off"
|
||||
},
|
||||
"customer": "cus_7VCuNWxO5eWsQG",
|
||||
"subscription": "sub_7VCuZWrSt0bF8c"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "00000000000000000000005d"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VCuNWxO5eWsQG",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VCuNWxO5eWsQG",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "20pct"
|
||||
},
|
||||
"customer": "cus_7VCuNWxO5eWsQG"
|
||||
},
|
||||
"email": "normal@jo.com",
|
||||
"metadata": {
|
||||
"id": "00000000000000000000005d"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCUnKaReE7xLUdZ8FpRcR5",
|
||||
"customer": "cus_7VCuNWxO5eWsQG"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VCuZWrSt0bF8c",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452363418,
|
||||
"current_period_start": 1449685018,
|
||||
"customer": "cus_7VCuNWxO5eWsQG",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "500off"
|
||||
},
|
||||
"customer": "cus_7VCuNWxO5eWsQG",
|
||||
"subscription": "sub_7VCuZWrSt0bF8c"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "00000000000000000000005d"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
61
spec/fixtures/db-discount-handler-test-8.json
vendored
Normal file
61
spec/fixtures/db-discount-handler-test-8.json
vendored
Normal file
|
@ -0,0 +1,61 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "DELETE",
|
||||
"path": "/v1/customers/cus_7VCuNWxO5eWsQG/discount",
|
||||
"status": 200,
|
||||
"response": {}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VCuNWxO5eWsQG",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VCuNWxO5eWsQG",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "normal@jo.com",
|
||||
"metadata": {
|
||||
"id": "00000000000000000000005d"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCUnKaReE7xLUdZ8FpRcR5",
|
||||
"customer": "cus_7VCuNWxO5eWsQG"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VCuZWrSt0bF8c",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452363418,
|
||||
"current_period_start": 1449685018,
|
||||
"customer": "cus_7VCuNWxO5eWsQG",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "500off"
|
||||
},
|
||||
"customer": "cus_7VCuNWxO5eWsQG",
|
||||
"subscription": "sub_7VCuZWrSt0bF8c"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "00000000000000000000005d"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
127
spec/fixtures/db-discount-handler-test-9.json
vendored
Normal file
127
spec/fixtures/db-discount-handler-test-9.json
vendored
Normal file
|
@ -0,0 +1,127 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/coupons/20pct",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "20pct"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VCuNWxO5eWsQG",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VCuNWxO5eWsQG",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "20pct"
|
||||
},
|
||||
"customer": "cus_7VCuNWxO5eWsQG"
|
||||
},
|
||||
"email": "normal@jo.com",
|
||||
"metadata": {
|
||||
"id": "00000000000000000000005d"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCUnKaReE7xLUdZ8FpRcR5",
|
||||
"customer": "cus_7VCuNWxO5eWsQG"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VCuZWrSt0bF8c",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452363418,
|
||||
"current_period_start": 1449685018,
|
||||
"customer": "cus_7VCuNWxO5eWsQG",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "500off"
|
||||
},
|
||||
"customer": "cus_7VCuNWxO5eWsQG",
|
||||
"subscription": "sub_7VCuZWrSt0bF8c"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "00000000000000000000005d"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VCuNWxO5eWsQG",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VCuNWxO5eWsQG",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "20pct"
|
||||
},
|
||||
"customer": "cus_7VCuNWxO5eWsQG"
|
||||
},
|
||||
"email": "normal@jo.com",
|
||||
"metadata": {
|
||||
"id": "00000000000000000000005d"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCUnKaReE7xLUdZ8FpRcR5",
|
||||
"customer": "cus_7VCuNWxO5eWsQG"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VCuZWrSt0bF8c",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452363418,
|
||||
"current_period_start": 1449685018,
|
||||
"customer": "cus_7VCuNWxO5eWsQG",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "500off"
|
||||
},
|
||||
"customer": "cus_7VCuNWxO5eWsQG",
|
||||
"subscription": "sub_7VCuZWrSt0bF8c"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "00000000000000000000005d"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
24
spec/fixtures/db-payment-apple-test-1.json
vendored
Normal file
24
spec/fixtures/db-payment-apple-test-1.json
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://sandbox.itunes.apple.com:443",
|
||||
"method": "POST",
|
||||
"path": "/verifyReceipt",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"receipt": {
|
||||
"in_app": [
|
||||
{
|
||||
"quantity": "1",
|
||||
"product_id": "gems_5",
|
||||
"transaction_id": "1000000131274439"
|
||||
},
|
||||
{
|
||||
"quantity": "1",
|
||||
"product_id": "gems_10",
|
||||
"transaction_id": "1000000131283608"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
24
spec/fixtures/db-payment-apple-test-2.json
vendored
Normal file
24
spec/fixtures/db-payment-apple-test-2.json
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://sandbox.itunes.apple.com:443",
|
||||
"method": "POST",
|
||||
"path": "/verifyReceipt",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"receipt": {
|
||||
"in_app": [
|
||||
{
|
||||
"quantity": "1",
|
||||
"product_id": "gems_5",
|
||||
"transaction_id": "1000000131274439"
|
||||
},
|
||||
{
|
||||
"quantity": "1",
|
||||
"product_id": "gems_10",
|
||||
"transaction_id": "1000000131283608"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
24
spec/fixtures/db-payment-apple-test-3.json
vendored
Normal file
24
spec/fixtures/db-payment-apple-test-3.json
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://sandbox.itunes.apple.com:443",
|
||||
"method": "POST",
|
||||
"path": "/verifyReceipt",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"receipt": {
|
||||
"in_app": [
|
||||
{
|
||||
"quantity": "1",
|
||||
"product_id": "gems_5",
|
||||
"transaction_id": "1000000131274439"
|
||||
},
|
||||
{
|
||||
"quantity": "1",
|
||||
"product_id": "gems_10",
|
||||
"transaction_id": "1000000131283608"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
24
spec/fixtures/db-payment-apple-test-4.json
vendored
Normal file
24
spec/fixtures/db-payment-apple-test-4.json
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://sandbox.itunes.apple.com:443",
|
||||
"method": "POST",
|
||||
"path": "/verifyReceipt",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"receipt": {
|
||||
"in_app": [
|
||||
{
|
||||
"quantity": "1",
|
||||
"product_id": "gems_5",
|
||||
"transaction_id": "1000000131274439"
|
||||
},
|
||||
{
|
||||
"quantity": "1",
|
||||
"product_id": "gems_10",
|
||||
"transaction_id": "1000000131283608"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
133
spec/fixtures/db-payment-check-stripe-charges-test-01.json
vendored
Normal file
133
spec/fixtures/db-payment-check-stripe-charges-test-01.json
vendored
Normal file
|
@ -0,0 +1,133 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/tokens",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "tok_17GCVJKaReE7xLUdzpXOGZ9v",
|
||||
"card": {
|
||||
"id": "card_17GCVJKaReE7xLUdKOWpllRX"
|
||||
},
|
||||
"type": "card"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VCvE20H99SoVJ",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "normal@jo.com",
|
||||
"metadata": {
|
||||
"id": "00000000000000000000006a"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCVJKaReE7xLUdKOWpllRX",
|
||||
"customer": "cus_7VCvE20H99SoVJ"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/charges",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"has_more": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VCvE20H99SoVJ",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VCvE20H99SoVJ",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "normal@jo.com",
|
||||
"metadata": {
|
||||
"id": "00000000000000000000006a"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCVJKaReE7xLUdKOWpllRX",
|
||||
"customer": "cus_7VCvE20H99SoVJ"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/charges",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "ch_17GCVLKaReE7xLUdb9DcZ4om",
|
||||
"amount": 499,
|
||||
"customer": "cus_7VCvE20H99SoVJ",
|
||||
"metadata": {
|
||||
"productID": "gems_5",
|
||||
"gems": "5000",
|
||||
"timestamp": "1449685049575"
|
||||
},
|
||||
"paid": true,
|
||||
"refunds": {
|
||||
"has_more": false
|
||||
},
|
||||
"source": {
|
||||
"id": "card_17GCVJKaReE7xLUdKOWpllRX",
|
||||
"customer": "cus_7VCvE20H99SoVJ"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/charges",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"data": [
|
||||
{
|
||||
"id": "ch_17GCVLKaReE7xLUdb9DcZ4om",
|
||||
"amount": 499,
|
||||
"customer": "cus_7VCvE20H99SoVJ",
|
||||
"metadata": {
|
||||
"productID": "gems_5",
|
||||
"gems": "5000",
|
||||
"timestamp": "1449685049575"
|
||||
},
|
||||
"paid": true,
|
||||
"refunds": {
|
||||
"has_more": false
|
||||
},
|
||||
"source": {
|
||||
"id": "card_17GCVJKaReE7xLUdKOWpllRX",
|
||||
"customer": "cus_7VCvE20H99SoVJ"
|
||||
}
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
]
|
104
spec/fixtures/db-payment-custom-stripe-test-01.json
vendored
Normal file
104
spec/fixtures/db-payment-custom-stripe-test-01.json
vendored
Normal file
|
@ -0,0 +1,104 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/tokens",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "tok_17GCVNKaReE7xLUd2tmSQ1KH",
|
||||
"card": {
|
||||
"id": "card_17GCVMKaReE7xLUdZVTFHMmq"
|
||||
},
|
||||
"type": "card"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VCvZ7KBrJ8csQ",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "normal@jo.com",
|
||||
"metadata": {
|
||||
"id": "00000000000000000000006b"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCVMKaReE7xLUdZVTFHMmq",
|
||||
"customer": "cus_7VCvZ7KBrJ8csQ"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/charges",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"has_more": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VCvZ7KBrJ8csQ",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VCvZ7KBrJ8csQ",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "normal@jo.com",
|
||||
"metadata": {
|
||||
"id": "00000000000000000000006b"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCVMKaReE7xLUdZVTFHMmq",
|
||||
"customer": "cus_7VCvZ7KBrJ8csQ"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/charges",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "ch_17GCVOKaReE7xLUd1ZQVMJKB",
|
||||
"amount": 5000,
|
||||
"customer": "cus_7VCvZ7KBrJ8csQ",
|
||||
"metadata": {
|
||||
"productID": "custom",
|
||||
"timestamp": "1447445242091",
|
||||
"description": "A sweet Coco t-shirt"
|
||||
},
|
||||
"paid": true,
|
||||
"refunds": {
|
||||
"has_more": false
|
||||
},
|
||||
"source": {
|
||||
"id": "card_17GCVMKaReE7xLUdZVTFHMmq",
|
||||
"customer": "cus_7VCvZ7KBrJ8csQ"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
95
spec/fixtures/db-payment-custom-stripe-test-02.json
vendored
Normal file
95
spec/fixtures/db-payment-custom-stripe-test-02.json
vendored
Normal file
|
@ -0,0 +1,95 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/tokens",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "tok_17GCVPKaReE7xLUdJcZimvbF",
|
||||
"card": {
|
||||
"id": "card_17GCVPKaReE7xLUdRwBCjoW4"
|
||||
},
|
||||
"type": "card"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VCvZ7KBrJ8csQ",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VCvZ7KBrJ8csQ",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "normal@jo.com",
|
||||
"metadata": {
|
||||
"id": "00000000000000000000006b"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCVPKaReE7xLUdRwBCjoW4",
|
||||
"customer": "cus_7VCvZ7KBrJ8csQ"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/charges",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"data": [
|
||||
{
|
||||
"id": "ch_17GCVOKaReE7xLUd1ZQVMJKB",
|
||||
"amount": 5000,
|
||||
"customer": "cus_7VCvZ7KBrJ8csQ",
|
||||
"metadata": {
|
||||
"productID": "custom",
|
||||
"timestamp": "1447445242091",
|
||||
"description": "A sweet Coco t-shirt"
|
||||
},
|
||||
"paid": true,
|
||||
"refunds": {
|
||||
"has_more": false
|
||||
},
|
||||
"source": {
|
||||
"id": "card_17GCVMKaReE7xLUdZVTFHMmq",
|
||||
"customer": "cus_7VCvZ7KBrJ8csQ"
|
||||
}
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/charges",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "ch_17GCVSKaReE7xLUdd5E7dowz",
|
||||
"amount": 73000,
|
||||
"customer": "cus_7VCvZ7KBrJ8csQ",
|
||||
"metadata": {
|
||||
"productID": "custom",
|
||||
"timestamp": "1447445242092"
|
||||
},
|
||||
"paid": true,
|
||||
"refunds": {
|
||||
"has_more": false
|
||||
},
|
||||
"source": {
|
||||
"id": "card_17GCVPKaReE7xLUdRwBCjoW4",
|
||||
"customer": "cus_7VCvZ7KBrJ8csQ"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
89
spec/fixtures/db-payment-custom-stripe-test-03.json
vendored
Normal file
89
spec/fixtures/db-payment-custom-stripe-test-03.json
vendored
Normal file
|
@ -0,0 +1,89 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/tokens",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "tok_17GCVTKaReE7xLUdOnqynJY7",
|
||||
"card": {
|
||||
"id": "card_17GCVSKaReE7xLUdjh0HgmFn"
|
||||
},
|
||||
"type": "card"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VCvZ7KBrJ8csQ",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VCvZ7KBrJ8csQ",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "normal@jo.com",
|
||||
"metadata": {
|
||||
"id": "00000000000000000000006b"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCVSKaReE7xLUdjh0HgmFn",
|
||||
"customer": "cus_7VCvZ7KBrJ8csQ"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/charges",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"data": [
|
||||
{
|
||||
"id": "ch_17GCVSKaReE7xLUdd5E7dowz",
|
||||
"amount": 73000,
|
||||
"customer": "cus_7VCvZ7KBrJ8csQ",
|
||||
"metadata": {
|
||||
"productID": "custom",
|
||||
"timestamp": "1447445242092"
|
||||
},
|
||||
"paid": true,
|
||||
"refunds": {
|
||||
"has_more": false
|
||||
},
|
||||
"source": {
|
||||
"id": "card_17GCVPKaReE7xLUdRwBCjoW4",
|
||||
"customer": "cus_7VCvZ7KBrJ8csQ"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "ch_17GCVOKaReE7xLUd1ZQVMJKB",
|
||||
"amount": 5000,
|
||||
"customer": "cus_7VCvZ7KBrJ8csQ",
|
||||
"metadata": {
|
||||
"productID": "custom",
|
||||
"timestamp": "1447445242091",
|
||||
"description": "A sweet Coco t-shirt"
|
||||
},
|
||||
"paid": true,
|
||||
"refunds": {
|
||||
"has_more": false
|
||||
},
|
||||
"source": {
|
||||
"id": "card_17GCVMKaReE7xLUdZVTFHMmq",
|
||||
"customer": "cus_7VCvZ7KBrJ8csQ"
|
||||
}
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
]
|
104
spec/fixtures/db-payment-stripe-test-01.json
vendored
Normal file
104
spec/fixtures/db-payment-stripe-test-01.json
vendored
Normal file
|
@ -0,0 +1,104 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/tokens",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "tok_17GCUvKaReE7xLUdo7q79Zbp",
|
||||
"card": {
|
||||
"id": "card_17GCUvKaReE7xLUdBp1HF9sT"
|
||||
},
|
||||
"type": "card"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VCubHuvGFt4nH",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "normal@jo.com",
|
||||
"metadata": {
|
||||
"id": "000000000000000000000067"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCUvKaReE7xLUdBp1HF9sT",
|
||||
"customer": "cus_7VCubHuvGFt4nH"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/charges",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"has_more": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VCubHuvGFt4nH",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VCubHuvGFt4nH",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "normal@jo.com",
|
||||
"metadata": {
|
||||
"id": "000000000000000000000067"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCUvKaReE7xLUdBp1HF9sT",
|
||||
"customer": "cus_7VCubHuvGFt4nH"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/charges",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "ch_17GCUxKaReE7xLUddy1fN9Nl",
|
||||
"amount": 499,
|
||||
"customer": "cus_7VCubHuvGFt4nH",
|
||||
"metadata": {
|
||||
"productID": "gems_5",
|
||||
"gems": "5000",
|
||||
"timestamp": "1447443579286"
|
||||
},
|
||||
"paid": true,
|
||||
"refunds": {
|
||||
"has_more": false
|
||||
},
|
||||
"source": {
|
||||
"id": "card_17GCUvKaReE7xLUdBp1HF9sT",
|
||||
"customer": "cus_7VCubHuvGFt4nH"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
42
spec/fixtures/db-payment-stripe-test-02.json
vendored
Normal file
42
spec/fixtures/db-payment-stripe-test-02.json
vendored
Normal file
|
@ -0,0 +1,42 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VCubHuvGFt4nH",
|
||||
"status": 400,
|
||||
"response": {
|
||||
"error": {
|
||||
"type": "invalid_request_error"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/charges",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"data": [
|
||||
{
|
||||
"id": "ch_17GCUxKaReE7xLUddy1fN9Nl",
|
||||
"amount": 499,
|
||||
"customer": "cus_7VCubHuvGFt4nH",
|
||||
"metadata": {
|
||||
"productID": "gems_5",
|
||||
"gems": "5000",
|
||||
"timestamp": "1447443579286"
|
||||
},
|
||||
"paid": true,
|
||||
"refunds": {
|
||||
"has_more": false
|
||||
},
|
||||
"source": {
|
||||
"id": "card_17GCUvKaReE7xLUdBp1HF9sT",
|
||||
"customer": "cus_7VCubHuvGFt4nH"
|
||||
}
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
]
|
55
spec/fixtures/db-payment-stripe-test-03.json
vendored
Normal file
55
spec/fixtures/db-payment-stripe-test-03.json
vendored
Normal file
|
@ -0,0 +1,55 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/charges",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"data": [
|
||||
{
|
||||
"id": "ch_17GCUxKaReE7xLUddy1fN9Nl",
|
||||
"amount": 499,
|
||||
"customer": "cus_7VCubHuvGFt4nH",
|
||||
"metadata": {
|
||||
"productID": "gems_5",
|
||||
"gems": "5000",
|
||||
"timestamp": "1447443579286"
|
||||
},
|
||||
"paid": true,
|
||||
"refunds": {
|
||||
"has_more": false
|
||||
},
|
||||
"source": {
|
||||
"id": "card_17GCUvKaReE7xLUdBp1HF9sT",
|
||||
"customer": "cus_7VCubHuvGFt4nH"
|
||||
}
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/charges",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "ch_17GCUzKaReE7xLUdviRu5P6Z",
|
||||
"amount": 499,
|
||||
"customer": "cus_7VCubHuvGFt4nH",
|
||||
"metadata": {
|
||||
"productID": "gems_5",
|
||||
"gems": "5000",
|
||||
"timestamp": "1449685028592"
|
||||
},
|
||||
"paid": true,
|
||||
"refunds": {
|
||||
"has_more": false
|
||||
},
|
||||
"source": {
|
||||
"id": "card_17GCUvKaReE7xLUdBp1HF9sT",
|
||||
"customer": "cus_7VCubHuvGFt4nH"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
170
spec/fixtures/db-payment-stripe-test-04.json
vendored
Normal file
170
spec/fixtures/db-payment-stripe-test-04.json
vendored
Normal file
|
@ -0,0 +1,170 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VCubHuvGFt4nH",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VCubHuvGFt4nH",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "normal@jo.com",
|
||||
"metadata": {
|
||||
"id": "000000000000000000000067"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCUvKaReE7xLUdBp1HF9sT",
|
||||
"customer": "cus_7VCubHuvGFt4nH"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/tokens",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "tok_17GCV0KaReE7xLUd6riHo5io",
|
||||
"card": {
|
||||
"id": "card_17GCV0KaReE7xLUdA7hdLMnV"
|
||||
},
|
||||
"type": "card"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VCubHuvGFt4nH",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VCubHuvGFt4nH",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "normal@jo.com",
|
||||
"metadata": {
|
||||
"id": "000000000000000000000067"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCV0KaReE7xLUdA7hdLMnV",
|
||||
"customer": "cus_7VCubHuvGFt4nH"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/charges",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"data": [
|
||||
{
|
||||
"id": "ch_17GCUzKaReE7xLUdviRu5P6Z",
|
||||
"amount": 499,
|
||||
"customer": "cus_7VCubHuvGFt4nH",
|
||||
"metadata": {
|
||||
"productID": "gems_5",
|
||||
"gems": "5000",
|
||||
"timestamp": "1449685028592"
|
||||
},
|
||||
"paid": true,
|
||||
"refunds": {
|
||||
"has_more": false
|
||||
},
|
||||
"source": {
|
||||
"id": "card_17GCUvKaReE7xLUdBp1HF9sT",
|
||||
"customer": "cus_7VCubHuvGFt4nH"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "ch_17GCUxKaReE7xLUddy1fN9Nl",
|
||||
"amount": 499,
|
||||
"customer": "cus_7VCubHuvGFt4nH",
|
||||
"metadata": {
|
||||
"productID": "gems_5",
|
||||
"gems": "5000",
|
||||
"timestamp": "1447443579286"
|
||||
},
|
||||
"paid": true,
|
||||
"refunds": {
|
||||
"has_more": false
|
||||
},
|
||||
"source": {
|
||||
"id": "card_17GCUvKaReE7xLUdBp1HF9sT",
|
||||
"customer": "cus_7VCubHuvGFt4nH"
|
||||
}
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/charges",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "ch_17GCV2KaReE7xLUdffVpUhFO",
|
||||
"amount": 499,
|
||||
"customer": "cus_7VCubHuvGFt4nH",
|
||||
"metadata": {
|
||||
"productID": "gems_5",
|
||||
"gems": "5000",
|
||||
"timestamp": "1449685031026"
|
||||
},
|
||||
"paid": true,
|
||||
"refunds": {
|
||||
"has_more": false
|
||||
},
|
||||
"source": {
|
||||
"id": "card_17GCV0KaReE7xLUdA7hdLMnV",
|
||||
"customer": "cus_7VCubHuvGFt4nH"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VCubHuvGFt4nH",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VCubHuvGFt4nH",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "normal@jo.com",
|
||||
"metadata": {
|
||||
"id": "000000000000000000000067"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCV0KaReE7xLUdA7hdLMnV",
|
||||
"customer": "cus_7VCubHuvGFt4nH"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
168
spec/fixtures/db-payment-stripe-test-05.json
vendored
Normal file
168
spec/fixtures/db-payment-stripe-test-05.json
vendored
Normal file
|
@ -0,0 +1,168 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/tokens",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "tok_17GCV3KaReE7xLUdLcKedDEd",
|
||||
"card": {
|
||||
"id": "card_17GCV3KaReE7xLUdFUXfU85r"
|
||||
},
|
||||
"type": "card"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VCuAQ6nYInY8z",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "normal@jo.com",
|
||||
"metadata": {
|
||||
"id": "000000000000000000000068"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCV3KaReE7xLUdFUXfU85r",
|
||||
"customer": "cus_7VCuAQ6nYInY8z"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/charges",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"has_more": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VCuAQ6nYInY8z",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VCuAQ6nYInY8z",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "normal@jo.com",
|
||||
"metadata": {
|
||||
"id": "000000000000000000000068"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCV3KaReE7xLUdFUXfU85r",
|
||||
"customer": "cus_7VCuAQ6nYInY8z"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/charges",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "ch_17GCV5KaReE7xLUd0amzDJs7",
|
||||
"amount": 499,
|
||||
"customer": "cus_7VCuAQ6nYInY8z",
|
||||
"metadata": {
|
||||
"productID": "gems_5",
|
||||
"gems": "5000",
|
||||
"timestamp": "1447443579286"
|
||||
},
|
||||
"paid": true,
|
||||
"refunds": {
|
||||
"has_more": false
|
||||
},
|
||||
"source": {
|
||||
"id": "card_17GCV3KaReE7xLUdFUXfU85r",
|
||||
"customer": "cus_7VCuAQ6nYInY8z"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VCuAQ6nYInY8z",
|
||||
"status": 400,
|
||||
"response": {
|
||||
"error": {
|
||||
"type": "invalid_request_error"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/charges",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"data": [
|
||||
{
|
||||
"id": "ch_17GCV5KaReE7xLUd0amzDJs7",
|
||||
"amount": 499,
|
||||
"customer": "cus_7VCuAQ6nYInY8z",
|
||||
"metadata": {
|
||||
"productID": "gems_5",
|
||||
"gems": "5000",
|
||||
"timestamp": "1447443579286"
|
||||
},
|
||||
"paid": true,
|
||||
"refunds": {
|
||||
"has_more": false
|
||||
},
|
||||
"source": {
|
||||
"id": "card_17GCV3KaReE7xLUdFUXfU85r",
|
||||
"customer": "cus_7VCuAQ6nYInY8z"
|
||||
}
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/charges",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "ch_17GCV6KaReE7xLUdiTvUGa07",
|
||||
"amount": 499,
|
||||
"customer": "cus_7VCuAQ6nYInY8z",
|
||||
"metadata": {
|
||||
"productID": "gems_5",
|
||||
"gems": "5000",
|
||||
"timestamp": "1447443579286"
|
||||
},
|
||||
"paid": true,
|
||||
"refunds": {
|
||||
"has_more": false
|
||||
},
|
||||
"source": {
|
||||
"id": "card_17GCV3KaReE7xLUdFUXfU85r",
|
||||
"customer": "cus_7VCuAQ6nYInY8z"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
91
spec/fixtures/db-payment-stripe-test-06.json
vendored
Normal file
91
spec/fixtures/db-payment-stripe-test-06.json
vendored
Normal file
|
@ -0,0 +1,91 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/tokens",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "tok_17GCV7KaReE7xLUd3gnnjv7x",
|
||||
"card": {
|
||||
"id": "card_17GCV7KaReE7xLUdiPjgEUMd"
|
||||
},
|
||||
"type": "card"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VCuzP303kt1eU",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "normal@jo.com",
|
||||
"metadata": {
|
||||
"id": "000000000000000000000069"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCV7KaReE7xLUdiPjgEUMd",
|
||||
"customer": "cus_7VCuzP303kt1eU"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/charges",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"has_more": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VCuzP303kt1eU",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VCuzP303kt1eU",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "normal@jo.com",
|
||||
"metadata": {
|
||||
"id": "000000000000000000000069"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCV7KaReE7xLUdiPjgEUMd",
|
||||
"customer": "cus_7VCuzP303kt1eU"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/charges",
|
||||
"status": 402,
|
||||
"response": {
|
||||
"error": {
|
||||
"type": "card_error"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
66
spec/fixtures/db-payment-stripe-test-07.json
vendored
Normal file
66
spec/fixtures/db-payment-stripe-test-07.json
vendored
Normal file
|
@ -0,0 +1,66 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/tokens",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "tok_17GCV9KaReE7xLUdelU9sCaA",
|
||||
"card": {
|
||||
"id": "card_17GCV9KaReE7xLUd5uODONlo"
|
||||
},
|
||||
"type": "card"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VCuzP303kt1eU",
|
||||
"status": 402,
|
||||
"response": {
|
||||
"error": {
|
||||
"type": "card_error"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/charges",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"data": [
|
||||
{
|
||||
"id": "ch_17GCV9KaReE7xLUduvVirhN5",
|
||||
"amount": 499,
|
||||
"customer": "cus_7VCuzP303kt1eU",
|
||||
"metadata": {
|
||||
"productID": "gems_5",
|
||||
"gems": "5000",
|
||||
"timestamp": "1449685037831"
|
||||
},
|
||||
"paid": false,
|
||||
"refunds": {
|
||||
"has_more": false
|
||||
},
|
||||
"source": {
|
||||
"id": "card_17GCV7KaReE7xLUdiPjgEUMd",
|
||||
"customer": "cus_7VCuzP303kt1eU"
|
||||
}
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/charges",
|
||||
"status": 402,
|
||||
"response": {
|
||||
"error": {
|
||||
"type": "card_error"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
84
spec/fixtures/db-payment-stripe-test-08.json
vendored
Normal file
84
spec/fixtures/db-payment-stripe-test-08.json
vendored
Normal file
|
@ -0,0 +1,84 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/tokens",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "tok_17GCVCKaReE7xLUdWbFQacYN",
|
||||
"card": {
|
||||
"id": "card_17GCVCKaReE7xLUdjoXBJKqC"
|
||||
},
|
||||
"type": "card"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VCuzP303kt1eU",
|
||||
"status": 402,
|
||||
"response": {
|
||||
"error": {
|
||||
"type": "card_error"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/charges",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"data": [
|
||||
{
|
||||
"id": "ch_17GCVBKaReE7xLUduQybm6xT",
|
||||
"amount": 499,
|
||||
"customer": "cus_7VCuzP303kt1eU",
|
||||
"metadata": {
|
||||
"productID": "gems_5",
|
||||
"gems": "5000",
|
||||
"timestamp": "1449685040285"
|
||||
},
|
||||
"paid": false,
|
||||
"refunds": {
|
||||
"has_more": false
|
||||
},
|
||||
"source": {
|
||||
"id": "card_17GCV7KaReE7xLUdiPjgEUMd",
|
||||
"customer": "cus_7VCuzP303kt1eU"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "ch_17GCV9KaReE7xLUduvVirhN5",
|
||||
"amount": 499,
|
||||
"customer": "cus_7VCuzP303kt1eU",
|
||||
"metadata": {
|
||||
"productID": "gems_5",
|
||||
"gems": "5000",
|
||||
"timestamp": "1449685037831"
|
||||
},
|
||||
"paid": false,
|
||||
"refunds": {
|
||||
"has_more": false
|
||||
},
|
||||
"source": {
|
||||
"id": "card_17GCV7KaReE7xLUdiPjgEUMd",
|
||||
"customer": "cus_7VCuzP303kt1eU"
|
||||
}
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/charges",
|
||||
"status": 402,
|
||||
"response": {
|
||||
"error": {
|
||||
"type": "card_error"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
102
spec/fixtures/db-payment-stripe-test-09.json
vendored
Normal file
102
spec/fixtures/db-payment-stripe-test-09.json
vendored
Normal file
|
@ -0,0 +1,102 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/tokens",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "tok_17GCVEKaReE7xLUdByVccSzA",
|
||||
"card": {
|
||||
"id": "card_17GCVEKaReE7xLUdRUCeIUtP"
|
||||
},
|
||||
"type": "card"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VCuzP303kt1eU",
|
||||
"status": 402,
|
||||
"response": {
|
||||
"error": {
|
||||
"type": "card_error"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/charges",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"data": [
|
||||
{
|
||||
"id": "ch_17GCVDKaReE7xLUdyZAPbXCM",
|
||||
"amount": 499,
|
||||
"customer": "cus_7VCuzP303kt1eU",
|
||||
"metadata": {
|
||||
"productID": "gems_5",
|
||||
"gems": "5000",
|
||||
"timestamp": "1449685042746"
|
||||
},
|
||||
"paid": false,
|
||||
"refunds": {
|
||||
"has_more": false
|
||||
},
|
||||
"source": {
|
||||
"id": "card_17GCV7KaReE7xLUdiPjgEUMd",
|
||||
"customer": "cus_7VCuzP303kt1eU"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "ch_17GCVBKaReE7xLUduQybm6xT",
|
||||
"amount": 499,
|
||||
"customer": "cus_7VCuzP303kt1eU",
|
||||
"metadata": {
|
||||
"productID": "gems_5",
|
||||
"gems": "5000",
|
||||
"timestamp": "1449685040285"
|
||||
},
|
||||
"paid": false,
|
||||
"refunds": {
|
||||
"has_more": false
|
||||
},
|
||||
"source": {
|
||||
"id": "card_17GCV7KaReE7xLUdiPjgEUMd",
|
||||
"customer": "cus_7VCuzP303kt1eU"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "ch_17GCV9KaReE7xLUduvVirhN5",
|
||||
"amount": 499,
|
||||
"customer": "cus_7VCuzP303kt1eU",
|
||||
"metadata": {
|
||||
"productID": "gems_5",
|
||||
"gems": "5000",
|
||||
"timestamp": "1449685037831"
|
||||
},
|
||||
"paid": false,
|
||||
"refunds": {
|
||||
"has_more": false
|
||||
},
|
||||
"source": {
|
||||
"id": "card_17GCV7KaReE7xLUdiPjgEUMd",
|
||||
"customer": "cus_7VCuzP303kt1eU"
|
||||
}
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/charges",
|
||||
"status": 402,
|
||||
"response": {
|
||||
"error": {
|
||||
"type": "card_error"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
120
spec/fixtures/db-payment-stripe-test-10.json
vendored
Normal file
120
spec/fixtures/db-payment-stripe-test-10.json
vendored
Normal file
|
@ -0,0 +1,120 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/tokens",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "tok_17GCVHKaReE7xLUdB9odSMB6",
|
||||
"card": {
|
||||
"id": "card_17GCVHKaReE7xLUdAYwa1Wkj"
|
||||
},
|
||||
"type": "card"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VCuzP303kt1eU",
|
||||
"status": 402,
|
||||
"response": {
|
||||
"error": {
|
||||
"type": "card_error"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/charges",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"data": [
|
||||
{
|
||||
"id": "ch_17GCVGKaReE7xLUdu3HU9wB5",
|
||||
"amount": 499,
|
||||
"customer": "cus_7VCuzP303kt1eU",
|
||||
"metadata": {
|
||||
"productID": "gems_5",
|
||||
"gems": "5000",
|
||||
"timestamp": "1449685044928"
|
||||
},
|
||||
"paid": false,
|
||||
"refunds": {
|
||||
"has_more": false
|
||||
},
|
||||
"source": {
|
||||
"id": "card_17GCV7KaReE7xLUdiPjgEUMd",
|
||||
"customer": "cus_7VCuzP303kt1eU"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "ch_17GCVDKaReE7xLUdyZAPbXCM",
|
||||
"amount": 499,
|
||||
"customer": "cus_7VCuzP303kt1eU",
|
||||
"metadata": {
|
||||
"productID": "gems_5",
|
||||
"gems": "5000",
|
||||
"timestamp": "1449685042746"
|
||||
},
|
||||
"paid": false,
|
||||
"refunds": {
|
||||
"has_more": false
|
||||
},
|
||||
"source": {
|
||||
"id": "card_17GCV7KaReE7xLUdiPjgEUMd",
|
||||
"customer": "cus_7VCuzP303kt1eU"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "ch_17GCVBKaReE7xLUduQybm6xT",
|
||||
"amount": 499,
|
||||
"customer": "cus_7VCuzP303kt1eU",
|
||||
"metadata": {
|
||||
"productID": "gems_5",
|
||||
"gems": "5000",
|
||||
"timestamp": "1449685040285"
|
||||
},
|
||||
"paid": false,
|
||||
"refunds": {
|
||||
"has_more": false
|
||||
},
|
||||
"source": {
|
||||
"id": "card_17GCV7KaReE7xLUdiPjgEUMd",
|
||||
"customer": "cus_7VCuzP303kt1eU"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "ch_17GCV9KaReE7xLUduvVirhN5",
|
||||
"amount": 499,
|
||||
"customer": "cus_7VCuzP303kt1eU",
|
||||
"metadata": {
|
||||
"productID": "gems_5",
|
||||
"gems": "5000",
|
||||
"timestamp": "1449685037831"
|
||||
},
|
||||
"paid": false,
|
||||
"refunds": {
|
||||
"has_more": false
|
||||
},
|
||||
"source": {
|
||||
"id": "card_17GCV7KaReE7xLUdiPjgEUMd",
|
||||
"customer": "cus_7VCuzP303kt1eU"
|
||||
}
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/charges",
|
||||
"status": 402,
|
||||
"response": {
|
||||
"error": {
|
||||
"type": "card_error"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
15
spec/fixtures/db-prepaid-purchase-course-test-1.json
vendored
Normal file
15
spec/fixtures/db-prepaid-purchase-course-test-1.json
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/tokens",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "tok_17GCVVKaReE7xLUd9mYY9N7i",
|
||||
"card": {
|
||||
"id": "card_17GCVVKaReE7xLUdlhNMXbGd"
|
||||
},
|
||||
"type": "card"
|
||||
}
|
||||
}
|
||||
]
|
95
spec/fixtures/db-prepaid-purchase-course-test-2.json
vendored
Normal file
95
spec/fixtures/db-prepaid-purchase-course-test-2.json
vendored
Normal file
|
@ -0,0 +1,95 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/tokens",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "tok_17GCVVKaReE7xLUdNnWusa8M",
|
||||
"card": {
|
||||
"id": "card_17GCVVKaReE7xLUdNzakl6za"
|
||||
},
|
||||
"type": "card"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VCvt7iNlagXQA",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user88@me.com",
|
||||
"metadata": {
|
||||
"id": "000000000000000000000080"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCVVKaReE7xLUdNzakl6za",
|
||||
"customer": "cus_7VCvt7iNlagXQA"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VCvt7iNlagXQA",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VCvt7iNlagXQA",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user88@me.com",
|
||||
"metadata": {
|
||||
"id": "000000000000000000000080"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCVVKaReE7xLUdNzakl6za",
|
||||
"customer": "cus_7VCvt7iNlagXQA"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/charges",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "ch_17GCVWKaReE7xLUdZLmqWCt6",
|
||||
"amount": 400,
|
||||
"customer": "cus_7VCvt7iNlagXQA",
|
||||
"metadata": {
|
||||
"type": "course",
|
||||
"timestamp": "1449685061856",
|
||||
"productID": "prepaid course"
|
||||
},
|
||||
"paid": true,
|
||||
"refunds": {
|
||||
"has_more": false
|
||||
},
|
||||
"source": {
|
||||
"id": "card_17GCVVKaReE7xLUdNzakl6za",
|
||||
"customer": "cus_7VCvt7iNlagXQA"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
67
spec/fixtures/db-prepaid-purchase-course-test-3.json
vendored
Normal file
67
spec/fixtures/db-prepaid-purchase-course-test-3.json
vendored
Normal file
|
@ -0,0 +1,67 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/tokens",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "tok_17GCVXKaReE7xLUdOVrQZisx",
|
||||
"card": {
|
||||
"id": "card_17GCVXKaReE7xLUdFEluXOeu"
|
||||
},
|
||||
"type": "card"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VCvUi50nXhjWn",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user89@me.com",
|
||||
"metadata": {
|
||||
"id": "000000000000000000000081"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCVXKaReE7xLUdFEluXOeu",
|
||||
"customer": "cus_7VCvUi50nXhjWn"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/charges",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "ch_17GCVYKaReE7xLUdstf63Kol",
|
||||
"amount": 1200,
|
||||
"customer": "cus_7VCvUi50nXhjWn",
|
||||
"metadata": {
|
||||
"type": "course",
|
||||
"timestamp": "1449685063457",
|
||||
"productID": "prepaid course"
|
||||
},
|
||||
"paid": true,
|
||||
"refunds": {
|
||||
"has_more": false
|
||||
},
|
||||
"source": {
|
||||
"id": "card_17GCVXKaReE7xLUdFEluXOeu",
|
||||
"customer": "cus_7VCvUi50nXhjWn"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
15
spec/fixtures/db-prepaid-purchase-term-sub-test-1.json
vendored
Normal file
15
spec/fixtures/db-prepaid-purchase-term-sub-test-1.json
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/tokens",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "tok_17GCVZKaReE7xLUdc2sd97Kh",
|
||||
"card": {
|
||||
"id": "card_17GCVZKaReE7xLUdAQ3WCuCA"
|
||||
},
|
||||
"type": "card"
|
||||
}
|
||||
}
|
||||
]
|
15
spec/fixtures/db-prepaid-purchase-term-sub-test-2.json
vendored
Normal file
15
spec/fixtures/db-prepaid-purchase-term-sub-test-2.json
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/tokens",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "tok_17GCVZKaReE7xLUdLm4xB9Q4",
|
||||
"card": {
|
||||
"id": "card_17GCVZKaReE7xLUdfv42GBHU"
|
||||
},
|
||||
"type": "card"
|
||||
}
|
||||
}
|
||||
]
|
15
spec/fixtures/db-prepaid-purchase-term-sub-test-3.json
vendored
Normal file
15
spec/fixtures/db-prepaid-purchase-term-sub-test-3.json
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/tokens",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "tok_17GCVaKaReE7xLUdQP3U2KmC",
|
||||
"card": {
|
||||
"id": "card_17GCVaKaReE7xLUdCItK5QND"
|
||||
},
|
||||
"type": "card"
|
||||
}
|
||||
}
|
||||
]
|
15
spec/fixtures/db-prepaid-purchase-term-sub-test-4.json
vendored
Normal file
15
spec/fixtures/db-prepaid-purchase-term-sub-test-4.json
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/tokens",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "tok_17GCVaKaReE7xLUdfcArqe1K",
|
||||
"card": {
|
||||
"id": "card_17GCVaKaReE7xLUdQXuE34GK"
|
||||
},
|
||||
"type": "card"
|
||||
}
|
||||
}
|
||||
]
|
15
spec/fixtures/db-prepaid-purchase-term-sub-test-5.json
vendored
Normal file
15
spec/fixtures/db-prepaid-purchase-term-sub-test-5.json
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/tokens",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "tok_17GCVaKaReE7xLUdZqrHnDcB",
|
||||
"card": {
|
||||
"id": "card_17GCVaKaReE7xLUdu0XGOs3Q"
|
||||
},
|
||||
"type": "card"
|
||||
}
|
||||
}
|
||||
]
|
15
spec/fixtures/db-prepaid-purchase-term-sub-test-6.json
vendored
Normal file
15
spec/fixtures/db-prepaid-purchase-term-sub-test-6.json
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/tokens",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "tok_17GCVbKaReE7xLUdZSSwB8CG",
|
||||
"card": {
|
||||
"id": "card_17GCVbKaReE7xLUdsdKXR63y"
|
||||
},
|
||||
"type": "card"
|
||||
}
|
||||
}
|
||||
]
|
15
spec/fixtures/db-prepaid-purchase-term-sub-test-7.json
vendored
Normal file
15
spec/fixtures/db-prepaid-purchase-term-sub-test-7.json
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/tokens",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "tok_17GCVbKaReE7xLUdswrosKLO",
|
||||
"card": {
|
||||
"id": "card_17GCVbKaReE7xLUdiINiC8ab"
|
||||
},
|
||||
"type": "card"
|
||||
}
|
||||
}
|
||||
]
|
265
spec/fixtures/db-prepaid-purchase-term-sub-test-8.json
vendored
Normal file
265
spec/fixtures/db-prepaid-purchase-term-sub-test-8.json
vendored
Normal file
|
@ -0,0 +1,265 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/tokens",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "tok_17GCVcKaReE7xLUdB5HnT2wI",
|
||||
"card": {
|
||||
"id": "card_17GCVcKaReE7xLUd7R94nEhN"
|
||||
},
|
||||
"type": "card"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VCvcfu4XzeCbM",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "normal@jo.com",
|
||||
"metadata": {
|
||||
"id": "000000000000000000000088"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCVcKaReE7xLUd7R94nEhN",
|
||||
"customer": "cus_7VCvcfu4XzeCbM"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VCvcfu4XzeCbM",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VCvcfu4XzeCbM",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "normal@jo.com",
|
||||
"metadata": {
|
||||
"id": "000000000000000000000088"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCVcKaReE7xLUd7R94nEhN",
|
||||
"customer": "cus_7VCvcfu4XzeCbM"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VCvcfu4XzeCbM/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VCvEG141oJimL",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452363470,
|
||||
"current_period_start": 1449685070,
|
||||
"customer": "cus_7VCvcfu4XzeCbM",
|
||||
"metadata": {
|
||||
"id": "000000000000000000000088"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/tokens",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "tok_17GCVfKaReE7xLUdIvigMi5U",
|
||||
"card": {
|
||||
"id": "card_17GCVfKaReE7xLUdks8zeqw5"
|
||||
},
|
||||
"type": "card"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VCvcfu4XzeCbM",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VCvcfu4XzeCbM",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "normal@jo.com",
|
||||
"metadata": {
|
||||
"id": "000000000000000000000088"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCVcKaReE7xLUd7R94nEhN",
|
||||
"customer": "cus_7VCvcfu4XzeCbM"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VCvEG141oJimL",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452363470,
|
||||
"current_period_start": 1449685070,
|
||||
"customer": "cus_7VCvcfu4XzeCbM",
|
||||
"metadata": {
|
||||
"id": "000000000000000000000088"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VCvcfu4XzeCbM",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VCvcfu4XzeCbM",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "normal@jo.com",
|
||||
"metadata": {
|
||||
"id": "000000000000000000000088"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCVfKaReE7xLUdks8zeqw5",
|
||||
"customer": "cus_7VCvcfu4XzeCbM"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VCvEG141oJimL",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452363470,
|
||||
"current_period_start": 1449685070,
|
||||
"customer": "cus_7VCvcfu4XzeCbM",
|
||||
"metadata": {
|
||||
"id": "000000000000000000000088"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VCvcfu4XzeCbM",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VCvcfu4XzeCbM",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "normal@jo.com",
|
||||
"metadata": {
|
||||
"id": "000000000000000000000088"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCVfKaReE7xLUdks8zeqw5",
|
||||
"customer": "cus_7VCvcfu4XzeCbM"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VCvEG141oJimL",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452363470,
|
||||
"current_period_start": 1449685070,
|
||||
"customer": "cus_7VCvcfu4XzeCbM",
|
||||
"metadata": {
|
||||
"id": "000000000000000000000088"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/charges",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "ch_17GCVgKaReE7xLUdTqpuyEWR",
|
||||
"amount": 8991,
|
||||
"customer": "cus_7VCvcfu4XzeCbM",
|
||||
"metadata": {
|
||||
"type": "terminal_subscription",
|
||||
"timestamp": "1449685071367",
|
||||
"months": "3",
|
||||
"productID": "prepaid terminal_subscription"
|
||||
},
|
||||
"paid": true,
|
||||
"refunds": {
|
||||
"has_more": false
|
||||
},
|
||||
"source": {
|
||||
"id": "card_17GCVfKaReE7xLUdks8zeqw5",
|
||||
"customer": "cus_7VCvcfu4XzeCbM"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
157
spec/fixtures/db-sub-redeem-test-1.json
vendored
Normal file
157
spec/fixtures/db-sub-redeem-test-1.json
vendored
Normal file
|
@ -0,0 +1,157 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VCvcfu4XzeCbM",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VCvcfu4XzeCbM",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "normal@jo.com",
|
||||
"metadata": {
|
||||
"id": "000000000000000000000088"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCVfKaReE7xLUdks8zeqw5",
|
||||
"customer": "cus_7VCvcfu4XzeCbM"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VCvEG141oJimL",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452363470,
|
||||
"current_period_start": 1449685070,
|
||||
"customer": "cus_7VCvcfu4XzeCbM",
|
||||
"metadata": {
|
||||
"id": "000000000000000000000088"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VCvcfu4XzeCbM/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VCvEG141oJimL",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452363470,
|
||||
"current_period_start": 1449685070,
|
||||
"customer": "cus_7VCvcfu4XzeCbM",
|
||||
"metadata": {
|
||||
"id": "000000000000000000000088"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VCvcfu4XzeCbM/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VCvEG141oJimL",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452363470,
|
||||
"current_period_start": 1449685070,
|
||||
"customer": "cus_7VCvcfu4XzeCbM",
|
||||
"metadata": {
|
||||
"id": "000000000000000000000088"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "DELETE",
|
||||
"path": "/v1/customers/cus_7VCvcfu4XzeCbM/subscriptions/sub_7VCvEG141oJimL",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VCvEG141oJimL",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452363470,
|
||||
"current_period_start": 1449685070,
|
||||
"customer": "cus_7VCvcfu4XzeCbM",
|
||||
"metadata": {
|
||||
"id": "000000000000000000000088"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VCvcfu4XzeCbM",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VCvcfu4XzeCbM",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "normal@jo.com",
|
||||
"metadata": {
|
||||
"id": "000000000000000000000088"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCVfKaReE7xLUdks8zeqw5",
|
||||
"customer": "cus_7VCvcfu4XzeCbM"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VCvcfu4XzeCbM/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
]
|
96
spec/fixtures/db-sub-redeem-test-2.json
vendored
Normal file
96
spec/fixtures/db-sub-redeem-test-2.json
vendored
Normal file
|
@ -0,0 +1,96 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/tokens",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "tok_17GCVlKaReE7xLUdrgB5G5sg",
|
||||
"card": {
|
||||
"id": "card_17GCVkKaReE7xLUdhnarn1rx"
|
||||
},
|
||||
"type": "card"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VCvhVTldJ0ArC",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user98@me.com",
|
||||
"metadata": {
|
||||
"id": "00000000000000000000008c"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCVkKaReE7xLUdhnarn1rx",
|
||||
"customer": "cus_7VCvhVTldJ0ArC"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VCvhVTldJ0ArC",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VCvhVTldJ0ArC",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user98@me.com",
|
||||
"metadata": {
|
||||
"id": "00000000000000000000008c"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCVkKaReE7xLUdhnarn1rx",
|
||||
"customer": "cus_7VCvhVTldJ0ArC"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/charges",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "ch_17GCVlKaReE7xLUd5D6k1v4E",
|
||||
"amount": 2997,
|
||||
"customer": "cus_7VCvhVTldJ0ArC",
|
||||
"metadata": {
|
||||
"type": "terminal_subscription",
|
||||
"timestamp": "1449685077119",
|
||||
"months": "1",
|
||||
"productID": "prepaid terminal_subscription"
|
||||
},
|
||||
"paid": true,
|
||||
"refunds": {
|
||||
"has_more": false
|
||||
},
|
||||
"source": {
|
||||
"id": "card_17GCVkKaReE7xLUdhnarn1rx",
|
||||
"customer": "cus_7VCvhVTldJ0ArC"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
26
spec/fixtures/db-user-sub-test-1.json
vendored
Normal file
26
spec/fixtures/db-user-sub-test-1.json
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/tokens",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "tok_17GCVmKaReE7xLUd3TTueitH",
|
||||
"card": {
|
||||
"id": "card_17GCVmKaReE7xLUdErwdQ45K"
|
||||
},
|
||||
"type": "card"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers",
|
||||
"status": 402,
|
||||
"response": {
|
||||
"error": {
|
||||
"type": "card_error"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
64
spec/fixtures/db-user-sub-test-2.json
vendored
Normal file
64
spec/fixtures/db-user-sub-test-2.json
vendored
Normal file
|
@ -0,0 +1,64 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/tokens",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "tok_17GCVoKaReE7xLUdWKRMzFDb",
|
||||
"card": {
|
||||
"id": "card_17GCVoKaReE7xLUdpf0crA0p"
|
||||
},
|
||||
"type": "card"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VCvUEDSyqS8aN",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "normal@jo.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a1"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCVoKaReE7xLUdpf0crA0p",
|
||||
"customer": "cus_7VCvUEDSyqS8aN"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VCvUEDSyqS8aN/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VCvXO37PhGOUY",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452363481,
|
||||
"current_period_start": 1449685081,
|
||||
"customer": "cus_7VCvUEDSyqS8aN",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a1"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
}
|
||||
]
|
116
spec/fixtures/db-user-sub-test-3.json
vendored
Normal file
116
spec/fixtures/db-user-sub-test-3.json
vendored
Normal file
|
@ -0,0 +1,116 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/invoices",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"data": [
|
||||
{
|
||||
"id": "in_17GCVpKaReE7xLUdPDEmVDeD",
|
||||
"customer": "cus_7VCvUEDSyqS8aN",
|
||||
"lines": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VCvXO37PhGOUY",
|
||||
"amount": 999,
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a1"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"proration": false,
|
||||
"quantity": 1,
|
||||
"type": "subscription"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"paid": true,
|
||||
"subscription": "sub_7VCvXO37PhGOUY",
|
||||
"total": 999
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/invoices/in_17GCVpKaReE7xLUdPDEmVDeD",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "in_17GCVpKaReE7xLUdPDEmVDeD",
|
||||
"customer": "cus_7VCvUEDSyqS8aN",
|
||||
"lines": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VCvXO37PhGOUY",
|
||||
"amount": 999,
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a1"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"proration": false,
|
||||
"quantity": 1,
|
||||
"type": "subscription"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"paid": true,
|
||||
"subscription": "sub_7VCvXO37PhGOUY",
|
||||
"total": 999
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VCvUEDSyqS8aN",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VCvUEDSyqS8aN",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "normal@jo.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a1"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCVoKaReE7xLUdpf0crA0p",
|
||||
"customer": "cus_7VCvUEDSyqS8aN"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VCvXO37PhGOUY",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452363481,
|
||||
"current_period_start": 1449685081,
|
||||
"customer": "cus_7VCvUEDSyqS8aN",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a1"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
68
spec/fixtures/db-user-sub-test-4.json
vendored
Normal file
68
spec/fixtures/db-user-sub-test-4.json
vendored
Normal file
|
@ -0,0 +1,68 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "DELETE",
|
||||
"path": "/v1/customers/cus_7VCvUEDSyqS8aN/subscriptions/sub_7VCvXO37PhGOUY",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VCvXO37PhGOUY",
|
||||
"cancel_at_period_end": true,
|
||||
"current_period_end": 1452363481,
|
||||
"current_period_start": 1449685081,
|
||||
"customer": "cus_7VCvUEDSyqS8aN",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a1"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VCvUEDSyqS8aN",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VCvUEDSyqS8aN",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "normal@jo.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a1"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCVoKaReE7xLUdpf0crA0p",
|
||||
"customer": "cus_7VCvUEDSyqS8aN"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VCvXO37PhGOUY",
|
||||
"cancel_at_period_end": true,
|
||||
"current_period_end": 1452363481,
|
||||
"current_period_start": 1449685081,
|
||||
"customer": "cus_7VCvUEDSyqS8aN",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a1"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
115
spec/fixtures/db-user-sub-test-5.json
vendored
Normal file
115
spec/fixtures/db-user-sub-test-5.json
vendored
Normal file
|
@ -0,0 +1,115 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VCvUEDSyqS8aN",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VCvUEDSyqS8aN",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "normal@jo.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a1"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCVoKaReE7xLUdpf0crA0p",
|
||||
"customer": "cus_7VCvUEDSyqS8aN"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VCvXO37PhGOUY",
|
||||
"cancel_at_period_end": true,
|
||||
"current_period_end": 1452363481,
|
||||
"current_period_start": 1449685081,
|
||||
"customer": "cus_7VCvUEDSyqS8aN",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a1"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VCvUEDSyqS8aN/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VCvXO37PhGOUY",
|
||||
"cancel_at_period_end": true,
|
||||
"current_period_end": 1452363481,
|
||||
"current_period_start": 1449685081,
|
||||
"customer": "cus_7VCvUEDSyqS8aN",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a1"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "DELETE",
|
||||
"path": "/v1/customers/cus_7VCvUEDSyqS8aN/subscriptions/sub_7VCvXO37PhGOUY",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VCvXO37PhGOUY",
|
||||
"cancel_at_period_end": true,
|
||||
"current_period_end": 1452363481,
|
||||
"current_period_start": 1449685081,
|
||||
"customer": "cus_7VCvUEDSyqS8aN",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a1"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VCvUEDSyqS8aN/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VCv1YWFAmGmed",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452363481,
|
||||
"current_period_start": 1449685087,
|
||||
"customer": "cus_7VCvUEDSyqS8aN",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a1"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
}
|
||||
]
|
97
spec/fixtures/db-user-sub-test-6.json
vendored
Normal file
97
spec/fixtures/db-user-sub-test-6.json
vendored
Normal file
|
@ -0,0 +1,97 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/invoices",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"data": [
|
||||
{
|
||||
"id": "in_17GCVvKaReE7xLUdPf2zkiYX",
|
||||
"customer": "cus_7VCvUEDSyqS8aN",
|
||||
"lines": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VCv1YWFAmGmed",
|
||||
"amount": 0,
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a1"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"proration": false,
|
||||
"quantity": 1,
|
||||
"type": "subscription"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"paid": true,
|
||||
"subscription": "sub_7VCv1YWFAmGmed",
|
||||
"total": 0
|
||||
},
|
||||
{
|
||||
"id": "in_17GCVpKaReE7xLUdPDEmVDeD",
|
||||
"customer": "cus_7VCvUEDSyqS8aN",
|
||||
"lines": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VCvXO37PhGOUY",
|
||||
"amount": 999,
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a1"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"proration": false,
|
||||
"quantity": 1,
|
||||
"type": "subscription"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"paid": true,
|
||||
"subscription": "sub_7VCvXO37PhGOUY",
|
||||
"total": 999
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/invoices/in_17GCVvKaReE7xLUdPf2zkiYX",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "in_17GCVvKaReE7xLUdPf2zkiYX",
|
||||
"customer": "cus_7VCvUEDSyqS8aN",
|
||||
"lines": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VCv1YWFAmGmed",
|
||||
"amount": 0,
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a1"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"proration": false,
|
||||
"quantity": 1,
|
||||
"type": "subscription"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"paid": true,
|
||||
"subscription": "sub_7VCv1YWFAmGmed",
|
||||
"total": 0
|
||||
}
|
||||
}
|
||||
]
|
68
spec/fixtures/db-user-sub-test-7.json
vendored
Normal file
68
spec/fixtures/db-user-sub-test-7.json
vendored
Normal file
|
@ -0,0 +1,68 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VCvUEDSyqS8aN/subscriptions/sub_7VCv1YWFAmGmed",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VCv1YWFAmGmed",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452363481,
|
||||
"current_period_start": 1449685087,
|
||||
"customer": "cus_7VCvUEDSyqS8aN",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a1"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VCvUEDSyqS8aN",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VCvUEDSyqS8aN",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "normal@jo.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a1"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCVoKaReE7xLUdpf0crA0p",
|
||||
"customer": "cus_7VCvUEDSyqS8aN"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VCv1YWFAmGmed",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452363481,
|
||||
"current_period_start": 1449685087,
|
||||
"customer": "cus_7VCvUEDSyqS8aN",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a1"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
248
spec/fixtures/db-user-sub-test-8.json
vendored
Normal file
248
spec/fixtures/db-user-sub-test-8.json
vendored
Normal file
|
@ -0,0 +1,248 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VCvUEDSyqS8aN",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VCvUEDSyqS8aN",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "normal@jo.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a1"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCVoKaReE7xLUdpf0crA0p",
|
||||
"customer": "cus_7VCvUEDSyqS8aN"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VCv1YWFAmGmed",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452363481,
|
||||
"current_period_start": 1449685087,
|
||||
"customer": "cus_7VCvUEDSyqS8aN",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a1"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VCvUEDSyqS8aN/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VCvB079Vlyv2a",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452363490,
|
||||
"current_period_start": 1449685090,
|
||||
"customer": "cus_7VCvUEDSyqS8aN",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a1"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VCvUEDSyqS8aN",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VCvUEDSyqS8aN",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "newEmail@gmail.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a1"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCVoKaReE7xLUdpf0crA0p",
|
||||
"customer": "cus_7VCvUEDSyqS8aN"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VCvB079Vlyv2a",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452363490,
|
||||
"current_period_start": 1449685090,
|
||||
"customer": "cus_7VCvUEDSyqS8aN",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a1"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
},
|
||||
{
|
||||
"id": "sub_7VCv1YWFAmGmed",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452363481,
|
||||
"current_period_start": 1449685087,
|
||||
"customer": "cus_7VCvUEDSyqS8aN",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a1"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VCvUEDSyqS8aN",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VCvUEDSyqS8aN",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "newEmail@gmail.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a1"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCVoKaReE7xLUdpf0crA0p",
|
||||
"customer": "cus_7VCvUEDSyqS8aN"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VCvB079Vlyv2a",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452363490,
|
||||
"current_period_start": 1449685090,
|
||||
"customer": "cus_7VCvUEDSyqS8aN",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a1"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
},
|
||||
{
|
||||
"id": "sub_7VCv1YWFAmGmed",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452363481,
|
||||
"current_period_start": 1449685087,
|
||||
"customer": "cus_7VCvUEDSyqS8aN",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a1"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VCvUEDSyqS8aN",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VCvUEDSyqS8aN",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "newEmail@gmail.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a1"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCVoKaReE7xLUdpf0crA0p",
|
||||
"customer": "cus_7VCvUEDSyqS8aN"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VCvB079Vlyv2a",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452363490,
|
||||
"current_period_start": 1449685090,
|
||||
"customer": "cus_7VCvUEDSyqS8aN",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a1"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
},
|
||||
{
|
||||
"id": "sub_7VCv1YWFAmGmed",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452363481,
|
||||
"current_period_start": 1449685087,
|
||||
"customer": "cus_7VCvUEDSyqS8aN",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a1"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
92
spec/fixtures/sub-test-01.json
vendored
Normal file
92
spec/fixtures/sub-test-01.json
vendored
Normal file
|
@ -0,0 +1,92 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/tokens",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "tok_17GCvTKaReE7xLUdvh4VgxLe",
|
||||
"card": {
|
||||
"id": "card_17GCvTKaReE7xLUdfBe38ijD"
|
||||
},
|
||||
"type": "card"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDMXnBgJmAcyq",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user100@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a2"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCvTKaReE7xLUdfBe38ijD",
|
||||
"customer": "cus_7VDMXnBgJmAcyq"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDMXnBgJmAcyq",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDMXnBgJmAcyq",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user100@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a2"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCvTKaReE7xLUdfBe38ijD",
|
||||
"customer": "cus_7VDMXnBgJmAcyq"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDMXnBgJmAcyq/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDMPjS8P0Au1a",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365072,
|
||||
"current_period_start": 1449686672,
|
||||
"customer": "cus_7VDMXnBgJmAcyq",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a2"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
}
|
||||
]
|
196
spec/fixtures/sub-test-02.json
vendored
Normal file
196
spec/fixtures/sub-test-02.json
vendored
Normal file
|
@ -0,0 +1,196 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/tokens",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "tok_17GCvVKaReE7xLUdWKG9Sa0e",
|
||||
"card": {
|
||||
"id": "card_17GCvVKaReE7xLUdcFaT6hqy"
|
||||
},
|
||||
"type": "card"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDMJJrLqZe8Wi",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user101@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a3"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCvVKaReE7xLUdcFaT6hqy",
|
||||
"customer": "cus_7VDMJJrLqZe8Wi"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDMJJrLqZe8Wi/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDMlTOqYJPAT3",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365074,
|
||||
"current_period_start": 1449686674,
|
||||
"customer": "cus_7VDMJJrLqZe8Wi",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a3"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDMJJrLqZe8Wi",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDMJJrLqZe8Wi",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user101@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a3"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCvVKaReE7xLUdcFaT6hqy",
|
||||
"customer": "cus_7VDMJJrLqZe8Wi"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDMlTOqYJPAT3",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365074,
|
||||
"current_period_start": 1449686674,
|
||||
"customer": "cus_7VDMJJrLqZe8Wi",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a3"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "DELETE",
|
||||
"path": "/v1/customers/cus_7VDMJJrLqZe8Wi/subscriptions/sub_7VDMlTOqYJPAT3",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDMlTOqYJPAT3",
|
||||
"cancel_at_period_end": true,
|
||||
"current_period_end": 1452365074,
|
||||
"current_period_start": 1449686674,
|
||||
"customer": "cus_7VDMJJrLqZe8Wi",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a3"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDMJJrLqZe8Wi",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDMJJrLqZe8Wi",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user101@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a3"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCvVKaReE7xLUdcFaT6hqy",
|
||||
"customer": "cus_7VDMJJrLqZe8Wi"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDMlTOqYJPAT3",
|
||||
"cancel_at_period_end": true,
|
||||
"current_period_end": 1452365074,
|
||||
"current_period_start": 1449686674,
|
||||
"customer": "cus_7VDMJJrLqZe8Wi",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a3"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VDMJJrLqZe8Wi/subscriptions/sub_7VDMlTOqYJPAT3",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDMlTOqYJPAT3",
|
||||
"cancel_at_period_end": true,
|
||||
"current_period_end": 1452365074,
|
||||
"current_period_start": 1449686674,
|
||||
"customer": "cus_7VDMJJrLqZe8Wi",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a3"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
}
|
||||
]
|
314
spec/fixtures/sub-test-03.json
vendored
Normal file
314
spec/fixtures/sub-test-03.json
vendored
Normal file
|
@ -0,0 +1,314 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/tokens",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "tok_17GCvZKaReE7xLUdypujc0WH",
|
||||
"card": {
|
||||
"id": "card_17GCvZKaReE7xLUdwixI8vqT"
|
||||
},
|
||||
"type": "card"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDMp8mEu4xG73",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user102@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a4"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCvZKaReE7xLUdwixI8vqT",
|
||||
"customer": "cus_7VDMp8mEu4xG73"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDMp8mEu4xG73",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDMp8mEu4xG73",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user102@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a4"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCvZKaReE7xLUdwixI8vqT",
|
||||
"customer": "cus_7VDMp8mEu4xG73"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDMp8mEu4xG73/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDMsEr2xRuaqt",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365079,
|
||||
"current_period_start": 1449686679,
|
||||
"customer": "cus_7VDMp8mEu4xG73",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a4"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VDMp8mEu4xG73/subscriptions/sub_7VDMsEr2xRuaqt",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDMsEr2xRuaqt",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365079,
|
||||
"current_period_start": 1449686679,
|
||||
"customer": "cus_7VDMp8mEu4xG73",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a4"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDMp8mEu4xG73",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDMp8mEu4xG73",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user102@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a4"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCvZKaReE7xLUdwixI8vqT",
|
||||
"customer": "cus_7VDMp8mEu4xG73"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDMsEr2xRuaqt",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365079,
|
||||
"current_period_start": 1449686679,
|
||||
"customer": "cus_7VDMp8mEu4xG73",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a4"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "DELETE",
|
||||
"path": "/v1/customers/cus_7VDMp8mEu4xG73/subscriptions/sub_7VDMsEr2xRuaqt",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDMsEr2xRuaqt",
|
||||
"cancel_at_period_end": true,
|
||||
"current_period_end": 1452365079,
|
||||
"current_period_start": 1449686679,
|
||||
"customer": "cus_7VDMp8mEu4xG73",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a4"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDMp8mEu4xG73",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDMp8mEu4xG73",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user102@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a4"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCvZKaReE7xLUdwixI8vqT",
|
||||
"customer": "cus_7VDMp8mEu4xG73"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDMsEr2xRuaqt",
|
||||
"cancel_at_period_end": true,
|
||||
"current_period_end": 1452365079,
|
||||
"current_period_start": 1449686679,
|
||||
"customer": "cus_7VDMp8mEu4xG73",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a4"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDMp8mEu4xG73",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDMp8mEu4xG73",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user102@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a4"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCvZKaReE7xLUdwixI8vqT",
|
||||
"customer": "cus_7VDMp8mEu4xG73"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDMsEr2xRuaqt",
|
||||
"cancel_at_period_end": true,
|
||||
"current_period_end": 1452365079,
|
||||
"current_period_start": 1449686679,
|
||||
"customer": "cus_7VDMp8mEu4xG73",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a4"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VDMp8mEu4xG73",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDMp8mEu4xG73",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user102@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a4"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCvZKaReE7xLUdwixI8vqT",
|
||||
"customer": "cus_7VDMp8mEu4xG73"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDMsEr2xRuaqt",
|
||||
"cancel_at_period_end": true,
|
||||
"current_period_end": 1452365079,
|
||||
"current_period_start": 1449686679,
|
||||
"customer": "cus_7VDMp8mEu4xG73",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a4"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
388
spec/fixtures/sub-test-04.json
vendored
Normal file
388
spec/fixtures/sub-test-04.json
vendored
Normal file
|
@ -0,0 +1,388 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDMrdFayaY59E",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user103@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a5"
|
||||
},
|
||||
"sources": {
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDMrdFayaY59E",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDMrdFayaY59E",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user103@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a5"
|
||||
},
|
||||
"sources": {
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDMrdFayaY59E/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDMXEkJJaHxwy",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365082,
|
||||
"current_period_start": 1449686682,
|
||||
"customer": "cus_7VDMrdFayaY59E",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDMrdFayaY59E",
|
||||
"subscription": "sub_7VDMXEkJJaHxwy"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a5"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDMrdFayaY59E",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDMrdFayaY59E",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user103@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a5"
|
||||
},
|
||||
"sources": {
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDMXEkJJaHxwy",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365082,
|
||||
"current_period_start": 1449686682,
|
||||
"customer": "cus_7VDMrdFayaY59E",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDMrdFayaY59E",
|
||||
"subscription": "sub_7VDMXEkJJaHxwy"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a5"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDMrdFayaY59E",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDMrdFayaY59E",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user103@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a5"
|
||||
},
|
||||
"sources": {
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDMXEkJJaHxwy",
|
||||
"cancel_at_period_end": true,
|
||||
"current_period_end": 1452365082,
|
||||
"current_period_start": 1449686682,
|
||||
"customer": "cus_7VDMrdFayaY59E",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDMrdFayaY59E",
|
||||
"subscription": "sub_7VDMXEkJJaHxwy"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a5"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "DELETE",
|
||||
"path": "/v1/customers/cus_7VDMrdFayaY59E/subscriptions/sub_7VDMXEkJJaHxwy",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDMXEkJJaHxwy",
|
||||
"cancel_at_period_end": true,
|
||||
"current_period_end": 1452365082,
|
||||
"current_period_start": 1449686682,
|
||||
"customer": "cus_7VDMrdFayaY59E",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDMrdFayaY59E",
|
||||
"subscription": "sub_7VDMXEkJJaHxwy"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a5"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VDMrdFayaY59E/subscriptions/sub_7VDMXEkJJaHxwy",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDMXEkJJaHxwy",
|
||||
"cancel_at_period_end": true,
|
||||
"current_period_end": 1452365082,
|
||||
"current_period_start": 1449686682,
|
||||
"customer": "cus_7VDMrdFayaY59E",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDMrdFayaY59E",
|
||||
"subscription": "sub_7VDMXEkJJaHxwy"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a5"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VDMrdFayaY59E/subscriptions/sub_7VDMXEkJJaHxwy",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDMXEkJJaHxwy",
|
||||
"cancel_at_period_end": true,
|
||||
"current_period_end": 1452365082,
|
||||
"current_period_start": 1449686682,
|
||||
"customer": "cus_7VDMrdFayaY59E",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDMrdFayaY59E",
|
||||
"subscription": "sub_7VDMXEkJJaHxwy"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a5"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDMrdFayaY59E",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDMrdFayaY59E",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user103@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a5"
|
||||
},
|
||||
"sources": {
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDMXEkJJaHxwy",
|
||||
"cancel_at_period_end": true,
|
||||
"current_period_end": 1452365082,
|
||||
"current_period_start": 1449686682,
|
||||
"customer": "cus_7VDMrdFayaY59E",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDMrdFayaY59E",
|
||||
"subscription": "sub_7VDMXEkJJaHxwy"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a5"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDMrdFayaY59E",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDMrdFayaY59E",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user103@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a5"
|
||||
},
|
||||
"sources": {
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDMXEkJJaHxwy",
|
||||
"cancel_at_period_end": true,
|
||||
"current_period_end": 1452365082,
|
||||
"current_period_start": 1449686682,
|
||||
"customer": "cus_7VDMrdFayaY59E",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDMrdFayaY59E",
|
||||
"subscription": "sub_7VDMXEkJJaHxwy"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a5"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VDMrdFayaY59E",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDMrdFayaY59E",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user103@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a5"
|
||||
},
|
||||
"sources": {
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDMXEkJJaHxwy",
|
||||
"cancel_at_period_end": true,
|
||||
"current_period_end": 1452365082,
|
||||
"current_period_start": 1449686682,
|
||||
"customer": "cus_7VDMrdFayaY59E",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDMrdFayaY59E",
|
||||
"subscription": "sub_7VDMXEkJJaHxwy"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a5"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
264
spec/fixtures/sub-test-05.json
vendored
Normal file
264
spec/fixtures/sub-test-05.json
vendored
Normal file
|
@ -0,0 +1,264 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/tokens",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "tok_17GCviKaReE7xLUdllfxgDvw",
|
||||
"card": {
|
||||
"id": "card_17GCviKaReE7xLUdGzwk7E0z"
|
||||
},
|
||||
"type": "card"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDM2IPe2orhRh",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user104@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a6"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCviKaReE7xLUdGzwk7E0z",
|
||||
"customer": "cus_7VDM2IPe2orhRh"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDM2IPe2orhRh",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDM2IPe2orhRh",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user104@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a6"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCviKaReE7xLUdGzwk7E0z",
|
||||
"customer": "cus_7VDM2IPe2orhRh"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDM2IPe2orhRh/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDMhuoq3WA88F",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365087,
|
||||
"current_period_start": 1449686687,
|
||||
"customer": "cus_7VDM2IPe2orhRh",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a6"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VDM2IPe2orhRh",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDM2IPe2orhRh",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user104@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a6"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCviKaReE7xLUdGzwk7E0z",
|
||||
"customer": "cus_7VDM2IPe2orhRh"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDMhuoq3WA88F",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365087,
|
||||
"current_period_start": 1449686687,
|
||||
"customer": "cus_7VDM2IPe2orhRh",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a6"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDM2IPe2orhRh",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDM2IPe2orhRh",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user104@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a6"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCviKaReE7xLUdGzwk7E0z",
|
||||
"customer": "cus_7VDM2IPe2orhRh"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDMhuoq3WA88F",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365087,
|
||||
"current_period_start": 1449686687,
|
||||
"customer": "cus_7VDM2IPe2orhRh",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a6"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VDM2IPe2orhRh/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDMhuoq3WA88F",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365087,
|
||||
"current_period_start": 1449686687,
|
||||
"customer": "cus_7VDM2IPe2orhRh",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a6"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDM2IPe2orhRh/subscriptions/sub_7VDMhuoq3WA88F",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDMhuoq3WA88F",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365087,
|
||||
"current_period_start": 1449686687,
|
||||
"customer": "cus_7VDM2IPe2orhRh",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDM2IPe2orhRh",
|
||||
"subscription": "sub_7VDMhuoq3WA88F"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a6"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VDM2IPe2orhRh/subscriptions/sub_7VDMhuoq3WA88F",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDMhuoq3WA88F",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365087,
|
||||
"current_period_start": 1449686687,
|
||||
"customer": "cus_7VDM2IPe2orhRh",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDM2IPe2orhRh",
|
||||
"subscription": "sub_7VDMhuoq3WA88F"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a6"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
}
|
||||
]
|
430
spec/fixtures/sub-test-06.json
vendored
Normal file
430
spec/fixtures/sub-test-06.json
vendored
Normal file
|
@ -0,0 +1,430 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/tokens",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "tok_17GCvmKaReE7xLUdhtUTyZlL",
|
||||
"card": {
|
||||
"id": "card_17GCvmKaReE7xLUdt7Yh7qGx"
|
||||
},
|
||||
"type": "card"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDMN7D1kvr7Lg",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user105@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a7"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCvmKaReE7xLUdt7Yh7qGx",
|
||||
"customer": "cus_7VDMN7D1kvr7Lg"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDMN7D1kvr7Lg/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDMS0xOsHmoQm",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365091,
|
||||
"current_period_start": 1449686691,
|
||||
"customer": "cus_7VDMN7D1kvr7Lg",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a7"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDMN7D1kvr7Lg",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDMN7D1kvr7Lg",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user105@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a7"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCvmKaReE7xLUdt7Yh7qGx",
|
||||
"customer": "cus_7VDMN7D1kvr7Lg"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDMS0xOsHmoQm",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365091,
|
||||
"current_period_start": 1449686691,
|
||||
"customer": "cus_7VDMN7D1kvr7Lg",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a7"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDMN7D1kvr7Lg",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDMN7D1kvr7Lg",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user105@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a7"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCvmKaReE7xLUdt7Yh7qGx",
|
||||
"customer": "cus_7VDMN7D1kvr7Lg"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDMS0xOsHmoQm",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365091,
|
||||
"current_period_start": 1449686691,
|
||||
"customer": "cus_7VDMN7D1kvr7Lg",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a7"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDMN7D1kvr7Lg",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDMN7D1kvr7Lg",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user105@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a7"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCvmKaReE7xLUdt7Yh7qGx",
|
||||
"customer": "cus_7VDMN7D1kvr7Lg"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDMS0xOsHmoQm",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365091,
|
||||
"current_period_start": 1449686691,
|
||||
"customer": "cus_7VDMN7D1kvr7Lg",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a7"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VDMN7D1kvr7Lg",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDMN7D1kvr7Lg",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user105@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a7"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCvmKaReE7xLUdt7Yh7qGx",
|
||||
"customer": "cus_7VDMN7D1kvr7Lg"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDMS0xOsHmoQm",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365091,
|
||||
"current_period_start": 1449686691,
|
||||
"customer": "cus_7VDMN7D1kvr7Lg",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a7"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VDMN7D1kvr7Lg/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDMS0xOsHmoQm",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365091,
|
||||
"current_period_start": 1449686691,
|
||||
"customer": "cus_7VDMN7D1kvr7Lg",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a7"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDMN7D1kvr7Lg/subscriptions/sub_7VDMS0xOsHmoQm",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDMS0xOsHmoQm",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365091,
|
||||
"current_period_start": 1449686691,
|
||||
"customer": "cus_7VDMN7D1kvr7Lg",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDMN7D1kvr7Lg",
|
||||
"subscription": "sub_7VDMS0xOsHmoQm"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a7"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDMN7D1kvr7Lg",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDMN7D1kvr7Lg",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user105@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a7"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCvmKaReE7xLUdt7Yh7qGx",
|
||||
"customer": "cus_7VDMN7D1kvr7Lg"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDMS0xOsHmoQm",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365091,
|
||||
"current_period_start": 1449686691,
|
||||
"customer": "cus_7VDMN7D1kvr7Lg",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDMN7D1kvr7Lg",
|
||||
"subscription": "sub_7VDMS0xOsHmoQm"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a7"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDMN7D1kvr7Lg",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDMN7D1kvr7Lg",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user105@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a7"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCvmKaReE7xLUdt7Yh7qGx",
|
||||
"customer": "cus_7VDMN7D1kvr7Lg"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDMS0xOsHmoQm",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365091,
|
||||
"current_period_start": 1449686691,
|
||||
"customer": "cus_7VDMN7D1kvr7Lg",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDMN7D1kvr7Lg",
|
||||
"subscription": "sub_7VDMS0xOsHmoQm"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a7"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VDMN7D1kvr7Lg/subscriptions/sub_7VDMS0xOsHmoQm",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDMS0xOsHmoQm",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365091,
|
||||
"current_period_start": 1449686691,
|
||||
"customer": "cus_7VDMN7D1kvr7Lg",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDMN7D1kvr7Lg",
|
||||
"subscription": "sub_7VDMS0xOsHmoQm"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a7"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
}
|
||||
]
|
246
spec/fixtures/sub-test-07.json
vendored
Normal file
246
spec/fixtures/sub-test-07.json
vendored
Normal file
|
@ -0,0 +1,246 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDM1shFX6QRWx",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user106@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a8"
|
||||
},
|
||||
"sources": {
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDM1shFX6QRWx/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDMq59qAI6tOe",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365098,
|
||||
"current_period_start": 1449686698,
|
||||
"customer": "cus_7VDM1shFX6QRWx",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDM1shFX6QRWx",
|
||||
"subscription": "sub_7VDMq59qAI6tOe"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a8"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDM1shFX6QRWx",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDM1shFX6QRWx",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user106@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a8"
|
||||
},
|
||||
"sources": {
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDMq59qAI6tOe",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365098,
|
||||
"current_period_start": 1449686698,
|
||||
"customer": "cus_7VDM1shFX6QRWx",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDM1shFX6QRWx",
|
||||
"subscription": "sub_7VDMq59qAI6tOe"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a8"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "DELETE",
|
||||
"path": "/v1/customers/cus_7VDM1shFX6QRWx/subscriptions/sub_7VDMq59qAI6tOe",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDMq59qAI6tOe",
|
||||
"cancel_at_period_end": true,
|
||||
"current_period_end": 1452365098,
|
||||
"current_period_start": 1449686698,
|
||||
"customer": "cus_7VDM1shFX6QRWx",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDM1shFX6QRWx",
|
||||
"subscription": "sub_7VDMq59qAI6tOe"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a8"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDM1shFX6QRWx",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDM1shFX6QRWx",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user106@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a8"
|
||||
},
|
||||
"sources": {
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDMq59qAI6tOe",
|
||||
"cancel_at_period_end": true,
|
||||
"current_period_end": 1452365098,
|
||||
"current_period_start": 1449686698,
|
||||
"customer": "cus_7VDM1shFX6QRWx",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDM1shFX6QRWx",
|
||||
"subscription": "sub_7VDMq59qAI6tOe"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a8"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDM1shFX6QRWx",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDM1shFX6QRWx",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user106@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a8"
|
||||
},
|
||||
"sources": {
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDMq59qAI6tOe",
|
||||
"cancel_at_period_end": true,
|
||||
"current_period_end": 1452365098,
|
||||
"current_period_start": 1449686698,
|
||||
"customer": "cus_7VDM1shFX6QRWx",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDM1shFX6QRWx",
|
||||
"subscription": "sub_7VDMq59qAI6tOe"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a8"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VDM1shFX6QRWx/subscriptions/sub_7VDMq59qAI6tOe",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDMq59qAI6tOe",
|
||||
"cancel_at_period_end": true,
|
||||
"current_period_end": 1452365098,
|
||||
"current_period_start": 1449686698,
|
||||
"customer": "cus_7VDM1shFX6QRWx",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDM1shFX6QRWx",
|
||||
"subscription": "sub_7VDMq59qAI6tOe"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a8"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
}
|
||||
]
|
188
spec/fixtures/sub-test-08.json
vendored
Normal file
188
spec/fixtures/sub-test-08.json
vendored
Normal file
|
@ -0,0 +1,188 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDMimrBc0mZ90",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user107@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a9"
|
||||
},
|
||||
"sources": {
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDMimrBc0mZ90",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDMimrBc0mZ90",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user107@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a9"
|
||||
},
|
||||
"sources": {
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDMimrBc0mZ90/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDMdpg82cq4wP",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365101,
|
||||
"current_period_start": 1449686701,
|
||||
"customer": "cus_7VDMimrBc0mZ90",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDMimrBc0mZ90",
|
||||
"subscription": "sub_7VDMdpg82cq4wP"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a9"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDMimrBc0mZ90",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDMimrBc0mZ90",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user107@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a9"
|
||||
},
|
||||
"sources": {
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDMdpg82cq4wP",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365101,
|
||||
"current_period_start": 1449686701,
|
||||
"customer": "cus_7VDMimrBc0mZ90",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDMimrBc0mZ90",
|
||||
"subscription": "sub_7VDMdpg82cq4wP"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a9"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDMALAaCBewXK",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user108@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186aa"
|
||||
},
|
||||
"sources": {
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDMimrBc0mZ90",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDMimrBc0mZ90",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user107@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a9"
|
||||
},
|
||||
"sources": {
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDMdpg82cq4wP",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365101,
|
||||
"current_period_start": 1449686701,
|
||||
"customer": "cus_7VDMimrBc0mZ90",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDMimrBc0mZ90",
|
||||
"subscription": "sub_7VDMdpg82cq4wP"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186a9"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
240
spec/fixtures/sub-test-09.json
vendored
Normal file
240
spec/fixtures/sub-test-09.json
vendored
Normal file
|
@ -0,0 +1,240 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDMFarU7W8Gmy",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user109@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186ab"
|
||||
},
|
||||
"sources": {
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDMFarU7W8Gmy/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDMw3MAJ41tta",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365105,
|
||||
"current_period_start": 1449686705,
|
||||
"customer": "cus_7VDMFarU7W8Gmy",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDMFarU7W8Gmy",
|
||||
"subscription": "sub_7VDMw3MAJ41tta"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186ab"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDMJCH5sXus78",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user110@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186ac"
|
||||
},
|
||||
"sources": {
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDMFarU7W8Gmy",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDMFarU7W8Gmy",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user109@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186ab"
|
||||
},
|
||||
"sources": {
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDMw3MAJ41tta",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365105,
|
||||
"current_period_start": 1449686705,
|
||||
"customer": "cus_7VDMFarU7W8Gmy",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDMFarU7W8Gmy",
|
||||
"subscription": "sub_7VDMw3MAJ41tta"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186ab"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDMFarU7W8Gmy",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDMFarU7W8Gmy",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user109@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186ab"
|
||||
},
|
||||
"sources": {
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDMw3MAJ41tta",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365105,
|
||||
"current_period_start": 1449686705,
|
||||
"customer": "cus_7VDMFarU7W8Gmy",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDMFarU7W8Gmy",
|
||||
"subscription": "sub_7VDMw3MAJ41tta"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186ab"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDMFarU7W8Gmy",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDMFarU7W8Gmy",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user109@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186ab"
|
||||
},
|
||||
"sources": {
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDMw3MAJ41tta",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365105,
|
||||
"current_period_start": 1449686705,
|
||||
"customer": "cus_7VDMFarU7W8Gmy",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDMFarU7W8Gmy",
|
||||
"subscription": "sub_7VDMw3MAJ41tta"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186ab"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDMJCH5sXus78/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDMnCRwJSWFrg",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365106,
|
||||
"current_period_start": 1449686706,
|
||||
"customer": "cus_7VDMJCH5sXus78",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDMJCH5sXus78",
|
||||
"subscription": "sub_7VDMnCRwJSWFrg"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186ac"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
}
|
||||
]
|
52
spec/fixtures/sub-test-10.json
vendored
Normal file
52
spec/fixtures/sub-test-10.json
vendored
Normal file
|
@ -0,0 +1,52 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDMJaKYQsFp2d",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user111@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186ad"
|
||||
},
|
||||
"sources": {
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDMJaKYQsFp2d/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDMFO6EovmOwR",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365109,
|
||||
"current_period_start": 1449686709,
|
||||
"customer": "cus_7VDMJaKYQsFp2d",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDMJaKYQsFp2d",
|
||||
"subscription": "sub_7VDMFO6EovmOwR"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186ad"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
}
|
||||
]
|
24
spec/fixtures/sub-test-11.json
vendored
Normal file
24
spec/fixtures/sub-test-11.json
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDM4y30udBZ6y",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user112@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186ae"
|
||||
},
|
||||
"sources": {
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
24
spec/fixtures/sub-test-12.json
vendored
Normal file
24
spec/fixtures/sub-test-12.json
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDMGD6KRcGwXR",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user113@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186af"
|
||||
},
|
||||
"sources": {
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
572
spec/fixtures/sub-test-13.json
vendored
Normal file
572
spec/fixtures/sub-test-13.json
vendored
Normal file
|
@ -0,0 +1,572 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/tokens",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "tok_17GCw8KaReE7xLUdthO4orSb",
|
||||
"card": {
|
||||
"id": "card_17GCw8KaReE7xLUdOPWS15Bv"
|
||||
},
|
||||
"type": "card"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDMmrioYAeVKO",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user115@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b1"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCw8KaReE7xLUdOPWS15Bv",
|
||||
"customer": "cus_7VDMmrioYAeVKO"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDMmrioYAeVKO",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDMmrioYAeVKO",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user115@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b1"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCw8KaReE7xLUdOPWS15Bv",
|
||||
"customer": "cus_7VDMmrioYAeVKO"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VDMmrioYAeVKO/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"has_more": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDMmrioYAeVKO/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDM9eY05oeOyv",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365114,
|
||||
"current_period_start": 1449686714,
|
||||
"customer": "cus_7VDMmrioYAeVKO",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDMmrioYAeVKO",
|
||||
"subscription": "sub_7VDM9eY05oeOyv"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b0"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDMmrioYAeVKO",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDMmrioYAeVKO",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user115@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b1"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCw8KaReE7xLUdOPWS15Bv",
|
||||
"customer": "cus_7VDMmrioYAeVKO"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDM9eY05oeOyv",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365114,
|
||||
"current_period_start": 1449686714,
|
||||
"customer": "cus_7VDMmrioYAeVKO",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDMmrioYAeVKO",
|
||||
"subscription": "sub_7VDM9eY05oeOyv"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b0"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDMmrioYAeVKO/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDMu0KhU3xUUv",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365116,
|
||||
"current_period_start": 1449686716,
|
||||
"customer": "cus_7VDMmrioYAeVKO",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b1"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 999
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/invoices",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"data": [
|
||||
{
|
||||
"id": "in_17GCwCKaReE7xLUdrx4hkf0a",
|
||||
"customer": "cus_7VDMmrioYAeVKO",
|
||||
"lines": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDMu0KhU3xUUv",
|
||||
"amount": 999,
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b1"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"proration": false,
|
||||
"quantity": 999,
|
||||
"type": "subscription"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"paid": true,
|
||||
"subscription": "sub_7VDMu0KhU3xUUv",
|
||||
"total": 999
|
||||
},
|
||||
{
|
||||
"id": "in_17GCwAKaReE7xLUdx4nsrGJo",
|
||||
"customer": "cus_7VDMmrioYAeVKO",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDMmrioYAeVKO",
|
||||
"subscription": "sub_7VDM9eY05oeOyv"
|
||||
},
|
||||
"lines": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDM9eY05oeOyv",
|
||||
"amount": 999,
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b0"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"proration": false,
|
||||
"quantity": 1,
|
||||
"type": "subscription"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"paid": true,
|
||||
"subscription": "sub_7VDM9eY05oeOyv",
|
||||
"total": 0
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDMmrioYAeVKO",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDMmrioYAeVKO",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user115@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b1"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCw8KaReE7xLUdOPWS15Bv",
|
||||
"customer": "cus_7VDMmrioYAeVKO"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDMu0KhU3xUUv",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365116,
|
||||
"current_period_start": 1449686716,
|
||||
"customer": "cus_7VDMmrioYAeVKO",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b1"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 999
|
||||
},
|
||||
{
|
||||
"id": "sub_7VDM9eY05oeOyv",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365114,
|
||||
"current_period_start": 1449686714,
|
||||
"customer": "cus_7VDMmrioYAeVKO",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDMmrioYAeVKO",
|
||||
"subscription": "sub_7VDM9eY05oeOyv"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b0"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/invoices/in_17GCwCKaReE7xLUdrx4hkf0a",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "in_17GCwCKaReE7xLUdrx4hkf0a",
|
||||
"customer": "cus_7VDMmrioYAeVKO",
|
||||
"lines": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDMu0KhU3xUUv",
|
||||
"amount": 999,
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b1"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"proration": false,
|
||||
"quantity": 999,
|
||||
"type": "subscription"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"paid": true,
|
||||
"subscription": "sub_7VDMu0KhU3xUUv",
|
||||
"total": 999
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDMmrioYAeVKO",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDMmrioYAeVKO",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user115@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b1"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCw8KaReE7xLUdOPWS15Bv",
|
||||
"customer": "cus_7VDMmrioYAeVKO"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDMu0KhU3xUUv",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365116,
|
||||
"current_period_start": 1449686716,
|
||||
"customer": "cus_7VDMmrioYAeVKO",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b1"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 999
|
||||
},
|
||||
{
|
||||
"id": "sub_7VDM9eY05oeOyv",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365114,
|
||||
"current_period_start": 1449686714,
|
||||
"customer": "cus_7VDMmrioYAeVKO",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDMmrioYAeVKO",
|
||||
"subscription": "sub_7VDM9eY05oeOyv"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b0"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VDMmrioYAeVKO",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDMmrioYAeVKO",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user115@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b1"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCw8KaReE7xLUdOPWS15Bv",
|
||||
"customer": "cus_7VDMmrioYAeVKO"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDMu0KhU3xUUv",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365116,
|
||||
"current_period_start": 1449686716,
|
||||
"customer": "cus_7VDMmrioYAeVKO",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b1"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 999
|
||||
},
|
||||
{
|
||||
"id": "sub_7VDM9eY05oeOyv",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365114,
|
||||
"current_period_start": 1449686714,
|
||||
"customer": "cus_7VDMmrioYAeVKO",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDMmrioYAeVKO",
|
||||
"subscription": "sub_7VDM9eY05oeOyv"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b0"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/invoices/in_17GCwAKaReE7xLUdx4nsrGJo",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "in_17GCwAKaReE7xLUdx4nsrGJo",
|
||||
"customer": "cus_7VDMmrioYAeVKO",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDMmrioYAeVKO",
|
||||
"subscription": "sub_7VDM9eY05oeOyv"
|
||||
},
|
||||
"lines": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDM9eY05oeOyv",
|
||||
"amount": 999,
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b0"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"proration": false,
|
||||
"quantity": 1,
|
||||
"type": "subscription"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"paid": true,
|
||||
"subscription": "sub_7VDM9eY05oeOyv",
|
||||
"total": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VDMmrioYAeVKO/subscriptions/sub_7VDMu0KhU3xUUv",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDMu0KhU3xUUv",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365116,
|
||||
"current_period_start": 1449686716,
|
||||
"customer": "cus_7VDMmrioYAeVKO",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b1"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 999
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VDMmrioYAeVKO/subscriptions/sub_7VDM9eY05oeOyv",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDM9eY05oeOyv",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365114,
|
||||
"current_period_start": 1449686714,
|
||||
"customer": "cus_7VDMmrioYAeVKO",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDMmrioYAeVKO",
|
||||
"subscription": "sub_7VDM9eY05oeOyv"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b0"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
}
|
||||
]
|
649
spec/fixtures/sub-test-14.json
vendored
Normal file
649
spec/fixtures/sub-test-14.json
vendored
Normal file
|
@ -0,0 +1,649 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/tokens",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "tok_17GCwFKaReE7xLUdWI6KM2oH",
|
||||
"card": {
|
||||
"id": "card_17GCwFKaReE7xLUdKzBLn7i7"
|
||||
},
|
||||
"type": "card"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDM4cabFTvRKN",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user117@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b3"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCwFKaReE7xLUdKzBLn7i7",
|
||||
"customer": "cus_7VDM4cabFTvRKN"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDM4cabFTvRKN",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDM4cabFTvRKN",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user117@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b3"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCwFKaReE7xLUdKzBLn7i7",
|
||||
"customer": "cus_7VDM4cabFTvRKN"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VDM4cabFTvRKN/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"has_more": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDM4cabFTvRKN/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDNm23D4Adhbm",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365121,
|
||||
"current_period_start": 1449686721,
|
||||
"customer": "cus_7VDM4cabFTvRKN",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDM4cabFTvRKN",
|
||||
"subscription": "sub_7VDNm23D4Adhbm"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b2"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDM4cabFTvRKN",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDM4cabFTvRKN",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user117@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b3"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCwFKaReE7xLUdKzBLn7i7",
|
||||
"customer": "cus_7VDM4cabFTvRKN"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDNm23D4Adhbm",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365121,
|
||||
"current_period_start": 1449686721,
|
||||
"customer": "cus_7VDM4cabFTvRKN",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDM4cabFTvRKN",
|
||||
"subscription": "sub_7VDNm23D4Adhbm"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b2"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDM4cabFTvRKN/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDNwy2CROZ8Th",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365122,
|
||||
"current_period_start": 1449686722,
|
||||
"customer": "cus_7VDM4cabFTvRKN",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b3"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 999
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/invoices",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"data": [
|
||||
{
|
||||
"id": "in_17GCwIKaReE7xLUdvxGcczE4",
|
||||
"customer": "cus_7VDM4cabFTvRKN",
|
||||
"lines": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDNwy2CROZ8Th",
|
||||
"amount": 999,
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b3"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"proration": false,
|
||||
"quantity": 999,
|
||||
"type": "subscription"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"paid": true,
|
||||
"subscription": "sub_7VDNwy2CROZ8Th",
|
||||
"total": 999
|
||||
},
|
||||
{
|
||||
"id": "in_17GCwHKaReE7xLUd4Ju1asAT",
|
||||
"customer": "cus_7VDM4cabFTvRKN",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDM4cabFTvRKN",
|
||||
"subscription": "sub_7VDNm23D4Adhbm"
|
||||
},
|
||||
"lines": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDNm23D4Adhbm",
|
||||
"amount": 999,
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b2"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"proration": false,
|
||||
"quantity": 1,
|
||||
"type": "subscription"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"paid": true,
|
||||
"subscription": "sub_7VDNm23D4Adhbm",
|
||||
"total": 0
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDM4cabFTvRKN",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDM4cabFTvRKN",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user117@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b3"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCwFKaReE7xLUdKzBLn7i7",
|
||||
"customer": "cus_7VDM4cabFTvRKN"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDNwy2CROZ8Th",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365122,
|
||||
"current_period_start": 1449686722,
|
||||
"customer": "cus_7VDM4cabFTvRKN",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b3"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 999
|
||||
},
|
||||
{
|
||||
"id": "sub_7VDNm23D4Adhbm",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365121,
|
||||
"current_period_start": 1449686721,
|
||||
"customer": "cus_7VDM4cabFTvRKN",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDM4cabFTvRKN",
|
||||
"subscription": "sub_7VDNm23D4Adhbm"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b2"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/invoices/in_17GCwIKaReE7xLUdvxGcczE4",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "in_17GCwIKaReE7xLUdvxGcczE4",
|
||||
"customer": "cus_7VDM4cabFTvRKN",
|
||||
"lines": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDNwy2CROZ8Th",
|
||||
"amount": 999,
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b3"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"proration": false,
|
||||
"quantity": 999,
|
||||
"type": "subscription"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"paid": true,
|
||||
"subscription": "sub_7VDNwy2CROZ8Th",
|
||||
"total": 999
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDM4cabFTvRKN",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDM4cabFTvRKN",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user117@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b3"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCwFKaReE7xLUdKzBLn7i7",
|
||||
"customer": "cus_7VDM4cabFTvRKN"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDNwy2CROZ8Th",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365122,
|
||||
"current_period_start": 1449686722,
|
||||
"customer": "cus_7VDM4cabFTvRKN",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b3"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 999
|
||||
},
|
||||
{
|
||||
"id": "sub_7VDNm23D4Adhbm",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365121,
|
||||
"current_period_start": 1449686721,
|
||||
"customer": "cus_7VDM4cabFTvRKN",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDM4cabFTvRKN",
|
||||
"subscription": "sub_7VDNm23D4Adhbm"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b2"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VDM4cabFTvRKN",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDM4cabFTvRKN",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user117@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b3"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCwFKaReE7xLUdKzBLn7i7",
|
||||
"customer": "cus_7VDM4cabFTvRKN"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDNwy2CROZ8Th",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365122,
|
||||
"current_period_start": 1449686722,
|
||||
"customer": "cus_7VDM4cabFTvRKN",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b3"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 999
|
||||
},
|
||||
{
|
||||
"id": "sub_7VDNm23D4Adhbm",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365121,
|
||||
"current_period_start": 1449686721,
|
||||
"customer": "cus_7VDM4cabFTvRKN",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDM4cabFTvRKN",
|
||||
"subscription": "sub_7VDNm23D4Adhbm"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b2"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/invoices/in_17GCwHKaReE7xLUd4Ju1asAT",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "in_17GCwHKaReE7xLUd4Ju1asAT",
|
||||
"customer": "cus_7VDM4cabFTvRKN",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDM4cabFTvRKN",
|
||||
"subscription": "sub_7VDNm23D4Adhbm"
|
||||
},
|
||||
"lines": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDNm23D4Adhbm",
|
||||
"amount": 999,
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b2"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"proration": false,
|
||||
"quantity": 1,
|
||||
"type": "subscription"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"paid": true,
|
||||
"subscription": "sub_7VDNm23D4Adhbm",
|
||||
"total": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "DELETE",
|
||||
"path": "/v1/customers/cus_7VDM4cabFTvRKN/subscriptions/sub_7VDNm23D4Adhbm",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDNm23D4Adhbm",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365121,
|
||||
"current_period_start": 1449686721,
|
||||
"customer": "cus_7VDM4cabFTvRKN",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDM4cabFTvRKN",
|
||||
"subscription": "sub_7VDNm23D4Adhbm"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b2"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDM4cabFTvRKN/subscriptions/sub_7VDNwy2CROZ8Th",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDNwy2CROZ8Th",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365122,
|
||||
"current_period_start": 1449686722,
|
||||
"customer": "cus_7VDM4cabFTvRKN",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b3"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VDM4cabFTvRKN/subscriptions/sub_7VDNm23D4Adhbm",
|
||||
"status": 404,
|
||||
"response": {
|
||||
"error": {
|
||||
"type": "invalid_request_error"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDM4cabFTvRKN",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDM4cabFTvRKN",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user117@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b3"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCwFKaReE7xLUdKzBLn7i7",
|
||||
"customer": "cus_7VDM4cabFTvRKN"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDNwy2CROZ8Th",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365122,
|
||||
"current_period_start": 1449686722,
|
||||
"customer": "cus_7VDM4cabFTvRKN",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b3"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 0
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VDM4cabFTvRKN/subscriptions/sub_7VDNwy2CROZ8Th",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDNwy2CROZ8Th",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365122,
|
||||
"current_period_start": 1449686722,
|
||||
"customer": "cus_7VDM4cabFTvRKN",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b3"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 0
|
||||
}
|
||||
}
|
||||
]
|
960
spec/fixtures/sub-test-15.json
vendored
Normal file
960
spec/fixtures/sub-test-15.json
vendored
Normal file
|
@ -0,0 +1,960 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/tokens",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "tok_17GCwOKaReE7xLUdUD4Nkjd7",
|
||||
"card": {
|
||||
"id": "card_17GCwOKaReE7xLUd3yZTswdV"
|
||||
},
|
||||
"type": "card"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDN2KNqruyD9I",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user119@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b5"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCwOKaReE7xLUd3yZTswdV",
|
||||
"customer": "cus_7VDN2KNqruyD9I"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDN2KNqruyD9I",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDN2KNqruyD9I",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user119@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b5"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCwOKaReE7xLUd3yZTswdV",
|
||||
"customer": "cus_7VDN2KNqruyD9I"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDN2KNqruyD9I/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDNPD9TIPgfsG",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365130,
|
||||
"current_period_start": 1449686730,
|
||||
"customer": "cus_7VDN2KNqruyD9I",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b5"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VDN2KNqruyD9I",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDN2KNqruyD9I",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user119@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b5"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCwOKaReE7xLUd3yZTswdV",
|
||||
"customer": "cus_7VDN2KNqruyD9I"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDNPD9TIPgfsG",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365130,
|
||||
"current_period_start": 1449686730,
|
||||
"customer": "cus_7VDN2KNqruyD9I",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b5"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDN2KNqruyD9I",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDN2KNqruyD9I",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user119@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b5"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCwOKaReE7xLUd3yZTswdV",
|
||||
"customer": "cus_7VDN2KNqruyD9I"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDNPD9TIPgfsG",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365130,
|
||||
"current_period_start": 1449686730,
|
||||
"customer": "cus_7VDN2KNqruyD9I",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b5"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDN2KNqruyD9I",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDN2KNqruyD9I",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user119@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b5"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCwOKaReE7xLUd3yZTswdV",
|
||||
"customer": "cus_7VDN2KNqruyD9I"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDNPD9TIPgfsG",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365130,
|
||||
"current_period_start": 1449686730,
|
||||
"customer": "cus_7VDN2KNqruyD9I",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b5"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VDN2KNqruyD9I/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDNPD9TIPgfsG",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365130,
|
||||
"current_period_start": 1449686730,
|
||||
"customer": "cus_7VDN2KNqruyD9I",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b5"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDN2KNqruyD9I/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDNwjyGqYhYMg",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365133,
|
||||
"current_period_start": 1449686733,
|
||||
"customer": "cus_7VDN2KNqruyD9I",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDN2KNqruyD9I",
|
||||
"subscription": "sub_7VDNwjyGqYhYMg"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b4"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDN2KNqruyD9I/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDNirCm8gp2m7",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365135,
|
||||
"current_period_start": 1449686735,
|
||||
"customer": "cus_7VDN2KNqruyD9I",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b5"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 799
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/invoices",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"data": [
|
||||
{
|
||||
"id": "in_17GCwVKaReE7xLUdNP0m26Nw",
|
||||
"customer": "cus_7VDN2KNqruyD9I",
|
||||
"lines": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDNirCm8gp2m7",
|
||||
"amount": 799,
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b5"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"proration": false,
|
||||
"quantity": 799,
|
||||
"type": "subscription"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"paid": true,
|
||||
"subscription": "sub_7VDNirCm8gp2m7",
|
||||
"total": 799
|
||||
},
|
||||
{
|
||||
"id": "in_17GCwTKaReE7xLUdM7EWTJ09",
|
||||
"customer": "cus_7VDN2KNqruyD9I",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDN2KNqruyD9I",
|
||||
"subscription": "sub_7VDNwjyGqYhYMg"
|
||||
},
|
||||
"lines": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDNwjyGqYhYMg",
|
||||
"amount": 999,
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b4"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"proration": false,
|
||||
"quantity": 1,
|
||||
"type": "subscription"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"paid": true,
|
||||
"subscription": "sub_7VDNwjyGqYhYMg",
|
||||
"total": 0
|
||||
},
|
||||
{
|
||||
"id": "in_17GCwQKaReE7xLUdqSluEgSu",
|
||||
"customer": "cus_7VDN2KNqruyD9I",
|
||||
"lines": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDNPD9TIPgfsG",
|
||||
"amount": 999,
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b5"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"proration": false,
|
||||
"quantity": 1,
|
||||
"type": "subscription"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"paid": true,
|
||||
"subscription": "sub_7VDNPD9TIPgfsG",
|
||||
"total": 999
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDN2KNqruyD9I",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDN2KNqruyD9I",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user119@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b5"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCwOKaReE7xLUd3yZTswdV",
|
||||
"customer": "cus_7VDN2KNqruyD9I"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDNirCm8gp2m7",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365135,
|
||||
"current_period_start": 1449686735,
|
||||
"customer": "cus_7VDN2KNqruyD9I",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b5"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 799
|
||||
},
|
||||
{
|
||||
"id": "sub_7VDNwjyGqYhYMg",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365133,
|
||||
"current_period_start": 1449686733,
|
||||
"customer": "cus_7VDN2KNqruyD9I",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDN2KNqruyD9I",
|
||||
"subscription": "sub_7VDNwjyGqYhYMg"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b4"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
},
|
||||
{
|
||||
"id": "sub_7VDNPD9TIPgfsG",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365130,
|
||||
"current_period_start": 1449686730,
|
||||
"customer": "cus_7VDN2KNqruyD9I",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b5"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDN2KNqruyD9I",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDN2KNqruyD9I",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user119@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b5"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCwOKaReE7xLUd3yZTswdV",
|
||||
"customer": "cus_7VDN2KNqruyD9I"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDNirCm8gp2m7",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365135,
|
||||
"current_period_start": 1449686735,
|
||||
"customer": "cus_7VDN2KNqruyD9I",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b5"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 799
|
||||
},
|
||||
{
|
||||
"id": "sub_7VDNwjyGqYhYMg",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365133,
|
||||
"current_period_start": 1449686733,
|
||||
"customer": "cus_7VDN2KNqruyD9I",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDN2KNqruyD9I",
|
||||
"subscription": "sub_7VDNwjyGqYhYMg"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b4"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
},
|
||||
{
|
||||
"id": "sub_7VDNPD9TIPgfsG",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365130,
|
||||
"current_period_start": 1449686730,
|
||||
"customer": "cus_7VDN2KNqruyD9I",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b5"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDN2KNqruyD9I",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDN2KNqruyD9I",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user119@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b5"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCwOKaReE7xLUd3yZTswdV",
|
||||
"customer": "cus_7VDN2KNqruyD9I"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDNirCm8gp2m7",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365135,
|
||||
"current_period_start": 1449686735,
|
||||
"customer": "cus_7VDN2KNqruyD9I",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b5"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 799
|
||||
},
|
||||
{
|
||||
"id": "sub_7VDNwjyGqYhYMg",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365133,
|
||||
"current_period_start": 1449686733,
|
||||
"customer": "cus_7VDN2KNqruyD9I",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDN2KNqruyD9I",
|
||||
"subscription": "sub_7VDNwjyGqYhYMg"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b4"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
},
|
||||
{
|
||||
"id": "sub_7VDNPD9TIPgfsG",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365130,
|
||||
"current_period_start": 1449686730,
|
||||
"customer": "cus_7VDN2KNqruyD9I",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b5"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/invoices/in_17GCwVKaReE7xLUdNP0m26Nw",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "in_17GCwVKaReE7xLUdNP0m26Nw",
|
||||
"customer": "cus_7VDN2KNqruyD9I",
|
||||
"lines": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDNirCm8gp2m7",
|
||||
"amount": 799,
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b5"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"proration": false,
|
||||
"quantity": 799,
|
||||
"type": "subscription"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"paid": true,
|
||||
"subscription": "sub_7VDNirCm8gp2m7",
|
||||
"total": 799
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VDN2KNqruyD9I",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDN2KNqruyD9I",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user119@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b5"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCwOKaReE7xLUd3yZTswdV",
|
||||
"customer": "cus_7VDN2KNqruyD9I"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDNirCm8gp2m7",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365135,
|
||||
"current_period_start": 1449686735,
|
||||
"customer": "cus_7VDN2KNqruyD9I",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b5"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 799
|
||||
},
|
||||
{
|
||||
"id": "sub_7VDNwjyGqYhYMg",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365133,
|
||||
"current_period_start": 1449686733,
|
||||
"customer": "cus_7VDN2KNqruyD9I",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDN2KNqruyD9I",
|
||||
"subscription": "sub_7VDNwjyGqYhYMg"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b4"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
},
|
||||
{
|
||||
"id": "sub_7VDNPD9TIPgfsG",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365130,
|
||||
"current_period_start": 1449686730,
|
||||
"customer": "cus_7VDN2KNqruyD9I",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b5"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/invoices/in_17GCwTKaReE7xLUdM7EWTJ09",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "in_17GCwTKaReE7xLUdM7EWTJ09",
|
||||
"customer": "cus_7VDN2KNqruyD9I",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDN2KNqruyD9I",
|
||||
"subscription": "sub_7VDNwjyGqYhYMg"
|
||||
},
|
||||
"lines": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDNwjyGqYhYMg",
|
||||
"amount": 999,
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b4"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"proration": false,
|
||||
"quantity": 1,
|
||||
"type": "subscription"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"paid": true,
|
||||
"subscription": "sub_7VDNwjyGqYhYMg",
|
||||
"total": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/invoices/in_17GCwQKaReE7xLUdqSluEgSu",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "in_17GCwQKaReE7xLUdqSluEgSu",
|
||||
"customer": "cus_7VDN2KNqruyD9I",
|
||||
"lines": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDNPD9TIPgfsG",
|
||||
"amount": 999,
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b5"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"proration": false,
|
||||
"quantity": 1,
|
||||
"type": "subscription"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"paid": true,
|
||||
"subscription": "sub_7VDNPD9TIPgfsG",
|
||||
"total": 999
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VDN2KNqruyD9I/subscriptions/sub_7VDNirCm8gp2m7",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDNirCm8gp2m7",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365135,
|
||||
"current_period_start": 1449686735,
|
||||
"customer": "cus_7VDN2KNqruyD9I",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b5"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 799
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDN2KNqruyD9I",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDN2KNqruyD9I",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user119@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b5"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCwOKaReE7xLUd3yZTswdV",
|
||||
"customer": "cus_7VDN2KNqruyD9I"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDNirCm8gp2m7",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365135,
|
||||
"current_period_start": 1449686735,
|
||||
"customer": "cus_7VDN2KNqruyD9I",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b5"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 799
|
||||
},
|
||||
{
|
||||
"id": "sub_7VDNwjyGqYhYMg",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365133,
|
||||
"current_period_start": 1449686733,
|
||||
"customer": "cus_7VDN2KNqruyD9I",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDN2KNqruyD9I",
|
||||
"subscription": "sub_7VDNwjyGqYhYMg"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b4"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
},
|
||||
{
|
||||
"id": "sub_7VDNPD9TIPgfsG",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365130,
|
||||
"current_period_start": 1449686730,
|
||||
"customer": "cus_7VDN2KNqruyD9I",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b5"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VDN2KNqruyD9I/subscriptions/sub_7VDNwjyGqYhYMg",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDNwjyGqYhYMg",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365133,
|
||||
"current_period_start": 1449686733,
|
||||
"customer": "cus_7VDN2KNqruyD9I",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDN2KNqruyD9I",
|
||||
"subscription": "sub_7VDNwjyGqYhYMg"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b4"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
}
|
||||
]
|
993
spec/fixtures/sub-test-16.json
vendored
Normal file
993
spec/fixtures/sub-test-16.json
vendored
Normal file
|
@ -0,0 +1,993 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/tokens",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "tok_17GCwbKaReE7xLUdaT8CuSIS",
|
||||
"card": {
|
||||
"id": "card_17GCwbKaReE7xLUd5IJIFWBp"
|
||||
},
|
||||
"type": "card"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDNPC9EZ6JGhE",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user121@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b7"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCwbKaReE7xLUd5IJIFWBp",
|
||||
"customer": "cus_7VDNPC9EZ6JGhE"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDNPC9EZ6JGhE",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDNPC9EZ6JGhE",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user121@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b7"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCwbKaReE7xLUd5IJIFWBp",
|
||||
"customer": "cus_7VDNPC9EZ6JGhE"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDNPC9EZ6JGhE/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDNR05m6WWAeS",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365143,
|
||||
"current_period_start": 1449686743,
|
||||
"customer": "cus_7VDNPC9EZ6JGhE",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b7"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDNPC9EZ6JGhE",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDNPC9EZ6JGhE",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user121@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b7"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCwbKaReE7xLUd5IJIFWBp",
|
||||
"customer": "cus_7VDNPC9EZ6JGhE"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDNR05m6WWAeS",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365143,
|
||||
"current_period_start": 1449686743,
|
||||
"customer": "cus_7VDNPC9EZ6JGhE",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b7"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VDNPC9EZ6JGhE",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDNPC9EZ6JGhE",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user121@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b7"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCwbKaReE7xLUd5IJIFWBp",
|
||||
"customer": "cus_7VDNPC9EZ6JGhE"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDNR05m6WWAeS",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365143,
|
||||
"current_period_start": 1449686743,
|
||||
"customer": "cus_7VDNPC9EZ6JGhE",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b7"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDNPC9EZ6JGhE",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDNPC9EZ6JGhE",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user121@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b7"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCwbKaReE7xLUd5IJIFWBp",
|
||||
"customer": "cus_7VDNPC9EZ6JGhE"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDNR05m6WWAeS",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365143,
|
||||
"current_period_start": 1449686743,
|
||||
"customer": "cus_7VDNPC9EZ6JGhE",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b7"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VDNPC9EZ6JGhE/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDNR05m6WWAeS",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365143,
|
||||
"current_period_start": 1449686743,
|
||||
"customer": "cus_7VDNPC9EZ6JGhE",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b7"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDNPC9EZ6JGhE/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDNS5E09bpvSk",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365146,
|
||||
"current_period_start": 1449686746,
|
||||
"customer": "cus_7VDNPC9EZ6JGhE",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDNPC9EZ6JGhE",
|
||||
"subscription": "sub_7VDNS5E09bpvSk"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b6"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDNPC9EZ6JGhE",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDNPC9EZ6JGhE",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user121@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b7"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCwbKaReE7xLUd5IJIFWBp",
|
||||
"customer": "cus_7VDNPC9EZ6JGhE"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDNS5E09bpvSk",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365146,
|
||||
"current_period_start": 1449686746,
|
||||
"customer": "cus_7VDNPC9EZ6JGhE",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDNPC9EZ6JGhE",
|
||||
"subscription": "sub_7VDNS5E09bpvSk"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b6"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
},
|
||||
{
|
||||
"id": "sub_7VDNR05m6WWAeS",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365143,
|
||||
"current_period_start": 1449686743,
|
||||
"customer": "cus_7VDNPC9EZ6JGhE",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b7"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDNPC9EZ6JGhE/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDNHF276hw9Ic",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365147,
|
||||
"current_period_start": 1449686747,
|
||||
"customer": "cus_7VDNPC9EZ6JGhE",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b7"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 799
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/invoices",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"data": [
|
||||
{
|
||||
"id": "in_17GCwhKaReE7xLUdCY899Ga9",
|
||||
"customer": "cus_7VDNPC9EZ6JGhE",
|
||||
"lines": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDNHF276hw9Ic",
|
||||
"amount": 799,
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b7"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"proration": false,
|
||||
"quantity": 799,
|
||||
"type": "subscription"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"paid": true,
|
||||
"subscription": "sub_7VDNHF276hw9Ic",
|
||||
"total": 799
|
||||
},
|
||||
{
|
||||
"id": "in_17GCwgKaReE7xLUdQgRhKcNI",
|
||||
"customer": "cus_7VDNPC9EZ6JGhE",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDNPC9EZ6JGhE",
|
||||
"subscription": "sub_7VDNS5E09bpvSk"
|
||||
},
|
||||
"lines": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDNS5E09bpvSk",
|
||||
"amount": 999,
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b6"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"proration": false,
|
||||
"quantity": 1,
|
||||
"type": "subscription"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"paid": true,
|
||||
"subscription": "sub_7VDNS5E09bpvSk",
|
||||
"total": 0
|
||||
},
|
||||
{
|
||||
"id": "in_17GCwdKaReE7xLUdRLGvAqaG",
|
||||
"customer": "cus_7VDNPC9EZ6JGhE",
|
||||
"lines": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDNR05m6WWAeS",
|
||||
"amount": 999,
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b7"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"proration": false,
|
||||
"quantity": 1,
|
||||
"type": "subscription"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"paid": true,
|
||||
"subscription": "sub_7VDNR05m6WWAeS",
|
||||
"total": 999
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDNPC9EZ6JGhE",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDNPC9EZ6JGhE",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user121@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b7"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCwbKaReE7xLUd5IJIFWBp",
|
||||
"customer": "cus_7VDNPC9EZ6JGhE"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDNHF276hw9Ic",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365147,
|
||||
"current_period_start": 1449686747,
|
||||
"customer": "cus_7VDNPC9EZ6JGhE",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b7"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 799
|
||||
},
|
||||
{
|
||||
"id": "sub_7VDNS5E09bpvSk",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365146,
|
||||
"current_period_start": 1449686746,
|
||||
"customer": "cus_7VDNPC9EZ6JGhE",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDNPC9EZ6JGhE",
|
||||
"subscription": "sub_7VDNS5E09bpvSk"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b6"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
},
|
||||
{
|
||||
"id": "sub_7VDNR05m6WWAeS",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365143,
|
||||
"current_period_start": 1449686743,
|
||||
"customer": "cus_7VDNPC9EZ6JGhE",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b7"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/invoices/in_17GCwhKaReE7xLUdCY899Ga9",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "in_17GCwhKaReE7xLUdCY899Ga9",
|
||||
"customer": "cus_7VDNPC9EZ6JGhE",
|
||||
"lines": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDNHF276hw9Ic",
|
||||
"amount": 799,
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b7"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"proration": false,
|
||||
"quantity": 799,
|
||||
"type": "subscription"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"paid": true,
|
||||
"subscription": "sub_7VDNHF276hw9Ic",
|
||||
"total": 799
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VDNPC9EZ6JGhE",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDNPC9EZ6JGhE",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user121@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b7"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCwbKaReE7xLUd5IJIFWBp",
|
||||
"customer": "cus_7VDNPC9EZ6JGhE"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDNHF276hw9Ic",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365147,
|
||||
"current_period_start": 1449686747,
|
||||
"customer": "cus_7VDNPC9EZ6JGhE",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b7"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 799
|
||||
},
|
||||
{
|
||||
"id": "sub_7VDNS5E09bpvSk",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365146,
|
||||
"current_period_start": 1449686746,
|
||||
"customer": "cus_7VDNPC9EZ6JGhE",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDNPC9EZ6JGhE",
|
||||
"subscription": "sub_7VDNS5E09bpvSk"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b6"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
},
|
||||
{
|
||||
"id": "sub_7VDNR05m6WWAeS",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365143,
|
||||
"current_period_start": 1449686743,
|
||||
"customer": "cus_7VDNPC9EZ6JGhE",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b7"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDNPC9EZ6JGhE",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDNPC9EZ6JGhE",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user121@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b7"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCwbKaReE7xLUd5IJIFWBp",
|
||||
"customer": "cus_7VDNPC9EZ6JGhE"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDNHF276hw9Ic",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365147,
|
||||
"current_period_start": 1449686747,
|
||||
"customer": "cus_7VDNPC9EZ6JGhE",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b7"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 799
|
||||
},
|
||||
{
|
||||
"id": "sub_7VDNS5E09bpvSk",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365146,
|
||||
"current_period_start": 1449686746,
|
||||
"customer": "cus_7VDNPC9EZ6JGhE",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDNPC9EZ6JGhE",
|
||||
"subscription": "sub_7VDNS5E09bpvSk"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b6"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
},
|
||||
{
|
||||
"id": "sub_7VDNR05m6WWAeS",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365143,
|
||||
"current_period_start": 1449686743,
|
||||
"customer": "cus_7VDNPC9EZ6JGhE",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b7"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/invoices/in_17GCwgKaReE7xLUdQgRhKcNI",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "in_17GCwgKaReE7xLUdQgRhKcNI",
|
||||
"customer": "cus_7VDNPC9EZ6JGhE",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDNPC9EZ6JGhE",
|
||||
"subscription": "sub_7VDNS5E09bpvSk"
|
||||
},
|
||||
"lines": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDNS5E09bpvSk",
|
||||
"amount": 999,
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b6"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"proration": false,
|
||||
"quantity": 1,
|
||||
"type": "subscription"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"paid": true,
|
||||
"subscription": "sub_7VDNS5E09bpvSk",
|
||||
"total": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/invoices/in_17GCwdKaReE7xLUdRLGvAqaG",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "in_17GCwdKaReE7xLUdRLGvAqaG",
|
||||
"customer": "cus_7VDNPC9EZ6JGhE",
|
||||
"lines": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDNR05m6WWAeS",
|
||||
"amount": 999,
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b7"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"proration": false,
|
||||
"quantity": 1,
|
||||
"type": "subscription"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"paid": true,
|
||||
"subscription": "sub_7VDNR05m6WWAeS",
|
||||
"total": 999
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VDNPC9EZ6JGhE/subscriptions/sub_7VDNS5E09bpvSk",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDNS5E09bpvSk",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365146,
|
||||
"current_period_start": 1449686746,
|
||||
"customer": "cus_7VDNPC9EZ6JGhE",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDNPC9EZ6JGhE",
|
||||
"subscription": "sub_7VDNS5E09bpvSk"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b6"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDNPC9EZ6JGhE",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDNPC9EZ6JGhE",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user121@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b7"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCwbKaReE7xLUd5IJIFWBp",
|
||||
"customer": "cus_7VDNPC9EZ6JGhE"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDNHF276hw9Ic",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365147,
|
||||
"current_period_start": 1449686747,
|
||||
"customer": "cus_7VDNPC9EZ6JGhE",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b7"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 799
|
||||
},
|
||||
{
|
||||
"id": "sub_7VDNS5E09bpvSk",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365146,
|
||||
"current_period_start": 1449686746,
|
||||
"customer": "cus_7VDNPC9EZ6JGhE",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDNPC9EZ6JGhE",
|
||||
"subscription": "sub_7VDNS5E09bpvSk"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b6"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
},
|
||||
{
|
||||
"id": "sub_7VDNR05m6WWAeS",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365143,
|
||||
"current_period_start": 1449686743,
|
||||
"customer": "cus_7VDNPC9EZ6JGhE",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b7"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "DELETE",
|
||||
"path": "/v1/customers/cus_7VDNPC9EZ6JGhE/subscriptions/sub_7VDNS5E09bpvSk",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDNS5E09bpvSk",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365146,
|
||||
"current_period_start": 1449686746,
|
||||
"customer": "cus_7VDNPC9EZ6JGhE",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDNPC9EZ6JGhE",
|
||||
"subscription": "sub_7VDNS5E09bpvSk"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b6"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VDNPC9EZ6JGhE/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDNHF276hw9Ic",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365147,
|
||||
"current_period_start": 1449686747,
|
||||
"customer": "cus_7VDNPC9EZ6JGhE",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b7"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 799
|
||||
},
|
||||
{
|
||||
"id": "sub_7VDNR05m6WWAeS",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365143,
|
||||
"current_period_start": 1449686743,
|
||||
"customer": "cus_7VDNPC9EZ6JGhE",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b7"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
]
|
731
spec/fixtures/sub-test-17.json
vendored
Normal file
731
spec/fixtures/sub-test-17.json
vendored
Normal file
|
@ -0,0 +1,731 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/tokens",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "tok_17GCwmKaReE7xLUdpl5Q3yOw",
|
||||
"card": {
|
||||
"id": "card_17GCwmKaReE7xLUd3sr8m76Y"
|
||||
},
|
||||
"type": "card"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDNJTygSygz49",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user123@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b9"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCwmKaReE7xLUd3sr8m76Y",
|
||||
"customer": "cus_7VDNJTygSygz49"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VDNJTygSygz49/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"has_more": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDNJTygSygz49",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDNJTygSygz49",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user123@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b9"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCwmKaReE7xLUd3sr8m76Y",
|
||||
"customer": "cus_7VDNJTygSygz49"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDNJTygSygz49/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDNbSQlfeeWHJ",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365155,
|
||||
"current_period_start": 1449686755,
|
||||
"customer": "cus_7VDNJTygSygz49",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDNJTygSygz49",
|
||||
"subscription": "sub_7VDNbSQlfeeWHJ"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b8"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDNJTygSygz49/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDNDyYKMgd89h",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365156,
|
||||
"current_period_start": 1449686756,
|
||||
"customer": "cus_7VDNJTygSygz49",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b9"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 999
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/invoices",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"data": [
|
||||
{
|
||||
"id": "in_17GCwqKaReE7xLUdkrPY6enO",
|
||||
"customer": "cus_7VDNJTygSygz49",
|
||||
"lines": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDNDyYKMgd89h",
|
||||
"amount": 999,
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b9"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"proration": false,
|
||||
"quantity": 999,
|
||||
"type": "subscription"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"paid": true,
|
||||
"subscription": "sub_7VDNDyYKMgd89h",
|
||||
"total": 999
|
||||
},
|
||||
{
|
||||
"id": "in_17GCwpKaReE7xLUdsuaebpGq",
|
||||
"customer": "cus_7VDNJTygSygz49",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDNJTygSygz49",
|
||||
"subscription": "sub_7VDNbSQlfeeWHJ"
|
||||
},
|
||||
"lines": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDNbSQlfeeWHJ",
|
||||
"amount": 999,
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b8"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"proration": false,
|
||||
"quantity": 1,
|
||||
"type": "subscription"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"paid": true,
|
||||
"subscription": "sub_7VDNbSQlfeeWHJ",
|
||||
"total": 0
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDNJTygSygz49",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDNJTygSygz49",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user123@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b9"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCwmKaReE7xLUd3sr8m76Y",
|
||||
"customer": "cus_7VDNJTygSygz49"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDNDyYKMgd89h",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365156,
|
||||
"current_period_start": 1449686756,
|
||||
"customer": "cus_7VDNJTygSygz49",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b9"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 999
|
||||
},
|
||||
{
|
||||
"id": "sub_7VDNbSQlfeeWHJ",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365155,
|
||||
"current_period_start": 1449686755,
|
||||
"customer": "cus_7VDNJTygSygz49",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDNJTygSygz49",
|
||||
"subscription": "sub_7VDNbSQlfeeWHJ"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b8"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDNJTygSygz49",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDNJTygSygz49",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user123@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b9"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCwmKaReE7xLUd3sr8m76Y",
|
||||
"customer": "cus_7VDNJTygSygz49"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDNDyYKMgd89h",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365156,
|
||||
"current_period_start": 1449686756,
|
||||
"customer": "cus_7VDNJTygSygz49",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b9"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 999
|
||||
},
|
||||
{
|
||||
"id": "sub_7VDNbSQlfeeWHJ",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365155,
|
||||
"current_period_start": 1449686755,
|
||||
"customer": "cus_7VDNJTygSygz49",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDNJTygSygz49",
|
||||
"subscription": "sub_7VDNbSQlfeeWHJ"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b8"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/invoices/in_17GCwqKaReE7xLUdkrPY6enO",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "in_17GCwqKaReE7xLUdkrPY6enO",
|
||||
"customer": "cus_7VDNJTygSygz49",
|
||||
"lines": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDNDyYKMgd89h",
|
||||
"amount": 999,
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b9"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"proration": false,
|
||||
"quantity": 999,
|
||||
"type": "subscription"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"paid": true,
|
||||
"subscription": "sub_7VDNDyYKMgd89h",
|
||||
"total": 999
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDNJTygSygz49",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDNJTygSygz49",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user123@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b9"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCwmKaReE7xLUd3sr8m76Y",
|
||||
"customer": "cus_7VDNJTygSygz49"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDNDyYKMgd89h",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365156,
|
||||
"current_period_start": 1449686756,
|
||||
"customer": "cus_7VDNJTygSygz49",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b9"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 999
|
||||
},
|
||||
{
|
||||
"id": "sub_7VDNbSQlfeeWHJ",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365155,
|
||||
"current_period_start": 1449686755,
|
||||
"customer": "cus_7VDNJTygSygz49",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDNJTygSygz49",
|
||||
"subscription": "sub_7VDNbSQlfeeWHJ"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b8"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VDNJTygSygz49",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDNJTygSygz49",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user123@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b9"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCwmKaReE7xLUd3sr8m76Y",
|
||||
"customer": "cus_7VDNJTygSygz49"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDNDyYKMgd89h",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365156,
|
||||
"current_period_start": 1449686756,
|
||||
"customer": "cus_7VDNJTygSygz49",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b9"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 999
|
||||
},
|
||||
{
|
||||
"id": "sub_7VDNbSQlfeeWHJ",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365155,
|
||||
"current_period_start": 1449686755,
|
||||
"customer": "cus_7VDNJTygSygz49",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDNJTygSygz49",
|
||||
"subscription": "sub_7VDNbSQlfeeWHJ"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b8"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/invoices/in_17GCwpKaReE7xLUdsuaebpGq",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "in_17GCwpKaReE7xLUdsuaebpGq",
|
||||
"customer": "cus_7VDNJTygSygz49",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDNJTygSygz49",
|
||||
"subscription": "sub_7VDNbSQlfeeWHJ"
|
||||
},
|
||||
"lines": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDNbSQlfeeWHJ",
|
||||
"amount": 999,
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b8"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"proration": false,
|
||||
"quantity": 1,
|
||||
"type": "subscription"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"paid": true,
|
||||
"subscription": "sub_7VDNbSQlfeeWHJ",
|
||||
"total": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VDNJTygSygz49/subscriptions/sub_7VDNbSQlfeeWHJ",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDNbSQlfeeWHJ",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365155,
|
||||
"current_period_start": 1449686755,
|
||||
"customer": "cus_7VDNJTygSygz49",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDNJTygSygz49",
|
||||
"subscription": "sub_7VDNbSQlfeeWHJ"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b8"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "DELETE",
|
||||
"path": "/v1/customers/cus_7VDNJTygSygz49/subscriptions/sub_7VDNbSQlfeeWHJ",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDNbSQlfeeWHJ",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365155,
|
||||
"current_period_start": 1449686755,
|
||||
"customer": "cus_7VDNJTygSygz49",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDNJTygSygz49",
|
||||
"subscription": "sub_7VDNbSQlfeeWHJ"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b8"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDNJTygSygz49",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDNJTygSygz49",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user123@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b9"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCwmKaReE7xLUd3sr8m76Y",
|
||||
"customer": "cus_7VDNJTygSygz49"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDNDyYKMgd89h",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365156,
|
||||
"current_period_start": 1449686756,
|
||||
"customer": "cus_7VDNJTygSygz49",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b9"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 999
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDNJTygSygz49/subscriptions/sub_7VDNDyYKMgd89h",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDNDyYKMgd89h",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365156,
|
||||
"current_period_start": 1449686756,
|
||||
"customer": "cus_7VDNJTygSygz49",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b9"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDNJTygSygz49",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDNJTygSygz49",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user123@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b9"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCwmKaReE7xLUd3sr8m76Y",
|
||||
"customer": "cus_7VDNJTygSygz49"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDNDyYKMgd89h",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365156,
|
||||
"current_period_start": 1449686756,
|
||||
"customer": "cus_7VDNJTygSygz49",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b9"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 0
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VDNJTygSygz49/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDNDyYKMgd89h",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365156,
|
||||
"current_period_start": 1449686756,
|
||||
"customer": "cus_7VDNJTygSygz49",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186b9"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 0
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
]
|
1306
spec/fixtures/sub-test-18.json
vendored
Normal file
1306
spec/fixtures/sub-test-18.json
vendored
Normal file
File diff suppressed because it is too large
Load diff
1291
spec/fixtures/sub-test-19.json
vendored
Normal file
1291
spec/fixtures/sub-test-19.json
vendored
Normal file
File diff suppressed because it is too large
Load diff
120
spec/fixtures/sub-test-20.json
vendored
Normal file
120
spec/fixtures/sub-test-20.json
vendored
Normal file
|
@ -0,0 +1,120 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/tokens",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "tok_17GCxPKaReE7xLUdw5hQd1LV",
|
||||
"card": {
|
||||
"id": "card_17GCxPKaReE7xLUdYtxlCRp7"
|
||||
},
|
||||
"type": "card"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDO9FZp6WdhaH",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user128@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186be"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCxPKaReE7xLUdYtxlCRp7",
|
||||
"customer": "cus_7VDO9FZp6WdhaH"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDO9FZp6WdhaH",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDO9FZp6WdhaH",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user128@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186be"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCxPKaReE7xLUdYtxlCRp7",
|
||||
"customer": "cus_7VDO9FZp6WdhaH"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDO9FZp6WdhaH",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDO9FZp6WdhaH",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user128@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186be"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCxPKaReE7xLUdYtxlCRp7",
|
||||
"customer": "cus_7VDO9FZp6WdhaH"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDO9FZp6WdhaH/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDO0MXZq3cp9c",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365193,
|
||||
"current_period_start": 1449686793,
|
||||
"customer": "cus_7VDO9FZp6WdhaH",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186be"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 0
|
||||
}
|
||||
}
|
||||
]
|
1014
spec/fixtures/sub-test-21.json
vendored
Normal file
1014
spec/fixtures/sub-test-21.json
vendored
Normal file
File diff suppressed because it is too large
Load diff
1151
spec/fixtures/sub-test-22.json
vendored
Normal file
1151
spec/fixtures/sub-test-22.json
vendored
Normal file
File diff suppressed because it is too large
Load diff
564
spec/fixtures/sub-test-23.json
vendored
Normal file
564
spec/fixtures/sub-test-23.json
vendored
Normal file
|
@ -0,0 +1,564 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/tokens",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "tok_17GCxvKaReE7xLUdEV9eAvts",
|
||||
"card": {
|
||||
"id": "card_17GCxvKaReE7xLUd6Z6925wK"
|
||||
},
|
||||
"type": "card"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDOpSn6vZJJy5",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user134@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c4"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCxvKaReE7xLUd6Z6925wK",
|
||||
"customer": "cus_7VDOpSn6vZJJy5"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDOpSn6vZJJy5",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDOpSn6vZJJy5",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user134@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c4"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCxvKaReE7xLUd6Z6925wK",
|
||||
"customer": "cus_7VDOpSn6vZJJy5"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VDOpSn6vZJJy5/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"has_more": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDOpSn6vZJJy5/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDOz93nZ10dgt",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365225,
|
||||
"current_period_start": 1449686825,
|
||||
"customer": "cus_7VDOpSn6vZJJy5",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDOpSn6vZJJy5",
|
||||
"subscription": "sub_7VDOz93nZ10dgt"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c3"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDOpSn6vZJJy5",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDOpSn6vZJJy5",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user134@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c4"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCxvKaReE7xLUd6Z6925wK",
|
||||
"customer": "cus_7VDOpSn6vZJJy5"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDOz93nZ10dgt",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365225,
|
||||
"current_period_start": 1449686825,
|
||||
"customer": "cus_7VDOpSn6vZJJy5",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDOpSn6vZJJy5",
|
||||
"subscription": "sub_7VDOz93nZ10dgt"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c3"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDOpSn6vZJJy5/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDOnhT4PweQKC",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365227,
|
||||
"current_period_start": 1449686827,
|
||||
"customer": "cus_7VDOpSn6vZJJy5",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c4"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 999
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/invoices",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"data": [
|
||||
{
|
||||
"id": "in_17GCxzKaReE7xLUdRK7KpPjM",
|
||||
"customer": "cus_7VDOpSn6vZJJy5",
|
||||
"lines": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDOnhT4PweQKC",
|
||||
"amount": 999,
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c4"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"proration": false,
|
||||
"quantity": 999,
|
||||
"type": "subscription"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"paid": true,
|
||||
"subscription": "sub_7VDOnhT4PweQKC",
|
||||
"total": 999
|
||||
},
|
||||
{
|
||||
"id": "in_17GCxxKaReE7xLUdo8Qz7BPX",
|
||||
"customer": "cus_7VDOpSn6vZJJy5",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDOpSn6vZJJy5",
|
||||
"subscription": "sub_7VDOz93nZ10dgt"
|
||||
},
|
||||
"lines": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDOz93nZ10dgt",
|
||||
"amount": 999,
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c3"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"proration": false,
|
||||
"quantity": 1,
|
||||
"type": "subscription"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"paid": true,
|
||||
"subscription": "sub_7VDOz93nZ10dgt",
|
||||
"total": 0
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDOpSn6vZJJy5",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDOpSn6vZJJy5",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user134@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c4"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCxvKaReE7xLUd6Z6925wK",
|
||||
"customer": "cus_7VDOpSn6vZJJy5"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDOnhT4PweQKC",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365227,
|
||||
"current_period_start": 1449686827,
|
||||
"customer": "cus_7VDOpSn6vZJJy5",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c4"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 999
|
||||
},
|
||||
{
|
||||
"id": "sub_7VDOz93nZ10dgt",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365225,
|
||||
"current_period_start": 1449686825,
|
||||
"customer": "cus_7VDOpSn6vZJJy5",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDOpSn6vZJJy5",
|
||||
"subscription": "sub_7VDOz93nZ10dgt"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c3"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDOpSn6vZJJy5",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDOpSn6vZJJy5",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user134@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c4"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCxvKaReE7xLUd6Z6925wK",
|
||||
"customer": "cus_7VDOpSn6vZJJy5"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDOnhT4PweQKC",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365227,
|
||||
"current_period_start": 1449686827,
|
||||
"customer": "cus_7VDOpSn6vZJJy5",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c4"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 999
|
||||
},
|
||||
{
|
||||
"id": "sub_7VDOz93nZ10dgt",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365225,
|
||||
"current_period_start": 1449686825,
|
||||
"customer": "cus_7VDOpSn6vZJJy5",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDOpSn6vZJJy5",
|
||||
"subscription": "sub_7VDOz93nZ10dgt"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c3"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/invoices/in_17GCxzKaReE7xLUdRK7KpPjM",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "in_17GCxzKaReE7xLUdRK7KpPjM",
|
||||
"customer": "cus_7VDOpSn6vZJJy5",
|
||||
"lines": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDOnhT4PweQKC",
|
||||
"amount": 999,
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c4"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"proration": false,
|
||||
"quantity": 999,
|
||||
"type": "subscription"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"paid": true,
|
||||
"subscription": "sub_7VDOnhT4PweQKC",
|
||||
"total": 999
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VDOpSn6vZJJy5",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDOpSn6vZJJy5",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user134@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c4"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCxvKaReE7xLUd6Z6925wK",
|
||||
"customer": "cus_7VDOpSn6vZJJy5"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDOnhT4PweQKC",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365227,
|
||||
"current_period_start": 1449686827,
|
||||
"customer": "cus_7VDOpSn6vZJJy5",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c4"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 999
|
||||
},
|
||||
{
|
||||
"id": "sub_7VDOz93nZ10dgt",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365225,
|
||||
"current_period_start": 1449686825,
|
||||
"customer": "cus_7VDOpSn6vZJJy5",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDOpSn6vZJJy5",
|
||||
"subscription": "sub_7VDOz93nZ10dgt"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c3"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/invoices/in_17GCxxKaReE7xLUdo8Qz7BPX",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "in_17GCxxKaReE7xLUdo8Qz7BPX",
|
||||
"customer": "cus_7VDOpSn6vZJJy5",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDOpSn6vZJJy5",
|
||||
"subscription": "sub_7VDOz93nZ10dgt"
|
||||
},
|
||||
"lines": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDOz93nZ10dgt",
|
||||
"amount": 999,
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c3"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"proration": false,
|
||||
"quantity": 1,
|
||||
"type": "subscription"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"paid": true,
|
||||
"subscription": "sub_7VDOz93nZ10dgt",
|
||||
"total": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/tokens",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "tok_17GCy2KaReE7xLUdOlFDclfi",
|
||||
"card": {
|
||||
"id": "card_17GCy2KaReE7xLUdn5BsBWRl"
|
||||
},
|
||||
"type": "card"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDObWSh1dlYh7",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user133@foo.bar",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c3"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCy2KaReE7xLUdn5BsBWRl",
|
||||
"customer": "cus_7VDObWSh1dlYh7"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
545
spec/fixtures/sub-test-24.json
vendored
Normal file
545
spec/fixtures/sub-test-24.json
vendored
Normal file
|
@ -0,0 +1,545 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/tokens",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "tok_17GCy3KaReE7xLUdtYb2OjrY",
|
||||
"card": {
|
||||
"id": "card_17GCy3KaReE7xLUd3P9sxPX6"
|
||||
},
|
||||
"type": "card"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDO2rAKGoRyuV",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user136@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c6"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCy3KaReE7xLUd3P9sxPX6",
|
||||
"customer": "cus_7VDO2rAKGoRyuV"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDO2rAKGoRyuV",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDO2rAKGoRyuV",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user136@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c6"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCy3KaReE7xLUd3P9sxPX6",
|
||||
"customer": "cus_7VDO2rAKGoRyuV"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VDO2rAKGoRyuV/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"has_more": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDO2rAKGoRyuV/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDOI7IgrnOnfU",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365233,
|
||||
"current_period_start": 1449686833,
|
||||
"customer": "cus_7VDO2rAKGoRyuV",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDO2rAKGoRyuV",
|
||||
"subscription": "sub_7VDOI7IgrnOnfU"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c5"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDO2rAKGoRyuV",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDO2rAKGoRyuV",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user136@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c6"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCy3KaReE7xLUd3P9sxPX6",
|
||||
"customer": "cus_7VDO2rAKGoRyuV"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDOI7IgrnOnfU",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365233,
|
||||
"current_period_start": 1449686833,
|
||||
"customer": "cus_7VDO2rAKGoRyuV",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDO2rAKGoRyuV",
|
||||
"subscription": "sub_7VDOI7IgrnOnfU"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c5"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDO2rAKGoRyuV/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDOArVVxBdO8Z",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365235,
|
||||
"current_period_start": 1449686835,
|
||||
"customer": "cus_7VDO2rAKGoRyuV",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c6"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 999
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDO2rAKGoRyuV",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDO2rAKGoRyuV",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user136@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c6"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCy3KaReE7xLUd3P9sxPX6",
|
||||
"customer": "cus_7VDO2rAKGoRyuV"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDOArVVxBdO8Z",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365235,
|
||||
"current_period_start": 1449686835,
|
||||
"customer": "cus_7VDO2rAKGoRyuV",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c6"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 999
|
||||
},
|
||||
{
|
||||
"id": "sub_7VDOI7IgrnOnfU",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365233,
|
||||
"current_period_start": 1449686833,
|
||||
"customer": "cus_7VDO2rAKGoRyuV",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDO2rAKGoRyuV",
|
||||
"subscription": "sub_7VDOI7IgrnOnfU"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c5"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/invoices",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"data": [
|
||||
{
|
||||
"id": "in_17GCy7KaReE7xLUdan3pUgPg",
|
||||
"customer": "cus_7VDO2rAKGoRyuV",
|
||||
"lines": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDOArVVxBdO8Z",
|
||||
"amount": 999,
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c6"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"proration": false,
|
||||
"quantity": 999,
|
||||
"type": "subscription"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"paid": true,
|
||||
"subscription": "sub_7VDOArVVxBdO8Z",
|
||||
"total": 999
|
||||
},
|
||||
{
|
||||
"id": "in_17GCy5KaReE7xLUdWfZT15jA",
|
||||
"customer": "cus_7VDO2rAKGoRyuV",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDO2rAKGoRyuV",
|
||||
"subscription": "sub_7VDOI7IgrnOnfU"
|
||||
},
|
||||
"lines": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDOI7IgrnOnfU",
|
||||
"amount": 999,
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c5"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"proration": false,
|
||||
"quantity": 1,
|
||||
"type": "subscription"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"paid": true,
|
||||
"subscription": "sub_7VDOI7IgrnOnfU",
|
||||
"total": 0
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDO2rAKGoRyuV",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDO2rAKGoRyuV",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user136@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c6"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCy3KaReE7xLUd3P9sxPX6",
|
||||
"customer": "cus_7VDO2rAKGoRyuV"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDOArVVxBdO8Z",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365235,
|
||||
"current_period_start": 1449686835,
|
||||
"customer": "cus_7VDO2rAKGoRyuV",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c6"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 999
|
||||
},
|
||||
{
|
||||
"id": "sub_7VDOI7IgrnOnfU",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365233,
|
||||
"current_period_start": 1449686833,
|
||||
"customer": "cus_7VDO2rAKGoRyuV",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDO2rAKGoRyuV",
|
||||
"subscription": "sub_7VDOI7IgrnOnfU"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c5"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/invoices/in_17GCy7KaReE7xLUdan3pUgPg",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "in_17GCy7KaReE7xLUdan3pUgPg",
|
||||
"customer": "cus_7VDO2rAKGoRyuV",
|
||||
"lines": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDOArVVxBdO8Z",
|
||||
"amount": 999,
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c6"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"proration": false,
|
||||
"quantity": 999,
|
||||
"type": "subscription"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"paid": true,
|
||||
"subscription": "sub_7VDOArVVxBdO8Z",
|
||||
"total": 999
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VDO2rAKGoRyuV",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDO2rAKGoRyuV",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user136@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c6"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCy3KaReE7xLUd3P9sxPX6",
|
||||
"customer": "cus_7VDO2rAKGoRyuV"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDOArVVxBdO8Z",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365235,
|
||||
"current_period_start": 1449686835,
|
||||
"customer": "cus_7VDO2rAKGoRyuV",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c6"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 999
|
||||
},
|
||||
{
|
||||
"id": "sub_7VDOI7IgrnOnfU",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365233,
|
||||
"current_period_start": 1449686833,
|
||||
"customer": "cus_7VDO2rAKGoRyuV",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDO2rAKGoRyuV",
|
||||
"subscription": "sub_7VDOI7IgrnOnfU"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c5"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/invoices/in_17GCy5KaReE7xLUdWfZT15jA",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "in_17GCy5KaReE7xLUdWfZT15jA",
|
||||
"customer": "cus_7VDO2rAKGoRyuV",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDO2rAKGoRyuV",
|
||||
"subscription": "sub_7VDOI7IgrnOnfU"
|
||||
},
|
||||
"lines": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDOI7IgrnOnfU",
|
||||
"amount": 999,
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c5"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"proration": false,
|
||||
"quantity": 1,
|
||||
"type": "subscription"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"paid": true,
|
||||
"subscription": "sub_7VDOI7IgrnOnfU",
|
||||
"total": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDOv27KBKz3BU",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user135@foo.bar",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c5"
|
||||
},
|
||||
"sources": {
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
572
spec/fixtures/sub-test-25.json
vendored
Normal file
572
spec/fixtures/sub-test-25.json
vendored
Normal file
|
@ -0,0 +1,572 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/tokens",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "tok_17GCyBKaReE7xLUd9G37bRkd",
|
||||
"card": {
|
||||
"id": "card_17GCyBKaReE7xLUdDzcyOMq0"
|
||||
},
|
||||
"type": "card"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDPUcT1ISx3qE",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user138@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c8"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCyBKaReE7xLUdDzcyOMq0",
|
||||
"customer": "cus_7VDPUcT1ISx3qE"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDPUcT1ISx3qE",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDPUcT1ISx3qE",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user138@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c8"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCyBKaReE7xLUdDzcyOMq0",
|
||||
"customer": "cus_7VDPUcT1ISx3qE"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VDPUcT1ISx3qE/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"has_more": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDPUcT1ISx3qE/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDPRTLVZfr2xD",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365241,
|
||||
"current_period_start": 1449686841,
|
||||
"customer": "cus_7VDPUcT1ISx3qE",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDPUcT1ISx3qE",
|
||||
"subscription": "sub_7VDPRTLVZfr2xD"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c7"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDPUcT1ISx3qE",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDPUcT1ISx3qE",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user138@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c8"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCyBKaReE7xLUdDzcyOMq0",
|
||||
"customer": "cus_7VDPUcT1ISx3qE"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDPRTLVZfr2xD",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365241,
|
||||
"current_period_start": 1449686841,
|
||||
"customer": "cus_7VDPUcT1ISx3qE",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDPUcT1ISx3qE",
|
||||
"subscription": "sub_7VDPRTLVZfr2xD"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c7"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDPUcT1ISx3qE/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDPKfPdazIoWu",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365243,
|
||||
"current_period_start": 1449686843,
|
||||
"customer": "cus_7VDPUcT1ISx3qE",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c8"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 999
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/invoices",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"data": [
|
||||
{
|
||||
"id": "in_17GCyFKaReE7xLUdq9pABNeA",
|
||||
"customer": "cus_7VDPUcT1ISx3qE",
|
||||
"lines": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDPKfPdazIoWu",
|
||||
"amount": 999,
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c8"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"proration": false,
|
||||
"quantity": 999,
|
||||
"type": "subscription"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"paid": true,
|
||||
"subscription": "sub_7VDPKfPdazIoWu",
|
||||
"total": 999
|
||||
},
|
||||
{
|
||||
"id": "in_17GCyDKaReE7xLUdyDnGhQKL",
|
||||
"customer": "cus_7VDPUcT1ISx3qE",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDPUcT1ISx3qE",
|
||||
"subscription": "sub_7VDPRTLVZfr2xD"
|
||||
},
|
||||
"lines": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDPRTLVZfr2xD",
|
||||
"amount": 999,
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c7"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"proration": false,
|
||||
"quantity": 1,
|
||||
"type": "subscription"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"paid": true,
|
||||
"subscription": "sub_7VDPRTLVZfr2xD",
|
||||
"total": 0
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/invoices/in_17GCyFKaReE7xLUdq9pABNeA",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "in_17GCyFKaReE7xLUdq9pABNeA",
|
||||
"customer": "cus_7VDPUcT1ISx3qE",
|
||||
"lines": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDPKfPdazIoWu",
|
||||
"amount": 999,
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c8"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"proration": false,
|
||||
"quantity": 999,
|
||||
"type": "subscription"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"paid": true,
|
||||
"subscription": "sub_7VDPKfPdazIoWu",
|
||||
"total": 999
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDPUcT1ISx3qE",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDPUcT1ISx3qE",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user138@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c8"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCyBKaReE7xLUdDzcyOMq0",
|
||||
"customer": "cus_7VDPUcT1ISx3qE"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDPKfPdazIoWu",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365243,
|
||||
"current_period_start": 1449686843,
|
||||
"customer": "cus_7VDPUcT1ISx3qE",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c8"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 999
|
||||
},
|
||||
{
|
||||
"id": "sub_7VDPRTLVZfr2xD",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365241,
|
||||
"current_period_start": 1449686841,
|
||||
"customer": "cus_7VDPUcT1ISx3qE",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDPUcT1ISx3qE",
|
||||
"subscription": "sub_7VDPRTLVZfr2xD"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c7"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VDPUcT1ISx3qE",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDPUcT1ISx3qE",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user138@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c8"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCyBKaReE7xLUdDzcyOMq0",
|
||||
"customer": "cus_7VDPUcT1ISx3qE"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDPKfPdazIoWu",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365243,
|
||||
"current_period_start": 1449686843,
|
||||
"customer": "cus_7VDPUcT1ISx3qE",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c8"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 999
|
||||
},
|
||||
{
|
||||
"id": "sub_7VDPRTLVZfr2xD",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365241,
|
||||
"current_period_start": 1449686841,
|
||||
"customer": "cus_7VDPUcT1ISx3qE",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDPUcT1ISx3qE",
|
||||
"subscription": "sub_7VDPRTLVZfr2xD"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c7"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDPUcT1ISx3qE",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDPUcT1ISx3qE",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user138@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c8"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCyBKaReE7xLUdDzcyOMq0",
|
||||
"customer": "cus_7VDPUcT1ISx3qE"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDPKfPdazIoWu",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365243,
|
||||
"current_period_start": 1449686843,
|
||||
"customer": "cus_7VDPUcT1ISx3qE",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c8"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 999
|
||||
},
|
||||
{
|
||||
"id": "sub_7VDPRTLVZfr2xD",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365241,
|
||||
"current_period_start": 1449686841,
|
||||
"customer": "cus_7VDPUcT1ISx3qE",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDPUcT1ISx3qE",
|
||||
"subscription": "sub_7VDPRTLVZfr2xD"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c7"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/invoices/in_17GCyDKaReE7xLUdyDnGhQKL",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "in_17GCyDKaReE7xLUdyDnGhQKL",
|
||||
"customer": "cus_7VDPUcT1ISx3qE",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDPUcT1ISx3qE",
|
||||
"subscription": "sub_7VDPRTLVZfr2xD"
|
||||
},
|
||||
"lines": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDPRTLVZfr2xD",
|
||||
"amount": 999,
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c7"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"proration": false,
|
||||
"quantity": 1,
|
||||
"type": "subscription"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"paid": true,
|
||||
"subscription": "sub_7VDPRTLVZfr2xD",
|
||||
"total": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VDPUcT1ISx3qE/subscriptions/sub_7VDPKfPdazIoWu",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDPKfPdazIoWu",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365243,
|
||||
"current_period_start": 1449686843,
|
||||
"customer": "cus_7VDPUcT1ISx3qE",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c8"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 999
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VDPUcT1ISx3qE/subscriptions/sub_7VDPRTLVZfr2xD",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDPRTLVZfr2xD",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365241,
|
||||
"current_period_start": 1449686841,
|
||||
"customer": "cus_7VDPUcT1ISx3qE",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDPUcT1ISx3qE",
|
||||
"subscription": "sub_7VDPRTLVZfr2xD"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186c7"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
}
|
||||
]
|
2713
spec/fixtures/sub-test-26.json
vendored
Normal file
2713
spec/fixtures/sub-test-26.json
vendored
Normal file
File diff suppressed because it is too large
Load diff
1340
spec/fixtures/sub-test-27.json
vendored
Normal file
1340
spec/fixtures/sub-test-27.json
vendored
Normal file
File diff suppressed because it is too large
Load diff
120
spec/fixtures/sub-test-28.json
vendored
Normal file
120
spec/fixtures/sub-test-28.json
vendored
Normal file
|
@ -0,0 +1,120 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/tokens",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "tok_17GCz0KaReE7xLUdfGmoH6iD",
|
||||
"card": {
|
||||
"id": "card_17GCz0KaReE7xLUdbv6dUvYF"
|
||||
},
|
||||
"type": "card"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDPyzg6wmIScl",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user146@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d0"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCz0KaReE7xLUdbv6dUvYF",
|
||||
"customer": "cus_7VDPyzg6wmIScl"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDPyzg6wmIScl",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDPyzg6wmIScl",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user146@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d0"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCz0KaReE7xLUdbv6dUvYF",
|
||||
"customer": "cus_7VDPyzg6wmIScl"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDPyzg6wmIScl",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDPyzg6wmIScl",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user146@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d0"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCz0KaReE7xLUdbv6dUvYF",
|
||||
"customer": "cus_7VDPyzg6wmIScl"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDPyzg6wmIScl/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDPCLPadwxF7P",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365292,
|
||||
"current_period_start": 1449686892,
|
||||
"customer": "cus_7VDPyzg6wmIScl",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d0"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 0
|
||||
}
|
||||
}
|
||||
]
|
736
spec/fixtures/sub-test-29.json
vendored
Normal file
736
spec/fixtures/sub-test-29.json
vendored
Normal file
|
@ -0,0 +1,736 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/tokens",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "tok_17GCz3KaReE7xLUd6y2AQlmf",
|
||||
"card": {
|
||||
"id": "card_17GCz3KaReE7xLUdormzFUHD"
|
||||
},
|
||||
"type": "card"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDPo3YNU8ZYnv",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user148@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d2"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCz3KaReE7xLUdormzFUHD",
|
||||
"customer": "cus_7VDPo3YNU8ZYnv"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDPo3YNU8ZYnv",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDPo3YNU8ZYnv",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user148@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d2"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCz3KaReE7xLUdormzFUHD",
|
||||
"customer": "cus_7VDPo3YNU8ZYnv"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VDPo3YNU8ZYnv/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"has_more": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDPo3YNU8ZYnv/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDPg3LCQ5CzTP",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365296,
|
||||
"current_period_start": 1449686896,
|
||||
"customer": "cus_7VDPo3YNU8ZYnv",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDPo3YNU8ZYnv",
|
||||
"subscription": "sub_7VDPg3LCQ5CzTP"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d1"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDPo3YNU8ZYnv",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDPo3YNU8ZYnv",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user148@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d2"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCz3KaReE7xLUdormzFUHD",
|
||||
"customer": "cus_7VDPo3YNU8ZYnv"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDPg3LCQ5CzTP",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365296,
|
||||
"current_period_start": 1449686896,
|
||||
"customer": "cus_7VDPo3YNU8ZYnv",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDPo3YNU8ZYnv",
|
||||
"subscription": "sub_7VDPg3LCQ5CzTP"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d1"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDPo3YNU8ZYnv/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDPO0Lo0o3MoJ",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365297,
|
||||
"current_period_start": 1449686897,
|
||||
"customer": "cus_7VDPo3YNU8ZYnv",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d2"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 999
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/invoices",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"data": [
|
||||
{
|
||||
"id": "in_17GCz7KaReE7xLUdiVEGMsR1",
|
||||
"customer": "cus_7VDPo3YNU8ZYnv",
|
||||
"lines": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDPO0Lo0o3MoJ",
|
||||
"amount": 999,
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d2"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"proration": false,
|
||||
"quantity": 999,
|
||||
"type": "subscription"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"paid": true,
|
||||
"subscription": "sub_7VDPO0Lo0o3MoJ",
|
||||
"total": 999
|
||||
},
|
||||
{
|
||||
"id": "in_17GCz6KaReE7xLUd2J7e0xQ3",
|
||||
"customer": "cus_7VDPo3YNU8ZYnv",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDPo3YNU8ZYnv",
|
||||
"subscription": "sub_7VDPg3LCQ5CzTP"
|
||||
},
|
||||
"lines": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDPg3LCQ5CzTP",
|
||||
"amount": 999,
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d1"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"proration": false,
|
||||
"quantity": 1,
|
||||
"type": "subscription"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"paid": true,
|
||||
"subscription": "sub_7VDPg3LCQ5CzTP",
|
||||
"total": 0
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDPo3YNU8ZYnv",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDPo3YNU8ZYnv",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user148@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d2"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCz3KaReE7xLUdormzFUHD",
|
||||
"customer": "cus_7VDPo3YNU8ZYnv"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDPO0Lo0o3MoJ",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365297,
|
||||
"current_period_start": 1449686897,
|
||||
"customer": "cus_7VDPo3YNU8ZYnv",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d2"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 999
|
||||
},
|
||||
{
|
||||
"id": "sub_7VDPg3LCQ5CzTP",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365296,
|
||||
"current_period_start": 1449686896,
|
||||
"customer": "cus_7VDPo3YNU8ZYnv",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDPo3YNU8ZYnv",
|
||||
"subscription": "sub_7VDPg3LCQ5CzTP"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d1"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/invoices/in_17GCz7KaReE7xLUdiVEGMsR1",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "in_17GCz7KaReE7xLUdiVEGMsR1",
|
||||
"customer": "cus_7VDPo3YNU8ZYnv",
|
||||
"lines": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDPO0Lo0o3MoJ",
|
||||
"amount": 999,
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d2"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"proration": false,
|
||||
"quantity": 999,
|
||||
"type": "subscription"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"paid": true,
|
||||
"subscription": "sub_7VDPO0Lo0o3MoJ",
|
||||
"total": 999
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDPo3YNU8ZYnv",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDPo3YNU8ZYnv",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user148@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d2"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCz3KaReE7xLUdormzFUHD",
|
||||
"customer": "cus_7VDPo3YNU8ZYnv"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDPO0Lo0o3MoJ",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365297,
|
||||
"current_period_start": 1449686897,
|
||||
"customer": "cus_7VDPo3YNU8ZYnv",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d2"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 999
|
||||
},
|
||||
{
|
||||
"id": "sub_7VDPg3LCQ5CzTP",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365296,
|
||||
"current_period_start": 1449686896,
|
||||
"customer": "cus_7VDPo3YNU8ZYnv",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDPo3YNU8ZYnv",
|
||||
"subscription": "sub_7VDPg3LCQ5CzTP"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d1"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VDPo3YNU8ZYnv",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDPo3YNU8ZYnv",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user148@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d2"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCz3KaReE7xLUdormzFUHD",
|
||||
"customer": "cus_7VDPo3YNU8ZYnv"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDPO0Lo0o3MoJ",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365297,
|
||||
"current_period_start": 1449686897,
|
||||
"customer": "cus_7VDPo3YNU8ZYnv",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d2"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 999
|
||||
},
|
||||
{
|
||||
"id": "sub_7VDPg3LCQ5CzTP",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365296,
|
||||
"current_period_start": 1449686896,
|
||||
"customer": "cus_7VDPo3YNU8ZYnv",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDPo3YNU8ZYnv",
|
||||
"subscription": "sub_7VDPg3LCQ5CzTP"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d1"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/invoices/in_17GCz6KaReE7xLUd2J7e0xQ3",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "in_17GCz6KaReE7xLUd2J7e0xQ3",
|
||||
"customer": "cus_7VDPo3YNU8ZYnv",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDPo3YNU8ZYnv",
|
||||
"subscription": "sub_7VDPg3LCQ5CzTP"
|
||||
},
|
||||
"lines": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDPg3LCQ5CzTP",
|
||||
"amount": 999,
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d1"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"proration": false,
|
||||
"quantity": 1,
|
||||
"type": "subscription"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"paid": true,
|
||||
"subscription": "sub_7VDPg3LCQ5CzTP",
|
||||
"total": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VDPo3YNU8ZYnv/subscriptions/sub_7VDPO0Lo0o3MoJ",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDPO0Lo0o3MoJ",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365297,
|
||||
"current_period_start": 1449686897,
|
||||
"customer": "cus_7VDPo3YNU8ZYnv",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d2"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 999
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VDPo3YNU8ZYnv/subscriptions/sub_7VDPg3LCQ5CzTP",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDPg3LCQ5CzTP",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365296,
|
||||
"current_period_start": 1449686896,
|
||||
"customer": "cus_7VDPo3YNU8ZYnv",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDPo3YNU8ZYnv",
|
||||
"subscription": "sub_7VDPg3LCQ5CzTP"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d1"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/tokens",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "tok_17GCzBKaReE7xLUdbvnLBdzm",
|
||||
"card": {
|
||||
"id": "card_17GCzBKaReE7xLUdrGaHl1xn"
|
||||
},
|
||||
"type": "card"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDPo3YNU8ZYnv",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDPo3YNU8ZYnv",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user148@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d2"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCzBKaReE7xLUdrGaHl1xn",
|
||||
"customer": "cus_7VDPo3YNU8ZYnv"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDPO0Lo0o3MoJ",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365297,
|
||||
"current_period_start": 1449686897,
|
||||
"customer": "cus_7VDPo3YNU8ZYnv",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d2"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 999
|
||||
},
|
||||
{
|
||||
"id": "sub_7VDPg3LCQ5CzTP",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365296,
|
||||
"current_period_start": 1449686896,
|
||||
"customer": "cus_7VDPo3YNU8ZYnv",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDPo3YNU8ZYnv",
|
||||
"subscription": "sub_7VDPg3LCQ5CzTP"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d1"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDPo3YNU8ZYnv/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDQOwKvASnwSe",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365302,
|
||||
"current_period_start": 1449686902,
|
||||
"customer": "cus_7VDPo3YNU8ZYnv",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d2"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VDPo3YNU8ZYnv/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDQOwKvASnwSe",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365302,
|
||||
"current_period_start": 1449686902,
|
||||
"customer": "cus_7VDPo3YNU8ZYnv",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d2"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
},
|
||||
{
|
||||
"id": "sub_7VDPO0Lo0o3MoJ",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365297,
|
||||
"current_period_start": 1449686897,
|
||||
"customer": "cus_7VDPo3YNU8ZYnv",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d2"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 999
|
||||
},
|
||||
{
|
||||
"id": "sub_7VDPg3LCQ5CzTP",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365296,
|
||||
"current_period_start": 1449686896,
|
||||
"customer": "cus_7VDPo3YNU8ZYnv",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDPo3YNU8ZYnv",
|
||||
"subscription": "sub_7VDPg3LCQ5CzTP"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d1"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
]
|
256
spec/fixtures/sub-test-30.json
vendored
Normal file
256
spec/fixtures/sub-test-30.json
vendored
Normal file
|
@ -0,0 +1,256 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDQwLJfXCoq4W",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user149@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d3"
|
||||
},
|
||||
"sources": {
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDQwLJfXCoq4W",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDQwLJfXCoq4W",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user149@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d3"
|
||||
},
|
||||
"sources": {
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDQwLJfXCoq4W/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDQkxjwBQw0Qx",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365304,
|
||||
"current_period_start": 1449686904,
|
||||
"customer": "cus_7VDQwLJfXCoq4W",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDQwLJfXCoq4W",
|
||||
"subscription": "sub_7VDQkxjwBQw0Qx"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d3"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/tokens",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "tok_17GCzFKaReE7xLUd8H2nXt45",
|
||||
"card": {
|
||||
"id": "card_17GCzFKaReE7xLUdZfftdcPf"
|
||||
},
|
||||
"type": "card"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDQwLJfXCoq4W",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDQwLJfXCoq4W",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user149@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d3"
|
||||
},
|
||||
"sources": {
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDQkxjwBQw0Qx",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365304,
|
||||
"current_period_start": 1449686904,
|
||||
"customer": "cus_7VDQwLJfXCoq4W",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDQwLJfXCoq4W",
|
||||
"subscription": "sub_7VDQkxjwBQw0Qx"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d3"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDQwLJfXCoq4W",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDQwLJfXCoq4W",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user149@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d3"
|
||||
},
|
||||
"sources": {
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDQkxjwBQw0Qx",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365304,
|
||||
"current_period_start": 1449686904,
|
||||
"customer": "cus_7VDQwLJfXCoq4W",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDQwLJfXCoq4W",
|
||||
"subscription": "sub_7VDQkxjwBQw0Qx"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d3"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDQlxv5S0eBtk",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user150@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d4"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCzFKaReE7xLUdZfftdcPf",
|
||||
"customer": "cus_7VDQlxv5S0eBtk"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDQlxv5S0eBtk",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDQlxv5S0eBtk",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user150@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d4"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCzFKaReE7xLUdZfftdcPf",
|
||||
"customer": "cus_7VDQlxv5S0eBtk"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDQlxv5S0eBtk/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDQXC0aQzjUhm",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365307,
|
||||
"current_period_start": 1449686907,
|
||||
"customer": "cus_7VDQlxv5S0eBtk",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d4"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 0
|
||||
}
|
||||
}
|
||||
]
|
842
spec/fixtures/sub-test-31.json
vendored
Normal file
842
spec/fixtures/sub-test-31.json
vendored
Normal file
|
@ -0,0 +1,842 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/tokens",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "tok_17GCzIKaReE7xLUdpd3xMQM2",
|
||||
"card": {
|
||||
"id": "card_17GCzIKaReE7xLUdoKnZvG6Z"
|
||||
},
|
||||
"type": "card"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDQreyG0YOAk3",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user153@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d7"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCzIKaReE7xLUdoKnZvG6Z",
|
||||
"customer": "cus_7VDQreyG0YOAk3"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VDQreyG0YOAk3/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"has_more": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDQreyG0YOAk3",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDQreyG0YOAk3",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user153@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d7"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCzIKaReE7xLUdoKnZvG6Z",
|
||||
"customer": "cus_7VDQreyG0YOAk3"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDQreyG0YOAk3/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDQN2xmA3qRv1",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365309,
|
||||
"current_period_start": 1449686909,
|
||||
"customer": "cus_7VDQreyG0YOAk3",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDQreyG0YOAk3",
|
||||
"subscription": "sub_7VDQN2xmA3qRv1"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d5"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VDQreyG0YOAk3/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDQN2xmA3qRv1",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365309,
|
||||
"current_period_start": 1449686909,
|
||||
"customer": "cus_7VDQreyG0YOAk3",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDQreyG0YOAk3",
|
||||
"subscription": "sub_7VDQN2xmA3qRv1"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d5"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDQreyG0YOAk3/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDQ2wKmp32Bog",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365311,
|
||||
"current_period_start": 1449686911,
|
||||
"customer": "cus_7VDQreyG0YOAk3",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDQreyG0YOAk3",
|
||||
"subscription": "sub_7VDQ2wKmp32Bog"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d6"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDQreyG0YOAk3",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDQreyG0YOAk3",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user153@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d7"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCzIKaReE7xLUdoKnZvG6Z",
|
||||
"customer": "cus_7VDQreyG0YOAk3"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDQ2wKmp32Bog",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365311,
|
||||
"current_period_start": 1449686911,
|
||||
"customer": "cus_7VDQreyG0YOAk3",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDQreyG0YOAk3",
|
||||
"subscription": "sub_7VDQ2wKmp32Bog"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d6"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
},
|
||||
{
|
||||
"id": "sub_7VDQN2xmA3qRv1",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365309,
|
||||
"current_period_start": 1449686909,
|
||||
"customer": "cus_7VDQreyG0YOAk3",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDQreyG0YOAk3",
|
||||
"subscription": "sub_7VDQN2xmA3qRv1"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d5"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDQreyG0YOAk3/subscriptions",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDQDLhx5W5nrE",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365312,
|
||||
"current_period_start": 1449686912,
|
||||
"customer": "cus_7VDQreyG0YOAk3",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d7"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 1798
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/invoices",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"data": [
|
||||
{
|
||||
"id": "in_17GCzMKaReE7xLUdi37Cczto",
|
||||
"customer": "cus_7VDQreyG0YOAk3",
|
||||
"lines": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDQDLhx5W5nrE",
|
||||
"amount": 1798,
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d7"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"proration": false,
|
||||
"quantity": 1798,
|
||||
"type": "subscription"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"paid": true,
|
||||
"subscription": "sub_7VDQDLhx5W5nrE",
|
||||
"total": 1798
|
||||
},
|
||||
{
|
||||
"id": "in_17GCzLKaReE7xLUdL9gwdOLR",
|
||||
"customer": "cus_7VDQreyG0YOAk3",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDQreyG0YOAk3",
|
||||
"subscription": "sub_7VDQ2wKmp32Bog"
|
||||
},
|
||||
"lines": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDQ2wKmp32Bog",
|
||||
"amount": 999,
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d6"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"proration": false,
|
||||
"quantity": 1,
|
||||
"type": "subscription"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"paid": true,
|
||||
"subscription": "sub_7VDQ2wKmp32Bog",
|
||||
"total": 0
|
||||
},
|
||||
{
|
||||
"id": "in_17GCzJKaReE7xLUdLZGrlA16",
|
||||
"customer": "cus_7VDQreyG0YOAk3",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDQreyG0YOAk3",
|
||||
"subscription": "sub_7VDQN2xmA3qRv1"
|
||||
},
|
||||
"lines": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDQN2xmA3qRv1",
|
||||
"amount": 999,
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d5"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"proration": false,
|
||||
"quantity": 1,
|
||||
"type": "subscription"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"paid": true,
|
||||
"subscription": "sub_7VDQN2xmA3qRv1",
|
||||
"total": 0
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDQreyG0YOAk3",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDQreyG0YOAk3",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user153@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d7"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCzIKaReE7xLUdoKnZvG6Z",
|
||||
"customer": "cus_7VDQreyG0YOAk3"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDQDLhx5W5nrE",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365312,
|
||||
"current_period_start": 1449686912,
|
||||
"customer": "cus_7VDQreyG0YOAk3",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d7"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 1798
|
||||
},
|
||||
{
|
||||
"id": "sub_7VDQ2wKmp32Bog",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365311,
|
||||
"current_period_start": 1449686911,
|
||||
"customer": "cus_7VDQreyG0YOAk3",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDQreyG0YOAk3",
|
||||
"subscription": "sub_7VDQ2wKmp32Bog"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d6"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
},
|
||||
{
|
||||
"id": "sub_7VDQN2xmA3qRv1",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365309,
|
||||
"current_period_start": 1449686909,
|
||||
"customer": "cus_7VDQreyG0YOAk3",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDQreyG0YOAk3",
|
||||
"subscription": "sub_7VDQN2xmA3qRv1"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d5"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDQreyG0YOAk3",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDQreyG0YOAk3",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user153@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d7"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCzIKaReE7xLUdoKnZvG6Z",
|
||||
"customer": "cus_7VDQreyG0YOAk3"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDQDLhx5W5nrE",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365312,
|
||||
"current_period_start": 1449686912,
|
||||
"customer": "cus_7VDQreyG0YOAk3",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d7"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 1798
|
||||
},
|
||||
{
|
||||
"id": "sub_7VDQ2wKmp32Bog",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365311,
|
||||
"current_period_start": 1449686911,
|
||||
"customer": "cus_7VDQreyG0YOAk3",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDQreyG0YOAk3",
|
||||
"subscription": "sub_7VDQ2wKmp32Bog"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d6"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
},
|
||||
{
|
||||
"id": "sub_7VDQN2xmA3qRv1",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365309,
|
||||
"current_period_start": 1449686909,
|
||||
"customer": "cus_7VDQreyG0YOAk3",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDQreyG0YOAk3",
|
||||
"subscription": "sub_7VDQN2xmA3qRv1"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d5"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/invoices/in_17GCzMKaReE7xLUdi37Cczto",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "in_17GCzMKaReE7xLUdi37Cczto",
|
||||
"customer": "cus_7VDQreyG0YOAk3",
|
||||
"lines": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDQDLhx5W5nrE",
|
||||
"amount": 1798,
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d7"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"proration": false,
|
||||
"quantity": 1798,
|
||||
"type": "subscription"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"paid": true,
|
||||
"subscription": "sub_7VDQDLhx5W5nrE",
|
||||
"total": 1798
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VDQreyG0YOAk3",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDQreyG0YOAk3",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user153@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d7"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GCzIKaReE7xLUdoKnZvG6Z",
|
||||
"customer": "cus_7VDQreyG0YOAk3"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDQDLhx5W5nrE",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365312,
|
||||
"current_period_start": 1449686912,
|
||||
"customer": "cus_7VDQreyG0YOAk3",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d7"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 1798
|
||||
},
|
||||
{
|
||||
"id": "sub_7VDQ2wKmp32Bog",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365311,
|
||||
"current_period_start": 1449686911,
|
||||
"customer": "cus_7VDQreyG0YOAk3",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDQreyG0YOAk3",
|
||||
"subscription": "sub_7VDQ2wKmp32Bog"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d6"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
},
|
||||
{
|
||||
"id": "sub_7VDQN2xmA3qRv1",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365309,
|
||||
"current_period_start": 1449686909,
|
||||
"customer": "cus_7VDQreyG0YOAk3",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDQreyG0YOAk3",
|
||||
"subscription": "sub_7VDQN2xmA3qRv1"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d5"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/invoices/in_17GCzLKaReE7xLUdL9gwdOLR",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "in_17GCzLKaReE7xLUdL9gwdOLR",
|
||||
"customer": "cus_7VDQreyG0YOAk3",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDQreyG0YOAk3",
|
||||
"subscription": "sub_7VDQ2wKmp32Bog"
|
||||
},
|
||||
"lines": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDQ2wKmp32Bog",
|
||||
"amount": 999,
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d6"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"proration": false,
|
||||
"quantity": 1,
|
||||
"type": "subscription"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"paid": true,
|
||||
"subscription": "sub_7VDQ2wKmp32Bog",
|
||||
"total": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/invoices/in_17GCzJKaReE7xLUdLZGrlA16",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "in_17GCzJKaReE7xLUdLZGrlA16",
|
||||
"customer": "cus_7VDQreyG0YOAk3",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDQreyG0YOAk3",
|
||||
"subscription": "sub_7VDQN2xmA3qRv1"
|
||||
},
|
||||
"lines": {
|
||||
"data": [
|
||||
{
|
||||
"id": "sub_7VDQN2xmA3qRv1",
|
||||
"amount": 999,
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d5"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"proration": false,
|
||||
"quantity": 1,
|
||||
"type": "subscription"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"paid": true,
|
||||
"subscription": "sub_7VDQN2xmA3qRv1",
|
||||
"total": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VDQreyG0YOAk3/subscriptions/sub_7VDQDLhx5W5nrE",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDQDLhx5W5nrE",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365312,
|
||||
"current_period_start": 1449686912,
|
||||
"customer": "cus_7VDQreyG0YOAk3",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d7"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 1798
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VDQreyG0YOAk3/subscriptions/sub_7VDQ2wKmp32Bog",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDQ2wKmp32Bog",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365311,
|
||||
"current_period_start": 1449686911,
|
||||
"customer": "cus_7VDQreyG0YOAk3",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDQreyG0YOAk3",
|
||||
"subscription": "sub_7VDQ2wKmp32Bog"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d6"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VDQreyG0YOAk3/subscriptions/sub_7VDQDLhx5W5nrE",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDQDLhx5W5nrE",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365312,
|
||||
"current_period_start": 1449686912,
|
||||
"customer": "cus_7VDQreyG0YOAk3",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d7"
|
||||
},
|
||||
"plan": {
|
||||
"id": "incremental",
|
||||
"amount": 1
|
||||
},
|
||||
"quantity": 1798
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "GET",
|
||||
"path": "/v1/customers/cus_7VDQreyG0YOAk3/subscriptions/sub_7VDQN2xmA3qRv1",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "sub_7VDQN2xmA3qRv1",
|
||||
"cancel_at_period_end": false,
|
||||
"current_period_end": 1452365309,
|
||||
"current_period_start": 1449686909,
|
||||
"customer": "cus_7VDQreyG0YOAk3",
|
||||
"discount": {
|
||||
"coupon": {
|
||||
"id": "free"
|
||||
},
|
||||
"customer": "cus_7VDQreyG0YOAk3",
|
||||
"subscription": "sub_7VDQN2xmA3qRv1"
|
||||
},
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186d5"
|
||||
},
|
||||
"plan": {
|
||||
"id": "basic",
|
||||
"amount": 999
|
||||
},
|
||||
"quantity": 1
|
||||
}
|
||||
}
|
||||
]
|
1836
spec/fixtures/sub-test-32.json
vendored
Normal file
1836
spec/fixtures/sub-test-32.json
vendored
Normal file
File diff suppressed because it is too large
Load diff
2811
spec/fixtures/sub-test-33.json
vendored
Normal file
2811
spec/fixtures/sub-test-33.json
vendored
Normal file
File diff suppressed because it is too large
Load diff
94
spec/fixtures/sub-test-35.json
vendored
Normal file
94
spec/fixtures/sub-test-35.json
vendored
Normal file
|
@ -0,0 +1,94 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/tokens",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "tok_17GD0HKaReE7xLUd0rxsuvV4",
|
||||
"card": {
|
||||
"id": "card_17GD0HKaReE7xLUd8s6L2LQd"
|
||||
},
|
||||
"type": "card"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDR3TICfZ2dOG",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user161@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186df"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GD0HKaReE7xLUd8s6L2LQd",
|
||||
"customer": "cus_7VDR3TICfZ2dOG"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDR3TICfZ2dOG",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDR3TICfZ2dOG",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user161@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186df"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GD0HKaReE7xLUd8s6L2LQd",
|
||||
"customer": "cus_7VDR3TICfZ2dOG"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/charges",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "ch_17GD0IKaReE7xLUd0tKU82hA",
|
||||
"amount": 9900,
|
||||
"customer": "cus_7VDR3TICfZ2dOG",
|
||||
"metadata": {
|
||||
"gems": "42000",
|
||||
"timestamp": "2015"
|
||||
},
|
||||
"paid": true,
|
||||
"refunds": {
|
||||
"has_more": false
|
||||
},
|
||||
"source": {
|
||||
"id": "card_17GD0HKaReE7xLUd8s6L2LQd",
|
||||
"customer": "cus_7VDR3TICfZ2dOG"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
94
spec/fixtures/sub-test-36.json
vendored
Normal file
94
spec/fixtures/sub-test-36.json
vendored
Normal file
|
@ -0,0 +1,94 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/tokens",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "tok_17GD0JKaReE7xLUdWVmsHjiV",
|
||||
"card": {
|
||||
"id": "card_17GD0JKaReE7xLUdtK4zhxIR"
|
||||
},
|
||||
"type": "card"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDRHzOeafhAar",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user162@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186e0"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GD0JKaReE7xLUdtK4zhxIR",
|
||||
"customer": "cus_7VDRHzOeafhAar"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDRHzOeafhAar",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDRHzOeafhAar",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user162@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186e0"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GD0JKaReE7xLUdtK4zhxIR",
|
||||
"customer": "cus_7VDRHzOeafhAar"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/charges",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "ch_17GD0LKaReE7xLUdyUUQP4Mr",
|
||||
"amount": 9900,
|
||||
"customer": "cus_7VDRHzOeafhAar",
|
||||
"metadata": {
|
||||
"gems": "42000",
|
||||
"timestamp": "2015"
|
||||
},
|
||||
"paid": true,
|
||||
"refunds": {
|
||||
"has_more": false
|
||||
},
|
||||
"source": {
|
||||
"id": "card_17GD0JKaReE7xLUdtK4zhxIR",
|
||||
"customer": "cus_7VDRHzOeafhAar"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
94
spec/fixtures/sub-test-37.json
vendored
Normal file
94
spec/fixtures/sub-test-37.json
vendored
Normal file
|
@ -0,0 +1,94 @@
|
|||
[
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/tokens",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "tok_17GD0LKaReE7xLUdy08w9LuO",
|
||||
"card": {
|
||||
"id": "card_17GD0LKaReE7xLUd4Cm4gxaL"
|
||||
},
|
||||
"type": "card"
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDRlNbTkRVP3r",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user163@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186e1"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GD0LKaReE7xLUd4Cm4gxaL",
|
||||
"customer": "cus_7VDRlNbTkRVP3r"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/customers/cus_7VDRlNbTkRVP3r",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "cus_7VDRlNbTkRVP3r",
|
||||
"alipay_accounts": {
|
||||
"has_more": false
|
||||
},
|
||||
"email": "user163@me.com",
|
||||
"metadata": {
|
||||
"id": "0000000000000000000186e1"
|
||||
},
|
||||
"sources": {
|
||||
"data": [
|
||||
{
|
||||
"id": "card_17GD0LKaReE7xLUd4Cm4gxaL",
|
||||
"customer": "cus_7VDRlNbTkRVP3r"
|
||||
}
|
||||
],
|
||||
"has_more": false
|
||||
},
|
||||
"subscriptions": {
|
||||
"has_more": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"scope": "https://api.stripe.com:443",
|
||||
"method": "POST",
|
||||
"path": "/v1/charges",
|
||||
"status": 200,
|
||||
"response": {
|
||||
"id": "ch_17GD0MKaReE7xLUdH67q6iml",
|
||||
"amount": 9900,
|
||||
"customer": "cus_7VDRlNbTkRVP3r",
|
||||
"metadata": {
|
||||
"gems": "42000",
|
||||
"timestamp": "2015"
|
||||
},
|
||||
"paid": true,
|
||||
"refunds": {
|
||||
"has_more": false
|
||||
},
|
||||
"source": {
|
||||
"id": "card_17GD0LKaReE7xLUd4Cm4gxaL",
|
||||
"customer": "cus_7VDRlNbTkRVP3r"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue