Class: Bigbank::Client::Application
- Defined in:
- lib/bigbank/client/endpoints/application.rb
Defined Under Namespace
Classes: ApplicationResult
Instance Attribute Summary collapse
-
#post_params ⇒ Object
Returns the value of attribute post_params.
Class Method Summary collapse
Instance Method Summary collapse
- #create ⇒ Object
-
#initialize(post_params = {}) ⇒ Application
constructor
A new instance of Application.
Methods inherited from Endpoint
#config, #connection, #user_agent
Constructor Details
#initialize(post_params = {}) ⇒ Application
Returns a new instance of Application.
10 11 12 |
# File 'lib/bigbank/client/endpoints/application.rb', line 10 def initialize(post_params={}) @post_params = post_params end |
Instance Attribute Details
#post_params ⇒ Object
Returns the value of attribute post_params.
4 5 6 |
# File 'lib/bigbank/client/endpoints/application.rb', line 4 def post_params @post_params end |
Class Method Details
.create(*args) ⇒ Object
6 7 8 |
# File 'lib/bigbank/client/endpoints/application.rb', line 6 def self.create(*args) self.new(*args).create end |
Instance Method Details
#create ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/bigbank/client/endpoints/application.rb', line 14 def create response = connection.post do |request| request.url "/api/" request.params = { post: "data" } request.body = { key: config.partner_key }.merge!(post_params) end ApplicationResult.new(response, connection) end |