Class: WebPay::ShopIdRequest
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 ShopIdRequest.
1786
1787
1788
1789
|
# File 'lib/webpay/data_types.rb', line 1786
def initialize(hash = {})
hash = normalize_hash(hash)
@attributes = hash
end
|
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
1767
1768
1769
|
# File 'lib/webpay/data_types.rb', line 1767
def attributes
@attributes
end
|
Class Method Details
.create(params) ⇒ Object
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
|
# File 'lib/webpay/data_types.rb', line 1774
def self.create(params)
return params if params.is_a?(self)
hash = case params
when Hash; params
when WebPay::ShopResponse; {'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
1769
1770
1771
|
# File 'lib/webpay/data_types.rb', line 1769
def self.fields
['id']
end
|
Instance Method Details
#id ⇒ Object
1804
1805
1806
|
# File 'lib/webpay/data_types.rb', line 1804
def id
attributes['id']
end
|
#id=(value) ⇒ Object
1808
1809
1810
|
# File 'lib/webpay/data_types.rb', line 1808
def id=(value)
attributes['id'] = value
end
|
#query_params ⇒ Object
1797
1798
1799
1800
|
# File 'lib/webpay/data_types.rb', line 1797
def query_params
result = {}
return result
end
|
#request_body ⇒ Object
1792
1793
1794
1795
|
# File 'lib/webpay/data_types.rb', line 1792
def request_body
result = {}
result
end
|