Class: WebPay::ShopRequestUpdate
- Inherits:
-
Entity
- Object
- Entity
- WebPay::ShopRequestUpdate
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 ShopRequestUpdate.
1814
1815
1816
1817
|
# File 'lib/webpay/data_types.rb', line 1814
def initialize(hash = {})
hash = normalize_hash(hash)
@attributes = hash
end
|
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
1795
1796
1797
|
# File 'lib/webpay/data_types.rb', line 1795
def attributes
@attributes
end
|
Class Method Details
.create(params) ⇒ Object
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
|
# File 'lib/webpay/data_types.rb', line 1802
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
1797
1798
1799
|
# File 'lib/webpay/data_types.rb', line 1797
def self.fields
['id', 'description', 'details']
end
|
Instance Method Details
#description ⇒ Object
1842
1843
1844
|
# File 'lib/webpay/data_types.rb', line 1842
def description
attributes['description']
end
|
#description=(value) ⇒ Object
1846
1847
1848
|
# File 'lib/webpay/data_types.rb', line 1846
def description=(value)
attributes['description'] = value
end
|
#details ⇒ Object
1850
1851
1852
|
# File 'lib/webpay/data_types.rb', line 1850
def details
attributes['details']
end
|
#details=(value) ⇒ Object
1854
1855
1856
|
# File 'lib/webpay/data_types.rb', line 1854
def details=(value)
attributes['details'] = value
end
|
#id ⇒ Object
1834
1835
1836
|
# File 'lib/webpay/data_types.rb', line 1834
def id
attributes['id']
end
|
#id=(value) ⇒ Object
1838
1839
1840
|
# File 'lib/webpay/data_types.rb', line 1838
def id=(value)
attributes['id'] = value
end
|
#query_params ⇒ Object
1827
1828
1829
1830
|
# File 'lib/webpay/data_types.rb', line 1827
def query_params
result = {}
return result
end
|
#request_body ⇒ Object
1820
1821
1822
1823
1824
1825
|
# File 'lib/webpay/data_types.rb', line 1820
def request_body
result = {}
copy_if_exists(@attributes, result, 'description', 'request_body');
copy_if_exists(@attributes, result, 'details', 'request_body');
result
end
|