Class: SynapsePay::MassPay

Inherits:
APIResource show all
Defined in:
lib/synapse_pay/resources/mass_pay.rb

Instance Attribute Summary collapse

Attributes inherited from APIResource

#api_method, #client, #json

Instance Method Summary collapse

Methods inherited from APIResource

api_attribute_names, #api_attributes, api_subclass_fetch, api_subclasses, #changed_api_attributes, #clear_api_attributes, #determine_api_attribute_value, determine_api_attribute_value, #initialize, #inspect, #inspect_api_attributes, #inspect_nested, #refresh_from, register_api_subclass, #to_json

Constructor Details

This class inherits a constructor from SynapsePay::APIResource

Instance Attribute Details

#account_number_stringObject

Returns the value of attribute account_number_string.



3
4
5
# File 'lib/synapse_pay/resources/mass_pay.rb', line 3

def 
  @account_number_string
end

#amountObject

Returns the value of attribute amount.



4
5
6
# File 'lib/synapse_pay/resources/mass_pay.rb', line 4

def amount
  @amount
end

#dateObject

Returns the value of attribute date.



5
6
7
# File 'lib/synapse_pay/resources/mass_pay.rb', line 5

def date
  @date
end

#feeObject

Returns the value of attribute fee.



6
7
8
# File 'lib/synapse_pay/resources/mass_pay.rb', line 6

def fee
  @fee
end

#idObject

Returns the value of attribute id.



7
8
9
# File 'lib/synapse_pay/resources/mass_pay.rb', line 7

def id
  @id
end

#name_on_accountObject

Returns the value of attribute name_on_account.



8
9
10
# File 'lib/synapse_pay/resources/mass_pay.rb', line 8

def 
  @name_on_account
end

#resource_uriObject

Returns the value of attribute resource_uri.



9
10
11
# File 'lib/synapse_pay/resources/mass_pay.rb', line 9

def resource_uri
  @resource_uri
end

#routing_number_stringObject

Returns the value of attribute routing_number_string.



10
11
12
# File 'lib/synapse_pay/resources/mass_pay.rb', line 10

def routing_number_string
  @routing_number_string
end

#statusObject

Returns the value of attribute status.



11
12
13
# File 'lib/synapse_pay/resources/mass_pay.rb', line 11

def status
  @status
end

#trans_typeObject

Returns the value of attribute trans_type.



12
13
14
# File 'lib/synapse_pay/resources/mass_pay.rb', line 12

def trans_type
  @trans_type
end

Instance Method Details

#cancel(params = {}, headers = {}) ⇒ Object



14
15
16
17
18
19
20
21
# File 'lib/synapse_pay/resources/mass_pay.rb', line 14

def cancel(params={}, headers={})
  params = ParamsBuilder.merge({
    :id => id,
  }, params)
  method = APIMethod.new(:post, "/masspay/cancel", params, headers, self)
  json = @client.execute(method)
  APIList.new(:MassPay, json[:mass_pays], method, @client)
end