Class: WebPay::CustomerIdRequest
- Inherits:
-
Entity
- Object
- Entity
- WebPay::CustomerIdRequest
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 CustomerIdRequest.
1045
1046
1047
1048
|
# File 'lib/webpay/data_types.rb', line 1045
def initialize(hash = {})
hash = normalize_hash(hash)
@attributes = hash
end
|
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
1026
1027
1028
|
# File 'lib/webpay/data_types.rb', line 1026
def attributes
@attributes
end
|
Class Method Details
.create(params) ⇒ Object
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
|
# File 'lib/webpay/data_types.rb', line 1033
def self.create(params)
return params if params.is_a?(self)
hash = case params
when Hash; params
when WebPay::CustomerResponse; {'id' => params.id}
when String; {'id' => params}
else
raise WebPay::InvalidRequestError.new("#{self} does not accept the given value", params)
end
self.new(hash)
end
|
.fields ⇒ Object
1028
1029
1030
|
# File 'lib/webpay/data_types.rb', line 1028
def self.fields
['id']
end
|
Instance Method Details
#id ⇒ Object
1063
1064
1065
|
# File 'lib/webpay/data_types.rb', line 1063
def id
attributes['id']
end
|
#id=(value) ⇒ Object
1067
1068
1069
|
# File 'lib/webpay/data_types.rb', line 1067
def id=(value)
attributes['id'] = value
end
|
#query_params ⇒ Object
1056
1057
1058
1059
|
# File 'lib/webpay/data_types.rb', line 1056
def query_params
result = {}
return result
end
|
#request_body ⇒ Object
1051
1052
1053
1054
|
# File 'lib/webpay/data_types.rb', line 1051
def request_body
result = {}
result
end
|