stripe-cli 1.6.3 → 1.6.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2e85eab0abb136dbc6ef72c9ed499f50a2038d16
4
- data.tar.gz: 57da9beb0081b703c4003af7871d114a53757a93
3
+ metadata.gz: 9471f28432f1c177518637477dcc4c8f832acfff
4
+ data.tar.gz: 3422689dcb2721571a4f4fe5341c51efc0cb007b
5
5
  SHA512:
6
- metadata.gz: 9af565dab61af8ddbb01b83d294b19a79d5c804928d47424c8b684baeef5d1005fa265c77553d132473b7c9b5ece90953fbbc2932ec91287028046f8081bfcc5
7
- data.tar.gz: 4c5d119ec40a3f89daba2817dcdbb66c856e275a49542d0e07b11b7fa29e2b810744b8a692a92498eea1f5e99648c725d27c6e94fcb22aee69769a8c59dee65c
6
+ metadata.gz: 7bfaa320421a692683eb23a8e4ac98bb02d850e27587fe77cfd0cb73103c50aabade182ac411541f805c7c4bbc639728befddb20d71188f898766b51628274be
7
+ data.tar.gz: 735238f9fc5b523eed06c204dc036b38f2d12f8fb41a865be6ace148a20e66158c040665132b062c4b2241e67538e1de3e6c4cec7636fdc121a57f02f919ba5f
data/README.md CHANGED
@@ -141,22 +141,31 @@ Api errors are rescued and their messages displayed for you to read. No more `b
141
141
 
142
142
  ## Usage
143
143
 
144
+
144
145
  Commands:
145
- stripe balance # show currently available & pending balance amounts
146
- stripe cards # find, list, create, & delete cards for both customers & recipients
147
- stripe charges # find, list, create, capture, & refund charges
148
- stripe coupons # find, list, create, & delete coupons
149
- stripe customers # find, list, create, & delete customers
150
- stripe events # find & list events
151
- stripe help [COMMAND] # Describe available commands or one specific command
152
- stripe invoices # find, list, pay, & close invoices
153
- stripe plans # find, list, create, & delete plans
154
- stripe recipients # find, list, create, & delete recipients
155
- stripe refunds # find, list, & create refunds
156
- stripe subscriptions # find, list, create, cancel, & reactivate multiple subscriptions per customer
157
- stripe tokens # find & create tokens for bank accounts & credit cards
158
- stripe transactions # find & list balance transactions
159
- stripe transfers # find, list, & create transfers
146
+ stripe balance # show currently available & pending balance amounts
147
+ stripe cards # find, list, create, & delete cards for both customers & recipients
148
+ stripe charges # find, list, create, capture, & refund charges
149
+ stripe coupons # find, list, create, & delete coupons
150
+ stripe customers # find, list, create, & delete customers
151
+ stripe events # find & list events
152
+ stripe help [COMMAND] # Describe available commands or one specific command
153
+ stripe invoices # find, list, pay, & close invoices
154
+ stripe plans # find, list, create, & delete plans
155
+ stripe recipients # find, list, create, & delete recipients
156
+ stripe refunds # find, list, & create refunds
157
+ stripe subscriptions # find, list, create, cancel, & reactivate multiple subscriptions per customer
158
+ stripe tokens # find & create tokens for bank accounts & credit cards
159
+ stripe transactions # find & list balance transactions
160
+ stripe transfers # find, list, & create transfers
161
+
162
+
163
+ Global Options:
164
+ [-k | --key=KEY] # One of your API secret keys, provided by Stripe
165
+ [-e | --env=ENV] # expects a `~/.stripecli` file with section headers for any string passed into it
166
+ [-v | --version=VERSION] # Stripe API version-date. Looks like `YYYY-MM-DD`
167
+ [--dollar-amounts] # configuration flag setting expected currency units to dollars
168
+ [--no-dollar-amounts] # configuration flag setting expected currency units to cents
160
169
 
161
170
  ## Command Documentation
162
171
 
@@ -239,6 +248,8 @@ Api errors are rescued and their messages displayed for you to read. No more `b
239
248
  Usage:
240
249
  stripe charges capture ID
241
250
 
251
+ Capture a charge
252
+
242
253
  #### Charge Create
243
254
 
244
255
  Usage:
@@ -252,21 +263,25 @@ Api errors are rescued and their messages displayed for you to read. No more `b
252
263
  [--exp-year | --card-exp-year=CARD_EXP_YEAR] # Four digit expiration year of card
253
264
  [--cvc | --card-cvc=CARD_CVC] # Three or four digit security code located on the back of card
254
265
  [--name | --card-name=CARD_NAME] # Cardholder's full name as displayed on card
255
- [--amount=N] # Charge amount in dollars
266
+ [--amount=N] # Charge amount in dollars (or cents when --no-dollar-amounts)
256
267
  [--currency=CURRENCY] # 3-letter ISO code for currency
257
268
  # Default: usd
258
269
  [--description=DESCRIPTION] # Arbitrary description of charge
259
270
  [--capture], [--no-capture] # Whether or not to immediately capture the charge. Uncaptured charges expire in 7 days
260
271
  # Default: true
261
- [--metadata=key:value] # A key/value store of additional user-defined data
262
272
  [--statement-description=STATEMENT_DESCRIPTION] # Displayed alongside your company name on your customer's card statement (15 character max)
263
273
  [--receipt-email=RECEIPT_EMAIL] # Email address to send receipt to. Overrides default email settings.
274
+ [--metadata=key:value] # A key/value store of additional user-defined data
275
+
276
+ Create a charge
264
277
 
265
278
  #### Charge Find
266
279
 
267
280
  Usage:
268
281
  stripe charges find ID
269
282
 
283
+ Find a charge
284
+
270
285
  #### Charges List
271
286
 
272
287
  Usage:
@@ -278,7 +293,9 @@ Api errors are rescued and their messages displayed for you to read. No more `b
278
293
  [--limit=LIMIT] # a limit on the number of resources returned, between 1 and 100
279
294
  [--offset=OFFSET] # the starting index to be used, relative to the entire list
280
295
  [--count=COUNT] # depricated: use limit
281
- [--customer=CUSTOMER] # a customer ID to filter results by
296
+ [--customer=CUSTOMER] # ID of customer who's charges we want to list
297
+
298
+ List charges (optionally by customer_id)
282
299
 
283
300
  #### Charge Refund
284
301
 
@@ -286,17 +303,19 @@ Api errors are rescued and their messages displayed for you to read. No more `b
286
303
  stripe charges refund ID
287
304
 
288
305
  Options:
289
- [--amount=N] # Refund amount in dollars. (Entire charge by default)
290
- [--metadata=key:value] # a key/value store of additional user-defined data
291
- [--refund-application-fee], [--no-refund-application-fee] # Whether or not to refund the application fee
306
+ [--amount=N] # Refund amount in dollars. (or cents when --no-dollar-amounts) defaults to entire charged amount
307
+ [--refund-application-fee], # or,
308
+ [--no-refund-application-fee] # Whether or not to refund the application fee
309
+ [--metadata=key:value] # a key/value store of additional user-defined data
292
310
 
311
+ Refund a charge
293
312
 
294
313
  ### Tokens
295
314
 
296
315
  Commands:
297
- stripe tokens create TYPE # Create a new token of type TYPE(card or account)
298
- stripe tokens find ID # Find a Token
299
- stripe tokens help [COMMAND] # Describe subcommands or one specific subcommand
316
+ stripe tokens create TYPE # Create a new token of type TYPE(card or account)
317
+ stripe tokens find ID # Find a Token
318
+ stripe tokens help [COMMAND] # Describe subcommands or one specific subcommand
300
319
 
301
320
  #### Token Create
302
321
 
@@ -311,16 +330,18 @@ Api errors are rescued and their messages displayed for you to read. No more `b
311
330
  [--cvc | --card-cvc=CARD_CVC] # Three or four digit security code located on the back of card
