View Source Craftgate.Response.PaymentResponse (Craftgate v1.0.42)

Elixir equivalent of the Java data class io.craftgate.response.PaymentResponse

Link to this section Summary

Functions

Callback implementation for Construct.cast/2.

Callback implementation for Construct.make/2.

Attempts to parse the input as an instance of this struct

Bangified version of parse/1

Returns the names of the fields that are serializable/deserializable

Attempts to serialize this struct as a JSON string

Link to this section Types

@type t() :: %Craftgate.Response.PaymentResponse{
  additional_data: map() | nil,
  auth_code: String.t() | nil,
  bank_card_holder_name: String.t() | nil,
  bank_commission_rate: Decimal.t() | nil,
  bank_commission_rate_amount: Decimal.t() | nil,
  bin_number: String.t() | nil,
  buyer_member_id: integer() | nil,
  card_association: Craftgate.Model.CardAssociation.t() | nil,
  card_brand: String.t() | nil,
  card_holder_name: String.t() | nil,
  card_token: String.t() | nil,
  card_type: Craftgate.Model.CardType.t() | nil,
  card_user_key: String.t() | nil,
  conversation_id: String.t() | nil,
  created_date: NaiveDateTime.t() | nil,
  currency: Craftgate.Model.Currency.t() | nil,
  external_id: String.t() | nil,
  fraud_action: Craftgate.Model.FraudAction.t() | nil,
  fraud_id: integer() | nil,
  host_reference: String.t() | nil,
  id: integer() | nil,
  installment: integer() | nil,
  is_three_ds: boolean() | nil,
  last_four_digits: String.t() | nil,
  loyalty: Craftgate.Model.Loyalty.t() | nil,
  merchant_commission_rate: Decimal.t() | nil,
  merchant_commission_rate_amount: Decimal.t() | nil,
  order_id: String.t() | nil,
  paid_price: Decimal.t() | nil,
  paid_with_stored_card: boolean() | nil,
  payment_channel: String.t() | nil,
  payment_error: Craftgate.Response.Dto.PaymentError.t() | nil,
  payment_group: Craftgate.Model.PaymentGroup.t() | nil,
  payment_phase: Craftgate.Model.PaymentPhase.t() | nil,
  payment_provider: Craftgate.Model.PaymentProvider.t() | nil,
  payment_source: Craftgate.Model.PaymentSource.t() | nil,
  payment_status: Craftgate.Model.PaymentStatus.t() | nil,
  payment_transactions: [Craftgate.Response.Dto.PaymentTransaction.t()] | nil,
  payment_type: Craftgate.Model.PaymentType.t() | nil,
  pos: Craftgate.Response.Dto.MerchantPos.t() | nil,
  price: Decimal.t() | nil,
  requested_pos_alias: String.t() | nil,
  trans_id: String.t() | nil,
  wallet_price: Decimal.t() | nil
}

Link to this section Functions

Link to this function

cast(params, opts \\ [])

View Source

Callback implementation for Construct.cast/2.

Link to this function

make(params \\ %{}, opts \\ [])

View Source

Callback implementation for Construct.make/2.

Link to this function

make!(params \\ %{}, opts \\ [])

View Source

Callback implementation for Construct.make!/2.

@spec parse(any()) :: {:ok, t()} | {:error, any()}

Attempts to parse the input as an instance of this struct

See also: Craftgate.Serializable.parse/2

@spec parse!(any()) :: t() | no_return()

Bangified version of parse/1

@spec serializable_fields() :: [atom()]

Returns the names of the fields that are serializable/deserializable

Link to this function

serialize(self, opts \\ [])

View Source
@spec serialize(
  t(),
  keyword()
) :: {:ok, binary()} | {:error, any()}

Attempts to serialize this struct as a JSON string

Link to this function

serialize!(self, opts \\ [])

View Source

Bangified version of serialize/2