nova-pay-grpc 1.1.0 → 1.2.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/CHANGELOG.md +10 -1
- data/README.md +58 -2
- data/lib/nova/pay/grpc/version.rb +1 -1
- data/lib/nova/pay/grpc.rb +6 -0
- data/lib/nova/pay/v1/checkout_pb.rb +1 -1
- data/lib/nova/pay/v1/customers_pb.rb +25 -0
- data/lib/nova/pay/v1/customers_services_pb.rb +26 -0
- data/lib/nova/pay/v1/products_pb.rb +25 -0
- data/lib/nova/pay/v1/products_services_pb.rb +26 -0
- data/proto/nova/pay/v1/checkout.proto +2 -0
- data/proto/nova/pay/v1/customers.proto +72 -0
- data/proto/nova/pay/v1/products.proto +52 -0
- metadata +7 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bdee65576c2d1f010593feac19c3b2c84158ff068ee51371cbb30c261ac6e2f4
|
|
4
|
+
data.tar.gz: eb43b30d3cc9bd9ae4bf6db7fc454b6c4b9fc636f13c71fc838918f19cf5f8ba
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0f0bbe4fb04f7f4cc234c1cfd6b1e9ff1833be64e0a4c3d7c43ff6a43a8820b7e52ac4c289961b33ef94e101944892a000591985eef0d569ce864e0ac9525413
|
|
7
|
+
data.tar.gz: d5f4c03faa81fa533dc5a5c2be0a35a437da64046a7d895019da114f4db8f4f6e12e12e92ca11c74e1b2ca95795ffcd1136cba8ddf65fb223ededd26706ddcd9
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.2.0] - 2026-01-19
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- `CustomersService` with `save` RPC.
|
|
15
|
+
- `ProductsService` with `find` RPC.
|
|
16
|
+
- `utms` field to `CheckoutRequest` and `CustomerInput` messages.
|
|
17
|
+
|
|
10
18
|
## [1.1.0] - 2026-01-15
|
|
11
19
|
|
|
12
20
|
### Added
|
|
@@ -20,6 +28,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
20
28
|
- Initial release of the `nova-pay-grpc` gem, providing shared gRPC proto definitions and Ruby stubs for Nova Pay services.
|
|
21
29
|
- `CheckoutService` with `perform` RPC for handling checkout requests.
|
|
22
30
|
|
|
23
|
-
[unreleased]: https://github.com/coyosoftware/nova-pay-grpc/compare/v1.
|
|
31
|
+
[unreleased]: https://github.com/coyosoftware/nova-pay-grpc/compare/v1.2.0...HEAD
|
|
32
|
+
[1.2.0]: https://github.com/coyosoftware/nova-pay-grpc/compare/v1.1.0...v1.2.0
|
|
24
33
|
[1.1.0]: https://github.com/coyosoftware/nova-pay-grpc/compare/v1.0.0...v1.1.0
|
|
25
34
|
[1.0.0]: https://github.com/coyosoftware/nova-pay-grpc/releases/tag/v1.0.0
|
data/README.md
CHANGED
|
@@ -53,13 +53,15 @@ request = Nova::Pay::V1::CheckoutRequest.new(
|
|
|
53
53
|
neighborhood: 'Downtown',
|
|
54
54
|
city: 'Anytown',
|
|
55
55
|
state: 'AN',
|
|
56
|
+
utms: Google::Protobuf::Struct.from_hash({ source: 'newsletter', medium: 'email' })
|
|
56
57
|
),
|
|
57
58
|
items: [
|
|
58
59
|
Nova::Pay::V1::CheckoutItem.new(
|
|
59
60
|
product_id: 1,
|
|
60
61
|
quantity: 1
|
|
61
62
|
)
|
|
62
|
-
]
|
|
63
|
+
],
|
|
64
|
+
utms: Google::Protobuf::Struct.from_hash({ source: 'google', medium: 'cpc' })
|
|
63
65
|
)
|
|
64
66
|
|
|
65
67
|
# Make the RPC call
|
|
@@ -82,7 +84,7 @@ stub = Nova::Pay::V1::PaymentPlansService::Stub.new('localhost:50051', :this_cha
|
|
|
82
84
|
# Create a request object
|
|
83
85
|
request = Nova::Pay::V1::PaymentPlansRequest.new(
|
|
84
86
|
checkout_page_id: 'your-checkout-page-id',
|
|
85
|
-
|
|
87
|
+
amount_cents: 1000,
|
|
86
88
|
products: [
|
|
87
89
|
Nova::Pay::V1::Product.new(
|
|
88
90
|
id: 1,
|
|
@@ -100,6 +102,60 @@ rescue GRPC::BadStatus => e
|
|
|
100
102
|
end
|
|
101
103
|
```
|
|
102
104
|
|
|
105
|
+
You can use the `CustomersService` to save customer data:
|
|
106
|
+
|
|
107
|
+
```ruby
|
|
108
|
+
require 'nova/pay/v1/customers_services_pb'
|
|
109
|
+
|
|
110
|
+
# Create a stub for the CustomersService
|
|
111
|
+
stub = Nova::Pay::V1::CustomersService::Stub.new('localhost:50051', :this_channel_is_insecure)
|
|
112
|
+
|
|
113
|
+
# Create a request object
|
|
114
|
+
request = Nova::Pay::V1::SaveCustomerRequest.new(
|
|
115
|
+
name: 'Jane Doe',
|
|
116
|
+
email: 'jane.doe@example.com',
|
|
117
|
+
phone: '5511988888888',
|
|
118
|
+
foreign: false,
|
|
119
|
+
identification: '98765432100',
|
|
120
|
+
street: 'Second St',
|
|
121
|
+
number: '200',
|
|
122
|
+
neighborhood: 'Uptown',
|
|
123
|
+
zipcode: '54321-876',
|
|
124
|
+
city: 'Gotham',
|
|
125
|
+
state: 'NJ'
|
|
126
|
+
)
|
|
127
|
+
|
|
128
|
+
# Make the RPC call
|
|
129
|
+
begin
|
|
130
|
+
response = stub.save(request)
|
|
131
|
+
p response
|
|
132
|
+
rescue GRPC::BadStatus => e
|
|
133
|
+
puts "Error: #{e.details}"
|
|
134
|
+
end
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
And the `ProductsService` to find a product:
|
|
138
|
+
|
|
139
|
+
```ruby
|
|
140
|
+
require 'nova/pay/v1/products_services_pb'
|
|
141
|
+
|
|
142
|
+
# Create a stub for the ProductsService
|
|
143
|
+
stub = Nova::Pay::V1::ProductsService::Stub.new('localhost:50051', :this_channel_is_insecure)
|
|
144
|
+
|
|
145
|
+
# Create a request object
|
|
146
|
+
request = Nova::Pay::V1::FindProductRequest.new(
|
|
147
|
+
id: 1
|
|
148
|
+
)
|
|
149
|
+
|
|
150
|
+
# Make the RPC call
|
|
151
|
+
begin
|
|
152
|
+
response = stub.find(request)
|
|
153
|
+
p response
|
|
154
|
+
rescue GRPC::BadStatus => e
|
|
155
|
+
puts "Error: #{e.details}"
|
|
156
|
+
end
|
|
157
|
+
```
|
|
158
|
+
|
|
103
159
|
## Contributing
|
|
104
160
|
|
|
105
161
|
Bug reports and pull requests are welcome on GitHub at https://github.com/coyosoftware/nova-pay-grpc.
|
data/lib/nova/pay/grpc.rb
CHANGED
|
@@ -9,5 +9,11 @@ require 'google/protobuf/well_known_types'
|
|
|
9
9
|
require "nova/pay/v1/checkout_pb"
|
|
10
10
|
require "nova/pay/v1/checkout_services_pb"
|
|
11
11
|
|
|
12
|
+
require "nova/pay/v1/customers_pb"
|
|
13
|
+
require "nova/pay/v1/customers_services_pb"
|
|
14
|
+
|
|
12
15
|
require "nova/pay/v1/payment_plans_pb"
|
|
13
16
|
require "nova/pay/v1/payment_plans_services_pb"
|
|
17
|
+
|
|
18
|
+
require "nova/pay/v1/products_pb"
|
|
19
|
+
require "nova/pay/v1/products_services_pb"
|
|
@@ -8,7 +8,7 @@ require 'google/protobuf/struct_pb'
|
|
|
8
8
|
require 'google/protobuf/timestamp_pb'
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
descriptor_data = "\n\x1anova/pay/v1/checkout.proto\x12\x0bnova.pay.v1\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\
|
|
11
|
+
descriptor_data = "\n\x1anova/pay/v1/checkout.proto\x12\x0bnova.pay.v1\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa6\x03\n\x0f\x43heckoutRequest\x12(\n\x04\x64\x61te\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x18\n\x0bobservation\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x10\x63heckout_page_id\x18\x03 \x01(\t\x12\x17\n\x0fpayment_plan_id\x18\x04 \x01(\x03\x12\x14\n\x0cinstallments\x18\x05 \x01(\x03\x12,\n\x08\x63ustomer\x18\x06 \x01(\x0b\x32\x1a.nova.pay.v1.CustomerInput\x12(\n\x05items\x18\x07 \x03(\x0b\x32\x19.nova.pay.v1.CheckoutItem\x12\x34\n\x0c\x63redit_cards\x18\x08 \x03(\x0b\x32\x1e.nova.pay.v1.CreditCardPayment\x12*\n\x04meta\x18\t \x01(\x0b\x32\x17.google.protobuf.StructH\x01\x88\x01\x01\x12*\n\x04utms\x18\n \x01(\x0b\x32\x17.google.protobuf.StructH\x02\x88\x01\x01\x42\x0e\n\x0c_observationB\x07\n\x05_metaB\x07\n\x05_utms\"\xb5\x02\n\rCustomerInput\x12\r\n\x05\x65mail\x18\x01 \x01(\t\x12\x16\n\x0eidentification\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x14\n\x0cneighborhood\x18\x04 \x01(\t\x12\x0e\n\x06number\x18\x05 \x01(\t\x12\r\n\x05phone\x18\x06 \x01(\t\x12\x0e\n\x06street\x18\x07 \x01(\t\x12\x0f\n\x07zipcode\x18\x08 \x01(\t\x12\r\n\x05state\x18\t \x01(\t\x12\x0c\n\x04\x63ity\x18\n \x01(\t\x12\x12\n\ncomplement\x18\x0b \x01(\t\x12*\n\x04meta\x18\x0c \x01(\x0b\x32\x17.google.protobuf.StructH\x00\x88\x01\x01\x12*\n\x04utms\x18\r \x01(\x0b\x32\x17.google.protobuf.StructH\x01\x88\x01\x01\x42\x07\n\x05_metaB\x07\n\x05_utms\"h\n\x0c\x43heckoutItem\x12\x12\n\nproduct_id\x18\x01 \x01(\x03\x12\x10\n\x08quantity\x18\x02 \x01(\x05\x12\x1d\n\x10unit_value_cents\x18\x03 \x01(\x03H\x00\x88\x01\x01\x42\x13\n\x11_unit_value_cents\"x\n\x11\x43reditCardPayment\x12\r\n\x05token\x18\x01 \x01(\t\x12\x0f\n\x07\x63\x61rd_id\x18\x02 \x01(\t\x12\x17\n\x0fpayment_plan_id\x18\x03 \x01(\x03\x12\x14\n\x0cinstallments\x18\x04 \x01(\x05\x12\x14\n\x0c\x61mount_cents\x18\x05 \x01(\x03\"T\n\x10\x43heckoutResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12/\n\x04\x64\x61ta\x18\x03 \x01(\x0b\x32!.nova.pay.v1.CheckoutResponseData\"\xd1\x01\n\x14\x43heckoutResponseData\x12.\n\x0corder_status\x18\x01 \x01(\x0e\x32\x18.nova.pay.v1.OrderStatus\x12\x10\n\x08payments\x18\x02 \x03(\t\x12\x15\n\rbank_slip_url\x18\x03 \x01(\t\x12\x13\n\x0bpix_qr_code\x18\x04 \x01(\t\x12\x17\n\x0fpix_qr_code_url\x18\x05 \x01(\t\x12\x32\n\x0epix_expires_at\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp*\xf6\x01\n\x0bOrderStatus\x12\x18\n\x14ORDER_STATUS_PENDING\x10\x00\x12 \n\x1cORDER_STATUS_WAITING_PAYMENT\x10\x01\x12\x1f\n\x1bORDER_STATUS_PARTIALLY_PAID\x10\x02\x12\x15\n\x11ORDER_STATUS_PAID\x10\x03\x12\x1a\n\x16ORDER_STATUS_CANCELLED\x10\x04\x12#\n\x1fORDER_STATUS_PARTIALLY_REFUNDED\x10\x05\x12\x19\n\x15ORDER_STATUS_REFUNDED\x10\x06\x12\x17\n\x13ORDER_STATUS_BILLED\x10\x07\x32Y\n\x0f\x43heckoutService\x12\x46\n\x07perform\x12\x1c.nova.pay.v1.CheckoutRequest\x1a\x1d.nova.pay.v1.CheckoutResponseb\x06proto3"
|
|
12
12
|
|
|
13
13
|
pool = ::Google::Protobuf::DescriptorPool.generated_pool
|
|
14
14
|
pool.add_serialized_file(descriptor_data)
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# source: nova/pay/v1/customers.proto
|
|
4
|
+
|
|
5
|
+
require 'google/protobuf'
|
|
6
|
+
|
|
7
|
+
require 'google/protobuf/struct_pb'
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
descriptor_data = "\n\x1bnova/pay/v1/customers.proto\x12\x0bnova.pay.v1\x1a\x1cgoogle/protobuf/struct.proto\"\x9e\x07\n\x13SaveCustomerRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05\x65mail\x18\x02 \x01(\t\x12\r\n\x05phone\x18\x03 \x01(\t\x12\x0f\n\x07\x66oreign\x18\x04 \x01(\x08\x12\x16\n\x0eidentification\x18\x05 \x01(\t\x12\x0e\n\x06street\x18\x06 \x01(\t\x12\x0e\n\x06number\x18\x07 \x01(\t\x12\x12\n\ncomplement\x18\x08 \x01(\t\x12\x14\n\x0cneighborhood\x18\t \x01(\t\x12\x0f\n\x07zipcode\x18\n \x01(\t\x12\x0c\n\x04\x63ity\x18\x0b \x01(\t\x12\r\n\x05state\x18\x0c \x01(\t\x12\x1a\n\rsocial_reason\x18\r \x01(\tH\x00\x88\x01\x01\x12\x1e\n\x11state_inscription\x18\x0e \x01(\tH\x01\x88\x01\x01\x12\"\n\x15municipal_inscription\x18\x0f \x01(\tH\x02\x88\x01\x01\x12*\n\x1dminimum_retention_value_cents\x18\x10 \x01(\x03H\x03\x88\x01\x01\x12\x0c\n\x04tags\x18\x11 \x03(\t\x12\x18\n\x10\x61uxiliary_emails\x18\x12 \x03(\t\x12\x10\n\x08list_ids\x18\x13 \x03(\t\x12*\n\x04utms\x18\x14 \x01(\x0b\x32\x17.google.protobuf.StructH\x04\x88\x01\x01\x12\x18\n\x0b\x63reate_deal\x18\x15 \x01(\x08H\x05\x88\x01\x01\x12\x1c\n\x0fmain_product_id\x18\x16 \x01(\x03H\x06\x88\x01\x01\x12\x1d\n\x10\x63heckout_page_id\x18\x17 \x01(\tH\x07\x88\x01\x01\x12\x13\n\x06\x63oupon\x18\x18 \x01(\tH\x08\x88\x01\x01\x12\x32\n\x08products\x18\x19 \x03(\x0b\x32 .nova.pay.v1.SaveCustomerProduct\x12\x10\n\x03url\x18\x1a \x01(\tH\t\x88\x01\x01\x12*\n\x04meta\x18\x1b \x01(\x0b\x32\x17.google.protobuf.StructH\n\x88\x01\x01\x12\x18\n\x0bobservation\x18\x1c \x01(\tH\x0b\x88\x01\x01\x42\x10\n\x0e_social_reasonB\x14\n\x12_state_inscriptionB\x18\n\x16_municipal_inscriptionB \n\x1e_minimum_retention_value_centsB\x07\n\x05_utmsB\x0e\n\x0c_create_dealB\x12\n\x10_main_product_idB\x13\n\x11_checkout_page_idB\t\n\x07_couponB\x06\n\x04_urlB\x07\n\x05_metaB\x0e\n\x0c_observation\"3\n\x13SaveCustomerProduct\x12\n\n\x02id\x18\x01 \x01(\x03\x12\x10\n\x08quantity\x18\x02 \x01(\x05\"\x95\x01\n\x1bSaveCustomerAddressResponse\x12\x0e\n\x06street\x18\x01 \x01(\t\x12\x0e\n\x06number\x18\x02 \x01(\t\x12\x12\n\ncomplement\x18\x03 \x01(\t\x12\x14\n\x0cneighborhood\x18\x04 \x01(\t\x12\x0f\n\x07zipcode\x18\x05 \x01(\t\x12\x0c\n\x04\x63ity\x18\x06 \x01(\t\x12\r\n\x05state\x18\x07 \x01(\t\"\\\n\x14SaveCustomerResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x33\n\x04\x64\x61ta\x18\x03 \x01(\x0b\x32%.nova.pay.v1.SaveCustomerResponseData\"\xef\x01\n\x18SaveCustomerResponseData\x12\n\n\x02id\x18\x01 \x01(\x03\x12\r\n\x05\x65mail\x18\x02 \x01(\t\x12\x16\n\x0eidentification\x18\x03 \x01(\t\x12\x0c\n\x04name\x18\x04 \x01(\t\x12\r\n\x05phone\x18\x05 \x01(\t\x12%\n\x04meta\x18\x06 \x01(\x0b\x32\x17.google.protobuf.Struct\x12\x0f\n\x07\x66oreign\x18\x07 \x01(\x08\x12\x39\n\x07\x61\x64\x64ress\x18\x08 \x01(\x0b\x32(.nova.pay.v1.SaveCustomerAddressResponse\x12\x10\n\x08order_id\x18\t \x01(\x03\x32_\n\x10\x43ustomersService\x12K\n\x04save\x12 .nova.pay.v1.SaveCustomerRequest\x1a!.nova.pay.v1.SaveCustomerResponseb\x06proto3"
|
|
11
|
+
|
|
12
|
+
pool = ::Google::Protobuf::DescriptorPool.generated_pool
|
|
13
|
+
pool.add_serialized_file(descriptor_data)
|
|
14
|
+
|
|
15
|
+
module Nova
|
|
16
|
+
module Pay
|
|
17
|
+
module V1
|
|
18
|
+
SaveCustomerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("nova.pay.v1.SaveCustomerRequest").msgclass
|
|
19
|
+
SaveCustomerProduct = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("nova.pay.v1.SaveCustomerProduct").msgclass
|
|
20
|
+
SaveCustomerAddressResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("nova.pay.v1.SaveCustomerAddressResponse").msgclass
|
|
21
|
+
SaveCustomerResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("nova.pay.v1.SaveCustomerResponse").msgclass
|
|
22
|
+
SaveCustomerResponseData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("nova.pay.v1.SaveCustomerResponseData").msgclass
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
2
|
+
# Source: nova/pay/v1/customers.proto for package 'nova.pay.v1'
|
|
3
|
+
|
|
4
|
+
require 'grpc'
|
|
5
|
+
require 'nova/pay/v1/customers_pb'
|
|
6
|
+
|
|
7
|
+
module Nova
|
|
8
|
+
module Pay
|
|
9
|
+
module V1
|
|
10
|
+
module CustomersService
|
|
11
|
+
class Service
|
|
12
|
+
|
|
13
|
+
include ::GRPC::GenericService
|
|
14
|
+
|
|
15
|
+
self.marshal_class_method = :encode
|
|
16
|
+
self.unmarshal_class_method = :decode
|
|
17
|
+
self.service_name = 'nova.pay.v1.CustomersService'
|
|
18
|
+
|
|
19
|
+
rpc :save, ::Nova::Pay::V1::SaveCustomerRequest, ::Nova::Pay::V1::SaveCustomerResponse
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
Stub = Service.rpc_stub_class
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# source: nova/pay/v1/products.proto
|
|
4
|
+
|
|
5
|
+
require 'google/protobuf'
|
|
6
|
+
|
|
7
|
+
require 'google/protobuf/timestamp_pb'
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
descriptor_data = "\n\x1anova/pay/v1/products.proto\x12\x0bnova.pay.v1\x1a\x1fgoogle/protobuf/timestamp.proto\" \n\x12\x46indProductRequest\x12\n\n\x02id\x18\x01 \x01(\x03\"Z\n\x13\x46indProductResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x32\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32$.nova.pay.v1.FindProductResponseData\"\xc8\x03\n\x17\x46indProductResponseData\x12\n\n\x02id\x18\x01 \x01(\x03\x12\x0c\n\x04\x63ode\x18\x02 \x01(\t\x12\x12\n\x05\x63ycle\x18\x03 \x01(\x05H\x00\x88\x01\x01\x12\x30\n\x0c\x64iscarded_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\x08interval\x18\x05 \x01(\x0e\x32\x1c.nova.pay.v1.ProductIntervalH\x01\x88\x01\x01\x12\x0c\n\x04name\x18\x06 \x01(\t\x12\x0b\n\x03ncm\x18\x07 \x01(\t\x12\x19\n\x11short_description\x18\x08 \x01(\t\x12\x14\n\x0csubscription\x18\t \x01(\x08\x12\x17\n\x0ftax_description\x18\n \x01(\t\x12&\n\x04type\x18\x0b \x01(\x0e\x32\x18.nova.pay.v1.ProductType\x12\x13\n\x0bvalue_cents\x18\x0c \x01(\x03\x12\x12\n\ncompany_id\x18\r \x01(\x03\x12\x1c\n\x14\x66inancial_account_id\x18\x0e \x01(\x03\x12\x1c\n\x14tax_configuration_id\x18\x0f \x01(\x03\x12\x0f\n\x07unit_id\x18\x10 \x01(\x03\x42\x08\n\x06_cycleB\x0b\n\t_interval*\xa1\x01\n\x0fProductInterval\x12\x18\n\x14INTERVAL_UNSPECIFIED\x10\x00\x12\x14\n\x10INTERVAL_MONTHLY\x10\x01\x12\x16\n\x12INTERVAL_BIMONTHLY\x10\x02\x12\x17\n\x13INTERVAL_TRIMONTHLY\x10\x03\x12\x18\n\x14INTERVAL_HALF_YEARLY\x10\x06\x12\x13\n\x0fINTERVAL_YEARLY\x10\x0c*1\n\x0bProductType\x12\x10\n\x0cTYPE_PRODUCT\x10\x00\x12\x10\n\x0cTYPE_SERVICE\x10\x01\x32\\\n\x0fProductsService\x12I\n\x04\x66ind\x12\x1f.nova.pay.v1.FindProductRequest\x1a .nova.pay.v1.FindProductResponseb\x06proto3"
|
|
11
|
+
|
|
12
|
+
pool = ::Google::Protobuf::DescriptorPool.generated_pool
|
|
13
|
+
pool.add_serialized_file(descriptor_data)
|
|
14
|
+
|
|
15
|
+
module Nova
|
|
16
|
+
module Pay
|
|
17
|
+
module V1
|
|
18
|
+
FindProductRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("nova.pay.v1.FindProductRequest").msgclass
|
|
19
|
+
FindProductResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("nova.pay.v1.FindProductResponse").msgclass
|
|
20
|
+
FindProductResponseData = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("nova.pay.v1.FindProductResponseData").msgclass
|
|
21
|
+
ProductInterval = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("nova.pay.v1.ProductInterval").enummodule
|
|
22
|
+
ProductType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("nova.pay.v1.ProductType").enummodule
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
2
|
+
# Source: nova/pay/v1/products.proto for package 'nova.pay.v1'
|
|
3
|
+
|
|
4
|
+
require 'grpc'
|
|
5
|
+
require 'nova/pay/v1/products_pb'
|
|
6
|
+
|
|
7
|
+
module Nova
|
|
8
|
+
module Pay
|
|
9
|
+
module V1
|
|
10
|
+
module ProductsService
|
|
11
|
+
class Service
|
|
12
|
+
|
|
13
|
+
include ::GRPC::GenericService
|
|
14
|
+
|
|
15
|
+
self.marshal_class_method = :encode
|
|
16
|
+
self.unmarshal_class_method = :decode
|
|
17
|
+
self.service_name = 'nova.pay.v1.ProductsService'
|
|
18
|
+
|
|
19
|
+
rpc :find, ::Nova::Pay::V1::FindProductRequest, ::Nova::Pay::V1::FindProductResponse
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
Stub = Service.rpc_stub_class
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -30,6 +30,7 @@ message CheckoutRequest {
|
|
|
30
30
|
repeated CheckoutItem items = 7;
|
|
31
31
|
repeated CreditCardPayment credit_cards = 8;
|
|
32
32
|
optional google.protobuf.Struct meta = 9;
|
|
33
|
+
optional google.protobuf.Struct utms = 10;
|
|
33
34
|
}
|
|
34
35
|
|
|
35
36
|
message CustomerInput {
|
|
@@ -45,6 +46,7 @@ message CustomerInput {
|
|
|
45
46
|
string city = 10;
|
|
46
47
|
string complement = 11;
|
|
47
48
|
optional google.protobuf.Struct meta = 12;
|
|
49
|
+
optional google.protobuf.Struct utms = 13;
|
|
48
50
|
}
|
|
49
51
|
|
|
50
52
|
message CheckoutItem {
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
import "google/protobuf/struct.proto";
|
|
4
|
+
|
|
5
|
+
package nova.pay.v1;
|
|
6
|
+
|
|
7
|
+
service CustomersService {
|
|
8
|
+
rpc save (SaveCustomerRequest) returns (SaveCustomerResponse);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
message SaveCustomerRequest {
|
|
12
|
+
string name = 1;
|
|
13
|
+
string email = 2;
|
|
14
|
+
string phone = 3;
|
|
15
|
+
bool foreign = 4;
|
|
16
|
+
string identification = 5;
|
|
17
|
+
string street = 6;
|
|
18
|
+
string number = 7;
|
|
19
|
+
string complement = 8;
|
|
20
|
+
string neighborhood = 9;
|
|
21
|
+
string zipcode = 10;
|
|
22
|
+
string city = 11;
|
|
23
|
+
string state = 12;
|
|
24
|
+
optional string social_reason = 13;
|
|
25
|
+
optional string state_inscription = 14;
|
|
26
|
+
optional string municipal_inscription = 15;
|
|
27
|
+
optional int64 minimum_retention_value_cents = 16;
|
|
28
|
+
repeated string tags = 17;
|
|
29
|
+
repeated string auxiliary_emails = 18;
|
|
30
|
+
repeated string list_ids = 19;
|
|
31
|
+
optional google.protobuf.Struct utms = 20;
|
|
32
|
+
optional bool create_deal = 21;
|
|
33
|
+
optional int64 main_product_id = 22;
|
|
34
|
+
optional string checkout_page_id = 23;
|
|
35
|
+
optional string coupon = 24;
|
|
36
|
+
repeated SaveCustomerProduct products = 25;
|
|
37
|
+
optional string url = 26;
|
|
38
|
+
optional google.protobuf.Struct meta = 27;
|
|
39
|
+
optional string observation = 28;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
message SaveCustomerProduct {
|
|
43
|
+
int64 id = 1;
|
|
44
|
+
int32 quantity = 2;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
message SaveCustomerAddressResponse {
|
|
48
|
+
string street = 1;
|
|
49
|
+
string number = 2;
|
|
50
|
+
string complement = 3;
|
|
51
|
+
string neighborhood = 4;
|
|
52
|
+
string zipcode = 5;
|
|
53
|
+
string city = 6;
|
|
54
|
+
string state = 7;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
message SaveCustomerResponse {
|
|
58
|
+
bool success = 1;
|
|
59
|
+
SaveCustomerResponseData data = 3;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
message SaveCustomerResponseData {
|
|
63
|
+
int64 id = 1;
|
|
64
|
+
string email = 2;
|
|
65
|
+
string identification = 3;
|
|
66
|
+
string name = 4;
|
|
67
|
+
string phone = 5;
|
|
68
|
+
google.protobuf.Struct meta = 6;
|
|
69
|
+
bool foreign = 7;
|
|
70
|
+
SaveCustomerAddressResponse address = 8;
|
|
71
|
+
int64 order_id = 9;
|
|
72
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
import "google/protobuf/timestamp.proto";
|
|
4
|
+
|
|
5
|
+
package nova.pay.v1;
|
|
6
|
+
|
|
7
|
+
service ProductsService {
|
|
8
|
+
rpc find (FindProductRequest) returns (FindProductResponse);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
enum ProductInterval {
|
|
12
|
+
INTERVAL_UNSPECIFIED = 0;
|
|
13
|
+
|
|
14
|
+
INTERVAL_MONTHLY = 1;
|
|
15
|
+
INTERVAL_BIMONTHLY = 2;
|
|
16
|
+
INTERVAL_TRIMONTHLY = 3;
|
|
17
|
+
INTERVAL_HALF_YEARLY = 6;
|
|
18
|
+
INTERVAL_YEARLY = 12;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
enum ProductType {
|
|
22
|
+
TYPE_PRODUCT = 0;
|
|
23
|
+
TYPE_SERVICE = 1;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
message FindProductRequest {
|
|
27
|
+
int64 id = 1;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
message FindProductResponse {
|
|
31
|
+
bool success = 1;
|
|
32
|
+
FindProductResponseData data = 2;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
message FindProductResponseData {
|
|
36
|
+
int64 id = 1;
|
|
37
|
+
string code = 2;
|
|
38
|
+
optional int32 cycle = 3;
|
|
39
|
+
google.protobuf.Timestamp discarded_at = 4;
|
|
40
|
+
optional ProductInterval interval = 5;
|
|
41
|
+
string name = 6;
|
|
42
|
+
string ncm = 7;
|
|
43
|
+
string short_description = 8;
|
|
44
|
+
bool subscription = 9;
|
|
45
|
+
string tax_description = 10;
|
|
46
|
+
ProductType type = 11;
|
|
47
|
+
int64 value_cents = 12;
|
|
48
|
+
int64 company_id = 13;
|
|
49
|
+
int64 financial_account_id = 14;
|
|
50
|
+
int64 tax_configuration_id = 15;
|
|
51
|
+
int64 unit_id = 16;
|
|
52
|
+
}
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: nova-pay-grpc
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Coyô Software
|
|
@@ -51,10 +51,16 @@ files:
|
|
|
51
51
|
- lib/nova/pay/grpc/version.rb
|
|
52
52
|
- lib/nova/pay/v1/checkout_pb.rb
|
|
53
53
|
- lib/nova/pay/v1/checkout_services_pb.rb
|
|
54
|
+
- lib/nova/pay/v1/customers_pb.rb
|
|
55
|
+
- lib/nova/pay/v1/customers_services_pb.rb
|
|
54
56
|
- lib/nova/pay/v1/payment_plans_pb.rb
|
|
55
57
|
- lib/nova/pay/v1/payment_plans_services_pb.rb
|
|
58
|
+
- lib/nova/pay/v1/products_pb.rb
|
|
59
|
+
- lib/nova/pay/v1/products_services_pb.rb
|
|
56
60
|
- proto/nova/pay/v1/checkout.proto
|
|
61
|
+
- proto/nova/pay/v1/customers.proto
|
|
57
62
|
- proto/nova/pay/v1/payment_plans.proto
|
|
63
|
+
- proto/nova/pay/v1/products.proto
|
|
58
64
|
- sig/nova/pay/grpc.rbs
|
|
59
65
|
homepage: https://github.com/coyosoftware/nova-pay-grpc
|
|
60
66
|
licenses: []
|