File Coverage

blib/lib/Net/Braintree/TransactionSearch.pm
Criterion Covered Total %
statement 6 7 85.7
branch n/a
condition n/a
subroutine 2 3 66.6
pod 0 1 0.0
total 8 11 72.7


line stmt bran cond sub pod time code
1             package Net::Braintree::TransactionSearch;
2 1     1   4 use Moose;
  1         2  
  1         6  
3 1     1   5704 use Net::Braintree::AdvancedSearch qw(search_to_hash);
  1         2  
  1         485  
4             my $meta = __PACKAGE__->meta();
5              
6             my $field = Net::Braintree::AdvancedSearchFields->new(metaclass => $meta);
7              
8             $field->text("billing_company");
9             $field->text("billing_country_name");
10             $field->text("billing_extended_address");
11             $field->text("billing_first_name");
12             $field->text("billing_last_name");
13             $field->text("billing_locality");
14             $field->text("billing_postal_code");
15             $field->text("billing_region");
16             $field->text("billing_street_address");
17             $field->text("credit_card_cardholder_name");
18             $field->text("currency");
19             $field->text("customer_company");
20             $field->text("customer_email");
21             $field->text("customer_fax");
22             $field->text("customer_first_name");
23             $field->text("customer_id");
24             $field->text("customer_last_name");
25             $field->text("customer_phone");
26             $field->text("customer_website");
27             $field->text("id");
28             $field->text("order_id");
29             $field->text("payment_method_token");
30             $field->text("paypal_payment_id");
31             $field->text("paypal_authorization_id");
32             $field->text("paypal_payer_email");
33             $field->text("processor_authorization_code");
34             $field->text("settlement_batch_id");
35             $field->text("shipping_company");
36             $field->text("shipping_country_name");
37             $field->text("shipping_extended_address");
38             $field->text("shipping_first_name");
39             $field->text("shipping_last_name");
40             $field->text("shipping_locality");
41             $field->text("shipping_postal_code");
42             $field->text("shipping_region");
43             $field->text("shipping_street_address");
44              
45             $field->equality("credit_card_expiration_date");
46              
47             $field->partial_match("credit_card_number");
48              
49             $field->multiple_values("created_using", Net::Braintree::Transaction::CreatedUsing::FullInformation, Net::Braintree::Transaction::CreatedUsing::Token);
50             $field->multiple_values("credit_card_card_type", @{Net::Braintree::CreditCard::CardType::All()});
51             $field->multiple_values("credit_card_customer_location", Net::Braintree::CreditCard::Location::International, Net::Braintree::CreditCard::Location::US);
52             $field->multiple_values("ids");
53             $field->multiple_values("merchant_account_id");
54             $field->multiple_values("status", Net::Braintree::Transaction::Status::All);
55             $field->multiple_values("source", @{Net::Braintree::Transaction::Source::All()});
56             $field->multiple_values("type", @{Net::Braintree::Transaction::Type::All()});
57              
58             $field->key_value("refund");
59              
60             $field->range("amount");
61             $field->range("created_at");
62             $field->range("disbursement_date");
63             $field->range("dispute_date");
64             $field->range("authorization_expired_at");
65             $field->range("authorized_at");
66             $field->range("failed_at");
67             $field->range("gateway_rejected_at");
68             $field->range("processor_declined_at");
69             $field->range("settled_at");
70             $field->range("submitted_for_settlement_at");
71             $field->range("voided_at");
72              
73             sub to_hash {
74 0     0 0   Net::Braintree::AdvancedSearch->search_to_hash(shift);
75             }
76              
77             1;