diff --git a/Makefile.PL b/Makefile.PL index 7786e39..f320353 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,4 +1,4 @@ -# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.036. +# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.037. use strict; use warnings; @@ -22,7 +22,7 @@ my %WriteMakefileArgs = ( "HTTP::Request::Common" => 0, "Method::Signatures" => 0, "Moo" => 0, - "WebService::Client" => "0.0300", + "WebService::Client" => "0.0400", "constant" => 0 }, "TEST_REQUIRES" => { @@ -36,7 +36,7 @@ my %WriteMakefileArgs = ( "strict" => 0, "warnings" => 0 }, - "VERSION" => "0.1200", + "VERSION" => "1.0000", "test" => { "TESTS" => "t/*.t" } @@ -56,7 +56,7 @@ my %FallbackPrereqs = ( "Moo" => 0, "Test::Modern" => 0, "Test::More" => 0, - "WebService::Client" => "0.0300", + "WebService::Client" => "0.0400", "constant" => 0, "strict" => 0, "warnings" => 0 diff --git a/README.md b/README.md index 5a128fb..a222c36 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ WebService::Stripe - Stripe API bindings # VERSION -version 0.1200 +version 1.0000 # SYNOPSIS @@ -65,14 +65,14 @@ Example: ## update\_customer - update_customer($id, $data) + update_customer($id, data => $data) Updates a customer. Returns the updated customer. Example: - $customer = $stripe->update_customer($id, { description => 'foo' }); + $customer = $stripe->update_customer($id, data => { description => 'foo' }); ## get\_customers @@ -136,7 +136,7 @@ The data param is optional. ## update\_charge - update_charge($id, $data) + update_charge($id, data => $data) Updates an existing charge object. @@ -166,6 +166,10 @@ Adds a new funding source (credit card) to an existing customer. update_account($id, data => $data) +## get\_platform\_account + + get_platform_account($id) + ## upload\_identity\_document Uploads a photo ID to an account. diff --git a/dist.ini b/dist.ini index 00dfee8..b8ea6cc 100644 --- a/dist.ini +++ b/dist.ini @@ -5,7 +5,7 @@ license = Perl_5 copyright_holder = Tilt, Inc copyright_year = 2014 -version = 0.1200 +version = 1.0000 [@Filter] -bundle = @Basic @@ -34,7 +34,7 @@ repository.web = https://github.com/Crowdtilt/WebService-Stripe [PodWeaver] [Prereqs] -WebService::Client = 0.0300 +WebService::Client = 0.0400 [ReadmeAnyFromPod] diff --git a/lib/WebService/Stripe.pm b/lib/WebService/Stripe.pm index 65d8de1..7dc7df8 100644 --- a/lib/WebService/Stripe.pm +++ b/lib/WebService/Stripe.pm @@ -56,7 +56,7 @@ method get_customer(Str $id, :$headers) { return $self->get( "/v1/customers/$id", {}, headers => $headers ); } -method update_customer(Str $id, HashRef $data, :$headers) { +method update_customer(Str $id, HashRef :$data!, :$headers) { return $self->post( "/v1/customers/$id", $data, headers => $headers ); } @@ -78,7 +78,7 @@ method create_charge(HashRef $data, :$headers) { return $self->post( "/v1/charges", $data, headers => $headers ); } -method update_charge(HashRef|Str $charge, HashRef $data, :$headers) { +method update_charge(HashRef|Str $charge, HashRef :$data!, :$headers) { $charge = $charge->{id} if ref $charge; return $self->post( "/v1/charges/$charge", $data, headers => $headers ); } @@ -260,14 +260,14 @@ Example: =head2 update_customer - update_customer($id, $data) + update_customer($id, data => $data) Updates a customer. Returns the updated customer. Example: - $customer = $stripe->update_customer($id, { description => 'foo' }); + $customer = $stripe->update_customer($id, data => { description => 'foo' }); =head2 get_customers @@ -331,7 +331,7 @@ The data param is optional. =head2 update_charge - update_charge($id, $data) + update_charge($id, data => $data) Updates an existing charge object. diff --git a/t/01-customers.t b/t/01-customers.t index 93708aa..ab8c009 100644 --- a/t/01-customers.t +++ b/t/01-customers.t @@ -12,7 +12,8 @@ subtest 'basic stuff' => sub { is $cust->{description}, 'foo', '... Fetched the created customer'; - $cust = stripe->update_customer($cust->{id}, { description => 'bar' }); + $cust = stripe->update_customer( + $cust->{id}, data=> { description => 'bar' }); is $cust->{description}, 'bar', '... Updated the customer'; diff --git a/t/02-charges.t b/t/02-charges.t index 80ab669..6def8fe 100644 --- a/t/02-charges.t +++ b/t/02-charges.t @@ -38,7 +38,7 @@ subtest 'create charge' => sub { }), '... Fetched the charge with expanded "customer" relation'; - $charge = stripe->update_charge($charge, { + $charge = stripe->update_charge($charge, data => { description => 'Foobar', 'metadata[bar]' => 'baz', });