franckverrot / terraform-provider-stripe

A Terraform Provider for Stripe
https://registry.terraform.io/providers/franckverrot/stripe/latest
Mozilla Public License 2.0
242 stars 51 forks source link

Decimal amounts are passed to API as zeros #38

Open glebpom opened 3 years ago

glebpom commented 3 years ago

I'm trying to create the price with decimal values.

When I'm passing tiers in stripe_price resource:

  tier {
    up_to       = 500
    unit_amount_decimal = 0.0
    flat_amount_decimal = 1000.0
  }

  tier {
    up_to_inf   = true
    unit_amount_decimal = 0.1
    flat_amount_decimal = 0.0
  }

the resulting api call body contains zeroes on prices:

  "tiers": {
    "0": {
      "flat_amount": "0",
      "unit_amount": "0",
      "up_to": "500"
    },
    "1": {
      "flat_amount": "0",
      "unit_amount": "0",
      "up_to": "inf"
    }
  },