Class: Simplify::TransactionReview
- Inherits:
-
Hash
- Object
- Hash
- Simplify::TransactionReview
- Defined in:
- lib/simplify/transactionreview.rb
Overview
A TransactionReview object.
Instance Attribute Summary collapse
-
#authentication ⇒ Object
Authentication object used to access the API (See Simplify::Authentication for details).
Class Method Summary collapse
-
.create(parms, *auth) ⇒ Object
Creates an TransactionReview object.
-
.find(id, *auth) ⇒ Object
Retrieve a TransactionReview object from the API.
-
.list(criteria = nil, *auth) ⇒ Object
Retrieve TransactionReview objects.
Instance Method Summary collapse
-
#delete ⇒ Object
Delete this object.
-
#private_key ⇒ Object
Returns the private key used when accessing this object.
-
#private_key=(k) ⇒ Object
Sets the private key used when accessing this object.
-
#public_key ⇒ Object
Returns the public key used when accessing this object.
-
#public_key=(k) ⇒ Object
Sets the public key used when accessing this object.
-
#update ⇒ Object
Updates this object.
Instance Attribute Details
#authentication ⇒ Object
Authentication object used to access the API (See Simplify::Authentication for details)
37 38 39 |
# File 'lib/simplify/transactionreview.rb', line 37 def authentication @authentication end |
Class Method Details
.create(parms, *auth) ⇒ Object
Creates an TransactionReview object
- parms
-
a hash of parameters; valid keys are:
- auth
-
Authentication information used for the API call. If no value is passed the global keys Simplify::public_key and Simplify::private_key are used. For backwards compatibility the public and private keys may be passed instead of the authentication object.
Returns a TransactionReview object.
65 66 67 68 69 70 71 72 73 |
# File 'lib/simplify/transactionreview.rb', line 65 def self.create(parms, *auth) auth_obj = Simplify::PaymentsApi.create_auth_object(auth) h = Simplify::PaymentsApi.execute("transactionReview", 'create', parms, auth_obj) obj = TransactionReview.new() obj.authentication = auth_obj obj = obj.merge!(h) obj end |
.find(id, *auth) ⇒ Object
Retrieve a TransactionReview object from the API
- id
-
ID of object to retrieve
- auth
-
Authentication information used for the API call. If no value is passed the global keys Simplify::public_key and Simplify::private_key are used. For backwards compatibility the public and private keys may be passed instead of the authentication object.
Returns a TransactionReview object.
103 104 105 106 107 108 109 110 111 |
# File 'lib/simplify/transactionreview.rb', line 103 def self.find(id, *auth) auth_obj = Simplify::PaymentsApi.create_auth_object(auth) h = Simplify::PaymentsApi.execute("transactionReview", 'show', {"id" => id}, auth_obj) obj = TransactionReview.new() obj.authentication = auth_obj obj = obj.merge!(h) obj end |
.list(criteria = nil, *auth) ⇒ Object
Retrieve TransactionReview objects.
- criteria
-
a hash of parameters; valid keys are:
- auth
-
Authentication information used for the API call. If no value is passed the global keys Simplify::public_key and Simplify::private_key are used. For backwards compatibility the public and private keys may be passed instead of the authentication object.
Returns an object where the list
property contains the list of TransactionReview objects and the total
property contains the total number of TransactionReview objects available for the given criteria.
87 88 89 90 91 92 93 94 95 96 |
# File 'lib/simplify/transactionreview.rb', line 87 def self.list(criteria = nil, *auth) auth_obj = Simplify::PaymentsApi.create_auth_object(auth) h = Simplify::PaymentsApi.execute("transactionReview", 'list', criteria, auth_obj) obj = TransactionReview.new() obj.authentication = auth_obj obj = obj.merge!(h) obj end |
Instance Method Details
#delete ⇒ Object
Delete this object
76 77 78 79 80 |
# File 'lib/simplify/transactionreview.rb', line 76 def delete() h = Simplify::PaymentsApi.execute("transactionReview", 'delete', self, self.authentication) self.merge!(h) self end |
#private_key ⇒ Object
Returns the private key used when accessing this object. Deprecated: please use ‘authentication’ instead.
50 51 52 |
# File 'lib/simplify/transactionreview.rb', line 50 def private_key return self.authentication.private_key end |
#private_key=(k) ⇒ Object
Sets the private key used when accessing this object. Deprecated: please use ‘authentication’ instead.
55 56 57 |
# File 'lib/simplify/transactionreview.rb', line 55 def private_key=(k) return self.authentication.private_key = k end |
#public_key ⇒ Object
Returns the public key used when accessing this object. Deprecated: please use ‘authentication’ instead.
40 41 42 |
# File 'lib/simplify/transactionreview.rb', line 40 def public_key return self.authentication.public_key end |
#public_key=(k) ⇒ Object
Sets the public key used when accessing this object. Deprecated: please use ‘authentication’ instead.
45 46 47 |
# File 'lib/simplify/transactionreview.rb', line 45 def public_key=(k) return self.authentication.public_key = k end |
#update ⇒ Object
Updates this object
The properties that can be updated:
116 117 118 119 120 |
# File 'lib/simplify/transactionreview.rb', line 116 def update() h = Simplify::PaymentsApi.execute("transactionReview", 'update', self, self.authentication) self.merge!(h) self end |