cloud_payments 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e31ba1babda3743559e6106299ac4f94a7ed045cee632366e3cf9392b193fd2e
4
- data.tar.gz: 658ef8a73850a5a9b61c704a30157856fdb38d2821d41d38cf6a0386bbea629b
3
+ metadata.gz: '059f78713c51718c2fcc7474fe7e734b82dbf19a67b121ed86d3210caf061136'
4
+ data.tar.gz: 18c43e72122e00f883e41c0261ef614da2d2dd5474a68e1eb771c1b35bf8aa9b
5
5
  SHA512:
6
- metadata.gz: ea82b5a807c04599cc39d878b1e9150e5c4173183386e5549c9d9e37062528857bed984f60838fb797e992f2759a86a92f09a629aea2edc795822858e9f0aa87
7
- data.tar.gz: 52c31c9c3872ddc39d8174ae0b49d60626466a468d90a760e7c7adf92bfafd54179d476e9b46cfcb36be80f57fc42b2c8d775be620c87d12e27f4401a328aaa1
6
+ metadata.gz: a2071a9837d7c2545e0d0df976a964139cba78b85de31af0af556fb6b3335030ceda26ffc38be9aed7f553b67c6d0a6b3e1f21004680bbeeb5baaad0184759ce
7
+ data.tar.gz: 90c91193460f99b13aff8b04a9c4e325f118b44e99cec44ea33f1a668aa0dfd8afd7281d5481b4e15022c5b7208fb729c1f0b7d15776226139be4cce5c46ab99
@@ -13,7 +13,7 @@ module CloudPayments
13
13
  def receipt(attributes)
14
14
  attributes.fetch(:inn) { raise InnNotProvided.new('inn attribute is required') }
15
15
  attributes.fetch(:type) { raise TypeNotProvided.new('type attribute is required') }
16
- attributes.fetch(:inn) { raise CustomerReceiptNotProvided.new('customer_receipt is required') }
16
+ attributes.fetch(:customer_receipt) { raise CustomerReceiptNotProvided.new('customer_receipt is required') }
17
17
 
18
18
  request(:receipt, attributes)
19
19
  end
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module CloudPayments
3
- VERSION = '1.0.0'
3
+ VERSION = '1.0.1'
4
4
  end
@@ -0,0 +1,43 @@
1
+ #!/usr/bin/env ruby
2
+ # encoding: utf-8
3
+ # frozen_string_literal: true
4
+ require 'spec_helper'
5
+
6
+ describe CloudPayments::Namespaces::Kassa do
7
+ subject{ described_class.new(CloudPayments.client) }
8
+
9
+ describe '#receipt' do
10
+ let(:attributes) do
11
+ {
12
+ inn: '7708806666',
13
+ type: 'Income',
14
+ customer_receipt: {
15
+ items: [
16
+ {
17
+ amount: '13350.00',
18
+ label: 'Good Description',
19
+ price: '13350.00',
20
+ quantity: 1.0,
21
+ vat: 0
22
+ }
23
+ ]
24
+ }
25
+ }
26
+ end
27
+
28
+ context do
29
+ before{ attributes.delete(:inn) }
30
+ specify{ expect{subject.receipt(attributes)}.to raise_error(described_class::InnNotProvided) }
31
+ end
32
+
33
+ context do
34
+ before{ attributes.delete(:type) }
35
+ specify{ expect{subject.receipt(attributes)}.to raise_error(described_class::TypeNotProvided) }
36
+ end
37
+
38
+ context do
39
+ before{ attributes.delete(:customer_receipt) }
40
+ specify{ expect{subject.receipt(attributes)}.to raise_error(described_class::CustomerReceiptNotProvided) }
41
+ end
42
+ end
43
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloud_payments
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - undr
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-04-23 00:00:00.000000000 Z
12
+ date: 2020-05-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday
@@ -136,6 +136,7 @@ files:
136
136
  - spec/cloud_payments/models/transaction_spec.rb
137
137
  - spec/cloud_payments/namespaces/base_spec.rb
138
138
  - spec/cloud_payments/namespaces/cards_spec.rb
139
+ - spec/cloud_payments/namespaces/kassa_spec.rb
139
140
  - spec/cloud_payments/namespaces/orders_spec.rb
140
141
  - spec/cloud_payments/namespaces/payments_spec.rb
141
142
  - spec/cloud_payments/namespaces/subscriptions_spec.rb
@@ -218,6 +219,7 @@ test_files:
218
219
  - spec/cloud_payments/models/transaction_spec.rb
219
220
  - spec/cloud_payments/namespaces/base_spec.rb
220
221
  - spec/cloud_payments/namespaces/cards_spec.rb
222
+ - spec/cloud_payments/namespaces/kassa_spec.rb
221
223
  - spec/cloud_payments/namespaces/orders_spec.rb
222
224
  - spec/cloud_payments/namespaces/payments_spec.rb
223
225
  - spec/cloud_payments/namespaces/subscriptions_spec.rb