Parent

Class/Module Index [+]

Quicksearch

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.