cloud_payments 0.0.2 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +12 -6
- data/Gemfile +2 -2
- data/README.md +88 -5
- data/Rakefile +1 -0
- data/cloud_payments.gemspec +8 -8
- data/config.ru +1 -0
- data/lib/cloud_payments.rb +6 -1
- data/lib/cloud_payments/client.rb +3 -2
- data/lib/cloud_payments/client/errors.rb +1 -0
- data/lib/cloud_payments/client/gateway_errors.rb +3 -1
- data/lib/cloud_payments/client/response.rb +2 -1
- data/lib/cloud_payments/client/serializer.rb +1 -0
- data/lib/cloud_payments/client/serializer/base.rb +9 -1
- data/lib/cloud_payments/client/serializer/multi_json.rb +1 -0
- data/lib/cloud_payments/config.rb +4 -0
- data/lib/cloud_payments/models.rb +8 -0
- data/lib/cloud_payments/models/like_subscription.rb +30 -0
- data/lib/cloud_payments/models/model.rb +9 -0
- data/lib/cloud_payments/models/on_fail.rb +31 -0
- data/lib/cloud_payments/models/on_kassa_receipt.rb +23 -0
- data/lib/cloud_payments/models/on_pay.rb +37 -0
- data/lib/cloud_payments/models/on_recurrent.rb +22 -0
- data/lib/cloud_payments/models/order.rb +14 -0
- data/lib/cloud_payments/models/secure3d.rb +1 -0
- data/lib/cloud_payments/models/subscription.rb +9 -32
- data/lib/cloud_payments/models/transaction.rb +13 -4
- data/lib/cloud_payments/namespaces.rb +12 -1
- data/lib/cloud_payments/namespaces/base.rb +2 -1
- data/lib/cloud_payments/namespaces/cards.rb +6 -0
- data/lib/cloud_payments/namespaces/kassa.rb +22 -0
- data/lib/cloud_payments/namespaces/orders.rb +15 -0
- data/lib/cloud_payments/namespaces/payments.rb +11 -0
- data/lib/cloud_payments/namespaces/subscriptions.rb +6 -0
- data/lib/cloud_payments/namespaces/tokens.rb +1 -0
- data/lib/cloud_payments/version.rb +2 -1
- data/lib/cloud_payments/webhooks.rb +42 -0
- data/spec/cloud_payments/client/response_spec.rb +3 -1
- data/spec/cloud_payments/client/serializer/multi_json_spec.rb +1 -0
- data/spec/cloud_payments/models/order_spec.rb +62 -0
- data/spec/cloud_payments/models/secure3d_spec.rb +1 -0
- data/spec/cloud_payments/models/subscription_spec.rb +1 -1
- data/spec/cloud_payments/models/transaction_spec.rb +25 -1
- data/spec/cloud_payments/namespaces/base_spec.rb +10 -3
- data/spec/cloud_payments/namespaces/cards_spec.rb +42 -2
- data/spec/cloud_payments/namespaces/kassa_spec.rb +43 -0
- data/spec/cloud_payments/namespaces/orders_spec.rb +57 -0
- data/spec/cloud_payments/namespaces/payments_spec.rb +119 -0
- data/spec/cloud_payments/namespaces/subscriptions_spec.rb +21 -1
- data/spec/cloud_payments/namespaces/tokens_spec.rb +1 -0
- data/spec/cloud_payments/namespaces_spec.rb +2 -1
- data/spec/cloud_payments/webhooks_spec.rb +272 -0
- data/spec/cloud_payments_spec.rb +27 -4
- data/spec/fixtures/apis/cards/post3ds/failed.yml +45 -0
- data/spec/fixtures/apis/cards/post3ds/successful.yml +48 -0
- data/spec/fixtures/apis/orders/cancel/failed.yml +6 -0
- data/spec/fixtures/apis/orders/cancel/successful.yml +6 -0
- data/spec/fixtures/apis/orders/create/successful.yml +20 -0
- data/spec/fixtures/apis/payments/find/failed.yml +45 -0
- data/spec/fixtures/apis/payments/find/failed_with_message.yml +6 -0
- data/spec/fixtures/apis/payments/find/successful.yml +48 -0
- data/spec/fixtures/apis/payments/get/failed.yml +46 -0
- data/spec/fixtures/apis/payments/get/failed_with_message.yml +6 -0
- data/spec/fixtures/apis/payments/get/refunded.yml +49 -0
- data/spec/fixtures/apis/payments/get/successful.yml +49 -0
- data/spec/fixtures/apis/subscriptions/find/successful.yml +4 -4
- data/spec/fixtures/apis/subscriptions/get/successful.yml +31 -0
- data/spec/spec_helper.rb +13 -24
- data/spec/support/examples.rb +1 -0
- data/spec/support/helpers.rb +3 -2
- metadata +62 -34
- data/spec/cloud_payments/client_spec.rb +0 -5