kody-clientsdk-ruby 1.7.3 ā 1.7.25
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 +83 -161
- data/kody-clientsdk-ruby.gemspec +3 -1
- data/lib/ecom_pb.rb +1 -1
- data/lib/enums_pb.rb +23 -0
- data/lib/kody/configuration.rb +30 -3
- data/lib/kody/version.rb +1 -1
- data/lib/pay_pb.rb +1 -1
- data/lib/preauth_pb.rb +11 -13
- data/lib/preauth_services_pb.rb +6 -2
- data/lib/token_pb.rb +33 -0
- data/lib/token_services_pb.rb +34 -0
- data/samples/ecom/get_payments.rb +34 -20
- data/samples/pos/get_terminals.rb +77 -0
- metadata +9 -3
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: b7e8049442ca9e9eecc5a83bfe5525d2fba9e90c1529eb9c3f3403c84d8890a5
         | 
| 4 | 
            +
              data.tar.gz: 37682b8f1e97473b87348b7cf4c522335f261f933fbb8291b92056141f549764
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 6ec6d3ea2e65016527e4d1e1247c1c32790ed22cd2aa423257ea37bbec5335349dc396fa0039bd20bdecd66d436ea2c8e6a096abdff556b8976641344a5df65c
         | 
| 7 | 
            +
              data.tar.gz: f55fdf911724f988ba016dcc944ba04700ea9e4c72ae8c9776d82aa542ee1f241ee9d5ac071da7470bcdf1490dca419ffff0e9d5407c74f325a776b486b299ed
         | 
    
        data/README.md
    CHANGED
    
    | @@ -1,211 +1,133 @@ | |
| 1 1 | 
             
            # Kody API - Ruby SDK
         | 
| 2 2 |  | 
| 3 | 
            -
             | 
