Class: SynapseClient::MassPay
- Inherits:
-
APIResource
- Object
- APIResource
- SynapseClient::MassPay
- Defined in:
- lib/synapse_client/mass_pay.rb
Instance Attribute Summary collapse
-
#amount ⇒ Object
readonly
Returns the value of attribute amount.
-
#dest_bank_id ⇒ Object
readonly
Returns the value of attribute dest_bank_id.
-
#source_bank_id ⇒ Object
readonly
Returns the value of attribute source_bank_id.
-
#trans_type ⇒ Object
readonly
Returns the value of attribute trans_type.
Attributes inherited from APIResource
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ MassPay
constructor
A new instance of MassPay.
- #update_attributes(options) ⇒ Object
Methods inherited from APIResource
api_resource_name, class_name, #refresh, retrieve, #successful?, #to_hash, url, #url
Constructor Details
#initialize(options = {}) ⇒ MassPay
Returns a new instance of MassPay.
11 12 13 14 15 |
# File 'lib/synapse_client/mass_pay.rb', line 11 def initialize( = {}) = Map.new() update_attributes() end |
Instance Attribute Details
#amount ⇒ Object (readonly)
Returns the value of attribute amount.
5 6 7 |
# File 'lib/synapse_client/mass_pay.rb', line 5 def amount @amount end |
#dest_bank_id ⇒ Object (readonly)
Returns the value of attribute dest_bank_id.
8 9 10 |
# File 'lib/synapse_client/mass_pay.rb', line 8 def dest_bank_id @dest_bank_id end |
#source_bank_id ⇒ Object (readonly)
Returns the value of attribute source_bank_id.
7 8 9 |
# File 'lib/synapse_client/mass_pay.rb', line 7 def source_bank_id @source_bank_id end |
#trans_type ⇒ Object (readonly)
Returns the value of attribute trans_type.
6 7 8 |
# File 'lib/synapse_client/mass_pay.rb', line 6 def trans_type @trans_type end |
Class Method Details
.create(params = {}) ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/synapse_client/mass_pay.rb', line 17 def self.create(params={}) response = SynapseClient.request(:post, url + "add", params) return response unless response.successful? response.data.mass_pays.map do |mp| MassPay.new(mp) end end |
Instance Method Details
#update_attributes(options) ⇒ Object
27 28 29 30 31 32 |
# File 'lib/synapse_client/mass_pay.rb', line 27 def update_attributes() @amount = [:amount] @trans_type = [:trans_type] @source_bank_id = [:source_bank_id].to_i @dest_bank_id = [:dest_bank_id].to_i end |