Class: Paynow::RequestBuilder
- Inherits:
-
Object
- Object
- Paynow::RequestBuilder
- Defined in:
- lib/paynow/request_builder.rb
Overview
JSON body builder
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
Class Method Summary collapse
Instance Method Summary collapse
- #build ⇒ Object
-
#initialize(body) ⇒ RequestBuilder
constructor
A new instance of RequestBuilder.
Constructor Details
#initialize(body) ⇒ RequestBuilder
Returns a new instance of RequestBuilder.
15 16 17 |
# File 'lib/paynow/request_builder.rb', line 15 def initialize(body) @body = body end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
9 10 11 |
# File 'lib/paynow/request_builder.rb', line 9 def body @body end |
Class Method Details
.build(body) ⇒ Object
11 12 13 |
# File 'lib/paynow/request_builder.rb', line 11 def self.build(body) new(body).build end |
Instance Method Details
#build ⇒ Object
19 20 21 |
# File 'lib/paynow/request_builder.rb', line 19 def build body.transform_keys(&camelize_proc).to_json end |