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
962
963
964
965
|
# File 'lib/webpay/data_types.rb', line 962
def initialize(hash = {})
hash = normalize_hash(hash)
@attributes = hash
end
|
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
943
944
945
|
# File 'lib/webpay/data_types.rb', line 943
def attributes
@attributes
end
|
Class Method Details
.create(params) ⇒ Object
950
951
952
953
954
955
956
957
958
959
960
|
# File 'lib/webpay/data_types.rb', line 950
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
945
946
947
|
# File 'lib/webpay/data_types.rb', line 945
def self.fields
['id']
end
|
Instance Method Details
#id ⇒ Object
980
981
982
|
# File 'lib/webpay/data_types.rb', line 980
def id
attributes['id']
end
|
#id=(value) ⇒ Object
984
985
986
|
# File 'lib/webpay/data_types.rb', line 984
def id=(value)
attributes['id'] = value
end
|
#query_params ⇒ Object
973
974
975
976
|
# File 'lib/webpay/data_types.rb', line 973
def query_params
result = {}
return result
end
|
#request_body ⇒ Object
968
969
970
971
|
# File 'lib/webpay/data_types.rb', line 968
def request_body
result = {}
result
end
|