require 'lago_ruby'
instance = LagoAPI::PlanCreateInputPlan.new(
name: Startup,
invoice_display_name: Startup plan,
code: startup,
interval: monthly,
description: Plan for early stage startups.,
amount_cents: 10000,
amount_currency: null,
trial_period: 5,
pay_in_advance: true,
bill_charges_monthly: null,
tax_codes: ["french_standard_vat"],
charges: [{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","charge_model":"package","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"prorated":false,"min_amount_cents":3000,"properties":{"amount":"30","free_units":100,"package_size":1000},"group_properties":[],"tax_codes":["french_standard_vat"]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a92","charge_model":"graduated","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"prorated":false,"min_amount_cents":0,"properties":{"graduated_ranges":[{"to_value":10,"from_value":0,"flat_amount":"10","per_unit_amount":"0.5"},{"to_value":null,"from_value":11,"flat_amount":"0","per_unit_amount":"0.4"}]},"group_properties":[]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a93","charge_model":"standard","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":true,"prorated":false,"min_amount_cents":0,"properties":{},"group_properties":[{"group_id":"1a901a90-1a90-1a90-1a90-1a901a901a01","invoice_display_name":"Europe","values":{"amount":"10"}},{"group_id":"1a901a90-1a90-1a90-1a90-1a901a901a02","invoice_display_name":"USA","values":{"amount":"5"}},{"group_id":"1a901a90-1a90-1a90-1a90-1a901a901a03","invoice_display_name":"Africa","values":{"amount":"8"}}]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a94","charge_model":"volume","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"prorated":false,"min_amount_cents":0,"properties":{"volume_ranges":[{"from_value":0,"to_value":100,"flat_amount":"0","per_unit_amount":"0"},{"from_value":101,"to_value":null,"flat_amount":"0","per_unit_amount":"0.5"}]},"group_properties":[]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a95","charge_model":"percentage","invoiceable":false,"invoice_display_name":"Setup","pay_in_advance":true,"prorated":false,"min_amount_cents":0,"properties":{"rate":"1","fixed_amount":"0.5","free_units_per_events":5,"free_units_per_total_aggregation":"500"},"group_properties":[]}]
)