Class: WebPay::CustomerResponse
- Inherits:
-
Entity
- Object
- Entity
- WebPay::CustomerResponse
show all
- Defined in:
- lib/webpay/data_types.rb
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Entity
#normalize_hash, #to_h, #to_s
Constructor Details
Returns a new instance of CustomerResponse.
959
960
961
962
963
964
965
|
# File 'lib/webpay/data_types.rb', line 959
def initialize(hash = {})
hash = normalize_hash(hash)
hash['active_card'] = WebPay::CardResponse.new(hash['active_card']) if hash['active_card'].is_a?(Hash)
hash['recursions'] = hash['recursions'].is_a?(Array) ? hash['recursions'].map { |x| WebPay::RecursionResponse.new(x) if x.is_a?(Hash) } : hash['recursions']
hash['deleted'] ||= false
@attributes = hash
end
|
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
952
953
954
|
# File 'lib/webpay/data_types.rb', line 952
def attributes
@attributes
end
|
Class Method Details
.fields ⇒ Object
954
955
956
|
# File 'lib/webpay/data_types.rb', line 954
def self.fields
['id', 'object', 'livemode', 'created', 'active_card', 'description', 'email', 'recursions', 'deleted']
end
|
Instance Method Details
#active_card ⇒ Object
986
987
988
|
# File 'lib/webpay/data_types.rb', line 986
def active_card
attributes['active_card']
end
|
#created ⇒ Object
982
983
984
|
# File 'lib/webpay/data_types.rb', line 982
def created
attributes['created']
end
|
#deleted ⇒ Object
1002
1003
1004
|
# File 'lib/webpay/data_types.rb', line 1002
def deleted
attributes['deleted']
end
|
#description ⇒ Object
990
991
992
|
# File 'lib/webpay/data_types.rb', line 990
def description
attributes['description']
end
|
#email ⇒ Object
994
995
996
|
# File 'lib/webpay/data_types.rb', line 994
def email
attributes['email']
end
|
#id ⇒ Object
970
971
972
|
# File 'lib/webpay/data_types.rb', line 970
def id
attributes['id']
end
|
#livemode ⇒ Object
978
979
980
|
# File 'lib/webpay/data_types.rb', line 978
def livemode
attributes['livemode']
end
|
#object ⇒ Object
974
975
976
|
# File 'lib/webpay/data_types.rb', line 974
def object
attributes['object']
end
|
#recursions ⇒ Object
998
999
1000
|
# File 'lib/webpay/data_types.rb', line 998
def recursions
attributes['recursions']
end
|