
Security News
NVD Quietly Sweeps 100K+ CVEs Into a “Deferred” Black Hole
NVD now marks all pre-2018 CVEs as "Deferred," signaling it will no longer enrich older vulnerabilities, further eroding trust in its data.
killbill-xml-builder
Advanced tools
pip install killbill-xml-builder
Import the required classes and create the catalog
from killbill_xml_builder.enums import (
PhaseType,
TimeUnit,
BillingPeriod,
BillingMode,
ProductCategory,
BillingPolicy,
EntitlementPolicy,
)
from killbill_xml_builder import (
Currencies,
Product,
Phase,
Price,
Duration,
FixedPrice,
RecurringPrice,
Plan,
Catalog,
Rules,
ChangePolicyCase,
CancelPolicyCase,
)
Create currencies
currencies = Currencies(["USD", "GBP"])
Create add-on
oil_slick = Product("OilSlick", ProductCategory.ADD_ON)
remote_control = Product("RemoteControl", ProductCategory.ADD_ON)
Create products
standard = Product("Standard")
sports = Product("Sports", available=[oil_slick, remote_control])
super = Product("Super", included=[oil_slick], available=[remote_control])
Create products phases
Phase trial
phase_trial = Phase(
type=PhaseType.TRIAL,
duration=Duration(length=30, time_unit=TimeUnit.DAYS),
fixed_price=FixedPrice(),
)
Phase standard evergreen
standard_evergreen = Phase(
type=PhaseType.EVERGREEN,
duration=Duration(time_unit=TimeUnit.UNLIMITED),
recurring_price=RecurringPrice(
prices=[Price("GBP", 75.00), Price("USD", 100.00)],
billing_period=BillingPeriod.MONTHLY,
),
)
Phase sports evergreen
sports_evergreen = Phase(
type=PhaseType.EVERGREEN,
duration=Duration(time_unit=TimeUnit.UNLIMITED),
recurring_price=RecurringPrice(
prices=[Price("GBP", 375.00), Price("USD", 500.00)],
billing_period=BillingPeriod.MONTHLY,
),
)
Phase super evergreen
super_evergreen = Phase(
type=PhaseType.EVERGREEN,
duration=Duration(time_unit=TimeUnit.UNLIMITED),
recurring_price=RecurringPrice(
prices=[Price("GBP", 750.00), Price("USD", 1000.00)],
billing_period=BillingPeriod.MONTHLY,
),
)
Phase ADD-ON
add_on_evergreen = Phase(
type=PhaseType.EVERGREEN,
duration=Duration(time_unit=TimeUnit.UNLIMITED),
recurring_price=RecurringPrice(
prices=[Price("GBP", 15.00), Price("USD", 20.00)],
billing_period=BillingPeriod.MONTHLY,
),
)
Create rules (change and cancel rules are required)
default_change_policy = ChangePolicyCase(policy=BillingPolicy.END_OF_TERM)
default_cancel_policy = CancelPolicyCase(policy=EntitlementPolicy.END_OF_TERM)
rules = Rules(
change_policy_cases=[default_change_policy],
cancel_policy_cases=[default_cancel_policy],
)
Create plans
oil_slick_monthly = Plan(
name="oil-slick-monthly",
product=oil_slick,
initial_phases=[],
final_phase=add_on_evergreen,
)
remote_control_monthly = Plan(
name="remote-control-monthly",
product=remote_control,
initial_phases=[],
final_phase=add_on_evergreen,
)
standard_monthly = Plan(
name="standard-monthly",
product=standard,
initial_phases=[phase_trial],
final_phase=standard_evergreen,
)
sports_monthly = Plan(
name="sports-monthly",
product=sports,
initial_phases=[phase_trial],
final_phase=sports_evergreen,
)
super_monthly = Plan(
name="super-monthly",
product=super,
initial_phases=[phase_trial],
final_phase=super_evergreen,
)
Create catalog
catalog = Catalog(
name="SpyCarBasic",
billing_mode=BillingMode.IN_ADVANCE,
currencies=currencies,
products=[standard, sports, super, oil_slick, remote_control],
rules=rules,
plans=[
standard_monthly,
sports_monthly,
super_monthly,
oil_slick_monthly,
remote_control_monthly,
],
)
Get xml content
print(catalog)
Save catalog as file
catalog.write()
FAQs
killbill xml builder
We found that killbill-xml-builder demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
NVD now marks all pre-2018 CVEs as "Deferred," signaling it will no longer enrich older vulnerabilities, further eroding trust in its data.
Research
Security News
Lazarus-linked threat actors expand their npm malware campaign with new RAT loaders, hex obfuscation, and over 5,600 downloads across 11 packages.
Security News
Safari 18.4 adds support for Iterator Helpers and two other TC39 JavaScript features, bringing full cross-browser coverage to key parts of the ECMAScript spec.