Class: WorldpayCnp::Client
- Inherits:
-
Object
- Object
- WorldpayCnp::Client
- Defined in:
- lib/worldpay_cnp/client.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
Instance Method Summary collapse
- #create_transaction(data) ⇒ Object
-
#initialize(**options) ⇒ WorldpayCnp::Client
constructor
Initializes a new Client object.
Constructor Details
#initialize(**options) ⇒ WorldpayCnp::Client
Initializes a new Client object
10 11 12 |
# File 'lib/worldpay_cnp/client.rb', line 10 def initialize(**) @config = Configuration.new(**) end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
4 5 6 |
# File 'lib/worldpay_cnp/client.rb', line 4 def config @config end |
Instance Method Details
#create_transaction(data) ⇒ Object
14 15 16 |
# File 'lib/worldpay_cnp/client.rb', line 14 def create_transaction(data) api_client.perform_post(@config.api_url, build_request_body(data)) end |