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.
894
895
896
897
898
899
900
|
# File 'lib/webpay/data_types.rb', line 894
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.
887
888
889
|
# File 'lib/webpay/data_types.rb', line 887
def attributes
@attributes
end
|
Class Method Details
.fields ⇒ Object
889
890
891
|
# File 'lib/webpay/data_types.rb', line 889
def self.fields
['id', 'object', 'livemode', 'created', 'active_card', 'description', 'email', 'recursions', 'deleted']
end
|
Instance Method Details
#active_card ⇒ Object
921
922
923
|
# File 'lib/webpay/data_types.rb', line 921
def active_card
attributes['active_card']
end
|
#created ⇒ Object
917
918
919
|
# File 'lib/webpay/data_types.rb', line 917
def created
attributes['created']
end
|
#deleted ⇒ Object
937
938
939
|
# File 'lib/webpay/data_types.rb', line 937
def deleted
attributes['deleted']
end
|
#description ⇒ Object
925
926
927
|
# File 'lib/webpay/data_types.rb', line 925
def description
attributes['description']
end
|
#email ⇒ Object
929
930
931
|
# File 'lib/webpay/data_types.rb', line 929
def email
attributes['email']
end
|
#id ⇒ Object
905
906
907
|
# File 'lib/webpay/data_types.rb', line 905
def id
attributes['id']
end
|
#livemode ⇒ Object
913
914
915
|
# File 'lib/webpay/data_types.rb', line 913
def livemode
attributes['livemode']
end
|
#object ⇒ Object
909
910
911
|
# File 'lib/webpay/data_types.rb', line 909
def object
attributes['object']
end
|
#recursions ⇒ Object
933
934
935
|
# File 'lib/webpay/data_types.rb', line 933
def recursions
attributes['recursions']
end
|