elixir_authorizenet v0.4.0 AuthorizeNet.Customer

Handles customer profiles (http://developer.authorize.net/api/reference/index.html#manage-customer-profiles).

Copyright 2015 Marcelo Gornstein marcelog@gmail.com

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Summary

Functions

Creates a customer profile. See: http://developer.authorize.net/api/reference/index.html#manage-customer-profiles-create-customer-profile

Creates a shipping address for the customer. See: http://developer.authorize.net/api/reference/index.html#manage-customer-profiles-create-customer-shipping-address

Deletes a customer profile by customer profile ID. See: http://developer.authorize.net/api/reference/index.html#manage-customer-profiles-delete-customer-profile

Deletes a shipping address. See: http://developer.authorize.net/api/reference/index.html#manage-customer-profiles-delete-customer-shipping-address

Builds an Customer from an xmlElement record

Returns a customer profile by customer profile ID. See: http://developer.authorize.net/api/reference/index.html#manage-customer-profiles-get-customer-profile

Returns all customer profile IDs known by Authorize.Net. See: http://developer.authorize.net/api/reference/index.html#manage-customer-profiles-get-customer-profile-ids

Returns a shipping address. See: http://developer.authorize.net/api/reference/index.html#manage-customer-profiles-get-customer-shipping-address

Updates a customer profile given a valid customer profile ID. See: http://developer.authorize.net/api/reference/index.html#manage-customer-profiles-update-customer-profile

Updates a shipping address. See: http://developer.authorize.net/api/reference/index.html#manage-customer-profiles-update-customer-shipping-address

Types

t()
t() :: %AuthorizeNet.Customer{description: term, email: term, id: term, payment_profiles: term, profile_id: term, shipping_addresses: term}

Functions

create(id, description, email)

Creates a customer profile. See: http://developer.authorize.net/api/reference/index.html#manage-customer-profiles-create-customer-profile

create_shipping_address(customer_id, address)
create_shipping_address(Integer, AuthorizeNet.Address.t) ::
  AuthorizeNet.Address.t |
  no_return

Creates a shipping address for the customer. See: http://developer.authorize.net/api/reference/index.html#manage-customer-profiles-create-customer-shipping-address

delete(customer_id)
delete(Integer) :: :ok | no_return

Deletes a customer profile by customer profile ID. See: http://developer.authorize.net/api/reference/index.html#manage-customer-profiles-delete-customer-profile

delete_shipping_address(customer_id, address_id)
delete_shipping_address(Integer, Integer) :: :ok | no_return

Deletes a shipping address. See: http://developer.authorize.net/api/reference/index.html#manage-customer-profiles-delete-customer-shipping-address

from_xml(doc)
from_xml(Record) :: AuthorizeNet.Customer.t

Builds an Customer from an xmlElement record.

get(profile_id)
get(Integer) :: AuthorizeNet.Customer.t | no_return

Returns a customer profile by customer profile ID. See: http://developer.authorize.net/api/reference/index.html#manage-customer-profiles-get-customer-profile

get_all()
get_all() :: [Integer] | no_return

Returns all customer profile IDs known by Authorize.Net. See: http://developer.authorize.net/api/reference/index.html#manage-customer-profiles-get-customer-profile-ids

get_shipping_address(customer_id, address_id)
get_shipping_address(Integer, Integer) ::
  AuthorizeNet.Address.t |
  no_return

Returns a shipping address. See: http://developer.authorize.net/api/reference/index.html#manage-customer-profiles-get-customer-shipping-address

update(profile_id, id, description, email)
update(Integer, String.t, String.t, String.t) ::
  AuthorizeNet.Customer.t |
  no_return

Updates a customer profile given a valid customer profile ID. See: http://developer.authorize.net/api/reference/index.html#manage-customer-profiles-update-customer-profile

update_shipping_address(address)
update_shipping_address(AuthorizeNet.Address.t) ::
  AuthorizeNet.Address.t |
  no_return

Updates a shipping address. See: http://developer.authorize.net/api/reference/index.html#manage-customer-profiles-update-customer-shipping-address