• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

code-corps / stripity_stripe / 1712
91%

Build:
DEFAULT BRANCH: master
Ran 10 May 2021 12:51PM CUT
Jobs 7
Files 83
Run time 12min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
1712

push

travis-ci

web-flow
Remove :customer from typespec in CustomerBalanceTransaction.create (#662)

It's invalid to pass the `customer` key as both part of the URL (which
this function does) *and* in the body. Doing so leads to a Stripe
error:

```
iex(1)> Stripe.CustomerBalanceTransaction.create("cus_JO4D6sa5xl4Uk7", %{amount: -100, currency: "USD", customer: "cus_JO4D6sa5x
l4Uk7"})
{:error,
 %Stripe.Error{
   code: :invalid_request_error,
   extra: %{
     http_status: 400,
     param: :customer,
     raw_error: %{
       "message" => "A parameter provided in the URL (customer) was repeated as a GET or POST parameter. You can only provide this information as a portion of the URL.",
       "param" => "customer",
       "type" => "invalid_request_error"
     }
   },
   message: "A parameter provided in the URL (customer) was repeated as a GET or POST parameter. You can only provide this information as a portion of the URL.",
   request_id: nil,
   source: :stripe,
   user_message: nil
 }}
```

Whereas passing it as the first (required) positional argument works
fine:

```
iex(2)> Stripe.CustomerBalanceTransaction.create("cus_JO4D6sa5xl4Uk7", %{amount: -100, currency: "USD"})
{:ok,
 %Stripe.CustomerBalanceTransaction{
   amount: -100,
   created: 1619635421,
   credit_note: nil,
   currency: "usd",
   customer: "cus_JO4D6sa5xl4Uk7",
   description: nil,
   ending_balance: -100,
   id: "cbtxn_1IlIMLFvgMYR2X5ykmdTnR5H",
   invoice: nil,
   livemode: false,
   metadata: %{},
   object: "customer_balance_transaction",
   type: "adjustment"
 }}
```

713 of 786 relevant lines covered (90.71%)

1049.7 hits per line

Jobs
ID Job ID Ran Files Coverage
1 1712.1 (STRIPE_MOCK_VERSION=0.95.0 MIX_ENV=test STRIPE_SECRET_KEY=non_empty_secret_key_string) 10 May 2021 12:52PM CUT 0
90.71
Travis Job 1712.1
2 1712.2 (STRIPE_MOCK_VERSION=0.95.0 MIX_ENV=test STRIPE_SECRET_KEY=non_empty_secret_key_string) 10 May 2021 12:52PM CUT 0
90.71
Travis Job 1712.2
3 1712.3 (STRIPE_MOCK_VERSION=0.95.0 MIX_ENV=test STRIPE_SECRET_KEY=non_empty_secret_key_string) 10 May 2021 12:51PM CUT 0
90.71
Travis Job 1712.3
4 1712.4 (STRIPE_MOCK_VERSION=0.95.0 MIX_ENV=test STRIPE_SECRET_KEY=non_empty_secret_key_string) 10 May 2021 12:52PM CUT 0
90.71
Travis Job 1712.4
5 1712.5 (STRIPE_MOCK_VERSION=0.95.0 MIX_ENV=test STRIPE_SECRET_KEY=non_empty_secret_key_string) 10 May 2021 01:03PM CUT 0
90.71
Travis Job 1712.5
6 1712.6 (STRIPE_MOCK_VERSION=0.95.0 MIX_ENV=test STRIPE_SECRET_KEY=non_empty_secret_key_string) 10 May 2021 01:04PM CUT 0
90.71
Travis Job 1712.6
7 1712.7 (STRIPE_MOCK_VERSION=0.95.0 MIX_ENV=test STRIPE_SECRET_KEY=non_empty_secret_key_string) 10 May 2021 01:03PM CUT 0
90.71
Travis Job 1712.7
Source Files on build 1712
  • Tree
  • List 83
  • Changed 2
  • Source Changed 1
  • Coverage Changed 2
Loading...
Coverage∆FileLinesRelevantCoveredMissedHits/Line
  • ►
    92.09
    lib/
  • ►
    65.0
    test/
  • Back to Repo
  • Travis Build #1712
  • 30061d78 on github
  • Prev Build on master (#1706)
  • Next Build on master (#1715)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc