stripe 1.3.0

  • Readme
  • Changelog
  • Installing
  • 61

Stripe Dart #

Codeship Status for exitlive/stripe-dart

Stripe API (version 2016-07-06) implemented in dart.

Most of the model class documentations have been taken from the stripe documentation.

This implementation is based on the official Stripe Java and NodeJS API wrappers and written as a proper native dart library.

Usage #

import "package:stripe/stripe.dart";

main() async {

  var cardCreation = new CardCreation()
      ..number = '123123123';

  var customerCreation = new CustomerCreation()
      ..description = 'Customer for test@example.com'
      ..card = card;
      
  var customer = await customerCreation.create();

}

Tests #

The majority of the tests rely on connecting to a real Stripe Account in testmode. Therefore all tests expect your API Test Secret Key as the first script argument and your account must be set to US. Testcoverage is limited (some tests would require livemode and or OAuth).

License #

Copyright (c) 2014 Matias Meno (m@tias.me), Martin Flucka (martin.flucka@gmail.com)

The MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

1.3.0 (2018-07-16) #

  • Make changes to be dart 2.0 compatible

1.2.2 (2016-10-20) #

Features:

  • upgrade dependencies

Bug fixes:

  • change card type to card brand

1.2.1 (2016-08-08) #

Features:

  • add CHANGELOG.md (closes #32)
  • add default source to customer (#33, @rbellens)

Bug fixes:

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  stripe: ^1.3.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:stripe/stripe.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
76
Health:
Code health derived from static analysis. [more]
57
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
30
Overall:
Weighted score of the above. [more]
61
Learn more about scoring.

We analyzed this package on Nov 5, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.6.0
  • pana: 0.12.21

Platforms

Detected platforms: other

Primary library: package:stripe/stripe.dart with components: io, mirrors.

Health suggestions

Fix lib/src/api_resources/charge.dart. (-6.31 points)

Analysis of lib/src/api_resources/charge.dart reported 13 hints, including:

line 34 col 7: DO use curly braces for all flow control structures.

line 36 col 7: DO use curly braces for all flow control structures.

line 50 col 7: DO use curly braces for all flow control structures.

line 52 col 7: DO use curly braces for all flow control structures.

line 62 col 7: DO use curly braces for all flow control structures.

Fix lib/src/api_resources/invoice.dart. (-5.84 points)

Analysis of lib/src/api_resources/invoice.dart reported 12 hints, including:

line 30 col 7: DO use curly braces for all flow control structures.

line 32 col 7: DO use curly braces for all flow control structures.

line 40 col 7: DO use curly braces for all flow control structures.

line 42 col 7: DO use curly braces for all flow control structures.

line 66 col 7: DO use curly braces for all flow control structures.

Fix lib/src/api_resources/account.dart. (-3.93 points)

Analysis of lib/src/api_resources/account.dart reported 8 hints, including:

line 54 col 7: DO use curly braces for all flow control structures.

line 56 col 7: DO use curly braces for all flow control structures.

line 64 col 7: DO use curly braces for all flow control structures.

line 66 col 7: DO use curly braces for all flow control structures.

line 72 col 7: DO use curly braces for all flow control structures.

Fix additional 20 files with analysis or formatting issues. (-38.64 points)

Additional issues in the following files:

  • lib/src/api_resources/customer.dart (8 hints)
  • lib/src/resources/legal_entity.dart (8 hints)
  • lib/src/api_resources/application_fee.dart (6 hints)
  • lib/src/api_resources/subscription.dart (6 hints)
  • lib/src/api_resources/transfer.dart (6 hints)
  • lib/src/resources/additional_owner.dart (6 hints)
  • lib/src/resource.dart (5 hints)
  • lib/src/api_resources/dispute.dart (4 hints)
  • lib/src/api_resources/invoice_item.dart (4 hints)
  • lib/src/api_resources/token.dart (4 hints)
  • lib/src/api_resources/transfer_reversal.dart (4 hints)
  • lib/src/api_resource.dart (2 hints)
  • lib/src/api_resources/balance.dart (2 hints)
  • lib/src/api_resources/card.dart (2 hints)
  • lib/src/api_resources/discount.dart (2 hints)
  • lib/src/api_resources/event.dart (2 hints)
  • lib/src/api_resources/refund.dart (2 hints)
  • lib/src/resources/shipping.dart (2 hints)
  • lib/src/resources/verification.dart (2 hints)
  • lib/src/resource_collection.dart (1 hint)

Maintenance issues and suggestions

Support latest dependencies. (-10 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency (http).

Package is getting outdated. (-30.41 points)

The package was last published 68 weeks ago.

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and stripe.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.9.0 <3.0.0
http ^0.11.2 0.11.3+17 0.12.0+2
logging ^0.11.0 0.11.3+2
Transitive dependencies
async 2.4.0
charcode 1.1.2
collection 1.14.12
http_parser 3.1.3
meta 1.1.8
path 1.6.4
source_span 1.5.5
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
Dev dependencies
test ^1.0.0