« lib/WebService/Braintree/_/Merchant.pm
↑ Summary
lib/WebService/Braintree/_/MerchantAccount/AddressDetails.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 represents a merchant account. | ||
| 15 | |||
| 16 | This class will only be created as part of a L<response|WebService::Braintree::Result> or L<error response|WebService::Braintree::ErrorResult>. | ||
| 17 | |||
| 18 | =cut | ||
| 19 | |||
| 20 | 22 | ▶ | use Moo; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 21 | 22 | ▶ | use MooX::Aliases; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 22 | |||
| 23 | 22 | extends 'WebService::Braintree::_'; | |
| 24 | |||
| 25 | 22 | ▶ | use WebService::Braintree::Types qw( |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 26 | MerchantAccount | ||
| 27 | MerchantAccount_BusinessDetails | ||
| 28 | MerchantAccount_FundingDetails | ||
| 29 | MerchantAccount_IndividualDetails | ||
| 30 | 22 | ); | |
| 31 | |||
| 32 | =head1 ATTRIBUTES | ||
| 33 | |||
| 34 | =cut | ||
| 35 | |||
| 36 | =head2 business() | ||
| 37 | |||
| 38 | This returns the merchant account's business details. This will be an | ||
| 39 | object of type L<WebService::Braintree::_::MerchantAccount::BusinessDetails/>. | ||
| 40 | |||
| 41 | C<< business_details() >> is an alias for this attribute. | ||
| 42 | |||
| 43 | =cut | ||
| 44 | |||
| 45 | 22 | has business => ( | |
| 46 | is => 'ro', | ||
| 47 | isa => MerchantAccount_BusinessDetails, | ||
| 48 | coerce => 1, | ||
| 49 | alias => 'business_details', | ||
| 50 | ); | ||
| 51 | |||
| 52 | =head2 currency_iso_code() | ||
| 53 | |||
| 54 | This is the currency ISO code for this merchant account. | ||
| 55 | |||
| 56 | =cut | ||
| 57 | |||
| 58 | 22 | has currency_iso_code => ( | |
| 59 | is => 'ro', | ||
| 60 | ); | ||
| 61 | |||
| 62 | =head2 default() | ||
| 63 | |||
| 64 | This returns true if this merchant account is default. | ||
| 65 | |||
| 66 | C<< is_default() >> is an alias for this attribute. | ||
| 67 | |||
| 68 | =cut | ||
| 69 | |||
| 70 | 22 | has default => ( | |
| 71 | is => 'ro', | ||
| 72 | alias => 'is_default', | ||
| 73 | ); | ||
| 74 | |||
| 75 | =head2 funding() | ||
| 76 | |||
| 77 | This returns the merchant account's funding details. This will be an | ||
| 78 | object of type L<WebService::Braintree::_::MerchantAccount::FundingDetails/>. | ||
| 79 | |||
| 80 | C<< funding_details() >> is an alias for this attribute. | ||
| 81 | |||
| 82 | =cut | ||
| 83 | |||
| 84 | 22 | has funding => ( | |
| 85 | is => 'ro', | ||
| 86 | isa => MerchantAccount_FundingDetails, | ||
| 87 | coerce => 1, | ||
| 88 | alias => 'funding_details', | ||
| 89 | ); | ||
| 90 | |||
| 91 | =head2 id() | ||
| 92 | |||
| 93 | This is the id for this merchant account. | ||
| 94 | |||
| 95 | =cut | ||
| 96 | |||
| 97 | 22 | has id => ( | |
| 98 | is => 'ro', | ||
| 99 | ); | ||
| 100 | |||
| 101 | =head2 individual() | ||
| 102 | |||
| 103 | This returns the merchant account's individual details. This will be an | ||
| 104 | object of type L<WebService::Braintree::_::MerchantAccount::IndividualDetails/>. | ||
| 105 | |||
| 106 | C<< individual_details() >> is an alias for this attribute. | ||
| 107 | |||
| 108 | =cut | ||
| 109 | |||
| 110 | 22 | has individual => ( | |
| 111 | is => 'ro', | ||
| 112 | isa => MerchantAccount_IndividualDetails, | ||
| 113 | coerce => 1, | ||
| 114 | alias => 'individual_details', | ||
| 115 | ); | ||
| 116 | |||
| 117 | =head2 master_merchant_account() | ||
| 118 | |||
| 119 | This is the master merchant account (if any) for this merchant account. This will be an | ||
| 120 | object of type L<WebService::Braintree::_::MerchantAccount/>. | ||
| 121 | |||
| 122 | =cut | ||
| 123 | |||
| 124 | 22 | has master_merchant_account => ( | |
| 125 | is => 'ro', | ||
| 126 | isa => MerchantAccount, | ||
| 127 | coerce => 1, | ||
| 128 | ); | ||
| 129 | |||
| 130 | =head2 status() | ||
| 131 | |||
| 132 | This is the status for this merchant account. | ||
| 133 | |||
| 134 | =cut | ||
| 135 | |||
| 136 | 22 | has status => ( | |
| 137 | is => 'ro', | ||
| 138 | ); | ||
| 139 | |||
| 140 | =head2 sub_merchant_account() | ||
| 141 | |||
| 142 | This returns true if this merchant account is a sub-merchant account. | ||
| 143 | |||
| 144 | C<< is_sub_merchant_account() >> is an alias for this attribute. | ||
| 145 | |||
| 146 | =cut | ||
| 147 | |||
| 148 | 22 | has sub_merchant_account => ( | |
| 149 | is => 'ro', | ||
| 150 | alias => 'is_sub_merchant_account', | ||
| 151 | ); | ||
| 152 | |||
| 153 | 22 | __PACKAGE__->meta->make_immutable; | |
| 154 | |||
| 155 | 22 | 1; | |
| 156 | __END__ | ||