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.
1653
1654
1655
1656
|
# File 'lib/webpay/data_types.rb', line 1653
def initialize(hash = {})
hash = normalize_hash(hash)
@attributes = hash
end
|
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
1636
1637
1638
|
# File 'lib/webpay/data_types.rb', line 1636
def attributes
@attributes
end
|
Class Method Details
.create(params) ⇒ Object
1643
1644
1645
1646
1647
1648
1649
1650
1651
|
# File 'lib/webpay/data_types.rb', line 1643
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
1638
1639
1640
|
# File 'lib/webpay/data_types.rb', line 1638
def self.fields
['description', 'details']
end
|
Instance Method Details
#description ⇒ Object
1673
1674
1675
|
# File 'lib/webpay/data_types.rb', line 1673
def description
attributes['description']
end
|
#description=(value) ⇒ Object
1677
1678
1679
|
# File 'lib/webpay/data_types.rb', line 1677
def description=(value)
attributes['description'] = value
end
|
#details ⇒ Object
1681
1682
1683
|
# File 'lib/webpay/data_types.rb', line 1681
def details
attributes['details']
end
|
#details=(value) ⇒ Object
1685
1686
1687
|
# File 'lib/webpay/data_types.rb', line 1685
def details=(value)
attributes['details'] = value
end
|
#query_params ⇒ Object
1666
1667
1668
1669
|
# File 'lib/webpay/data_types.rb', line 1666
def query_params
result = {}
return result
end
|
#request_body ⇒ Object
1659
1660
1661
1662
1663
1664
|
# File 'lib/webpay/data_types.rb', line 1659
def request_body
result = {}
copy_if_exists(@attributes, result, 'description', 'request_body');
copy_if_exists(@attributes, result, 'details', 'request_body');
result
end
|