Class: Fancyhands::V1::Request::Custom
- Inherits:
-
Object
- Object
- Fancyhands::V1::Request::Custom
- Defined in:
- lib/fancyhands/v1/request/custom.rb
Instance Attribute Summary collapse
-
#bid ⇒ Object
Returns the value of attribute bid.
-
#custom_fields ⇒ Object
Returns the value of attribute custom_fields.
-
#description ⇒ Object
Returns the value of attribute description.
-
#expiration_date ⇒ Object
Returns the value of attribute expiration_date.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
- #create ⇒ Object
-
#initialize(title, desc, bid, expiration_date, custom_fields = {}) ⇒ Custom
constructor
A new instance of Custom.
Constructor Details
#initialize(title, desc, bid, expiration_date, custom_fields = {}) ⇒ Custom
Returns a new instance of Custom.
7 8 9 10 11 12 13 14 15 |
# File 'lib/fancyhands/v1/request/custom.rb', line 7 def initialize(title, desc, bid, expiration_date, custom_fields = {}) @title = title @description = desc @bid = bid @expiration_date = expiration_date @custom_fields = custom_fields validate_required_fields end |
Instance Attribute Details
#bid ⇒ Object
Returns the value of attribute bid.
5 6 7 |
# File 'lib/fancyhands/v1/request/custom.rb', line 5 def bid @bid end |
#custom_fields ⇒ Object
Returns the value of attribute custom_fields.
5 6 7 |
# File 'lib/fancyhands/v1/request/custom.rb', line 5 def custom_fields @custom_fields end |
#description ⇒ Object
Returns the value of attribute description.
5 6 7 |
# File 'lib/fancyhands/v1/request/custom.rb', line 5 def description @description end |
#expiration_date ⇒ Object
Returns the value of attribute expiration_date.
5 6 7 |
# File 'lib/fancyhands/v1/request/custom.rb', line 5 def expiration_date @expiration_date end |
#title ⇒ Object
Returns the value of attribute title.
5 6 7 |
# File 'lib/fancyhands/v1/request/custom.rb', line 5 def title @title end |
Instance Method Details
#create ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/fancyhands/v1/request/custom.rb', line 17 def create requester.post('/request/custom', { title: title, description: description, bid: bid, expiration_date: expiration_date, custom_fields: custom_fields }) end |