Class: CrowdFlower::Order
- Inherits:
-
Object
- Object
- CrowdFlower::Order
- Includes:
- Defaults
- Defined in:
- lib/ruby-crowdflower/order.rb
Instance Attribute Summary collapse
-
#job ⇒ Object
readonly
Returns the value of attribute job.
Instance Method Summary collapse
- #debit(percentage = 100) ⇒ Object
-
#initialize(job) ⇒ Order
constructor
A new instance of Order.
Methods included from Defaults
Constructor Details
#initialize(job) ⇒ Order
Returns a new instance of Order.
6 7 8 9 10 |
# File 'lib/ruby-crowdflower/order.rb', line 6 def initialize(job) @job = job Order.base_uri CrowdFlower.with_domain("/jobs/#{@job.id}/orders") Order.default_params CrowdFlower.key end |
Instance Attribute Details
#job ⇒ Object (readonly)
Returns the value of attribute job.
4 5 6 |
# File 'lib/ruby-crowdflower/order.rb', line 4 def job @job end |
Instance Method Details
#debit(percentage = 100) ⇒ Object
12 13 14 |
# File 'lib/ruby-crowdflower/order.rb', line 12 def debit(percentage = 100) Order.post("", {:query => {:percentage => percentage}}) end |