Class: WebPay::Mock::FakeEntity::Customer

Inherits:
Base
  • Object
show all
Defined in:
lib/webpay/mock/fake_entity/customer.rb

Instance Attribute Summary

Attributes inherited from Base

#builder

Instance Method Summary collapse

Methods inherited from Base

#build, #initialize, #override, #set_params

Methods included from WebPay::Mock::FakeEntity

#card_from, #charge_from, #customer_from, #fake_account, #fake_card, #fake_event, #fake_fingerprint, #fake_list, #recursion_from, #token_from

Methods included from Util

#stringify_keys

Constructor Details

This class inherits a constructor from WebPay::Mock::FakeEntity::Base

Instance Method Details

#basic_attributesObject



7
8
9
# File 'lib/webpay/mock/fake_entity/customer.rb', line 7

def basic_attributes
  { email: nil, description: nil, active_card: nil, recursions: [] }
end

#conversion(key, value) ⇒ Object



15
16
17
18
19
# File 'lib/webpay/mock/fake_entity/customer.rb', line 15

def conversion(key, value)
  if key == 'card'
    { active_card: value.is_a?(Hash) ? card_from(value) : fake_card }
  end
end

#copy_attributesObject



11
12
13
# File 'lib/webpay/mock/fake_entity/customer.rb', line 11

def copy_attributes
  [:email, :description]
end

#object_nameObject



3
4
5
# File 'lib/webpay/mock/fake_entity/customer.rb', line 3

def object_name
  'customer'
end