Class: WebPay::ShopRequestAlterStatus
- Inherits:
-
Entity
- Object
- Entity
- WebPay::ShopRequestAlterStatus
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 ShopRequestAlterStatus.
1879
1880
1881
1882
|
# File 'lib/webpay/data_types.rb', line 1879
def initialize(hash = {})
hash = normalize_hash(hash)
@attributes = hash
end
|
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
1860
1861
1862
|
# File 'lib/webpay/data_types.rb', line 1860
def attributes
@attributes
end
|
Class Method Details
.create(params) ⇒ Object
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
|
# File 'lib/webpay/data_types.rb', line 1867
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
1862
1863
1864
|
# File 'lib/webpay/data_types.rb', line 1862
def self.fields
['id', 'status']
end
|
Instance Method Details
#id ⇒ Object
1898
1899
1900
|
# File 'lib/webpay/data_types.rb', line 1898
def id
attributes['id']
end
|
#id=(value) ⇒ Object
1902
1903
1904
|
# File 'lib/webpay/data_types.rb', line 1902
def id=(value)
attributes['id'] = value
end
|
#query_params ⇒ Object
1891
1892
1893
1894
|
# File 'lib/webpay/data_types.rb', line 1891
def query_params
result = {}
return result
end
|
#request_body ⇒ Object
1885
1886
1887
1888
1889
|
# File 'lib/webpay/data_types.rb', line 1885
def request_body
result = {}
copy_if_exists(@attributes, result, 'status', 'request_body');
result
end
|
#status ⇒ Object
1906
1907
1908
|
# File 'lib/webpay/data_types.rb', line 1906
def status
attributes['status']
end
|
#status=(value) ⇒ Object
1910
1911
1912
|
# File 'lib/webpay/data_types.rb', line 1910
def status=(value)
attributes['status'] = value
end
|