tochka_cyclops_api 0.3.0 → 0.4.0
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.
- checksums.yaml +4 -4
- data/README.md +65 -8
- data/Rakefile +0 -4
- data/lib/tasks/methods.rake +11 -0
- data/lib/tochka_cyclops_api/data_processor.rb +44 -19
- data/lib/tochka_cyclops_api/generators/templates/tochka_cyclops_request_model_template.rb +1 -1
- data/lib/tochka_cyclops_api/generators/templates/tochka_cyclops_responses_migration_template.rb +1 -1
- data/lib/tochka_cyclops_api/methods.rb +198 -5
- data/lib/tochka_cyclops_api/request.rb +66 -31
- data/lib/tochka_cyclops_api/response.rb +27 -34
- data/lib/tochka_cyclops_api/result.rb +33 -0
- data/lib/tochka_cyclops_api/schemas/requests/activate_beneficiary.rb +22 -0
- data/lib/tochka_cyclops_api/schemas/requests/create_beneficiary_fl.rb +56 -0
- data/lib/tochka_cyclops_api/schemas/requests/create_beneficiary_ip.rb +22 -10
- data/lib/tochka_cyclops_api/schemas/requests/create_beneficiary_ul.rb +22 -10
- data/lib/tochka_cyclops_api/schemas/requests/deactivate_beneficiary.rb +22 -0
- data/lib/tochka_cyclops_api/schemas/requests/echo.rb +2 -0
- data/lib/tochka_cyclops_api/schemas/requests/get_beneficiary.rb +22 -0
- data/lib/tochka_cyclops_api/schemas/requests/list_beneficiary.rb +44 -0
- data/lib/tochka_cyclops_api/schemas/requests/update_beneficiary_fl.rb +51 -0
- data/lib/tochka_cyclops_api/schemas/requests/update_beneficiary_ip.rb +39 -0
- data/lib/tochka_cyclops_api/schemas/requests/update_beneficiary_ul.rb +38 -0
- data/lib/tochka_cyclops_api/schemas/responses/activate_beneficiary.rb +24 -0
- data/lib/tochka_cyclops_api/schemas/responses/create_beneficiary_fl.rb +24 -0
- data/lib/tochka_cyclops_api/schemas/responses/create_beneficiary_ip.rb +10 -1
- data/lib/tochka_cyclops_api/schemas/responses/create_beneficiary_ul.rb +9 -9
- data/lib/tochka_cyclops_api/schemas/responses/deactivate_beneficiary.rb +24 -0
- data/lib/tochka_cyclops_api/schemas/responses/echo.rb +1 -1
- data/lib/tochka_cyclops_api/schemas/responses/error.rb +5 -2
- data/lib/tochka_cyclops_api/schemas/responses/get_beneficiary.rb +48 -0
- data/lib/tochka_cyclops_api/schemas/responses/list_beneficiary.rb +38 -0
- data/lib/tochka_cyclops_api/schemas/responses/update_beneficiary_fl.rb +20 -0
- data/lib/tochka_cyclops_api/schemas/responses/update_beneficiary_ip.rb +20 -0
- data/lib/tochka_cyclops_api/schemas/responses/update_beneficiary_ul.rb +24 -0
- data/lib/tochka_cyclops_api/schemas/results/local_error.rb +0 -0
- data/lib/tochka_cyclops_api/test.rb +0 -0
- data/lib/tochka_cyclops_api/version.rb +1 -1
- data/lib/tochka_cyclops_api.rb +5 -2
- metadata +22 -2
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'dry-validation'
|
4
|
+
|
5
|
+
module TochkaCyclopsApi
|
6
|
+
module Schemas
|
7
|
+
module Responses
|
8
|
+
# Response schema for update_beneficiary_fl request
|
9
|
+
class UpdateBeneficiaryFl < Dry::Struct
|
10
|
+
# Schema for beneficiary field of main response
|
11
|
+
class BeneficiaryData < Dry::Struct
|
12
|
+
attribute :inn, Types::Strict::String
|
13
|
+
attribute :id, Types::Strict::String
|
14
|
+
end
|
15
|
+
|
16
|
+
attribute :beneficiary, BeneficiaryData
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'dry-validation'
|
4
|
+
|
5
|
+
module TochkaCyclopsApi
|
6
|
+
module Schemas
|
7
|
+
module Responses
|
8
|
+
# Response schema for update_beneficiary_ip request
|
9
|
+
class UpdateBeneficiaryIp < Dry::Struct
|
10
|
+
# Schema for beneficiary field of main response
|
11
|
+
class BeneficiaryData < Dry::Struct
|
12
|
+
attribute :inn, Types::Strict::String
|
13
|
+
attribute :id, Types::Strict::String
|
14
|
+
end
|
15
|
+
|
16
|
+
attribute :beneficiary, BeneficiaryData
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'dry-struct'
|
4
|
+
|
5
|
+
module Types
|
6
|
+
include Dry.Types()
|
7
|
+
end
|
8
|
+
|
9
|
+
module TochkaCyclopsApi
|
10
|
+
module Schemas
|
11
|
+
module Responses
|
12
|
+
# Response schema for update_beneficiary_ul request
|
13
|
+
class UpdateBeneficiaryUl < Dry::Struct
|
14
|
+
# Schema for beneficiary field of main response
|
15
|
+
class BeneficiaryData < Dry::Struct
|
16
|
+
attribute :inn, Types::Strict::String
|
17
|
+
attribute :id, Types::Strict::String
|
18
|
+
end
|
19
|
+
|
20
|
+
attribute :beneficiary, BeneficiaryData
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
File without changes
|
File without changes
|
data/lib/tochka_cyclops_api.rb
CHANGED
@@ -9,6 +9,7 @@ require_relative 'tochka_cyclops_api/data_processor'
|
|
9
9
|
require_relative 'tochka_cyclops_api/configuration'
|
10
10
|
require_relative 'tochka_cyclops_api/version'
|
11
11
|
require_relative 'tochka_cyclops_api/methods'
|
12
|
+
require_relative 'tochka_cyclops_api/test'
|
12
13
|
|
13
14
|
# Core module of this gem
|
14
15
|
module TochkaCyclopsApi
|
@@ -19,8 +20,6 @@ module TochkaCyclopsApi
|
|
19
20
|
end
|
20
21
|
|
21
22
|
class << self
|
22
|
-
include DataProcessor
|
23
|
-
|
24
23
|
def configuration
|
25
24
|
@configuration ||= Configuration.new
|
26
25
|
end
|
@@ -28,5 +27,9 @@ module TochkaCyclopsApi
|
|
28
27
|
def configure
|
29
28
|
yield(configuration)
|
30
29
|
end
|
30
|
+
|
31
|
+
def send_request(method: ,data: , layer: )
|
32
|
+
DataProcessor.send_request(method: ,data: , layer: )
|
33
|
+
end
|
31
34
|
end
|
32
35
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tochka_cyclops_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- andrewgavrick
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-10
|
11
|
+
date: 2024-11-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-validation
|
@@ -48,6 +48,7 @@ files:
|
|
48
48
|
- CHANGELOG.md
|
49
49
|
- README.md
|
50
50
|
- Rakefile
|
51
|
+
- lib/tasks/methods.rake
|
51
52
|
- lib/tochka_cyclops_api.rb
|
52
53
|
- lib/tochka_cyclops_api/configuration.rb
|
53
54
|
- lib/tochka_cyclops_api/data_processor.rb
|
@@ -62,13 +63,32 @@ files:
|
|
62
63
|
- lib/tochka_cyclops_api/methods.rb
|
63
64
|
- lib/tochka_cyclops_api/request.rb
|
64
65
|
- lib/tochka_cyclops_api/response.rb
|
66
|
+
- lib/tochka_cyclops_api/result.rb
|
67
|
+
- lib/tochka_cyclops_api/schemas/requests/activate_beneficiary.rb
|
68
|
+
- lib/tochka_cyclops_api/schemas/requests/create_beneficiary_fl.rb
|
65
69
|
- lib/tochka_cyclops_api/schemas/requests/create_beneficiary_ip.rb
|
66
70
|
- lib/tochka_cyclops_api/schemas/requests/create_beneficiary_ul.rb
|
71
|
+
- lib/tochka_cyclops_api/schemas/requests/deactivate_beneficiary.rb
|
67
72
|
- lib/tochka_cyclops_api/schemas/requests/echo.rb
|
73
|
+
- lib/tochka_cyclops_api/schemas/requests/get_beneficiary.rb
|
74
|
+
- lib/tochka_cyclops_api/schemas/requests/list_beneficiary.rb
|
75
|
+
- lib/tochka_cyclops_api/schemas/requests/update_beneficiary_fl.rb
|
76
|
+
- lib/tochka_cyclops_api/schemas/requests/update_beneficiary_ip.rb
|
77
|
+
- lib/tochka_cyclops_api/schemas/requests/update_beneficiary_ul.rb
|
78
|
+
- lib/tochka_cyclops_api/schemas/responses/activate_beneficiary.rb
|
79
|
+
- lib/tochka_cyclops_api/schemas/responses/create_beneficiary_fl.rb
|
68
80
|
- lib/tochka_cyclops_api/schemas/responses/create_beneficiary_ip.rb
|
69
81
|
- lib/tochka_cyclops_api/schemas/responses/create_beneficiary_ul.rb
|
82
|
+
- lib/tochka_cyclops_api/schemas/responses/deactivate_beneficiary.rb
|
70
83
|
- lib/tochka_cyclops_api/schemas/responses/echo.rb
|
71
84
|
- lib/tochka_cyclops_api/schemas/responses/error.rb
|
85
|
+
- lib/tochka_cyclops_api/schemas/responses/get_beneficiary.rb
|
86
|
+
- lib/tochka_cyclops_api/schemas/responses/list_beneficiary.rb
|
87
|
+
- lib/tochka_cyclops_api/schemas/responses/update_beneficiary_fl.rb
|
88
|
+
- lib/tochka_cyclops_api/schemas/responses/update_beneficiary_ip.rb
|
89
|
+
- lib/tochka_cyclops_api/schemas/responses/update_beneficiary_ul.rb
|
90
|
+
- lib/tochka_cyclops_api/schemas/results/local_error.rb
|
91
|
+
- lib/tochka_cyclops_api/test.rb
|
72
92
|
- lib/tochka_cyclops_api/version.rb
|
73
93
|
- sig/tochka_cyclops_api.rbs
|
74
94
|
homepage: https://gitlab.com/andrewgavrick/tochka_api
|