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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 63e1855e44d1d3d9f85095e7dbf425199f36493e4e03186c9d4d84d8e5ed9e3f
4
- data.tar.gz: 3f20af4a30de6faf93eee614e20fdaa45139497417734b44b6378aa65a3ca7bd
3
+ metadata.gz: a4ca9859fafb184147382d468f8cf9657be8cd9becdc41fdddfc69f0d0f3c338
4
+ data.tar.gz: 88018603437615c0257e891b92416e5eaf5dff7e38cc4d901cf87993f41d06f5
5
5
  SHA512:
6
- metadata.gz: 48a3532fe2bc9c82b692e7d8aa93305e63b21912e413f56c3826ea3aa49eb99d1ebddde124c551e091b7851e6246aafabc766e126845771a4f173c8cb5a093bf
7
- data.tar.gz: '098b2b2e816fb4b030fe1f55b8e516027182e1f1a2de0dfc425ad6039e68dadcff367feda1ffba9ac6d004975ecd31600b08f8ee6c9f54d3135afc7ee5098739'
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.1.2'
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 :value, :float, 1
16
- optional :currency, :string, 2
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 :packages, :message, 1, "balance.BalanceItemReply"
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 :name, :string, 1
29
- optional :description, :string, 2
30
- optional :remaining, :float, 3
31
- optional :unit, :string, 4
32
- optional :category, :string, 5
33
- optional :expired_at, :int64, 6
34
- optional :created_at, :int64, 7
35
- optional :used, :float, 8
36
- optional :total, :float, 9
37
- optional :status, :string, 10
38
- optional :loan_amount, :float, 11
39
- optional :account_balance_info, :string, 12
40
- optional :fee, :float, 13
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
@@ -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, BalanceRequest, BalanceReply
21
- rpc :DeductBalance, BalanceRequest, BalanceReply
20
+ rpc :AddBalance, AddBalanceRequest, AddBalanceReply
21
+ rpc :DeductBalance, DeductBalanceRequest, DeductBalanceReply
22
22
  end
23
23
 
24
24
  Stub = Service.rpc_stub_class
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: courier_spec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ruiyang Zhang