« lib/WebService/Braintree/_/Transaction/AmexExpressCheckoutDetail.pm
↑ Summary
lib/WebService/Braintree/AddOnGateway.pm »
| 1 | # vim: sw=4 ts=4 ft=perl | ||
| 2 | |||
| 3 | package WebService::Braintree::MerchantAccount; | ||
| 4 | 22 | $WebService::Braintree::MerchantAccount::VERSION = '1.7'; | |
| 5 | 22 | ▶ | use 5.010_001; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 22 | ▶ | use strictures 1; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | =head1 NAME | ||
| 9 | |||
| 10 | WebService::Braintree::MerchantAccount | ||
| 11 | |||
| 12 | =head1 PURPOSE | ||
| 13 | |||
| 14 | This class creates, updates, deletes, and finds merchant accounts. | ||
| 15 | |||
| 16 | =cut | ||
| 17 | |||
| 18 | 22 | ▶ | use Moo; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 19 | |||
| 20 | 22 | with 'WebService::Braintree::Role::Interface'; | |
| 21 | |||
| 22 | =head2 create() | ||
| 23 | |||
| 24 | This takes a hashref of parameters and returns a L<response|WebService::Braintee::Result> with the C<< merchant_account() >> set. | ||
| 25 | |||
| 26 | =cut | ||
| 27 | |||
| 28 | 0 | ▶ | sub create { |
|
Subroutine
create: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 29 | 0 | my ($class, $params) = @_; | |
| 30 | 0 | $class->gateway->merchant_account->create($params); | |
| 31 | } | ||
| 32 | |||
| 33 | =head2 find() | ||
| 34 | |||
| 35 | This takes a merchant_account_id and returns a L<response|WebService::Braintee::Result> with | ||
| 36 | the C<< merchant_account() >> set (if found). | ||
| 37 | |||
| 38 | =cut | ||
| 39 | |||
| 40 | 0 | ▶ | sub find { |
|
Subroutine
find: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 41 | 0 | my ($class, $merchant_account_id) = @_; | |
| 42 | 0 | $class->gateway->merchant_account->find($merchant_account_id); | |
| 43 | } | ||
| 44 | |||
| 45 | =head2 all() | ||
| 46 | |||
| 47 | This returns a L<collection|WebService::Braintree::PaginatedCollection> of all | ||
| 48 | L<merchant accounts|WebService::Braintree::_::MerchantAccount>. | ||
| 49 | |||
| 50 | =cut | ||
| 51 | |||
| 52 | 0 | ▶ | sub all { |
|
Subroutine
all: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 53 | 0 | my $class = shift; | |
| 54 | 0 | $class->gateway->merchant_account->all; | |
| 55 | } | ||
| 56 | |||
| 57 | =head2 update() | ||
| 58 | |||
| 59 | This takes a merchant_account_id and a hashref of parameters. It will update the corresponding | ||
| 60 | merchant account (if found) and return a L<response|WebService::Braintee::Result> | ||
| 61 | with the C<< merchant_account() >> set. | ||
| 62 | |||
| 63 | =cut | ||
| 64 | |||
| 65 | 0 | ▶ | sub update { |
|
Subroutine
update: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 66 | 0 | my ($class, $merchant_account_id, $params) = @_; | |
| 67 | 0 | $class->gateway->merchant_account->update($merchant_account_id, $params); | |
| 68 | } | ||
| 69 | |||
| 70 | { | ||
| 71 | package WebService::Braintree::MerchantAccount::Status; | ||
| 72 | 22 | $WebService::Braintree::MerchantAccount::Status::VERSION = '1.7'; | |
| 73 | 22 | ▶ | use 5.010_001; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 74 | 22 | ▶ | use strictures 1; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 75 | |||
| 76 | 22 | ▶ | use constant Active => "active"; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 77 | 22 | ▶ | use constant Pending => "pending"; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 78 | 22 | ▶ | use constant Suspended => "suspended"; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 79 | } | ||
| 80 | |||
| 81 | { | ||
| 82 | 22 | package WebService::Braintree::MerchantAccount::FundingDestination; | |
| 83 | 22 | $WebService::Braintree::MerchantAccount::FundingDestination::VERSION = '1.7'; | |
| 84 | 22 | ▶ | use 5.010_001; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 85 | 22 | ▶ | use strictures 1; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 86 | |||
| 87 | 22 | ▶ | use constant Bank => "bank"; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 88 | 22 | ▶ | use constant Email => "email"; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 89 | 22 | ▶ | use constant MobilePhone => "mobile_phone"; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 90 | } | ||
| 91 | |||
| 92 | 22 | __PACKAGE__->meta->make_immutable; | |
| 93 | |||
| 94 | 22 | 1; | |
| 95 | __END__ | ||