paymill_ruby 1.0.2

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.
Files changed (100) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +4 -0
  3. data/Gemfile +3 -0
  4. data/Guardfile +5 -0
  5. data/LICENSE.txt +22 -0
  6. data/README.md +223 -0
  7. data/Rakefile +6 -0
  8. data/lib/paymill.rb +54 -0
  9. data/lib/paymill/errors.rb +10 -0
  10. data/lib/paymill/models/address.rb +13 -0
  11. data/lib/paymill/models/base.rb +50 -0
  12. data/lib/paymill/models/checksum.rb +40 -0
  13. data/lib/paymill/models/client.rb +24 -0
  14. data/lib/paymill/models/fee.rb +14 -0
  15. data/lib/paymill/models/invoice.rb +18 -0
  16. data/lib/paymill/models/merchant.rb +21 -0
  17. data/lib/paymill/models/offer.rb +27 -0
  18. data/lib/paymill/models/payment.rb +20 -0
  19. data/lib/paymill/models/payment_method.rb +18 -0
  20. data/lib/paymill/models/preauthorization.rb +25 -0
  21. data/lib/paymill/models/refund.rb +22 -0
  22. data/lib/paymill/models/shopping_cart_item.rb +13 -0
  23. data/lib/paymill/models/subscription.rb +143 -0
  24. data/lib/paymill/models/subscription_count.rb +18 -0
  25. data/lib/paymill/models/transaction.rb +27 -0
  26. data/lib/paymill/models/webhook.rb +37 -0
  27. data/lib/paymill/restful/methods.rb +134 -0
  28. data/lib/paymill/version.rb +3 -0
  29. data/paymill.gemspec +28 -0
  30. data/samples/authentication/authentication.rb +1 -0
  31. data/samples/clients/create_new_client.rb +4 -0
  32. data/samples/clients/export_clients_list.rb +1 -0
  33. data/samples/clients/get_client_details.rb +1 -0
  34. data/samples/clients/list_clients.rb +1 -0
  35. data/samples/clients/remove_client.rb +2 -0
  36. data/samples/clients/update_client.rb +4 -0
  37. data/samples/offers/create_new_offer.rb +7 -0
  38. data/samples/offers/export_offers_list.rb +1 -0
  39. data/samples/offers/get_offer_details.rb +1 -0
  40. data/samples/offers/list_offers.rb +1 -0
  41. data/samples/offers/remove_offer.rb +7 -0
  42. data/samples/offers/update_offer.rb +8 -0
  43. data/samples/payments/create_new_credit_card_payment_with_token.rb +1 -0
  44. data/samples/payments/create_new_credit_card_payment_with_token_and_client.rb +4 -0
  45. data/samples/payments/create_new_debit_payment_with_token.rb +1 -0
  46. data/samples/payments/create_new_debit_payment_with_token_and_client.rb +4 -0
  47. data/samples/payments/export_payments_list.rb +1 -0
  48. data/samples/payments/get_payment_details.rb +1 -0
  49. data/samples/payments/list_payments.rb +1 -0
  50. data/samples/payments/remove_payment.rb +2 -0
  51. data/samples/preauthorizations/create_new_preauthorization_with_payment.rb +8 -0
  52. data/samples/preauthorizations/create_new_preauthorization_with_token.rb +6 -0
  53. data/samples/preauthorizations/export_preauthorizations_list.rb +1 -0
  54. data/samples/preauthorizations/get_preauthorization_details.rb +1 -0
  55. data/samples/preauthorizations/list_preauthozizations.rb +1 -0
  56. data/samples/preauthorizations/remove_preauthorization.rb +2 -0
  57. data/samples/refunds/create_new_refund.rb +11 -0
  58. data/samples/refunds/export_refunds_list.rb +1 -0
  59. data/samples/refunds/get_refund_details.rb +1 -0
  60. data/samples/refunds/list_refunds.rb +1 -0
  61. data/samples/subscriptions/cancel_subscription.rb +2 -0
  62. data/samples/subscriptions/create_new_subscription_with_an_offer.rb +15 -0
  63. data/samples/subscriptions/create_new_subscription_with_an_offer_and_different_values.rb +19 -0
  64. data/samples/subscriptions/create_new_subscription_without_an_offer.rb +13 -0
  65. data/samples/subscriptions/delete_subscription.rb +2 -0
  66. data/samples/subscriptions/export_subscriptions_list.rb +1 -0
  67. data/samples/subscriptions/get_subscription_details.rb +1 -0
  68. data/samples/subscriptions/list_subscriptions.rb +1 -0
  69. data/samples/subscriptions/pause_subscription.rb +7 -0
  70. data/samples/subscriptions/update_subscription.rb +12 -0
  71. data/samples/subscriptions/update_subscription_amount.rb +7 -0
  72. data/samples/subscriptions/update_subscription_offer.rb +14 -0
  73. data/samples/transactions/create_new_transaction_with_app_fee.rb +8 -0
  74. data/samples/transactions/create_new_transaction_with_client_and_payment.rb +12 -0
  75. data/samples/transactions/create_new_transaction_with_payment.rb +7 -0
  76. data/samples/transactions/create_new_transaction_with_preauthorization.rb +10 -0
  77. data/samples/transactions/create_new_transaction_with_token.rb +6 -0
  78. data/samples/transactions/export_transactions_list.rb +1 -0
  79. data/samples/transactions/get_transaction_details_by_id.rb +1 -0
  80. data/samples/transactions/get_transaction_details_by_slv.rb +1 -0
  81. data/samples/transactions/list_transactions.rb +1 -0
  82. data/samples/transactions/upate_transaction.rb +3 -0
  83. data/samples/webhooks/create_new_email_webhook.rb +5 -0
  84. data/samples/webhooks/create_new_url_webhook.rb +4 -0
  85. data/samples/webhooks/export_webhooks_list.rb +1 -0
  86. data/samples/webhooks/get_webhook_details.rb +1 -0
  87. data/samples/webhooks/remove_webhook.rb +2 -0
  88. data/samples/webhooks/update_webhook.rb +3 -0
  89. data/spec/paymill/models/address_spec.rb +42 -0
  90. data/spec/paymill/models/checksum_spec.rb +77 -0
  91. data/spec/paymill/models/client_spec.rb +311 -0
  92. data/spec/paymill/models/offer_spec.rb +151 -0
  93. data/spec/paymill/models/payment_spec.rb +188 -0
  94. data/spec/paymill/models/preauthorization_spec.rb +180 -0
  95. data/spec/paymill/models/refund_spec.rb +90 -0
  96. data/spec/paymill/models/subscription_spec.rb +607 -0
  97. data/spec/paymill/models/transaction_spec.rb +226 -0
  98. data/spec/paymill/models/webhook_spec.rb +195 -0
  99. data/spec/spec_helper.rb +28 -0
  100. metadata +265 -0
