Class: EVSS::PCIU::RequestBody
- Inherits:
-
Object
- Object
- EVSS::PCIU::RequestBody
- Defined in:
- lib/evss/pciu/request_body.rb
Instance Attribute Summary collapse
-
#date_attr ⇒ Object
readonly
Returns the value of attribute date_attr.
-
#pciu_key ⇒ Object
readonly
Returns the value of attribute pciu_key.
-
#request_attrs ⇒ Object
readonly
Returns the value of attribute request_attrs.
Instance Method Summary collapse
-
#initialize(request_attrs, pciu_key:, date_attr: 'effective_date') ⇒ RequestBody
constructor
A new instance of RequestBody.
-
#set ⇒ String
Adjusts the passed request attributes to be formatted for an EVSS POST or PUT request body.
Constructor Details
#initialize(request_attrs, pciu_key:, date_attr: 'effective_date') ⇒ RequestBody
Returns a new instance of RequestBody.
8 9 10 11 12 |
# File 'lib/evss/pciu/request_body.rb', line 8 def initialize(request_attrs, pciu_key:, date_attr: 'effective_date') @request_attrs = request_attrs @pciu_key = pciu_key @date_attr = date_attr end |
Instance Attribute Details
#date_attr ⇒ Object (readonly)
Returns the value of attribute date_attr.
6 7 8 |
# File 'lib/evss/pciu/request_body.rb', line 6 def date_attr @date_attr end |
#pciu_key ⇒ Object (readonly)
Returns the value of attribute pciu_key.
6 7 8 |
# File 'lib/evss/pciu/request_body.rb', line 6 def pciu_key @pciu_key end |
#request_attrs ⇒ Object (readonly)
Returns the value of attribute request_attrs.
6 7 8 |
# File 'lib/evss/pciu/request_body.rb', line 6 def request_attrs @request_attrs end |
Instance Method Details
#set ⇒ String
Adjusts the passed request attributes to be formatted for an EVSS POST or PUT request body.
28 29 30 31 32 |
# File 'lib/evss/pciu/request_body.rb', line 28 def set set_effective_date remove_empty_attrs convert_to_json end |