iyzico v1.6.2 Iyzico.CardRegistration

Provides functions for registering, querying and managing cards registered in target platform.

Link to this section Summary

Functions

Stores a card with a given user key identifier. One can later retrieve or refer to the given card with that identifier

Stores a card with given external identifier. One can later retrieve or refer to the given card with that identifier

Invalidates a registration of given card

Same as delete_card/1 but raises Iyzico.CardNotRegisteredError error if card is not registered

Retrieves all cards of a user

Validates a card, returns true value if card is valid. Otherwise, returns false

Link to this section Functions

Link to this function add_create_card(card, conversation_id, card_user_key, opts \\ [])
add_create_card(Iyzico.Card.t(), binary(), binary(), Keyword.t()) ::
  {:ok, Iyzico.CardReference.t(), Iyzico.Metadata.t()} |
  {:error, :invalid_card}

Stores a card with a given user key identifier. One can later retrieve or refer to the given card with that identifier.

Link to this function add_create_card!(card, conversation_id, card_user_key)
Link to this function create_card(card, external_id, conversation_id, email, opts \\ [])
create_card(Iyzico.Card.t(), binary(), binary(), binary(), Keyword.t()) ::
  {:ok, Iyzico.CardReference.t(), Iyzico.Metadata.t()} |
  {:error, :invalid_card}

Stores a card with given external identifier. One can later retrieve or refer to the given card with that identifier.

Link to this function create_card!(card, external_id, conversation_id, email)
Link to this function delete_card(user_key, token, conversation_id)
delete_card(binary(), binary(), binary()) ::
  {:ok, Iyzico.Metadata.t()} |
  {:error, :not_found}

Invalidates a registration of given card.

Link to this function delete_card!(user_key, token, conversation_id)
delete_card!(binary(), binary(), binary()) :: no_return()

Same as delete_card/1 but raises Iyzico.CardNotRegisteredError error if card is not registered.

Link to this function retrieve_cards(user_key, conversation_id)
retrieve_cards(binary(), binary()) ::
  {:ok, list(), Iyzico.Metadate.t()} |
  {:error, atom()}

Retrieves all cards of a user.

Link to this function valid?(card)
valid?(Iyzico.Card.t()) :: boolean()

Validates a card, returns true value if card is valid. Otherwise, returns false.