Class: Rev::OrderRequest
- Inherits:
-
ApiSerializable
- Object
- ApiSerializable
- Rev::OrderRequest
- Defined in:
- lib/rev-api/models/order_request.rb
Overview
OrderRequest is used for constructing order ‘spec’ in consumer code and passing it into. It consists of three main elements: :payment, :transcription_options and :notification. You can also supply priority, reference number, and customer comment
Constant Summary collapse
- PRIORITY =
use to correctly set priority
{ :normal => 'Normal', :time_insensitivie => 'TimeInsensitivie' }
Instance Attribute Summary collapse
-
#caption_options ⇒ Object
readonly
see CaptionOptions.
-
#client_ref ⇒ Object
readonly
a reference number for the order meaningful for the client (optional).
-
#comment ⇒ Object
readonly
a comment with any special messages about the order (optional).
-
#notification ⇒ Object
readonly
see Notification.
-
#payment ⇒ Object
readonly
see Payment.
-
#priority ⇒ Object
readonly
a requested priority for the order, defaults to normal (optional).
-
#transcription_options ⇒ Object
readonly
see TranscriptionOptions.
-
#translation_options ⇒ Object
readonly
see TranslationOptions.
Class Method Summary collapse
-
.new_with_payment(payment, fields = {}) ⇒ Object
deprecated
Deprecated.
payment always defaults to :account_balance
Instance Method Summary collapse
-
#initialize(fields = {}) ⇒ OrderRequest
constructor
A new instance of OrderRequest.
Methods inherited from ApiSerializable
Constructor Details
#initialize(fields = {}) ⇒ OrderRequest
Returns a new instance of OrderRequest.
50 51 52 53 54 |
# File 'lib/rev-api/models/order_request.rb', line 50 def initialize(fields = {}) fields = { :priority => PRIORITY[:normal] }.merge(fields) @payment = Rev::Payment.with_account_balance super fields end |
Instance Attribute Details
#caption_options ⇒ Object (readonly)
see CaptionOptions
20 21 22 |
# File 'lib/rev-api/models/order_request.rb', line 20 def end |
#client_ref ⇒ Object (readonly)
a reference number for the order meaningful for the client (optional)
26 27 28 |
# File 'lib/rev-api/models/order_request.rb', line 26 def client_ref @client_ref end |
#comment ⇒ Object (readonly)
a comment with any special messages about the order (optional)
29 30 31 |
# File 'lib/rev-api/models/order_request.rb', line 29 def comment @comment end |
#notification ⇒ Object (readonly)
see Notification
23 24 25 |
# File 'lib/rev-api/models/order_request.rb', line 23 def notification @notification end |
#payment ⇒ Object (readonly)
see Payment
11 12 13 |
# File 'lib/rev-api/models/order_request.rb', line 11 def payment @payment end |
#priority ⇒ Object (readonly)
a requested priority for the order, defaults to normal (optional)
32 33 34 |
# File 'lib/rev-api/models/order_request.rb', line 32 def priority @priority end |
#transcription_options ⇒ Object (readonly)
14 15 16 |
# File 'lib/rev-api/models/order_request.rb', line 14 def end |
#translation_options ⇒ Object (readonly)
17 18 19 |
# File 'lib/rev-api/models/order_request.rb', line 17 def end |
Class Method Details
.new_with_payment(payment, fields = {}) ⇒ Object
payment always defaults to :account_balance
43 44 45 46 47 |
# File 'lib/rev-api/models/order_request.rb', line 43 def self.new_with_payment(payment, fields = {}) fields = { :priority => PRIORITY[:normal] }.merge(fields) super fields @payment = payment end |