Merge branch 'feature/stripe_v2' into feature/stripe_v2_fe

This commit is contained in:
Sivin Varghese
2025-11-06 16:34:03 +05:30
committed by GitHub
3 changed files with 4 additions and 4 deletions
@@ -67,7 +67,7 @@ class Enterprise::Billing::CreateStripeCustomerService
attributes = {
stripe_customer_id: customer_id,
stripe_billing_version: 'v2'
stripe_billing_version: '2'
}
if hacker_plan_config&.value.present?
@@ -54,7 +54,7 @@ describe Enterprise::Billing::CreateStripeCustomerService do
expect(Stripe::Customer).to have_received(:create).with({ name: account.name, email: admin1.email })
expect(account.reload.custom_attributes).to include(
'stripe_customer_id' => 'cus_random_number',
'stripe_billing_version' => 'v2',
'stripe_billing_version' => '2',
'stripe_pricing_plan_id' => 'bpp_hacker_123',
'plan_name' => 'Hacker',
'subscribed_quantity' => 2
@@ -79,7 +79,7 @@ describe Enterprise::Billing::CreateStripeCustomerService do
expect(Stripe::Customer).not_to have_received(:create)
expect(account.reload.custom_attributes).to include(
'stripe_customer_id' => 'cus_existing_v2',
'stripe_billing_version' => 'v2',
'stripe_billing_version' => '2',
'stripe_pricing_plan_id' => 'bpp_hacker_123',
'plan_name' => 'Hacker',
'subscribed_quantity' => 2
@@ -1,7 +1,7 @@
require 'rails_helper'
describe Enterprise::Billing::V2::UsageReporterService do
let(:account) { create(:account, custom_attributes: { 'stripe_billing_version' => 2, 'stripe_customer_id' => 'cus_123' }) }
let(:account) { create(:account, custom_attributes: { 'stripe_billing_version' => '2', 'stripe_customer_id' => 'cus_123' }) }
let(:service) { described_class.new(account: account) }
describe '#report' do