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.
1749
1750
1751
1752
|
# File 'lib/webpay/data_types.rb', line 1749
def initialize(hash = {})
hash = normalize_hash(hash)
@attributes = hash
end
|
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
1730
1731
1732
|
# File 'lib/webpay/data_types.rb', line 1730
def attributes
@attributes
end
|
Class Method Details
.create(params) ⇒ Object
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
|
# File 'lib/webpay/data_types.rb', line 1737
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
1732
1733
1734
|
# File 'lib/webpay/data_types.rb', line 1732
def self.fields
['id', 'description', 'details']
end
|
Instance Method Details
#description ⇒ Object
1777
1778
1779
|
# File 'lib/webpay/data_types.rb', line 1777
def description
attributes['description']
end
|
#description=(value) ⇒ Object
1781
1782
1783
|
# File 'lib/webpay/data_types.rb', line 1781
def description=(value)
attributes['description'] = value
end
|
#details ⇒ Object
1785
1786
1787
|
# File 'lib/webpay/data_types.rb', line 1785
def details
attributes['details']
end
|
#details=(value) ⇒ Object
1789
1790
1791
|
# File 'lib/webpay/data_types.rb', line 1789
def details=(value)
attributes['details'] = value
end
|
#id ⇒ Object
1769
1770
1771
|
# File 'lib/webpay/data_types.rb', line 1769
def id
attributes['id']
end
|
#id=(value) ⇒ Object
1773
1774
1775
|
# File 'lib/webpay/data_types.rb', line 1773
def id=(value)
attributes['id'] = value
end
|
#query_params ⇒ Object
1762
1763
1764
1765
|
# File 'lib/webpay/data_types.rb', line 1762
def query_params
result = {}
return result
end
|
#request_body ⇒ Object
1755
1756
1757
1758
1759
1760
|
# File 'lib/webpay/data_types.rb', line 1755
def request_body
result = {}
copy_if_exists(@attributes, result, 'description', 'request_body');
copy_if_exists(@attributes, result, 'details', 'request_body');
result
end
|