Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions t/01-customers.t
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
use Test::Modern;
use t::lib::Common qw(skip_unless_has_secret stripe);

skip_unless_has_secret;

subtest 'basic stuff' => sub {
subtest 'create customer' => sub {
my $cust = stripe->create_customer({ description => 'foo' });
is $cust->{description}, 'foo',
'... Created a new customer w/custom description';

$cust = stripe->get_customer($cust->{id});
is $cust->{description}, 'foo',
'... Fetched the created customer';
'... Fetched the created customer' or diag explain $cust;
};

subtest 'update customer' => sub {
my $cust = stripe->create_customer({ description => 'foo2' });
is $cust->{description}, 'foo2',
'... Created a new customer w/custom description';

$cust = stripe->update_customer($cust->{id}, { description => 'bar' });
is $cust->{description}, 'bar',
Expand Down
2 changes: 0 additions & 2 deletions t/02-charges.t
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ use Test::Modern;
use t::lib::Common qw(skip_unless_has_secret stripe :constants);
use JSON;

skip_unless_has_secret;

my $customer = stripe->create_customer({ description => 'foo' });
my $card = stripe->create_card(
{
Expand Down
2 changes: 0 additions & 2 deletions t/03-banks.t
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
use Test::Modern;
use t::lib::Common qw(:constants skip_unless_has_secret stripe);

skip_unless_has_secret;

subtest 'create bank' => sub {
my $account = stripe->create_account({
managed => 'true',
Expand Down
2 changes: 0 additions & 2 deletions t/04-transfers.t
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ use Test::Modern qw(:deeper :fatal :more);
use t::lib::Common qw(:constants skip_unless_has_secret stripe);
use JSON qw(from_json);

skip_unless_has_secret;

my $account = stripe->create_account({
managed => 'true',
country => 'CA',
Expand Down
2 changes: 0 additions & 2 deletions t/06-balance.t
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
use Test::Modern;
use t::lib::Common qw(skip_unless_has_secret stripe);

skip_unless_has_secret;

subtest "Balance for the Stripe marketplace" => sub {
my $bal = stripe->get_balance;
cmp_deeply $bal, TD->superhashof({ object => 'balance' }),
Expand Down
2 changes: 0 additions & 2 deletions t/08-file-upload.t
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
use Test::Modern;
use t::lib::Common qw(skip_unless_has_secret stripe);

skip_unless_has_secret;

my $acct = stripe->create_account({
managed => 'true',
country => 'CA',
Expand Down
2 changes: 0 additions & 2 deletions t/09-refunds.t
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ use Test::Modern;
use t::lib::Common qw(skip_unless_has_secret stripe :constants);
use JSON;

skip_unless_has_secret;

my $customer = stripe->create_customer({ description => 'foo' });
my $card = stripe->create_card(
{
Expand Down
2 changes: 0 additions & 2 deletions t/10-accounts.t
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
use Test::Modern;
use t::lib::Common qw(:constants skip_unless_has_secret stripe);

skip_unless_has_secret;

subtest 'get_platform_account' => sub {
ok 1;
my $account = stripe->get_platform_account;
Expand Down
44 changes: 44 additions & 0 deletions t/LWPCache/01-customers.t/00fa252d18fc58d9dc74e968b391fcbf
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
HTTP/1.1 200 OK
Connection: close
Date: Mon, 03 Aug 2015 17:48:29 GMT
Server: nginx
Content-Length: 578
Content-Type: application/json
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, POST, HEAD, OPTIONS, DELETE
Access-Control-Allow-Origin: *
Access-Control-Max-Age: 300
Client-Response-Num: 1
Client-SSL-Cert-Issuer: /C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert High Assurance EV CA-1
Client-SSL-Cert-Subject: /businessCategory=Private Organization/jurisdictionC=US/jurisdictionST=Delaware/serialNumber=4675506/street=3180 18th St., Suite 100/postalCode=94110/C=US/ST=California/L=San Francisco/O=Stripe, Inc/CN=api.stripe.com
Client-SSL-Cipher: ECDHE-RSA-AES128-SHA256
Client-SSL-Socket-Class: IO::Socket::SSL
Request-Id: req_6jFYJSEIEULZjz
Strict-Transport-Security: max-age=31556926; includeSubDomains
Stripe-Version: 2014-12-17

{
"id": "card_16Vn332deYoXyGRTpndlR8TE",
"object": "card",
"last4": "4242",
"brand": "Visa",
"funding": "credit",
"exp_month": 12,
"exp_year": 2020,
"fingerprint": "2GAU1bMxCdtdKOdC",
"country": "US",
"name": null,
"address_line1": null,
"address_line2": null,
"address_city": null,
"address_state": null,
"address_zip": null,
"address_country": null,
"cvc_check": "pass",
"address_line1_check": null,
"address_zip_check": null,
"tokenization_method": null,
"dynamic_last4": null,
"metadata": {},
"customer": "cus_6jFY1plBBKFWyo"
}
55 changes: 55 additions & 0 deletions t/LWPCache/01-customers.t/042c9f9bb629fd7a66d8ead65154057b
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
HTTP/1.1 200 OK
Connection: close
Date: Mon, 03 Aug 2015 17:48:27 GMT
Server: nginx
Content-Length: 778
Content-Type: application/json
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, POST, HEAD, OPTIONS, DELETE
Access-Control-Allow-Origin: *
Access-Control-Max-Age: 300
Client-Response-Num: 1
Client-SSL-Cert-Issuer: /C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert High Assurance EV CA-1
Client-SSL-Cert-Subject: /businessCategory=Private Organization/jurisdictionC=US/jurisdictionST=Delaware/serialNumber=4675506/street=3180 18th St., Suite 100/postalCode=94110/C=US/ST=California/L=San Francisco/O=Stripe, Inc/CN=api.stripe.com
Client-SSL-Cipher: ECDHE-RSA-AES128-SHA256
Client-SSL-Socket-Class: IO::Socket::SSL
Request-Id: req_6jFY7EJcfuJb4A
Strict-Transport-Security: max-age=31556926; includeSubDomains
Stripe-Version: 2014-12-17

{
"object": "customer",
"created": 1438624106,
"id": "cus_6jFYUBdqFZzdvP",
"livemode": false,
"description": "bar",
"email": null,
"delinquent": false,
"metadata": {},
"subscriptions": {
"object": "list",
"total_count": 0,
"has_more": false,
"url": "/v1/customers/cus_6jFYUBdqFZzdvP/subscriptions",
"data": []
},
"discount": null,
"account_balance": 0,
"currency": null,
"cards": {
"object": "list",
"total_count": 0,
"has_more": false,
"url": "/v1/customers/cus_6jFYUBdqFZzdvP/cards",
"data": []
},
"default_card": null,
"sources": {
"object": "list",
"total_count": 0,
"has_more": false,
"url": "/v1/customers/cus_6jFYUBdqFZzdvP/sources",
"data": []
},
"default_source": null
}
55 changes: 55 additions & 0 deletions t/LWPCache/01-customers.t/08970ca99a287985a0a0785b2dd3c163
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
HTTP/1.1 200 OK
Connection: close
Date: Mon, 03 Aug 2015 17:48:26 GMT
Server: nginx
Content-Length: 778
Content-Type: application/json
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, POST, HEAD, OPTIONS, DELETE
Access-Control-Allow-Origin: *
Access-Control-Max-Age: 300
Client-Response-Num: 1
Client-SSL-Cert-Issuer: /C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert High Assurance EV CA-1
Client-SSL-Cert-Subject: /businessCategory=Private Organization/jurisdictionC=US/jurisdictionST=Delaware/serialNumber=4675506/street=3180 18th St., Suite 100/postalCode=94110/C=US/ST=California/L=San Francisco/O=Stripe, Inc/CN=api.stripe.com
Client-SSL-Cipher: ECDHE-RSA-AES128-SHA256
Client-SSL-Socket-Class: IO::Socket::SSL
Request-Id: req_6jFYNvEM2VYX3Z
Strict-Transport-Security: max-age=31556926; includeSubDomains
Stripe-Version: 2014-12-17

{
"object": "customer",
"created": 1438624105,
"id": "cus_6jFYBb9leEs9bR",
"livemode": false,
"description": "foo",
"email": null,
"delinquent": false,
"metadata": {},
"subscriptions": {
"object": "list",
"total_count": 0,
"has_more": false,
"url": "/v1/customers/cus_6jFYBb9leEs9bR/subscriptions",
"data": []
},
"discount": null,
"account_balance": 0,
"currency": null,
"cards": {
"object": "list",
"total_count": 0,
"has_more": false,
"url": "/v1/customers/cus_6jFYBb9leEs9bR/cards",
"data": []
},
"default_card": null,
"sources": {
"object": "list",
"total_count": 0,
"has_more": false,
"url": "/v1/customers/cus_6jFYBb9leEs9bR/sources",
"data": []
},
"default_source": null
}
55 changes: 55 additions & 0 deletions t/LWPCache/01-customers.t/6aabc3f2ec770152fb84b8782565dc80
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
HTTP/1.1 200 OK
Connection: close
Date: Mon, 03 Aug 2015 17:48:27 GMT
Server: nginx
Content-Length: 778
Content-Type: application/json
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, POST, HEAD, OPTIONS, DELETE
Access-Control-Allow-Origin: *
Access-Control-Max-Age: 300
Client-Response-Num: 1
Client-SSL-Cert-Issuer: /C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert High Assurance EV CA-1
Client-SSL-Cert-Subject: /businessCategory=Private Organization/jurisdictionC=US/jurisdictionST=Delaware/serialNumber=4675506/street=3180 18th St., Suite 100/postalCode=94110/C=US/ST=California/L=San Francisco/O=Stripe, Inc/CN=api.stripe.com
Client-SSL-Cipher: ECDHE-RSA-AES128-SHA256
Client-SSL-Socket-Class: IO::Socket::SSL
Request-Id: req_6jFYIfZVlj4o5h
Strict-Transport-Security: max-age=31556926; includeSubDomains
Stripe-Version: 2014-12-17

{
"object": "customer",
"created": 1438624106,
"id": "cus_6jFYUBdqFZzdvP",
"livemode": false,
"description": "bar",
"email": null,
"delinquent": false,
"metadata": {},
"subscriptions": {
"object": "list",
"total_count": 0,
"has_more": false,
"url": "/v1/customers/cus_6jFYUBdqFZzdvP/subscriptions",
"data": []
},
"discount": null,
"account_balance": 0,
"currency": null,
"cards": {
"object": "list",
"total_count": 0,
"has_more": false,
"url": "/v1/customers/cus_6jFYUBdqFZzdvP/cards",
"data": []
},
"default_card": null,
"sources": {
"object": "list",
"total_count": 0,
"has_more": false,
"url": "/v1/customers/cus_6jFYUBdqFZzdvP/sources",
"data": []
},
"default_source": null
}
55 changes: 55 additions & 0 deletions t/LWPCache/01-customers.t/b85456b23f22b306f0d340f81d7c0db2
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
HTTP/1.1 200 OK
Connection: close
Date: Mon, 03 Aug 2015 17:48:26 GMT
Server: nginx
Content-Length: 779
Content-Type: application/json
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, POST, HEAD, OPTIONS, DELETE
Access-Control-Allow-Origin: *
Access-Control-Max-Age: 300
Client-Response-Num: 1
Client-SSL-Cert-Issuer: /C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert High Assurance EV CA-1
Client-SSL-Cert-Subject: /businessCategory=Private Organization/jurisdictionC=US/jurisdictionST=Delaware/serialNumber=4675506/street=3180 18th St., Suite 100/postalCode=94110/C=US/ST=California/L=San Francisco/O=Stripe, Inc/CN=api.stripe.com
Client-SSL-Cipher: ECDHE-RSA-AES128-SHA256
Client-SSL-Socket-Class: IO::Socket::SSL
Request-Id: req_6jFYP7k50Sn4Qs
Strict-Transport-Security: max-age=31556926; includeSubDomains
Stripe-Version: 2014-12-17

{
"object": "customer",
"created": 1438624106,
"id": "cus_6jFYUBdqFZzdvP",
"livemode": false,
"description": "foo2",
"email": null,
"delinquent": false,
"metadata": {},
"subscriptions": {
"object": "list",
"total_count": 0,
"has_more": false,
"url": "/v1/customers/cus_6jFYUBdqFZzdvP/subscriptions",
"data": []
},
"discount": null,
"account_balance": 0,
"currency": null,
"cards": {
"object": "list",
"total_count": 0,
"has_more": false,
"url": "/v1/customers/cus_6jFYUBdqFZzdvP/cards",
"data": []
},
"default_card": null,
"sources": {
"object": "list",
"total_count": 0,
"has_more": false,
"url": "/v1/customers/cus_6jFYUBdqFZzdvP/sources",
"data": []
},
"default_source": null
}
Loading