PHP Class Braintree\Customer

== More information == For more detailed information on Customers, see {@link http://www.braintreepayments.com/gateway/customer-api http://www.braintreepaymentsolutions.com/gateway/customer-api}
Inheritance: extends braintree\Base
Afficher le fichier Open project: braintree/braintree_php Class Usage Examples

Protected Properties

Свойство Type Description
$_attributes registry of customer data

Méthodes publiques

Méthode Description
__toString ( ) : string returns a string representation of the customer
_defaultPaymentMethodFilter ( $paymentMethod )
all ( ) : Customer[]
create ( array $attribs = [] ) : Braintree\Result\Successful | Error
createCustomerUrl ( ) : string
createFromTransparentRedirect ( string $queryString ) : Braintree\Result\Successful
createNoValidate ( array $attribs = [] ) : Customer
credit ( integer $customerId, array $transactionAttribs ) : Braintree\Result\Successful | Error
creditNoValidate ( type $customerId, type $transactionAttribs ) : Transaction
defaultPaymentMethod ( ) : CreditCard | braintree\PayPalAccount returns the customer's default payment method
delete ( integer $customerId ) : Braintree\Result\Successful
factory ( array $attributes ) : Customer factory method: returns an instance of Customer to the requesting method, with populated properties
fetch ( string $query, int[] $ids ) : Customer | Customer[]
find ( string $id ) : Customer
isEqual ( object $otherCust ) : boolean returns false if comparing object is not a Customer, or is a Customer with a different id
paymentMethods ( ) : array returns an array containt all of the customer's payment methods
sale ( integer $customerId, array $transactionAttribs ) : Transaction
saleNoValidate ( integer $customerId, array $transactionAttribs ) : Transaction
search ( string $query ) : ResourceCollection
update ( integer $customerId, array $attributes ) : Braintree\Result\Successful | Error
updateCustomerUrl ( ) : string
updateFromTransparentRedirect ( string $queryString ) : Braintree\Result\Successful | Error
updateNoValidate ( integer $customerId, array $attributes ) : CustomerGateway

Méthodes protégées

Méthode Description
_initialize ( array $customerAttribs ) sets instance properties from an array of values

Method Details

__toString() public méthode

returns a string representation of the customer
public __toString ( ) : string
Résultat string

_defaultPaymentMethodFilter() public static méthode

public static _defaultPaymentMethodFilter ( $paymentMethod )

_initialize() protected méthode

sets instance properties from an array of values
protected _initialize ( array $customerAttribs )
$customerAttribs array array of customer data

all() public static méthode

public static all ( ) : Customer[]
Résultat Customer[]

create() public static méthode

public static create ( array $attribs = [] ) : Braintree\Result\Successful | Error
$attribs array
Résultat Braintree\Result\Successful | Braintree\Result\Error

createCustomerUrl() public static méthode

Deprecation: since version 2.3.0
public static createCustomerUrl ( ) : string
Résultat string

createFromTransparentRedirect() public static méthode

Deprecation: since version 2.3.0
public static createFromTransparentRedirect ( string $queryString ) : Braintree\Result\Successful
$queryString string
Résultat Braintree\Result\Successful

createNoValidate() public static méthode

public static createNoValidate ( array $attribs = [] ) : Customer
$attribs array
Résultat Customer

credit() public static méthode

public static credit ( integer $customerId, array $transactionAttribs ) : Braintree\Result\Successful | Error
$customerId integer
$transactionAttribs array
Résultat Braintree\Result\Successful | Braintree\Result\Error

creditNoValidate() public static méthode

public static creditNoValidate ( type $customerId, type $transactionAttribs ) : Transaction
$customerId type
$transactionAttribs type
Résultat Transaction

defaultPaymentMethod() public méthode

returns the customer's default payment method
public defaultPaymentMethod ( ) : CreditCard | braintree\PayPalAccount
Résultat CreditCard | braintree\PayPalAccount

delete() public static méthode

public static delete ( integer $customerId ) : Braintree\Result\Successful
$customerId integer
Résultat Braintree\Result\Successful

factory() public static méthode

factory method: returns an instance of Customer to the requesting method, with populated properties
public static factory ( array $attributes ) : Customer
$attributes array
Résultat Customer

fetch() public static méthode

public static fetch ( string $query, int[] $ids ) : Customer | Customer[]
$query string
$ids int[]
Résultat Customer | Customer[]

find() public static méthode

public static find ( string $id ) : Customer
$id string customer id
Résultat Customer

isEqual() public méthode

returns false if comparing object is not a Customer, or is a Customer with a different id
public isEqual ( object $otherCust ) : boolean
$otherCust object customer to compare against
Résultat boolean

paymentMethods() public méthode

returns an array containt all of the customer's payment methods
Deprecation: since version 3.1.0 - use the paymentMethods property directly
public paymentMethods ( ) : array
Résultat array

sale() public static méthode

public static sale ( integer $customerId, array $transactionAttribs ) : Transaction
$customerId integer
$transactionAttribs array
Résultat Transaction

saleNoValidate() public static méthode

public static saleNoValidate ( integer $customerId, array $transactionAttribs ) : Transaction
$customerId integer
$transactionAttribs array
Résultat Transaction

update() public static méthode

public static update ( integer $customerId, array $attributes ) : Braintree\Result\Successful | Error
$customerId integer
$attributes array
Résultat Braintree\Result\Successful | Braintree\Result\Error

updateCustomerUrl() public static méthode

Deprecation: since version 2.3.0
public static updateCustomerUrl ( ) : string
Résultat string

updateFromTransparentRedirect() public static méthode

Deprecation: since version 2.3.0
public static updateFromTransparentRedirect ( string $queryString ) : Braintree\Result\Successful | Error
$queryString string
Résultat Braintree\Result\Successful | Braintree\Result\Error

updateNoValidate() public static méthode

public static updateNoValidate ( integer $customerId, array $attributes ) : CustomerGateway
$customerId integer
$attributes array
Résultat CustomerGateway

Property Details

$_attributes protected_oe property

registry of customer data
protected $_attributes