metadata ADDED
@@ -0,0 +1,265 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: paymill_ruby
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.2
5
+ platform: ruby
6
+ authors:
7
+ - Vassil Nikolov
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-08-20 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '1.7'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '1.7'
27
+ - !ruby/object:Gem::Dependency
28
+ name: activesupport
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: '4.2'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: '4.2'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ version: '10.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: '10.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: '3.3'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ~>
67
+ - !ruby/object:Gem::Version
68
+ version: '3.3'
69
+ - !ruby/object:Gem::Dependency
70
+ name: vcr
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ~>
74
+ - !ruby/object:Gem::Version
75
+ version: '2.9'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ~>
81
+ - !ruby/object:Gem::Version
82
+ version: '2.9'
83
+ - !ruby/object:Gem::Dependency
84
+ name: webmock
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ~>
88
+ - !ruby/object:Gem::Version
89
+ version: '1.20'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ~>
95
+ - !ruby/object:Gem::Version
96
+ version: '1.20'
97
+ - !ruby/object:Gem::Dependency
98
+ name: pry
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ~>
102
+ - !ruby/object:Gem::Version
103
+ version: '0.10'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ~>
109
+ - !ruby/object:Gem::Version
110
+ version: '0.10'
111
+ - !ruby/object:Gem::Dependency
112
+ name: guard-rspec
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ~>
116
+ - !ruby/object:Gem::Version
117
+ version: '4.3'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ~>
123
+ - !ruby/object:Gem::Version
124
+ version: '4.3'
125
+ description:
126
+ email:
127
+ - vassil.nikolov@qaiware.com
128
+ executables: []
129
+ extensions: []
130
+ extra_rdoc_files: []
131
+ files:
132
+ - CHANGELOG.md
133
+ - Gemfile
134
+ - Guardfile
135
+ - LICENSE.txt
136
+ - README.md
137
+ - Rakefile
138
+ - lib/paymill.rb
139
+ - lib/paymill/errors.rb
140
+ - lib/paymill/models/address.rb
141
+ - lib/paymill/models/base.rb
142
+ - lib/paymill/models/checksum.rb
143
+ - lib/paymill/models/client.rb
144
+ - lib/paymill/models/fee.rb
145
+ - lib/paymill/models/invoice.rb
146
+ - lib/paymill/models/merchant.rb
147
+ - lib/paymill/models/offer.rb
148
+ - lib/paymill/models/payment.rb
149
+ - lib/paymill/models/payment_method.rb
150
+ - lib/paymill/models/preauthorization.rb
151
+ - lib/paymill/models/refund.rb
152
+ - lib/paymill/models/shopping_cart_item.rb
153
+ - lib/paymill/models/subscription.rb
154
+ - lib/paymill/models/subscription_count.rb
155
+ - lib/paymill/models/transaction.rb
156
+ - lib/paymill/models/webhook.rb
157
+ - lib/paymill/restful/methods.rb
158
+ - lib/paymill/version.rb
159
+ - paymill.gemspec
160
+ - samples/authentication/authentication.rb
161
+ - samples/clients/create_new_client.rb
162
+ - samples/clients/export_clients_list.rb
163
+ - samples/clients/get_client_details.rb
164
+ - samples/clients/list_clients.rb
165
+ - samples/clients/remove_client.rb
166
+ - samples/clients/update_client.rb
167
+ - samples/offers/create_new_offer.rb
168
+ - samples/offers/export_offers_list.rb
169
+ - samples/offers/get_offer_details.rb
170
+ - samples/offers/list_offers.rb
171
+ - samples/offers/remove_offer.rb
172
+ - samples/offers/update_offer.rb
173
+ - samples/payments/create_new_credit_card_payment_with_token.rb
174
+ - samples/payments/create_new_credit_card_payment_with_token_and_client.rb
175
+ - samples/payments/create_new_debit_payment_with_token.rb
176
+ - samples/payments/create_new_debit_payment_with_token_and_client.rb
177
+ - samples/payments/export_payments_list.rb
178
+ - samples/payments/get_payment_details.rb
179
+ - samples/payments/list_payments.rb
180
+ - samples/payments/remove_payment.rb
181
+ - samples/preauthorizations/create_new_preauthorization_with_payment.rb
182
+ - samples/preauthorizations/create_new_preauthorization_with_token.rb
183
+ - samples/preauthorizations/export_preauthorizations_list.rb
184
+ - samples/preauthorizations/get_preauthorization_details.rb
185
+ - samples/preauthorizations/list_preauthozizations.rb
186
+ - samples/preauthorizations/remove_preauthorization.rb
187
+ - samples/refunds/create_new_refund.rb
188
+ - samples/refunds/export_refunds_list.rb
189
+ - samples/refunds/get_refund_details.rb
190
+ - samples/refunds/list_refunds.rb
191
+ - samples/subscriptions/cancel_subscription.rb
192
+ - samples/subscriptions/create_new_subscription_with_an_offer.rb
193
+ - samples/subscriptions/create_new_subscription_with_an_offer_and_different_values.rb
194
+ - samples/subscriptions/create_new_subscription_without_an_offer.rb
195
+ - samples/subscriptions/delete_subscription.rb
196
+ - samples/subscriptions/export_subscriptions_list.rb
197
+ - samples/subscriptions/get_subscription_details.rb
198
+ - samples/subscriptions/list_subscriptions.rb
199
+ - samples/subscriptions/pause_subscription.rb
200
+ - samples/subscriptions/update_subscription.rb
201
+ - samples/subscriptions/update_subscription_amount.rb
202
+ - samples/subscriptions/update_subscription_offer.rb
203
+ - samples/transactions/create_new_transaction_with_app_fee.rb
204
+ - samples/transactions/create_new_transaction_with_client_and_payment.rb
205
+ - samples/transactions/create_new_transaction_with_payment.rb
206
+ - samples/transactions/create_new_transaction_with_preauthorization.rb
207
+ - samples/transactions/create_new_transaction_with_token.rb
208
+ - samples/transactions/export_transactions_list.rb
209
+ - samples/transactions/get_transaction_details_by_id.rb
210
+ - samples/transactions/get_transaction_details_by_slv.rb
211
+ - samples/transactions/list_transactions.rb
212
+ - samples/transactions/upate_transaction.rb
213
+ - samples/webhooks/create_new_email_webhook.rb
214
+ - samples/webhooks/create_new_url_webhook.rb
215
+ - samples/webhooks/export_webhooks_list.rb
216
+ - samples/webhooks/get_webhook_details.rb
217
+ - samples/webhooks/remove_webhook.rb
218
+ - samples/webhooks/update_webhook.rb
219
+ - spec/paymill/models/address_spec.rb
220
+ - spec/paymill/models/checksum_spec.rb
221
+ - spec/paymill/models/client_spec.rb
222
+ - spec/paymill/models/offer_spec.rb
223
+ - spec/paymill/models/payment_spec.rb
224
+ - spec/paymill/models/preauthorization_spec.rb
225
+ - spec/paymill/models/refund_spec.rb
226
+ - spec/paymill/models/subscription_spec.rb
227
+ - spec/paymill/models/transaction_spec.rb
228
+ - spec/paymill/models/webhook_spec.rb
229
+ - spec/spec_helper.rb
230
+ homepage: https://github.com/paymill/paymill-ruby
231
+ licenses:
232
+ - MIT
233
+ metadata: {}
234
+ post_install_message:
235
+ rdoc_options: []
236
+ require_paths:
237
+ - lib
238
+ required_ruby_version: !ruby/object:Gem::Requirement
239
+ requirements:
240
+ - - '>='
241
+ - !ruby/object:Gem::Version
242
+ version: '0'
243
+ required_rubygems_version: !ruby/object:Gem::Requirement
244
+ requirements:
245
+ - - '>='
246
+ - !ruby/object:Gem::Version
247
+ version: '0'
248
+ requirements: []
249
+ rubyforge_project:
250
+ rubygems_version: 2.0.14
251
+ signing_key:
252
+ specification_version: 4
253
+ summary: The official ruby wrapper for PAYMILL's API.
254
+ test_files:
255
+ - spec/paymill/models/address_spec.rb
256
+ - spec/paymill/models/checksum_spec.rb
257
+ - spec/paymill/models/client_spec.rb
258
+ - spec/paymill/models/offer_spec.rb
259
+ - spec/paymill/models/payment_spec.rb
260
+ - spec/paymill/models/preauthorization_spec.rb
261
+ - spec/paymill/models/refund_spec.rb
262
+ - spec/paymill/models/subscription_spec.rb
263
+ - spec/paymill/models/transaction_spec.rb
264
+ - spec/paymill/models/webhook_spec.rb
265
+ - spec/spec_helper.rb