Class: Barion::PayerAccount

Inherits:
ApplicationRecord show all
Includes:
DataFormats, JsonSerializer
Defined in:
app/models/barion/payer_account.rb

Overview

Represents a PayerAccount in Barion engine

Instance Method Summary collapse

Methods included from JsonSerializer

#deserialize, #deserialize_options, #key_names, #process_response, #serializable_hash

Methods included from DataFormats

phone_number

Instance Method Details

#serialize_optionsObject



99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# File 'app/models/barion/payer_account.rb', line 99

def serialize_options
  { except: %i[id created_at updated_at],
    map: {
      keys: {
        _all: :camelize
      },
      values: {
        _all: proc { |v| v.respond_to?(:camelize) ? v.camelize : v },
        account_created: :as_datetime,
        account_last_changed: :as_datetime,
        password_last_changed: :as_datetime,
        account_change_indicator: :as_enum_id,
        account_creation_indicator: :as_enum_id,
        password_change_indicator: :as_enum_id,
        shipping_address_usage_indicator: :as_enum_id,
        suspicious_activity_indicator: :as_enum_id
      }
    } }
end