312
331
  [--name | --card-name=CARD_NAME] # Cardholder's full name as displayed on card
313
332
  [--account | --bank-account=key:value] # hash of account params. params may also be provided individually or added interactively.
314
- [--country=COUNTRY]
315
- [--routing-number=ROUTING_NUMBER]
316
- [--account-number=ACCOUNT_NUMBER]
333
+ [--country=COUNTRY] # country of bank account. currently supports 'US' only
334
+ [--routing-number=ROUTING_NUMBER] # ACH routing number for bank account
335
+ [--account-number=ACCOUNT_NUMBER] #
336
+
337
+ create a new token of type TYPE(card or account)
317
338
 
318
339
  #### Token Find
319
340
 
320
341
  Usage:
321
342
  stripe token find ID
322
343
 
323
-
344
+ Find a Token
324
345
  ### Cards
325
346
 
326
347
  Commands:
@@ -344,13 +365,17 @@ Api errors are rescued and their messages displayed for you to read. No more `b
344
365
  [--name | --card-name=CARD_NAME] # Cardholder's full name as displayed on card
345
366
  --customer, --recipient, --owner=OWNER # id of customer or recipient receiving new card
346
367
 
368
+ create a new card for OWNER (customer or recipient)
369
+
347
370
  #### Card Delete
348
371
 
349
372
  Usage:
350
373
  stripe card delete ID --owner=OWNER
351
374
 
352
375
  Options:
353
- --owner=OWNER # id of customer or recipient to search within
376
+ --owner=OWNER # id of customer or recipient to search within
377
+
378
+ delete ID card for OWNER (customer or recipient)
354
379
 
355
380
  #### Card Find
356
381
 
@@ -358,7 +383,9 @@ Api errors are rescued and their messages displayed for you to read. No more `b
358
383
  stripe card find ID --owner=OWNER
359
384
 
360
385
  Options:
361
- --owner=OWNER # id of customer or recipient to search within
386
+ --owner=OWNER # id of customer or recipient to search within
387
+
388
+ find ID card for OWNER (customer or recipient)
362
389
 
363
390
  #### Cards List
364
391
 
@@ -373,6 +400,8 @@ Api errors are rescued and their messages displayed for you to read. No more `b
373
400
  [--count=COUNT] # depricated: use limit
374
401
  --owner=OWNER # id of customer or recipient to search within
375
402
 
403
+ List cards for OWNER (customer or recipient)
404
+
376
405
  ### Customers
377
406
 
378
407
  Commands:
@@ -403,16 +432,22 @@ Api errors are rescued and their messages displayed for you to read. No more `b
403
432
  [--name | --card-name=CARD_NAME] # Cardholder's full name as displayed on card
404
433
  [--metadata=key:value] # a key/value store of additional user-defined data
405
434
 
435
+ Create a new customer
436
+
406
437
  #### Customer Delete
407
438
 
408
439
  Usage:
409
440
  stripe customer delete ID
410
441
 
442
+ Delete a customer
443
+
411
444
  #### Customer Find
412
445
 
413
446
  Usage:
414
447
  stripe customer find ID
415
448
 
449
+ Find a customer
450
+
416
451
  #### Customers List
417
452
 
418
453
  Usage:
@@ -425,6 +460,8 @@ Api errors are rescued and their messages displayed for you to read. No more `b
425
460
  [--offset=OFFSET] # the starting index to be used, relative to the entire list
426
461
  [--count=COUNT] # depricated: use limit
427
462
 
463
+ List customers
464
+
428
465
 
429
466
  ### Subscriptions
430
467
 
@@ -442,9 +479,10 @@ Api errors are rescued and their messages displayed for you to read. No more `b
442
479
  stripe subscription cancel ID c, --customer=CUSTOMER
443
480
 
444
481
  Options:
445
- [--at-period-end], [--no-at-period-end] # delay cancellation until end of current period
446
- # default: false
447
- c, --customer=CUSTOMER # id of customer to search within
482
+ [--at-period-end], [--no-at-period-end] # delay cancellation until end of current period, default: false
483
+ c, --customer=CUSTOMER # ID of customer who's subscription we want to cancel
484
+
485
+ cancel ID subscription for CUSTOMER customer
448
486
 
449
487
  #### Subscription Create
450
488
 
