> @userappstore/stripe-subscriptions@1.0.0 test /home/benlowry/SynologyDrive/workspaces/dashboard/stripe-subscriptions > NODE_ENV=testing mocha src --recursive --timeout 480000 --slow 240000 server/bind-stripekey BindStripeKey#AFTER ✓ should bind stripekey data to req /account/subscriptions/billing-profile BillingProfile#BEFORE ✓ should reject invalid customer ✓ should reject other account's customer ✓ should bind customer to req BillingProfile#GET ✓ should have row for customer /account/subscriptions/billing-profiles BillingProfiles#BEFORE ✓ should bind customers to req BillingProfiles#GET ✓ should enforce page size ✓ should enforce specified offset /account/subscriptions/cancel-subscription CancelSubscription#BEFORE ✓ should reject invalid subscription ✓ should reject cancelled subscription ✓ should reject other account's subscription ✓ should bind subscription to req CancelSubscription#GET ✓ should present the form ✓ should present the subscription table ✓ should show fields for free plan cancellations ✓ should show fields for free trial cancellations ✓ should show fields for cancellation with credit or refund CancelSubscription#POST ✓ should cancel free plan immediately ✓ should cancel free plan at period end ✓ should cancel free trial immediately ✓ should cancel free trial at period end ✓ should cancel and credit account ✓ should cancel and redirect to refund /account/subscriptions/change-plan ChangePlan#BEFORE ✓ should bind subscription to req ChangePlan#GET ✓ should present the form ✓ should present the subscription table ChangePlan#POST ✓ should reject same plan ✓ should reject never published plan ✓ should reject unpublished plan ✓ should reject paid plan without payment information ✓ should apply after authorization /account/subscriptions/create-billing-profile CreateBillingProfile#GET ✓ should present the form for no Stripe JS ✓ should present the form for Stripe JS 2 ✓ should present the form for Stripe JS 3 CreateBillingProfile#POST ✓ should require description for no StripeJS ✓ should require email for no Stripe JS ✓ should require name for no Stripe JS ✓ should require CVC for no Stripe JS ✓ should require card number for no Stripe JS ✓ should require expiration month for no Stripe JS ✓ should require expiration year for no Stripe JS ✓ should require description for StripeJS 2 ✓ should require email for Stripe JS 2 ✓ should require token for Stripe JS 2 ✓ should require token for Stripe JS 3 ✓ should require description for StripeJS 3 ✓ should require email for Stripe JS 3 ✓ should apply after authorization for no Stripe JS /account/subscriptions/credit Credit#BEFORE ✓ should reject invalid credit ✓ should bind credit to req Credit#GET ✓ should display assigned credit ✓ should display cancellation credit ✓ should display plan change credit ✓ should display quantity reduction credit ✓ should display refunded credit /account/subscriptions/credits Credits#BEFORE ✓ should bind credits to req Credits#GET ✓ should enforce page size ✓ should enforce specified offset ✓ should return assigned credits ✓ should return applied credits ✓ should return refunded credits /account/subscriptions/delete-billing-profile DeleteBillingProfile#BEFORE ✓ should reject invalid customerid ✓ should reject other account's billing-profile ✓ should bind billing-profile to req DeleteBillingProfile#GET ✓ should present the form ✓ should present the billing-profile table DeleteBillingProfile#POST ✓ should apply after authorization /account/subscriptions/delete-card DeleteCard#BEFORE ✓ should reject invalid cardid ✓ should reject other account's card ✓ should bind card to req DeleteCard#GET ✓ should present the form ✓ should present the card table DeleteCard#POST ✓ should apply after authorization /account/subscriptions/edit-payment-information EditPaymentInformation#GET ✓ should present the form for no Stripe JS ✓ should present the form for Stripe JS 2 ✓ should present the form for Stripe JS 3 EditPaymentInformation#POST ✓ should require name for no Stripe JS ✓ should require CVC for no Stripe JS ✓ should require card number for no Stripe JS ✓ should require expiration month for no Stripe JS ✓ should require expiration year for no Stripe JS ✓ should require token for Stripe JS 2 ✓ should require token for Stripe JS 3 ✓ should apply after authorization for no Stripe JS /account/subscriptions Index#BEFORE ✓ should bind customers to req ✓ should bind invoices to req ✓ should bind subscriptions to req ✓ should bind credits to req Index#GET ✓ should have row for each invoice ✓ should have row for each customer ✓ should have row for each subscription ✓ should return assigned credits ✓ should return cancellation credits /account/subscriptions/invoice Invoice#BEFORE ✓ should reject invalid invoice ✓ should reject other account's invoice ✓ should bind invoice to req Invoice#GET ✓ should have row for invoice /account/subscriptions/invoices Invoices#BEFORE ✓ should bind invoices to req Invoices#GET ✓ should enforce page size ✓ should enforce specified offset /account/subscriptions/pay-invoice PayInvoice#BEFORE ✓ should reject invalid invoice ✓ should reject other account's invoice ✓ should reject paid invoice ✓ should bind invoice to req PayInvoice#GET ✓ should present the form ✓ should present the invoice table PayInvoice#POST ✓ should apply after authorization /account/subscriptions/plan Plan#BEFORE ✓ should reject invalid plan ✓ should reject never published plan ✓ should reject unpublished plan ✓ should bind plan to req Plan#GET ✓ should have row for plan /account/subscriptions/plans Plans#BEFORE ✓ should bind plans to req Plans#GET ✓ should enforce page size ✓ should enforce specified offset /account/subscriptions/refund-credit RefundCredit#BEFORE ✓ should reject invalid credit ✓ should reject refunded credit ✓ should reject assigned credit ✓ should reject applied credit ✓ should reject other account's credit ✓ should bind credit to req ✓ should bind charge to req RefundCredit#GET ✓ should present the form ✓ should present the credit table RefundCredit#POST ✓ should refund after authorization ✓ should only refund unused balance /account/subscriptions/refund-invoice RefundInvoice#BEFORE ✓ should reject invalid invoice ✓ should reject other account's invoice ✓ should bind invoice to req ✓ should bind charge to req RefundInvoice#GET ✓ should present the form ✓ should present the invoice table RefundInvoice#POST ✓ should apply after authorization ✓ should cancel subscription /account/subscriptions/request-refund RequestRefund#BEFORE ✓ should reject invalid invoice ✓ should reject other account's invoice ✓ should bind invoice to req ✓ should bind charge to req RequestRefund#GET ✓ should present the form ✓ should present the invoice table RequestRefund#POST ✓ should apply after authorization /account/subscriptions/start-subscription StartSubscription#BEFORE ✓ should reject invalid plan ✓ should reject never published plan ✓ should reject unpublished plan ✓ should bind plan to req StartSubscription#GET ✓ should present the form ✓ should present the plan table StartSubscription#POST ✓ should reject customer without card ✓ should apply after authorization /account/subscriptions/subscription Subscription#BEFORE ✓ should reject invalid subscription ✓ should reject other account's subscription ✓ should bind subscription to req Subscription#GET ✓ should present the subscription table /account/subscriptions/subscriptions Subscriptions#BEFORE ✓ should bind subscriptions to req Subscriptions#GET ✓ should enforce page size ✓ should enforce specified offset /administrator/subscriptions/account-credits AccountCredits#BEFORE ✓ should bind credits to req AccountCredits#GET ✓ should enforce page size ✓ should enforce specified offset ✓ should return assigned credits ✓ should return applied credits ✓ should return refunded credits /administrator/subscriptions/applicable-credits ApplicableCredits#BEFORE ✓ should bind credits to req ApplicableCredits#GET ✓ should enforce page size ✓ should enforce specified offset /administrator/subscriptions/assign-credit AssignCredit#BEFORE ✓ should reject invalid accountid AssignCredit#GET ✓ should present the form AssignCredit#POST ✓ should reject invalid amount ✓ should reject invalid currency ✓ should create credit on account /administrator/subscriptions/assigned-credits AssignedCredits#BEFORE ✓ should bind credits to req AssignedCredits#GET ✓ should enforce page size ✓ should enforce specified offset /administrator/subscriptions/charge Charge#BEFORE ✓ should reject invalid charge ✓ should bind charge to req Charge#GET ✓ should present the charge table /administrator/subscriptions/charges Charges#BEFORE ✓ should bind charges to req Charges#GET ✓ should enforce page size ✓ should enforce specified offset /administrator/subscriptions/coupon Coupon#BEFORE ✓ should reject invalid coupon ✓ should bind coupon to req Coupon#GET ✓ should present the coupon table /administrator/subscriptions/coupons Coupons#BEFORE ✓ should bind coupons to req Coupons#GET ✓ should enforce page size ✓ should enforce specified offset /administrator/subscriptions/create-coupon CreateCoupon#GET ✓ should present the form CreateCoupon#POST ✓ should reject missing couponid ✓ should enforce couponid length ✓ should reject duplicate couponid ✓ should reject missing duration ✓ should enforce invalid duration ✓ should require valid amount off ✓ should require valid percent off ✓ should require valid max redemptions ✓ should require amount or percent off ✓ should require valid duration in months if repeating ✓ should require valid expires if provided ✓ should create after authorization /administrator/subscriptions/create-plan CreatePlan#GET ✓ should present the form CreatePlan#POST ✓ should reject missing planid ✓ should enforce planid length ✓ should reject missing productid ✓ should reject never published product ✓ should reject unpublished product ✓ should reject missing currency ✓ should reject invalid currency ✓ should reject missing amount ✓ should reject invalid amount ✓ should reject missing interval ✓ should reject invalid interval ✓ should reject invalid interval_count ✓ should reject invalid trial_period_days ✓ should create after authorization /administrator/subscriptions/create-product CreateProduct#GET ✓ should present the form CreateProduct#POST ✓ should reject missing name ✓ should enforce name length ✓ should reject missing statement_descriptor ✓ should create after authorization /administrator/subscriptions/credit Credit#BEFORE ✓ should reject invalid credit ✓ should bind credit to req Credit#GET ✓ should display assigned credit ✓ should display cancellation credit ✓ should display plan change credit ✓ should display quantity reduction credit ✓ should display refunded credit /administrator/subscriptions/credits Credits#BEFORE ✓ should bind credits to req Credits#GET ✓ should enforce page size ✓ should enforce specified offset ✓ should return assigned credits ✓ should return applied credits ✓ should return refunded credits /administrator/subscriptions/customer Customer#BEFORE ✓ should reject invalid customer ✓ should bind customer to req Customer#GET ✓ should present the customer table /administrator/subscriptions/customers Customers#BEFORE ✓ should bind customers to req Customers#GET ✓ should enforce page size ✓ should enforce specified offset /administrator/subscriptions/delete-coupon DeleteCoupon#BEFORE ✓ should reject invalid couponid ✓ should bind coupon to req DeleteCoupon#GET ✓ should present the form ✓ should present the coupon table DeleteCoupon#POST ✓ should apply after authorization /administrator/subscriptions/delete-credit-balance DeleteCreditBalance#BEFORE ✓ should reject invalid creditid ✓ should reject reimbursed credit ✓ should reject applied credit ✓ should bind credit to req DeleteCreditBalance#GET ✓ should present the form ✓ should present the credit table DeleteCreditBalance#POST ✓ should zero balance after authorization /administrator/subscriptions/delete-credit DeleteCredit#BEFORE ✓ should reject invalid creditid ✓ should reject reimbursed credit ✓ should reject applied credit ✓ should bind credit to req DeleteCredit#GET ✓ should present the form ✓ should present the credit table DeleteCredit#POST ✓ should apply after authorization /administrator/subscriptions/delete-plan DeletePlan#BEFORE ✓ should reject invalid planid ✓ should bind plan to req DeletePlan#GET ✓ should present the form ✓ should present the plan table DeletePlan#POST ✓ should apply after authorization /administrator/subscriptions/delete-product DeleteProduct#BEFORE ✓ should reject invalid productid ✓ should bind product to req DeleteProduct#GET ✓ should present the form ✓ should present the product table DeleteProduct#POST ✓ should apply after authorization /administrator/subscriptions/delete-subscription DeleteSubscription#BEFORE ✓ should reject invalid subscriptionid ✓ should reject cancelled subscription ✓ should bind subscription to req DeleteSubscription#GET ✓ should present the form ✓ should present the subscription table ✓ should show fields for free plan cancellations ✓ should show fields for free trial cancellations ✓ should show fields for cancellation with credit or refund DeleteSubscription#POST ✓ should cancel free plan immediately ✓ should cancel free plan at period end ✓ should cancel free trial immediately ✓ should cancel free trial at period end ✓ should cancel and credit account ✓ should cancel and refund account /administrator/subscriptions/deny-refund DenyRefund#BEFORE ✓ should reject invalid chargeid ✓ should reject charge without refund request ✓ should reject denied refund ✓ should bind charge to req DenyRefund#GET ✓ should present the form ✓ should present the charge table DenyRefund#POST ✓ should apply after authorization /administrator/subscriptions/edit-plan EditPlan#BEFORE ✓ should reject invalid planid ✓ should reject unpublished plan ✓ should bind plan to req EditPlan#GET ✓ should present the form EditPlan#POST ✓ should reject missing productid ✓ should reject never published product ✓ should reject unpublished product ✓ should reject invalid trial period ✓ should update after authorization /administrator/subscriptions/edit-product EditProduct#BEFORE ✓ should reject invalid productid ✓ should reject unpublished product ✓ should bind product to req EditProduct#GET ✓ should present the form EditProduct#POST ✓ should reject missing name ✓ should enforce name length ✓ should reject missing statement_descriptor ✓ should reject invalid unit_label ✓ should update after authorization /administrator/subscriptions/flag-charge FlagCharge#BEFORE ✓ should reject invalid chargeid ✓ should reject unrefunded charge ✓ should bind charge to req FlagCharge#GET ✓ should present the form ✓ should present the charge table FlagCharge#POST ✓ should apply after authorization /administrator/subscriptions/forgive-invoice ForgiveInvoice#BEFORE ✓ should reject invalid invoiceid ✓ should reject paid invoice ✓ should reject forgiven invoice ✓ should bind invoice to req ForgiveInvoice#GET ✓ should present the form ✓ should present the invoice table ForgiveInvoice#POST ✓ should apply after authorization /administrator/subscriptions Index#BEFORE ✓ should bind plans to req ✓ should bind subscriptions to req ✓ should bind coupons to req Index#GET ✓ should have row for each plan ✓ should have row for each coupon ✓ should have row for each subscription /administrator/subscriptions/invoice Invoice#BEFORE ✓ should reject invalid invoiceid ✓ should bind invoice to req Invoice#GET ✓ should present the invoice table /administrator/subscriptions/invoices Invoices#BEFORE ✓ should bind invoices to req Invoices#GET ✓ should enforce page size ✓ should enforce specified offset /administrator/subscriptions/payout Payout#BEFORE ✓ should reject invalid payoutid ✓ should bind payout to req Payout#GET ✓ should have row for payout /administrator/subscriptions/payouts Payouts#BEFORE ✓ should bind payouts to req Payouts#GET ✓ should enforce page size ✓ should enforce specified offset /administrator/subscriptions/plan Plan#BEFORE ✓ should reject invalid planid ✓ should bind plan to req Plan#GET ✓ should present the plan table /administrator/subscriptions/plans Plans#BEFORE ✓ should bind plans to req Plans#GET ✓ should enforce page size ✓ should enforce specified offset /administrator/subscriptions/product Product#BEFORE ✓ should reject invalid productid ✓ should bind product to req Product#GET ✓ should have row for product /administrator/subscriptions/products Products#BEFORE ✓ should bind products to req Products#GET ✓ should enforce page size ✓ should enforce specified offset /administrator/subscriptions/publish-coupon PublishCoupon#BEFORE ✓ should reject invalid couponid ✓ should reject published coupon ✓ should bind coupon to req PublishCoupon#GET ✓ should present the form ✓ should present the coupon table PublishCoupon#POST ✓ should apply after authorization /administrator/subscriptions/publish-plan PublishPlan#BEFORE ✓ should reject invalid planid ✓ should reject published plan ✓ should bind plan to req PublishPlan#GET ✓ should present the form ✓ should present the plan table PublishPlan#POST ✓ should apply after authorization /administrator/subscriptions/publish-product PublishProduct#BEFORE ✓ should reject invalid productid ✓ should reject published product ✓ should bind product to req PublishProduct#GET ✓ should present the form ✓ should present the product table PublishProduct#POST ✓ should apply after authorization /administrator/subscriptions/refund-charge RefundCharge#BEFORE ✓ should reject invalid chargeid ✓ should reject refunded charge ✓ should bind charge to req RefundCharge#GET ✓ should present the form ✓ should present the charge table RefundCharge#POST ✓ should apply after authorization /administrator/subscriptions/refund-credit RefundCredit#BEFORE ✓ should reject invalid credit ✓ should reject refunded credit ✓ should reject assigned credit ✓ should reject applied credit ✓ should bind credit to req ✓ should bind charge to req RefundCredit#GET ✓ should present the form ✓ should present the credit table RefundCredit#POST ✓ should refund after authorization ✓ should only refund unused balance /administrator/subscriptions/refund-requests RefundRequests#BEFORE ✓ should bind charges to req RefundRequests#GET ✓ should enforce page size ✓ should enforce specified offset /administrator/subscriptions/refund Refund#BEFORE ✓ should reject invalid refundid ✓ should bind refund to req Refund#GET ✓ should have row for refund /administrator/subscriptions/refunded-credits RefundedCredits#BEFORE ✓ should bind credits to req RefundedCredits#GET ✓ should enforce page size ✓ should enforce specified offset /administrator/subscriptions/refunds Refunds#BEFORE ✓ should bind refunds to req Refunds#GET ✓ should enforce page size ✓ should enforce specified offset /administrator/subscriptions/subscription Subscription#BEFORE ✓ should reject invalid subscriptionid ✓ should bind subscription to req Subscription#GET ✓ should present the subscription table /administrator/subscriptions/subscriptions Subscriptions#BEFORE ✓ should bind subscriptions to req Subscriptions#GET ✓ should enforce page size ✓ should enforce specified offset /administrator/subscriptions/unpublish-coupon UnpublishCoupon#BEFORE ✓ should reject invalid couponid ✓ should reject never published coupon ✓ should reject unpublished coupon ✓ should bind coupon to req UnpublishCoupon#GET ✓ should present the form ✓ should present the coupon table UnpublishCoupon#POST ✓ should apply after authorization /administrator/subscriptions/unpublish-plan UnpublishPlan#BEFORE ✓ should reject invalid planid ✓ should never published plan ✓ should reject unpublished plan ✓ should bind plan to req UnpublishPlan#GET ✓ should present the form ✓ should present the plan table UnpublishPlan#POST ✓ should apply after authorization /administrator/subscriptions/unpublish-product UnpublishProduct#BEFORE ✓ should reject invalid productid ✓ should never published product ✓ should reject unpublished product ✓ should bind product to req UnpublishProduct#GET ✓ should present the form ✓ should present the product table ProductUnpublished#POST ✓ should apply after authorization /api/administrator/subscriptions/account-applicable-credits-count AccountApplicableCreditsCount#GET ✓ should count all applied credits on account /api/administrator/subscriptions/account-applicable-credits AccountApplicableCredits#GET ✓ should reject invalid accountid ✓ should limit credits to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/administrator/subscriptions/account-applied-credits-count AccountAppliedCreditsCount#GET ✓ should count all applied credits on account /api/administrator/subscriptions/account-applied-credits AccountAppliedCredits#GET ✓ should reject invalid accountid ✓ should limit credits to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/administrator/subscriptions/account-assigned-credits-count AccountAssignedCreditsCount#GET ✓ should count all assigned credits on account /api/administrator/subscriptions/account-assigned-credits AccountAssignedCredits#GET ✓ should reject invalid accountid ✓ should limit credits to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/administrator/subscriptions/account-credits-count AccountCreditsCount#GET ✓ should count all credits on account /api/administrator/subscriptions/account-credits AccountCredits#GET ✓ should reject invalid accountid ✓ should limit credits to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records ✓ should include applied credits ✓ should include applicable credits ✓ should include refended credits /api/administrator/subscriptions/refunded-credits-count AccountRefundedCreditsCount#GET ✓ should count all refunded credits on account /api/administrator/subscriptions/account-refunded-credits AccountRefundedCredits#GET ✓ should reject invalid accountid ✓ should limit credits to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/administrator/subscriptions/applicable-credit ApplicableCredit#GET ✓ should reject invalid creditid ✓ should reject applied credit ✓ should allow partially applied credit ✓ should allow assigned credit /api/administrator/subscriptions/applicable-credits-count ApplicableCreditsCount#GET ✓ should count applicable credits on all accounts /api/administrator/subscriptions/applicable-credits ApplicableCredits#GET ✓ should limit credits to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/administrator/subscriptions/applied-credit AppliedCredit#GET ✓ should reject invalid creditid ✓ should reject unapplied credit ✓ should reject partially-applied credit ✓ should return credit data /api/administrator/subscriptions/applied-credits-count AppliedCreditsCount#GET ✓ should count applied credits on all accounts /api/administrator/subscriptions/applied-credits AppliedCredits#GET ✓ should limit credits to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/administrator/subscriptions/assigned-credit AssignedCredit#GET ✓ should reject invalid creditid ✓ should reject cancellation credit ✓ should return credit data /api/administrator/subscriptions/assigned-credits-count AssignedCreditsCount#GET ✓ should count assigned credits on all accounts /api/administrator/subscriptions/assigned-credits AssignedCredits#GET ✓ should limit credits to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/administrator/subscriptions/card-charges-count CardChargesCount#GET ✓ should count all charges on card /api/administrator/subscriptions/card-charges CardCharges#GET ✓ should limit charges on card to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/administrator/subscriptions/card-invoices-count CardInvoicesCount#GET ✓ should count all invoices on card /api/administrator/subscriptions/card-invoices CardInvoices#GET ✓ should limit invoices on card to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/administrator/subscriptions/card-plans-count CardPlansCount#GET ✓ should count all plans on card /api/administrator/subscriptions/card-plans Plans#GET ✓ should limit card's plans to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/administrator/subscriptions/card-products-count CardProductsCount#GET ✓ should count all products on card /api/administrator/subscriptions/card-products Products#GET ✓ should limit card's products to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/administrator/subscriptions/card-refunds-count CardRefundsCount#GET ✓ should count all refunds on card /api/administrator/subscriptions/card-refunds CardRefunds#GET ✓ should limit refunds on card to one page /api/administrator/subscriptions/card-subscriptions-count CardSubscriptionsCount#GET ✓ should count all refunds on card /api/administrator/subscriptions/card-subscriptions CardSubscriptions#GET ✓ should limit subscriptions on card to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/administrator/subscriptions/card Card#GET ✓ should reject invalid card ✓ should return card data /api/administrator/subscriptions/charge Charge#GET ✓ should reject invalid charge ✓ should return charge data /api/administrator/subscriptions/charges-count ChargesCount#GET ✓ should count charges /api/administrator/subscriptions/charges Charges#GET ✓ should limit charges to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/administrator/subscriptions/coupon-customers-count CouponCustomersCount#GET ✓ should count all customers on coupon /api/administrator/subscriptions/coupon-customers CouponCustomers#GET ✓ should limit customers on coupon to one page /api/administrator/subscriptions/coupon-subscriptions-count CouponSubscriptionsCount#GET ✓ should count all subscriptions on coupon /api/administrator/subscriptions/coupon-subscriptions CouponSubscriptions#GET ✓ should limit subscriptions on coupon to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/administrator/subscriptions/coupon Coupon#GET ✓ should reject invalid coupon ✓ should return coupon data /api/administrator/subscriptions/coupons-count CouponsCount#GET ✓ should count coupons /api/administrator/subscriptions/coupons Coupons#GET ✓ should limit coupons to one page /api/administrator/subscriptions/create-coupon CreateCoupon#BEFORE ✓ should require alphanumeric_ id ✓ should require percent or amount off ✓ should require currency with amount off ✓ should require valid percent off ✓ should require valid duration ✓ should require valid repeating duration ✓ should require valid expire_meridien ✓ should require valid expire CreateCoupon#POST ✓ should create coupon ✓ should create published coupon /api/administrator/subscriptions/create-credit-refund CreateCreditRefund#BEFORE ✓ should reject invalid credit ✓ should reject refunded credit ✓ should reject assigned credit CreateCreditRefund#POST ✓ should create refund /api/administrator/subscriptions/create-plan CreatePlan#BEFORE ✓ should require alphanumeric id ✓ should require product ✓ should require valid product ✓ should require amount ✓ should require currency ✓ should require valid interval ✓ should require valid interval count ✓ should require valid trial period CreatePlan#POST ✓ should create plan ✓ should create published plan /api/administrator/subscriptions/create-product CreateProduct#BEFORE ✓ should require name ✓ should require statement_descriptor CreateProduct#POST ✓ should create product ✓ should create published product /api/administrator/subscriptions/create-refund CreateRefund#BEFORE ✓ should reject invalid charge ✓ should require amount ✓ should reject negative amount ✓ should reject amount higher than charge CreateRefund#POST ✓ should create authorized refund /api/administrator/subscriptions/credit Credit#GET ✓ should reject invalid creditid ✓ should return cancellation credit ✓ should return assigned credit ✓ should return refunded credit ✓ should return applied credit /api/administrator/subscriptions/credits-count CreditsCount#GET ✓ should count all credits on all accounts /api/administrator/subscriptions/credits Credits#GET ✓ should limit credits to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records ✓ should include applied credits ✓ should include applicable credits ✓ should include refended credits /api/administrator/subscriptions/customer-applied-credits-count CustomerAppliedCreditsCount#GET ✓ should count all applied credits on customer /api/administrator/subscriptions/customer-applied-credits CustomerAppliedCredits#GET ✓ should reject invalid customerid ✓ should limit credits to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/administrator/subscriptions/customer-cards-count CustomerCardsCount#GET ✓ should count all cards on customer /api/administrator/subscriptions/customer-cards CustomerCards#GET ✓ should limit cards on customer to one page /api/administrator/subscriptions/customer-charges-count CustomerChargesCount#GET ✓ should count all charges on customer /api/administrator/subscriptions/customer-charges CustomerCharges#GET ✓ should limit charges on customer to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/administrator/subscriptions/customer-invoices-count CustomerInvoicesCount#GET ✓ should count all invoices on customer /api/administrator/subscriptions/customer-invoices CustomerInvoices#GET ✓ should limit invoices on customer to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/administrator/subscriptions/customer-refunded-credits-count CustomerRefundedCreditsCount#GET ✓ should count all refunded credits on customer /api/administrator/subscriptions/customer-refunded-credits CustomerRefundedCredits#GET ✓ should reject invalid customerid ✓ should limit credits to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/administrator/subscriptions/customer-refunds-count CustomerRefundsCount#GET ✓ should count all refunds on customer /api/administrator/subscriptions/customer-refunds CustomerRefunds#GET ✓ should limit refunds on customer to one page /api/administrator/subscriptions/customer-subscriptions-count CustomerSubscriptionsCount#GET ✓ should count all subscriptions on customer /api/administrator/subscriptions/customer-subscriptions CustomerSubscriptions#GET ✓ should limit subscriptions on customer to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/administrator/subscriptions/customer Customer#GET ✓ should reject invalid customer ✓ should return customer data /api/administrator/subscriptions/customers-count CustomersCount#GET ✓ should count customers /api/administrator/subscriptions/customers Customers#GET ✓ should limit customers to one page /api/administrator/subscriptions/delete-assigned-credit-balance DeleteAssignedCreditBalance#BEFORE ✓ should reject invalid creditid ✓ should reject non-assigned credit ✓ should reject used credit DeleteAssignedCreditBalance#DELETE ✓ should zero full amount ✓ should zero unused amount /api/administrator/subscriptions/delete-assgned-credit DeleteAssignedCredit#BEFORE ✓ should reject invalid creditid ✓ should reject cancellation credit ✓ should reject refunded credit ✓ should reject applied creditid DeleteAssignedCredit#DELETE ✓ should delete assigned credit /api/administrator/subscriptions/delete-coupon DeleteCoupon#BEFORE ✓ should reject invalid couponid DeleteCoupon#DELETE ✓ should delete coupon /api/administrator/subscriptions/delete-plan DeletePlan#BEFORE ✓ should reject invalid planid DeletePlan#DELETE ✓ should delete plan /api/administrator/subscriptions/delete-product DeleteProduct#BEFORE ✓ should reject invalid productid DeleteProduct#DELETE ✓ should delete product /api/administrator/subscriptions/delete-subscription DeleteSubscription#BEFORE ✓ should reject invalid subscriptionid ✓ should require active subscription DeleteSubscription#DELETE ✓ should delete subscription at period end ✓ should delete subscription immediately with credit ✓ should delete paid subscription and refund balance /api/administrator/subscriptions/invoice Invoice#GET ✓ should reject invalid invoice ✓ should return invoice data /api/administrator/subscriptions/invoices-count InvoicesCount#GET ✓ should count invoices /api/administrator/subscriptions/invoices Invoices#GET ✓ should limit invoices to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/administrator/subscriptions/payout Payout#GET ✓ should reject invalid payoutid ✓ should return payout data /api/administrator/subscriptions/payouts-count PayoutsCount#GET ✓ should count payouts /api/administrator/subscriptions/payouts Payouts#GET ✓ should return limit payouts to one page /api/administrator/subscriptions/plan-applied-credits-count PlanAppliedCredits#GET ✓ should count all credits applied to plan /api/administrator/subscriptions/plan-applied-credits PlanAppliedCredits#GET ✓ should reject invalid planid ✓ should limit credits to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/administrator/subscriptions/plan-charges-count PlanChargesCount#GET ✓ should count all charges on plan /api/administrator/subscriptions/plan-charges PlanCharges#GET ✓ should limit charges on plan to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/administrator/subscriptions/plan-customers-count PlanCustomersCount#GET ✓ should count all customers on plan /api/administrator/subscriptions/plan-customers PlanCustomers#GET ✓ should limit customers on plan to one page /api/administrator/subscriptions/plan-invoices-count PlanInvoicesCount#GET ✓ should count all invoices on plan /api/administrator/subscriptions/plan-invoices PlanInvoices#GET ✓ should limit invoices on plan to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/administrator/subscriptions/plan-refunded-credits-count PlanRefundedCreditsCount#GET ✓ should count all refunded credits on plan /api/administrator/subscriptions/plan-refunded-credits PlanRefundedCredits#GET ✓ should reject invalid planid ✓ should limit credits to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/administrator/subscriptions/plan-refunds-count PlanRefundsCount#GET ✓ should count all refunds on plan /api/administrator/subscriptions/plan-refunds PlanRefunds#GET ✓ should limit refunds on plan to one page /api/administrator/subscriptions/plan-subscriptions-count PlanSubscriptionsCount#GET ✓ should count all subscriptions on plan /api/administrator/subscriptions/plan-subscriptions PlanSubscriptions#GET ✓ should limit subscriptions on plan to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/administrator/subscriptions/plan Plan#GET ✓ should return plan data /api/administrator/subscriptions/plans-count PlansCount#GET ✓ should count plans /api/administrator/subscriptions/plans Plans#GET ✓ should limit plans to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/administrator/subscriptions/product-applied-credits-count ProductAppliedCredits#GET ✓ should count all credits applied to product /api/administrator/subscriptions/product-applied-credits ProductAppliedCredits#GET ✓ should reject invalid productid ✓ should limit credits to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/administrator/subscriptions/product-charges-count ProductChargesCount#GET ✓ should count all charges on product /api/administrator/subscriptions/product-charges ProductCharges#GET ✓ should limit charges on product to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/administrator/subscriptions/product-customers-count ProductCustomersCount#GET ✓ should count all customers on product /api/administrator/subscriptions/product-customers ProductCustomers#GET ✓ should limit customers on product to one page /api/administrator/subscriptions/product-invoices-count ProductInvoicesCount#GET ✓ should count all invoices on product /api/administrator/subscriptions/product-invoices ProductInvoices#GET ✓ should limit invoices on product to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/administrator/subscriptions/product-refunded-credits-count ProductRefundedCreditsCount#GET ✓ should count all refunded credits on product /api/administrator/subscriptions/product-refunded-credits ProductRefundedCredits#GET ✓ should reject invalid productid ✓ should limit credits to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/administrator/subscriptions/product-refunds-count ProductRefundsCount#GET ✓ should count all refunds on product /api/administrator/subscriptions/product-refunds ProductRefunds#GET ✓ should limit refunds on product to one page /api/administrator/subscriptions/product-subscriptions-count ProductSubscriptionsCount#GET ✓ should count all subscriptions on product /api/administrator/subscriptions/product-subscriptions ProductSubscriptions#GET ✓ should limit subscriptions on product to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/administrator/subscriptions/product Product#GET ✓ should return product data /api/administrator/subscriptions/products-count ProductsCount#GET ✓ should count products /api/administrator/subscriptions/products Plans#GET ✓ should limit products to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/administrator/subscriptions/published-coupons-count PublishedCouponsCount#GET ✓ should count all published coupons /api/administrator/subscriptions/published-coupons PublishedCoupons#GET ✓ should limit published coupons to one page /api/administrator/subscriptions/published-plans-count PublishedPlansCount#GET ✓ should count all published plans /api/administrator/subscriptions/published-plans PublishedPlans#GET ✓ should limit published plans to one page /api/administrator/subscriptions/published-products-count PublishedProductsCount#GET ✓ should count all published products /api/administrator/subscriptions/published-products PublishedProducts#GET ✓ should limit published products to one page /api/administrator/subscriptions/refund-requests-count RefundRequestsCount#GET ✓ should count all refund requests /api/administrator/subscriptions/refund-requests RefundRequests#GET ✓ should limit refund requests to one page /api/administrator/subscriptions/refund Refund#GET ✓ should reject invalid refund ✓ should return refund data /api/administrator/subscriptions/refunded-credit RefundedCredit#GET ✓ should reject invalid creditid ✓ should reject non-refunded credit ✓ should return credit data /api/administrator/subscriptions/refunded-credits-count RefundedCreditsCount#GET ✓ should count all refunded credits /api/administrator/subscriptions/refunded-credits RefundedCredits#GET ✓ should limit credits to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/administrator/subscriptions/refunds-count RefundsCount#GET ✓ should count all refunds /api/administrator/subscriptions/refunds Refunds#GET ✓ should limit refunds to one page /api/administrator/subscriptions/reset-customer-coupon ResetCustomerCoupon#BEFORE ✓ should reject invalid customerid ✓ should reject undiscounted customer ResetCustomerCoupon#PATCH ✓ should remove customer coupon /api/administrator/subscriptions/reset-subscription-coupon ResetSubscriptionCoupon#BEFORE ✓ should reject invalid subscriptionid ✓ should reject undiscounted subscription ResetSubscriptionCoupon#PATCH ✓ should remove subscription coupon /api/administrator/subscriptions/set-charge-flagged SetChargeFlagged#BEFORE ✓ should reject invalid charge ✓ should reject flagged charge ✓ should require refunded charge SetChargeFlagged#PATCH ✓ should update charge flagged as fraud /api/administrator/subscriptions/set-coupon-published SetCouponPublished#BEFORE ✓ should reject invalid couponid ✓ should reject published coupon SetCouponPublished#PATCH ✓ should publish coupon /api/administrator/subscriptions/set-coupon-unpublished SetCouponUnpublished#BEFORE ✓ should reject invalid couponid ✓ should reject never published coupon ✓ should reject unpublished coupon SetCouponUnpublished#PATCH ✓ should unpublish coupon /api/administrator/subscriptions/set-invoice-forgiven SetInvoiceForgiven#BEFORE ✓ should reject invalid invoiceid ✓ should reject paid invoice ✓ should reject forgiven invoice SetInvoiceForgiven#PATCH ✓ should forgive invoice /api/administrator/subscriptions/set-plan-published SetPlanPublished#BEFORE ✓ should reject invalid planid ✓ should reject published plan SetPlanPublished#PATCH ✓ should publish plan /api/administrator/subscriptions/set-plan-unpublished SetPlanUnpublished#BEFORE ✓ should reject invalid planid ✓ should reject never published plan ✓ should reject unpublished plan SetPlanUnpublished#PATCH ✓ should unpublish plan /api/administrator/subscriptions/set-product-published SetProductPublished#BEFORE ✓ should reject invalid productid ✓ should reject published product SetProductPublished#PATCH ✓ should publish product /api/administrator/subscriptions/set-product-unpublished SetProductUnpublished#BEFORE ✓ should reject invalid productid ✓ should reject never published product ✓ should reject unpublished product SetProductUnpublished#PATCH ✓ should unpublish product /api/administrator/subscriptions/set-refund-request-denied SetRefundRequestDenied#BEFORE ✓ should reject invalid charge ✓ should reject charge without refund request ✓ should reject duplicate request SetRefundRequestDenied#PATCH ✓ should deny refund request /api/administrator/subscriptions/subscription-applied-credits-count SubscriptionAppliedCredits#GET ✓ should count all credits applied to subscription /api/administrator/subscriptions/subscription-applied-credits SubscriptionAppliedCredits#GET ✓ should reject invalid subscriptionid ✓ should limit credits to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/administrator/subscriptions/subscription-charges-count SubscriptionChargesCount#GET ✓ should count all charges on subscription /api/administrator/subscriptions/subscription-charges SubscriptionCharges#GET ✓ should limit charges on subscription to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/administrator/subscriptions/subscription-invoices-count SubscriptionInvoicesCount#GET ✓ should count all invoices on subscription /api/administrator/subscriptions/subscription-invoices SubscriptionInvoices#GET ✓ should limit invoices on product to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/administrator/subscriptions/subscription-refunded-credits-count RefundedCreditsCount#GET ✓ should count all refunded credits on account /api/administrator/subscriptions/subscription-refunded-credits SubscriptionRefundedCredits#GET ✓ should reject invalid subscriptionid ✓ should return refunded credits /api/administrator/subscriptions/subscription-refunds-count SubscriptionRefundsCount#GET ✓ should count all refunds on subscription /api/administrator/subscriptions/subscription-refunds SubscriptionRefunds#GET ✓ should limit refunds on subscription to one page /api/administrator/subscriptions/subscription Subscription#GET ✓ should reject invalid subscriptionid ✓ should return subscription data /api/administrator/subscriptions/subscriptions-count SubscriptionsCount#GET ✓ should count all subscriptions /api/administrator/subscriptions/subscriptions Subscriptions#GET ✓ should limit subscriptions on product to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/administrator/subscriptions/unpublished-coupons-count UnpublishedCouponsCount#GET ✓ should count all unpublished coupons /api/administrator/subscriptions/unpublished-coupons UnpublishedCoupons#GET ✓ should limit unpublished coupons to one page /api/administrator/subscriptions/unpublished-plans-count UnpublishedPlansCount#GET ✓ should count all unpublished plans /api/administrator/subscriptions/unpublished-plans UnpublishedPlans#GET ✓ should limit unpublished plans to one page /api/administrator/subscriptions/unpublished-products-count UnpublishedProductsCount#GET ✓ should count all unpublished products /api/administrator/subscriptions/unpublished-products UnpublishedProducts#GET ✓ should limit unpublished products to one page /api/administrator/subscriptions/update-plan UpdatePlan#BEFORE ✓ should reject invalid planid ✓ should reject invalid productid ✓ should reject unpublished plan ✓ should reject unpublished product ✓ should reject never published product ✓ should reject invalid trial UpdatePlan#PATCH ✓ should update plan /api/administrator/subscriptions/update-product UpdateProduct#BEFORE ✓ should reject invalid productid ✓ should reject invalid name ✓ should reject invalid name length ✓ should reject invalid statement_descriptor ✓ should reject invalid unit_label UpdateProduct#PATCH ✓ should update product /api/user/subscriptions/applicable-credit AppliedCredit#GET ✓ should reject invalid creditid ✓ should reject other account's credit ✓ should reject applied credit ✓ should allow partially applied credit ✓ should allow assigned credit /api/user/subscriptions/applicable-credits-count ApplicableCreditsCount#GET ✓ should count all applicable credits on account /api/user/subscriptions/applicable-credits ApplicableCredits#GET ✓ should reject invalid accountid ✓ should reject other user's account ✓ should limit credits to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/user/subscriptions/applied-credit ApplicableCredit#GET ✓ should reject invalid creditid ✓ should reject other account's credit ✓ should reject unapplied credit ✓ should reject partially-applied credit ✓ should return credit data /api/user/subscriptions/applied-credits-count AppliedCreditsCount#GET ✓ should count all applicable credits on account /api/user/subscriptions/applied-credits AppliedCredits#GET ✓ should reject invalid accountid ✓ should reject other user's account ✓ should limit credits to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/user/subscriptions/assigned-credit AssignedCredit#GET ✓ should reject invalid creditid ✓ should reject other account's credit ✓ should reject cancellation credit ✓ should return credit data /api/user/subscriptions/assigned-credits-count AssignedCreditsCount#GET ✓ should count all applicable credits on account /api/user/subscriptions/assigned-credits AssignedCredits#GET ✓ should reject invalid accountid ✓ should reject other user's account ✓ should limit credits to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/user/subscriptions/card-charges-count CardChargesCount#GET ✓ should count all charges on card /api/user/subscriptions/card-charges CardCharges#GET ✓ should limit card's charges to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/user/subscriptions/card-invoices-count CardInvoicesCount#GET ✓ should count all invoices on card /api/user/subscriptions/card-invoices CardInvoices#GET ✓ should limit card's invoices to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/user/subscriptions/card-refunds-count CardRefundsCount#GET ✓ should count all refunds on card /api/user/subscriptions/card-refunds CardRefunds#GET ✓ should limit refunds on card to one page /api/user/subscriptions/card-subscriptions-count CardSubscriptionsCount#GET ✓ should count all subscriptions on card /api/user/subscriptions/card-subscriptions CardSubscriptions#GET ✓ should limit subscriptions on card to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/user/subscriptions/card Card#GET ✓ should reject invalid card ✓ should reject other account's card ✓ should return card data /api/user/subscriptions/cards-count CardsCount#GET ✓ should count account's cards /api/user/subscriptions/cards Cards#GET ✓ should limit cards to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/user/subscriptions/charge Charge#GET ✓ should reject invalid charge ✓ should reject other account's charge ✓ should return charge data /api/user/subscriptions/charges-count ChargesCount#GET ✓ should count charges /api/user/subscriptions/charges Charges#GET ✓ should limit charges to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/user/subscriptions/create-card CreateCard#BEFORE ✓ should require name for no Stripe JS ✓ should require CVC for no Stripe JS ✓ should require card number for no Stripe JS ✓ should require expiration month for no Stripe JS ✓ should require expiration year for no Stripe JS ✓ should require token for Stripe JS 2 ✓ should require token for Stripe JS 3 CreateCard#POST ✓ should create card ✓ should update as customer's default card /api/user/subscriptions/create-credit-refund CreateCreditRefund#BEFORE ✓ should reject invalid credit ✓ should reject refunded credit ✓ should reject assigned credit ✓ should reject other account's credit CreateCreditRefund#POST ✓ should create refund /api/user/subscriptions/create-customer CreateCustomer#BEFORE ✓ should reject other accountid CreateCustomer#POST ✓ should create customer after authorization /api/user/subscriptions/create-refund-request CreateRefundRequest#BEFORE ✓ should reject invalid charge ✓ should reject refunded charge ✓ should reject duplicate request ✓ should reject other account's charge CreateRefundRequest#POST ✓ should create refund request /api/user/subscriptions/create-refund CreateRefund#BEFORE ✓ should reject invalid charge ✓ should reject refunded charge ✓ should enforce subscription refund period ✓ should reject other account's charge CreateRefund#POST ✓ should create refund /api/user/subscriptions/create-subscription CreateSubscription#BEFORE ✓ should reject invalid planid ✓ should reject never-published planid ✓ should reject unpublished plan ✓ should reject customer without card CreateSubscription#POST ✓ should allow customer without card on free plan ✓ should create authorized subscription ✓ should use applicable credit ✓ should mark credit as applied /api/user/subscriptions/credit Credit#GET ✓ should reject invalid creditid ✓ should reject other account's credit ✓ should return cancellation credit ✓ should return assigned credit ✓ should return refunded credit ✓ should return applied credit /api/user/subscriptions/credits-count CreditsCount#GET ✓ should count all credits on z /api/user/subscriptions/credits Credits#GET ✓ should reject invalid accountid ✓ should reject other user's account ✓ should limit credits to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records ✓ should include applied credits ✓ should include applicable credits ✓ should include refended credits /api/user/subscriptions/customer-applied-credits-count CustomerAppliedCreditsCount#GET ✓ should count all applied credits on customer /api/user/subscriptions/customer-applied-credits CustomerAppliedCredits#GET ✓ should reject invalid customerid ✓ should reject other user's account ✓ should limit credits to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/user/subscriptions/customer-charges CustomerCharges#GET ✓ should limit charges on customer to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/user/subscriptions/customer-invoices CustomerInvoices#GET ✓ should limit invoices on customer to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/user/subscriptions/customer-refunded-credits-count CustomerRefundedCreditsCount#GET ✓ should count all refunded credits on customer /api/user/subscriptions/customer-refunded-credits CustomerRefundedCredits#GET ✓ should reject invalid customerid ✓ should reject other user's account ✓ should limit credits to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/user/subscriptions/customer-subscriptions CardSubscriptions#GET ✓ should limit subscriptions on card to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/user/subscriptions/customer Customer#GET ✓ should reject invalid customerid ✓ should reject other account's customerid ✓ should return customer data /api/user/subscriptions/customers Customers#GET ✓ should limit customers on card to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/user/subscriptions/delete-card DeleteCard#BEFORE ✓ should reject invalid cardid ✓ should reject other account's card DeleteCard#DELETE ✓ should delete card /api/user/subscriptions/delete-subscription DeleteSubscription#BEFORE ✓ should reject invalid subscriptionid ✓ should reject other account's subscription ✓ should require active subscription DeleteSubscription#DELETE ✓ should delete subscription at period end ✓ should delete free subscription without credit or refund ✓ should delete free trial subscription without credit or refund ✓ should delete paid subscription and credit balance ✓ should delete paid subscription and refund balance ✓ should index refunded credit /api/user/subscriptions/invoice Invoice#GET ✓ should reject invalid invoice ✓ should reject other account's invoice ✓ should return invoice data /api/user/subscriptions/invoices-count InvoicesCount#GET ✓ should count charges /api/user/subscriptions/invoices Invoices#GET ✓ should limit invoices to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/user/subscriptions/plan-cards-count PlanCardsCount#GET ✓ should count all cards on plan /api/user/subscriptions/plan-cards PlanCards#GET ✓ should limit cards to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/user/subscriptions/plan-charges-count PlanChargesCount#GET ✓ should count all charges on plan /api/user/subscriptions/plan-charges PlanCharges#GET ✓ should limit charges to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/user/subscriptions/plan-invoices-count PlanInvoicesCount#GET ✓ should count all invoices on plan /api/user/subscriptions/plan-invoices PlanInvoices#GET ✓ should limit invoices to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/user/subscriptions/plan-subscriptions-count PlanSubscriptionsCount#GET ✓ should count all subscriptions on plan /api/user/subscriptions/plan-subscriptions PlanSubscriptions#GET ✓ should limit subscriptions to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/user/subscriptions/product-cards-count ProductCardsCount#GET ✓ should count all cards on product /api/user/subscriptions/product-cards ProductCards#GET ✓ should limit cards to one page ✓ should enforce page size ✓ should enforce specified offset /api/user/subscriptions/product-charges-count ProductChargesCount#GET ✓ should count all charges on product /api/user/subscriptions/product-charges ProductCharges#GET ✓ should limit charges to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/user/subscriptions/product-invoices-count ProductInvoicesCount#GET ✓ should count all invoices on product /api/user/subscriptions/product-invoices ProductInvoices#GET ✓ should limit invoices to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/user/subscriptions/product-subscriptions-count ProductSubscriptionsCount#GET ✓ should count all subscriptions on product /api/user/subscriptions/product-subscriptions ProductSubscriptions#GET ✓ should limit subscriptions to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/user/subscriptions/published-plan PublishedPlan#GET ✓ should not require account ✓ should reject never published plan ✓ should return plan data /api/user/subscriptions/published-plans-count PublishedPlansCount#GET ✓ should count published plans /api/user/subscriptions/published-plans PublishedPlans#GET ✓ should not require account ✓ should exclude never published plans ✓ should exclude unpublished plan ✓ should limit plan list to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/user/subscriptions/published-product PublishedProduct#GET ✓ should not require account ✓ should reject never published product ✓ should reject unpublished product ✓ should return product data /api/user/subscriptions/published-products-count PublishedProductsCount#GET ✓ should count published products /api/user/subscriptions/published-products PublishedProducts#GET ✓ should not require account ✓ should exclude never published products ✓ should exclude unpublished product ✓ should limit product list to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/user/subscriptions/refund Refund#GET ✓ should reject invalid refund ✓ should reject other account's refund ✓ should return refund data /api/user/subscriptions/refunded-credit RefundedCredit#GET ✓ should reject invalid creditid ✓ should reject other account's credit ✓ should reject non-refunded credit ✓ should return credit data /api/user/subscriptions/refunded-credits-count RefundedCreditsCount#GET ✓ should count all refunded credits on account /api/user/subscriptions/refunded-credits RefundedCredits#GET ✓ should reject invalid accountid ✓ should reject other user's account ✓ should limit credits to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/user/subscriptions/refunds-count RefundsCount#GET ✓ should count refunds /api/user/subscriptions/refunds Refunds#GET ✓ should enforce page size ✓ should enforce specified offset /api/user/subscriptions/reset-subscription-cancelling ResetSubscriptionCancelling#BEFORE ✓ should reject invalid subscriptionid ✓ should reject uncancelled subscription ✓ should reject other account's subscription ResetSubscriptionCancelling#PATCH ✓ should uncancel subscription /api/user/subscriptions/set-customer-coupon SetCustomerCoupon#BEFORE ✓ should reject invalid customerid ✓ should reject account with coupon SetCustomerCoupon#PATCH ✓ should apply coupon /api/user/subscriptions/set-invoice-paid SetInvoicePaid#BEFORE ✓ should reject invalid invoiceid ✓ should reject other account's invoice ✓ should reject paid invoice ✓ should reject forgiven invoice ✓ should reject invalid source ✓ should reject other account's source SetInvoicePaid#PATCH ✓ should pay invoice /api/user/subscriptions/set-subscription-coupon SetSubscriptionCoupon#BEFORE ✓ should reject invalid subscriptionid ✓ should reject subscription with coupon SetSubscriptionCoupon#PATCH ✓ should apply coupon /api/user/subscriptions/set-subscription-plan SetSubscriptionPlan#BEFORE ✓ should reject invalid subscriptionid ✓ should reject other account's subscription ✓ should reject same planid ✓ should require user add card SetSubscriptionPlan#PATCH ✓ should change plan ✓ should use applicable credit ✓ should mark credit as applied ✓ should create applicable credit ✓ should convert from free to paid ✓ should convert from paid to free trial ✓ should convert from paid to free /api/user/subscriptions/set-subscription-quantity SetSubscriptionQuantity#BEFORE ✓ should reject invalid subscriptionid ✓ should reject other account's subscription ✓ should reject same quantity ✓ should reject negative quantity ✓ should reject zero quantity ✓ should reject invalid quantity SetSubscriptionQuantity#PATCH ✓ should change quantity ✓ should change quantity for free plan ✓ should change quantity for free trial ✓ should use applicable credit ✓ should mark credit as applied ✓ should create credit /api/user/subscriptions/set-subscription-tax-percent SetSubscriptionTaxPercent#BEFORE ✓ should reject invalid subscriptionid ✓ should reject other account's subscription ✓ should reject same percent ✓ should reject negative percent ✓ should reject invalid percent SetSubscriptionTaxPercent#PATCH ✓ should change tax percent /api/user/subscriptions/subscription-applied-credits-count SubscriptionAppliedCreditsCount#GET ✓ should count all applied credits on subscription /api/user/subscriptions/subscription-applied-credits SubscriptionAppliedCredits#GET ✓ should reject invalid subscriptionid ✓ should reject other user's account ✓ should limit credits to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/user/subscriptions/subscription-cards-count SubscriptionCardsCount#GET ✓ should count all cards on subscriptions /api/user/subscriptions/subscription-cards SubscriptionCards#GET ✓ should limit cards to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/user/subscriptions/subscription-charges-count SubscriptionChargesCount#GET ✓ should count all charges on subscription /api/user/subscriptions/subscription-charges SubscriptionCharges#GET ✓ should limit charges on subscription to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/user/subscriptions/subscription-invoices-count SubscriptionInvoicesCount#GET ✓ should count subscription's invoices /api/user/subscriptions/subscription-invoices SubscriptionInvoices#GET ✓ should limit invoices on subscription to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/user/subscriptions/subscription-refunded-credits-count RefundedCreditsCount#GET ✓ should count all refunded credits on account /api/user/subscriptions/subscription-refunded-credits SubscriptionRefundedCredits#GET ✓ should reject invalid subscriptionid ✓ should reject other user's subscription ✓ should return refunded credits /api/user/subscriptions/subscription-refunds-count SubscriptionRefundsCount#GET ✓ should count all refunds on subscription /api/user/subscriptions/subscription-refunds SubscriptionRefunds#GET ✓ should limit refunds on subscription to one page /api/user/subscriptions/subscription Subscription#GET ✓ should reject invalid subscriptionid ✓ should reject other account's subscription ✓ should return subscription data /api/user/subscriptions/subscriptions-count SubscriptionsCount#GET ✓ should count published subscriptions /api/user/subscriptions/subscriptions PlanSubscriptions#GET ✓ should limit subscriptions to one page ✓ should enforce page size ✓ should enforce specified offset ✓ should return all records /api/user/subscriptions/upcoming-invoice Upcominginvoice#GET ✓ should reject invalid subscriptionid ✓ should reject other account's subscription ✓ should return upcoming invoice for subscription /api/user/subscriptions/upcoming-invoices-count UpcominginvoicesCount#GET ✓ should count upcoming invoices /api/user/subscriptions/upcoming-invoices UpcomingInvoices#GET ✓ should return upcoming invoice for each subscription 1157 passing (5h)