Class: Braintree::Address

### Home Classes Methods

### In Files

- lib/braintree/address.rb

### Parent

Object

### Methods

- ::create
- ::create!
- ::delete
- ::find
- ::update
- ::update!
- #delete
- #update
- #update!

### Class/Module Index

Quicksearch

- Braintree
- Braintree::AddOn
- Braintree::AddOnGateway
- Braintree::Address
- Braintree::AddressGateway
- Braintree::AdvancedSearch
- Braintree::AdvancedSearch::MultipleValueOrTextNode
- Braintree::AuthenticationError
- Braintree::AuthorizationError
- Braintree::BraintreeError
- Braintree::Configuration
- Braintree::ConfigurationError
- Braintree::CreditCard
- Braintree::CreditCard::CardType
- Braintree::CreditCard::CustomerLocation
- Braintree::CreditCardVerification
- Braintree::CreditCardVerification::Status
- Braintree::Customer
- Braintree::Discount
- Braintree::DiscountGateway
- Braintree::DownForMaintenanceError
- Braintree::ErrorCodes
- Braintree::ErrorCodes::Address
- Braintree::ErrorCodes::CreditCard
- Braintree::ErrorCodes::CreditCard::Options
- Braintree::ErrorCodes::Customer
- Braintree::ErrorCodes::Descriptor
- Braintree::ErrorCodes::SettlementBatchSummary
- Braintree::ErrorCodes::Subscription
- Braintree::ErrorCodes::Subscription::Modification
- Braintree::ErrorCodes::Transaction
- Braintree::ErrorCodes::Transaction::Options
- Braintree::ErrorResult
- Braintree::Errors
- Braintree::ForgedQueryString
- Braintree::NotFoundError
- Braintree::Plan
- Braintree::SSLCertificateError
- Braintree::ServerError
- Braintree::SettlementBatchSummary
- Braintree::SettlementBatchSummaryGateway
- Braintree::Subscription
- Braintree::Subscription::Status
- Braintree::Subscription::TrialDurationUnit
- Braintree::SuccessfulResult
- Braintree::Test
- Braintree::Test::CreditCardNumbers
- Braintree::Test::CreditCardNumbers::FailsSandboxVerification
- Braintree::Test::TransactionAmounts
- Braintree::Transaction
- Braintree::Transaction::CreatedUsing
- Braintree::Transaction::GatewayRejectionReason
- Braintree::Transaction::Source
- Braintree::Transaction::Status
- Braintree::TransparentRedirect
- Braintree::TransparentRedirectGateway
- Braintree::UnexpectedError
- Braintree::UpgradeRequiredError
- Braintree::ValidationError
- Braintree::ValidationErrorCollection
- Braintree::ValidationsFailed
- Braintree::Version

No matching classes.

# Braintree::Address

See www.braintreepayments.com/docs/ruby/addresses/details

### Attributes

company[R]
country_code_alpha2[R]
country_code_alpha3[R]
country_code_numeric[R]
country_name[R]
created_at[R]
customer_id[R]
extended_address[R]
first_name[R]
id[R]
last_name[R]
locality[R]
postal_code[R]
region[R]
street_address[R]
updated_at[R]

### Public Class Methods

create(attributes) click to toggle source

    # File lib/braintree/address.rb, line 10
    def self.create(attributes)
      Configuration.gateway.address.create(attributes)
    end

create!(attributes) click to toggle source

    # File lib/braintree/address.rb, line 14
    def self.create!(attributes)
      return_object_or_raise(:address) { create(attributes) }
    end

delete(customer_or_customer_id, address_id) click to toggle source

    # File lib/braintree/address.rb, line 18
    def self.delete(customer_or_customer_id, address_id)
      Configuration.gateway.address.delete(customer_or_customer_id, address_id)
    end

find(customer_or_customer_id, address_id) click to toggle source

    # File lib/braintree/address.rb, line 22
    def self.find(customer_or_customer_id, address_id)
      Configuration.gateway.address.find(customer_or_customer_id, address_id)
    end

update(customer_or_customer_id, address_id, attributes) click to toggle source

    # File lib/braintree/address.rb, line 26
    def self.update(customer_or_customer_id, address_id, attributes)
      Configuration.gateway.address.update(customer_or_customer_id, address_id, attributes)
    end

update!(customer_or_customer_id, address_id, attributes) click to toggle source

    # File lib/braintree/address.rb, line 30
    def self.update!(customer_or_customer_id, address_id, attributes)
      return_object_or_raise(:address) { update(customer_or_customer_id, address_id, attributes) }
    end

### Public Instance Methods

delete() click to toggle source

Deprecated. Use Braintree::Address.delete

    # File lib/braintree/address.rb, line 45
    def delete
      warn "[DEPRECATED] delete as an instance method is deprecated. Please use Address.delete"
      @gateway.address.delete(customer_id, self.id)
    end

update(attributes) click to toggle source

Deprecated. Use Braintree::Address.update

    # File lib/braintree/address.rb, line 51
    def update(attributes)
      warn "[DEPRECATED] update as an instance method is deprecated. Please use Address.update"
      result = @gateway.address.update(customer_id, id, attributes)
      if result.success?
        copy_instance_variables_from_object result.address
      end
      result
    end

update!(attributes) click to toggle source

Deprecated. Use Braintree::Address.update!

    # File lib/braintree/address.rb, line 61
    def update!(attributes)
      warn "[DEPRECATED] update! as an instance method is deprecated. Please use Address.update!"
      return_object_or_raise(:address) { update(attributes) }
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.