@@ -462,57 +500,69 @@ Api errors are rescued and their messages displayed for you to read. No more `b
462
500
  [--cvc | --card-cvc=CARD_CVC] # Three or four digit security code located on the back of card
463
501
  [--name | --card-name=CARD_NAME] # Cardholder's full name as displayed on card
464
502
  [--metadata=key:value] # a key/value store of additional user-defined data
465
- c, --customer=CUSTOMER # ID of customer receiving the new subscription
503
+ -c, --customer=CUSTOMER # ID of customer receiving the new subscription
504
+
505
+ create a subscription for CUSTOMER customer
466
506
 
467
507
  #### Subscription Find
468
508
 
469
509
  Usage:
470
- stripe subscription find ID c, --customer=CUSTOMER
510
+ stripe subscription find ID -c, --customer=CUSTOMER
471
511
 
472
512
  Options:
473
- c, --customer=CUSTOMER # ID of customer to search within
513
+ -c, --customer=CUSTOMER # ID of customer to search within
514
+
515
+ find ID subscription for CUSTOMER customer
474
516
 
475
517
  #### Subscriptions List
476
518
 
477
519
  Usage:
478
- stripe subscriptions list c, --customer=CUSTOMER
520
+ stripe subscriptions list -c, --customer=CUSTOMER
479
521
 
480
522
  Options:
481
- [--starting-after=STARTING_AFTER] # The ID of the last object in the previous paged result set. For cursor-based pagination.
482
- [--ending-before=ENDING_BEFORE] # The ID of the first object in the previous paged result set, when paging backwards through the list.
483
- [--limit=LIMIT] # a limit on the number of resources returned, between 1 and 100
484
- [--offset=OFFSET] # the starting index to be used, relative to the entire list
485
- [--count=COUNT] # depricated: use limit
486
- c, --customer=CUSTOMER # ID of customer to search within
523
+ [--starting-after=STARTING_AFTER] # The ID of the last object in the previous paged result set. For cursor-based pagination.
524
+ [--ending-before=ENDING_BEFORE] # The ID of the first object in the previous paged result set, when paging backwards through the list.
525
+ [--limit=LIMIT] # a limit on the number of resources returned, between 1 and 100
526
+ [--offset=OFFSET] # the starting index to be used, relative to the entire list
527
+ [--count=COUNT] # depricated: use limit
528
+ -c, --customer=CUSTOMER # ID of customer who's subscriptions we want to list
529
+
530
+ List subscriptions for CUSTOMER customer
487
531
 
488
532
  #### Subscription Reactivate
489
533
 
490
534
  Usage:
491
- stripe subscription reactivate ID c, --customer=CUSTOMER
535
+ stripe subscription reactivate ID -c, --customer=CUSTOMER
492
536
 
493
537
  Options:
494
- c, --customer=CUSTOMER # id of customer to search within
538
+ -c, --customer=CUSTOMER # ID of customer who's subscription we want to reactivate
539
+
540
+ reactivate auto-renewal if `cancel-at-period-end` was set to true
495
541
 
496
542
  ### Invoices
497
543
 
498
544
  Commands:
499
- stripe invoices close ID # Close an unpaid invoice
500
- stripe invoices find ID # Find an invoice
501
- stripe invoices help [COMMAND] # Describe subcommands or one specific subcommand
502
- stripe invoices list # List invoices (optionally by customer_id)
503
- stripe invoices pay ID # trigger an open invoice to be paid immediately
504
- stripe invoices upcoming CUSTOMER # find the upcoming invoice for CUSTOMER
545
+ stripe invoices close ID # Close an unpaid invoice
546
+ stripe invoices find ID # Find an invoice
547
+ stripe invoices help [COMMAND] # Describe subcommands or one specific subcommand
548
+ stripe invoices list # List invoices (optionally by customer_id)
549
+ stripe invoices pay ID # trigger an open invoice to be paid immediately
550
+ stripe invoices upcoming CUSTOMER # find the upcoming invoice for CUSTOMER
505
551
 
506
552
  #### Invoice Close
507
553
 
508
554
  Usage:
509
555
  stripe invoice close ID
510
556
 
557
+ close an unpaid invoice
558
+
511
559
  #### Invoice Find
512
560
 
513
561
  Usage:
514
562
  stripe invoice find ID
515
563
 
564
+ Find an invoice
565
+
516
566
  #### Invoices List
517
567
 
518
568
  Usage:
@@ -526,16 +576,21 @@ Api errors are rescued and their messages displayed for you to read. No more `b
526
576
  [--count=COUNT] # depricated: use limit
527
577
  [--customer=CUSTOMER] # a customer ID to filter results by
528
578
 
579
+ List invoices (optionally by customer_id)
580
+
529
581
  #### Invoice Pay
530
582
 
531
583
  Usage:
532
584
  stripe invoice pay ID
533
585
 
586
+ trigger an open invoice to be paid immediately
587
+
534
588
  #### Invoice Upcoming
535
589
 
536
590
  Usage:
537
591
  stripe invoice upcoming CUSTOMER
538
592
 
593
+ find the upcoming invoice for CUSTOMER
539
594
 
540
595
  ### Plans
541
596
 
