elixir_authorizenet v0.3.1 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

Builds an Customer from an xmlElement record

Types

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

Functions

create_shipping_address(customer_id, address)

Specs

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)

Specs

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)

Specs

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)

Specs

from_xml(Record) :: AuthorizeNet.Customer.t

Builds an Customer from an xmlElement record.

get(profile_id)

Specs

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()

Specs

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)

Specs

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)

Specs

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)

Specs

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

Macros

xmlElement(args \\ [])
xmlElement(record, args)
xmlText(args \\ [])
xmlText(record, args)