Class: WebPay::ShopRequestCreate
- Inherits:
-
Entity
- Object
- Entity
- WebPay::ShopRequestCreate
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 ShopRequestCreate.
1672
1673
1674
1675
|
# File 'lib/webpay/data_types.rb', line 1672
def initialize(hash = {})
hash = normalize_hash(hash)
@attributes = hash
end
|
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
1655
1656
1657
|
# File 'lib/webpay/data_types.rb', line 1655
def attributes
@attributes
end
|
Class Method Details
.create(params) ⇒ Object
1662
1663
1664
1665
1666
1667
1668
1669
1670
|
# File 'lib/webpay/data_types.rb', line 1662
def self.create(params)
return params if params.is_a?(self)
hash = case params
when Hash; params
else
raise WebPay::InvalidRequestError.new("#{self} does not accept the given value", params)
end
self.new(hash)
end
|
.fields ⇒ Object
1657
1658
1659
|
# File 'lib/webpay/data_types.rb', line 1657
def self.fields
['description', 'details']
end
|
Instance Method Details
#description ⇒ Object
1692
1693
1694
|
# File 'lib/webpay/data_types.rb', line 1692
def description
attributes['description']
end
|
#description=(value) ⇒ Object
1696
1697
1698
|
# File 'lib/webpay/data_types.rb', line 1696
def description=(value)
attributes['description'] = value
end
|
#details ⇒ Object
1700
1701
1702
|
# File 'lib/webpay/data_types.rb', line 1700
def details
attributes['details']
end
|
#details=(value) ⇒ Object
1704
1705
1706
|
# File 'lib/webpay/data_types.rb', line 1704
def details=(value)
attributes['details'] = value
end
|
#query_params ⇒ Object
1685
1686
1687
1688
|
# File 'lib/webpay/data_types.rb', line 1685
def query_params
result = {}
return result
end
|
#request_body ⇒ Object
1678
1679
1680
1681
1682
1683
|
# File 'lib/webpay/data_types.rb', line 1678
def request_body
result = {}
copy_if_exists(@attributes, result, 'description', 'request_body');
copy_if_exists(@attributes, result, 'details', 'request_body');
result
end
|