PHP 클래스 Braintree\AddressGateway

An Address belongs to a Customer. It can be associated to a CreditCard as the billing address. It can also be used as the shipping address when creating a Transaction.
파일 보기 프로젝트 열기: braintree/braintree_php 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( Gateway $gateway )
create ( array $attribs ) : Braintree\Result\Successful | Error
createNoValidate ( array $attribs ) : self attempts the create operation assuming all data will validate returns a Address object instead of a Result
createSignature ( ) : array creates a full array signature of a valid create request
delete ( mixed $customerOrId = null, string $addressId = null ) delete an address by id
find ( mixed $customerOrId, string $addressId ) : braintree\Address find an address by id
update ( mixed $customerOrId, string $addressId, array $attributes ) : Braintree\Result\Successful | Error updates the address record
updateNoValidate ( $customerOrId, $addressId, $attributes ) : Transaction update an address record, assuming validations will pass
updateSignature ( ) : array creates a full array signature of a valid update request

비공개 메소드들

메소드 설명
_determineCustomerId ( mixed $customerOrId ) : string determines if a string id or Customer object was passed
_doCreate ( string $subPath, array $params ) : Braintree\Result\Successful | Error sends the create request to the gateway
_validateCustomerId ( string $id = null ) verifies that a valid customer id is being used
_validateId ( string $id = null ) verifies that a valid address id is being used
_verifyGatewayResponse ( array $response ) : Braintree\Result\Successful | Error generic method for validating incoming gateway responses

메소드 상세

__construct() 공개 메소드

public __construct ( Gateway $gateway )
$gateway Gateway

create() 공개 메소드

public create ( array $attribs ) : Braintree\Result\Successful | Error
$attribs array
리턴 Braintree\Result\Successful | Braintree\Result\Error

createNoValidate() 공개 메소드

attempts the create operation assuming all data will validate returns a Address object instead of a Result
public createNoValidate ( array $attribs ) : self
$attribs array
리턴 self

createSignature() 공개 정적인 메소드

creates a full array signature of a valid create request
public static createSignature ( ) : array
리턴 array gateway create request format

delete() 공개 메소드

delete an address by id
public delete ( mixed $customerOrId = null, string $addressId = null )
$customerOrId mixed
$addressId string

find() 공개 메소드

Finds the address with the given addressId that is associated to the given customerOrId. If the address cannot be found, a NotFound exception will be thrown.
public find ( mixed $customerOrId, string $addressId ) : braintree\Address
$customerOrId mixed
$addressId string
리턴 braintree\Address

update() 공개 메소드

if calling this method in context, customerOrId is the 2nd attribute, addressId 3rd. customerOrId & addressId are not sent in object context.
public update ( mixed $customerOrId, string $addressId, array $attributes ) : Braintree\Result\Successful | Error
$customerOrId mixed (only used in call)
$addressId string (only used in call)
$attributes array
리턴 Braintree\Result\Successful | Braintree\Result\Error

updateNoValidate() 공개 메소드

if calling this method in context, customerOrId is the 2nd attribute, addressId 3rd. customerOrId & addressId are not sent in object context.
또한 보기: Address::update()
public updateNoValidate ( $customerOrId, $addressId, $attributes ) : Transaction
리턴 Transaction

updateSignature() 공개 정적인 메소드

creates a full array signature of a valid update request
public static updateSignature ( ) : array
리턴 array gateway update request format