courier_spec 0.1.2 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/courier_spec.gemspec +1 -1
- data/lib/balance_pb.rb +50 -27
- data/lib/balance_services_pb.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a4ca9859fafb184147382d468f8cf9657be8cd9becdc41fdddfc69f0d0f3c338
|
4
|
+
data.tar.gz: 88018603437615c0257e891b92416e5eaf5dff7e38cc4d901cf87993f41d06f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 39d681ae2949c6b57e34eec25fe8390ab53590c083f73c103cf2d40654e7cb0128e67f956a76af2a50826ce30b70eb87927ab19811113c3e3c9f1a6e6796fd23
|
7
|
+
data.tar.gz: b10165e3be445caecb7318cc018e6900a2434c5b5556e37dd135777e11e28bb89d3b49685f438eacc49b3e328700792808f62b87f7e417e5a9abe338d241d1ea
|
data/courier_spec.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = 'courier_spec'
|
7
|
-
spec.version = '0.
|
7
|
+
spec.version = '0.2.0'
|
8
8
|
spec.date = '2019-09-12'
|
9
9
|
spec.summary = "Courier Spec for proto files!"
|
10
10
|
spec.description = "The gem is the generated files for proto file"
|
data/lib/balance_pb.rb
CHANGED
@@ -3,8 +3,37 @@
|
|
3
3
|
|
4
4
|
require 'google/protobuf'
|
5
5
|
|
6
|
+
require 'google/protobuf/timestamp_pb'
|
6
7
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
8
|
add_file("balance.proto", :syntax => :proto3) do
|
9
|
+
add_message "balance.AddBalanceRequest" do
|
10
|
+
optional :user_id, :string, 1
|
11
|
+
optional :amount, :float, 2
|
12
|
+
optional :fee, :float, 3
|
13
|
+
optional :currency, :string, 4
|
14
|
+
optional :product_id, :string, 5
|
15
|
+
optional :transaction_id, :string, 6
|
16
|
+
optional :transaction_type, :string, 7
|
17
|
+
end
|
18
|
+
add_message "balance.AddBalanceReply" do
|
19
|
+
optional :amount, :float, 1
|
20
|
+
optional :transaction_id, :string, 2
|
21
|
+
optional :partner_loan_id, :string, 3
|
22
|
+
optional :expired_at, :message, 6, "google.protobuf.Timestamp"
|
23
|
+
end
|
24
|
+
add_message "balance.DeductBalanceRequest" do
|
25
|
+
optional :user_id, :string, 1
|
26
|
+
optional :amount, :float, 2
|
27
|
+
optional :fee, :float, 3
|
28
|
+
optional :currency, :string, 4
|
29
|
+
optional :product_id, :string, 5
|
30
|
+
optional :transaction_id, :string, 6
|
31
|
+
optional :transaction_type, :string, 7
|
32
|
+
optional :auth_code, :string, 8
|
33
|
+
end
|
34
|
+
add_message "balance.DeductBalanceReply" do
|
35
|
+
optional :status_code, :string, 1
|
36
|
+
end
|
8
37
|
add_message "balance.BalanceRequest" do
|
9
38
|
optional :msisdn, :int64, 1
|
10
39
|
optional :amount, :int64, 2
|
@@ -12,44 +41,38 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
|
|
12
41
|
optional :transaction_id, :string, 4
|
13
42
|
end
|
14
43
|
add_message "balance.BalanceReply" do
|
15
|
-
optional :
|
16
|
-
optional :
|
17
|
-
optional :status, :string, 3
|
44
|
+
optional :user_id, :string, 1
|
45
|
+
optional :carrier_id, :string, 2
|
18
46
|
end
|
19
47
|
add_message "balance.BalancesReply" do
|
20
|
-
repeated :
|
21
|
-
optional :credit_balance, :float, 2
|
22
|
-
optional :credit_expiry, :int64, 3
|
23
|
-
optional :grace_expiry, :int64, 4
|
24
|
-
optional :msisdn, :int64, 5
|
25
|
-
optional :account_status, :string, 6
|
48
|
+
repeated :balances, :message, 1, "balance.BalanceItemReply"
|
26
49
|
end
|
27
50
|
add_message "balance.BalanceItemReply" do
|
28
|
-
optional :
|
29
|
-
optional :
|
30
|
-
optional :
|
31
|
-
optional :
|
32
|
-
optional :
|
33
|
-
optional :expired_at, :
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
optional :result_code, :int32, 14
|
42
|
-
optional :result_namespace, :string, 15
|
43
|
-
optional :is_closed, :bool, 16
|
44
|
-
optional :msisdn, :int64, 17
|
45
|
-
optional :transaction_id, :int64, 18
|
51
|
+
optional :amount, :int32, 1
|
52
|
+
optional :units, :string, 2
|
53
|
+
optional :name, :string, 3
|
54
|
+
optional :category, :string, 4
|
55
|
+
optional :type, :enum, 5, "balance.BalanceItemReply.BalanceType"
|
56
|
+
optional :expired_at, :message, 6, "google.protobuf.Timestamp"
|
57
|
+
end
|
58
|
+
add_enum "balance.BalanceItemReply.BalanceType" do
|
59
|
+
value :UNIVERSAL, 0
|
60
|
+
value :DATA, 1
|
61
|
+
value :VOICE, 2
|
62
|
+
value :SMS, 3
|
63
|
+
value :BUNDLE, 4
|
46
64
|
end
|
47
65
|
end
|
48
66
|
end
|
49
67
|
|
50
68
|
module Balance
|
69
|
+
AddBalanceRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("balance.AddBalanceRequest").msgclass
|
70
|
+
AddBalanceReply = Google::Protobuf::DescriptorPool.generated_pool.lookup("balance.AddBalanceReply").msgclass
|
71
|
+
DeductBalanceRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("balance.DeductBalanceRequest").msgclass
|
72
|
+
DeductBalanceReply = Google::Protobuf::DescriptorPool.generated_pool.lookup("balance.DeductBalanceReply").msgclass
|
51
73
|
BalanceRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("balance.BalanceRequest").msgclass
|
52
74
|
BalanceReply = Google::Protobuf::DescriptorPool.generated_pool.lookup("balance.BalanceReply").msgclass
|
53
75
|
BalancesReply = Google::Protobuf::DescriptorPool.generated_pool.lookup("balance.BalancesReply").msgclass
|
54
76
|
BalanceItemReply = Google::Protobuf::DescriptorPool.generated_pool.lookup("balance.BalanceItemReply").msgclass
|
77
|
+
BalanceItemReply::BalanceType = Google::Protobuf::DescriptorPool.generated_pool.lookup("balance.BalanceItemReply.BalanceType").enummodule
|
55
78
|
end
|
data/lib/balance_services_pb.rb
CHANGED
@@ -17,8 +17,8 @@ module Balance
|
|
17
17
|
rpc :GetBalance, BalanceRequest, BalanceReply
|
18
18
|
rpc :GetBalances, BalanceRequest, BalancesReply
|
19
19
|
rpc :SetBalance, BalanceRequest, BalanceReply
|
20
|
-
rpc :AddBalance,
|
21
|
-
rpc :DeductBalance,
|
20
|
+
rpc :AddBalance, AddBalanceRequest, AddBalanceReply
|
21
|
+
rpc :DeductBalance, DeductBalanceRequest, DeductBalanceReply
|
22
22
|
end
|
23
23
|
|
24
24
|
Stub = Service.rpc_stub_class
|