| 3 | 
            +
            [](https://badge.fury.io/rb/kody-clientsdk-ruby)
         | 
| 4 | 
            +
            [](https://rubygems.org/gems/kody-clientsdk-ruby)
         | 
| 5 | 
            +
            [](https://opensource.org/licenses/MIT)
         | 
| 6 | 
            +
            [](https://www.ruby-lang.org/)
         | 
| 4 7 |  | 
| 5 | 
            -
             | 
| 8 | 
            +
            This guide provides an overview of using the Kody API and its reference documentation.
         | 
| 9 | 
            +
             | 
| 10 | 
            +
            - [Client Libraries](#client-libraries)
         | 
| 11 | 
            +
            - [Ruby Installation](#ruby-installation)
         | 
| 6 12 | 
             
            - [Authentication](#authentication)
         | 
| 7 | 
            -
            - [ | 
| 13 | 
            +
            - [Documentation](#documentation)
         | 
| 8 14 | 
             
            - [Sample code](#sample-code)
         | 
| 9 15 |  | 
| 10 | 
            -
            ##  | 
| 16 | 
            +
            ## Client Libraries
         | 
| 11 17 |  | 
| 12 | 
            -
             | 
| 18 | 
            +
            Kody provides client libraries for many popular languages to access the APIs. If your desired programming language is supported by the client libraries, we recommend that you use this option.
         | 
| 13 19 |  | 
| 14 | 
            -
             | 
| 15 | 
            -
             | 
| 16 | 
            -
             | 
| 20 | 
            +
            Available languages:
         | 
| 21 | 
            +
            - Java: https://github.com/KodyPay/kody-clientsdk-java/
         | 
| 22 | 
            +
            - Python: https://github.com/KodyPay/kody-clientsdk-python/
         | 
| 23 | 
            +
            - PHP: https://github.com/KodyPay/kody-clientsdk-php/
         | 
| 24 | 
            +
            - .Net: https://github.com/KodyPay/kody-clientsdk-dotnet/
         | 
| 25 | 
            +
            - Ruby: https://github.com/KodyPay/kody-clientsdk-ruby/
         | 
| 17 26 |  | 
| 18 | 
            -
             | 
| 27 | 
            +
            The advantages of using the Kody Client library instead of a REST API are:
         | 
| 28 | 
            +
            - Maintained by Kody.
         | 
| 29 | 
            +
            - Built-in authentication and increased security.
         | 
| 30 | 
            +
            - Built-in retries.
         | 
| 31 | 
            +
            - Idiomatic for each language.
         | 
| 32 | 
            +
            - Quicker development.
         | 
| 33 | 
            +
            - Backwards compatibility with new versions.
         | 
| 19 34 |  | 
| 20 | 
            -
             | 
| 21 | 
            -
             | 
| 22 | 
            -
             | 
| 35 | 
            +
            If your coding language is not listed, please let the Kody team know and we will be able to create it for you.
         | 
| 36 | 
            +
             | 
| 37 | 
            +
            ## Ruby Installation
         | 
| 38 | 
            +
            ### Requirements
         | 
| 39 | 
            +
            - Ruby 2.6.10 and above
         | 
| 40 | 
            +
            - Bundler (optional), recommended way to manage dependencies
         | 
| 23 41 |  | 
| 24 | 
            -
             | 
| 42 | 
            +
            Install the Kody Ruby Client SDK using gem:
         | 
| 25 43 |  | 
| 26 44 | 
             
            ```bash
         | 
| 27 45 | 
             
            gem install kody-clientsdk-ruby
         | 
| 28 46 | 
             
            ```
         | 
| 29 47 |  | 
| 30 | 
            -
             | 
| 31 | 
            -
            - Ruby 2.6.10 or higher
         | 
| 32 | 
            -
            - gRPC support
         | 
| 33 | 
            -
             | 
| 34 | 
            -
            ## Authentication
         | 
| 35 | 
            -
             | 
| 36 | 
            -
            The client library uses a combination of a `Store ID` and an `API key`.
         | 
| 37 | 
            -
            These will be shared with you during the technical integration onboarding or by your Kody contact.
         | 
| 38 | 
            -
             | 
| 39 | 
            -
            During development, you will have access to a **test Store** and **test API key**, and when the integration is ready for live access, the production credentials will be shared securely with you and associated with a live store that was onboarded on Kody.
         | 
| 40 | 
            -
             | 
| 41 | 
            -
            The test and live API calls are always compatible, only changing credentials and the service hostname is required to enable the integration in production.
         | 
| 42 | 
            -
             | 
| 43 | 
            -
            ### Host names
         | 
| 44 | 
            -
             | 
| 45 | 
            -
            - Development and test: `grpc-staging.kodypay.com`
         | 
| 46 | 
            -
            - Live: `grpc.kodypay.com`
         | 
| 47 | 
            -
             | 
| 48 | 
            -
            ## Quick Start
         | 
| 48 | 
            +
            Or add to your Gemfile:
         | 
| 49 49 |  | 
| 50 50 | 
             
            ```ruby
         | 
| 51 | 
            -
             | 
| 52 | 
            -
             | 
| 53 | 
            -
            # Configure the Kody client
         | 
| 54 | 
            -
            Kody.configure do |config|
         | 
| 55 | 
            -
              config.api_key = 'your-api-key'
         | 
| 56 | 
            -
              config.store_id = 'your-store-id'
         | 
| 57 | 
            -
              config.staging! # Use staging environment for testing
         | 
| 58 | 
            -
            end
         | 
| 59 | 
            -
             | 
| 60 | 
            -
            # Create a client instance
         | 
| 61 | 
            -
            client = Kody::Client.new
         | 
| 62 | 
            -
             | 
| 63 | 
            -
            # Initiate a payment
         | 
| 64 | 
            -
            begin
         | 
| 65 | 
            -
              response = client.ecom.initiate_payment(
         | 
| 66 | 
            -
                payment_reference: Kody::EcomClient.generate_payment_reference,
         | 
| 67 | 
            -
                amount_minor_units: 2000, # £20.00 in pence
         | 
| 68 | 
            -
                currency: 'GBP',
         | 
| 69 | 
            -
                order_id: Kody::EcomClient.generate_order_id,
         | 
| 70 | 
            -
                return_url: 'https://your-website.com/payment-return'
         | 
| 71 | 
            -
              )
         | 
| 72 | 
            -
             | 
| 73 | 
            -
              puts "Payment initiated successfully!"
         | 
| 74 | 
            -
              puts "Payment ID: #{response.response.payment_id}"
         | 
| 75 | 
            -
              puts "Payment URL: #{response.response.payment_url}"
         | 
| 76 | 
            -
             | 
| 77 | 
            -
            rescue Kody::Error => e
         | 
| 78 | 
            -
              puts "Error: #{e.message}"
         | 
| 79 | 
            -
            rescue GRPC::BadStatus => e
         | 
| 80 | 
            -
              puts "gRPC Error: #{e.message}"
         | 
| 81 | 
            -
            end
         | 
| 51 | 
            +
            gem 'kody-clientsdk-ruby'
         | 
| 82 52 | 
             
            ```
         | 
| 83 53 |  | 
| 84 | 
            -
             | 
| 54 | 
            +
            The library can also be downloaded from [RubyGems](https://rubygems.org/gems/kody-clientsdk-ruby).
         | 
| 85 55 |  | 
| 86 | 
            -
            ###  | 
| 56 | 
            +
            ### Import in code
         | 
| 87 57 |  | 
| 88 58 | 
             
            ```ruby
         | 
| 89 | 
            -
             | 
| 90 | 
            -
            Kody.configure do |config|
         | 
| 91 | 
            -
              config.api_key = 'your-production-api-key'
         | 
| 92 | 
            -
              config.store_id = 'your-production-store-id'
         | 
| 93 | 
            -
              # config.host defaults to 'grpc.kodypay.com'
         | 
| 94 | 
            -
            end
         | 
| 95 | 
            -
             | 
| 96 | 
            -
            # Staging environment
         | 
| 97 | 
            -
            Kody.configure do |config|
         | 
| 98 | 
            -
              config.api_key = 'your-test-api-key'
         | 
| 99 | 
            -
              config.store_id = 'your-test-store-id'
         | 
| 100 | 
            -
              config.staging! # Sets host to 'grpc-staging.kodypay.com'
         | 
| 101 | 
            -
            end
         | 
| 59 | 
            +
            require 'kody'
         | 
| 102 60 |  | 
| 103 | 
            -
            #  | 
| 61 | 
            +
            # Configure SDK
         | 
| 104 62 | 
             
            Kody.configure do |config|
         | 
| 63 | 
            +
              config.staging_ap!  # Use Asia-Pacific staging
         | 
| 105 64 | 
             
              config.api_key = 'your-api-key'
         | 
| 106 65 | 
             
              config.store_id = 'your-store-id'
         | 
| 107 | 
            -
              config.development! # Sets host to 'localhost:8080' with TLS disabled
         | 
| 108 66 | 
             
            end
         | 
| 109 | 
            -
            ```
         | 
| 110 | 
            -
             | 
| 111 | 
            -
            ### Environment Variables
         | 
| 112 67 |  | 
| 113 | 
            -
             | 
| 68 | 
            +
            # eCommerce API
         | 
| 69 | 
            +
            ecom_stub = Com::Kodypay::Grpc::Ecom::V1::KodyEcomPaymentsService::Stub.new(
         | 
| 70 | 
            +
              Kody.configuration.endpoint,
         | 
| 71 | 
            +
              GRPC::Core::ChannelCredentials.new
         | 
| 72 | 
            +
            )
         | 
| 114 73 |  | 
| 115 | 
            -
             | 
| 116 | 
            -
             | 
| 117 | 
            -
             | 
| 118 | 
            -
             | 
| 74 | 
            +
            # Terminal API
         | 
| 75 | 
            +
            terminal_stub = Com::Kodypay::Grpc::Pay::V1::KodyPayTerminalService::Stub.new(
         | 
| 76 | 
            +
              Kody.configuration.endpoint,
         | 
| 77 | 
            +
              GRPC::Core::ChannelCredentials.new
         | 
| 78 | 
            +
            )
         | 
| 119 79 |  | 
| 120 | 
            -
             | 
| 121 | 
            -
             | 
| 122 | 
            -
               | 
| 123 | 
            -
               | 
| 124 | 
            -
             | 
| 125 | 
            -
            end
         | 
| 80 | 
            +
            # Ordering API
         | 
| 81 | 
            +
            ordering_stub = Com::Kodypay::Grpc::Ordering::V1::KodyOrderingService::Stub.new(
         | 
| 82 | 
            +
              Kody.configuration.endpoint,
         | 
| 83 | 
            +
              GRPC::Core::ChannelCredentials.new
         | 
| 84 | 
            +
            )
         | 
| 126 85 | 
             
            ```
         | 
| 127 86 |  | 
| 128 | 
            -
            ##  | 
| 129 | 
            -
             | 
| 130 | 
            -
            ### E-commerce Payments
         | 
| 131 | 
            -
             | 
| 132 | 
            -
            #### Initiate Payment
         | 
| 87 | 
            +
            ## Authentication
         | 
| 133 88 |  | 
| 134 | 
            -
             | 
| 135 | 
            -
             | 
| 136 | 
            -
              payment_reference: 'unique-payment-ref',
         | 
| 137 | 
            -
              amount_minor_units: 2000, # Amount in minor units (e.g., pence for GBP)
         | 
| 138 | 
            -
              currency: 'GBP',
         | 
| 139 | 
            -
              order_id: 'order-123',
         | 
| 140 | 
            -
              return_url: 'https://your-site.com/payment-return',
         | 
| 141 | 
            -
              # Optional parameters:
         | 
| 142 | 
            -
              order_metadata: '{"item": "Product Name"}',
         | 
| 143 | 
            -
              expiry: {
         | 
| 144 | 
            -
                show_timer: true,
         | 
| 145 | 
            -
                expiring_seconds: 1800 # 30 minutes
         | 
| 146 | 
            -
              },
         | 
| 147 | 
            -
              locale: 'en_GB',
         | 
| 148 | 
            -
              show_order_summary: true,
         | 
| 149 | 
            -
              show_merchant_name: true
         | 
| 150 | 
            -
            )
         | 
| 151 | 
            -
            ```
         | 
| 89 | 
            +
            The client library uses a combination of a `Store ID` and an `API key`.
         | 
| 90 | 
            +
            These will be shared with you during the technical integration onboarding or by your Kody contact.
         | 
| 152 91 |  | 
| 153 | 
            -
             | 
| 92 | 
            +
            During development, you will have access to a **test Store** and **test API key**, and when the integration is ready for live access, the production credentials will be shared securely with you and associated with a live store that was onboarded on Kody.
         | 
| 154 93 |  | 
| 155 | 
            -
             | 
| 156 | 
            -
            response = client.ecom.get_payments(
         | 
| 157 | 
            -
              page: 1,
         | 
| 158 | 
            -
              page_size: 10,
         | 
| 159 | 
            -
              # Optional filter:
         | 
| 160 | 
            -
              filter: {
         | 
| 161 | 
            -
                order_id: 'specific-order-id'  # Optional: filter by order ID
         | 
| 162 | 
            -
              }
         | 
| 163 | 
            -
            )
         | 
| 94 | 
            +
            The test and live API calls are always compatible, only changing credentials and the service hostname is required to enable the integration in production.
         | 
| 164 95 |  | 
| 165 | 
            -
             | 
| 166 | 
            -
            response.response.payments.each do |payment|
         | 
| 167 | 
            -
              puts "Payment ID: #{payment.payment_id}"
         | 
| 168 | 
            -
              puts "Status: #{payment.status}"
         | 
| 169 | 
            -
              puts "Amount: #{payment.sale_data.amount_minor_units}" if payment.has_sale_data?
         | 
| 170 | 
            -
            end
         | 
| 171 | 
            -
            ```
         | 
| 96 | 
            +
            ### Host names
         | 
| 172 97 |  | 
| 173 | 
            -
             | 
| 98 | 
            +
            Development and Test:
         | 
| 99 | 
            +
            - Default: `grpc-staging.kodypay.com`
         | 
| 100 | 
            +
            - For Asia-specific region: `grpc-staging-ap.kodypay.com`
         | 
| 101 | 
            +
            - For Europe-specific region: `grpc-staging-eu.kodypay.com`
         | 
| 174 102 |  | 
| 175 | 
            -
             | 
| 103 | 
            +
            Live:
         | 
| 104 | 
            +
            - Default: `grpc.kodypay.com`
         | 
| 105 | 
            +
            - For Asia-specific region: `grpc-ap.kodypay.com`
         | 
| 106 | 
            +
            - For Europe-specific region: `grpc-eu.kodypay.com`
         | 
| 176 107 |  | 
| 177 | 
            -
             | 
| 108 | 
            +
            ### Endpoints Configuration
         | 
| 178 109 |  | 
| 179 110 | 
             
            ```ruby
         | 
| 180 | 
            -
            #  | 
| 181 | 
            -
             | 
| 182 | 
            -
            #  | 
| 183 | 
            -
             | 
| 184 | 
            -
             | 
| 185 | 
            -
             | 
| 186 | 
            -
            #  | 
| 111 | 
            +
            # Production
         | 
| 112 | 
            +
            config.production!      # grpc.kodypay.com:443
         | 
| 113 | 
            +
            config.production_ap!   # grpc-ap.kodypay.com:443  
         | 
| 114 | 
            +
            config.production_eu!   # grpc-eu.kodypay.com:443
         | 
| 115 | 
            +
             | 
| 116 | 
            +
            # Staging  
         | 
| 117 | 
            +
            config.staging!         # grpc-staging.kodypay.com:443
         | 
| 118 | 
            +
            config.staging_ap!      # grpc-staging-ap.kodypay.com:443
         | 
| 119 | 
            +
            config.staging_eu!      # grpc-staging-eu.kodypay.com:443
         | 
| 187 120 | 
             
            ```
         | 
| 188 121 |  | 
| 189 | 
            -
            ## Sample code
         | 
| 190 | 
            -
             | 
| 191 | 
            -
            Complete examples can be found in the `samples/` directory:
         | 
| 192 | 
            -
             | 
| 193 | 
            -
            - [Initiate Payment](samples/ecom/initiate_payment.rb)
         | 
| 194 | 
            -
            - [Get Payments](samples/ecom/get_payments.rb)
         | 
| 195 | 
            -
             | 
| 196 122 | 
             
            ## Documentation
         | 
| 197 123 |  | 
| 198 124 | 
             
            For complete API documentation, examples, and integration guides, please visit:
         | 
| 199 125 | 
             
            š https://api-docs.kody.com
         | 
| 200 126 |  | 
| 201 | 
            -
            ##  | 
| 202 | 
            -
             | 
| 203 | 
            -
            This is a minimal initial version of the Ruby SDK focusing on the core payment initiation functionality. The SDK follows the same patterns as other Kody client SDKs and will be extended with additional features in future releases.
         | 
| 204 | 
            -
             | 
| 205 | 
            -
            ## Contributing
         | 
| 206 | 
            -
             | 
| 207 | 
            -
            Bug reports and pull requests are welcome on GitHub at https://github.com/KodyPay/kody-clientsdk-ruby.
         | 
| 208 | 
            -
             | 
| 209 | 
            -
            ## License
         | 
| 127 | 
            +
            ## Sample code
         | 
| 210 128 |  | 
| 211 | 
            -
             | 
| 129 | 
            +
            - Java: https://github.com/KodyPay/kody-clientsdk-java/tree/main/samples
         | 
| 130 | 
            +
            - Python: https://github.com/KodyPay/kody-clientsdk-python/tree/main/versions/3_12/samples
         | 
| 131 | 
            +
            - PHP: https://github.com/KodyPay/kody-clientsdk-php/tree/main/samples
         | 
| 132 | 
            +
            - .Net: https://github.com/KodyPay/kody-clientsdk-dotnet/tree/main/samples
         | 
| 133 | 
            +
            - Ruby: https://github.com/KodyPay/kody-clientsdk-ruby/tree/main/samples
         | 
    
        data/kody-clientsdk-ruby.gemspec
    CHANGED
    
    | @@ -13,7 +13,9 @@ Gem::Specification.new do |spec| | |
| 13 13 |  | 
| 14 14 | 
             
              spec.metadata["homepage_uri"] = spec.homepage
         | 
| 15 15 | 
             
              spec.metadata["source_code_uri"] = spec.homepage
         | 
| 16 | 
            -
              spec.metadata["changelog_uri"] = "#{spec.homepage}/ | 
| 16 | 
            +
              spec.metadata["changelog_uri"] = "#{spec.homepage}/releases"
         | 
| 17 | 
            +
              spec.metadata["documentation_uri"] = "https://api-docs.kody.com"
         | 
| 18 | 
            +
              spec.metadata["bug_tracker_uri"] = "#{spec.homepage}/issues"
         | 
| 17 19 |  | 
| 18 20 | 
             
              # Specify which files should be added to the gem when it is released.
         | 
| 19 21 | 
             
              spec.files = Dir.chdir(File.expand_path(__dir__)) do
         | 
    
        data/lib/ecom_pb.rb
    CHANGED
    
    | @@ -7,7 +7,7 @@ require 'google/protobuf' | |
| 7 7 | 
             
            require 'google/protobuf/timestamp_pb'
         | 
| 8 8 |  | 
| 9 9 |  | 
| 10 | 
            -
            descriptor_data = "\n#com/kodypay/grpc/ecom/v1/ecom.proto\x12\x18\x63om.kodypay.grpc.ecom.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe2\n\n\x18PaymentInitiationRequest\x12\x10\n\x08store_id\x18\x01 \x01(\t\x12\x19\n\x11payment_reference\x18\x02 \x01(\t\x12\x1a\n\x12\x61mount_minor_units\x18\x03 \x01(\x04\x12\x10\n\x08\x63urrency\x18\x04 \x01(\t\x12\x10\n\x08order_id\x18\x05 \x01(\t\x12\x1b\n\x0eorder_metadata\x18\x06 \x01(\tH\x00\x88\x01\x01\x12\x12\n\nreturn_url\x18\x07 \x01(\t\x12\x1c\n\x0fpayer_statement\x18\x08 \x01(\tH\x01\x88\x01\x01\x12 \n\x13payer_email_address\x18\t \x01(\tH\x02\x88\x01\x01\x12\x1d\n\x10payer_ip_address\x18\n \x01(\tH\x03\x88\x01\x01\x12\x19\n\x0cpayer_locale\x18\x0b \x01(\tH\x04\x88\x01\x01\x12\x1e\n\rtokenise_card\x18\x0c \x01(\x08\x42\x02\x18\x01H\x05\x88\x01\x01\x12V\n\x06\x65xpiry\x18\r \x01(\x0b\x32\x41.com.kodypay.grpc.ecom.v1.PaymentInitiationRequest.ExpirySettingsH\x06\x88\x01\x01\x12_\n\x0f\x63\x61pture_options\x18\x0e \x01(\x0b\x32\x41.com.kodypay.grpc.ecom.v1.PaymentInitiationRequest.CaptureOptionsH\x07\x88\x01\x01\x12$\n\x17is_pay_by_bank_accepted\x18\x0f \x01(\x08H\x08\x88\x01\x01\x1a>\n\x0e\x45xpirySettings\x12\x12\n\nshow_timer\x18\x01 \x01(\x08\x12\x18\n\x10\x65xpiring_seconds\x18\x02 \x01(\x04\x1a\xbc\x04\n\x0e\x43\x61ptureOptions\x12k\n\x10\x63\x61pture_settings\x18\x01 \x01(\x0b\x32Q.com.kodypay.grpc.ecom.v1.PaymentInitiationRequest.CaptureOptions.CaptureSettings\x12p\n\x10release_settings\x18\x02 \x01(\x0b\x32Q.com.kodypay.grpc.ecom.v1.PaymentInitiationRequest.CaptureOptions.ReleaseSettingsH\x00\x88\x01\x01\x1a\x99\x01\n\x0f\x43\x61ptureSettings\x12\x17\n\x0f\x64\x65layed_capture\x18\x01 \x01(\x08\x12\'\n\x1a\x61uto_capture_interval_mins\x18\x02 \x01(\x05H\x00\x88\x01\x01\x12%\n\x1d\x61uto_capture_store_close_time\x18\x03 \x01(\x08\x42\x1d\n\x1b_auto_capture_interval_mins\x1a\x99\x01\n\x0fReleaseSettings\x12\x17\n\x0f\x64\x65layed_release\x18\x01 \x01(\x08\x12\'\n\x1a\x61uto_release_interval_mins\x18\x02 \x01(\x05H\x00\x88\x01\x01\x12%\n\x1d\x61uto_release_store_close_time\x18\x03 \x01(\x08\x42\x1d\n\x1b_auto_release_interval_minsB\x13\n\x11_release_settingsB\x11\n\x0f_order_metadataB\x12\n\x10_payer_statementB\x16\n\x14_payer_email_addressB\x13\n\x11_payer_ip_addressB\x0f\n\r_payer_localeB\x10\n\x0e_tokenise_cardB\t\n\x07_expiryB\x12\n\x10_capture_optionsB\x1a\n\x18_is_pay_by_bank_accepted\"\xa2\x03\n\x19PaymentInitiationResponse\x12P\n\x08response\x18\x01 \x01(\x0b\x32<.com.kodypay.grpc.ecom.v1.PaymentInitiationResponse.ResponseH\x00\x12J\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x39.com.kodypay.grpc.ecom.v1.PaymentInitiationResponse.ErrorH\x00\x1a\x33\n\x08Response\x12\x12\n\npayment_id\x18\x01 \x01(\t\x12\x13\n\x0bpayment_url\x18\x02 \x01(\t\x1a\xa7\x01\n\x05\x45rror\x12L\n\x04type\x18\x01 \x01(\x0e\x32>.com.kodypay.grpc.ecom.v1.PaymentInitiationResponse.Error.Type\x12\x0f\n\x07message\x18\x02 \x01(\t\"?\n\x04Type\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x15\n\x11\x44UPLICATE_ATTEMPT\x10\x01\x12\x13\n\x0fINVALID_REQUEST\x10\x02\x42\x08\n\x06result\"r\n\x15PaymentDetailsRequest\x12\x10\n\x08store_id\x18\x01 \x01(\t\x12\x14\n\npayment_id\x18\x02 \x01(\tH\x00\x12\x1b\n\x11payment_reference\x18\x03 \x01(\tH\x00\x42\x14\n\x12payment_identifier\"\xe2\x0f\n\x16PaymentDetailsResponse\x12S\n\x08response\x18\x01 \x01(\x0b\x32?.com.kodypay.grpc.ecom.v1.PaymentDetailsResponse.PaymentDetailsH\x00\x12G\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x36.com.kodypay.grpc.ecom.v1.PaymentDetailsResponse.ErrorH\x00\x1a\xb3\x01\n\x05\x45rror\x12I\n\x04type\x18\x01 \x01(\x0e\x32;.com.kodypay.grpc.ecom.v1.PaymentDetailsResponse.Error.Type\x12\x0f\n\x07message\x18\x02 \x01(\t\"N\n\x04Type\x12\x0b\n\x07UNKNOWN\x10\x00\x12\r\n\tNOT_FOUND\x10\x01\x12\x13\n\x0fINVALID_REQUEST\x10\x02\x12\x15\n\x11\x44UPLICATE_ATTEMPT\x10\x03\x1a\xa9\x05\n\x0ePaymentDetails\x12\x12\n\npayment_id\x18\x01 \x01(\t\x12\x1d\n\x11payment_reference\x18\x02 \x01(\tB\x02\x18\x01\x12\x14\n\x08order_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x1f\n\x0eorder_metadata\x18\x04 \x01(\tB\x02\x18\x01H\x00\x88\x01\x01\x12\x37\n\x06status\x18\x05 \x01(\x0e\x32\'.com.kodypay.grpc.ecom.v1.PaymentStatus\x12\"\n\x11payment_data_json\x18\x06 \x01(\tB\x02\x18\x01H\x01\x88\x01\x01\x12\x30\n\x0c\x64\x61te_created\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x36\n\tdate_paid\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x02\x18\x01H\x02\x88\x01\x01\x12\x1e\n\rpsp_reference\x18\t \x01(\tB\x02\x18\x01H\x03\x88\x01\x01\x12\x1f\n\x0epayment_method\x18\n \x01(\tB\x02\x18\x01H\x04\x88\x01\x01\x12W\n\x0cpayment_data\x18\x0b \x01(\x0b\x32<.com.kodypay.grpc.ecom.v1.PaymentDetailsResponse.PaymentDataH\x05\x88\x01\x01\x12Q\n\tsale_data\x18\x0c \x01(\x0b\x32\x39.com.kodypay.grpc.ecom.v1.PaymentDetailsResponse.SaleDataH\x06\x88\x01\x01\x42\x11\n\x0f_order_metadataB\x14\n\x12_payment_data_jsonB\x0c\n\n_date_paidB\x10\n\x0e_psp_referenceB\x11\n\x0f_payment_methodB\x0f\n\r_payment_dataB\x0c\n\n_sale_data\x1a\xa5\x06\n\x0bPaymentData\x12\x15\n\rpsp_reference\x18\x01 \x01(\t\x12@\n\x0epayment_method\x18\x02 \x01(\x0e\x32(.com.kodypay.grpc.ecom.v1.PaymentMethods\x12\x1e\n\x16payment_method_variant\x18\x03 \x01(\t\x12\x63\n\x0b\x61uth_status\x18\x04 \x01(\x0e\x32N.com.kodypay.grpc.ecom.v1.PaymentDetailsResponse.PaymentData.PaymentAuthStatus\x12\x34\n\x10\x61uth_status_date\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12`\n\x0cpayment_card\x18\x06 \x01(\x0b\x32H.com.kodypay.grpc.ecom.v1.PaymentDetailsResponse.PaymentData.PaymentCardH\x00\x12\x64\n\x0epayment_wallet\x18\x07 \x01(\x0b\x32J.com.kodypay.grpc.ecom.v1.PaymentDetailsResponse.PaymentData.PaymentWalletH\x00\x1aW\n\x0bPaymentCard\x12\x1a\n\x12\x63\x61rd_last_4_digits\x18\x01 \x01(\t\x12\x11\n\tauth_code\x18\x02 \x01(\t\x12\x19\n\rpayment_token\x18\x03 \x01(\tB\x02\x18\x01\x1a`\n\rPaymentWallet\x12\x1f\n\x12\x63\x61rd_last_4_digits\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x17\n\x0fpayment_link_id\x18\x02 \x01(\tB\x15\n\x13_card_last_4_digits\"e\n\x11PaymentAuthStatus\x12\x0b\n\x07PENDING\x10\x00\x12\x0e\n\nAUTHORISED\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x12\x0c\n\x08\x43\x41PTURED\x10\x03\x12\x0c\n\x08RELEASED\x10\x04\x12\x0b\n\x07\x45XPIRED\x10\x05\x42\x18\n\x16payment_method_details\x1a\x95\x01\n\x08SaleData\x12\x1a\n\x12\x61mount_minor_units\x18\x01 \x01(\x04\x12\x10\n\x08\x63urrency\x18\x02 \x01(\t\x12\x10\n\x08order_id\x18\x03 \x01(\t\x12\x19\n\x11payment_reference\x18\x04 \x01(\t\x12\x1b\n\x0eorder_metadata\x18\x05 \x01(\tH\x00\x88\x01\x01\x42\x11\n\x0f_order_metadataB\x08\n\x06result\"\xe2\x02\n\x12GetPaymentsRequest\x12\x10\n\x08store_id\x18\x01 \x01(\t\x12L\n\x0bpage_cursor\x18\x02 \x01(\x0b\x32\x37.com.kodypay.grpc.ecom.v1.GetPaymentsRequest.PageCursor\x12\x43\n\x06\x66ilter\x18\x03 \x01(\x0b\x32\x33.com.kodypay.grpc.ecom.v1.GetPaymentsRequest.Filter\x1ax\n\x06\x46ilter\x12\x15\n\x08order_id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x37\n\x0e\x63reated_before\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x01\x88\x01\x01\x42\x0b\n\t_order_idB\x11\n\x0f_created_before\x1a-\n\nPageCursor\x12\x0c\n\x04page\x18\x01 \x01(\x03\x12\x11\n\tpage_size\x18\x02 \x01(\x03\"\xfe\x07\n\x13GetPaymentsResponse\x12J\n\x08response\x18\x01 \x01(\x0b\x32\x36.com.kodypay.grpc.ecom.v1.GetPaymentsResponse.ResponseH\x00\x12\x44\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x33.com.kodypay.grpc.ecom.v1.GetPaymentsResponse.ErrorH\x00\x1a\xad\x05\n\x08Response\x12p\n\x13\x64\x65precated_payments\x18\x01 \x03(\x0b\x32O.com.kodypay.grpc.ecom.v1.GetPaymentsResponse.Response.DeprecatedPaymentDetailsB\x02\x18\x01\x12\r\n\x05total\x18\x02 \x01(\x03\x12Q\n\x08payments\x18\x03 \x03(\x0b\x32?.com.kodypay.grpc.ecom.v1.PaymentDetailsResponse.PaymentDetails\x1a\xcc\x03\n\x18\x44\x65precatedPaymentDetails\x12\x12\n\npayment_id\x18\x01 \x01(\t\x12\x19\n\x11payment_reference\x18\x02 \x01(\t\x12\x10\n\x08order_id\x18\x03 \x01(\t\x12\x1b\n\x0eorder_metadata\x18\x04 \x01(\tH\x00\x88\x01\x01\x12\x37\n\x06status\x18\x05 \x01(\x0e\x32\'.com.kodypay.grpc.ecom.v1.PaymentStatus\x12\x1e\n\x11payment_data_json\x18\x06 \x01(\tH\x01\x88\x01\x01\x12\x30\n\x0c\x64\x61te_created\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x32\n\tdate_paid\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x02\x88\x01\x01\x12\x1a\n\rpsp_reference\x18\t \x01(\tH\x03\x88\x01\x01\x12\x1b\n\x0epayment_method\x18\n \x01(\tH\x04\x88\x01\x01\x42\x11\n\x0f_order_metadataB\x14\n\x12_payment_data_jsonB\x0c\n\n_date_paidB\x10\n\x0e_psp_referenceB\x11\n\x0f_payment_method\x1a\x9a\x01\n\x05\x45rror\x12\x46\n\x04type\x18\x01 \x01(\x0e\x32\x38.com.kodypay.grpc.ecom.v1.GetPaymentsResponse.Error.Type\x12\x0f\n\x07message\x18\x02 \x01(\t\"8\n\x04Type\x12\x0b\n\x07UNKNOWN\x10\x00\x12\r\n\tNOT_FOUND\x10\x01\x12\x14\n\x10INVALID_ARGUMENT\x10\x02\x42\x08\n\x06result\"f\n\rRefundRequest\x12\x10\n\x08store_id\x18\x01 \x01(\t\x12\x14\n\npayment_id\x18\x02 \x01(\tH\x00\x12\x17\n\rpsp_reference\x18\x04 \x01(\tH\x00\x12\x0e\n\x06\x61mount\x18\x03 \x01(\tB\x04\n\x02id\"\x97\x03\n\x0eRefundResponse\x12\x45\n\x06status\x18\x01 \x01(\x0e\x32\x35.com.kodypay.grpc.ecom.v1.RefundResponse.RefundStatus\x12\x1b\n\x0e\x66\x61ilure_reason\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x12\n\npayment_id\x18\x03 \x01(\t\x12\x30\n\x0c\x64\x61te_created\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x19\n\x11total_paid_amount\x18\x05 \x01(\t\x12\x1d\n\x15total_amount_refunded\x18\x06 \x01(\t\x12\x18\n\x10remaining_amount\x18\x07 \x01(\t\x12\x1e\n\x16total_amount_requested\x18\x08 \x01(\t\x12\x1c\n\x14paymentTransactionId\x18\t \x01(\t\"6\n\x0cRefundStatus\x12\x0b\n\x07PENDING\x10\x00\x12\r\n\tREQUESTED\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x42\x11\n\x0f_failure_reason\"\xe3\x03\n\x12\x43reateTokenRequest\x12\x10\n\x08store_id\x18\x01 \x01(\t\x12\x18\n\x10idempotency_uuid\x18\x02 \x01(\t\x12\x1c\n\x0ftoken_reference\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x17\n\x0fpayer_reference\x18\x04 \x01(\t\x12\x15\n\x08metadata\x18\x05 \x01(\tH\x01\x88\x01\x01\x12\x12\n\nreturn_url\x18\x06 \x01(\t\x12\x1c\n\x0fpayer_statement\x18\x07 \x01(\tH\x02\x88\x01\x01\x12 \n\x13payer_email_address\x18\x08 \x01(\tH\x03\x88\x01\x01\x12\x1f\n\x12payer_phone_number\x18\t \x01(\tH\x04\x88\x01\x01\x12[\n\x1arecurring_processing_model\x18\n \x01(\x0e\x32\x32.com.kodypay.grpc.ecom.v1.RecurringProcessingModelH\x05\x88\x01\x01\x42\x12\n\x10_token_referenceB\x0b\n\t_metadataB\x12\n\x10_payer_statementB\x16\n\x14_payer_email_addressB\x15\n\x13_payer_phone_numberB\x1d\n\x1b_recurring_processing_model\"\x8d\x03\n\x13\x43reateTokenResponse\x12J\n\x08response\x18\x01 \x01(\x0b\x32\x36.com.kodypay.grpc.ecom.v1.CreateTokenResponse.ResponseH\x00\x12\x44\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x33.com.kodypay.grpc.ecom.v1.CreateTokenResponse.ErrorH\x00\x1a\x36\n\x08Response\x12\x10\n\x08token_id\x18\x01 \x01(\t\x12\x18\n\x10\x63reate_token_url\x18\x02 \x01(\t\x1a\xa1\x01\n\x05\x45rror\x12\x46\n\x04type\x18\x01 \x01(\x0e\x32\x38.com.kodypay.grpc.ecom.v1.CreateTokenResponse.Error.Type\x12\x0f\n\x07message\x18\x02 \x01(\t\"?\n\x04Type\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x15\n\x11\x44UPLICATE_ATTEMPT\x10\x01\x12\x13\n\x0fINVALID_REQUEST\x10\x02\x42\x08\n\x06result\"j\n\x13GetCardTokenRequest\x12\x10\n\x08store_id\x18\x01 \x01(\t\x12\x12\n\x08token_id\x18\x02 \x01(\tH\x00\x12\x19\n\x0ftoken_reference\x18\x03 \x01(\tH\x00\x42\x12\n\x10token_identifier\"\x9d\x07\n\x14GetCardTokenResponse\x12K\n\x08response\x18\x01 \x01(\x0b\x32\x37.com.kodypay.grpc.ecom.v1.GetCardTokenResponse.ResponseH\x00\x12\x45\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x34.com.kodypay.grpc.ecom.v1.GetCardTokenResponse.ErrorH\x00\x1a\xec\x03\n\x08Response\x12\x10\n\x08token_id\x18\x01 \x01(\t\x12\x1c\n\x0ftoken_reference\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x15\n\rpayment_token\x18\x03 \x01(\t\x12\x17\n\x0fpayer_reference\x18\x04 \x01(\t\x12V\n\x1arecurring_processing_model\x18\x05 \x01(\x0e\x32\x32.com.kodypay.grpc.ecom.v1.RecurringProcessingModel\x12N\n\x06status\x18\x06 \x01(\x0e\x32>.com.kodypay.grpc.ecom.v1.GetCardTokenResponse.CardTokenStatus\x12.\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12@\n\x0epayment_method\x18\x08 \x01(\x0e\x32(.com.kodypay.grpc.ecom.v1.PaymentMethods\x12\x1e\n\x16payment_method_variant\x18\t \x01(\t\x12\x16\n\x0e\x66unding_source\x18\n \x01(\t\x12\x1a\n\x12\x63\x61rd_last_4_digits\x18\x0b \x01(\tB\x12\n\x10_token_reference\x1a\x9f\x01\n\x05\x45rror\x12G\n\x04type\x18\x01 \x01(\x0e\x32\x39.com.kodypay.grpc.ecom.v1.GetCardTokenResponse.Error.Type\x12\x0f\n\x07message\x18\x02 \x01(\t\"<\n\x04Type\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x12\n\x0ePENDING_CREATE\x10\x01\x12\x13\n\x0fINVALID_REQUEST\x10\x02\"V\n\x0f\x43\x61rdTokenStatus\x12\x0b\n\x07PENDING\x10\x00\x12\n\n\x06\x46\x41ILED\x10\x01\x12\t\n\x05READY\x10\x02\x12\x0b\n\x07\x44\x45LETED\x10\x03\x12\x12\n\x0ePENDING_DELETE\x10\x04\x42\x08\n\x06result\"m\n\x16\x44\x65leteCardTokenRequest\x12\x10\n\x08store_id\x18\x01 \x01(\t\x12\x12\n\x08token_id\x18\x02 \x01(\tH\x00\x12\x19\n\x0ftoken_reference\x18\x03 \x01(\tH\x00\x42\x12\n\x10token_identifier\"\xf5\x02\n\x17\x44\x65leteCardTokenResponse\x12N\n\x08response\x18\x01 \x01(\x0b\x32:.com.kodypay.grpc.ecom.v1.DeleteCardTokenResponse.ResponseH\x00\x12H\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x37.com.kodypay.grpc.ecom.v1.DeleteCardTokenResponse.ErrorH\x00\x1a\n\n\x08Response\x1a\xa9\x01\n\x05\x45rror\x12J\n\x04type\x18\x01 \x01(\x0e\x32<.com.kodypay.grpc.ecom.v1.DeleteCardTokenResponse.Error.Type\x12\x0f\n\x07message\x18\x02 \x01(\t\"C\n\x04Type\x12\x0b\n\x07UNKNOWN\x10\x00\x12\r\n\tNOT_FOUND\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x12\x13\n\x0fINVALID_REQUEST\x10\x03\x42\x08\n\x06result\"A\n\x14GetCardTokensRequest\x12\x10\n\x08store_id\x18\x01 \x01(\t\x12\x17\n\x0fpayer_reference\x18\x02 \x01(\t\"\x9b\x03\n\x15GetCardTokensResponse\x12L\n\x08response\x18\x01 \x01(\x0b\x32\x38.com.kodypay.grpc.ecom.v1.GetCardTokensResponse.ResponseH\x00\x12\x46\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x35.com.kodypay.grpc.ecom.v1.GetCardTokensResponse.ErrorH\x00\x1aS\n\x08Response\x12G\n\x06tokens\x18\x01 \x03(\x0b\x32\x37.com.kodypay.grpc.ecom.v1.GetCardTokenResponse.Response\x1a\x8c\x01\n\x05\x45rror\x12H\n\x04type\x18\x01 \x01(\x0e\x32:.com.kodypay.grpc.ecom.v1.GetCardTokensResponse.Error.Type\x12\x0f\n\x07message\x18\x02 \x01(\t\"(\n\x04Type\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x13\n\x0fINVALID_REQUEST\x10\x01\x42\x08\n\x06result\"\xa0\x03\n\x17PayWithCardTokenRequest\x12\x10\n\x08store_id\x18\x01 \x01(\t\x12\x18\n\x10idempotency_uuid\x18\x02 \x01(\t\x12\x15\n\rpayment_token\x18\x03 \x01(\t\x12\x1a\n\x12\x61mount_minor_units\x18\x04 \x01(\x04\x12\x10\n\x08\x63urrency\x18\x05 \x01(\t\x12\x19\n\x11payment_reference\x18\x06 \x01(\t\x12\x15\n\x08order_id\x18\x07 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0eorder_metadata\x18\x08 \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0fpayer_statement\x18\t \x01(\tH\x02\x88\x01\x01\x12_\n\x0f\x63\x61pture_options\x18\n \x01(\x0b\x32\x41.com.kodypay.grpc.ecom.v1.PaymentInitiationRequest.CaptureOptionsH\x03\x88\x01\x01\x42\x0b\n\t_order_idB\x11\n\x0f_order_metadataB\x12\n\x10_payer_statementB\x12\n\x10_capture_options*\xa2\x01\n\x0ePaymentMethods\x12\x08\n\x04VISA\x10\x00\x12\x0e\n\nMASTERCARD\x10\x01\x12\x08\n\x04\x41MEX\x10\x02\x12\x0f\n\x0b\x42\x41N_CONTACT\x10\x03\x12\x13\n\x0f\x43HINA_UNION_PAY\x10\x04\x12\x0b\n\x07MAESTRO\x10\x05\x12\n\n\x06\x44INERS\x10\x06\x12\x0c\n\x08\x44ISCOVER\x10\x07\x12\x07\n\x03JCB\x10\x08\x12\n\n\x06\x41LIPAY\x10\t\x12\n\n\x06WECHAT\x10\n*Q\n\rPaymentStatus\x12\x0b\n\x07PENDING\x10\x00\x12\x0b\n\x07SUCCESS\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x12\r\n\tCANCELLED\x10\x03\x12\x0b\n\x07\x45XPIRED\x10\x04*s\n\x18RecurringProcessingModel\x12\x15\n\x11MODEL_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x43\x41RD_ON_FILE\x10\x01\x12\x10\n\x0cSUBSCRIPTION\x10\x02\x12\x1c\n\x18UNSCHEDULED_CARD_ON_FILE\x10\x03\x32\x92\x0b\n\x17KodyEcomPaymentsService\x12z\n\x0fInitiatePayment\x12\x32.com.kodypay.grpc.ecom.v1.PaymentInitiationRequest\x1a\x33.com.kodypay.grpc.ecom.v1.PaymentInitiationResponse\x12\x7f\n\x15InitiatePaymentStream\x12\x32.com.kodypay.grpc.ecom.v1.PaymentInitiationRequest\x1a\x30.com.kodypay.grpc.ecom.v1.PaymentDetailsResponse0\x01\x12s\n\x0ePaymentDetails\x12/.com.kodypay.grpc.ecom.v1.PaymentDetailsRequest\x1a\x30.com.kodypay.grpc.ecom.v1.PaymentDetailsResponse\x12{\n\x14PaymentDetailsStream\x12/.com.kodypay.grpc.ecom.v1.PaymentDetailsRequest\x1a\x30.com.kodypay.grpc.ecom.v1.PaymentDetailsResponse0\x01\x12j\n\x0bGetPayments\x12,.com.kodypay.grpc.ecom.v1.GetPaymentsRequest\x1a-.com.kodypay.grpc.ecom.v1.GetPaymentsResponse\x12]\n\x06Refund\x12\'.com.kodypay.grpc.ecom.v1.RefundRequest\x1a(.com.kodypay.grpc.ecom.v1.RefundResponse0\x01\x12n\n\x0f\x43reateCardToken\x12,.com.kodypay.grpc.ecom.v1.CreateTokenRequest\x1a-.com.kodypay.grpc.ecom.v1.CreateTokenResponse\x12m\n\x0cGetCardToken\x12-.com.kodypay.grpc.ecom.v1.GetCardTokenRequest\x1a..com.kodypay.grpc.ecom.v1.GetCardTokenResponse\x12v\n\x0f\x44\x65leteCardToken\x12\x30.com.kodypay.grpc.ecom.v1.DeleteCardTokenRequest\x1a\x31.com.kodypay.grpc.ecom.v1.DeleteCardTokenResponse\x12p\n\rGetCardTokens\x12..com.kodypay.grpc.ecom.v1.GetCardTokensRequest\x1a/.com.kodypay.grpc.ecom.v1.GetCardTokensResponse\x12w\n\x10PayWithCardToken\x12\x31.com.kodypay.grpc.ecom.v1.PayWithCardTokenRequest\x1a\x30.com.kodypay.grpc.ecom.v1.PaymentDetailsResponse\x12{\n\x16GetTokenPaymentDetails\x12/.com.kodypay.grpc.ecom.v1.PaymentDetailsRequest\x1a\x30.com.kodypay.grpc.ecom.v1.PaymentDetailsResponseB3\n\x18\x63om.kodypay.grpc.ecom.v1B\x15KodyEcomPaymentsProtoP\x01\x62\x06proto3"
         | 
| 10 | 
            +
            descriptor_data = "\n#com/kodypay/grpc/ecom/v1/ecom.proto\x12\x18\x63om.kodypay.grpc.ecom.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa2\x0b\n\x18PaymentInitiationRequest\x12\x10\n\x08store_id\x18\x01 \x01(\t\x12\x19\n\x11payment_reference\x18\x02 \x01(\t\x12\x1a\n\x12\x61mount_minor_units\x18\x03 \x01(\x04\x12\x10\n\x08\x63urrency\x18\x04 \x01(\t\x12\x10\n\x08order_id\x18\x05 \x01(\t\x12\x1b\n\x0eorder_metadata\x18\x06 \x01(\tH\x00\x88\x01\x01\x12\x12\n\nreturn_url\x18\x07 \x01(\t\x12\x1c\n\x0fpayer_statement\x18\x08 \x01(\tH\x01\x88\x01\x01\x12 \n\x13payer_email_address\x18\t \x01(\tH\x02\x88\x01\x01\x12\x1d\n\x10payer_ip_address\x18\n \x01(\tH\x03\x88\x01\x01\x12\x19\n\x0cpayer_locale\x18\x0b \x01(\tH\x04\x88\x01\x01\x12\x1e\n\rtokenise_card\x18\x0c \x01(\x08\x42\x02\x18\x01H\x05\x88\x01\x01\x12V\n\x06\x65xpiry\x18\r \x01(\x0b\x32\x41.com.kodypay.grpc.ecom.v1.PaymentInitiationRequest.ExpirySettingsH\x06\x88\x01\x01\x12_\n\x0f\x63\x61pture_options\x18\x0e \x01(\x0b\x32\x41.com.kodypay.grpc.ecom.v1.PaymentInitiationRequest.CaptureOptionsH\x07\x88\x01\x01\x12$\n\x17is_pay_by_bank_accepted\x18\x0f \x01(\x08H\x08\x88\x01\x01\x12>\n\x0c\x61\x63\x63\x65pts_only\x18\x10 \x03(\x0e\x32(.com.kodypay.grpc.ecom.v1.PaymentMethods\x1a>\n\x0e\x45xpirySettings\x12\x12\n\nshow_timer\x18\x01 \x01(\x08\x12\x18\n\x10\x65xpiring_seconds\x18\x02 \x01(\x04\x1a\xbc\x04\n\x0e\x43\x61ptureOptions\x12k\n\x10\x63\x61pture_settings\x18\x01 \x01(\x0b\x32Q.com.kodypay.grpc.ecom.v1.PaymentInitiationRequest.CaptureOptions.CaptureSettings\x12p\n\x10release_settings\x18\x02 \x01(\x0b\x32Q.com.kodypay.grpc.ecom.v1.PaymentInitiationRequest.CaptureOptions.ReleaseSettingsH\x00\x88\x01\x01\x1a\x99\x01\n\x0f\x43\x61ptureSettings\x12\x17\n\x0f\x64\x65layed_capture\x18\x01 \x01(\x08\x12\'\n\x1a\x61uto_capture_interval_mins\x18\x02 \x01(\x05H\x00\x88\x01\x01\x12%\n\x1d\x61uto_capture_store_close_time\x18\x03 \x01(\x08\x42\x1d\n\x1b_auto_capture_interval_mins\x1a\x99\x01\n\x0fReleaseSettings\x12\x17\n\x0f\x64\x65layed_release\x18\x01 \x01(\x08\x12\'\n\x1a\x61uto_release_interval_mins\x18\x02 \x01(\x05H\x00\x88\x01\x01\x12%\n\x1d\x61uto_release_store_close_time\x18\x03 \x01(\x08\x42\x1d\n\x1b_auto_release_interval_minsB\x13\n\x11_release_settingsB\x11\n\x0f_order_metadataB\x12\n\x10_payer_statementB\x16\n\x14_payer_email_addressB\x13\n\x11_payer_ip_addressB\x0f\n\r_payer_localeB\x10\n\x0e_tokenise_cardB\t\n\x07_expiryB\x12\n\x10_capture_optionsB\x1a\n\x18_is_pay_by_bank_accepted\"\xa2\x03\n\x19PaymentInitiationResponse\x12P\n\x08response\x18\x01 \x01(\x0b\x32<.com.kodypay.grpc.ecom.v1.PaymentInitiationResponse.ResponseH\x00\x12J\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x39.com.kodypay.grpc.ecom.v1.PaymentInitiationResponse.ErrorH\x00\x1a\x33\n\x08Response\x12\x12\n\npayment_id\x18\x01 \x01(\t\x12\x13\n\x0bpayment_url\x18\x02 \x01(\t\x1a\xa7\x01\n\x05\x45rror\x12L\n\x04type\x18\x01 \x01(\x0e\x32>.com.kodypay.grpc.ecom.v1.PaymentInitiationResponse.Error.Type\x12\x0f\n\x07message\x18\x02 \x01(\t\"?\n\x04Type\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x15\n\x11\x44UPLICATE_ATTEMPT\x10\x01\x12\x13\n\x0fINVALID_REQUEST\x10\x02\x42\x08\n\x06result\"r\n\x15PaymentDetailsRequest\x12\x10\n\x08store_id\x18\x01 \x01(\t\x12\x14\n\npayment_id\x18\x02 \x01(\tH\x00\x12\x1b\n\x11payment_reference\x18\x03 \x01(\tH\x00\x42\x14\n\x12payment_identifier\"\xe2\x0f\n\x16PaymentDetailsResponse\x12S\n\x08response\x18\x01 \x01(\x0b\x32?.com.kodypay.grpc.ecom.v1.PaymentDetailsResponse.PaymentDetailsH\x00\x12G\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x36.com.kodypay.grpc.ecom.v1.PaymentDetailsResponse.ErrorH\x00\x1a\xb3\x01\n\x05\x45rror\x12I\n\x04type\x18\x01 \x01(\x0e\x32;.com.kodypay.grpc.ecom.v1.PaymentDetailsResponse.Error.Type\x12\x0f\n\x07message\x18\x02 \x01(\t\"N\n\x04Type\x12\x0b\n\x07UNKNOWN\x10\x00\x12\r\n\tNOT_FOUND\x10\x01\x12\x13\n\x0fINVALID_REQUEST\x10\x02\x12\x15\n\x11\x44UPLICATE_ATTEMPT\x10\x03\x1a\xa9\x05\n\x0ePaymentDetails\x12\x12\n\npayment_id\x18\x01 \x01(\t\x12\x1d\n\x11payment_reference\x18\x02 \x01(\tB\x02\x18\x01\x12\x14\n\x08order_id\x18\x03 \x01(\tB\x02\x18\x01\x12\x1f\n\x0eorder_metadata\x18\x04 \x01(\tB\x02\x18\x01H\x00\x88\x01\x01\x12\x37\n\x06status\x18\x05 \x01(\x0e\x32\'.com.kodypay.grpc.ecom.v1.PaymentStatus\x12\"\n\x11payment_data_json\x18\x06 \x01(\tB\x02\x18\x01H\x01\x88\x01\x01\x12\x30\n\x0c\x64\x61te_created\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x36\n\tdate_paid\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x02\x18\x01H\x02\x88\x01\x01\x12\x1e\n\rpsp_reference\x18\t \x01(\tB\x02\x18\x01H\x03\x88\x01\x01\x12\x1f\n\x0epayment_method\x18\n \x01(\tB\x02\x18\x01H\x04\x88\x01\x01\x12W\n\x0cpayment_data\x18\x0b \x01(\x0b\x32<.com.kodypay.grpc.ecom.v1.PaymentDetailsResponse.PaymentDataH\x05\x88\x01\x01\x12Q\n\tsale_data\x18\x0c \x01(\x0b\x32\x39.com.kodypay.grpc.ecom.v1.PaymentDetailsResponse.SaleDataH\x06\x88\x01\x01\x42\x11\n\x0f_order_metadataB\x14\n\x12_payment_data_jsonB\x0c\n\n_date_paidB\x10\n\x0e_psp_referenceB\x11\n\x0f_payment_methodB\x0f\n\r_payment_dataB\x0c\n\n_sale_data\x1a\xa5\x06\n\x0bPaymentData\x12\x15\n\rpsp_reference\x18\x01 \x01(\t\x12@\n\x0epayment_method\x18\x02 \x01(\x0e\x32(.com.kodypay.grpc.ecom.v1.PaymentMethods\x12\x1e\n\x16payment_method_variant\x18\x03 \x01(\t\x12\x63\n\x0b\x61uth_status\x18\x04 \x01(\x0e\x32N.com.kodypay.grpc.ecom.v1.PaymentDetailsResponse.PaymentData.PaymentAuthStatus\x12\x34\n\x10\x61uth_status_date\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12`\n\x0cpayment_card\x18\x06 \x01(\x0b\x32H.com.kodypay.grpc.ecom.v1.PaymentDetailsResponse.PaymentData.PaymentCardH\x00\x12\x64\n\x0epayment_wallet\x18\x07 \x01(\x0b\x32J.com.kodypay.grpc.ecom.v1.PaymentDetailsResponse.PaymentData.PaymentWalletH\x00\x1aW\n\x0bPaymentCard\x12\x1a\n\x12\x63\x61rd_last_4_digits\x18\x01 \x01(\t\x12\x11\n\tauth_code\x18\x02 \x01(\t\x12\x19\n\rpayment_token\x18\x03 \x01(\tB\x02\x18\x01\x1a`\n\rPaymentWallet\x12\x1f\n\x12\x63\x61rd_last_4_digits\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x17\n\x0fpayment_link_id\x18\x02 \x01(\tB\x15\n\x13_card_last_4_digits\"e\n\x11PaymentAuthStatus\x12\x0b\n\x07PENDING\x10\x00\x12\x0e\n\nAUTHORISED\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x12\x0c\n\x08\x43\x41PTURED\x10\x03\x12\x0c\n\x08RELEASED\x10\x04\x12\x0b\n\x07\x45XPIRED\x10\x05\x42\x18\n\x16payment_method_details\x1a\x95\x01\n\x08SaleData\x12\x1a\n\x12\x61mount_minor_units\x18\x01 \x01(\x04\x12\x10\n\x08\x63urrency\x18\x02 \x01(\t\x12\x10\n\x08order_id\x18\x03 \x01(\t\x12\x19\n\x11payment_reference\x18\x04 \x01(\t\x12\x1b\n\x0eorder_metadata\x18\x05 \x01(\tH\x00\x88\x01\x01\x42\x11\n\x0f_order_metadataB\x08\n\x06result\"\xe2\x02\n\x12GetPaymentsRequest\x12\x10\n\x08store_id\x18\x01 \x01(\t\x12L\n\x0bpage_cursor\x18\x02 \x01(\x0b\x32\x37.com.kodypay.grpc.ecom.v1.GetPaymentsRequest.PageCursor\x12\x43\n\x06\x66ilter\x18\x03 \x01(\x0b\x32\x33.com.kodypay.grpc.ecom.v1.GetPaymentsRequest.Filter\x1ax\n\x06\x46ilter\x12\x15\n\x08order_id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x37\n\x0e\x63reated_before\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x01\x88\x01\x01\x42\x0b\n\t_order_idB\x11\n\x0f_created_before\x1a-\n\nPageCursor\x12\x0c\n\x04page\x18\x01 \x01(\x03\x12\x11\n\tpage_size\x18\x02 \x01(\x03\"\xfe\x07\n\x13GetPaymentsResponse\x12J\n\x08response\x18\x01 \x01(\x0b\x32\x36.com.kodypay.grpc.ecom.v1.GetPaymentsResponse.ResponseH\x00\x12\x44\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x33.com.kodypay.grpc.ecom.v1.GetPaymentsResponse.ErrorH\x00\x1a\xad\x05\n\x08Response\x12p\n\x13\x64\x65precated_payments\x18\x01 \x03(\x0b\x32O.com.kodypay.grpc.ecom.v1.GetPaymentsResponse.Response.DeprecatedPaymentDetailsB\x02\x18\x01\x12\r\n\x05total\x18\x02 \x01(\x03\x12Q\n\x08payments\x18\x03 \x03(\x0b\x32?.com.kodypay.grpc.ecom.v1.PaymentDetailsResponse.PaymentDetails\x1a\xcc\x03\n\x18\x44\x65precatedPaymentDetails\x12\x12\n\npayment_id\x18\x01 \x01(\t\x12\x19\n\x11payment_reference\x18\x02 \x01(\t\x12\x10\n\x08order_id\x18\x03 \x01(\t\x12\x1b\n\x0eorder_metadata\x18\x04 \x01(\tH\x00\x88\x01\x01\x12\x37\n\x06status\x18\x05 \x01(\x0e\x32\'.com.kodypay.grpc.ecom.v1.PaymentStatus\x12\x1e\n\x11payment_data_json\x18\x06 \x01(\tH\x01\x88\x01\x01\x12\x30\n\x0c\x64\x61te_created\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x32\n\tdate_paid\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x02\x88\x01\x01\x12\x1a\n\rpsp_reference\x18\t \x01(\tH\x03\x88\x01\x01\x12\x1b\n\x0epayment_method\x18\n \x01(\tH\x04\x88\x01\x01\x42\x11\n\x0f_order_metadataB\x14\n\x12_payment_data_jsonB\x0c\n\n_date_paidB\x10\n\x0e_psp_referenceB\x11\n\x0f_payment_method\x1a\x9a\x01\n\x05\x45rror\x12\x46\n\x04type\x18\x01 \x01(\x0e\x32\x38.com.kodypay.grpc.ecom.v1.GetPaymentsResponse.Error.Type\x12\x0f\n\x07message\x18\x02 \x01(\t\"8\n\x04Type\x12\x0b\n\x07UNKNOWN\x10\x00\x12\r\n\tNOT_FOUND\x10\x01\x12\x14\n\x10INVALID_ARGUMENT\x10\x02\x42\x08\n\x06result\"f\n\rRefundRequest\x12\x10\n\x08store_id\x18\x01 \x01(\t\x12\x14\n\npayment_id\x18\x02 \x01(\tH\x00\x12\x17\n\rpsp_reference\x18\x04 \x01(\tH\x00\x12\x0e\n\x06\x61mount\x18\x03 \x01(\tB\x04\n\x02id\"\x97\x03\n\x0eRefundResponse\x12\x45\n\x06status\x18\x01 \x01(\x0e\x32\x35.com.kodypay.grpc.ecom.v1.RefundResponse.RefundStatus\x12\x1b\n\x0e\x66\x61ilure_reason\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x12\n\npayment_id\x18\x03 \x01(\t\x12\x30\n\x0c\x64\x61te_created\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x19\n\x11total_paid_amount\x18\x05 \x01(\t\x12\x1d\n\x15total_amount_refunded\x18\x06 \x01(\t\x12\x18\n\x10remaining_amount\x18\x07 \x01(\t\x12\x1e\n\x16total_amount_requested\x18\x08 \x01(\t\x12\x1c\n\x14paymentTransactionId\x18\t \x01(\t\"6\n\x0cRefundStatus\x12\x0b\n\x07PENDING\x10\x00\x12\r\n\tREQUESTED\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x42\x11\n\x0f_failure_reason\"\xe3\x03\n\x12\x43reateTokenRequest\x12\x10\n\x08store_id\x18\x01 \x01(\t\x12\x18\n\x10idempotency_uuid\x18\x02 \x01(\t\x12\x1c\n\x0ftoken_reference\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x17\n\x0fpayer_reference\x18\x04 \x01(\t\x12\x15\n\x08metadata\x18\x05 \x01(\tH\x01\x88\x01\x01\x12\x12\n\nreturn_url\x18\x06 \x01(\t\x12\x1c\n\x0fpayer_statement\x18\x07 \x01(\tH\x02\x88\x01\x01\x12 \n\x13payer_email_address\x18\x08 \x01(\tH\x03\x88\x01\x01\x12\x1f\n\x12payer_phone_number\x18\t \x01(\tH\x04\x88\x01\x01\x12[\n\x1arecurring_processing_model\x18\n \x01(\x0e\x32\x32.com.kodypay.grpc.ecom.v1.RecurringProcessingModelH\x05\x88\x01\x01\x42\x12\n\x10_token_referenceB\x0b\n\t_metadataB\x12\n\x10_payer_statementB\x16\n\x14_payer_email_addressB\x15\n\x13_payer_phone_numberB\x1d\n\x1b_recurring_processing_model\"\x8d\x03\n\x13\x43reateTokenResponse\x12J\n\x08response\x18\x01 \x01(\x0b\x32\x36.com.kodypay.grpc.ecom.v1.CreateTokenResponse.ResponseH\x00\x12\x44\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x33.com.kodypay.grpc.ecom.v1.CreateTokenResponse.ErrorH\x00\x1a\x36\n\x08Response\x12\x10\n\x08token_id\x18\x01 \x01(\t\x12\x18\n\x10\x63reate_token_url\x18\x02 \x01(\t\x1a\xa1\x01\n\x05\x45rror\x12\x46\n\x04type\x18\x01 \x01(\x0e\x32\x38.com.kodypay.grpc.ecom.v1.CreateTokenResponse.Error.Type\x12\x0f\n\x07message\x18\x02 \x01(\t\"?\n\x04Type\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x15\n\x11\x44UPLICATE_ATTEMPT\x10\x01\x12\x13\n\x0fINVALID_REQUEST\x10\x02\x42\x08\n\x06result\"j\n\x13GetCardTokenRequest\x12\x10\n\x08store_id\x18\x01 \x01(\t\x12\x12\n\x08token_id\x18\x02 \x01(\tH\x00\x12\x19\n\x0ftoken_reference\x18\x03 \x01(\tH\x00\x42\x12\n\x10token_identifier\"\x9d\x07\n\x14GetCardTokenResponse\x12K\n\x08response\x18\x01 \x01(\x0b\x32\x37.com.kodypay.grpc.ecom.v1.GetCardTokenResponse.ResponseH\x00\x12\x45\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x34.com.kodypay.grpc.ecom.v1.GetCardTokenResponse.ErrorH\x00\x1a\xec\x03\n\x08Response\x12\x10\n\x08token_id\x18\x01 \x01(\t\x12\x1c\n\x0ftoken_reference\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x15\n\rpayment_token\x18\x03 \x01(\t\x12\x17\n\x0fpayer_reference\x18\x04 \x01(\t\x12V\n\x1arecurring_processing_model\x18\x05 \x01(\x0e\x32\x32.com.kodypay.grpc.ecom.v1.RecurringProcessingModel\x12N\n\x06status\x18\x06 \x01(\x0e\x32>.com.kodypay.grpc.ecom.v1.GetCardTokenResponse.CardTokenStatus\x12.\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12@\n\x0epayment_method\x18\x08 \x01(\x0e\x32(.com.kodypay.grpc.ecom.v1.PaymentMethods\x12\x1e\n\x16payment_method_variant\x18\t \x01(\t\x12\x16\n\x0e\x66unding_source\x18\n \x01(\t\x12\x1a\n\x12\x63\x61rd_last_4_digits\x18\x0b \x01(\tB\x12\n\x10_token_reference\x1a\x9f\x01\n\x05\x45rror\x12G\n\x04type\x18\x01 \x01(\x0e\x32\x39.com.kodypay.grpc.ecom.v1.GetCardTokenResponse.Error.Type\x12\x0f\n\x07message\x18\x02 \x01(\t\"<\n\x04Type\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x12\n\x0ePENDING_CREATE\x10\x01\x12\x13\n\x0fINVALID_REQUEST\x10\x02\"V\n\x0f\x43\x61rdTokenStatus\x12\x0b\n\x07PENDING\x10\x00\x12\n\n\x06\x46\x41ILED\x10\x01\x12\t\n\x05READY\x10\x02\x12\x0b\n\x07\x44\x45LETED\x10\x03\x12\x12\n\x0ePENDING_DELETE\x10\x04\x42\x08\n\x06result\"m\n\x16\x44\x65leteCardTokenRequest\x12\x10\n\x08store_id\x18\x01 \x01(\t\x12\x12\n\x08token_id\x18\x02 \x01(\tH\x00\x12\x19\n\x0ftoken_reference\x18\x03 \x01(\tH\x00\x42\x12\n\x10token_identifier\"\xf5\x02\n\x17\x44\x65leteCardTokenResponse\x12N\n\x08response\x18\x01 \x01(\x0b\x32:.com.kodypay.grpc.ecom.v1.DeleteCardTokenResponse.ResponseH\x00\x12H\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x37.com.kodypay.grpc.ecom.v1.DeleteCardTokenResponse.ErrorH\x00\x1a\n\n\x08Response\x1a\xa9\x01\n\x05\x45rror\x12J\n\x04type\x18\x01 \x01(\x0e\x32<.com.kodypay.grpc.ecom.v1.DeleteCardTokenResponse.Error.Type\x12\x0f\n\x07message\x18\x02 \x01(\t\"C\n\x04Type\x12\x0b\n\x07UNKNOWN\x10\x00\x12\r\n\tNOT_FOUND\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x12\x13\n\x0fINVALID_REQUEST\x10\x03\x42\x08\n\x06result\"A\n\x14GetCardTokensRequest\x12\x10\n\x08store_id\x18\x01 \x01(\t\x12\x17\n\x0fpayer_reference\x18\x02 \x01(\t\"\x9b\x03\n\x15GetCardTokensResponse\x12L\n\x08response\x18\x01 \x01(\x0b\x32\x38.com.kodypay.grpc.ecom.v1.GetCardTokensResponse.ResponseH\x00\x12\x46\n\x05\x65rror\x18\x02 \x01(\x0b\x32\x35.com.kodypay.grpc.ecom.v1.GetCardTokensResponse.ErrorH\x00\x1aS\n\x08Response\x12G\n\x06tokens\x18\x01 \x03(\x0b\x32\x37.com.kodypay.grpc.ecom.v1.GetCardTokenResponse.Response\x1a\x8c\x01\n\x05\x45rror\x12H\n\x04type\x18\x01 \x01(\x0e\x32:.com.kodypay.grpc.ecom.v1.GetCardTokensResponse.Error.Type\x12\x0f\n\x07message\x18\x02 \x01(\t\"(\n\x04Type\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x13\n\x0fINVALID_REQUEST\x10\x01\x42\x08\n\x06result\"\xa0\x03\n\x17PayWithCardTokenRequest\x12\x10\n\x08store_id\x18\x01 \x01(\t\x12\x18\n\x10idempotency_uuid\x18\x02 \x01(\t\x12\x15\n\rpayment_token\x18\x03 \x01(\t\x12\x1a\n\x12\x61mount_minor_units\x18\x04 \x01(\x04\x12\x10\n\x08\x63urrency\x18\x05 \x01(\t\x12\x19\n\x11payment_reference\x18\x06 \x01(\t\x12\x15\n\x08order_id\x18\x07 \x01(\tH\x00\x88\x01\x01\x12\x1b\n\x0eorder_metadata\x18\x08 \x01(\tH\x01\x88\x01\x01\x12\x1c\n\x0fpayer_statement\x18\t \x01(\tH\x02\x88\x01\x01\x12_\n\x0f\x63\x61pture_options\x18\n \x01(\x0b\x32\x41.com.kodypay.grpc.ecom.v1.PaymentInitiationRequest.CaptureOptionsH\x03\x88\x01\x01\x42\x0b\n\t_order_idB\x11\n\x0f_order_metadataB\x12\n\x10_payer_statementB\x12\n\x10_capture_options*\xc1\x01\n\x0ePaymentMethods\x12\x08\n\x04VISA\x10\x00\x12\x0e\n\nMASTERCARD\x10\x01\x12\x08\n\x04\x41MEX\x10\x02\x12\x0f\n\x0b\x42\x41N_CONTACT\x10\x03\x12\x13\n\x0f\x43HINA_UNION_PAY\x10\x04\x12\x0b\n\x07MAESTRO\x10\x05\x12\n\n\x06\x44INERS\x10\x06\x12\x0c\n\x08\x44ISCOVER\x10\x07\x12\x07\n\x03JCB\x10\x08\x12\n\n\x06\x41LIPAY\x10\t\x12\n\n\x06WECHAT\x10\n\x12\r\n\tAPPLE_PAY\x10\x0b\x12\x0e\n\nGOOGLE_PAY\x10\x0c*Q\n\rPaymentStatus\x12\x0b\n\x07PENDING\x10\x00\x12\x0b\n\x07SUCCESS\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x12\r\n\tCANCELLED\x10\x03\x12\x0b\n\x07\x45XPIRED\x10\x04*s\n\x18RecurringProcessingModel\x12\x15\n\x11MODEL_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x43\x41RD_ON_FILE\x10\x01\x12\x10\n\x0cSUBSCRIPTION\x10\x02\x12\x1c\n\x18UNSCHEDULED_CARD_ON_FILE\x10\x03\x32\x92\x0b\n\x17KodyEcomPaymentsService\x12z\n\x0fInitiatePayment\x12\x32.com.kodypay.grpc.ecom.v1.PaymentInitiationRequest\x1a\x33.com.kodypay.grpc.ecom.v1.PaymentInitiationResponse\x12\x7f\n\x15InitiatePaymentStream\x12\x32.com.kodypay.grpc.ecom.v1.PaymentInitiationRequest\x1a\x30.com.kodypay.grpc.ecom.v1.PaymentDetailsResponse0\x01\x12s\n\x0ePaymentDetails\x12/.com.kodypay.grpc.ecom.v1.PaymentDetailsRequest\x1a\x30.com.kodypay.grpc.ecom.v1.PaymentDetailsResponse\x12{\n\x14PaymentDetailsStream\x12/.com.kodypay.grpc.ecom.v1.PaymentDetailsRequest\x1a\x30.com.kodypay.grpc.ecom.v1.PaymentDetailsResponse0\x01\x12j\n\x0bGetPayments\x12,.com.kodypay.grpc.ecom.v1.GetPaymentsRequest\x1a-.com.kodypay.grpc.ecom.v1.GetPaymentsResponse\x12]\n\x06Refund\x12\'.com.kodypay.grpc.ecom.v1.RefundRequest\x1a(.com.kodypay.grpc.ecom.v1.RefundResponse0\x01\x12n\n\x0f\x43reateCardToken\x12,.com.kodypay.grpc.ecom.v1.CreateTokenRequest\x1a-.com.kodypay.grpc.ecom.v1.CreateTokenResponse\x12m\n\x0cGetCardToken\x12-.com.kodypay.grpc.ecom.v1.GetCardTokenRequest\x1a..com.kodypay.grpc.ecom.v1.GetCardTokenResponse\x12v\n\x0f\x44\x65leteCardToken\x12\x30.com.kodypay.grpc.ecom.v1.DeleteCardTokenRequest\x1a\x31.com.kodypay.grpc.ecom.v1.DeleteCardTokenResponse\x12p\n\rGetCardTokens\x12..com.kodypay.grpc.ecom.v1.GetCardTokensRequest\x1a/.com.kodypay.grpc.ecom.v1.GetCardTokensResponse\x12w\n\x10PayWithCardToken\x12\x31.com.kodypay.grpc.ecom.v1.PayWithCardTokenRequest\x1a\x30.com.kodypay.grpc.ecom.v1.PaymentDetailsResponse\x12{\n\x16GetTokenPaymentDetails\x12/.com.kodypay.grpc.ecom.v1.PaymentDetailsRequest\x1a\x30.com.kodypay.grpc.ecom.v1.PaymentDetailsResponseB3\n\x18\x63om.kodypay.grpc.ecom.v1B\x15KodyEcomPaymentsProtoP\x01\x62\x06proto3"
         | 
| 11 11 |  | 
| 12 12 | 
             
            pool = ::Google::Protobuf::DescriptorPool.generated_pool
         | 
| 13 13 | 
             
            pool.add_serialized_file(descriptor_data)
         | 
    
        data/lib/enums_pb.rb
    ADDED
    
    | @@ -0,0 +1,23 @@ | |
| 1 | 
            +
            # frozen_string_literal: true
         | 
| 2 | 
            +
            # Generated by the protocol buffer compiler.  DO NOT EDIT!
         | 
| 3 | 
            +
            # source: com/kodypay/grpc/common/enums.proto
         | 
| 4 | 
            +
             | 
| 5 | 
            +
            require 'google/protobuf'
         | 
| 6 | 
            +
             | 
| 7 | 
            +
             | 
| 8 | 
            +
            descriptor_data = "\n#com/kodypay/grpc/common/enums.proto\x12\x17\x63om.kodypay.grpc.common*\xbf\x01\n\x0ePaymentMethods\x12\x08\n\x04VISA\x10\x00\x12\x0e\n\nMASTERCARD\x10\x01\x12\x08\n\x04\x41MEX\x10\x02\x12\x0f\n\x0b\x42\x41N_CONTACT\x10\x03\x12\x13\n\x0f\x43HINA_UNION_PAY\x10\x04\x12\x0b\n\x07MAESTRO\x10\x05\x12\n\n\x06\x44INERS\x10\x06\x12\x0c\n\x08\x44ISCOVER\x10\x07\x12\x07\n\x03JCB\x10\x08\x12\n\n\x06\x41LIPAY\x10\t\x12\n\n\x06WECHAT\x10\n\x12\x1b\n\x0eUNKNOWN_METHOD\x10\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01*s\n\x18RecurringProcessingModel\x12\x15\n\x11MODEL_UNSPECIFIED\x10\x00\x12\x10\n\x0c\x43\x41RD_ON_FILE\x10\x01\x12\x10\n\x0cSUBSCRIPTION\x10\x02\x12\x1c\n\x18UNSCHEDULED_CARD_ON_FILE\x10\x03*s\n\x0f\x43\x61rdTokenStatus\x12\x0b\n\x07PENDING\x10\x00\x12\n\n\x06\x46\x41ILED\x10\x01\x12\t\n\x05READY\x10\x02\x12\x0b\n\x07\x44\x45LETED\x10\x03\x12\x12\n\x0ePENDING_DELETE\x10\x04\x12\x1b\n\x0eUNKNOWN_STATUS\x10\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\x42+\n\x17\x63om.kodypay.grpc.commonB\x0eKodyEnumsProtoP\x01\x62\x06proto3"
         | 
| 9 | 
            +
             | 
| 10 | 
            +
            pool = ::Google::Protobuf::DescriptorPool.generated_pool
         | 
| 11 | 
            +
            pool.add_serialized_file(descriptor_data)
         | 
| 12 | 
            +
             | 
| 13 | 
            +
            module Com
         | 
| 14 | 
            +
              module Kodypay
         | 
| 15 | 
            +
                module Grpc
         | 
| 16 | 
            +
                  module Common
         | 
| 17 | 
            +
                    PaymentMethods = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.kodypay.grpc.common.PaymentMethods").enummodule
         | 
| 18 | 
            +
                    RecurringProcessingModel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.kodypay.grpc.common.RecurringProcessingModel").enummodule
         | 
| 19 | 
            +
                    CardTokenStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.kodypay.grpc.common.CardTokenStatus").enummodule
         | 
| 20 | 
            +
                  end
         | 
| 21 | 
            +
                end
         | 
| 22 | 
            +
              end
         | 
| 23 | 
            +
            end
         | 
    
        data/lib/kody/configuration.rb
    CHANGED
    
    | @@ -1,8 +1,15 @@ | |
| 1 1 | 
             
            module Kody
         | 
| 2 2 | 
             
              class Configuration
         | 
| 3 | 
            -
                #  | 
| 4 | 
            -
                 | 
| 5 | 
            -
                 | 
| 3 | 
            +
                # KodyPay gRPC endpoints by region
         | 
| 4 | 
            +
                # Production endpoints
         | 
| 5 | 
            +
                PRODUCTION_ENDPOINT = 'grpc.kodypay.com:443'          # Default
         | 
| 6 | 
            +
                PRODUCTION_AP_ENDPOINT = 'grpc-ap.kodypay.com:443'    # Asia-Pacific
         | 
| 7 | 
            +
                PRODUCTION_EU_ENDPOINT = 'grpc-eu.kodypay.com:443'    # Europe
         | 
| 8 | 
            +
                
         | 
| 9 | 
            +
                # Staging endpoints  
         | 
| 10 | 
            +
                STAGING_ENDPOINT = 'grpc-staging.kodypay.com:443'     # Default
         | 
| 11 | 
            +
                STAGING_AP_ENDPOINT = 'grpc-staging-ap.kodypay.com:443' # Asia-Pacific
         | 
| 12 | 
            +
                STAGING_EU_ENDPOINT = 'grpc-staging-eu.kodypay.com:443' # Europe
         | 
| 6 13 |  | 
| 7 14 | 
             
                attr_accessor :api_key, :store_id, :endpoint
         | 
| 8 15 |  | 
| @@ -13,5 +20,25 @@ module Kody | |
| 13 20 | 
             
                def staging!
         | 
| 14 21 | 
             
                  @endpoint = STAGING_ENDPOINT
         | 
| 15 22 | 
             
                end
         | 
| 23 | 
            +
             | 
| 24 | 
            +
                def staging_ap!
         | 
| 25 | 
            +
                  @endpoint = STAGING_AP_ENDPOINT
         | 
| 26 | 
            +
                end
         | 
| 27 | 
            +
             | 
| 28 | 
            +
                def staging_eu!
         | 
| 29 | 
            +
                  @endpoint = STAGING_EU_ENDPOINT
         | 
| 30 | 
            +
                end
         | 
| 31 | 
            +
             | 
| 32 | 
            +
                def production!
         | 
| 33 | 
            +
                  @endpoint = PRODUCTION_ENDPOINT
         | 
| 34 | 
            +
                end
         | 
| 35 | 
            +
             | 
| 36 | 
            +
                def production_ap!
         | 
| 37 | 
            +
                  @endpoint = PRODUCTION_AP_ENDPOINT
         | 
| 38 | 
            +
                end
         | 
| 39 | 
            +
             | 
| 40 | 
            +
                def production_eu!
         | 
| 41 | 
            +
                  @endpoint = PRODUCTION_EU_ENDPOINT
         | 
| 42 | 
            +
                end
         | 
| 16 43 | 
             
              end
         | 
| 17 44 | 
             
            end
         | 
    
        data/lib/kody/version.rb
    CHANGED
    
    
    
        data/lib/pay_pb.rb
    CHANGED
    
    | @@ -7,7 +7,7 @@ require 'google/protobuf' | |
| 7 7 | 
             
            require 'google/protobuf/timestamp_pb'
         | 
| 8 8 |  | 
| 9 9 |  | 
| 10 | 
            -
            descriptor_data = "\n!com/kodypay/grpc/pay/v1/pay.proto\x12\x17\x63om.kodypay.grpc.pay.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"$\n\x10TerminalsRequest\x12\x10\n\x08store_id\x18\x01 \x01(\t\"I\n\x11TerminalsResponse\x12\x34\n\tterminals\x18\x01 \x03(\x0b\x32!.com.kodypay.grpc.pay.v1.Terminal\"/\n\x08Terminal\x12\x13\n\x0bterminal_id\x18\x01 \x01(\t\x12\x0e\n\x06online\x18\x02 \x01(\x08\"\xbe\x04\n\nPayRequest\x12\x10\n\x08store_id\x18\x01 \x01(\t\x12\x0e\n\x06\x61mount\x18\x02 \x01(\t\x12\x13\n\x0bterminal_id\x18\x03 \x01(\t\x12\x16\n\tshow_tips\x18\x04 \x01(\x08H\x00\x88\x01\x01\x12\x43\n\x0epayment_method\x18\x05 \x01(\x0b\x32&.com.kodypay.grpc.pay.v1.PaymentMethodH\x01\x88\x01\x01\x12\x1d\n\x10idempotency_uuid\x18\x06 \x01(\tH\x02\x88\x01\x01\x12\x1e\n\x11payment_reference\x18\x07 \x01(\tH\x03\x88\x01\x01\x12\x15\n\x08order_id\x18\x08 \x01(\tH\x04\x88\x01\x01\x12H\n\x0c\x61\x63\x63\x65pts_only\x18\t \x03(\x0e\x32\x32.com.kodypay.grpc.pay.v1.PayRequest.PaymentMethods\"\xa2\x01\n\x0ePaymentMethods\x12\x08\n\x04VISA\x10\x00\x12\x0e\n\nMASTERCARD\x10\x01\x12\x08\n\x04\x41MEX\x10\x02\x12\x0f\n\x0b\x42\x41N_CONTACT\x10\x03\x12\x13\n\x0f\x43HINA_UNION_PAY\x10\x04\x12\x0b\n\x07MAESTRO\x10\x05\x12\n\n\x06\x44INERS\x10\x06\x12\x0c\n\x08\x44ISCOVER\x10\x07\x12\x07\n\x03JCB\x10\x08\x12\n\n\x06\x41LIPAY\x10\t\x12\n\n\x06WECHAT\x10\nB\x0c\n\n_show_tipsB\x11\n\x0f_payment_methodB\x13\n\x11_idempotency_uuidB\x14\n\x12_payment_referenceB\x0b\n\t_order_id\"\xbf\x01\n\rPaymentMethod\x12L\n\x13payment_method_type\x18\x01 \x01(\x0e\x32*.com.kodypay.grpc.pay.v1.PaymentMethodTypeH\x01\x88\x01\x01\x12\x0f\n\x05token\x18\x02 \x01(\tH\x00\x12\"\n\x18\x61\x63tivate_qr_code_scanner\x18\x03 \x01(\x08H\x00\x42\x13\n\x11verification_modeB\x16\n\x14_payment_method_type\"\ | 
| 10 | 
            +
            descriptor_data = "\n!com/kodypay/grpc/pay/v1/pay.proto\x12\x17\x63om.kodypay.grpc.pay.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"$\n\x10TerminalsRequest\x12\x10\n\x08store_id\x18\x01 \x01(\t\"I\n\x11TerminalsResponse\x12\x34\n\tterminals\x18\x01 \x03(\x0b\x32!.com.kodypay.grpc.pay.v1.Terminal\"/\n\x08Terminal\x12\x13\n\x0bterminal_id\x18\x01 \x01(\t\x12\x0e\n\x06online\x18\x02 \x01(\x08\"\xbe\x04\n\nPayRequest\x12\x10\n\x08store_id\x18\x01 \x01(\t\x12\x0e\n\x06\x61mount\x18\x02 \x01(\t\x12\x13\n\x0bterminal_id\x18\x03 \x01(\t\x12\x16\n\tshow_tips\x18\x04 \x01(\x08H\x00\x88\x01\x01\x12\x43\n\x0epayment_method\x18\x05 \x01(\x0b\x32&.com.kodypay.grpc.pay.v1.PaymentMethodH\x01\x88\x01\x01\x12\x1d\n\x10idempotency_uuid\x18\x06 \x01(\tH\x02\x88\x01\x01\x12\x1e\n\x11payment_reference\x18\x07 \x01(\tH\x03\x88\x01\x01\x12\x15\n\x08order_id\x18\x08 \x01(\tH\x04\x88\x01\x01\x12H\n\x0c\x61\x63\x63\x65pts_only\x18\t \x03(\x0e\x32\x32.com.kodypay.grpc.pay.v1.PayRequest.PaymentMethods\"\xa2\x01\n\x0ePaymentMethods\x12\x08\n\x04VISA\x10\x00\x12\x0e\n\nMASTERCARD\x10\x01\x12\x08\n\x04\x41MEX\x10\x02\x12\x0f\n\x0b\x42\x41N_CONTACT\x10\x03\x12\x13\n\x0f\x43HINA_UNION_PAY\x10\x04\x12\x0b\n\x07MAESTRO\x10\x05\x12\n\n\x06\x44INERS\x10\x06\x12\x0c\n\x08\x44ISCOVER\x10\x07\x12\x07\n\x03JCB\x10\x08\x12\n\n\x06\x41LIPAY\x10\t\x12\n\n\x06WECHAT\x10\nB\x0c\n\n_show_tipsB\x11\n\x0f_payment_methodB\x13\n\x11_idempotency_uuidB\x14\n\x12_payment_referenceB\x0b\n\t_order_id\"\xbf\x01\n\rPaymentMethod\x12L\n\x13payment_method_type\x18\x01 \x01(\x0e\x32*.com.kodypay.grpc.pay.v1.PaymentMethodTypeH\x01\x88\x01\x01\x12\x0f\n\x05token\x18\x02 \x01(\tH\x00\x12\"\n\x18\x61\x63tivate_qr_code_scanner\x18\x03 \x01(\x08H\x00\x42\x13\n\x11verification_modeB\x16\n\x14_payment_method_type\"\xe5\x10\n\x0bPayResponse\x12\x36\n\x06status\x18\x01 \x01(\x0e\x32&.com.kodypay.grpc.pay.v1.PaymentStatus\x12\x1b\n\x0e\x66\x61ilure_reason\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x1d\n\x0creceipt_json\x18\x03 \x01(\tB\x02\x18\x01H\x01\x88\x01\x01\x12\x12\n\npayment_id\x18\x04 \x01(\t\x12\x30\n\x0c\x64\x61te_created\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1e\n\rpsp_reference\x18\x06 \x01(\tB\x02\x18\x01H\x02\x88\x01\x01\x12\x31\n\tdate_paid\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x02\x18\x01\x12\x1d\n\x0ctotal_amount\x18\x08 \x01(\tB\x02\x18\x01H\x03\x88\x01\x01\x12\x1c\n\x0bsale_amount\x18\t \x01(\tB\x02\x18\x01H\x04\x88\x01\x01\x12\x1c\n\x0btips_amount\x18\n \x01(\tB\x02\x18\x01H\x05\x88\x01\x01\x12K\n\x0cpayment_data\x18\x0b \x01(\x0b\x32\x30.com.kodypay.grpc.pay.v1.PayResponse.PaymentDataH\x06\x88\x01\x01\x12\x1e\n\x11payment_reference\x18\x0c \x01(\tH\x07\x88\x01\x01\x12\x15\n\x08order_id\x18\r \x01(\tH\x08\x88\x01\x01\x12H\n\x0c\x61\x63\x63\x65pts_only\x18\x0e \x03(\x0e\x32\x32.com.kodypay.grpc.pay.v1.PayRequest.PaymentMethods\x12 \n\x13is_payment_declined\x18\x0f \x01(\x08H\t\x88\x01\x01\x12\x43\n\x07refunds\x18\x10 \x03(\x0b\x32\x32.com.kodypay.grpc.pay.v1.PayResponse.RefundDetails\x12 \n\x13is_payment_captured\x18\x11 \x01(\x08H\n\x88\x01\x01\x1a\xd8\x07\n\x0bPaymentData\x12-\n\tdate_paid\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x14\n\x0ctotal_amount\x18\x02 \x01(\t\x12\x13\n\x0bsale_amount\x18\x03 \x01(\t\x12\x13\n\x0btips_amount\x18\x04 \x01(\t\x12\x14\n\x0creceipt_json\x18\x05 \x01(\t\x12\x15\n\rpsp_reference\x18\x06 \x01(\t\x12G\n\x13payment_method_type\x18\x07 \x01(\x0e\x32*.com.kodypay.grpc.pay.v1.PaymentMethodType\x12\x16\n\x0epayment_method\x18\x08 \x01(\t\x12W\n\x0cpayment_card\x18\t \x01(\x0b\x32<.com.kodypay.grpc.pay.v1.PayResponse.PaymentData.PaymentCardH\x00\x88\x01\x01\x12#\n\x16payment_method_variant\x18\n \x01(\tH\x01\x88\x01\x01\x12\x1e\n\rrefund_amount\x18\x0b \x01(\tB\x02\x18\x01H\x02\x88\x01\x01\x12\x1e\n\x11original_currency\x18\x0c \x01(\tH\x03\x88\x01\x01\x12\x18\n\x0bpaid_amount\x18\r \x01(\tH\x04\x88\x01\x01\x12\x1a\n\rpaid_currency\x18\x0e \x01(\tH\x05\x88\x01\x01\x12\x1a\n\rexchange_rate\x18\x0f \x01(\tH\x06\x88\x01\x01\x12\x15\n\x08\x62\x61tch_id\x18\x10 \x01(\tH\x07\x88\x01\x01\x1a\x8f\x02\n\x0bPaymentCard\x12\x1a\n\x12\x63\x61rd_last_4_digits\x18\x01 \x01(\t\x12\x18\n\x10\x63\x61rd_expiry_date\x18\x02 \x01(\t\x12\x16\n\x0epos_entry_mode\x18\x03 \x01(\t\x12\x15\n\rpayment_token\x18\x04 \x01(\t\x12\x11\n\tauth_code\x18\x05 \x01(\t\x12\x15\n\x08\x63\x61rd_bin\x18\x06 \x01(\tH\x00\x88\x01\x01\x12\x1e\n\x11\x63\x61rd_issuing_bank\x18\x07 \x01(\tH\x01\x88\x01\x01\x12\x1b\n\x0e\x66unding_source\x18\x08 \x01(\tH\x02\x88\x01\x01\x42\x0b\n\t_card_binB\x14\n\x12_card_issuing_bankB\x11\n\x0f_funding_sourceB\x0f\n\r_payment_cardB\x19\n\x17_payment_method_variantB\x10\n\x0e_refund_amountB\x14\n\x12_original_currencyB\x0e\n\x0c_paid_amountB\x10\n\x0e_paid_currencyB\x10\n\x0e_exchange_rateB\x0b\n\t_batch_id\x1a\xf0\x01\n\rRefundDetails\x12\x12\n\npayment_id\x18\x01 \x01(\t\x12!\n\x14refund_psp_reference\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x1e\n\x16payment_transaction_id\x18\x03 \x01(\t\x12\x15\n\rrefund_amount\x18\x04 \x01(\t\x12.\n\nevent_date\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x18\n\x0bterminal_id\x18\x06 \x01(\tH\x01\x88\x01\x01\x42\x17\n\x15_refund_psp_referenceB\x0e\n\x0c_terminal_idB\x11\n\x0f_failure_reasonB\x0f\n\r_receipt_jsonB\x10\n\x0e_psp_referenceB\x0f\n\r_total_amountB\x0e\n\x0c_sale_amountB\x0e\n\x0c_tips_amountB\x0f\n\r_payment_dataB\x14\n\x12_payment_referenceB\x0b\n\t_order_idB\x16\n\x14_is_payment_declinedB\x16\n\x14_is_payment_captured\"n\n\rCancelRequest\x12\x10\n\x08store_id\x18\x01 \x01(\t\x12\x0e\n\x06\x61mount\x18\x02 \x01(\t\x12\x13\n\x0bterminal_id\x18\x03 \x01(\t\x12\x17\n\npayment_id\x18\x04 \x01(\tH\x00\x88\x01\x01\x42\r\n\x0b_payment_id\"H\n\x0e\x43\x61ncelResponse\x12\x36\n\x06status\x18\x01 \x01(\x0e\x32&.com.kodypay.grpc.pay.v1.PaymentStatus\";\n\x15PaymentDetailsRequest\x12\x10\n\x08store_id\x18\x01 \x01(\t\x12\x10\n\x08order_id\x18\x02 \x01(\t\"\x85\x02\n\rRefundRequest\x12\x10\n\x08store_id\x18\x01 \x01(\t\x12\x12\n\npayment_id\x18\x02 \x01(\t\x12\x0e\n\x06\x61mount\x18\x03 \x01(\t\x12\x1d\n\x10idempotency_uuid\x18\x04 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x0bterminal_id\x18\x05 \x01(\tH\x01\x88\x01\x01\x12\x1e\n\x11\x65xt_pay_reference\x18\x06 \x01(\tH\x02\x88\x01\x01\x12\x19\n\x0c\x65xt_order_id\x18\x07 \x01(\tH\x03\x88\x01\x01\x42\x13\n\x11_idempotency_uuidB\x0e\n\x0c_terminal_idB\x14\n\x12_ext_pay_referenceB\x0f\n\r_ext_order_id\"\x9c\x04\n\x0eRefundResponse\x12\x44\n\x06status\x18\x01 \x01(\x0e\x32\x34.com.kodypay.grpc.pay.v1.RefundResponse.RefundStatus\x12\x1b\n\x0e\x66\x61ilure_reason\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x12\n\npayment_id\x18\x03 \x01(\t\x12\x30\n\x0c\x64\x61te_created\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x19\n\x11total_paid_amount\x18\x05 \x01(\t\x12\x1d\n\x15total_amount_refunded\x18\x06 \x01(\t\x12\x18\n\x10remaining_amount\x18\x07 \x01(\t\x12\x1e\n\x16total_amount_requested\x18\x08 \x01(\t\x12\x1c\n\x14paymentTransactionId\x18\t \x01(\t\x12\x15\n\x08order_id\x18\n \x01(\tH\x01\x88\x01\x01\x12\x1e\n\x11\x65xt_pay_reference\x18\x0b \x01(\tH\x02\x88\x01\x01\x12\x19\n\x0c\x65xt_order_id\x18\x0c \x01(\tH\x03\x88\x01\x01\"6\n\x0cRefundStatus\x12\x0b\n\x07PENDING\x10\x00\x12\r\n\tREQUESTED\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x42\x11\n\x0f_failure_reasonB\x0b\n\t_order_idB\x14\n\x12_ext_pay_referenceB\x0f\n\r_ext_order_id\"\xb6\x01\n\x12VoidPaymentRequest\x12\x17\n\rpsp_reference\x18\x01 \x01(\tH\x00\x12\x14\n\npayment_id\x18\x02 \x01(\tH\x00\x12\x1e\n\x11payment_reference\x18\x03 \x01(\tH\x01\x88\x01\x01\x12\x15\n\x08order_id\x18\x04 \x01(\tH\x02\x88\x01\x01\x12\x10\n\x08store_id\x18\x05 \x01(\tB\x05\n\x03idsB\x14\n\x12_payment_referenceB\x0b\n\t_order_id\"\xd2\x03\n\x13VoidPaymentResponse\x12\x15\n\rpsp_reference\x18\x01 \x01(\t\x12\x12\n\npayment_id\x18\x02 \x01(\t\x12G\n\x06status\x18\x03 \x01(\x0e\x32\x37.com.kodypay.grpc.pay.v1.VoidPaymentResponse.VoidStatus\x12M\n\tsale_data\x18\x04 \x01(\x0b\x32\x35.com.kodypay.grpc.pay.v1.VoidPaymentResponse.SaleDataH\x00\x88\x01\x01\x12/\n\x0b\x64\x61te_voided\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1aw\n\x08SaleData\x12\x14\n\x0ctotal_amount\x18\x01 \x01(\t\x12\x13\n\x0bsale_amount\x18\x02 \x01(\t\x12\x13\n\x0btips_amount\x18\x03 \x01(\t\x12\x10\n\x08order_id\x18\x04 \x01(\t\x12\x19\n\x11payment_reference\x18\x05 \x01(\t\"@\n\nVoidStatus\x12\x0b\n\x07PENDING\x10\x00\x12\r\n\tREQUESTED\x10\x01\x12\n\n\x06VOIDED\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x42\x0c\n\n_sale_data*8\n\x11PaymentMethodType\x12\x08\n\x04\x43\x41RD\x10\x00\x12\x0c\n\x08\x45_WALLET\x10\x01\x12\x0b\n\x07UNKNOWN\x10\x02*|\n\rPaymentStatus\x12\x0b\n\x07PENDING\x10\x00\x12\x0b\n\x07SUCCESS\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x12\r\n\tCANCELLED\x10\x03\x12\x0c\n\x08\x44\x45\x43LINED\x10\x04\x12\x12\n\x0eREFUND_PENDING\x10\x05\x12\x14\n\x10REFUND_REQUESTED\x10\x06\x32\xd3\x04\n\x16KodyPayTerminalService\x12\x62\n\tTerminals\x12).com.kodypay.grpc.pay.v1.TerminalsRequest\x1a*.com.kodypay.grpc.pay.v1.TerminalsResponse\x12R\n\x03Pay\x12#.com.kodypay.grpc.pay.v1.PayRequest\x1a$.com.kodypay.grpc.pay.v1.PayResponse0\x01\x12Y\n\x06\x43\x61ncel\x12&.com.kodypay.grpc.pay.v1.CancelRequest\x1a\'.com.kodypay.grpc.pay.v1.CancelResponse\x12\x66\n\x0ePaymentDetails\x12..com.kodypay.grpc.pay.v1.PaymentDetailsRequest\x1a$.com.kodypay.grpc.pay.v1.PayResponse\x12[\n\x06Refund\x12&.com.kodypay.grpc.pay.v1.RefundRequest\x1a\'.com.kodypay.grpc.pay.v1.RefundResponse0\x01\x12\x61\n\x04Void\x12+.com.kodypay.grpc.pay.v1.VoidPaymentRequest\x1a,.com.kodypay.grpc.pay.v1.VoidPaymentResponseB1\n\x17\x63om.kodypay.grpc.pay.v1B\x14KodyPayTerminalProtoP\x01\x62\x06proto3"
         | 
| 11 11 |  | 
| 12 12 | 
             
            pool = ::Google::Protobuf::DescriptorPool.generated_pool
         | 
| 13 13 | 
             
            pool.add_serialized_file(descriptor_data)
         | 
    
        data/lib/preauth_pb.rb
    CHANGED
    
    | @@ -5,9 +5,10 @@ | |
| 5 5 | 
             
            require 'google/protobuf'
         | 
| 6 6 |  | 
| 7 7 | 
             
            require 'google/protobuf/timestamp_pb'
         | 
| 8 | 
            +
            require_relative "enums_pb"
         | 
| 8 9 |  | 
| 9 10 |  | 
| 10 | 
            -
            descriptor_data = "\n)com/kodypay/grpc/preauth/v1/preauth.proto\x12\x1b\x63om.kodypay.grpc.preauth.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb2\x02\n\x17PreAuthorisationRequest\x12\x18\n\x10idempotency_uuid\x18\x01 \x01(\t\x12\x1a\n\x12pre_auth_reference\x18\x02 \x01(\t\x12\x15\n\x08order_id\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x08store_id\x18\x04 \x01(\t\x12\x13\n\x0bterminal_id\x18\x05 \x01(\t\x12\x1a\n\x12\x61mount_minor_units\x18\x06 \x01(\x04\x12\x10\n\x08\x63urrency\x18\x07 \x01(\t\x12P\n\x13payment_method_type\x18\x08 \x01(\x0e\x32..com.kodypay.grpc.preauth.v1.PaymentMethodTypeH\x01\x88\x01\x01\x42\x0b\n\t_order_idB\x16\n\x14_payment_method_type\"\xa2\x05\n\x18PreAuthorisationResponse\x12Q\n\x08response\x18\x01 \x01(\x0b\x32=.com.kodypay.grpc.preauth.v1.PreAuthorisationResponse.SuccessH\x00\x12L\n\x05\x65rror\x18\x02 \x01(\x0b\x32;.com.kodypay.grpc.preauth.v1.PreAuthorisationResponse.ErrorH\x00\x1a\xe6\x02\n\x07Success\x12\x1a\n\x12pre_auth_reference\x18\x01 \x01(\t\x12\x15\n\rpsp_reference\x18\x02 \x01(\t\x12\x15\n\x08order_id\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x16\n\x0epre_auth_token\x18\x04 \x01(\t\x12\x45\n\x0c\x63\x61rd_details\x18\x05 \x01(\x0b\x32/.com.kodypay.grpc.preauth.v1.PaymentCardDetails\x12\x37\n\x06status\x18\x06 \x01(\x0e\x32\'.com.kodypay.grpc.preauth.v1.AuthStatus\x12%\n\x1d\x61uthorised_amount_minor_units\x18\x07 \x01(\x04\x12\x10\n\x08\x63urrency\x18\x08 \x01(\t\x12\x33\n\x0f\x64\x61te_authorised\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x0b\n\t_order_id\x1ar\n\x05\x45rror\x12\x1a\n\x12pre_auth_reference\x18\x01 \x01(\t\x12\x15\n\x08order_id\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x12\n\nerror_code\x18\x03 \x01(\t\x12\x15\n\rerror_message\x18\x04 \x01(\tB\x0b\n\t_order_idB\x08\n\x06result\"\xc0\x01\n\x19TopUpAuthorisationRequest\x12\x18\n\x10idempotency_uuid\x18\x01 \x01(\t\x12\x18\n\x10top_up_reference\x18\x02 \x01(\t\x12\x15\n\x08order_id\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x16\n\x0epre_auth_token\x18\x04 \x01(\t\x12!\n\x19top_up_amount_minor_units\x18\x05 \x01(\x04\x12\x10\n\x08\x63urrency\x18\x06 \x01(\tB\x0b\n\t_order_id\"\xdb\x03\n\x1aTopUpAuthorisationResponse\x12S\n\x08response\x18\x01 \x01(\x0b\x32?.com.kodypay.grpc.preauth.v1.TopUpAuthorisationResponse.SuccessH\x00\x12N\n\x05\x65rror\x18\x02 \x01(\x0b\x32=.com.kodypay.grpc.preauth.v1.TopUpAuthorisationResponse.ErrorH\x00\x1a\xbf\x01\n\x07Success\x12\x18\n\x10top_up_reference\x18\x01 \x01(\t\x12\x15\n\rpsp_reference\x18\x02 \x01(\t\x12\x15\n\x08order_id\x18\x03 \x01(\tH\x00\x88\x01\x01\x12+\n#total_authorised_amount_minor_units\x18\x04 \x01(\x04\x12\x32\n\x0e\x64\x61te_topped_up\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x0b\n\t_order_id\x1aL\n\x05\x45rror\x12\x18\n\x10top_up_reference\x18\x01 \x01(\t\x12\x12\n\nerror_code\x18\x02 \x01(\t\x12\x15\n\rerror_message\x18\x03 \x01(\tB\x08\n\x06result\"\x84\x02\n\x1b\x43\x61ptureAuthorisationRequest\x12\x18\n\x10idempotency_uuid\x18\x01 \x01(\t\x12\x19\n\x11\x63\x61pture_reference\x18\x02 \x01(\t\x12\x15\n\x08order_id\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x16\n\x0epre_auth_token\x18\x04 \x01(\t\x12\"\n\x1a\x63\x61pture_amount_minor_units\x18\x05 \x01(\x04\x12\x10\n\x08\x63urrency\x18\x06 \x01(\t\x12#\n\x16tip_amount_minor_units\x18\x07 \x01(\x04H\x01\x88\x01\x01\x42\x0b\n\t_order_idB\x19\n\x17_tip_amount_minor_units\"\xb5\x03\n\x1c\x43\x61ptureAuthorisationResponse\x12U\n\x08response\x18\x01 \x01(\x0b\x32\x41.com.kodypay.grpc.preauth.v1.CaptureAuthorisationResponse.SuccessH\x00\x12P\n\x05\x65rror\x18\x02 \x01(\x0b\x32?.com.kodypay.grpc.preauth.v1.CaptureAuthorisationResponse.ErrorH\x00\x1a\x92\x01\n\x07Success\x12\x19\n\x11\x63\x61pture_reference\x18\x01 \x01(\t\x12\x15\n\rpsp_reference\x18\x02 \x01(\t\x12\x15\n\x08order_id\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x31\n\rdate_captured\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x0b\n\t_order_id\x1aM\n\x05\x45rror\x12\x19\n\x11\x63\x61pture_reference\x18\x01 \x01(\t\x12\x12\n\nerror_code\x18\x02 \x01(\t\x12\x15\n\rerror_message\x18\x03 \x01(\tB\x08\n\x06result\"\x8e\x01\n\x1bReleaseAuthorisationRequest\x12\x18\n\x10idempotency_uuid\x18\x01 \x01(\t\x12\x19\n\x11release_reference\x18\x02 \x01(\t\x12\x15\n\x08order_id\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x16\n\x0epre_auth_token\x18\x04 \x01(\tB\x0b\n\t_order_id\"\xb5\x03\n\x1cReleaseAuthorisationResponse\x12U\n\x08response\x18\x01 \x01(\x0b\x32\x41.com.kodypay.grpc.preauth.v1.ReleaseAuthorisationResponse.SuccessH\x00\x12P\n\x05\x65rror\x18\x02 \x01(\x0b\x32?.com.kodypay.grpc.preauth.v1.ReleaseAuthorisationResponse.ErrorH\x00\x1a\x92\x01\n\x07Success\x12\x19\n\x11release_reference\x18\x01 \x01(\t\x12\x15\n\rpsp_reference\x18\x02 \x01(\t\x12\x15\n\x08order_id\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x31\n\rdate_released\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x0b\n\t_order_id\x1aM\n\x05\x45rror\x12\x19\n\x11release_reference\x18\x01 \x01(\t\x12\x12\n\nerror_code\x18\x02 \x01(\t\x12\x15\n\rerror_message\x18\x03 \x01(\tB\x08\n\x06result\"4\n\x1aGetPreAuthorisationRequest\x12\x16\n\x0epre_auth_token\x18\x01 \x01(\t\"\x94\x07\n\x1bGetPreAuthorisationResponse\x12T\n\x08response\x18\x01 \x01(\x0b\x32@.com.kodypay.grpc.preauth.v1.GetPreAuthorisationResponse.SuccessH\x00\x12O\n\x05\x65rror\x18\x02 \x01(\x0b\x32>.com.kodypay.grpc.preauth.v1.GetPreAuthorisationResponse.ErrorH\x00\x1a\x8f\x05\n\x07Success\x12\x1a\n\x12pre_auth_reference\x18\x01 \x01(\t\x12\x16\n\x0epre_auth_token\x18\x02 \x01(\t\x12\x15\n\x08order_id\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x37\n\x06status\x18\x04 \x01(\x0e\x32\'.com.kodypay.grpc.preauth.v1.AuthStatus\x12+\n#total_authorised_amount_minor_units\x18\x05 \x01(\x04\x12(\n\x1b\x63\x61ptured_amount_minor_units\x18\x06 \x01(\x04H\x01\x88\x01\x01\x12\x16\n\x0estore_currency\x18\x07 \x01(\t\x12\x45\n\x0c\x63\x61rd_details\x18\x08 \x01(\x0b\x32/.com.kodypay.grpc.preauth.v1.PaymentCardDetails\x12\x33\n\x0f\x64\x61te_authorised\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12<\n\x13\x64\x61te_last_topped_up\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x02\x88\x01\x01\x12\x36\n\rdate_captured\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x03\x88\x01\x01\x12\x36\n\rdate_released\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x04\x88\x01\x01\x42\x0b\n\t_order_idB\x1e\n\x1c_captured_amount_minor_unitsB\x16\n\x14_date_last_topped_upB\x10\n\x0e_date_capturedB\x10\n\x0e_date_released\x1a\x32\n\x05\x45rror\x12\x12\n\nerror_code\x18\x01 \x01(\t\x12\x15\n\rerror_message\x18\x02 \x01(\tB\x08\n\x06result\"\xf9\x01\n\x12PaymentCardDetails\x12\x1a\n\x12\x63\x61rd_last_4_digits\x18\x01 \x01(\t\x12\x18\n\x10\x65xpiry_date_yymm\x18\x02 \x01(\t\x12\x16\n\x0epos_entry_mode\x18\x03 \x01(\t\x12\x15\n\rpayment_token\x18\x04 \x01(\t\x12\x11\n\tauth_code\x18\x05 \x01(\t\x12?\n\ncard_brand\x18\x06 \x01(\x0e\x32+.com.kodypay.grpc.preauth.v1.PaymentMethods\x12\x19\n\x0c\x63\x61rd_variant\x18\x07 \x01(\tH\x00\x88\x01\x01\x42\x0f\n\r_card_variant*\x9f\x02\n\nAuthStatus\x12\x1b\n\x17\x41UTH_STATUS_UNSPECIFIED\x10\x00\x12\x19\n\x15PENDING_AUTHORISATION\x10\x01\x12\x0e\n\nAUTHORISED\x10\x02\x12\x0c\n\x08\x44\x45\x43LINED\x10\x03\x12\r\n\tCANCELLED\x10\x04\x12\x13\n\x0fPENDING_CAPTURE\x10\x05\x12\x0c\n\x08\x43\x41PTURED\x10\x06\x12\x12\n\x0e\x43\x41PTURE_FAILED\x10\x07\x12\x13\n\x0fPENDING_RELEASE\x10\x08\x12\x0c\n\x08RELEASED\x10\t\x12\x12\n\x0eRELEASE_FAILED\x10\n\x12\x12\n\x0ePENDING_TOP_UP\x10\x0b\x12\x11\n\rTOP_UP_FAILED\x10\x0c\x12\x0b\n\x07\x45XPIRED\x10\r\x12\n\n\x06\x46\x41ILED\x10\x0e*\xa2\x01\n\x0ePaymentMethods\x12\x08\n\x04VISA\x10\x00\x12\x0e\n\nMASTERCARD\x10\x01\x12\x08\n\x04\x41MEX\x10\x02\x12\x0f\n\x0b\x42\x41N_CONTACT\x10\x03\x12\x13\n\x0f\x43HINA_UNION_PAY\x10\x04\x12\x0b\n\x07MAESTRO\x10\x05\x12\n\n\x06\x44INERS\x10\x06\x12\x0c\n\x08\x44ISCOVER\x10\x07\x12\x07\n\x03JCB\x10\x08\x12\n\n\x06\x41LIPAY\x10\t\x12\n\n\x06WECHAT\x10\n*/\n\x11PaymentMethodType\x12\x10\n\x0c\x43\x41RD_PRESENT\x10\x00\x12\x08\n\x04MOTO\x10\x01\x32\xc8\x05\n\x1aKodyPreAuthTerminalService\x12{\n\x0cPreAuthorise\x12\x34.com.kodypay.grpc.preauth.v1.PreAuthorisationRequest\x1a\x35.com.kodypay.grpc.preauth.v1.PreAuthorisationResponse\x12\x85\x01\n\x12TopUpAuthorisation\x12\x36.com.kodypay.grpc.preauth.v1.TopUpAuthorisationRequest\x1a\x37.com.kodypay.grpc.preauth.v1.TopUpAuthorisationResponse\x12\x8b\x01\n\x14\x43\x61ptureAuthorisation\x12\x38.com.kodypay.grpc.preauth.v1.CaptureAuthorisationRequest\x1a\x39.com.kodypay.grpc.preauth.v1.CaptureAuthorisationResponse\x12\x8b\x01\n\x14ReleaseAuthorisation\x12\x38.com.kodypay.grpc.preauth.v1.ReleaseAuthorisationRequest\x1a\x39.com.kodypay.grpc.preauth.v1.ReleaseAuthorisationResponse\x12\x88\x01\n\x13GetPreAuthorisation\x12\x37.com.kodypay.grpc.preauth.v1.GetPreAuthorisationRequest\x1a\x38.com.kodypay.grpc.preauth.v1.GetPreAuthorisationResponseB1\n\x1b\x63om.kodypay.grpc.preauth.v1B\x10KodyPreAuthProtoP\x01\x62\x06proto3"
         | 
| 11 | 
            +
            descriptor_data = "\n)com/kodypay/grpc/preauth/v1/preauth.proto\x12\x1b\x63om.kodypay.grpc.preauth.v1\x1a\x1fgoogle/protobuf/timestamp.proto\x1a#com/kodypay/grpc/common/enums.proto\"\xb2\x02\n\x17PreAuthorisationRequest\x12\x18\n\x10idempotency_uuid\x18\x01 \x01(\t\x12\x1a\n\x12pre_auth_reference\x18\x02 \x01(\t\x12\x15\n\x08order_id\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x08store_id\x18\x04 \x01(\t\x12\x13\n\x0bterminal_id\x18\x05 \x01(\t\x12\x1a\n\x12\x61mount_minor_units\x18\x06 \x01(\x04\x12\x10\n\x08\x63urrency\x18\x07 \x01(\t\x12P\n\x13payment_method_type\x18\x08 \x01(\x0e\x32..com.kodypay.grpc.preauth.v1.PaymentMethodTypeH\x01\x88\x01\x01\x42\x0b\n\t_order_idB\x16\n\x14_payment_method_type\"\xc8\x03\n\x18PreAuthorisationResponse\x12\x1a\n\x12pre_auth_reference\x18\x01 \x01(\t\x12\x15\n\rpsp_reference\x18\x02 \x01(\t\x12\x15\n\x08order_id\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x13\n\x0bpre_auth_id\x18\x04 \x01(\t\x12\x43\n\x0c\x63\x61rd_details\x18\x05 \x01(\x0b\x32(.com.kodypay.grpc.preauth.v1.PaymentCardH\x01\x88\x01\x01\x12\x37\n\x06status\x18\x06 \x01(\x0e\x32\'.com.kodypay.grpc.preauth.v1.AuthStatus\x12%\n\x1d\x61uthorised_amount_minor_units\x18\x07 \x01(\x04\x12\x10\n\x08\x63urrency\x18\x08 \x01(\t\x12.\n\ncreated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x36\n\rauthorised_at\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x02\x88\x01\x01\x42\x0b\n\t_order_idB\x0f\n\r_card_detailsB\x10\n\x0e_authorised_at\"\xe8\x01\n PreAuthoriseWithCardTokenRequest\x12\x18\n\x10idempotency_uuid\x18\x01 \x01(\t\x12\x1a\n\x12pre_auth_reference\x18\x02 \x01(\t\x12\x15\n\x08order_id\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x08store_id\x18\x04 \x01(\t\x12\x1a\n\x12\x61mount_minor_units\x18\x05 \x01(\x04\x12\x10\n\x08\x63urrency\x18\x06 \x01(\t\x12\x15\n\rpayment_token\x18\x07 \x01(\t\x12\x13\n\x0b\x65xpiry_date\x18\x08 \x01(\tB\x0b\n\t_order_id\"\xcf\x01\n\x19TopUpAuthorisationRequest\x12\x18\n\x10idempotency_uuid\x18\x01 \x01(\t\x12\x18\n\x10top_up_reference\x18\x02 \x01(\t\x12\x15\n\x08order_id\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x08store_id\x18\x04 \x01(\t\x12\x13\n\x0bpre_auth_id\x18\x05 \x01(\t\x12!\n\x19top_up_amount_minor_units\x18\x06 \x01(\x04\x12\x10\n\x08\x63urrency\x18\x07 \x01(\tB\x0b\n\t_order_id\"\xde\x02\n\x1aTopUpAuthorisationResponse\x12\x18\n\x10top_up_reference\x18\x01 \x01(\t\x12\x15\n\rpsp_reference\x18\x02 \x01(\t\x12\x15\n\x08order_id\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x30\n#total_authorised_amount_minor_units\x18\x04 \x01(\x04H\x01\x88\x01\x01\x12\x35\n\x0ctopped_up_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x02\x88\x01\x01\x12\x37\n\x06status\x18\x06 \x01(\x0e\x32\'.com.kodypay.grpc.preauth.v1.AuthStatus\x12\x10\n\x08topup_id\x18\x07 \x01(\tB\x0b\n\t_order_idB&\n$_total_authorised_amount_minor_unitsB\x0f\n\r_topped_up_at\"\xd3\x01\n\x1b\x43\x61ptureAuthorisationRequest\x12\x18\n\x10idempotency_uuid\x18\x01 \x01(\t\x12\x19\n\x11\x63\x61pture_reference\x18\x02 \x01(\t\x12\x15\n\x08order_id\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x08store_id\x18\x04 \x01(\t\x12\x13\n\x0bpre_auth_id\x18\x05 \x01(\t\x12\"\n\x1a\x63\x61pture_amount_minor_units\x18\x06 \x01(\x04\x12\x10\n\x08\x63urrency\x18\x07 \x01(\tB\x0b\n\t_order_id\"\xb9\x01\n\x1c\x43\x61ptureAuthorisationResponse\x12\x19\n\x11\x63\x61pture_reference\x18\x01 \x01(\t\x12\x15\n\rpsp_reference\x18\x02 \x01(\t\x12\x15\n\x08order_id\x18\x03 \x01(\tH\x00\x88\x01\x01\x12/\n\x0b\x63\x61ptured_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x12\n\ncapture_id\x18\x05 \x01(\tB\x0b\n\t_order_id\"\x9d\x01\n\x1bReleaseAuthorisationRequest\x12\x18\n\x10idempotency_uuid\x18\x01 \x01(\t\x12\x19\n\x11release_reference\x18\x02 \x01(\t\x12\x15\n\x08order_id\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x08store_id\x18\x04 \x01(\t\x12\x13\n\x0bpre_auth_id\x18\x05 \x01(\tB\x0b\n\t_order_id\"\xa5\x01\n\x1cReleaseAuthorisationResponse\x12\x19\n\x11release_reference\x18\x01 \x01(\t\x12\x15\n\rpsp_reference\x18\x02 \x01(\t\x12\x15\n\x08order_id\x18\x03 \x01(\tH\x00\x88\x01\x01\x12/\n\x0breleased_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x0b\n\t_order_id\"C\n\x1aGetPreAuthorisationRequest\x12\x10\n\x08store_id\x18\x01 \x01(\t\x12\x13\n\x0bpre_auth_id\x18\x02 \x01(\t\"\xd2\x06\n\x1bGetPreAuthorisationResponse\x12\x1a\n\x12pre_auth_reference\x18\x01 \x01(\t\x12\x13\n\x0bpre_auth_id\x18\x02 \x01(\t\x12\x1a\n\rpsp_reference\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x37\n\x06status\x18\x04 \x01(\x0e\x32\'.com.kodypay.grpc.preauth.v1.AuthStatus\x12+\n#total_authorised_amount_minor_units\x18\x05 \x01(\x04\x12(\n\x1b\x63\x61ptured_amount_minor_units\x18\x06 \x01(\x04H\x01\x88\x01\x01\x12\x16\n\x0estore_currency\x18\x07 \x01(\t\x12>\n\x0c\x63\x61rd_details\x18\x08 \x01(\x0b\x32(.com.kodypay.grpc.preauth.v1.PaymentCard\x12.\n\ncreated_at\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12:\n\x11last_topped_up_at\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x02\x88\x01\x01\x12\x34\n\x0b\x63\x61ptured_at\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x03\x88\x01\x01\x12\x34\n\x0breleased_at\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x04\x88\x01\x01\x12\x36\n\rauthorised_at\x18\r \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x05\x88\x01\x01\x12<\n\x0b\x61\x64justments\x18\x0e \x03(\x0b\x32\'.com.kodypay.grpc.preauth.v1.Adjustment\x12\x36\n\x08\x63\x61ptures\x18\x0f \x03(\x0b\x32$.com.kodypay.grpc.preauth.v1.CaptureB\x10\n\x0e_psp_referenceB\x1e\n\x1c_captured_amount_minor_unitsB\x14\n\x12_last_topped_up_atB\x0e\n\x0c_captured_atB\x0e\n\x0c_released_atB\x10\n\x0e_authorised_at\"\xde\x01\n\x14RefundCaptureRequest\x12\x18\n\x10idempotency_uuid\x18\x01 \x01(\t\x12\x18\n\x10refund_reference\x18\x02 \x01(\t\x12\x15\n\x08order_id\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x10\n\x08store_id\x18\x04 \x01(\t\x12\x13\n\x0bpre_auth_id\x18\x05 \x01(\t\x12\x12\n\ncapture_id\x18\x06 \x01(\t\x12!\n\x19refund_amount_minor_units\x18\x07 \x01(\x04\x12\x10\n\x08\x63urrency\x18\x08 \x01(\tB\x0b\n\t_order_id\"\x9f\x02\n\x15RefundCaptureResponse\x12\x18\n\x10refund_reference\x18\x01 \x01(\t\x12\x1a\n\rpsp_reference\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x08order_id\x18\x03 \x01(\tH\x01\x88\x01\x01\x12/\n\x0brefunded_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x39\n\x06status\x18\x05 \x01(\x0e\x32).com.kodypay.grpc.preauth.v1.RefundStatus\x12\x1b\n\x0e\x66\x61ilure_reason\x18\x06 \x01(\tH\x02\x88\x01\x01\x42\x10\n\x0e_psp_referenceB\x0b\n\t_order_idB\x11\n\x0f_failure_reason\"\xa2\x02\n\x0bPaymentCard\x12\x1a\n\x12\x63\x61rd_last_4_digits\x18\x01 \x01(\t\x12\x18\n\x10\x63\x61rd_expiry_date\x18\x02 \x01(\t\x12\x1b\n\x0epos_entry_mode\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x1a\n\rpayment_token\x18\x04 \x01(\tH\x01\x88\x01\x01\x12?\n\x0epayment_method\x18\x05 \x01(\x0e\x32\'.com.kodypay.grpc.common.PaymentMethods\x12#\n\x16payment_method_variant\x18\x06 \x01(\tH\x02\x88\x01\x01\x42\x11\n\x0f_pos_entry_modeB\x10\n\x0e_payment_tokenB\x19\n\x17_payment_method_variant\"\xc8\x02\n\nAdjustment\x12\x15\n\radjustment_id\x18\x01 \x01(\t\x12!\n\x14\x61\x64justment_reference\x18\x02 \x01(\tH\x00\x88\x01\x01\x12=\n\x06status\x18\x03 \x01(\x0e\x32-.com.kodypay.grpc.preauth.v1.AdjustmentStatus\x12\x1a\n\x12\x61mount_minor_units\x18\x04 \x01(\x04\x12.\n\ncreated_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nupdated_at\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1a\n\rpsp_reference\x18\x07 \x01(\tH\x01\x88\x01\x01\x42\x17\n\x15_adjustment_referenceB\x10\n\x0e_psp_reference\"\xe8\x02\n\x07\x43\x61pture\x12\x12\n\ncapture_id\x18\x01 \x01(\t\x12\x1a\n\x12\x61mount_minor_units\x18\x02 \x01(\x04\x12\x42\n\x06status\x18\x03 \x01(\x0e\x32\x32.com.kodypay.grpc.preauth.v1.Capture.CaptureStatus\x12.\n\ncreated_at\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x1a\n\rpsp_reference\x18\x05 \x01(\tH\x00\x88\x01\x01\x12\x12\n\x05\x65rror\x18\x06 \x01(\tH\x01\x88\x01\x01\"m\n\rCaptureStatus\x12\x1e\n\x1a\x43\x41PTURE_STATUS_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x43\x41PTURE_PENDING\x10\x01\x12\x13\n\x0f\x43\x41PTURE_SUCCESS\x10\x02\x12\x12\n\x0e\x43\x41PTURE_FAILED\x10\x03\x42\x10\n\x0e_psp_referenceB\x08\n\x06_error*\x9f\x02\n\nAuthStatus\x12\x1b\n\x17\x41UTH_STATUS_UNSPECIFIED\x10\x00\x12\x19\n\x15PENDING_AUTHORISATION\x10\x01\x12\x0e\n\nAUTHORISED\x10\x02\x12\x0c\n\x08\x44\x45\x43LINED\x10\x03\x12\r\n\tCANCELLED\x10\x04\x12\x13\n\x0fPENDING_CAPTURE\x10\x05\x12\x0c\n\x08\x43\x41PTURED\x10\x06\x12\x12\n\x0e\x43\x41PTURE_FAILED\x10\x07\x12\x13\n\x0fPENDING_RELEASE\x10\x08\x12\x0c\n\x08RELEASED\x10\t\x12\x12\n\x0eRELEASE_FAILED\x10\n\x12\x12\n\x0ePENDING_TOP_UP\x10\x0b\x12\x11\n\rTOP_UP_FAILED\x10\x0c\x12\x0b\n\x07\x45XPIRED\x10\r\x12\n\n\x06\x46\x41ILED\x10\x0e*/\n\x11PaymentMethodType\x12\x10\n\x0c\x43\x41RD_PRESENT\x10\x00\x12\x08\n\x04MOTO\x10\x01*{\n\x10\x41\x64justmentStatus\x12!\n\x1d\x41\x44JUSTMENT_STATUS_UNSPECIFIED\x10\x00\x12\x16\n\x12\x41\x44JUSTMENT_PENDING\x10\x01\x12\x16\n\x12\x41\x44JUSTMENT_SUCCESS\x10\x02\x12\x14\n\x10\x41\x44JUSTMENT_ERROR\x10\x03*j\n\x0cRefundStatus\x12\x1d\n\x19REFUND_STATUS_UNSPECIFIED\x10\x00\x12\x12\n\x0eREFUND_PENDING\x10\x01\x12\x14\n\x10REFUND_REQUESTED\x10\x02\x12\x11\n\rREFUND_FAILED\x10\x03\x32\xda\x07\n\x1aKodyPreAuthTerminalService\x12}\n\x0cPreAuthorise\x12\x34.com.kodypay.grpc.preauth.v1.PreAuthorisationRequest\x1a\x35.com.kodypay.grpc.preauth.v1.PreAuthorisationResponse0\x01\x12\x93\x01\n\x19PreAuthoriseWithCardToken\x12=.com.kodypay.grpc.preauth.v1.PreAuthoriseWithCardTokenRequest\x1a\x35.com.kodypay.grpc.preauth.v1.PreAuthorisationResponse0\x01\x12\x87\x01\n\x12TopUpAuthorisation\x12\x36.com.kodypay.grpc.preauth.v1.TopUpAuthorisationRequest\x1a\x37.com.kodypay.grpc.preauth.v1.TopUpAuthorisationResponse0\x01\x12\x8b\x01\n\x14\x43\x61ptureAuthorisation\x12\x38.com.kodypay.grpc.preauth.v1.CaptureAuthorisationRequest\x1a\x39.com.kodypay.grpc.preauth.v1.CaptureAuthorisationResponse\x12\x8b\x01\n\x14ReleaseAuthorisation\x12\x38.com.kodypay.grpc.preauth.v1.ReleaseAuthorisationRequest\x1a\x39.com.kodypay.grpc.preauth.v1.ReleaseAuthorisationResponse\x12\x88\x01\n\x13GetPreAuthorisation\x12\x37.com.kodypay.grpc.preauth.v1.GetPreAuthorisationRequest\x1a\x38.com.kodypay.grpc.preauth.v1.GetPreAuthorisationResponse\x12v\n\rRefundCapture\x12\x31.com.kodypay.grpc.preauth.v1.RefundCaptureRequest\x1a\x32.com.kodypay.grpc.preauth.v1.RefundCaptureResponseB1\n\x1b\x63om.kodypay.grpc.preauth.v1B\x10KodyPreAuthProtoP\x01\x62\x06proto3"
         | 
| 11 12 |  | 
| 12 13 | 
             
            pool = ::Google::Protobuf::DescriptorPool.generated_pool
         | 
| 13 14 | 
             
            pool.add_serialized_file(descriptor_data)
         | 
| @@ -19,28 +20,25 @@ module Com | |
| 19 20 | 
             
                    module V1
         | 
| 20 21 | 
             
                      PreAuthorisationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.kodypay.grpc.preauth.v1.PreAuthorisationRequest").msgclass
         | 
| 21 22 | 
             
                      PreAuthorisationResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.kodypay.grpc.preauth.v1.PreAuthorisationResponse").msgclass
         | 
| 22 | 
            -
                       | 
| 23 | 
            -
                      PreAuthorisationResponse::Error = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.kodypay.grpc.preauth.v1.PreAuthorisationResponse.Error").msgclass
         | 
| 23 | 
            +
                      PreAuthoriseWithCardTokenRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.kodypay.grpc.preauth.v1.PreAuthoriseWithCardTokenRequest").msgclass
         | 
| 24 24 | 
             
                      TopUpAuthorisationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.kodypay.grpc.preauth.v1.TopUpAuthorisationRequest").msgclass
         | 
| 25 25 | 
             
                      TopUpAuthorisationResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.kodypay.grpc.preauth.v1.TopUpAuthorisationResponse").msgclass
         | 
| 26 | 
            -
                      TopUpAuthorisationResponse::Success = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.kodypay.grpc.preauth.v1.TopUpAuthorisationResponse.Success").msgclass
         | 
| 27 | 
            -
                      TopUpAuthorisationResponse::Error = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.kodypay.grpc.preauth.v1.TopUpAuthorisationResponse.Error").msgclass
         | 
| 28 26 | 
             
                      CaptureAuthorisationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.kodypay.grpc.preauth.v1.CaptureAuthorisationRequest").msgclass
         | 
| 29 27 | 
             
                      CaptureAuthorisationResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.kodypay.grpc.preauth.v1.CaptureAuthorisationResponse").msgclass
         | 
| 30 | 
            -
                      CaptureAuthorisationResponse::Success = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.kodypay.grpc.preauth.v1.CaptureAuthorisationResponse.Success").msgclass
         | 
| 31 | 
            -
                      CaptureAuthorisationResponse::Error = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.kodypay.grpc.preauth.v1.CaptureAuthorisationResponse.Error").msgclass
         | 
| 32 28 | 
             
                      ReleaseAuthorisationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.kodypay.grpc.preauth.v1.ReleaseAuthorisationRequest").msgclass
         | 
| 33 29 | 
             
                      ReleaseAuthorisationResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.kodypay.grpc.preauth.v1.ReleaseAuthorisationResponse").msgclass
         | 
| 34 | 
            -
                      ReleaseAuthorisationResponse::Success = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.kodypay.grpc.preauth.v1.ReleaseAuthorisationResponse.Success").msgclass
         | 
| 35 | 
            -
                      ReleaseAuthorisationResponse::Error = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.kodypay.grpc.preauth.v1.ReleaseAuthorisationResponse.Error").msgclass
         | 
| 36 30 | 
             
                      GetPreAuthorisationRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.kodypay.grpc.preauth.v1.GetPreAuthorisationRequest").msgclass
         | 
| 37 31 | 
             
                      GetPreAuthorisationResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.kodypay.grpc.preauth.v1.GetPreAuthorisationResponse").msgclass
         | 
| 38 | 
            -
                       | 
| 39 | 
            -
                       | 
| 40 | 
            -
                       | 
| 32 | 
            +
                      RefundCaptureRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.kodypay.grpc.preauth.v1.RefundCaptureRequest").msgclass
         | 
| 33 | 
            +
                      RefundCaptureResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.kodypay.grpc.preauth.v1.RefundCaptureResponse").msgclass
         | 
| 34 | 
            +
                      PaymentCard = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.kodypay.grpc.preauth.v1.PaymentCard").msgclass
         | 
| 35 | 
            +
                      Adjustment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.kodypay.grpc.preauth.v1.Adjustment").msgclass
         | 
| 36 | 
            +
                      Capture = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.kodypay.grpc.preauth.v1.Capture").msgclass
         | 
| 37 | 
            +
                      Capture::CaptureStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.kodypay.grpc.preauth.v1.Capture.CaptureStatus").enummodule
         | 
| 41 38 | 
             
                      AuthStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.kodypay.grpc.preauth.v1.AuthStatus").enummodule
         | 
| 42 | 
            -
                      PaymentMethods = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.kodypay.grpc.preauth.v1.PaymentMethods").enummodule
         | 
| 43 39 | 
             
                      PaymentMethodType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.kodypay.grpc.preauth.v1.PaymentMethodType").enummodule
         | 
| 40 | 
            +
                      AdjustmentStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.kodypay.grpc.preauth.v1.AdjustmentStatus").enummodule
         | 
| 41 | 
            +
                      RefundStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.kodypay.grpc.preauth.v1.RefundStatus").enummodule
         | 
| 44 42 | 
             
                    end
         | 
| 45 43 | 
             
                  end
         | 
| 46 44 | 
             
                end
         | 
    
        data/lib/preauth_services_pb.rb
    CHANGED
    
    | @@ -20,15 +20,19 @@ module Com | |
| 20 20 |  | 
| 21 21 | 
             
                          # Initiates a pre-authorisation on a specific payment terminal.
         | 
| 22 22 | 
             
                          # The terminal will then prompt the customer to present their card.
         | 
| 23 | 
            -
                          rpc :PreAuthorise, ::Com::Kodypay::Grpc::Preauth::V1::PreAuthorisationRequest, ::Com::Kodypay::Grpc::Preauth::V1::PreAuthorisationResponse
         | 
| 23 | 
            +
                          rpc :PreAuthorise, ::Com::Kodypay::Grpc::Preauth::V1::PreAuthorisationRequest, stream(::Com::Kodypay::Grpc::Preauth::V1::PreAuthorisationResponse)
         | 
| 24 | 
            +
                          # Initiates a pre-authorisation using a stored card token.
         | 
| 25 | 
            +
                          rpc :PreAuthoriseWithCardToken, ::Com::Kodypay::Grpc::Preauth::V1::PreAuthoriseWithCardTokenRequest, stream(::Com::Kodypay::Grpc::Preauth::V1::PreAuthorisationResponse)
         | 
| 24 26 | 
             
                          # Increases the authorised amount on an existing pre-authorisation.
         | 
| 25 | 
            -
                          rpc :TopUpAuthorisation, ::Com::Kodypay::Grpc::Preauth::V1::TopUpAuthorisationRequest, ::Com::Kodypay::Grpc::Preauth::V1::TopUpAuthorisationResponse
         | 
| 27 | 
            +
                          rpc :TopUpAuthorisation, ::Com::Kodypay::Grpc::Preauth::V1::TopUpAuthorisationRequest, stream(::Com::Kodypay::Grpc::Preauth::V1::TopUpAuthorisationResponse)
         | 
| 26 28 | 
             
                          # Captures the funds from an existing pre-authorisation to finalise a payment.
         | 
| 27 29 | 
             
                          rpc :CaptureAuthorisation, ::Com::Kodypay::Grpc::Preauth::V1::CaptureAuthorisationRequest, ::Com::Kodypay::Grpc::Preauth::V1::CaptureAuthorisationResponse
         | 
| 28 30 | 
             
                          # Releases the hold on funds from an existing pre-authorisation.
         | 
| 29 31 | 
             
                          rpc :ReleaseAuthorisation, ::Com::Kodypay::Grpc::Preauth::V1::ReleaseAuthorisationRequest, ::Com::Kodypay::Grpc::Preauth::V1::ReleaseAuthorisationResponse
         | 
| 30 32 | 
             
                          # Retrieves the current state and details of a pre-authorisation.
         | 
| 31 33 | 
             
                          rpc :GetPreAuthorisation, ::Com::Kodypay::Grpc::Preauth::V1::GetPreAuthorisationRequest, ::Com::Kodypay::Grpc::Preauth::V1::GetPreAuthorisationResponse
         | 
| 34 | 
            +
                          # Issues a refund against a previously captured authorisation using the capture_id.
         | 
| 35 | 
            +
                          rpc :RefundCapture, ::Com::Kodypay::Grpc::Preauth::V1::RefundCaptureRequest, ::Com::Kodypay::Grpc::Preauth::V1::RefundCaptureResponse
         | 
| 32 36 | 
             
                        end
         | 
| 33 37 |  | 
| 34 38 | 
             
                        Stub = Service.rpc_stub_class
         | 
    
        data/lib/token_pb.rb
    ADDED
    
    | @@ -0,0 +1,33 @@ | |
| 1 | 
            +
            # frozen_string_literal: true
         | 
| 2 | 
            +
            # Generated by the protocol buffer compiler.  DO NOT EDIT!
         | 
| 3 | 
            +
            # source: com/kodypay/grpc/pay/v1/token.proto
         | 
| 4 | 
            +
             | 
| 5 | 
            +
            require 'google/protobuf'
         | 
| 6 | 
            +
             | 
| 7 | 
            +
            require 'google/protobuf/timestamp_pb'
         | 
| 8 | 
            +
            require_relative "enums_pb"
         | 
| 9 | 
            +
             | 
| 10 | 
            +
             | 
| 11 | 
            +
            descriptor_data = "\n#com/kodypay/grpc/pay/v1/token.proto\x12\x17\x63om.kodypay.grpc.pay.v1\x1a\x1fgoogle/protobuf/timestamp.proto\x1a#com/kodypay/grpc/common/enums.proto\"\x86\x02\n\x16\x43reateCardTokenRequest\x12\x10\n\x08store_id\x18\x01 \x01(\t\x12\x13\n\x0bterminal_id\x18\x02 \x01(\t\x12\x18\n\x10idempotency_uuid\x18\x03 \x01(\t\x12\x17\n\x0ftoken_reference\x18\x04 \x01(\t\x12\x17\n\x0fpayer_reference\x18\x05 \x01(\t\x12Z\n\x1arecurring_processing_model\x18\x06 \x01(\x0e\x32\x31.com.kodypay.grpc.common.RecurringProcessingModelH\x00\x88\x01\x01\x42\x1d\n\x1b_recurring_processing_model\"9\n\x13GetCardTokenRequest\x12\x10\n\x08store_id\x18\x01 \x01(\t\x12\x10\n\x08token_id\x18\x02 \x01(\t\"\x9b\x05\n\x14TokenDetailsResponse\x12\x10\n\x08token_id\x18\x01 \x01(\t\x12\x17\n\x0ftoken_reference\x18\x02 \x01(\t\x12\x1a\n\rpayment_token\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x17\n\x0fpayer_reference\x18\x04 \x01(\t\x12Z\n\x1arecurring_processing_model\x18\x05 \x01(\x0e\x32\x31.com.kodypay.grpc.common.RecurringProcessingModelH\x01\x88\x01\x01\x12\x38\n\x06status\x18\x06 \x01(\x0e\x32(.com.kodypay.grpc.common.CardTokenStatus\x12\x33\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x02\x88\x01\x01\x12N\n\tcard_info\x18\x08 \x01(\x0b\x32\x36.com.kodypay.grpc.pay.v1.TokenDetailsResponse.CardInfoH\x03\x88\x01\x01\x1a\xb9\x01\n\x08\x43\x61rdInfo\x12?\n\x0epayment_method\x18\x01 \x01(\x0e\x32\'.com.kodypay.grpc.common.PaymentMethods\x12\x1e\n\x16payment_method_variant\x18\x02 \x01(\t\x12\x1a\n\x12\x63\x61rd_last_4_digits\x18\x03 \x01(\t\x12\x18\n\x10\x63\x61rd_expiry_date\x18\x04 \x01(\t\x12\x16\n\x0epos_entry_mode\x18\x05 \x01(\tB\x10\n\x0e_payment_tokenB\x1d\n\x1b_recurring_processing_modelB\r\n\x0b_created_atB\x0c\n\n_card_info\"\xda\x03\n\x17PayWithCardTokenRequest\x12\x10\n\x08store_id\x18\x01 \x01(\t\x12\x0e\n\x06\x61mount\x18\x02 \x01(\t\x12\x10\n\x08\x63urrency\x18\x03 \x01(\t\x12\x15\n\rpayment_token\x18\x04 \x01(\t\x12\x13\n\x0b\x65xpiry_date\x18\x05 \x01(\t\x12\x18\n\x10idempotency_uuid\x18\x06 \x01(\t\x12\x1e\n\x11payment_reference\x18\x07 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x08order_id\x18\x08 \x01(\tH\x01\x88\x01\x01\x12\x1f\n\x12merchant_reference\x18\t \x01(\tH\x02\x88\x01\x01\x12\x1c\n\x0fpayer_reference\x18\n \x01(\tH\x03\x88\x01\x01\x12P\n\x08metadata\x18\x0b \x03(\x0b\x32>.com.kodypay.grpc.pay.v1.PayWithCardTokenRequest.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x14\n\x12_payment_referenceB\x0b\n\t_order_idB\x15\n\x13_merchant_referenceB\x12\n\x10_payer_reference\"s\n\x16GetTokenPaymentRequest\x12\x10\n\x08store_id\x18\x01 \x01(\t\x12\x14\n\npayment_id\x18\x02 \x01(\tH\x00\x12\x1b\n\x11payment_reference\x18\x03 \x01(\tH\x00\x42\x14\n\x12payment_identifier\"\xef\x06\n\x14TokenPaymentResponse\x12\x12\n\npayment_id\x18\x01 \x01(\t\x12\x15\n\rpsp_reference\x18\x02 \x01(\t\x12S\n\x0epayment_status\x18\x03 \x01(\x0e\x32;.com.kodypay.grpc.pay.v1.TokenPaymentResponse.PaymentStatus\x12\x13\n\x06\x61mount\x18\x04 \x01(\tH\x00\x88\x01\x01\x12\x15\n\x08\x63urrency\x18\x05 \x01(\tH\x01\x88\x01\x01\x12\x1e\n\x11payment_reference\x18\x06 \x01(\tH\x02\x88\x01\x01\x12\x15\n\x08order_id\x18\x07 \x01(\tH\x03\x88\x01\x01\x12\x1f\n\x12merchant_reference\x18\x08 \x01(\tH\x04\x88\x01\x01\x12\x35\n\x0cpayment_date\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x05\x88\x01\x01\x12$\n\x17original_card_last_four\x18\n \x01(\tH\x06\x88\x01\x01\x12 \n\x13original_card_brand\x18\x0b \x01(\tH\x07\x88\x01\x01\x12\"\n\x15original_card_variant\x18\x0c \x01(\tH\x08\x88\x01\x01\x12\x16\n\tauth_code\x18\r \x01(\tH\t\x88\x01\x01\x12\x1b\n\x0e\x66\x61ilure_reason\x18\x0e \x01(\tH\n\x88\x01\x01\"\xa8\x01\n\rPaymentStatus\x12\x1e\n\x1aPAYMENT_STATUS_UNSPECIFIED\x10\x00\x12\x07\n\x03NEW\x10\x01\x12\x12\n\x0ePRE_AUTHORISED\x10\x02\x12\x0e\n\nAUTHORISED\x10\x03\x12\r\n\tCANCELLED\x10\x04\x12\t\n\x05\x45RROR\x10\x05\x12\x0b\n\x07REFUSED\x10\x06\x12\x13\n\x0fPENDING_CAPTURE\x10\x07\x12\x0e\n\nCANCELLING\x10\x08\x42\t\n\x07_amountB\x0b\n\t_currencyB\x14\n\x12_payment_referenceB\x0b\n\t_order_idB\x15\n\x13_merchant_referenceB\x0f\n\r_payment_dateB\x1a\n\x18_original_card_last_fourB\x16\n\x14_original_card_brandB\x18\n\x16_original_card_variantB\x0c\n\n_auth_codeB\x11\n\x0f_failure_reason2\xe4\x03\n\x18KodyTerminalTokenService\x12s\n\x0f\x43reateCardToken\x12/.com.kodypay.grpc.pay.v1.CreateCardTokenRequest\x1a-.com.kodypay.grpc.pay.v1.TokenDetailsResponse0\x01\x12k\n\x0cGetCardToken\x12,.com.kodypay.grpc.pay.v1.GetCardTokenRequest\x1a-.com.kodypay.grpc.pay.v1.TokenDetailsResponse\x12s\n\x10PayWithCardToken\x12\x30.com.kodypay.grpc.pay.v1.PayWithCardTokenRequest\x1a-.com.kodypay.grpc.pay.v1.TokenPaymentResponse\x12q\n\x0fGetTokenPayment\x12/.com.kodypay.grpc.pay.v1.GetTokenPaymentRequest\x1a-.com.kodypay.grpc.pay.v1.TokenPaymentResponseB3\n\x17\x63om.kodypay.grpc.pay.v1B\x16KodyTerminalTokenProtoP\x01\x62\x06proto3"
         | 
| 12 | 
            +
             | 
| 13 | 
            +
            pool = ::Google::Protobuf::DescriptorPool.generated_pool
         | 
| 14 | 
            +
            pool.add_serialized_file(descriptor_data)
         | 
| 15 | 
            +
             | 
| 16 | 
            +
            module Com
         | 
| 17 | 
            +
              module Kodypay
         | 
| 18 | 
            +
                module Grpc
         | 
| 19 | 
            +
                  module Pay
         | 
| 20 | 
            +
                    module V1
         | 
| 21 | 
            +
                      CreateCardTokenRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.kodypay.grpc.pay.v1.CreateCardTokenRequest").msgclass
         | 
| 22 | 
            +
                      GetCardTokenRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.kodypay.grpc.pay.v1.GetCardTokenRequest").msgclass
         | 
| 23 | 
            +
                      TokenDetailsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.kodypay.grpc.pay.v1.TokenDetailsResponse").msgclass
         | 
| 24 | 
            +
                      TokenDetailsResponse::CardInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.kodypay.grpc.pay.v1.TokenDetailsResponse.CardInfo").msgclass
         | 
| 25 | 
            +
                      PayWithCardTokenRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.kodypay.grpc.pay.v1.PayWithCardTokenRequest").msgclass
         | 
| 26 | 
            +
                      GetTokenPaymentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.kodypay.grpc.pay.v1.GetTokenPaymentRequest").msgclass
         | 
| 27 | 
            +
                      TokenPaymentResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.kodypay.grpc.pay.v1.TokenPaymentResponse").msgclass
         | 
| 28 | 
            +
                      TokenPaymentResponse::PaymentStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("com.kodypay.grpc.pay.v1.TokenPaymentResponse.PaymentStatus").enummodule
         | 
| 29 | 
            +
                    end
         | 
| 30 | 
            +
                  end
         | 
| 31 | 
            +
                end
         | 
| 32 | 
            +
              end
         | 
| 33 | 
            +
            end
         | 
| @@ -0,0 +1,34 @@ | |
| 1 | 
            +
            # Generated by the protocol buffer compiler.  DO NOT EDIT!
         | 
| 2 | 
            +
            # Source: com/kodypay/grpc/pay/v1/token.proto for package 'com.kodypay.grpc.pay.v1'
         | 
| 3 | 
            +
             | 
| 4 | 
            +
            require 'grpc'
         | 
| 5 | 
            +
            require_relative "token_pb"
         | 
| 6 | 
            +
             | 
| 7 | 
            +
            module Com
         | 
| 8 | 
            +
              module Kodypay
         | 
| 9 | 
            +
                module Grpc
         | 
| 10 | 
            +
                  module Pay
         | 
| 11 | 
            +
                    module V1
         | 
| 12 | 
            +
                      module KodyTerminalTokenService
         | 
| 13 | 
            +
                        # All service requests require X-API-Key header with 'API Key' value
         | 
| 14 | 
            +
                        class Service
         | 
| 15 | 
            +
             | 
| 16 | 
            +
                          include ::GRPC::GenericService
         | 
| 17 | 
            +
             | 
| 18 | 
            +
                          self.marshal_class_method = :encode
         | 
| 19 | 
            +
                          self.unmarshal_class_method = :decode
         | 
| 20 | 
            +
                          self.service_name = 'com.kodypay.grpc.pay.v1.KodyTerminalTokenService'
         | 
| 21 | 
            +
             | 
| 22 | 
            +
                          rpc :CreateCardToken, ::Com::Kodypay::Grpc::Pay::V1::CreateCardTokenRequest, stream(::Com::Kodypay::Grpc::Pay::V1::TokenDetailsResponse)
         | 
| 23 | 
            +
                          rpc :GetCardToken, ::Com::Kodypay::Grpc::Pay::V1::GetCardTokenRequest, ::Com::Kodypay::Grpc::Pay::V1::TokenDetailsResponse
         | 
| 24 | 
            +
                          rpc :PayWithCardToken, ::Com::Kodypay::Grpc::Pay::V1::PayWithCardTokenRequest, ::Com::Kodypay::Grpc::Pay::V1::TokenPaymentResponse
         | 
| 25 | 
            +
                          rpc :GetTokenPayment, ::Com::Kodypay::Grpc::Pay::V1::GetTokenPaymentRequest, ::Com::Kodypay::Grpc::Pay::V1::TokenPaymentResponse
         | 
| 26 | 
            +
                        end
         | 
| 27 | 
            +
             | 
| 28 | 
            +
                        Stub = Service.rpc_stub_class
         | 
| 29 | 
            +
                      end
         | 
| 30 | 
            +
                    end
         | 
| 31 | 
            +
                  end
         | 
| 32 | 
            +
                end
         | 
| 33 | 
            +
              end
         | 
| 34 | 
            +
            end
         | 
| @@ -2,40 +2,49 @@ | |
| 2 2 |  | 
| 3 3 | 
             
            require 'json'
         | 
| 4 4 |  | 
| 5 | 
            -
            puts "š  | 
| 6 | 
            -
            puts " | 
| 7 | 
            -
             | 
| 8 | 
            -
            # Your real credentials
         | 
| 9 | 
            -
            api_key = 'zsr1gGOKCCk4HB-rKLESwJHWs0kmONj1p-HT7txoVqCn'
         | 
| 10 | 
            -
            store_id = '7fbec013-34e1-4e93-a0ee-f4f91b94eb17'
         | 
| 11 | 
            -
            endpoint = 'grpc-staging-ap.kodypay.com:443'
         | 
| 12 | 
            -
             | 
| 13 | 
            -
            puts "š” Endpoint: #{endpoint}"
         | 
| 14 | 
            -
            puts "š Store ID: #{store_id}"
         | 
| 15 | 
            -
            puts "šļø API Key: #{api_key[0..10]}..."
         | 
| 5 | 
            +
            puts "š KodyPay Ruby SDK Sample - GetPayments API"
         | 
| 6 | 
            +
            puts "============================================="
         | 
| 7 | 
            +
            puts "š¦ Using kody-clientsdk-ruby gem from RubyGems"
         | 
| 16 8 | 
             
            puts
         | 
| 17 9 |  | 
| 10 | 
            +
            # Configuration - replace with your actual credentials
         | 
| 11 | 
            +
            api_key = ENV['KODY_API_KEY'] || 'your-api-key-here'
         | 
| 12 | 
            +
            store_id = ENV['KODY_STORE_ID'] || 'your-store-id-here'
         | 
| 13 | 
            +
             | 
| 18 14 | 
             
            begin
         | 
| 19 | 
            -
               | 
| 15 | 
            +
              # Require the published gem
         | 
| 16 | 
            +
              require 'kody'
         | 
| 20 17 |  | 
| 21 | 
            -
              #  | 
| 18 | 
            +
              # Configure KodyPay SDK
         | 
| 19 | 
            +
              Kody.configure do |config|
         | 
| 20 | 
            +
                config.staging_ap!  # Use Asia-Pacific staging endpoint
         | 
| 21 | 
            +
                config.api_key = api_key
         | 
| 22 | 
            +
                config.store_id = store_id
         | 
| 23 | 
            +
              end
         | 
| 24 | 
            +
             | 
| 25 | 
            +
              puts "š” Endpoint: #{Kody.configuration.endpoint}"
         | 
| 26 | 
            +
              puts "š Store ID: #{Kody.configuration.store_id[0..8]}..."
         | 
| 27 | 
            +
              puts "šļø API Key: #{Kody.configuration.api_key[0..10]}..."
         | 
| 28 | 
            +
              puts
         | 
| 29 | 
            +
             | 
| 30 | 
            +
              # Create the stub using configuration
         | 
| 22 31 | 
             
              stub = Com::Kodypay::Grpc::Ecom::V1::KodyEcomPaymentsService::Stub.new(
         | 
| 23 | 
            -
                endpoint,
         | 
| 32 | 
            +
                Kody.configuration.endpoint,
         | 
| 24 33 | 
             
                GRPC::Core::ChannelCredentials.new
         | 
| 25 34 | 
             
              )
         | 
| 26 35 |  | 
| 27 36 | 
             
              request = Com::Kodypay::Grpc::Ecom::V1::GetPaymentsRequest.new(
         | 
| 28 | 
            -
                store_id: store_id,
         | 
| 37 | 
            +
                store_id: Kody.configuration.store_id,
         | 
| 29 38 | 
             
                page_cursor: Com::Kodypay::Grpc::Ecom::V1::GetPaymentsRequest::PageCursor.new(
         | 
| 30 39 | 
             
                  page: 1,
         | 
| 31 40 | 
             
                  page_size: 10
         | 
| 32 41 | 
             
                )
         | 
| 33 42 | 
             
              )
         | 
| 34 43 |  | 
| 35 | 
            -
              puts "š¤ Making  | 
| 36 | 
            -
              response = stub.get_payments(request, metadata: { 'x-api-key' => api_key })
         | 
| 44 | 
            +
              puts "š¤ Making gRPC call to GetPayments API..."
         | 
| 45 | 
            +
              response = stub.get_payments(request, metadata: { 'x-api-key' => Kody.configuration.api_key })
         | 
| 37 46 |  | 
| 38 | 
            -
              puts "š SUCCESS!  | 
| 47 | 
            +
              puts "š SUCCESS! Response from KodyPay API:"
         | 
| 39 48 | 
             
              puts "š Total payments: #{response.response.total}"
         | 
| 40 49 |  | 
| 41 50 | 
             
              if response.response.payments.empty?
         | 
| @@ -59,10 +68,15 @@ begin | |
| 59 68 |  | 
| 60 69 | 
             
            rescue GRPC::BadStatus => e
         | 
| 61 70 | 
             
              puts "ā gRPC API Error: #{e.code} - #{e.message}"
         | 
| 62 | 
            -
              puts "š”  | 
| 71 | 
            +
              puts "š” Check your API credentials and store permissions"
         | 
| 63 72 | 
             
            rescue LoadError => e
         | 
| 64 73 | 
             
              puts "ā Missing dependency: #{e.message}"
         | 
| 74 | 
            +
              puts "š” Install the gem with: gem install kody-clientsdk-ruby"
         | 
| 65 75 | 
             
            rescue => e
         | 
| 66 76 | 
             
              puts "ā Error: #{e.message}"
         | 
| 67 77 | 
             
              puts "š #{e.backtrace.first}"
         | 
| 68 | 
            -
            end
         | 
| 78 | 
            +
            end
         | 
| 79 | 
            +
             | 
| 80 | 
            +
            puts "\nš Documentation:"
         | 
| 81 | 
            +
            puts "   RubyGems: https://rubygems.org/gems/kody-clientsdk-ruby"
         | 
| 82 | 
            +
            puts "   GitHub: https://github.com/KodyPay/kody-clientsdk-ruby"
         | 
| @@ -0,0 +1,77 @@ | |
| 1 | 
            +
            #!/usr/bin/env ruby
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            puts "š KodyPay Ruby SDK Sample - GetTerminals API"
         | 
| 4 | 
            +
            puts "============================================="
         | 
| 5 | 
            +
            puts "š¦ Using kody-clientsdk-ruby gem from RubyGems"
         | 
| 6 | 
            +
            puts
         | 
| 7 | 
            +
             | 
| 8 | 
            +
            # Configuration - replace with your actual credentials
         | 
| 9 | 
            +
            api_key = ENV['KODY_API_KEY'] || 'your-api-key-here'
         | 
| 10 | 
            +
            store_id = ENV['KODY_STORE_ID'] || 'your-store-id-here'
         | 
| 11 | 
            +
             | 
| 12 | 
            +
            begin
         | 
| 13 | 
            +
              # Require the published gem
         | 
| 14 | 
            +
              require 'kody'
         | 
| 15 | 
            +
             | 
| 16 | 
            +
              # Configure KodyPay SDK
         | 
| 17 | 
            +
              Kody.configure do |config|
         | 
| 18 | 
            +
                config.staging_ap!  # Use Asia-Pacific staging endpoint
         | 
| 19 | 
            +
                config.api_key = api_key
         | 
| 20 | 
            +
                config.store_id = store_id
         | 
| 21 | 
            +
              end
         | 
| 22 | 
            +
             | 
| 23 | 
            +
              puts "š” Endpoint: #{Kody.configuration.endpoint}"
         | 
| 24 | 
            +
              puts "š Store ID: #{Kody.configuration.store_id[0..8]}..."
         | 
| 25 | 
            +
              puts "šļø API Key: #{Kody.configuration.api_key[0..10]}..."
         | 
| 26 | 
            +
              puts
         | 
| 27 | 
            +
             | 
| 28 | 
            +
              # Create the Terminal API stub using configuration
         | 
| 29 | 
            +
              stub = Com::Kodypay::Grpc::Pay::V1::KodyPayTerminalService::Stub.new(
         | 
| 30 | 
            +
                Kody.configuration.endpoint,
         | 
| 31 | 
            +
                GRPC::Core::ChannelCredentials.new
         | 
| 32 | 
            +
              )
         | 
| 33 | 
            +
             | 
| 34 | 
            +
              request = Com::Kodypay::Grpc::Pay::V1::TerminalsRequest.new(
         | 
| 35 | 
            +
                store_id: Kody.configuration.store_id
         | 
| 36 | 
            +
              )
         | 
| 37 | 
            +
             | 
| 38 | 
            +
              puts "š¤ Making gRPC call to GetTerminals API..."
         | 
| 39 | 
            +
              response = stub.terminals(request, metadata: { 'x-api-key' => Kody.configuration.api_key })
         | 
| 40 | 
            +
             | 
| 41 | 
            +
              puts "š SUCCESS! Response from KodyPay Terminal API:"
         | 
| 42 | 
            +
              puts "š„ļø Total terminals: #{response.terminals.length}"
         | 
| 43 | 
            +
             | 
| 44 | 
            +
              if response.terminals.empty?
         | 
| 45 | 
            +
                puts "š No terminals found for this store"
         | 
| 46 | 
            +
              else
         | 
| 47 | 
            +
                response.terminals.each_with_index do |terminal, index|
         | 
| 48 | 
            +
                  status = terminal.online ? "š¢ Online" : "š“ Offline"
         | 
| 49 | 
            +
                  puts "\nš„ļø Terminal #{index + 1}:"
         | 
| 50 | 
            +
                  puts "   ID: #{terminal.terminal_id}"
         | 
| 51 | 
            +
                  puts "   Status: #{status}"
         | 
| 52 | 
            +
                  
         | 
| 53 | 
            +
                  if terminal.respond_to?(:last_activity_at) && terminal.last_activity_at
         | 
| 54 | 
            +
                    last_activity = Time.at(terminal.last_activity_at.seconds).strftime('%Y-%m-%d %H:%M:%S')
         | 
| 55 | 
            +
                    puts "   Last Activity: #{last_activity}"
         | 
| 56 | 
            +
                  end
         | 
| 57 | 
            +
                  
         | 
| 58 | 
            +
                  if terminal.respond_to?(:version) && terminal.version && !terminal.version.empty?
         | 
| 59 | 
            +
                    puts "   Version: #{terminal.version}"
         | 
| 60 | 
            +
                  end
         | 
| 61 | 
            +
                end
         | 
| 62 | 
            +
              end
         | 
| 63 | 
            +
             | 
| 64 | 
            +
            rescue GRPC::BadStatus => e
         | 
| 65 | 
            +
              puts "ā gRPC API Error: #{e.code} - #{e.message}"
         | 
| 66 | 
            +
              puts "š” Check your API credentials and store permissions"
         | 
| 67 | 
            +
            rescue LoadError => e
         | 
| 68 | 
            +
              puts "ā Missing dependency: #{e.message}"
         | 
| 69 | 
            +
              puts "š” Install the gem with: gem install kody-clientsdk-ruby"
         | 
| 70 | 
            +
            rescue => e
         | 
| 71 | 
            +
              puts "ā Error: #{e.message}"
         | 
| 72 | 
            +
              puts "š #{e.backtrace.first}"
         | 
| 73 | 
            +
            end
         | 
| 74 | 
            +
             | 
| 75 | 
            +
            puts "\nš Documentation:"
         | 
| 76 | 
            +
            puts "   RubyGems: https://rubygems.org/gems/kody-clientsdk-ruby"
         | 
| 77 | 
            +
            puts "   GitHub: https://github.com/KodyPay/kody-clientsdk-ruby"
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: kody-clientsdk-ruby
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 1.7. | 
| 4 | 
            +
              version: 1.7.25
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Kody Tech Team
         | 
| 8 8 | 
             
            autorequire:
         | 
| 9 9 | 
             
            bindir: exe
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2025- | 
| 11 | 
            +
            date: 2025-10-29 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: grpc
         | 
| @@ -120,6 +120,7 @@ files: | |
| 120 120 | 
             
            - kody-clientsdk-ruby.gemspec
         | 
| 121 121 | 
             
            - lib/ecom_pb.rb
         | 
| 122 122 | 
             
            - lib/ecom_services_pb.rb
         | 
| 123 | 
            +
            - lib/enums_pb.rb
         | 
| 123 124 | 
             
            - lib/error_pb.rb
         | 
| 124 125 | 
             
            - lib/inventory_pb.rb
         | 
| 125 126 | 
             
            - lib/inventory_services_pb.rb
         | 
| @@ -138,14 +139,19 @@ files: | |
| 138 139 | 
             
            - lib/poc_services_pb.rb
         | 
| 139 140 | 
             
            - lib/preauth_pb.rb
         | 
| 140 141 | 
             
            - lib/preauth_services_pb.rb
         | 
| 142 | 
            +
            - lib/token_pb.rb
         | 
| 143 | 
            +
            - lib/token_services_pb.rb
         | 
| 141 144 | 
             
            - samples/ecom/get_payments.rb
         | 
| 145 | 
            +
            - samples/pos/get_terminals.rb
         | 
| 142 146 | 
             
            homepage: https://github.com/KodyPay/kody-clientsdk-ruby
         | 
| 143 147 | 
             
            licenses:
         | 
| 144 148 | 
             
            - MIT
         | 
| 145 149 | 
             
            metadata:
         | 
| 146 150 | 
             
              homepage_uri: https://github.com/KodyPay/kody-clientsdk-ruby
         | 
| 147 151 | 
             
              source_code_uri: https://github.com/KodyPay/kody-clientsdk-ruby
         | 
| 148 | 
            -
              changelog_uri: https://github.com/KodyPay/kody-clientsdk-ruby/ | 
| 152 | 
            +
              changelog_uri: https://github.com/KodyPay/kody-clientsdk-ruby/releases
         | 
| 153 | 
            +
              documentation_uri: https://api-docs.kody.com
         | 
| 154 | 
            +
              bug_tracker_uri: https://github.com/KodyPay/kody-clientsdk-ruby/issues
         | 
| 149 155 | 
             
            post_install_message:
         | 
| 150 156 | 
             
            rdoc_options: []
         | 
| 151 157 | 
             
            require_paths:
         |