elixir_authorizenet v0.4.1 AuthorizeNet.PaymentProfile

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

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 payment profile for a “business”. See: http://developer.authorize.net/api/reference/index.html#manage-customer-profiles-create-customer-payment-profile

Creates a payment profile for an “invidual”. See: http://developer.authorize.net/api/reference/index.html#manage-customer-profiles-create-customer-payment-profile

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

Builds an PaymentProfile from an xmlElement record

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

Returns all payment profiles matching the given criteria. See: http://developer.authorize.net/api/reference/#customer-profiles-get-customer-payment-profile-list

Validates a payment profile by generating a test transaction. See: http://developer.authorize.net/api/reference/index.html#manage-customer-profiles-validate-customer-payment-profile

Types

payment_type()
profile_type()
profile_type() :: :individual | :business
t()
t() :: %AuthorizeNet.PaymentProfile{address: term, customer_id: term, payment_type: term, profile_id: term, type: term}

Functions

create_business(customer_id, address, payment_type)

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

create_individual(customer_id, address, payment_type)

Creates a payment profile for an “invidual”. See: http://developer.authorize.net/api/reference/index.html#manage-customer-profiles-create-customer-payment-profile

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

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

from_xml(doc, customer_id \\ nil)
from_xml(Record, Integer) :: AuthorizeNet.PaymentProfile.t

Builds an PaymentProfile from an xmlElement record.

get(customer_id, profile_id, options \\ [])
get(Integer, Integer, Keyword.t) ::
  AuthorizeNet.PaymentProfile.t |
  no_return

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

get_list(search_type, month, order_by, order_desc, limit, offset)
get_list(String.t, String.t, String.t, boolean, Integer, Integer) ::
  [AuthorizeNet.PaymentProfile.t] |
  no_return

Returns all payment profiles matching the given criteria. See: http://developer.authorize.net/api/reference/#customer-profiles-get-customer-payment-profile-list

valid?(customer_id, profile_id, card_code \\ nil)
valid?(Integer, Integer, String.t | nil) :: true | {false, term}

Validates a payment profile by generating a test transaction. See: http://developer.authorize.net/api/reference/index.html#manage-customer-profiles-validate-customer-payment-profile