diff --git a/t/01-customers.t b/t/01-customers.t index 93708aa..50b9440 100644 --- a/t/01-customers.t +++ b/t/01-customers.t @@ -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', diff --git a/t/02-charges.t b/t/02-charges.t index 80ab669..dbfa6a8 100644 --- a/t/02-charges.t +++ b/t/02-charges.t @@ -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( { diff --git a/t/03-banks.t b/t/03-banks.t index 7785947..9bae80d 100644 --- a/t/03-banks.t +++ b/t/03-banks.t @@ -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', diff --git a/t/04-transfers.t b/t/04-transfers.t index 0d5f292..f261b88 100644 --- a/t/04-transfers.t +++ b/t/04-transfers.t @@ -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', diff --git a/t/06-balance.t b/t/06-balance.t index 2db1d5a..5f612e7 100644 --- a/t/06-balance.t +++ b/t/06-balance.t @@ -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' }), diff --git a/t/08-file-upload.t b/t/08-file-upload.t index f511f03..f009375 100644 --- a/t/08-file-upload.t +++ b/t/08-file-upload.t @@ -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', diff --git a/t/09-refunds.t b/t/09-refunds.t index 4369663..311426d 100644 --- a/t/09-refunds.t +++ b/t/09-refunds.t @@ -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( { diff --git a/t/10-accounts.t b/t/10-accounts.t index e1fd3c7..ddc4a6c 100644 --- a/t/10-accounts.t +++ b/t/10-accounts.t @@ -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; diff --git a/t/LWPCache/01-customers.t/00fa252d18fc58d9dc74e968b391fcbf b/t/LWPCache/01-customers.t/00fa252d18fc58d9dc74e968b391fcbf new file mode 100644 index 0000000..38b4ab6 --- /dev/null +++ b/t/LWPCache/01-customers.t/00fa252d18fc58d9dc74e968b391fcbf @@ -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" +} diff --git a/t/LWPCache/01-customers.t/042c9f9bb629fd7a66d8ead65154057b b/t/LWPCache/01-customers.t/042c9f9bb629fd7a66d8ead65154057b new file mode 100644 index 0000000..cb1d3eb --- /dev/null +++ b/t/LWPCache/01-customers.t/042c9f9bb629fd7a66d8ead65154057b @@ -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 +} diff --git a/t/LWPCache/01-customers.t/08970ca99a287985a0a0785b2dd3c163 b/t/LWPCache/01-customers.t/08970ca99a287985a0a0785b2dd3c163 new file mode 100644 index 0000000..a94c2c0 --- /dev/null +++ b/t/LWPCache/01-customers.t/08970ca99a287985a0a0785b2dd3c163 @@ -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 +} diff --git a/t/LWPCache/01-customers.t/6aabc3f2ec770152fb84b8782565dc80 b/t/LWPCache/01-customers.t/6aabc3f2ec770152fb84b8782565dc80 new file mode 100644 index 0000000..4886ea0 --- /dev/null +++ b/t/LWPCache/01-customers.t/6aabc3f2ec770152fb84b8782565dc80 @@ -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 +} diff --git a/t/LWPCache/01-customers.t/b85456b23f22b306f0d340f81d7c0db2 b/t/LWPCache/01-customers.t/b85456b23f22b306f0d340f81d7c0db2 new file mode 100644 index 0000000..a5c5c8d --- /dev/null +++ b/t/LWPCache/01-customers.t/b85456b23f22b306f0d340f81d7c0db2 @@ -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 +} diff --git a/t/LWPCache/01-customers.t/cb3e32879256e21695cbd25e0bdf62ee b/t/LWPCache/01-customers.t/cb3e32879256e21695cbd25e0bdf62ee new file mode 100644 index 0000000..6e3a810 --- /dev/null +++ b/t/LWPCache/01-customers.t/cb3e32879256e21695cbd25e0bdf62ee @@ -0,0 +1,55 @@ +HTTP/1.1 200 OK +Connection: close +Date: Mon, 03 Aug 2015 17:48:25 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_6jFYN3SHEzNAXq +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 +} diff --git a/t/LWPCache/01-customers.t/f7693e97f53908ee32fade85f8389398 b/t/LWPCache/01-customers.t/f7693e97f53908ee32fade85f8389398 new file mode 100644 index 0000000..8984d5d --- /dev/null +++ b/t/LWPCache/01-customers.t/f7693e97f53908ee32fade85f8389398 @@ -0,0 +1,55 @@ +HTTP/1.1 200 OK +Connection: close +Date: Mon, 03 Aug 2015 17:48:28 GMT +Server: nginx +Content-Length: 777 +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_6jFY6WxZ0ovvs6 +Strict-Transport-Security: max-age=31556926; includeSubDomains +Stripe-Version: 2014-12-17 + +{ + "object": "customer", + "created": 1438624108, + "id": "cus_6jFY1plBBKFWyo", + "livemode": false, + "description": null, + "email": null, + "delinquent": false, + "metadata": {}, + "subscriptions": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/customers/cus_6jFY1plBBKFWyo/subscriptions", + "data": [] + }, + "discount": null, + "account_balance": 0, + "currency": null, + "cards": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/customers/cus_6jFY1plBBKFWyo/cards", + "data": [] + }, + "default_card": null, + "sources": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/customers/cus_6jFY1plBBKFWyo/sources", + "data": [] + }, + "default_source": null +} diff --git a/t/LWPCache/02-charges.t/4aee325d2c773b3c17aacd4e865bcbed b/t/LWPCache/02-charges.t/4aee325d2c773b3c17aacd4e865bcbed new file mode 100644 index 0000000..c522759 --- /dev/null +++ b/t/LWPCache/02-charges.t/4aee325d2c773b3c17aacd4e865bcbed @@ -0,0 +1,191 @@ +HTTP/1.1 200 OK +Connection: close +Date: Mon, 03 Aug 2015 10:52:14 GMT +Server: nginx +Content-Length: 4533 +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_6j8pPaou4QftbZ +Strict-Transport-Security: max-age=31556926; includeSubDomains +Stripe-Version: 2014-12-17 + +{ + "id": "ch_16VgYE2deYoXyGRTHHzgJi0I", + "object": "charge", + "created": 1438599134, + "livemode": false, + "paid": true, + "status": "paid", + "amount": 1000, + "currency": "usd", + "refunded": false, + "source": { + "id": "card_16VgYD2deYoXyGRTqLzhf5ON", + "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": null, + "address_line1_check": null, + "address_zip_check": null, + "tokenization_method": null, + "dynamic_last4": null, + "metadata": {}, + "customer": "cus_6j8p1AQKJfNG8C" + }, + "captured": true, + "card": { + "id": "card_16VgYD2deYoXyGRTqLzhf5ON", + "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": null, + "address_line1_check": null, + "address_zip_check": null, + "tokenization_method": null, + "dynamic_last4": null, + "metadata": {}, + "customer": "cus_6j8p1AQKJfNG8C" + }, + "balance_transaction": "txn_16VgYE2deYoXyGRTtS7OG2ch", + "failure_message": null, + "failure_code": null, + "amount_refunded": 0, + "customer": { + "object": "customer", + "created": 1438599133, + "id": "cus_6j8p1AQKJfNG8C", + "livemode": false, + "description": "foo", + "email": null, + "delinquent": false, + "metadata": {}, + "subscriptions": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/customers/cus_6j8p1AQKJfNG8C/subscriptions", + "data": [] + }, + "discount": null, + "account_balance": 0, + "currency": null, + "cards": { + "object": "list", + "total_count": 1, + "has_more": false, + "url": "/v1/customers/cus_6j8p1AQKJfNG8C/cards", + "data": [ + { + "id": "card_16VgYD2deYoXyGRTqLzhf5ON", + "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": null, + "address_line1_check": null, + "address_zip_check": null, + "tokenization_method": null, + "dynamic_last4": null, + "metadata": {}, + "customer": "cus_6j8p1AQKJfNG8C" + } + ] + }, + "default_card": "card_16VgYD2deYoXyGRTqLzhf5ON", + "sources": { + "object": "list", + "total_count": 1, + "has_more": false, + "url": "/v1/customers/cus_6j8p1AQKJfNG8C/sources", + "data": [ + { + "id": "card_16VgYD2deYoXyGRTqLzhf5ON", + "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": null, + "address_line1_check": null, + "address_zip_check": null, + "tokenization_method": null, + "dynamic_last4": null, + "metadata": {}, + "customer": "cus_6j8p1AQKJfNG8C" + } + ] + }, + "default_source": "card_16VgYD2deYoXyGRTqLzhf5ON" + }, + "invoice": null, + "description": "foo", + "dispute": null, + "metadata": {}, + "statement_descriptor": null, + "fraud_details": {}, + "receipt_email": null, + "receipt_number": null, + "shipping": null, + "destination": null, + "application_fee": null, + "refunds": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/charges/ch_16VgYE2deYoXyGRTHHzgJi0I/refunds", + "data": [] + } +} diff --git a/t/LWPCache/02-charges.t/a51a77441ffa4f3a4f4adacdfb920bb7 b/t/LWPCache/02-charges.t/a51a77441ffa4f3a4f4adacdfb920bb7 new file mode 100644 index 0000000..72f30bd --- /dev/null +++ b/t/LWPCache/02-charges.t/a51a77441ffa4f3a4f4adacdfb920bb7 @@ -0,0 +1,106 @@ +HTTP/1.1 200 OK +Connection: close +Date: Mon, 03 Aug 2015 10:52:15 GMT +Server: nginx +Content-Length: 2109 +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_6j8pDLpprVIUKy +Strict-Transport-Security: max-age=31556926; includeSubDomains +Stripe-Version: 2014-12-17 + +{ + "id": "ch_16VgYE2deYoXyGRTHHzgJi0I", + "object": "charge", + "created": 1438599134, + "livemode": false, + "paid": true, + "status": "paid", + "amount": 1000, + "currency": "usd", + "refunded": false, + "source": { + "id": "card_16VgYD2deYoXyGRTqLzhf5ON", + "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": null, + "address_line1_check": null, + "address_zip_check": null, + "tokenization_method": null, + "dynamic_last4": null, + "metadata": {}, + "customer": "cus_6j8p1AQKJfNG8C" + }, + "captured": true, + "card": { + "id": "card_16VgYD2deYoXyGRTqLzhf5ON", + "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": null, + "address_line1_check": null, + "address_zip_check": null, + "tokenization_method": null, + "dynamic_last4": null, + "metadata": {}, + "customer": "cus_6j8p1AQKJfNG8C" + }, + "balance_transaction": "txn_16VgYE2deYoXyGRTtS7OG2ch", + "failure_message": null, + "failure_code": null, + "amount_refunded": 0, + "customer": "cus_6j8p1AQKJfNG8C", + "invoice": null, + "description": "Foobar", + "dispute": null, + "metadata": { + "bar": "baz" + }, + "statement_descriptor": null, + "fraud_details": {}, + "receipt_email": null, + "receipt_number": null, + "shipping": null, + "destination": null, + "application_fee": null, + "refunds": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/charges/ch_16VgYE2deYoXyGRTHHzgJi0I/refunds", + "data": [] + } +} diff --git a/t/LWPCache/02-charges.t/c3bd5595138b8b7b107b40b992920be0 b/t/LWPCache/02-charges.t/c3bd5595138b8b7b107b40b992920be0 new file mode 100644 index 0000000..c737460 --- /dev/null +++ b/t/LWPCache/02-charges.t/c3bd5595138b8b7b107b40b992920be0 @@ -0,0 +1,104 @@ +HTTP/1.1 200 OK +Connection: close +Date: Mon, 03 Aug 2015 10:52:14 GMT +Server: nginx +Content-Length: 2086 +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_6j8p7KRMXKpqlS +Strict-Transport-Security: max-age=31556926; includeSubDomains +Stripe-Version: 2014-12-17 + +{ + "id": "ch_16VgYE2deYoXyGRTHHzgJi0I", + "object": "charge", + "created": 1438599134, + "livemode": false, + "paid": true, + "status": "paid", + "amount": 1000, + "currency": "usd", + "refunded": false, + "source": { + "id": "card_16VgYD2deYoXyGRTqLzhf5ON", + "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": null, + "address_line1_check": null, + "address_zip_check": null, + "tokenization_method": null, + "dynamic_last4": null, + "metadata": {}, + "customer": "cus_6j8p1AQKJfNG8C" + }, + "captured": true, + "card": { + "id": "card_16VgYD2deYoXyGRTqLzhf5ON", + "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": null, + "address_line1_check": null, + "address_zip_check": null, + "tokenization_method": null, + "dynamic_last4": null, + "metadata": {}, + "customer": "cus_6j8p1AQKJfNG8C" + }, + "balance_transaction": "txn_16VgYE2deYoXyGRTtS7OG2ch", + "failure_message": null, + "failure_code": null, + "amount_refunded": 0, + "customer": "cus_6j8p1AQKJfNG8C", + "invoice": null, + "description": "foo", + "dispute": null, + "metadata": {}, + "statement_descriptor": null, + "fraud_details": {}, + "receipt_email": null, + "receipt_number": null, + "shipping": null, + "destination": null, + "application_fee": null, + "refunds": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/charges/ch_16VgYE2deYoXyGRTHHzgJi0I/refunds", + "data": [] + } +} diff --git a/t/LWPCache/02-charges.t/cb3e32879256e21695cbd25e0bdf62ee b/t/LWPCache/02-charges.t/cb3e32879256e21695cbd25e0bdf62ee new file mode 100644 index 0000000..1107e18 --- /dev/null +++ b/t/LWPCache/02-charges.t/cb3e32879256e21695cbd25e0bdf62ee @@ -0,0 +1,55 @@ +HTTP/1.1 200 OK +Connection: close +Date: Mon, 03 Aug 2015 10:52:13 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_6j8pJrAbZxdqRv +Strict-Transport-Security: max-age=31556926; includeSubDomains +Stripe-Version: 2014-12-17 + +{ + "object": "customer", + "created": 1438599133, + "id": "cus_6j8p1AQKJfNG8C", + "livemode": false, + "description": "foo", + "email": null, + "delinquent": false, + "metadata": {}, + "subscriptions": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/customers/cus_6j8p1AQKJfNG8C/subscriptions", + "data": [] + }, + "discount": null, + "account_balance": 0, + "currency": null, + "cards": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/customers/cus_6j8p1AQKJfNG8C/cards", + "data": [] + }, + "default_card": null, + "sources": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/customers/cus_6j8p1AQKJfNG8C/sources", + "data": [] + }, + "default_source": null +} diff --git a/t/LWPCache/02-charges.t/d5f10de4336061efb17dcae88dada1ee b/t/LWPCache/02-charges.t/d5f10de4336061efb17dcae88dada1ee new file mode 100644 index 0000000..a51aabd --- /dev/null +++ b/t/LWPCache/02-charges.t/d5f10de4336061efb17dcae88dada1ee @@ -0,0 +1,44 @@ +HTTP/1.1 200 OK +Connection: close +Date: Mon, 03 Aug 2015 10:52:13 GMT +Server: nginx +Content-Length: 576 +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_6j8pABuOj2HGaZ +Strict-Transport-Security: max-age=31556926; includeSubDomains +Stripe-Version: 2014-12-17 + +{ + "id": "card_16VgYD2deYoXyGRTqLzhf5ON", + "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": null, + "address_line1_check": null, + "address_zip_check": null, + "tokenization_method": null, + "dynamic_last4": null, + "metadata": {}, + "customer": "cus_6j8p1AQKJfNG8C" +} diff --git a/t/LWPCache/03-banks.t/7ca29aa62255c0ff11d4a92e3f7a5b90 b/t/LWPCache/03-banks.t/7ca29aa62255c0ff11d4a92e3f7a5b90 new file mode 100644 index 0000000..f0378a6 --- /dev/null +++ b/t/LWPCache/03-banks.t/7ca29aa62255c0ff11d4a92e3f7a5b90 @@ -0,0 +1,128 @@ +HTTP/1.1 200 OK +Connection: close +Date: Mon, 03 Aug 2015 10:52:16 GMT +Server: nginx +Content-Length: 2450 +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_6j8pzdyyNt69ik +Strict-Transport-Security: max-age=31556926; includeSubDomains +Stripe-Version: 2014-12-17 + +{ + "id": "acct_16VgYGFLLZgNHT84", + "email": null, + "statement_descriptor": null, + "display_name": null, + "timezone": "Etc/UTC", + "details_submitted": false, + "charges_enabled": true, + "transfers_enabled": false, + "currencies_supported": [ + "cad", + "usd" + ], + "default_currency": "cad", + "country": "CA", + "object": "account", + "business_name": null, + "business_url": null, + "support_phone": null, + "business_logo": null, + "metadata": {}, + "managed": true, + "product_description": null, + "debit_negative_balances": false, + "bank_accounts": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/accounts/acct_16VgYGFLLZgNHT84/bank_accounts", + "data": [] + }, + "external_accounts": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/accounts/acct_16VgYGFLLZgNHT84/external_accounts", + "data": [] + }, + "verification": { + "fields_needed": [ + "legal_entity.first_name", + "legal_entity.last_name", + "legal_entity.dob.day", + "legal_entity.dob.month", + "legal_entity.dob.year", + "legal_entity.type", + "legal_entity.address.line1", + "legal_entity.address.city", + "legal_entity.address.state", + "legal_entity.address.postal_code", + "bank_account", + "tos_acceptance.ip", + "tos_acceptance.date" + ], + "due_by": null, + "disabled_reason": null, + "contacted": false + }, + "transfer_schedule": { + "delay_days": 7, + "interval": "daily" + }, + "decline_charge_on": { + "cvc_failure": false, + "avs_failure": false + }, + "tos_acceptance": { + "ip": null, + "date": null, + "user_agent": null + }, + "legal_entity": { + "type": null, + "business_name": null, + "address": { + "line1": null, + "line2": null, + "city": null, + "state": null, + "postal_code": null, + "country": "CA" + }, + "first_name": null, + "last_name": null, + "personal_address": { + "line1": null, + "line2": null, + "city": null, + "state": null, + "postal_code": null, + "country": null + }, + "dob": { + "day": null, + "month": null, + "year": null + }, + "additional_owners": null, + "verification": { + "status": "unverified", + "document": null, + "details": null + } + }, + "keys": { + "secret": "sk_test_LR1PasshjE9VPGSUxvT2N6GK", + "publishable": "pk_test_tqnLRun9oGWdk7hcIZtJ3Fmu" + } +} diff --git a/t/LWPCache/03-banks.t/9c3a8437078f620d1a30184584f980b6 b/t/LWPCache/03-banks.t/9c3a8437078f620d1a30184584f980b6 new file mode 100644 index 0000000..0054183 --- /dev/null +++ b/t/LWPCache/03-banks.t/9c3a8437078f620d1a30184584f980b6 @@ -0,0 +1,34 @@ +HTTP/1.1 200 OK +Connection: close +Date: Mon, 03 Aug 2015 10:52:17 GMT +Server: nginx +Content-Length: 327 +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_6j8pmxttmCRQI7 +Strict-Transport-Security: max-age=31556926; includeSubDomains +Stripe-Account: acct_16VgYGFLLZgNHT84 +Stripe-Version: 2014-12-17 + +{ + "object": "bank_account", + "id": "ba_16VgYGFLLZgNHT84iHfkGLBo", + "last4": "6789", + "country": "CA", + "currency": "cad", + "status": "new", + "fingerprint": "lMxe3D4ZffkmXqIa", + "routing_number": "11000-000", + "bank_name": null, + "account": "acct_16VgYGFLLZgNHT84", + "default_for_currency": true, + "metadata": {} +} diff --git a/t/LWPCache/03-banks.t/d3cead77f225e005657f686e023b65eb b/t/LWPCache/03-banks.t/d3cead77f225e005657f686e023b65eb new file mode 100644 index 0000000..f0f496c --- /dev/null +++ b/t/LWPCache/03-banks.t/d3cead77f225e005657f686e023b65eb @@ -0,0 +1,154 @@ +HTTP/1.1 200 OK +Connection: close +Date: Mon, 03 Aug 2015 10:52:17 GMT +Server: nginx +Content-Length: 3138 +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_6j8pyvoTbWxZRf +Strict-Transport-Security: max-age=31556926; includeSubDomains +Stripe-Account: acct_16VgYGFLLZgNHT84 +Stripe-Version: 2014-12-17 + +{ + "id": "acct_16VgYGFLLZgNHT84", + "email": null, + "statement_descriptor": null, + "display_name": null, + "timezone": "Etc/UTC", + "details_submitted": false, + "charges_enabled": true, + "transfers_enabled": true, + "currencies_supported": [ + "cad", + "usd" + ], + "default_currency": "cad", + "country": "CA", + "object": "account", + "business_name": null, + "business_url": null, + "support_phone": null, + "business_logo": null, + "metadata": {}, + "managed": true, + "product_description": null, + "debit_negative_balances": false, + "bank_accounts": { + "object": "list", + "total_count": 1, + "has_more": false, + "url": "/v1/accounts/acct_16VgYGFLLZgNHT84/bank_accounts", + "data": [ + { + "object": "bank_account", + "id": "ba_16VgYGFLLZgNHT84iHfkGLBo", + "last4": "6789", + "country": "CA", + "currency": "cad", + "status": "new", + "fingerprint": "lMxe3D4ZffkmXqIa", + "routing_number": "11000-000", + "bank_name": null, + "account": "acct_16VgYGFLLZgNHT84", + "default_for_currency": true, + "metadata": {} + } + ] + }, + "external_accounts": { + "object": "list", + "total_count": 1, + "has_more": false, + "url": "/v1/accounts/acct_16VgYGFLLZgNHT84/external_accounts", + "data": [ + { + "object": "bank_account", + "id": "ba_16VgYGFLLZgNHT84iHfkGLBo", + "last4": "6789", + "country": "CA", + "currency": "cad", + "status": "new", + "fingerprint": "lMxe3D4ZffkmXqIa", + "routing_number": "11000-000", + "bank_name": null, + "account": "acct_16VgYGFLLZgNHT84", + "default_for_currency": true, + "metadata": {} + } + ] + }, + "verification": { + "fields_needed": [ + "legal_entity.first_name", + "legal_entity.last_name", + "legal_entity.dob.day", + "legal_entity.dob.month", + "legal_entity.dob.year", + "legal_entity.type", + "legal_entity.address.line1", + "legal_entity.address.city", + "legal_entity.address.state", + "legal_entity.address.postal_code", + "tos_acceptance.ip", + "tos_acceptance.date" + ], + "due_by": null, + "disabled_reason": null, + "contacted": false + }, + "transfer_schedule": { + "delay_days": 7, + "interval": "daily" + }, + "decline_charge_on": { + "cvc_failure": false, + "avs_failure": false + }, + "tos_acceptance": { + "ip": null, + "date": null, + "user_agent": null + }, + "legal_entity": { + "type": null, + "business_name": null, + "address": { + "line1": null, + "line2": null, + "city": null, + "state": null, + "postal_code": null, + "country": "CA" + }, + "first_name": null, + "last_name": null, + "personal_address": { + "line1": null, + "line2": null, + "city": null, + "state": null, + "postal_code": null, + "country": null + }, + "dob": { + "day": null, + "month": null, + "year": null + }, + "additional_owners": null, + "verification": { + "status": "unverified", + "document": null, + "details": null + } + } +} diff --git a/t/LWPCache/04-transfers.t/02d362a577e3e2b7383760960f671bd4 b/t/LWPCache/04-transfers.t/02d362a577e3e2b7383760960f671bd4 new file mode 100644 index 0000000..f3d2d45 --- /dev/null +++ b/t/LWPCache/04-transfers.t/02d362a577e3e2b7383760960f671bd4 @@ -0,0 +1,50 @@ +HTTP/1.1 200 OK +Connection: close +Date: Mon, 03 Aug 2015 10:52:19 GMT +Server: nginx +Content-Length: 795 +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_6j8plqly0G6mgK +Strict-Transport-Security: max-age=31556926; includeSubDomains +Stripe-Version: 2014-12-17 + +{ + "id": "tr_16VgYJ2deYoXyGRTeWMJg6iB", + "object": "transfer", + "created": 1438599139, + "date": 1438599139, + "livemode": false, + "amount": 100, + "currency": "cad", + "reversed": false, + "status": "pending", + "type": "stripe_account", + "reversals": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/transfers/tr_16VgYJ2deYoXyGRTeWMJg6iB/reversals", + "data": [] + }, + "balance_transaction": "txn_16VgYJ2deYoXyGRTSweyqxaG", + "destination": "acct_16VgYIGd7APchvOl", + "destination_payment": "py_16VgYJGd7APchvOlCrIxQpfX", + "description": null, + "failure_message": null, + "failure_code": null, + "amount_reversed": 0, + "metadata": {}, + "statement_descriptor": null, + "recipient": null, + "source_transaction": null, + "application_fee": null +} diff --git a/t/LWPCache/04-transfers.t/08e1016889e4002a6c26e2fc67bd4974 b/t/LWPCache/04-transfers.t/08e1016889e4002a6c26e2fc67bd4974 new file mode 100644 index 0000000..62f1540 --- /dev/null +++ b/t/LWPCache/04-transfers.t/08e1016889e4002a6c26e2fc67bd4974 @@ -0,0 +1,29 @@ +HTTP/1.1 200 OK +Connection: close +Date: Mon, 03 Aug 2015 10:52:23 GMT +Server: nginx +Content-Length: 259 +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_6j8qYhJOLh469k +Strict-Transport-Security: max-age=31556926; includeSubDomains +Stripe-Version: 2014-12-17 + +{ + "id": "trr_16VgYN2deYoXyGRTmgfzq3gw", + "amount": 100, + "currency": "cad", + "created": 1438599143, + "object": "transfer_reversal", + "balance_transaction": "txn_16VgYN2deYoXyGRTOD6wAexi", + "metadata": {}, + "transfer": "tr_16VgYM2deYoXyGRTBxFRWURw" +} diff --git a/t/LWPCache/04-transfers.t/107cc6473df896b5e5110b9e47cf8288 b/t/LWPCache/04-transfers.t/107cc6473df896b5e5110b9e47cf8288 new file mode 100644 index 0000000..66dcf5d --- /dev/null +++ b/t/LWPCache/04-transfers.t/107cc6473df896b5e5110b9e47cf8288 @@ -0,0 +1,338 @@ +HTTP/1.1 200 OK +Connection: close +Date: Mon, 03 Aug 2015 10:52:21 GMT +Server: nginx +Content-Length: 9508 +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_6j8qcWVYetX9e6 +Strict-Transport-Security: max-age=31556926; includeSubDomains +Stripe-Version: 2014-12-17 + +{ + "object": "list", + "has_more": true, + "url": "/v1/transfers", + "data": [ + { + "id": "tr_16VgYJ2deYoXyGRTeWMJg6iB", + "object": "transfer", + "created": 1438599139, + "date": 1438599139, + "livemode": false, + "amount": 100, + "currency": "cad", + "reversed": false, + "status": "paid", + "type": "stripe_account", + "reversals": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/transfers/tr_16VgYJ2deYoXyGRTeWMJg6iB/reversals", + "data": [] + }, + "balance_transaction": "txn_16VgYJ2deYoXyGRTSweyqxaG", + "destination": "acct_16VgYIGd7APchvOl", + "destination_payment": "py_16VgYJGd7APchvOlCrIxQpfX", + "description": null, + "failure_message": null, + "failure_code": null, + "amount_reversed": 0, + "metadata": { + "foo": "bar" + }, + "statement_descriptor": null, + "recipient": null, + "source_transaction": null, + "application_fee": null + }, + { + "id": "tr_16VgYD2deYoXyGRTwYjFygSE", + "object": "transfer", + "created": 1438599133, + "date": 1438599133, + "livemode": false, + "amount": 309, + "currency": "usd", + "reversed": false, + "status": "paid", + "type": "stripe_account", + "reversals": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/transfers/tr_16VgYD2deYoXyGRTwYjFygSE/reversals", + "data": [] + }, + "balance_transaction": "txn_16VgYD2deYoXyGRT9M9FpBPD", + "destination": "acct_16VgYCIcIXchPKrF", + "destination_payment": "py_16VgYDIcIXchPKrFehwYiZp1", + "description": null, + "failure_message": null, + "failure_code": null, + "amount_reversed": 0, + "metadata": {}, + "statement_descriptor": null, + "recipient": null, + "source_transaction": "ch_16VgYD2deYoXyGRTYech3CWo", + "application_fee": null + }, + { + "id": "tr_16VgY82deYoXyGRT0aNndfUl", + "object": "transfer", + "created": 1438599128, + "date": 1438599128, + "livemode": false, + "amount": 309, + "currency": "usd", + "reversed": false, + "status": "paid", + "type": "stripe_account", + "reversals": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/transfers/tr_16VgY82deYoXyGRT0aNndfUl/reversals", + "data": [] + }, + "balance_transaction": "txn_16VgY82deYoXyGRTTXMT6vrJ", + "destination": "acct_16VgY7B8yi8rbRVB", + "destination_payment": "py_16VgY8B8yi8rbRVBed6JIUe3", + "description": null, + "failure_message": null, + "failure_code": null, + "amount_reversed": 0, + "metadata": {}, + "statement_descriptor": null, + "recipient": null, + "source_transaction": "ch_16VgY82deYoXyGRTAgWUgLsK", + "application_fee": null + }, + { + "id": "tr_16VgXQ2deYoXyGRT56InLzI4", + "object": "transfer", + "created": 1438599084, + "date": 1438599084, + "livemode": false, + "amount": 309, + "currency": "usd", + "reversed": false, + "status": "paid", + "type": "stripe_account", + "reversals": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/transfers/tr_16VgXQ2deYoXyGRT56InLzI4/reversals", + "data": [] + }, + "balance_transaction": "txn_16VgXQ2deYoXyGRTEdmg8Eu1", + "destination": "acct_16VgXPCm1ShY0yhQ", + "destination_payment": "py_16VgXQCm1ShY0yhQ9cGZevpt", + "description": null, + "failure_message": null, + "failure_code": null, + "amount_reversed": 0, + "metadata": {}, + "statement_descriptor": null, + "recipient": null, + "source_transaction": "ch_16VgXQ2deYoXyGRTdA87seqL", + "application_fee": null + }, + { + "id": "tr_16VgXN2deYoXyGRTci44cQfV", + "object": "transfer", + "created": 1438599081, + "date": 1438599082, + "livemode": false, + "amount": 309, + "currency": "usd", + "reversed": false, + "status": "paid", + "type": "stripe_account", + "reversals": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/transfers/tr_16VgXN2deYoXyGRTci44cQfV/reversals", + "data": [] + }, + "balance_transaction": "txn_16VgXO2deYoXyGRTf5BBUczC", + "destination": "acct_16VgXMEA8Umh7THP", + "destination_payment": "py_16VgXOEA8Umh7THPyld6LtDZ", + "description": null, + "failure_message": null, + "failure_code": null, + "amount_reversed": 0, + "metadata": {}, + "statement_descriptor": null, + "recipient": null, + "source_transaction": "ch_16VgXN2deYoXyGRTp3wUmGpr", + "application_fee": null + }, + { + "id": "tr_16VgWu2deYoXyGRT8NsCgIH2", + "object": "transfer", + "created": 1438599052, + "date": 1438599052, + "livemode": false, + "amount": 309, + "currency": "usd", + "reversed": false, + "status": "paid", + "type": "stripe_account", + "reversals": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/transfers/tr_16VgWu2deYoXyGRT8NsCgIH2/reversals", + "data": [] + }, + "balance_transaction": "txn_16VgWu2deYoXyGRTmJXSRk9S", + "destination": "acct_16VgWtLurlqRNnyP", + "destination_payment": "py_16VgWuLurlqRNnyPdUuBXmZS", + "description": null, + "failure_message": null, + "failure_code": null, + "amount_reversed": 0, + "metadata": {}, + "statement_descriptor": null, + "recipient": null, + "source_transaction": "ch_16VgWu2deYoXyGRThHPUJIM2", + "application_fee": null + }, + { + "id": "tr_16VgW32deYoXyGRTxGUtewGs", + "object": "transfer", + "created": 1438598999, + "date": 1438598999, + "livemode": false, + "amount": 309, + "currency": "usd", + "reversed": false, + "status": "paid", + "type": "stripe_account", + "reversals": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/transfers/tr_16VgW32deYoXyGRTxGUtewGs/reversals", + "data": [] + }, + "balance_transaction": "txn_16VgW32deYoXyGRTLupNtMJ9", + "destination": "acct_16VgW1C0qajUTn4d", + "destination_payment": "py_16VgW3C0qajUTn4dFiXtLJaN", + "description": null, + "failure_message": null, + "failure_code": null, + "amount_reversed": 0, + "metadata": {}, + "statement_descriptor": null, + "recipient": null, + "source_transaction": "ch_16VgW22deYoXyGRTjpSJSO1H", + "application_fee": null + }, + { + "id": "tr_16VgVT2deYoXyGRTlGFp96Vw", + "object": "transfer", + "created": 1438598963, + "date": 1438598963, + "livemode": false, + "amount": 309, + "currency": "usd", + "reversed": false, + "status": "paid", + "type": "stripe_account", + "reversals": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/transfers/tr_16VgVT2deYoXyGRTlGFp96Vw/reversals", + "data": [] + }, + "balance_transaction": "txn_16VgVT2deYoXyGRTAZWHoXeM", + "destination": "acct_16VgVSGFCgjLPPF1", + "destination_payment": "py_16VgVTGFCgjLPPF1tnXeeuXP", + "description": null, + "failure_message": null, + "failure_code": null, + "amount_reversed": 0, + "metadata": {}, + "statement_descriptor": null, + "recipient": null, + "source_transaction": "ch_16VgVT2deYoXyGRTgXK5hwZk", + "application_fee": null + }, + { + "id": "tr_16VgVO2deYoXyGRTW6WzQVn1", + "object": "transfer", + "created": 1438598958, + "date": 1438598958, + "livemode": false, + "amount": 103, + "currency": "usd", + "reversed": false, + "status": "paid", + "type": "stripe_account", + "reversals": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/transfers/tr_16VgVO2deYoXyGRTW6WzQVn1/reversals", + "data": [] + }, + "balance_transaction": "txn_16VgVO2deYoXyGRTlMMoqqX1", + "destination": "acct_16VgU8IE5a2SIFyu", + "destination_payment": "py_16VgVOIE5a2SIFyurlYFjHEd", + "description": null, + "failure_message": null, + "failure_code": null, + "amount_reversed": 0, + "metadata": {}, + "statement_descriptor": null, + "recipient": null, + "source_transaction": "ch_16VgVO2deYoXyGRTwI07GyTr", + "application_fee": null + }, + { + "id": "tr_16VgUX2deYoXyGRTOnl8sae5", + "object": "transfer", + "created": 1438598905, + "date": 1438598905, + "livemode": false, + "amount": 310, + "currency": "usd", + "reversed": false, + "status": "paid", + "type": "stripe_account", + "reversals": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/transfers/tr_16VgUX2deYoXyGRTOnl8sae5/reversals", + "data": [] + }, + "balance_transaction": "txn_16VgUX2deYoXyGRT6sPtBNkx", + "destination": "acct_16VgUVHCSFl23H6c", + "destination_payment": "py_16VgUXHCSFl23H6cwspOq06B", + "description": null, + "failure_message": null, + "failure_code": null, + "amount_reversed": 0, + "metadata": {}, + "statement_descriptor": null, + "recipient": null, + "source_transaction": "ch_16VgUX2deYoXyGRTRMDCZvKL", + "application_fee": null + } + ] +} diff --git a/t/LWPCache/04-transfers.t/2925d81aadcaf7bb2523a0ff1ecab0b2 b/t/LWPCache/04-transfers.t/2925d81aadcaf7bb2523a0ff1ecab0b2 new file mode 100644 index 0000000..63ad5f1 --- /dev/null +++ b/t/LWPCache/04-transfers.t/2925d81aadcaf7bb2523a0ff1ecab0b2 @@ -0,0 +1,29 @@ +HTTP/1.1 200 OK +Connection: close +Date: Mon, 03 Aug 2015 10:52:24 GMT +Server: nginx +Content-Length: 258 +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_6j8qaTUfIfxahS +Strict-Transport-Security: max-age=31556926; includeSubDomains +Stripe-Version: 2014-12-17 + +{ + "id": "trr_16VgYO2deYoXyGRT2aFycEf6", + "amount": 25, + "currency": "cad", + "created": 1438599144, + "object": "transfer_reversal", + "balance_transaction": "txn_16VgYO2deYoXyGRTFUg5v08I", + "metadata": {}, + "transfer": "tr_16VgYN2deYoXyGRTFOKqJQ35" +} diff --git a/t/LWPCache/04-transfers.t/2fcb9dacce0b8ee30320dd766373d395 b/t/LWPCache/04-transfers.t/2fcb9dacce0b8ee30320dd766373d395 new file mode 100644 index 0000000..5abdebb --- /dev/null +++ b/t/LWPCache/04-transfers.t/2fcb9dacce0b8ee30320dd766373d395 @@ -0,0 +1,50 @@ +HTTP/1.1 200 OK +Connection: close +Date: Mon, 03 Aug 2015 10:52:24 GMT +Server: nginx +Content-Length: 794 +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_6j8q2YwGLGrVcX +Strict-Transport-Security: max-age=31556926; includeSubDomains +Stripe-Version: 2014-12-17 + +{ + "id": "tr_16VgYN2deYoXyGRTFOKqJQ35", + "object": "transfer", + "created": 1438599143, + "date": 1438599143, + "livemode": false, + "amount": 50, + "currency": "cad", + "reversed": false, + "status": "pending", + "type": "stripe_account", + "reversals": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/transfers/tr_16VgYN2deYoXyGRTFOKqJQ35/reversals", + "data": [] + }, + "balance_transaction": "txn_16VgYN2deYoXyGRTTSCQlw0o", + "destination": "acct_16VgYIGd7APchvOl", + "destination_payment": "py_16VgYNGd7APchvOlmiw4iQoX", + "description": null, + "failure_message": null, + "failure_code": null, + "amount_reversed": 0, + "metadata": {}, + "statement_descriptor": null, + "recipient": null, + "source_transaction": null, + "application_fee": null +} diff --git a/t/LWPCache/04-transfers.t/38920b8235800caaef8e21e2f44864df b/t/LWPCache/04-transfers.t/38920b8235800caaef8e21e2f44864df new file mode 100644 index 0000000..b359a4d --- /dev/null +++ b/t/LWPCache/04-transfers.t/38920b8235800caaef8e21e2f44864df @@ -0,0 +1,52 @@ +HTTP/1.1 200 OK +Connection: close +Date: Mon, 03 Aug 2015 10:52:20 GMT +Server: nginx +Content-Length: 812 +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_6j8qX8qQSlnfah +Strict-Transport-Security: max-age=31556926; includeSubDomains +Stripe-Version: 2014-12-17 + +{ + "id": "tr_16VgYJ2deYoXyGRTeWMJg6iB", + "object": "transfer", + "created": 1438599139, + "date": 1438599139, + "livemode": false, + "amount": 100, + "currency": "cad", + "reversed": false, + "status": "paid", + "type": "stripe_account", + "reversals": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/transfers/tr_16VgYJ2deYoXyGRTeWMJg6iB/reversals", + "data": [] + }, + "balance_transaction": "txn_16VgYJ2deYoXyGRTSweyqxaG", + "destination": "acct_16VgYIGd7APchvOl", + "destination_payment": "py_16VgYJGd7APchvOlCrIxQpfX", + "description": null, + "failure_message": null, + "failure_code": null, + "amount_reversed": 0, + "metadata": { + "foo": "bar" + }, + "statement_descriptor": null, + "recipient": null, + "source_transaction": null, + "application_fee": null +} diff --git a/t/LWPCache/04-transfers.t/4307c39989fa6f24557d42c53032912e b/t/LWPCache/04-transfers.t/4307c39989fa6f24557d42c53032912e new file mode 100644 index 0000000..579561b --- /dev/null +++ b/t/LWPCache/04-transfers.t/4307c39989fa6f24557d42c53032912e @@ -0,0 +1,24 @@ +HTTP/1.1 400 Bad Request +Connection: close +Date: Mon, 03 Aug 2015 10:52:21 GMT +Server: nginx +Content-Length: 163 +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_6j8qDmMIodGifM +Stripe-Version: 2014-12-17 + +{ + "error": { + "type": "invalid_request_error", + "message": "Transfers to non-Stripe accounts can currently only be reversed while they are pending." + } +} diff --git a/t/LWPCache/04-transfers.t/60c295623fdc5e8d6bf3297838fb8764 b/t/LWPCache/04-transfers.t/60c295623fdc5e8d6bf3297838fb8764 new file mode 100644 index 0000000..6e335aa --- /dev/null +++ b/t/LWPCache/04-transfers.t/60c295623fdc5e8d6bf3297838fb8764 @@ -0,0 +1,34 @@ +HTTP/1.1 200 OK +Connection: close +Date: Mon, 03 Aug 2015 10:52:19 GMT +Server: nginx +Content-Length: 327 +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_6j8pKoeVRcEv2M +Strict-Transport-Security: max-age=31556926; includeSubDomains +Stripe-Account: acct_16VgYIGd7APchvOl +Stripe-Version: 2014-12-17 + +{ + "object": "bank_account", + "id": "ba_16VgYJGd7APchvOlgBFmCt1P", + "last4": "6789", + "country": "CA", + "currency": "cad", + "status": "new", + "fingerprint": "Hx41SF3tdxGOa0Ba", + "routing_number": "11000-000", + "bank_name": null, + "account": "acct_16VgYIGd7APchvOl", + "default_for_currency": true, + "metadata": {} +} diff --git a/t/LWPCache/04-transfers.t/6ca68d9dc7c0aa75c20e44106f8c7498 b/t/LWPCache/04-transfers.t/6ca68d9dc7c0aa75c20e44106f8c7498 new file mode 100644 index 0000000..6f4ccd9 --- /dev/null +++ b/t/LWPCache/04-transfers.t/6ca68d9dc7c0aa75c20e44106f8c7498 @@ -0,0 +1,61 @@ +HTTP/1.1 200 OK +Connection: close +Date: Mon, 03 Aug 2015 10:52:25 GMT +Server: nginx +Content-Length: 1020 +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_6j8qGSNmzaC0IC +Strict-Transport-Security: max-age=31556926; includeSubDomains +Stripe-Account: acct_16VgYIGd7APchvOl +Stripe-Version: 2014-12-17 + +{ + "id": "tr_16VgYPGd7APchvOljRuxZHlH", + "object": "transfer", + "created": 1438599145, + "date": 1438599145, + "livemode": false, + "amount": 50, + "currency": "cad", + "reversed": false, + "status": "pending", + "type": "bank_account", + "reversals": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/transfers/tr_16VgYPGd7APchvOljRuxZHlH/reversals", + "data": [] + }, + "balance_transaction": "txn_16VgYPGd7APchvOlVdpu5WEX", + "bank_account": { + "object": "bank_account", + "id": "ba_16VgYJGd7APchvOlgBFmCt1P", + "last4": "6789", + "country": "CA", + "currency": "cad", + "status": "new", + "fingerprint": "Hx41SF3tdxGOa0Ba", + "routing_number": "11000-000", + "bank_name": null + }, + "destination": "ba_16VgYJGd7APchvOlgBFmCt1P", + "description": null, + "failure_message": null, + "failure_code": null, + "amount_reversed": 0, + "metadata": {}, + "statement_descriptor": null, + "recipient": null, + "source_transaction": null, + "application_fee": null +} diff --git a/t/LWPCache/04-transfers.t/7291ff89c910b0c28d95f31a9a777e30 b/t/LWPCache/04-transfers.t/7291ff89c910b0c28d95f31a9a777e30 new file mode 100644 index 0000000..3b0e80b --- /dev/null +++ b/t/LWPCache/04-transfers.t/7291ff89c910b0c28d95f31a9a777e30 @@ -0,0 +1,52 @@ +HTTP/1.1 200 OK +Connection: close +Date: Mon, 03 Aug 2015 10:52:22 GMT +Server: nginx +Content-Length: 850 +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_6j8qMwji3jT9qn +Strict-Transport-Security: max-age=31556926; includeSubDomains +Stripe-Version: 2014-12-17 + +{ + "id": "tr_16VgYM2deYoXyGRTBxFRWURw", + "object": "transfer", + "created": 1438599142, + "date": 1438599142, + "livemode": false, + "amount": 100, + "currency": "cad", + "reversed": false, + "status": "pending", + "type": "stripe_account", + "reversals": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/transfers/tr_16VgYM2deYoXyGRTBxFRWURw/reversals", + "data": [] + }, + "balance_transaction": "txn_16VgYM2deYoXyGRTgWhkXq8j", + "destination": "acct_16VgYIGd7APchvOl", + "destination_payment": "py_16VgYMGd7APchvOlYhzUPAau", + "description": null, + "failure_message": null, + "failure_code": null, + "amount_reversed": 0, + "metadata": { + "tester": "WebService::Stripe::create_reversal" + }, + "statement_descriptor": null, + "recipient": null, + "source_transaction": null, + "application_fee": null +} diff --git a/t/LWPCache/04-transfers.t/7ca29aa62255c0ff11d4a92e3f7a5b90 b/t/LWPCache/04-transfers.t/7ca29aa62255c0ff11d4a92e3f7a5b90 new file mode 100644 index 0000000..7a971e5 --- /dev/null +++ b/t/LWPCache/04-transfers.t/7ca29aa62255c0ff11d4a92e3f7a5b90 @@ -0,0 +1,128 @@ +HTTP/1.1 200 OK +Connection: close +Date: Mon, 03 Aug 2015 10:52:18 GMT +Server: nginx +Content-Length: 2450 +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_6j8piUDsubb4Hf +Strict-Transport-Security: max-age=31556926; includeSubDomains +Stripe-Version: 2014-12-17 + +{ + "id": "acct_16VgYIGd7APchvOl", + "email": null, + "statement_descriptor": null, + "display_name": null, + "timezone": "Etc/UTC", + "details_submitted": false, + "charges_enabled": true, + "transfers_enabled": false, + "currencies_supported": [ + "cad", + "usd" + ], + "default_currency": "cad", + "country": "CA", + "object": "account", + "business_name": null, + "business_url": null, + "support_phone": null, + "business_logo": null, + "metadata": {}, + "managed": true, + "product_description": null, + "debit_negative_balances": false, + "bank_accounts": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/accounts/acct_16VgYIGd7APchvOl/bank_accounts", + "data": [] + }, + "external_accounts": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/accounts/acct_16VgYIGd7APchvOl/external_accounts", + "data": [] + }, + "verification": { + "fields_needed": [ + "legal_entity.first_name", + "legal_entity.last_name", + "legal_entity.dob.day", + "legal_entity.dob.month", + "legal_entity.dob.year", + "legal_entity.type", + "legal_entity.address.line1", + "legal_entity.address.city", + "legal_entity.address.state", + "legal_entity.address.postal_code", + "bank_account", + "tos_acceptance.ip", + "tos_acceptance.date" + ], + "due_by": null, + "disabled_reason": null, + "contacted": false + }, + "transfer_schedule": { + "delay_days": 7, + "interval": "daily" + }, + "decline_charge_on": { + "cvc_failure": false, + "avs_failure": false + }, + "tos_acceptance": { + "ip": null, + "date": null, + "user_agent": null + }, + "legal_entity": { + "type": null, + "business_name": null, + "address": { + "line1": null, + "line2": null, + "city": null, + "state": null, + "postal_code": null, + "country": "CA" + }, + "first_name": null, + "last_name": null, + "personal_address": { + "line1": null, + "line2": null, + "city": null, + "state": null, + "postal_code": null, + "country": null + }, + "dob": { + "day": null, + "month": null, + "year": null + }, + "additional_owners": null, + "verification": { + "status": "unverified", + "document": null, + "details": null + } + }, + "keys": { + "secret": "sk_test_p0MCsfNfXjdKV4eRH9vhnXjO", + "publishable": "pk_test_2vtqEsXJGoy1CvsK6PTiwXQA" + } +} diff --git a/t/LWPCache/04-transfers.t/aaad3c6fb11e132c75fa1ddd54408dca b/t/LWPCache/04-transfers.t/aaad3c6fb11e132c75fa1ddd54408dca new file mode 100644 index 0000000..8a1bbbb --- /dev/null +++ b/t/LWPCache/04-transfers.t/aaad3c6fb11e132c75fa1ddd54408dca @@ -0,0 +1,52 @@ +HTTP/1.1 200 OK +Connection: close +Date: Mon, 03 Aug 2015 10:52:20 GMT +Server: nginx +Content-Length: 812 +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_6j8qmwrzaAVAda +Strict-Transport-Security: max-age=31556926; includeSubDomains +Stripe-Version: 2014-12-17 + +{ + "id": "tr_16VgYJ2deYoXyGRTeWMJg6iB", + "object": "transfer", + "created": 1438599139, + "date": 1438599139, + "livemode": false, + "amount": 100, + "currency": "cad", + "reversed": false, + "status": "paid", + "type": "stripe_account", + "reversals": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/transfers/tr_16VgYJ2deYoXyGRTeWMJg6iB/reversals", + "data": [] + }, + "balance_transaction": "txn_16VgYJ2deYoXyGRTSweyqxaG", + "destination": "acct_16VgYIGd7APchvOl", + "destination_payment": "py_16VgYJGd7APchvOlCrIxQpfX", + "description": null, + "failure_message": null, + "failure_code": null, + "amount_reversed": 0, + "metadata": { + "foo": "bar" + }, + "statement_descriptor": null, + "recipient": null, + "source_transaction": null, + "application_fee": null +} diff --git a/t/LWPCache/04-transfers.t/daff4961177bb2e62f7ba6267ae7998e b/t/LWPCache/04-transfers.t/daff4961177bb2e62f7ba6267ae7998e new file mode 100644 index 0000000..965d826 --- /dev/null +++ b/t/LWPCache/04-transfers.t/daff4961177bb2e62f7ba6267ae7998e @@ -0,0 +1,25 @@ +HTTP/1.1 400 Bad Request +Connection: close +Date: Mon, 03 Aug 2015 10:52:25 GMT +Server: nginx +Content-Length: 163 +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_6j8qKaEHRPx9nO +Stripe-Account: acct_16VgYIGd7APchvOl +Stripe-Version: 2014-12-17 + +{ + "error": { + "type": "invalid_request_error", + "message": "Transfers to non-Stripe accounts can currently only be reversed while they are pending." + } +} diff --git a/t/LWPCache/06-balance.t/7fcfa459f632ca0e0b85e0302b298687 b/t/LWPCache/06-balance.t/7fcfa459f632ca0e0b85e0302b298687 new file mode 100644 index 0000000..cf1a3bf --- /dev/null +++ b/t/LWPCache/06-balance.t/7fcfa459f632ca0e0b85e0302b298687 @@ -0,0 +1,51 @@ +HTTP/1.1 200 OK +Connection: close +Date: Mon, 03 Aug 2015 10:52:26 GMT +Server: nginx +Content-Length: 447 +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_6j8qJrdVszPDMz +Strict-Transport-Security: max-age=31556926; includeSubDomains +Stripe-Version: 2014-12-17 + +{ + "pending": [ + { + "amount": 0, + "currency": "cad" + }, + { + "amount": 0, + "currency": "gbp" + }, + { + "amount": 900, + "currency": "usd" + } + ], + "available": [ + { + "amount": -3423895, + "currency": "cad" + }, + { + "amount": -3453323, + "currency": "gbp" + }, + { + "amount": 188199672, + "currency": "usd" + } + ], + "livemode": false, + "object": "balance" +} diff --git a/t/LWPCache/07-options.t/06f9d7882f1595c062950ff1ca607e55 b/t/LWPCache/07-options.t/06f9d7882f1595c062950ff1ca607e55 new file mode 100644 index 0000000..81868ba --- /dev/null +++ b/t/LWPCache/07-options.t/06f9d7882f1595c062950ff1ca607e55 @@ -0,0 +1,26 @@ +HTTP/1.1 400 Bad Request +Connection: close +Date: Mon, 03 Aug 2015 10:52:30 GMT +Server: nginx +Content-Length: 137 +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_6j8qgHNyUyGTMY +Stripe-Account: acct_16VgYREtIkYj0xKC +Stripe-Version: 2014-12-17 + +{ + "error": { + "type": "invalid_request_error", + "message": "No such customer: cus_6j8qoDN44I0yeJ", + "param": "customer" + } +} diff --git a/t/LWPCache/07-options.t/525499e9d3dd6d63bbecaffe43e4730d b/t/LWPCache/07-options.t/525499e9d3dd6d63bbecaffe43e4730d new file mode 100644 index 0000000..c3e1949 --- /dev/null +++ b/t/LWPCache/07-options.t/525499e9d3dd6d63bbecaffe43e4730d @@ -0,0 +1,54 @@ +HTTP/1.1 200 OK +Connection: close +Date: Mon, 03 Aug 2015 10:52:31 GMT +Server: nginx +Content-Length: 807 +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_6j8qOTTHq27xG3 +Strict-Transport-Security: max-age=31556926; includeSubDomains +Stripe-Account: acct_16VgYREtIkYj0xKC +Stripe-Version: 2014-12-17 + +{ + "id": "tok_16VgYVEtIkYj0xKCNiZpskVC", + "livemode": false, + "created": 1438599151, + "used": false, + "object": "token", + "type": "card", + "card": { + "id": "card_16VgYVEtIkYj0xKC156Bqkc5", + "object": "card", + "last4": "0005", + "brand": "American Express", + "funding": "credit", + "exp_month": 12, + "exp_year": 2020, + "fingerprint": "T8Jy60VAxnbwjeHz", + "country": "US", + "name": null, + "address_line1": null, + "address_line2": null, + "address_city": null, + "address_state": null, + "address_zip": null, + "address_country": null, + "cvc_check": null, + "address_line1_check": null, + "address_zip_check": null, + "tokenization_method": null, + "dynamic_last4": null, + "metadata": {}, + "customer": null + }, + "client_ip": "50.134.65.74" +} diff --git a/t/LWPCache/07-options.t/75b275b544b20f3a5553b081df61f67a b/t/LWPCache/07-options.t/75b275b544b20f3a5553b081df61f67a new file mode 100644 index 0000000..0f39f21 --- /dev/null +++ b/t/LWPCache/07-options.t/75b275b544b20f3a5553b081df61f67a @@ -0,0 +1,105 @@ +HTTP/1.1 200 OK +Connection: close +Date: Mon, 03 Aug 2015 10:52:32 GMT +Server: nginx +Content-Length: 2109 +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_6j8qRQwdw7BIks +Strict-Transport-Security: max-age=31556926; includeSubDomains +Stripe-Account: acct_16VgYREtIkYj0xKC +Stripe-Version: 2014-12-17 + +{ + "id": "ch_16VgYWEtIkYj0xKCaCp8fhlq", + "object": "charge", + "created": 1438599152, + "livemode": false, + "paid": true, + "status": "paid", + "amount": 1000, + "currency": "usd", + "refunded": false, + "source": { + "id": "card_16VgYVEtIkYj0xKC156Bqkc5", + "object": "card", + "last4": "0005", + "brand": "American Express", + "funding": "credit", + "exp_month": 12, + "exp_year": 2020, + "fingerprint": "T8Jy60VAxnbwjeHz", + "country": "US", + "name": null, + "address_line1": null, + "address_line2": null, + "address_city": null, + "address_state": null, + "address_zip": null, + "address_country": null, + "cvc_check": null, + "address_line1_check": null, + "address_zip_check": null, + "tokenization_method": null, + "dynamic_last4": null, + "metadata": {}, + "customer": "cus_6j8qT9jScleTvH" + }, + "captured": true, + "card": { + "id": "card_16VgYVEtIkYj0xKC156Bqkc5", + "object": "card", + "last4": "0005", + "brand": "American Express", + "funding": "credit", + "exp_month": 12, + "exp_year": 2020, + "fingerprint": "T8Jy60VAxnbwjeHz", + "country": "US", + "name": null, + "address_line1": null, + "address_line2": null, + "address_city": null, + "address_state": null, + "address_zip": null, + "address_country": null, + "cvc_check": null, + "address_line1_check": null, + "address_zip_check": null, + "tokenization_method": null, + "dynamic_last4": null, + "metadata": {}, + "customer": "cus_6j8qT9jScleTvH" + }, + "balance_transaction": "txn_16VgYWEtIkYj0xKCt4pTp0FC", + "failure_message": null, + "failure_code": null, + "amount_refunded": 0, + "customer": "cus_6j8qT9jScleTvH", + "invoice": null, + "description": null, + "dispute": null, + "metadata": {}, + "statement_descriptor": null, + "fraud_details": {}, + "receipt_email": null, + "receipt_number": null, + "shipping": null, + "destination": null, + "application_fee": null, + "refunds": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/charges/ch_16VgYWEtIkYj0xKCaCp8fhlq/refunds", + "data": [] + } +} diff --git a/t/LWPCache/07-options.t/7ca29aa62255c0ff11d4a92e3f7a5b90 b/t/LWPCache/07-options.t/7ca29aa62255c0ff11d4a92e3f7a5b90 new file mode 100644 index 0000000..0570ad9 --- /dev/null +++ b/t/LWPCache/07-options.t/7ca29aa62255c0ff11d4a92e3f7a5b90 @@ -0,0 +1,128 @@ +HTTP/1.1 200 OK +Connection: close +Date: Mon, 03 Aug 2015 10:52:27 GMT +Server: nginx +Content-Length: 2450 +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_6j8q6EwbEtisw8 +Strict-Transport-Security: max-age=31556926; includeSubDomains +Stripe-Version: 2014-12-17 + +{ + "id": "acct_16VgYREtIkYj0xKC", + "email": null, + "statement_descriptor": null, + "display_name": null, + "timezone": "Etc/UTC", + "details_submitted": false, + "charges_enabled": true, + "transfers_enabled": false, + "currencies_supported": [ + "cad", + "usd" + ], + "default_currency": "cad", + "country": "CA", + "object": "account", + "business_name": null, + "business_url": null, + "support_phone": null, + "business_logo": null, + "metadata": {}, + "managed": true, + "product_description": null, + "debit_negative_balances": false, + "bank_accounts": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/accounts/acct_16VgYREtIkYj0xKC/bank_accounts", + "data": [] + }, + "external_accounts": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/accounts/acct_16VgYREtIkYj0xKC/external_accounts", + "data": [] + }, + "verification": { + "fields_needed": [ + "legal_entity.first_name", + "legal_entity.last_name", + "legal_entity.dob.day", + "legal_entity.dob.month", + "legal_entity.dob.year", + "legal_entity.type", + "legal_entity.address.line1", + "legal_entity.address.city", + "legal_entity.address.state", + "legal_entity.address.postal_code", + "bank_account", + "tos_acceptance.ip", + "tos_acceptance.date" + ], + "due_by": null, + "disabled_reason": null, + "contacted": false + }, + "transfer_schedule": { + "delay_days": 7, + "interval": "daily" + }, + "decline_charge_on": { + "cvc_failure": false, + "avs_failure": false + }, + "tos_acceptance": { + "ip": null, + "date": null, + "user_agent": null + }, + "legal_entity": { + "type": null, + "business_name": null, + "address": { + "line1": null, + "line2": null, + "city": null, + "state": null, + "postal_code": null, + "country": "CA" + }, + "first_name": null, + "last_name": null, + "personal_address": { + "line1": null, + "line2": null, + "city": null, + "state": null, + "postal_code": null, + "country": null + }, + "dob": { + "day": null, + "month": null, + "year": null + }, + "additional_owners": null, + "verification": { + "status": "unverified", + "document": null, + "details": null + } + }, + "keys": { + "secret": "sk_test_K5Td2ENq6uUba5wnnZnURX9p", + "publishable": "pk_test_kpaq1pyxxPu4Yi3TKRG4caRc" + } +} diff --git a/t/LWPCache/07-options.t/aabdc99321d3f808f4ef53373901d12c b/t/LWPCache/07-options.t/aabdc99321d3f808f4ef53373901d12c new file mode 100644 index 0000000..b2859f4 --- /dev/null +++ b/t/LWPCache/07-options.t/aabdc99321d3f808f4ef53373901d12c @@ -0,0 +1,44 @@ +HTTP/1.1 200 OK +Connection: close +Date: Mon, 03 Aug 2015 10:52:28 GMT +Server: nginx +Content-Length: 588 +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_6j8qOpv9xKE51m +Strict-Transport-Security: max-age=31556926; includeSubDomains +Stripe-Version: 2014-12-17 + +{ + "id": "card_16VgYS2deYoXyGRTpFHJpo8d", + "object": "card", + "last4": "0005", + "brand": "American Express", + "funding": "credit", + "exp_month": 12, + "exp_year": 2020, + "fingerprint": "eoHRNQOCUngK9k9i", + "country": "US", + "name": null, + "address_line1": null, + "address_line2": null, + "address_city": null, + "address_state": null, + "address_zip": null, + "address_country": null, + "cvc_check": null, + "address_line1_check": null, + "address_zip_check": null, + "tokenization_method": null, + "dynamic_last4": null, + "metadata": {}, + "customer": "cus_6j8qoDN44I0yeJ" +} diff --git a/t/LWPCache/07-options.t/bbc6f6f69a493a08ce289827865a1f89 b/t/LWPCache/07-options.t/bbc6f6f69a493a08ce289827865a1f89 new file mode 100644 index 0000000..eae3615 --- /dev/null +++ b/t/LWPCache/07-options.t/bbc6f6f69a493a08ce289827865a1f89 @@ -0,0 +1,45 @@ +HTTP/1.1 200 OK +Connection: close +Date: Mon, 03 Aug 2015 10:52:31 GMT +Server: nginx +Content-Length: 588 +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_6j8qryaXWaC9J5 +Strict-Transport-Security: max-age=31556926; includeSubDomains +Stripe-Account: acct_16VgYREtIkYj0xKC +Stripe-Version: 2014-12-17 + +{ + "id": "card_16VgYVEtIkYj0xKC156Bqkc5", + "object": "card", + "last4": "0005", + "brand": "American Express", + "funding": "credit", + "exp_month": 12, + "exp_year": 2020, + "fingerprint": "T8Jy60VAxnbwjeHz", + "country": "US", + "name": null, + "address_line1": null, + "address_line2": null, + "address_city": null, + "address_state": null, + "address_zip": null, + "address_country": null, + "cvc_check": null, + "address_line1_check": null, + "address_zip_check": null, + "tokenization_method": null, + "dynamic_last4": null, + "metadata": {}, + "customer": "cus_6j8qT9jScleTvH" +} diff --git a/t/LWPCache/07-options.t/bdad59ff4adfc9d8509775e97738eb01 b/t/LWPCache/07-options.t/bdad59ff4adfc9d8509775e97738eb01 new file mode 100644 index 0000000..b39aeca --- /dev/null +++ b/t/LWPCache/07-options.t/bdad59ff4adfc9d8509775e97738eb01 @@ -0,0 +1,104 @@ +HTTP/1.1 200 OK +Connection: close +Date: Mon, 03 Aug 2015 10:52:29 GMT +Server: nginx +Content-Length: 2110 +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_6j8qqFhcJRAzGM +Strict-Transport-Security: max-age=31556926; includeSubDomains +Stripe-Version: 2014-12-17 + +{ + "id": "ch_16VgYT2deYoXyGRTxbDKoG9D", + "object": "charge", + "created": 1438599149, + "livemode": false, + "paid": true, + "status": "paid", + "amount": 1000, + "currency": "usd", + "refunded": false, + "source": { + "id": "card_16VgYS2deYoXyGRTpFHJpo8d", + "object": "card", + "last4": "0005", + "brand": "American Express", + "funding": "credit", + "exp_month": 12, + "exp_year": 2020, + "fingerprint": "eoHRNQOCUngK9k9i", + "country": "US", + "name": null, + "address_line1": null, + "address_line2": null, + "address_city": null, + "address_state": null, + "address_zip": null, + "address_country": null, + "cvc_check": null, + "address_line1_check": null, + "address_zip_check": null, + "tokenization_method": null, + "dynamic_last4": null, + "metadata": {}, + "customer": "cus_6j8qoDN44I0yeJ" + }, + "captured": true, + "card": { + "id": "card_16VgYS2deYoXyGRTpFHJpo8d", + "object": "card", + "last4": "0005", + "brand": "American Express", + "funding": "credit", + "exp_month": 12, + "exp_year": 2020, + "fingerprint": "eoHRNQOCUngK9k9i", + "country": "US", + "name": null, + "address_line1": null, + "address_line2": null, + "address_city": null, + "address_state": null, + "address_zip": null, + "address_country": null, + "cvc_check": null, + "address_line1_check": null, + "address_zip_check": null, + "tokenization_method": null, + "dynamic_last4": null, + "metadata": {}, + "customer": "cus_6j8qoDN44I0yeJ" + }, + "balance_transaction": "txn_16VgYT2deYoXyGRTlQjA95vc", + "failure_message": null, + "failure_code": null, + "amount_refunded": 0, + "customer": "cus_6j8qoDN44I0yeJ", + "invoice": null, + "description": "foo", + "dispute": null, + "metadata": {}, + "statement_descriptor": null, + "fraud_details": {}, + "receipt_email": null, + "receipt_number": null, + "shipping": null, + "destination": null, + "application_fee": null, + "refunds": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/charges/ch_16VgYT2deYoXyGRTxbDKoG9D/refunds", + "data": [] + } +} diff --git a/t/LWPCache/07-options.t/f7693e97f53908ee32fade85f8389398 b/t/LWPCache/07-options.t/f7693e97f53908ee32fade85f8389398 new file mode 100644 index 0000000..e2c48de --- /dev/null +++ b/t/LWPCache/07-options.t/f7693e97f53908ee32fade85f8389398 @@ -0,0 +1,56 @@ +HTTP/1.1 200 OK +Connection: close +Date: Mon, 03 Aug 2015 10:52:30 GMT +Server: nginx +Content-Length: 777 +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_6j8qcn3xjkS5Cq +Strict-Transport-Security: max-age=31556926; includeSubDomains +Stripe-Account: acct_16VgYREtIkYj0xKC +Stripe-Version: 2014-12-17 + +{ + "object": "customer", + "created": 1438599150, + "id": "cus_6j8qT9jScleTvH", + "livemode": false, + "description": null, + "email": null, + "delinquent": false, + "metadata": {}, + "subscriptions": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/customers/cus_6j8qT9jScleTvH/subscriptions", + "data": [] + }, + "discount": null, + "account_balance": 0, + "currency": null, + "cards": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/customers/cus_6j8qT9jScleTvH/cards", + "data": [] + }, + "default_card": null, + "sources": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/customers/cus_6j8qT9jScleTvH/sources", + "data": [] + }, + "default_source": null +} diff --git a/t/LWPCache/08-file-upload.t/3fa5441d0c9786e1bdfa2c654a395ddb b/t/LWPCache/08-file-upload.t/3fa5441d0c9786e1bdfa2c654a395ddb new file mode 100644 index 0000000..995a3d3 --- /dev/null +++ b/t/LWPCache/08-file-upload.t/3fa5441d0c9786e1bdfa2c654a395ddb @@ -0,0 +1,28 @@ +HTTP/1.1 200 OK +Connection: close +Date: Mon, 03 Aug 2015 10:52:34 GMT +Server: nginx +Content-Length: 190 +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/CN=DigiCert SHA2 Secure Server CA +Client-SSL-Cert-Subject: /C=US/ST=California/L=San Francisco/O=Stripe, Inc/CN=*.stripe.com +Client-SSL-Cipher: ECDHE-RSA-AES128-SHA256 +Client-SSL-Socket-Class: IO::Socket::SSL +Strict-Transport-Security: max-age=31556926; includeSubDomains +Stripe-Account: acct_16VgYXCqs4KXrebF +Stripe-Version: 2014-12-17 + +{ + "id": "file_16VgYYCqs4KXrebFqgCAwvu7", + "created": 1438599154, + "size": 14167, + "purpose": "identity_document", + "object": "file_upload", + "url": null, + "mimetype": "image/jpeg" +} diff --git a/t/LWPCache/08-file-upload.t/7ca29aa62255c0ff11d4a92e3f7a5b90 b/t/LWPCache/08-file-upload.t/7ca29aa62255c0ff11d4a92e3f7a5b90 new file mode 100644 index 0000000..4b6a25f --- /dev/null +++ b/t/LWPCache/08-file-upload.t/7ca29aa62255c0ff11d4a92e3f7a5b90 @@ -0,0 +1,128 @@ +HTTP/1.1 200 OK +Connection: close +Date: Mon, 03 Aug 2015 10:52:33 GMT +Server: nginx +Content-Length: 2450 +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_6j8qSKhCEeqbZf +Strict-Transport-Security: max-age=31556926; includeSubDomains +Stripe-Version: 2014-12-17 + +{ + "id": "acct_16VgYXCqs4KXrebF", + "email": null, + "statement_descriptor": null, + "display_name": null, + "timezone": "Etc/UTC", + "details_submitted": false, + "charges_enabled": true, + "transfers_enabled": false, + "currencies_supported": [ + "cad", + "usd" + ], + "default_currency": "cad", + "country": "CA", + "object": "account", + "business_name": null, + "business_url": null, + "support_phone": null, + "business_logo": null, + "metadata": {}, + "managed": true, + "product_description": null, + "debit_negative_balances": false, + "bank_accounts": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/accounts/acct_16VgYXCqs4KXrebF/bank_accounts", + "data": [] + }, + "external_accounts": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/accounts/acct_16VgYXCqs4KXrebF/external_accounts", + "data": [] + }, + "verification": { + "fields_needed": [ + "legal_entity.first_name", + "legal_entity.last_name", + "legal_entity.dob.day", + "legal_entity.dob.month", + "legal_entity.dob.year", + "legal_entity.type", + "legal_entity.address.line1", + "legal_entity.address.city", + "legal_entity.address.state", + "legal_entity.address.postal_code", + "bank_account", + "tos_acceptance.ip", + "tos_acceptance.date" + ], + "due_by": null, + "disabled_reason": null, + "contacted": false + }, + "transfer_schedule": { + "delay_days": 7, + "interval": "daily" + }, + "decline_charge_on": { + "cvc_failure": false, + "avs_failure": false + }, + "tos_acceptance": { + "ip": null, + "date": null, + "user_agent": null + }, + "legal_entity": { + "type": null, + "business_name": null, + "address": { + "line1": null, + "line2": null, + "city": null, + "state": null, + "postal_code": null, + "country": "CA" + }, + "first_name": null, + "last_name": null, + "personal_address": { + "line1": null, + "line2": null, + "city": null, + "state": null, + "postal_code": null, + "country": null + }, + "dob": { + "day": null, + "month": null, + "year": null + }, + "additional_owners": null, + "verification": { + "status": "unverified", + "document": null, + "details": null + } + }, + "keys": { + "secret": "sk_test_eXga4XCSSnNowP36VlddlHxj", + "publishable": "pk_test_ijzzZoG66L05APAf9BVkIu39" + } +} diff --git a/t/LWPCache/08-file-upload.t/dc4b3907448cf51fe96209a38fa95bd3 b/t/LWPCache/08-file-upload.t/dc4b3907448cf51fe96209a38fa95bd3 new file mode 100644 index 0000000..cae554c --- /dev/null +++ b/t/LWPCache/08-file-upload.t/dc4b3907448cf51fe96209a38fa95bd3 @@ -0,0 +1,125 @@ +HTTP/1.1 200 OK +Connection: close +Date: Mon, 03 Aug 2015 10:52:35 GMT +Server: nginx +Content-Length: 2353 +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_6j8qNu9jcP7P5B +Strict-Transport-Security: max-age=31556926; includeSubDomains +Stripe-Account: acct_16VgYXCqs4KXrebF +Stripe-Version: 2014-12-17 + +{ + "id": "acct_16VgYXCqs4KXrebF", + "email": null, + "statement_descriptor": null, + "display_name": null, + "timezone": "Etc/UTC", + "details_submitted": false, + "charges_enabled": true, + "transfers_enabled": false, + "currencies_supported": [ + "cad", + "usd" + ], + "default_currency": "cad", + "country": "CA", + "object": "account", + "business_name": null, + "business_url": null, + "support_phone": null, + "business_logo": null, + "metadata": {}, + "managed": true, + "product_description": null, + "debit_negative_balances": false, + "bank_accounts": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/accounts/acct_16VgYXCqs4KXrebF/bank_accounts", + "data": [] + }, + "external_accounts": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/accounts/acct_16VgYXCqs4KXrebF/external_accounts", + "data": [] + }, + "verification": { + "fields_needed": [ + "legal_entity.first_name", + "legal_entity.last_name", + "legal_entity.dob.day", + "legal_entity.dob.month", + "legal_entity.dob.year", + "legal_entity.type", + "legal_entity.address.line1", + "legal_entity.address.city", + "legal_entity.address.state", + "legal_entity.address.postal_code", + "bank_account", + "tos_acceptance.ip", + "tos_acceptance.date" + ], + "due_by": null, + "disabled_reason": null, + "contacted": false + }, + "transfer_schedule": { + "delay_days": 7, + "interval": "daily" + }, + "decline_charge_on": { + "cvc_failure": false, + "avs_failure": false + }, + "tos_acceptance": { + "ip": null, + "date": null, + "user_agent": null + }, + "legal_entity": { + "type": null, + "business_name": null, + "address": { + "line1": null, + "line2": null, + "city": null, + "state": null, + "postal_code": null, + "country": "CA" + }, + "first_name": null, + "last_name": null, + "personal_address": { + "line1": null, + "line2": null, + "city": null, + "state": null, + "postal_code": null, + "country": null + }, + "dob": { + "day": null, + "month": null, + "year": null + }, + "additional_owners": null, + "verification": { + "status": "pending", + "document": "file_16VgYYCqs4KXrebFqgCAwvu7", + "details": null + } + } +} diff --git a/t/LWPCache/09-refunds.t/0624a08c6c2c1986c675be393c041717 b/t/LWPCache/09-refunds.t/0624a08c6c2c1986c675be393c041717 new file mode 100644 index 0000000..a018750 --- /dev/null +++ b/t/LWPCache/09-refunds.t/0624a08c6c2c1986c675be393c041717 @@ -0,0 +1,31 @@ +HTTP/1.1 200 OK +Connection: close +Date: Mon, 03 Aug 2015 10:52:38 GMT +Server: nginx +Content-Length: 264 +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_6j8qY2HgKiSUFy +Strict-Transport-Security: max-age=31556926; includeSubDomains +Stripe-Version: 2014-12-17 + +{ + "id": "re_16VgYb2deYoXyGRTLBu51Djc", + "amount": 1000, + "currency": "usd", + "created": 1438599157, + "object": "refund", + "balance_transaction": null, + "metadata": {}, + "charge": "ch_16VgYb2deYoXyGRTrRpo3PBY", + "receipt_number": null, + "reason": null +} diff --git a/t/LWPCache/09-refunds.t/09458d761a16f41d433b7b456ddedc91 b/t/LWPCache/09-refunds.t/09458d761a16f41d433b7b456ddedc91 new file mode 100644 index 0000000..9a4124e --- /dev/null +++ b/t/LWPCache/09-refunds.t/09458d761a16f41d433b7b456ddedc91 @@ -0,0 +1,104 @@ +HTTP/1.1 200 OK +Connection: close +Date: Mon, 03 Aug 2015 10:52:37 GMT +Server: nginx +Content-Length: 2060 +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_6j8q0w46mVTAby +Strict-Transport-Security: max-age=31556926; includeSubDomains +Stripe-Version: 2014-12-17 + +{ + "id": "ch_16VgYb2deYoXyGRTrRpo3PBY", + "object": "charge", + "created": 1438599157, + "livemode": false, + "paid": true, + "status": "paid", + "amount": 1000, + "currency": "usd", + "refunded": false, + "source": { + "id": "card_16VgYa2deYoXyGRTnf2ctEJh", + "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": null, + "address_line1_check": null, + "address_zip_check": null, + "tokenization_method": null, + "dynamic_last4": null, + "metadata": {}, + "customer": "cus_6j8qEYneKXX1xz" + }, + "captured": false, + "card": { + "id": "card_16VgYa2deYoXyGRTnf2ctEJh", + "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": null, + "address_line1_check": null, + "address_zip_check": null, + "tokenization_method": null, + "dynamic_last4": null, + "metadata": {}, + "customer": "cus_6j8qEYneKXX1xz" + }, + "balance_transaction": null, + "failure_message": null, + "failure_code": null, + "amount_refunded": 0, + "customer": "cus_6j8qEYneKXX1xz", + "invoice": null, + "description": null, + "dispute": null, + "metadata": {}, + "statement_descriptor": null, + "fraud_details": {}, + "receipt_email": null, + "receipt_number": null, + "shipping": null, + "destination": null, + "application_fee": null, + "refunds": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/charges/ch_16VgYb2deYoXyGRTrRpo3PBY/refunds", + "data": [] + } +} diff --git a/t/LWPCache/09-refunds.t/32e525c99bcae4afc3e92211bc9215a3 b/t/LWPCache/09-refunds.t/32e525c99bcae4afc3e92211bc9215a3 new file mode 100644 index 0000000..25791bf --- /dev/null +++ b/t/LWPCache/09-refunds.t/32e525c99bcae4afc3e92211bc9215a3 @@ -0,0 +1,29 @@ +HTTP/1.1 200 OK +Connection: close +Date: Mon, 03 Aug 2015 10:52:41 GMT +Server: nginx +Content-Length: 227 +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_6j8qDiHIMUMKon +Strict-Transport-Security: max-age=31556926; includeSubDomains +Stripe-Version: 2014-12-17 + +{ + "id": "fr_6j8qLVtFMUXITP", + "amount": 200, + "currency": "usd", + "created": 1438599161, + "object": "fee_refund", + "balance_transaction": "txn_16VgYf2deYoXyGRTI5YxnqKn", + "metadata": {}, + "fee": "fee_6j8qJNACest9A4" +} diff --git a/t/LWPCache/09-refunds.t/483999a6a5ad234c4b95c8c43163594a b/t/LWPCache/09-refunds.t/483999a6a5ad234c4b95c8c43163594a new file mode 100644 index 0000000..9cb3d8c --- /dev/null +++ b/t/LWPCache/09-refunds.t/483999a6a5ad234c4b95c8c43163594a @@ -0,0 +1,105 @@ +HTTP/1.1 200 OK +Connection: close +Date: Mon, 03 Aug 2015 10:52:41 GMT +Server: nginx +Content-Length: 2165 +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_6j8qTKtvRJSZWs +Strict-Transport-Security: max-age=31556926; includeSubDomains +Stripe-Version: 2014-12-17 + +{ + "id": "ch_16VgYe2deYoXyGRTpHe3WUYR", + "object": "charge", + "created": 1438599160, + "livemode": false, + "paid": true, + "status": "paid", + "amount": 1000, + "currency": "usd", + "refunded": false, + "source": { + "id": "card_16VgYa2deYoXyGRTnf2ctEJh", + "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": null, + "address_line1_check": null, + "address_zip_check": null, + "tokenization_method": null, + "dynamic_last4": null, + "metadata": {}, + "customer": "cus_6j8qEYneKXX1xz" + }, + "captured": true, + "card": { + "id": "card_16VgYa2deYoXyGRTnf2ctEJh", + "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": null, + "address_line1_check": null, + "address_zip_check": null, + "tokenization_method": null, + "dynamic_last4": null, + "metadata": {}, + "customer": "cus_6j8qEYneKXX1xz" + }, + "balance_transaction": "txn_16VgYe2deYoXyGRTSI3D9Puf", + "failure_message": null, + "failure_code": null, + "amount_refunded": 0, + "customer": "cus_6j8qEYneKXX1xz", + "invoice": null, + "description": null, + "dispute": null, + "metadata": {}, + "statement_descriptor": null, + "fraud_details": {}, + "transfer": "tr_16VgYe2deYoXyGRTruVHQsuT", + "receipt_email": null, + "receipt_number": null, + "shipping": null, + "destination": "acct_16VgYdGDq6XjziAp", + "application_fee": "fee_6j8qJNACest9A4", + "refunds": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/charges/ch_16VgYe2deYoXyGRTpHe3WUYR/refunds", + "data": [] + } +} diff --git a/t/LWPCache/09-refunds.t/49c5a391bbe8bd49c79d2730ea6353b7 b/t/LWPCache/09-refunds.t/49c5a391bbe8bd49c79d2730ea6353b7 new file mode 100644 index 0000000..bf12fff --- /dev/null +++ b/t/LWPCache/09-refunds.t/49c5a391bbe8bd49c79d2730ea6353b7 @@ -0,0 +1,258 @@ +HTTP/1.1 200 OK +Connection: close +Date: Mon, 03 Aug 2015 10:52:40 GMT +Server: nginx +Content-Length: 3775 +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_6j8quRBF6kf3hn +Strict-Transport-Security: max-age=31556926; includeSubDomains +Stripe-Version: 2014-12-17 + +{ + "id": "acct_16VgYdGDq6XjziAp", + "email": null, + "statement_descriptor": null, + "display_name": null, + "timezone": "Etc/UTC", + "details_submitted": false, + "charges_enabled": true, + "transfers_enabled": false, + "currencies_supported": [ + "usd", + "aed", + "afn", + "all", + "amd", + "ang", + "aoa", + "ars", + "aud", + "awg", + "azn", + "bam", + "bbd", + "bdt", + "bgn", + "bif", + "bmd", + "bnd", + "bob", + "brl", + "bsd", + "bwp", + "bzd", + "cad", + "cdf", + "chf", + "clp", + "cny", + "cop", + "crc", + "cve", + "czk", + "djf", + "dkk", + "dop", + "dzd", + "egp", + "etb", + "eur", + "fjd", + "fkp", + "gbp", + "gel", + "gip", + "gmd", + "gnf", + "gtq", + "gyd", + "hkd", + "hnl", + "hrk", + "htg", + "huf", + "idr", + "ils", + "inr", + "isk", + "jmd", + "jpy", + "kes", + "kgs", + "khr", + "kmf", + "krw", + "kyd", + "kzt", + "lak", + "lbp", + "lkr", + "lrd", + "lsl", + "ltl", + "mad", + "mdl", + "mga", + "mkd", + "mnt", + "mop", + "mro", + "mur", + "mvr", + "mwk", + "mxn", + "myr", + "mzn", + "nad", + "ngn", + "nio", + "nok", + "npr", + "nzd", + "pab", + "pen", + "pgk", + "php", + "pkr", + "pln", + "pyg", + "qar", + "ron", + "rsd", + "rub", + "rwf", + "sar", + "sbd", + "scr", + "sek", + "sgd", + "shp", + "sll", + "sos", + "srd", + "std", + "svc", + "szl", + "thb", + "tjs", + "top", + "try", + "ttd", + "twd", + "tzs", + "uah", + "ugx", + "uyu", + "uzs", + "vnd", + "vuv", + "wst", + "xaf", + "xcd", + "xof", + "xpf", + "yer", + "zar", + "zmw" + ], + "default_currency": "usd", + "country": "US", + "object": "account", + "business_name": null, + "business_url": null, + "support_phone": null, + "business_logo": null, + "metadata": {}, + "managed": true, + "product_description": null, + "debit_negative_balances": false, + "bank_accounts": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/accounts/acct_16VgYdGDq6XjziAp/bank_accounts", + "data": [] + }, + "external_accounts": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/accounts/acct_16VgYdGDq6XjziAp/external_accounts", + "data": [] + }, + "verification": { + "fields_needed": [ + "legal_entity.first_name", + "legal_entity.last_name", + "legal_entity.dob.day", + "legal_entity.dob.month", + "legal_entity.dob.year", + "legal_entity.type", + "bank_account", + "tos_acceptance.ip", + "tos_acceptance.date" + ], + "due_by": null, + "disabled_reason": null, + "contacted": false + }, + "transfer_schedule": { + "delay_days": 2, + "interval": "daily" + }, + "decline_charge_on": { + "cvc_failure": false, + "avs_failure": false + }, + "tos_acceptance": { + "ip": null, + "date": null, + "user_agent": null + }, + "legal_entity": { + "type": null, + "business_name": null, + "address": { + "line1": null, + "line2": null, + "city": null, + "state": null, + "postal_code": null, + "country": "US" + }, + "first_name": null, + "last_name": null, + "personal_address": { + "line1": null, + "line2": null, + "city": null, + "state": null, + "postal_code": null, + "country": null + }, + "dob": { + "day": null, + "month": null, + "year": null + }, + "additional_owners": null, + "verification": { + "status": "unverified", + "document": null, + "details": null + } + }, + "keys": { + "secret": "sk_test_GjumU7NzgHtsRbJ35DIE9AtX", + "publishable": "pk_test_Ucr6W2zV8u5JJhiri7IWQIQa" + } +} diff --git a/t/LWPCache/09-refunds.t/6d9f7fb79eed6cb4a3255f800eb1b82e b/t/LWPCache/09-refunds.t/6d9f7fb79eed6cb4a3255f800eb1b82e new file mode 100644 index 0000000..b7904f6 --- /dev/null +++ b/t/LWPCache/09-refunds.t/6d9f7fb79eed6cb4a3255f800eb1b82e @@ -0,0 +1,44 @@ +HTTP/1.1 200 OK +Connection: close +Date: Mon, 03 Aug 2015 10:52:36 GMT +Server: nginx +Content-Length: 576 +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_6j8qETBlyL2XGt +Strict-Transport-Security: max-age=31556926; includeSubDomains +Stripe-Version: 2014-12-17 + +{ + "id": "card_16VgYa2deYoXyGRTnf2ctEJh", + "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": null, + "address_line1_check": null, + "address_zip_check": null, + "tokenization_method": null, + "dynamic_last4": null, + "metadata": {}, + "customer": "cus_6j8qEYneKXX1xz" +} diff --git a/t/LWPCache/09-refunds.t/aa481f34e3a8427ae11a1124705406d2 b/t/LWPCache/09-refunds.t/aa481f34e3a8427ae11a1124705406d2 new file mode 100644 index 0000000..4ef78a9 --- /dev/null +++ b/t/LWPCache/09-refunds.t/aa481f34e3a8427ae11a1124705406d2 @@ -0,0 +1,104 @@ +HTTP/1.1 200 OK +Connection: close +Date: Mon, 03 Aug 2015 10:52:38 GMT +Server: nginx +Content-Length: 2085 +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_6j8qZkekj9UAmX +Strict-Transport-Security: max-age=31556926; includeSubDomains +Stripe-Version: 2014-12-17 + +{ + "id": "ch_16VgYc2deYoXyGRTLay8lDF9", + "object": "charge", + "created": 1438599158, + "livemode": false, + "paid": true, + "status": "paid", + "amount": 1000, + "currency": "usd", + "refunded": false, + "source": { + "id": "card_16VgYa2deYoXyGRTnf2ctEJh", + "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": null, + "address_line1_check": null, + "address_zip_check": null, + "tokenization_method": null, + "dynamic_last4": null, + "metadata": {}, + "customer": "cus_6j8qEYneKXX1xz" + }, + "captured": true, + "card": { + "id": "card_16VgYa2deYoXyGRTnf2ctEJh", + "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": null, + "address_line1_check": null, + "address_zip_check": null, + "tokenization_method": null, + "dynamic_last4": null, + "metadata": {}, + "customer": "cus_6j8qEYneKXX1xz" + }, + "balance_transaction": "txn_16VgYc2deYoXyGRTRB4QxSTm", + "failure_message": null, + "failure_code": null, + "amount_refunded": 0, + "customer": "cus_6j8qEYneKXX1xz", + "invoice": null, + "description": null, + "dispute": null, + "metadata": {}, + "statement_descriptor": null, + "fraud_details": {}, + "receipt_email": null, + "receipt_number": null, + "shipping": null, + "destination": null, + "application_fee": null, + "refunds": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/charges/ch_16VgYc2deYoXyGRTLay8lDF9/refunds", + "data": [] + } +} diff --git a/t/LWPCache/09-refunds.t/cb3e32879256e21695cbd25e0bdf62ee b/t/LWPCache/09-refunds.t/cb3e32879256e21695cbd25e0bdf62ee new file mode 100644 index 0000000..2289e5c --- /dev/null +++ b/t/LWPCache/09-refunds.t/cb3e32879256e21695cbd25e0bdf62ee @@ -0,0 +1,55 @@ +HTTP/1.1 200 OK +Connection: close +Date: Mon, 03 Aug 2015 10:52:36 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_6j8qKDyY9SZZGZ +Strict-Transport-Security: max-age=31556926; includeSubDomains +Stripe-Version: 2014-12-17 + +{ + "object": "customer", + "created": 1438599156, + "id": "cus_6j8qEYneKXX1xz", + "livemode": false, + "description": "foo", + "email": null, + "delinquent": false, + "metadata": {}, + "subscriptions": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/customers/cus_6j8qEYneKXX1xz/subscriptions", + "data": [] + }, + "discount": null, + "account_balance": 0, + "currency": null, + "cards": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/customers/cus_6j8qEYneKXX1xz/cards", + "data": [] + }, + "default_card": null, + "sources": { + "object": "list", + "total_count": 0, + "has_more": false, + "url": "/v1/customers/cus_6j8qEYneKXX1xz/sources", + "data": [] + }, + "default_source": null +} diff --git a/t/LWPCache/09-refunds.t/f8028d7407d1494c1d5d2ab7e99c0987 b/t/LWPCache/09-refunds.t/f8028d7407d1494c1d5d2ab7e99c0987 new file mode 100644 index 0000000..5ccd775 --- /dev/null +++ b/t/LWPCache/09-refunds.t/f8028d7407d1494c1d5d2ab7e99c0987 @@ -0,0 +1,31 @@ +HTTP/1.1 200 OK +Connection: close +Date: Mon, 03 Aug 2015 10:52:39 GMT +Server: nginx +Content-Length: 290 +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_6j8qW2nTe5NEJQ +Strict-Transport-Security: max-age=31556926; includeSubDomains +Stripe-Version: 2014-12-17 + +{ + "id": "re_16VgYd2deYoXyGRTU9RkuMy7", + "amount": 1000, + "currency": "usd", + "created": 1438599159, + "object": "refund", + "balance_transaction": "txn_16VgYd2deYoXyGRTJ75DkSRa", + "metadata": {}, + "charge": "ch_16VgYc2deYoXyGRTLay8lDF9", + "receipt_number": null, + "reason": null +} diff --git a/t/LWPCache/10-accounts.t/e244b02dd4baf1f282dbd023896ee092 b/t/LWPCache/10-accounts.t/e244b02dd4baf1f282dbd023896ee092 new file mode 100644 index 0000000..7fab663 --- /dev/null +++ b/t/LWPCache/10-accounts.t/e244b02dd4baf1f282dbd023896ee092 @@ -0,0 +1,185 @@ +HTTP/1.1 200 OK +Connection: close +Date: Mon, 03 Aug 2015 10:52:42 GMT +Server: nginx +Content-Length: 2184 +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_6j8qivL7eb0piQ +Strict-Transport-Security: max-age=31556926; includeSubDomains +Stripe-Version: 2014-12-17 + +{ + "id": "acct_102ft62deYoXyGRT", + "email": "stripe@tilt.com", + "statement_descriptor": "TILT_COM", + "display_name": "tilt", + "timezone": "America/Toronto", + "details_submitted": true, + "charges_enabled": true, + "transfers_enabled": true, + "currencies_supported": [ + "usd", + "aed", + "afn", + "all", + "amd", + "ang", + "aoa", + "ars", + "aud", + "awg", + "azn", + "bam", + "bbd", + "bdt", + "bgn", + "bif", + "bmd", + "bnd", + "bob", + "brl", + "bsd", + "bwp", + "bzd", + "cad", + "cdf", + "chf", + "clp", + "cny", + "cop", + "crc", + "cve", + "czk", + "djf", + "dkk", + "dop", + "dzd", + "egp", + "etb", + "eur", + "fjd", + "fkp", + "gbp", + "gel", + "gip", + "gmd", + "gnf", + "gtq", + "gyd", + "hkd", + "hnl", + "hrk", + "htg", + "huf", + "idr", + "ils", + "inr", + "isk", + "jmd", + "jpy", + "kes", + "kgs", + "khr", + "kmf", + "krw", + "kyd", + "kzt", + "lak", + "lbp", + "lkr", + "lrd", + "lsl", + "ltl", + "mad", + "mdl", + "mga", + "mkd", + "mnt", + "mop", + "mro", + "mur", + "mvr", + "mwk", + "mxn", + "myr", + "mzn", + "nad", + "ngn", + "nio", + "nok", + "npr", + "nzd", + "pab", + "pen", + "pgk", + "php", + "pkr", + "pln", + "pyg", + "qar", + "ron", + "rsd", + "rub", + "rwf", + "sar", + "sbd", + "scr", + "sek", + "sgd", + "shp", + "sll", + "sos", + "srd", + "std", + "svc", + "szl", + "thb", + "tjs", + "top", + "try", + "ttd", + "twd", + "tzs", + "uah", + "ugx", + "uyu", + "uzs", + "vnd", + "vuv", + "wst", + "xaf", + "xcd", + "xof", + "xpf", + "yer", + "zar", + "zmw" + ], + "default_currency": "usd", + "country": "US", + "object": "account", + "business_name": "Tilt, Inc.", + "business_url": "www.tilt.com", + "support_phone": "8669712710", + "business_logo": null, + "support_url": "", + "support_email": "", + "support_address": { + "line1": null, + "line2": null, + "city": null, + "state": null, + "postal_code": null, + "country": "US" + }, + "managed": false +} diff --git a/t/lib/Common.pm b/t/lib/Common.pm index eb38214..4d4158a 100644 --- a/t/lib/Common.pm +++ b/t/lib/Common.pm @@ -2,6 +2,9 @@ package t::lib::Common; use v5.14; use Exporter qw(import); +use File::Basename; +use Memoize; +use Test::LWP::Recorder; use Test::More import => [qw(plan)]; use WebService::Stripe; @@ -62,8 +65,15 @@ sub skip_unless_has_secret { plan skip_all => 'PERL_STRIPE_TEST_API_KEY is required' unless api_key(); } +memoize 'stripe'; sub stripe { my %params = @_; + if ($ENV{LWP_RECORD} or !api_key()) { + $params{ua} = Test::LWP::Recorder->new({ + record => $ENV{LWP_RECORD}, + cache_dir => 't/LWPCache/' . basename($0), + }); + } state $client = WebService::Stripe->new( api_key => api_key(), version => '2014-12-17',