@@ -548,124 +603,336 @@ Api errors are rescued and their messages displayed for you to read. No more `b
548
603
 
549
604
  #### Plan Create
550
605
 
606
+ Usage:
607
+ stripe plans create
608
+
609
+ Options:
610
+ [--name=NAME] # Name displayed on invoices and in the Dashboard
611
+ [--id=ID] # Unique name used to identify this plan when subscribing a customer
612
+ [--amount=N] # Amount in dollars (or cents when --no-dollar-amounts)
613
+ [--interval=INTERVAL] # Billing frequency
614
+ # Possible values: day, week, month, year
615
+ # Default: month
616
+ [--interval-count=N] # The number of intervals between each subscription billing.
617
+ # Default: 1
618
+ [--currency=CURRENCY] # 3-letter ISO code for currency
619
+ # Default: usd
620
+ [--trial-period-days=N] # Number of days to delay a customer's initial bill
621
+ # Default: 0
622
+ [--metadata=key:value] # a key/value store of additional user-defined data
623
+
624
+
625
+ Create a new plan
551
626
 
552
627
  #### Plan Delete
553
628
 
629
+ Usage:
630
+ stripe plans delete ID
631
+
632
+ Delete a plan
554
633
 
555
634
  #### Plan Find
556
635
 
636
+ Usage:
637
+ stripe plans find ID
638
+
639
+ Find a plan
557
640
 
558
641
  #### Plans List
559
642
 
560
643
 
644
+ Usage:
645
+ stripe plans list
646
+
647
+ Options:
648
+ [--starting-after=STARTING_AFTER] # The ID of the last object in the previous paged result set. For cursor-based pagination.
649
+ [--ending-before=ENDING_BEFORE] # The ID of the first object in the previous paged result set, when paging backwards through the list.
650
+ [--limit=LIMIT] # a limit on the number of resources returned, between 1 and 100
651
+ [--offset=OFFSET] # the starting index to be used, relative to the entire list
652
+ [--count=COUNT] # depricated: use limit
653
+
654
+ List plans
561
655
 
562
656
  ### Coupons
563
657
 
564
658
  Commands:
565
- stripe coupons create # Create a new Coupon
566
- stripe coupons delete ID # Delete a coupon
567
- stripe coupons find ID # Find a coupon
568
- stripe coupons help [COMMAND] # Describe subcommands or one specific subcommand
569
- stripe coupons list # List coupons
659
+ stripe coupons create # Create a new Coupon
660
+ stripe coupons delete ID # Delete a coupon
661
+ stripe coupons find ID # Find a coupon
662
+ stripe coupons help [COMMAND] # Describe subcommands or one specific subcommand
663
+ stripe coupons list # List coupons
570
664
 
571
665
  #### Coupon Create
572
666
 
667
+ Usage:
668
+ stripe coupon create
669
+
670
+ Options:
671
+ [--id=ID] # Unique name to identify this coupon
672
+ [--percent-off=N] # a discount of this percentage of the subtotal
673
+ [--amount-off=N] # a discount of this amount. Regardless of the subtotal
674
+ [--duration=DURATION] # describes how long to apply the discount
675
+ # Possible values: forever, once, repeating
676
+ [--redeem-by=REDEEM_BY] # last acceptable date to redeem coupon.
677
+ [--max-redemptions=N] # The maximum number of times this coupon may be redeemed
678
+ [--duration-in-months=DURATION_IN_MONTHS] # number of months to apply the discount. *Only if `duration` is `repeating`
679
+ [--currency=CURRENCY] # 3-letter ISO code for currency
680
+ # Default: usd
681
+ [--metadata=key:value] # a key/value store of additional user-defined data
682
+
683
+ Create a new Coupon
573
684
 
574
685
  #### Coupon Delete
575
686
 
687
+ Usage:
688
+ stripe coupon delete ID
689
+
690
+ Delete a coupon
576
691
 
577
692
  #### Coupon Find
578
693
 
694
+ Usage:
695
+ stripe coupon find ID
696
+
697
+ Find a coupon
579
698
 
580
699
  #### Coupons List
581
700
 
701
+ Usage:
702
+ stripe coupons list
582
703
 
704
+ Options:
705
+ [--starting-after=STARTING_AFTER] # The ID of the last object in the previous paged result set. For cursor-based pagination.
706
+ [--ending-before=ENDING_BEFORE] # The ID of the first object in the previous paged result set, when paging backwards through the list.
707
+ [--limit=LIMIT] # a limit on the number of resources returned, between 1 and 100
708
+ [--offset=OFFSET] # the starting index to be used, relative to the entire list
709
+ [--count=COUNT] # depricated: use limit
710
+
711
+ List coupons
583
712
 
584
713
  ### Events
585
714
 
586
715
  Commands:
587
- stripe events find ID # Find a event
588
- stripe events help [COMMAND] # Describe subcommands or one specific subcommand
589
- stripe events list # List events
716
+ stripe events find ID # Find a event
717
+ stripe events help [COMMAND] # Describe subcommands or one specific subcommand
718
+ stripe events list # List events
590
719
 
591
720
  #### Event Find
592
721
 
722
+ Usage:
723
+ stripe event find ID
724
+
725
+ Find a event
593
726
 
594
727
  #### Events List
595
728
 
729
+ Usage:
730
+ stripe events list
731
+
732
+ Options:
733
+ [--starting-after=STARTING_AFTER] # The ID of the last object in the previous paged result set. For cursor-based pagination.
734
+ [--ending-before=ENDING_BEFORE] # The ID of the first object in the previous paged result set, when paging backwards through the list.
735
+ [--limit=LIMIT] # a limit on the number of resources returned, between 1 and 100
736
+ [--offset=OFFSET] # the starting index to be used, relative to the entire list
737
+ [--count=COUNT] # depricated: use limit
738
+ [--object-id=OBJECT_ID] # only list events pertaining to the object with this ID
739
+ [--type=TYPE] # only list events of type TYPE
596
740
 
741
+ List events
597
742
 
598
743
  ### BalanceTransactions
599
744
 
600
745
  Commands:
601
- stripe transactions find ID # Find a transaction
602
- stripe transactions help [COMMAND] # Describe subcommands or one specific subcommand
603
- stripe transactions list [TYPE] # List transactions, optionaly filter by type:(charge refund adjustment application_fee application_fee_refund transfer transfer_failure)
746
+ stripe transactions find ID # Find a transaction
747
+ stripe transactions help [COMMAND] # Describe subcommands or one specific subcommand
748
+ stripe transactions list [TYPE] # List transactions, optionaly filter by type:(charge refund adjustment application_fee application_fee_refund transfer transfer_failure)
604
749
 
605
750
  #### Transaction Find
606
751
 
752
+ Usage:
753
+ stripe transaction find ID
754
+
755
+ Find a transaction
607
756
 
608
757
  #### Transactions List
609
758
 
759
+ Usage:
760
+ stripe transactions list [TYPE]
761
+
762
+ Options:
763
+ [--starting-after=STARTING_AFTER] # The ID of the last object in the previous paged result set. For cursor-based pagination.
764
+ [--ending-before=ENDING_BEFORE] # The ID of the first object in the previous paged result set, when paging backwards through the list.
765
+ [--limit=LIMIT] # a limit on the number of resources returned, between 1 and 100
766
+ [--offset=OFFSET] # the starting index to be used, relative to the entire list
767
+ [--count=COUNT] # depricated: use limit
768
+ [--type=TYPE] # Possible values: charge, refund, adjustment, application_fee,
769
+ [--source=SOURCE] # ...application_fee_refund, transfer, transfer_failure, or all(by default)
610
770
 
771
+ List transactions, optionaly filter by TYPE or SOURCE
611
772
 
612
773
  ### Recipients
613
774
 
614
775
  Commands:
615
- stripe recipients create # Create a new recipient
616
- stripe recipients delete ID # Delete a recipient
617
- stripe recipients find ID # Find a recipient
618
- stripe recipients help [COMMAND] # Describe subcommands or one specific subcommand
619
- stripe recipients list # List recipients
776
+ stripe recipients create # Create a new recipient
777
+ stripe recipients delete ID # Delete a recipient
778
+ stripe recipients find ID # Find a recipient
779
+ stripe recipients help [COMMAND] # Describe subcommands or one specific subcommand
780
+ stripe recipients list # List recipients
620
781
 
621
782
  #### Recipient Create
622
783
 
784
+ Usage:
785
+ stripe recipients create
786
+
787
+ Options:
788
+ [--name=NAME] # Full legal name of Individual or Corporation
789
+ [--type=TYPE] # recipient type, Possible values: individual, corporation
790
+ -i, [--individual], [--no-individual] # flag specifying recipient should be of type Individual
791
+ -c, [--corporation], [--no-corporation] # flag specifying recipient should be of type Corporation
792
+ [--tax-id=N] # Full SSN for individuals or full EIN for corporations
793
+ [--email=EMAIL] # Recipient's email address
794
+ [--description=DESCRIPTION] # Arbitrary description of recipient
795
+ [--account | --bank-account=BANK_ACCOUNT] # dictionary of bank account attributes as 'key':'value' pairs
796
+ [--country=COUNTRY] # country of bank account. currently supports 'US' only
797
+ [--account-number=ACCOUNT_NUMBER] # account number of bank account. Must be a checking account
798
+ [--routing-number=ROUTING_NUMBER] # ACH routing number for bank account
799
+ [--token | --card=CARD] # credit card Token or ID. May also be created interactively.
800
+ [--number | --card-number=CARD_NUMBER] # credit card number. usually 16 digits long
801
+ [--exp-month | --card-exp-month=CARD_EXP_MONTH] # Two digit expiration month of card
802
+ [--exp-year | --card-exp-year=CARD_EXP_YEAR] # Four digit expiration year of card
803
+ [--cvc | --card-cvc=CARD_CVC] # Three or four digit security code located on the back of card
804
+ [--card-name=CARD_NAME] # Cardholder's full name as displayed on card
805
+ [--metadata=key:value] # a key/value store of additional user-defined data
806
+
807
+ create a new recipient. Either an Individual or a Corporation.
623
808
 
624
809
  #### Recipient Delete
625
810
 
811
+ Usage:
812
+ stripe recipients delete ID
813
+
814
+ delete a recipient
626
815
 
627
816
  #### Recipient Find
628
817
 
818
+ Usage:
819
+ stripe recipients find ID
820
+
821
+ Find a recipient
629
822
 
630
823
  #### Recipients List
631
824
 
825
+ Usage:
826
+ stripe recipients list
827
+
828
+ Options:
829
+ [--starting-after=STARTING_AFTER] # The ID of the last object in the previous paged result set. For cursor-based pagination.
830
+ [--ending-before=ENDING_BEFORE] # The ID of the first object in the previous paged result set, when paging backwards through the list.
831
+ [--limit=LIMIT] # a limit on the number of resources returned, between 1 and 100
832
+ [--offset=OFFSET] # the starting index to be used, relative to the entire list
833
+ [--count=COUNT] # depricated: use limit
834
+ [--verified], [--no-verified] # Only return recipients that are verified or unverified
632
835
 
836
+ List recipients
633
837
 
634
838
  ### Refunds
635
839
 
636
- Though ```refund``` is still a supported operation of the ```charges``` command. The ```refunds``` command offers additional functionality.
840
+ Though `refund` is still a supported operation of the `charges` command. The `refunds` command offers additional functionality.
637
841
 
638
842
  Commands:
639
- stripe refunds create --charge=CHARGE # apply a new refund to CHARGE charge
640
- stripe refunds find ID --charge=CHARGE # Find ID refund of CHARGE charge
641
- stripe refunds help [COMMAND] # Describe subcommands or one specific subcommand
642
- stripe refunds list --charge=CHARGE # List refunds for CHARGE charge
843
+ stripe refunds create --charge=CHARGE # apply a new refund to CHARGE charge
844
+ stripe refunds find ID --charge=CHARGE # Find ID refund of CHARGE charge
845
+ stripe refunds help [COMMAND] # Describe subcommands or one specific subcommand
846
+ stripe refunds list --charge=CHARGE # List refunds for CHARGE charge
643
847
 
644
848
  #### Refund Create
645
849
 
850
+ Usage:
851
+ stripe refunds create -c, --charge=CHARGE
852
+
853
+ Options:
854
+ [--amount=N] # Refund amount in dollars. (or cents when --no-dollar-amounts) defaults to entire charged amount
855
+ [--refund-application-fee], # or,
856
+ [--no-refund-application-fee] # Whether or not to refund the application fee
857
+ [--metadata=key:value] # a key/value store of additional user-defined data
858
+ -c, --charge=CHARGE # Id of charge to apply refund
859
+
860
+ apply a new refund to CHARGE charge
646
861
 
647
862
  #### Refund Find
648
863
 
864
+ Usage:
865
+ stripe refunds find ID -c, --charge=CHARGE
866
+
867
+ Options:
868
+ -c, --charge=CHARGE # Id of charge to search
869
+
870
+ Find ID refund of CHARGE charge
649
871
 
650
872
  #### Refunds List
651
873
 
874
+ Usage:
875
+ stripe refunds list -c, --charge=CHARGE
876
+
877
+ Options:
878
+ [--starting-after=STARTING_AFTER] # The ID of the last object in the previous paged result set. For cursor-based pagination.
879
+ [--ending-before=ENDING_BEFORE] # The ID of the first object in the previous paged result set, when paging backwards through the list.
880
+ [--limit=LIMIT] # a limit on the number of resources returned, between 1 and 100
881
+ [--offset=OFFSET] # the starting index to be used, relative to the entire list
882
+ [--count=COUNT] # depricated: use limit
883
+ -c, --charge=CHARGE # Id of charge to search within
652
884
 
885
+ List refunds for CHARGE charge
653
886
 
654
887
  ### Transfers
655
888
 
656
889
  Commands:
657
- stripe transfers create # Create a new outgoing money transfer
658
- stripe transfers find ID # Find a transfer
659
- stripe transfers help [COMMAND] # Describe subcommands or one specific subcommand
660
- stripe transfers list # List transfers, optionaly filter by recipient or transfer status: ( pending paid failed )
890
+ stripe transfers create # Create a new outgoing money transfer
891
+ stripe transfers find ID # Find a transfer
892
+ stripe transfers help [COMMAND] # Describe subcommands or one specific subcommand
893
+ stripe transfers list # List transfers, optionaly filter by recipient or transfer status: ( pending paid failed )
661
894
 
662
895
  #### Transfer Create
663
896
 
897
+ Usage:
898
+ stripe transfers create
899
+
900
+ Options:
901
+ [--amount=AMOUNT] # transfer amount in dollars (or cents when --no-dollar-amounts)
902
+ [--recipient=RECIPIENT] # ID of transfer recipient. May also be created interactively.
903
+ [--currency=CURRENCY] # Default: usd
904
+ [--description=DESCRIPTION] # Arbitrary description of transfer
905
+ [--statement_description=STATEMENT_DESCRIPTION] # Displayed alongside your company name on your customer's card statement (15 character max)
906
+ [--balance], [--no-balance] # Sugar for specifying that amount should be equal to current balance
907
+ [--self], [--no-self] # Sugar for specifying a transfer into your own account
908
+ [--metadata=key:value] # A key/value store of additional user-defined data
909
+
910
+ create a new outgoing money transfer
911
+
664
912
  #### Transfer Find
665
913
 
914
+ Usage:
915
+ stripe transfers find ID
916
+
917
+ Find a transfer
918
+
666
919
  #### Transfers List
667
920
 
668
- #### Easter Egg
921
+ Usage:
922
+ stripe transfers list
923
+
924
+ Options:
925
+ [--starting-after=STARTING_AFTER] # The ID of the last object in the previous paged result set. For cursor-based pagination.
926
+ [--ending-before=ENDING_BEFORE] # The ID of the first object in the previous paged result set, when paging backwards through the list.
927
+ [--limit=LIMIT] # a limit on the number of resources returned, between 1 and 100
928
+ [--offset=OFFSET] # the starting index to be used, relative to the entire list
929
+ [--count=COUNT] # depricated: use limit
930
+ [--recipient=RECIPIENT] # limit result set to RECIPIENT's transfers
931
+ [--status=STATUS] # filter by transfer status. Possible values: pending, paid, failed
932
+
933
+ List transfers, optionaly filter by recipient or transfer status: ( pending paid failed )
934
+
935
+ #### Transfer Tip:
669
936
 
670
937
  You can pass the `--balance` flag into `transfer create` to automatically set transfer `amount` equal to your currently available balance.
671
938
 
@@ -674,9 +941,21 @@ example:
674
941
  $ stripe transfer create --balance --recipient=self
675
942
 
676
943
 
944
+ #### Workflow Tip:
945
+
946
+ Stripe-CLI now tweeks the user-agent header sent with every request.
947
+
948
+ This adds context to request data as its viewed using the Stripe Dashboard.
949
+
950
+ It helps in differentiating requests made by application code from those made using the Stripe-CLI gem, which can be helpful, for example when trying to find the source of a phantom API request.
951
+
952
+ Here is an example of what this looks like in the Stripe Dashboard...
953
+
954
+ ![user-agent](./user-agent.png)
955
+
956
+
677
957
  ## Road Map
678
958
 
679
- 1. complete command documentation in this readme
680
959
  1. `update` command operations
681
960
  1. support for `disputes` & dispute handling
682
961
  1. support creating/updating config file through cli
@@ -1,5 +1,14 @@
1
1
  # Stripe-CLI Project Change Log
2
2
 
3
+ ## 1.6.4 - 2014-08-09
4
+
5
+ - better descriptions for ALL operations
6
+ - Bug fix
7
+ - update `transfers` command options
8
+ - `--statement-description`
9
+ - `--bank-account`
10
+ - `--card`
11
+
3
12
  ## 1.6.3
4
13
 
5
14
  - new `dollar_amounts` config setting for toggling expected currency units between **dollars** and **cents**
@@ -6,10 +6,10 @@ module Stripe
6
6
  @@root_config = ::File.expand_path('~/.stripecli')
7
7
  @@local_config = ::File.expand_path('./.stripecli')
8
8
 
9
- class_option :key, :aliases => :k
10
- class_option :env, :aliases => :e
11
- class_option :version, :aliases => :v
12
- class_option :dollar_amounts, :type => :boolean
9
+ class_option :key, :aliases => :k, :desc => "One of your API secret keys, provided by Stripe"
10
+ class_option :env, :aliases => :e, :desc => "This param expects a ~/.stripecli file with section headers for any string passed into it"
11
+ class_option :version, :aliases => :v, :desc => "Stripe API version-date. Looks like `YYYY-MM-DD`"
12
+ class_option :dollar_amounts, :type => :boolean, :desc => "set expected currency units to dollars or cents"
13
13
 
14
14
  protected
15
15
 
@@ -26,10 +26,8 @@ module Stripe
26
26
  end
27
27
 
28
28
  def dollar_amounts
29
- convert_amount_to_dollars = options.delete(:dollar_amounts)
30
- convert_amount_to_dollars.nil? ?
31
- stored_api_option('dollar_amounts') == 'false' ?
32
- false : true : convert_amount_to_dollars
29
+ param_option = options.delete(:dollar_amounts)
30
+ param_option.nil? ? stored_api_option('dollar_amounts') == 'false' ? false : true : param_option
33
31
  end
34
32
 
35
33
  def stored_api_option option
@@ -75,12 +73,6 @@ module Stripe
75
73
  end
76
74
  end
77
75
 
78
- private
79
-
80
- def output objects
81
- ap inspect( objects ), :indent => -2
82
- end
83
-
84
76
  def inspect object
85
77
  case object
86
78
  when Array
@@ -97,6 +89,13 @@ module Stripe
97
89
  object
98
90
  end
99
91
  end
92
+ public :inspect
93
+
94
+ private
95
+
96
+ def output objects
97
+ ap inspect( objects ), :indent => -2
98
+ end
100
99
 
101
100
  def handle_hash object
102
101
  object.inject({}) do |hash, (key, value)|
@@ -10,7 +10,7 @@ module Stripe
10
10
  option :limit, :desc => "a limit on the number of resources returned, between 1 and 100"
11
11
  option :offset, :desc => "the starting index to be used, relative to the entire list"
12
12
  option :count, :desc => "depricated: use limit"
13
- option :customer, :desc => "a customer ID to filter results by"
13
+ option :customer, :desc => "ID of customer who's charges we want to list"
14
14
  def list
15
15
  super Stripe::Charge, options
16
16
  end
@@ -21,7 +21,7 @@ module Stripe
21
21
  end
22
22
 
23
23
  desc "refund ID", "Refund a charge"
24
- option :amount, :type => :numeric, :desc => "Refund amount in dollars. (Entire charge by default)"
24
+ option :amount, :type => :numeric, :desc => "Refund amount in dollars. (or cents when --no-dollar-amounts) defaults to entire charge"
25
25
  option :metadata, :type => :hash, :desc => "a key/value store of additional user-defined data"
26
26
  option :refund_application_fee, :type => :boolean, :default => false, :desc => "Whether or not to refund the application fee"
27
27
  def refund charge_id
@@ -44,7 +44,7 @@ module Stripe
44
44
  option :card_exp_year, :aliases => "--exp-year", :desc => "Four digit expiration year of card"
45
45
  option :card_cvc, :aliases => "--cvc", :desc => "Three or four digit security code located on the back of card"
46
46
  option :card_name, :aliases => "--name", :desc => "Cardholder's full name as displayed on card"
47
- option :amount, :type => :numeric, :desc => "Charge amount in dollars"
47
+ option :amount, :type => :numeric, :desc => "Charge amount in dollars (or cents when --no-dollar-amounts)"
48
48
  option :currency, :default => "usd", :desc => "3-letter ISO code for currency"
49
49
  option :description, :desc => "Arbitrary description of charge"
50
50
  option :capture, :type => :boolean, :default => true, :desc => "Whether or not to immediately capture the charge. Uncaptured charges expire in 7 days"
@@ -25,14 +25,14 @@ module Stripe
25
25
  end
26
26
 
27
27
  desc "create", "Create a new Coupon"
28
- option :id
29
- option :percent_off, :type => :numeric
30
- option :amount_off, :type => :numeric
31
- option :duration, :enum => [ :forever, :once, :repeating ]
28
+ option :id, :desc => "Unique name to identify this coupon"
29
+ option :percent_off, :type => :numeric, :desc => "a discount of this percentage of the total amount due"
30
+ option :amount_off, :type => :numeric, :desc => "a discount of this amount. Regardless of the total due"
31
+ option :duration, :enum => %w( forever once repeating ), :desc => "describes how long to apply the discount"
32
32
  option :redeem_by, :desc => "coupon will no longer be accepted after this date."
33
- option :max_redemptions, :type => :numeric
34
- option :duration_in_months
35
- option :currency, :default => 'usd'
33
+ option :max_redemptions, :type => :numeric, :desc => "The maximum number of times this coupon may be redeemed"
34
+ option :duration_in_months, :desc => "number of months to apply the discount. *Only if `duration` is `repeating`*"
35
+ option :currency, :default => 'usd', :desc => "3-letter ISO code for currency"
36
36
  option :metadata, :type => :hash, :desc => "a key/value store of additional user-defined data"
37
37
  def create
38
38
  unless options[:percent_off] || options[:amount_off]
@@ -57,4 +57,4 @@ module Stripe
57
57
  end
58
58
  end
59
59
  end
60
- end
60
+ end
@@ -9,7 +9,7 @@ module Stripe
9
9
  option :limit, :desc => "a limit on the number of resources returned, between 1 and 100"
10
10
  option :offset, :desc => "the starting index to be used, relative to the entire list"
11
11
  option :count, :desc => "depricated: use limit"
12
- option :customer, :desc => "a customer ID to filter results by"
12
+ option :customer, :desc => "ID of customer who's invoices we want to list"
13
13
  def list
14
14
  super Stripe::Invoice, options
15
15
  end
@@ -27,10 +27,10 @@ module Stripe
27
27
  desc "create", "Create a new plan"
28
28
  option :name, :desc => "Name displayed on invoices and in the Dashboard"
29
29
  option :id, :desc => "Unique name used to identify this plan when subscribing a customer"
30
- option :amount, :type => :numeric, :desc => "Amount in dollars"
30
+ option :amount, :type => :numeric, :desc => "Amount in dollars (or cents when --no-dollar-amounts)"
31
31
  option :interval, :enum => %w( day week month year ), :default => "month", :desc => "Billing frequency"
32
32
  option :interval_count, :type => :numeric, :default => 1, :desc => "The number of intervals between each subscription billing."
33
- option :currency, :default => "usd"
33
+ option :currency, :default => "usd", :desc => "3-letter ISO code for currency"
34
34
  option :trial_period_days, :type => :numeric, :default => 0, :desc => "Number of days to delay a customer's initial bill"
35
35
  option :metadata, :type => :hash, :desc => "a key/value store of additional user-defined data"
36
36
  def create
@@ -10,7 +10,7 @@ module Stripe
10
10
  option :limit, :desc => "a limit on the number of resources returned, between 1 and 100"
11
11
  option :offset, :desc => "the starting index to be used, relative to the entire list"
12
12
  option :count, :desc => "depricated: use limit"
13
- option :verified => :boolean
13
+ option :verified, :type => :boolean, :desc => "Only return recipients that are verified or unverified"
14
14
  def list
15
15
  super Stripe::Recipient, options
16
16
  end
@@ -30,13 +30,13 @@ module Stripe
30
30
  option :type, :enum => %w( individual corporation ), :desc => "recipient type,"
31
31
  option :individual, :type => :boolean, :aliases => :i, :desc => "flag specifying recipient should be of type Individual"
32
32
  option :corporation, :type => :boolean, :aliases => :c, :desc => "flag specifying recipient should be of type Corporation"
33
- option :tax_id, :type => :numeric
34
- option :email
35
- option :description
36
- option :bank_account, :aliases => "--account"
37
- option :country
38
- option :account_number
39
- option :routing_number
33
+ option :tax_id, :type => :numeric, :desc => "Full SSN for individuals or full EIN for corporations"
34
+ option :email, :desc => "Recipient's email address"
35
+ option :description, :desc => "Arbitrary description of recipient"
36
+ option :bank_account, :aliases => "--account", :desc => "dictionary of bank account attributes as 'key':'value' pairs"
37
+ option :country, :desc => "country of bank account. currently supports 'US' only"
38
+ option :account_number, :desc => "account number of bank account. Must be a checking account"
39
+ option :routing_number, :desc => "ACH routing number for bank account"
40
40
  option :card, :aliases => "--token", :desc => "credit card Token or ID. May also be created interactively."
41
41
  option :card_number, :aliases => "--number", :desc => "credit card number. usually 16 digits long"
42
42
  option :card_exp_month, :aliases => "--exp-month", :desc => "Two digit expiration month of card"
@@ -10,7 +10,7 @@ module Stripe
10
10
  option :limit, :desc => "a limit on the number of resources returned, between 1 and 100"
11
11
  option :offset, :desc => "the starting index to be used, relative to the entire list"
12
12
  option :count, :desc => "depricated: use limit"
13
- option :charge, :aliases => :c, :required => true, :desc => "Id of charge to search within"
13
+ option :charge, :aliases => :c, :required => true, :desc => "Id of charge who's refunds we want to list"
14
14
  def list
15
15
  if charge = retrieve_charge(options.delete :charge)
16
16
  super charge.refunds, options
@@ -18,7 +18,7 @@ module Stripe
18
18
  end
19
19
 
20
20
  desc "find ID", "Find ID refund of CHARGE charge"
21
- option :charge, :aliases => :c, :required => true, :desc => "Id of charge to search"
21
+ option :charge, :aliases => :c, :required => true, :desc => "Id of charge who's refund we want to find"
22
22
  def find refund_id
23
23
  if charge = retrieve_charge(options.delete :charge)
24
24
  super charge.refunds, refund_id
@@ -26,7 +26,7 @@ module Stripe
26
26
  end
27
27
 
28
28
  desc "create", "apply a new refund to CHARGE charge"
29
- option :amount, :type => :numeric, :desc => "Refund amount in dollars. (Entire charge by default)"
29
+ option :amount, :type => :numeric, :desc => "Refund amount in dollars. (or cents when --no-dollar-amounts) defaults to entire charged amount"
30
30
  option :metadata, :type => :hash, :desc => "a key/value store of additional user-defined data"
31
31
  option :refund_application_fee, :type => :boolean, :default => false, :desc => "Whether or not to refund the application fee"
32
32
  option :charge, :aliases => :c, :required => true, :desc => "Id of charge to apply refund"
@@ -11,7 +11,7 @@ module Stripe
11
11
  option :limit, :desc => "a limit on the number of resources returned, between 1 and 100"
12
12
  option :offset, :desc => "the starting index to be used, relative to the entire list"
13
13
  option :count, :desc => "depricated: use limit"
14
- option :customer, :aliases => :c, :required => true, :desc => "ID of customer to search within"
14
+ option :customer, :aliases => :c, :required => true, :desc => "ID of customer who's subscriptions we want to list"
15
15
  def list
16
16
  if cust = retrieve_customer(options.delete :customer)
17
17
  super cust.subscriptions, options
@@ -19,7 +19,7 @@ module Stripe
19
19
  end
20
20
 
21
21
  desc "find ID", "find ID subscription for CUSTOMER customer"
22
- option :customer, :aliases => :c, :required => true, :desc => "ID of customer to search within"
22
+ option :customer, :aliases => :c, :required => true, :desc => "ID of customer who's subscription we want to find"
23
23
  def find subscription_id
24
24
  if cust = retrieve_customer(options.delete :customer)
25
25
  super cust.subscriptions, subscription_id
@@ -53,7 +53,7 @@ module Stripe
53
53
 
54
54
  desc "cancel ID", "cancel ID subscription for CUSTOMER customer"
55
55
  option :at_period_end, :type => :boolean, :default => false, :desc => "delay cancellation until end of current period"
56
- option :customer, :aliases => :c, :required => true, :desc => "id of customer to search within"
56
+ option :customer, :aliases => :c, :required => true, :desc => "ID of customer who's subscription we want to cancel"
57
57
  def cancel subscription_id
58
58
  options[:at_period_end] ||= yes?("delay until end of current period? [yN]",:yellow)
59
59
  if cust = retrieve_customer(options.delete :customer) and
@@ -63,7 +63,7 @@ module Stripe
63
63
  end
64
64
 
65
65
  desc "reactivate ID", "reactivate auto-renewal if `cancel-at-period-end` was set to true"
66
- option :customer, :aliases => :c, :required => true, :desc => "id of customer to search within"
66
+ option :customer, :aliases => :c, :required => true, :desc => "ID of customer who's subscription we want to reactivate"
67
67
  def reactivate subscription_id
68
68
  if cust = retrieve_customer(options.delete :customer) and
69
69
  subscription = retrieve_subscription(cust, subscription_id)
@@ -17,9 +17,9 @@ module Stripe
17
17
  option :card_cvc, :aliases => "--cvc", :desc => "Three or four digit security code located on the back of card"
18
18
  option :card_name, :aliases => "--name", :desc => "Cardholder's full name as displayed on card"
19
19
  option :bank_account, :aliases => "--account", :type => :hash, :default => {}, :desc => "hash of account params. may also be provided individually or added interactively."
20
- option :country
21
- option :routing_number
22
- option :account_number
20
+ option :country, :desc => "country of bank account. currently supports 'US' only"
21
+ option :routing_number, :desc => "ACH routing number for bank account"
22
+ option :account_number, :desc => "account number of bank account. Must be a checking account"
23
23
  def create type
24
24
  case type
25
25
  when 'card', 'credit_card', 'credit card'
@@ -22,13 +22,13 @@ module Stripe
22
22
  end
23
23
 
24
24
  desc "create", "create a new outgoing money transfer"
25
- option :amount
26
- option :recipient
25
+ option :amount, :desc => "transfer amount in dollars (or cents when --no-dollar-amounts)"
26
+ option :recipient, :desc => "ID of transfer recipient. May also be created interactively."
27
27
  option :currency, :default => 'usd'
28
- option :description
29
- option :statement_descriptor
30
- option :balance, :type => :boolean
31
- option :self, :type => :boolean
28
+ option :description, :desc => "Arbitrary description of transfer"
29
+ option :statement_description, :desc => "Displayed alongside your company name on your customer's card statement (15 character max)"
30
+ option :balance, :type => :boolean, :desc => "Sugar for specifying that amount should be equal to current balance"
31
+ option :self, :type => :boolean, :desc => "Sugar for specifying a transfer into your own account"
32
32
  option :metadata, :type => :hash, :desc => "a key/value store of additional user-defined data"
33
33
  def create
34
34
  if options.delete(:balance) == true
@@ -13,11 +13,11 @@ module Stripe
13
13
  register Commands::Invoices, 'invoices', 'invoices', 'find, list, pay, & close invoices'
14
14
  register Commands::Transactions, 'transactions', 'transactions', 'find & list balance transactions'
15
15
  register Commands::Balance, 'balance', 'balance', 'show currently available & pending balance amounts'
16
- register Commands::Recipients, 'recipients', 'recipients', 'find, list, create & delete recipients'
16
+ register Commands::Recipients, 'recipients', 'recipients', 'find, list, create, & delete recipients'
17
17
  register Commands::Refunds, 'refunds', 'refunds', 'find, list, & create refunds'
18
18
  register Commands::Subscriptions, 'subscriptions', 'subscriptions', 'find, list, create, cancel & reactivate multiple subscriptions per customer'
19
19
  register Commands::Transfers, 'transfers', 'transfers', 'find, list, & create transfers'
20
- register Commands::Version, 'version', 'version', 'display current gem version', hide: true
20
+ register Commands::Version, 'version', 'version', 'display current gem version', :hide => true
21
21
  end
22
22
  end
23
23
  end
@@ -1,5 +1,5 @@
1
1
  module Stripe
2
2
  module CLI
3
- VERSION = "1.6.3"
3
+ VERSION = "1.6.7"
4
4
  end
5
5
  end
@@ -2,45 +2,45 @@ require 'spec_helper'
2
2
 
3
3
  describe Stripe::CLI::Command do
4
4
 
5
- let(:_id_) { "random-id-string" }
5
+ let(:_id_) { "random-id-string" }
6
6
 
7
- describe "#find" do
8
- it "calls super, passing in `Stripe::Charge` and an `id`" do
9
- Stripe::Charge.should_receive(:retrieve).with( _id_, "stripe-key" )
7
+ describe "#find" do
8
+ it "calls super, passing in `Stripe::Charge` and an `id`" do
9
+ Stripe::Charge.should_receive(:retrieve).with( _id_, "stripe-key" )
10
10
 
11
- Stripe::CLI::Runner.start ["charges", "find", _id_]
12
- end
11
+ Stripe::CLI::Runner.start ["charges", "find", _id_]
12
+ end
13
13
 
14
- it "calls super, passing in `Stripe::Plan` and an `id`" do
15
- Stripe::Plan.should_receive(:retrieve).with( _id_, "stripe-key" )
14
+ it "calls super, passing in `Stripe::Plan` and an `id`" do
15
+ Stripe::Plan.should_receive(:retrieve).with( _id_, "stripe-key" )
16
16
 
17
- Stripe::CLI::Runner.start ["plans", "find", _id_]
18
- end
17
+ Stripe::CLI::Runner.start ["plans", "find", _id_]
18
+ end
19
19
 
20
- it "calls super, passing in `Stripe::Invoice` and an `id`" do
21
- Stripe::Invoice.should_receive(:retrieve).with( _id_, "stripe-key" )
20
+ it "calls super, passing in `Stripe::Invoice` and an `id`" do
21
+ Stripe::Invoice.should_receive(:retrieve).with( _id_, "stripe-key" )
22
22
 
23
- Stripe::CLI::Runner.start ["invoices", "find", _id_]
24
- end
23
+ Stripe::CLI::Runner.start ["invoices", "find", _id_]
24
+ end
25
25
 
26
- it "calls super, passing in `Stripe::Coupon` and an `id`" do
27
- Stripe::Coupon.should_receive(:retrieve).with( _id_, "stripe-key" )
26
+ it "calls super, passing in `Stripe::Coupon` and an `id`" do
27
+ Stripe::Coupon.should_receive(:retrieve).with( _id_, "stripe-key" )
28
28
 
29
- Stripe::CLI::Runner.start ["coupons", "find", _id_]
30
- end
29
+ Stripe::CLI::Runner.start ["coupons", "find", _id_]
30
+ end
31
31
 
32
- it "calls super, passing in `Stripe::Customer` and an `id`" do
33
- Stripe::Customer.should_receive(:retrieve).with( _id_, "stripe-key" )
32
+ it "calls super, passing in `Stripe::Customer` and an `id`" do
33
+ Stripe::Customer.should_receive(:retrieve).with( _id_, "stripe-key" )
34
34
 
35
- Stripe::CLI::Runner.start ["customers", "find", _id_]
36
- end
35
+ Stripe::CLI::Runner.start ["customers", "find", _id_]
36
+ end
37
37
 
38
- it "calls super, passing in `Stripe::BalanceTransaction` and an `id`" do
39
- Stripe::BalanceTransaction.should_receive(:retrieve).with( _id_, "stripe-key" )
38
+ it "calls super, passing in `Stripe::BalanceTransaction` and an `id`" do
39
+ Stripe::BalanceTransaction.should_receive(:retrieve).with( _id_, "stripe-key" )
40
40
 
41
- Stripe::CLI::Runner.start ["transactions", "find", _id_]
42
- end
41
+ Stripe::CLI::Runner.start ["transactions", "find", _id_]
42
+ end
43
43
 
44
- end
44
+ end
45
45
 
46
46
  end
@@ -0,0 +1,13 @@
1
+ require 'spec_helper'
2
+
3
+ describe Stripe::CLI::Command do
4
+
5
+ describe "#dollar_amounts" do
6
+ it "defaults to true" do
7
+ options = {}
8
+
9
+
10
+ end
11
+ end
12
+
13
+ end
@@ -13,6 +13,10 @@ module Stripe
13
13
  def api_key
14
14
  "stripe-key"
15
15
  end
16
+
17
+ def config
18
+ Hash.new
19
+ end
16
20
  end
17
21
  end
18
22
  end
@@ -0,0 +1 @@
1
+ stripe-cli(1) --
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stripe-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.3
4
+ version: 1.6.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex MacCaw
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-09-16 00:00:00.000000000 Z
12
+ date: 2014-11-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -188,7 +188,9 @@ files:
188
188
  - spec/command_spec.rb
189
189
  - spec/commands/charges_spec.rb
190
190
  - spec/commands/recipient_spec.rb
191
+ - spec/dollar_amounts_spec.rb
191
192
  - spec/spec_helper.rb
193
+ - stripe-cli.1
192
194
  - stripe-cli.gemspec
193
195
  homepage: https://stripe.com
194
196
  licenses:
@@ -210,7 +212,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
210
212
  version: '0'
211
213
  requirements: []
212
214
  rubyforge_project:
213
- rubygems_version: 2.4.1
215
+ rubygems_version: 2.4.2
214
216
  signing_key:
215
217
  specification_version: 4
216
218
  summary: Command line interface to Stripe
@@ -218,4 +220,5 @@ test_files:
218
220
  - spec/command_spec.rb
219
221
  - spec/commands/charges_spec.rb
220
222
  - spec/commands/recipient_spec.rb
223
+ - spec/dollar_amounts_spec.rb
221
224
  - spec/spec_helper.rb