cloud_payments 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +14 -0
  3. data/.rspec +4 -0
  4. data/.travis.yml +8 -0
  5. data/Gemfile +10 -0
  6. data/LICENSE.txt +22 -0
  7. data/README.md +106 -0
  8. data/Rakefile +7 -0
  9. data/cloud_payments.gemspec +28 -0
  10. data/config.ru +58 -0
  11. data/lib/cloud_payments.rb +34 -0
  12. data/lib/cloud_payments/client.rb +50 -0
  13. data/lib/cloud_payments/client/errors.rb +68 -0
  14. data/lib/cloud_payments/client/gateway_errors.rb +36 -0
  15. data/lib/cloud_payments/client/response.rb +22 -0
  16. data/lib/cloud_payments/client/serializer.rb +9 -0
  17. data/lib/cloud_payments/client/serializer/base.rb +46 -0
  18. data/lib/cloud_payments/client/serializer/multi_json.rb +17 -0
  19. data/lib/cloud_payments/config.rb +44 -0
  20. data/lib/cloud_payments/models.rb +4 -0
  21. data/lib/cloud_payments/models/model.rb +5 -0
  22. data/lib/cloud_payments/models/secure3d.rb +15 -0
  23. data/lib/cloud_payments/models/subscription.rb +49 -0
  24. data/lib/cloud_payments/models/transaction.rb +82 -0
  25. data/lib/cloud_payments/namespaces.rb +23 -0
  26. data/lib/cloud_payments/namespaces/base.rb +50 -0
  27. data/lib/cloud_payments/namespaces/cards.rb +25 -0
  28. data/lib/cloud_payments/namespaces/payments.rb +32 -0
  29. data/lib/cloud_payments/namespaces/subscriptions.rb +24 -0
  30. data/lib/cloud_payments/namespaces/tokens.rb +15 -0
  31. data/lib/cloud_payments/version.rb +3 -0
  32. data/spec/cloud_payments/client/response_spec.rb +35 -0
  33. data/spec/cloud_payments/client/serializer/multi_json_spec.rb +16 -0
  34. data/spec/cloud_payments/client_spec.rb +5 -0
  35. data/spec/cloud_payments/models/secure3d_spec.rb +37 -0
  36. data/spec/cloud_payments/models/subscription_spec.rb +141 -0
  37. data/spec/cloud_payments/models/transaction_spec.rb +254 -0
  38. data/spec/cloud_payments/namespaces/base_spec.rb +75 -0
  39. data/spec/cloud_payments/namespaces/cards_spec.rb +119 -0
  40. data/spec/cloud_payments/namespaces/payments_spec.rb +96 -0
  41. data/spec/cloud_payments/namespaces/subscriptions_spec.rb +82 -0
  42. data/spec/cloud_payments/namespaces/tokens_spec.rb +90 -0
  43. data/spec/cloud_payments/namespaces_spec.rb +45 -0
  44. data/spec/cloud_payments_spec.rb +14 -0
  45. data/spec/fixtures/apis/cards/auth/failed.yml +45 -0
  46. data/spec/fixtures/apis/cards/auth/secure3d.yml +15 -0
  47. data/spec/fixtures/apis/cards/auth/successful.yml +48 -0
  48. data/spec/fixtures/apis/cards/charge/failed.yml +45 -0
  49. data/spec/fixtures/apis/cards/charge/secure3d.yml +15 -0
  50. data/spec/fixtures/apis/cards/charge/successful.yml +48 -0
  51. data/spec/fixtures/apis/payments/confirm/failed.yml +6 -0
  52. data/spec/fixtures/apis/payments/confirm/failed_with_message.yml +6 -0
  53. data/spec/fixtures/apis/payments/confirm/successful.yml +6 -0
  54. data/spec/fixtures/apis/payments/post3ds/failed.yml +45 -0
  55. data/spec/fixtures/apis/payments/post3ds/successful.yml +48 -0
  56. data/spec/fixtures/apis/payments/refund/failed.yml +6 -0
  57. data/spec/fixtures/apis/payments/refund/failed_with_message.yml +6 -0
  58. data/spec/fixtures/apis/payments/refund/successful.yml +6 -0
  59. data/spec/fixtures/apis/payments/void/failed.yml +6 -0
  60. data/spec/fixtures/apis/payments/void/failed_with_message.yml +6 -0
  61. data/spec/fixtures/apis/payments/void/successful.yml +6 -0
  62. data/spec/fixtures/apis/ping/failed.yml +5 -0
  63. data/spec/fixtures/apis/ping/successful.yml +5 -0
  64. data/spec/fixtures/apis/subscriptions/cancel/successful.yml +6 -0
  65. data/spec/fixtures/apis/subscriptions/create/successful.yml +31 -0
  66. data/spec/fixtures/apis/subscriptions/find/successful.yml +31 -0
  67. data/spec/fixtures/apis/subscriptions/update/successful.yml +31 -0
  68. data/spec/fixtures/apis/tokens/auth/failed.yml +45 -0
  69. data/spec/fixtures/apis/tokens/auth/successful.yml +48 -0
  70. data/spec/fixtures/apis/tokens/charge/failed.yml +45 -0
  71. data/spec/fixtures/apis/tokens/charge/successful.yml +48 -0
  72. data/spec/spec_helper.rb +38 -0
  73. data/spec/support/examples.rb +27 -0
  74. data/spec/support/helpers.rb +89 -0
  75. metadata +244 -0
