chockstone 0.3.4 → 0.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/chockstone.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = %q{chockstone}
3
- s.version = %q{0.3.4}
3
+ s.version = %q{0.3.5}
4
4
  s.summary = ""
5
5
  s.description = "Wrapper for Chockstone API requests"
6
6
  s.authors = ["Thomas Mulloy"]
@@ -109,9 +109,89 @@ module Chockstone
109
109
 
110
110
  end
111
111
 
112
- # not implemented
113
- def get_account_balance
112
+ # need to pass the authorization request block as a hash
113
+ # ex. "pin authorization":
114
+ # {
115
+ # :pin_authorization => {
116
+ # :id => '6277111111111111',
117
+ # :pin => '1234'
118
+ # }
119
+ # }
120
+ #
121
+ # ex. "credit-card-authorization":
122
+ # {
123
+ # :credit_card_authorization => {
124
+ # :number => '',
125
+ # :expiration_date => {
126
+ # :month => '',
127
+ # :year => ''
128
+ # },
129
+ # :cvv2 => ''
130
+ # }
131
+ # }
132
+ #
133
+ # ex. "phone-number-authorization":
134
+ # {
135
+ # :phone_number_authorization => {
136
+ # :number => '',
137
+ # :pin => ''
138
+ # }
139
+ # }
140
+ def get_account_balance authorization={}
141
+ request('get-account-balance',
142
+ :account => authorization
143
+ )
144
+ end
145
+
146
+ # need to pass the authorization request block as a hash
147
+ # ex. "credit-card-authorization":
148
+ # {
149
+ # :credit_card_authorization => {
150
+ # :number => '',
151
+ # :expiration_date => {
152
+ # :month => '',
153
+ # :year => ''
154
+ # },
155
+ # :cvv2 => ''
156
+ # }
157
+ # }
158
+ #
159
+ # ex. "phone-number-authorization":
160
+ # {
161
+ # :phone_number_authorization => {
162
+ # :number => '',
163
+ # :pin => ''
164
+ # }
165
+ # }
166
+ def update_account_alias account_id, authorization={}
167
+
168
+ req = {
169
+ :id => account_id
170
+ }
171
+
172
+ req.merge!(authorization)
173
+
174
+ request('update-account-alias',
175
+ :account => req
176
+ )
177
+ end
178
+
114
179
 
180
+ # page argument needs to be a hash with the page
181
+ # at a bare minimum your page argument hash needs to include:
182
+ # {
183
+ # :number => 1,
184
+ # :transactions_per_page => 50,
185
+ # :sort_by_date => 'descending' #(descending|ascending)
186
+ # }
187
+ def view_account_activity account_id, page={}
188
+
189
+ request('view-account-activity',
190
+ :account => {
191
+ :id => account_id
192
+ },
193
+ :page => page
194
+ )
115
195
  end
116
196
 
117
197
  def transfer_account from, to
@@ -130,6 +210,8 @@ module Chockstone
130
210
  end
131
211
 
132
212
 
213
+
214
+
133
215
  private
134
216
 
135
217
  def send xml
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chockstone
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-05-15 00:00:00.000000000 Z
12
+ date: 2012-05-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: libxml-ruby