Class: WebPay::ShopIdRequest
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 ShopIdRequest.
1702
1703
1704
1705
|
# File 'lib/webpay/data_types.rb', line 1702
def initialize(hash = {})
hash = normalize_hash(hash)
@attributes = hash
end
|
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
1683
1684
1685
|
# File 'lib/webpay/data_types.rb', line 1683
def attributes
@attributes
end
|
Class Method Details
.create(params) ⇒ Object
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
|
# File 'lib/webpay/data_types.rb', line 1690
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
1685
1686
1687
|
# File 'lib/webpay/data_types.rb', line 1685
def self.fields
['id']
end
|
Instance Method Details
#id ⇒ Object
1720
1721
1722
|
# File 'lib/webpay/data_types.rb', line 1720
def id
attributes['id']
end
|
#id=(value) ⇒ Object
1724
1725
1726
|
# File 'lib/webpay/data_types.rb', line 1724
def id=(value)
attributes['id'] = value
end
|
#query_params ⇒ Object
1713
1714
1715
1716
|
# File 'lib/webpay/data_types.rb', line 1713
def query_params
result = {}
return result
end
|
#request_body ⇒ Object
1708
1709
1710
1711
|
# File 'lib/webpay/data_types.rb', line 1708
def request_body
result = {}
result
end
|