Class: WebPay::RecursionRequestCreate
- Defined in:
- lib/webpay/data_types.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Class Method Summary collapse
Instance Method Summary collapse
-
#amount ⇒ Object
attributes accessors.
- #amount=(value) ⇒ Object
- #currency ⇒ Object
- #currency=(value) ⇒ Object
- #customer ⇒ Object
- #customer=(value) ⇒ Object
- #description ⇒ Object
- #description=(value) ⇒ Object
- #first_scheduled ⇒ Object
- #first_scheduled=(value) ⇒ Object
-
#initialize(hash = {}) ⇒ RecursionRequestCreate
constructor
A new instance of RecursionRequestCreate.
- #period ⇒ Object
- #period=(value) ⇒ Object
- #query_params ⇒ Object
- #request_body ⇒ Object
- #shop ⇒ Object
- #shop=(value) ⇒ Object
- #uuid ⇒ Object
- #uuid=(value) ⇒ Object
Methods inherited from Entity
Constructor Details
#initialize(hash = {}) ⇒ RecursionRequestCreate
Returns a new instance of RecursionRequestCreate.
1902 1903 1904 1905 |
# File 'lib/webpay/data_types.rb', line 1902 def initialize(hash = {}) hash = normalize_hash(hash) @attributes = hash end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
1885 1886 1887 |
# File 'lib/webpay/data_types.rb', line 1885 def attributes @attributes end |
Class Method Details
.create(params) ⇒ Object
1892 1893 1894 1895 1896 1897 1898 1899 1900 |
# File 'lib/webpay/data_types.rb', line 1892 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
1887 1888 1889 |
# File 'lib/webpay/data_types.rb', line 1887 def self.fields ['amount', 'currency', 'customer', 'period', 'description', 'shop', 'first_scheduled', 'uuid'] end |
Instance Method Details
#amount ⇒ Object
attributes accessors
1928 1929 1930 |
# File 'lib/webpay/data_types.rb', line 1928 def amount attributes['amount'] end |
#amount=(value) ⇒ Object
1932 1933 1934 |
# File 'lib/webpay/data_types.rb', line 1932 def amount=(value) attributes['amount'] = value end |
#currency ⇒ Object
1936 1937 1938 |
# File 'lib/webpay/data_types.rb', line 1936 def currency attributes['currency'] end |
#currency=(value) ⇒ Object
1940 1941 1942 |
# File 'lib/webpay/data_types.rb', line 1940 def currency=(value) attributes['currency'] = value end |
#customer ⇒ Object
1944 1945 1946 |
# File 'lib/webpay/data_types.rb', line 1944 def customer attributes['customer'] end |
#customer=(value) ⇒ Object
1948 1949 1950 |
# File 'lib/webpay/data_types.rb', line 1948 def customer=(value) attributes['customer'] = value end |
#description ⇒ Object
1960 1961 1962 |
# File 'lib/webpay/data_types.rb', line 1960 def description attributes['description'] end |
#description=(value) ⇒ Object
1964 1965 1966 |
# File 'lib/webpay/data_types.rb', line 1964 def description=(value) attributes['description'] = value end |
#first_scheduled ⇒ Object
1976 1977 1978 |
# File 'lib/webpay/data_types.rb', line 1976 def first_scheduled attributes['first_scheduled'] end |
#first_scheduled=(value) ⇒ Object
1980 1981 1982 |
# File 'lib/webpay/data_types.rb', line 1980 def first_scheduled=(value) attributes['first_scheduled'] = value end |
#period ⇒ Object
1952 1953 1954 |
# File 'lib/webpay/data_types.rb', line 1952 def period attributes['period'] end |
#period=(value) ⇒ Object
1956 1957 1958 |
# File 'lib/webpay/data_types.rb', line 1956 def period=(value) attributes['period'] = value end |
#query_params ⇒ Object
1921 1922 1923 1924 |
# File 'lib/webpay/data_types.rb', line 1921 def query_params result = {} return result end |
#request_body ⇒ Object
1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 |
# File 'lib/webpay/data_types.rb', line 1908 def request_body result = {} copy_if_exists(@attributes, result, 'amount', 'request_body'); copy_if_exists(@attributes, result, 'currency', 'request_body'); copy_if_exists(@attributes, result, 'customer', 'request_body'); copy_if_exists(@attributes, result, 'period', 'request_body'); copy_if_exists(@attributes, result, 'description', 'request_body'); copy_if_exists(@attributes, result, 'shop', 'request_body'); copy_if_exists(@attributes, result, 'first_scheduled', 'request_body'); copy_if_exists(@attributes, result, 'uuid', 'request_body'); result end |
#shop ⇒ Object
1968 1969 1970 |
# File 'lib/webpay/data_types.rb', line 1968 def shop attributes['shop'] end |
#shop=(value) ⇒ Object
1972 1973 1974 |
# File 'lib/webpay/data_types.rb', line 1972 def shop=(value) attributes['shop'] = value end |
#uuid ⇒ Object
1984 1985 1986 |
# File 'lib/webpay/data_types.rb', line 1984 def uuid attributes['uuid'] end |
#uuid=(value) ⇒ Object
1988 1989 1990 |
# File 'lib/webpay/data_types.rb', line 1988 def uuid=(value) attributes['uuid'] = value end |