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.
1833
1834
1835
1836
|
# File 'lib/webpay/data_types.rb', line 1833
def initialize(hash = {})
hash = normalize_hash(hash)
@attributes = hash
end
|
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
1814
1815
1816
|
# File 'lib/webpay/data_types.rb', line 1814
def attributes
@attributes
end
|
Class Method Details
.create(params) ⇒ Object
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
|
# File 'lib/webpay/data_types.rb', line 1821
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
1816
1817
1818
|
# File 'lib/webpay/data_types.rb', line 1816
def self.fields
['id', 'description', 'details']
end
|
Instance Method Details
#description ⇒ Object
1861
1862
1863
|
# File 'lib/webpay/data_types.rb', line 1861
def description
attributes['description']
end
|
#description=(value) ⇒ Object
1865
1866
1867
|
# File 'lib/webpay/data_types.rb', line 1865
def description=(value)
attributes['description'] = value
end
|
#details ⇒ Object
1869
1870
1871
|
# File 'lib/webpay/data_types.rb', line 1869
def details
attributes['details']
end
|
#details=(value) ⇒ Object
1873
1874
1875
|
# File 'lib/webpay/data_types.rb', line 1873
def details=(value)
attributes['details'] = value
end
|
#id ⇒ Object
1853
1854
1855
|
# File 'lib/webpay/data_types.rb', line 1853
def id
attributes['id']
end
|
#id=(value) ⇒ Object
1857
1858
1859
|
# File 'lib/webpay/data_types.rb', line 1857
def id=(value)
attributes['id'] = value
end
|
#query_params ⇒ Object
1846
1847
1848
1849
|
# File 'lib/webpay/data_types.rb', line 1846
def query_params
result = {}
return result
end
|
#request_body ⇒ Object
1839
1840
1841
1842
1843
1844
|
# File 'lib/webpay/data_types.rb', line 1839
def request_body
result = {}
copy_if_exists(@attributes, result, 'description', 'request_body');
copy_if_exists(@attributes, result, 'details', 'request_body');
result
end
|