Class: Ethikdo::Provision
- Defined in:
- lib/ethikdo/provision.rb
Instance Attribute Summary collapse
-
#capture_token ⇒ Object
Returns the value of attribute capture_token.
-
#card_number ⇒ Object
Returns the value of attribute card_number.
-
#card_value ⇒ Object
Returns the value of attribute card_value.
-
#count ⇒ Object
Returns the value of attribute count.
-
#date_created ⇒ Object
Returns the value of attribute date_created.
-
#date_used ⇒ Object
Returns the value of attribute date_used.
-
#error_code ⇒ Object
Returns the value of attribute error_code.
-
#message ⇒ Object
Returns the value of attribute message.
-
#next ⇒ Object
Returns the value of attribute next.
-
#previous ⇒ Object
Returns the value of attribute previous.
-
#results ⇒ Object
Returns the value of attribute results.
-
#status_code ⇒ Object
Returns the value of attribute status_code.
-
#url ⇒ Object
Returns the value of attribute url.
Class Method Summary collapse
Methods inherited from BaseModel
Constructor Details
This class inherits a constructor from Ethikdo::BaseModel
Instance Attribute Details
#capture_token ⇒ Object
Returns the value of attribute capture_token.
6 7 8 |
# File 'lib/ethikdo/provision.rb', line 6 def capture_token @capture_token end |
#card_number ⇒ Object
Returns the value of attribute card_number.
5 6 7 |
# File 'lib/ethikdo/provision.rb', line 5 def card_number @card_number end |
#card_value ⇒ Object
Returns the value of attribute card_value.
7 8 9 |
# File 'lib/ethikdo/provision.rb', line 7 def card_value @card_value end |
#count ⇒ Object
Returns the value of attribute count.
14 15 16 |
# File 'lib/ethikdo/provision.rb', line 14 def count @count end |
#date_created ⇒ Object
Returns the value of attribute date_created.
8 9 10 |
# File 'lib/ethikdo/provision.rb', line 8 def date_created @date_created end |
#date_used ⇒ Object
Returns the value of attribute date_used.
9 10 11 |
# File 'lib/ethikdo/provision.rb', line 9 def date_used @date_used end |
#error_code ⇒ Object
Returns the value of attribute error_code.
12 13 14 |
# File 'lib/ethikdo/provision.rb', line 12 def error_code @error_code end |
#message ⇒ Object
Returns the value of attribute message.
13 14 15 |
# File 'lib/ethikdo/provision.rb', line 13 def @message end |
#next ⇒ Object
Returns the value of attribute next.
15 16 17 |
# File 'lib/ethikdo/provision.rb', line 15 def next @next end |
#previous ⇒ Object
Returns the value of attribute previous.
16 17 18 |
# File 'lib/ethikdo/provision.rb', line 16 def previous @previous end |
#results ⇒ Object
Returns the value of attribute results.
17 18 19 |
# File 'lib/ethikdo/provision.rb', line 17 def results @results end |
#status_code ⇒ Object
Returns the value of attribute status_code.
11 12 13 |
# File 'lib/ethikdo/provision.rb', line 11 def status_code @status_code end |
#url ⇒ Object
Returns the value of attribute url.
10 11 12 |
# File 'lib/ethikdo/provision.rb', line 10 def url @url end |
Class Method Details
.all ⇒ Object
24 25 26 27 |
# File 'lib/ethikdo/provision.rb', line 24 def self.all response = execute('get', '/provisions/') self.new(response.parsed_response) end |
.create(card_number:, card_crypto:) ⇒ Object
19 20 21 22 |
# File 'lib/ethikdo/provision.rb', line 19 def self.create(card_number:, card_crypto:) response = execute("post", '/provisions/', body: { card_number: card_number, card_crypto: card_crypto }) self.new(response.parsed_response) end |