metadata ADDED
@@ -0,0 +1,244 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: cloud_payments
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
+ platform: ruby
6
+ authors:
7
+ - undr
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-08-19 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: faraday
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: multi_json
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: hashie
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: bundler
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '1.7'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '1.7'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rake
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '10.0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '10.0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rspec
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ description: CloudPayments ruby client
98
+ email:
99
+ - undr@yandex.ru
100
+ executables: []
101
+ extensions: []
102
+ extra_rdoc_files: []
103
+ files:
104
+ - ".gitignore"
105
+ - ".rspec"
106
+ - ".travis.yml"
107
+ - Gemfile
108
+ - LICENSE.txt
109
+ - README.md
110
+ - Rakefile
111
+ - cloud_payments.gemspec
112
+ - config.ru
113
+ - lib/cloud_payments.rb
114
+ - lib/cloud_payments/client.rb
115
+ - lib/cloud_payments/client/errors.rb
116
+ - lib/cloud_payments/client/gateway_errors.rb
117
+ - lib/cloud_payments/client/response.rb
118
+ - lib/cloud_payments/client/serializer.rb
119
+ - lib/cloud_payments/client/serializer/base.rb
120
+ - lib/cloud_payments/client/serializer/multi_json.rb
121
+ - lib/cloud_payments/config.rb
122
+ - lib/cloud_payments/models.rb
123
+ - lib/cloud_payments/models/model.rb
124
+ - lib/cloud_payments/models/secure3d.rb
125
+ - lib/cloud_payments/models/subscription.rb
126
+ - lib/cloud_payments/models/transaction.rb
127
+ - lib/cloud_payments/namespaces.rb
128
+ - lib/cloud_payments/namespaces/base.rb
129
+ - lib/cloud_payments/namespaces/cards.rb
130
+ - lib/cloud_payments/namespaces/payments.rb
131
+ - lib/cloud_payments/namespaces/subscriptions.rb
132
+ - lib/cloud_payments/namespaces/tokens.rb
133
+ - lib/cloud_payments/version.rb
134
+ - spec/cloud_payments/client/response_spec.rb
135
+ - spec/cloud_payments/client/serializer/multi_json_spec.rb
136
+ - spec/cloud_payments/client_spec.rb
137
+ - spec/cloud_payments/models/secure3d_spec.rb
138
+ - spec/cloud_payments/models/subscription_spec.rb
139
+ - spec/cloud_payments/models/transaction_spec.rb
140
+ - spec/cloud_payments/namespaces/base_spec.rb
141
+ - spec/cloud_payments/namespaces/cards_spec.rb
142
+ - spec/cloud_payments/namespaces/payments_spec.rb
143
+ - spec/cloud_payments/namespaces/subscriptions_spec.rb
144
+ - spec/cloud_payments/namespaces/tokens_spec.rb
145
+ - spec/cloud_payments/namespaces_spec.rb
146
+ - spec/cloud_payments_spec.rb
147
+ - spec/fixtures/apis/cards/auth/failed.yml
148
+ - spec/fixtures/apis/cards/auth/secure3d.yml
149
+ - spec/fixtures/apis/cards/auth/successful.yml
150
+ - spec/fixtures/apis/cards/charge/failed.yml
151
+ - spec/fixtures/apis/cards/charge/secure3d.yml
152
+ - spec/fixtures/apis/cards/charge/successful.yml
153
+ - spec/fixtures/apis/payments/confirm/failed.yml
154
+ - spec/fixtures/apis/payments/confirm/failed_with_message.yml
155
+ - spec/fixtures/apis/payments/confirm/successful.yml
156
+ - spec/fixtures/apis/payments/post3ds/failed.yml
157
+ - spec/fixtures/apis/payments/post3ds/successful.yml
158
+ - spec/fixtures/apis/payments/refund/failed.yml
159
+ - spec/fixtures/apis/payments/refund/failed_with_message.yml
160
+ - spec/fixtures/apis/payments/refund/successful.yml
161
+ - spec/fixtures/apis/payments/void/failed.yml
162
+ - spec/fixtures/apis/payments/void/failed_with_message.yml
163
+ - spec/fixtures/apis/payments/void/successful.yml
164
+ - spec/fixtures/apis/ping/failed.yml
165
+ - spec/fixtures/apis/ping/successful.yml
166
+ - spec/fixtures/apis/subscriptions/cancel/successful.yml
167
+ - spec/fixtures/apis/subscriptions/create/successful.yml
168
+ - spec/fixtures/apis/subscriptions/find/successful.yml
169
+ - spec/fixtures/apis/subscriptions/update/successful.yml
170
+ - spec/fixtures/apis/tokens/auth/failed.yml
171
+ - spec/fixtures/apis/tokens/auth/successful.yml
172
+ - spec/fixtures/apis/tokens/charge/failed.yml
173
+ - spec/fixtures/apis/tokens/charge/successful.yml
174
+ - spec/spec_helper.rb
175
+ - spec/support/examples.rb
176
+ - spec/support/helpers.rb
177
+ homepage: ''
178
+ licenses:
179
+ - MIT
180
+ metadata: {}
181
+ post_install_message:
182
+ rdoc_options: []
183
+ require_paths:
184
+ - lib
185
+ required_ruby_version: !ruby/object:Gem::Requirement
186
+ requirements:
187
+ - - ">="
188
+ - !ruby/object:Gem::Version
189
+ version: '0'
190
+ required_rubygems_version: !ruby/object:Gem::Requirement
191
+ requirements:
192
+ - - ">="
193
+ - !ruby/object:Gem::Version
194
+ version: '0'
195
+ requirements: []
196
+ rubyforge_project:
197
+ rubygems_version: 2.4.3
198
+ signing_key:
199
+ specification_version: 4
200
+ summary: CloudPayments ruby client
201
+ test_files:
202
+ - spec/cloud_payments/client/response_spec.rb
203
+ - spec/cloud_payments/client/serializer/multi_json_spec.rb
204
+ - spec/cloud_payments/client_spec.rb
205
+ - spec/cloud_payments/models/secure3d_spec.rb
206
+ - spec/cloud_payments/models/subscription_spec.rb
207
+ - spec/cloud_payments/models/transaction_spec.rb
208
+ - spec/cloud_payments/namespaces/base_spec.rb
209
+ - spec/cloud_payments/namespaces/cards_spec.rb
210
+ - spec/cloud_payments/namespaces/payments_spec.rb
211
+ - spec/cloud_payments/namespaces/subscriptions_spec.rb
212
+ - spec/cloud_payments/namespaces/tokens_spec.rb
213
+ - spec/cloud_payments/namespaces_spec.rb
214
+ - spec/cloud_payments_spec.rb
215
+ - spec/fixtures/apis/cards/auth/failed.yml
216
+ - spec/fixtures/apis/cards/auth/secure3d.yml
217
+ - spec/fixtures/apis/cards/auth/successful.yml
218
+ - spec/fixtures/apis/cards/charge/failed.yml
219
+ - spec/fixtures/apis/cards/charge/secure3d.yml
220
+ - spec/fixtures/apis/cards/charge/successful.yml
221
+ - spec/fixtures/apis/payments/confirm/failed.yml
222
+ - spec/fixtures/apis/payments/confirm/failed_with_message.yml
223
+ - spec/fixtures/apis/payments/confirm/successful.yml
224
+ - spec/fixtures/apis/payments/post3ds/failed.yml
225
+ - spec/fixtures/apis/payments/post3ds/successful.yml
226
+ - spec/fixtures/apis/payments/refund/failed.yml
227
+ - spec/fixtures/apis/payments/refund/failed_with_message.yml
228
+ - spec/fixtures/apis/payments/refund/successful.yml
229
+ - spec/fixtures/apis/payments/void/failed.yml
230
+ - spec/fixtures/apis/payments/void/failed_with_message.yml
231
+ - spec/fixtures/apis/payments/void/successful.yml
232
+ - spec/fixtures/apis/ping/failed.yml
233
+ - spec/fixtures/apis/ping/successful.yml
234
+ - spec/fixtures/apis/subscriptions/cancel/successful.yml
235
+ - spec/fixtures/apis/subscriptions/create/successful.yml
236
+ - spec/fixtures/apis/subscriptions/find/successful.yml
237
+ - spec/fixtures/apis/subscriptions/update/successful.yml
238
+ - spec/fixtures/apis/tokens/auth/failed.yml
239
+ - spec/fixtures/apis/tokens/auth/successful.yml
240
+ - spec/fixtures/apis/tokens/charge/failed.yml
241
+ - spec/fixtures/apis/tokens/charge/successful.yml
242
+ - spec/spec_helper.rb
243
+ - spec/support/examples.rb
244
+ - spec/support/helpers.rb