connect-sdk-ruby 2.22.0 → 2.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/connect-sdk-ruby.gemspec +1 -1
- data/examples/merchant/hostedcheckouts/delete_hosted_checkout_example.rb +22 -0
- data/examples/merchant/payouts/create_payout_example.rb +17 -13
- data/lib/ingenico/connect/sdk/domain/definitions/card_fraud_results.rb +9 -0
- data/lib/ingenico/connect/sdk/domain/definitions/microsoft_fraud_results.rb +32 -0
- data/lib/ingenico/connect/sdk/domain/payment/abstract_three_d_secure.rb +7 -0
- data/lib/ingenico/connect/sdk/domain/payment/customer_account_authentication.rb +7 -0
- data/lib/ingenico/connect/sdk/domain/payment/redirect_payment_product4101_specific_input.rb +12 -19
- data/lib/ingenico/connect/sdk/domain/payout/bank_transfer_payout_method_specific_input.rb +2 -0
- data/lib/ingenico/connect/sdk/domain/payout/card_payout_method_specific_input.rb +9 -0
- data/lib/ingenico/connect/sdk/domain/payout/create_payout_request.rb +14 -1
- data/lib/ingenico/connect/sdk/domain/payout/payout_details.rb +52 -0
- data/lib/ingenico/connect/sdk/domain/payout/payout_recipient.rb +46 -0
- data/lib/ingenico/connect/sdk/merchant/hostedcheckouts/hostedcheckouts_client.rb +29 -0
- data/lib/ingenico/connect/sdk/meta_data_provider.rb +1 -1
- data/lib/ingenico/connect/sdk/request_header.rb +4 -5
- metadata +6 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: a02706ec5b92c4aef370fa8a669581eaafc9cfec56c79969986656d71d73094d
         | 
| 4 | 
            +
              data.tar.gz: 751da15e062dda64a8fe59cd64c5b4c98ad2786f43c657aedd301d6cd8954483
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 879ed4b786ddbb83969554bf6bf5a784931d18c31dceec8c39e0efe4862b5d3dbb6118ee3354638f780e13509784f84904977aef2704d504e83a77b524c7ef93
         | 
| 7 | 
            +
              data.tar.gz: 48d48bfb9e023058d252dc3dd9c6b1246d693720a727e3f951ec0142598e6ca043cb24c57aa90b429dc4953c3ff57c3aec7aa2489919d021be1eb99a0a42716f
         | 
    
        data/connect-sdk-ruby.gemspec
    CHANGED
    
    | @@ -1,6 +1,6 @@ | |
| 1 1 | 
             
            Gem::Specification.new do |spec|
         | 
| 2 2 | 
             
              spec.name           = 'connect-sdk-ruby'
         | 
| 3 | 
            -
              spec.version        = '2. | 
| 3 | 
            +
              spec.version        = '2.26.0'
         | 
| 4 4 | 
             
              spec.authors        = ['Ingenico ePayments']
         | 
| 5 5 | 
             
              spec.email          = ['github@epay.ingenico.com']
         | 
| 6 6 | 
             
              spec.summary        = %q{SDK to communicate with the Ingenico ePayments platform using the Ingenico Connect Server API}
         | 
| @@ -0,0 +1,22 @@ | |
| 1 | 
            +
            #
         | 
| 2 | 
            +
            # This class was auto-generated from the API references found at
         | 
| 3 | 
            +
            # https://epayments-api.developer-ingenico.com/s2sapi/v1/
         | 
| 4 | 
            +
            #
         | 
| 5 | 
            +
            require 'ingenico/connect/sdk/factory'
         | 
| 6 | 
            +
             | 
| 7 | 
            +
             | 
| 8 | 
            +
            def example
         | 
| 9 | 
            +
              get_client do |client|
         | 
| 10 | 
            +
                client.merchant('merchantId').hostedcheckouts.delete('hostedCheckoutId')
         | 
| 11 | 
            +
              end
         | 
| 12 | 
            +
            end
         | 
| 13 | 
            +
             | 
| 14 | 
            +
            def get_client
         | 
| 15 | 
            +
              api_key_id = ENV.fetch('connect.api.apiKeyId', 'someKey')
         | 
| 16 | 
            +
              secret_api_key = ENV.fetch('connect.api.secretApiKey', 'someSecret')
         | 
| 17 | 
            +
              configuration_file_name = File.join(__FILE__, '..', '..', 'example_configuration.yml')
         | 
| 18 | 
            +
              yield client = Ingenico::Connect::SDK::Factory.create_client_from_file(configuration_file_name, api_key_id, secret_api_key)
         | 
| 19 | 
            +
            ensure
         | 
| 20 | 
            +
              # Free networking resources when done
         | 
| 21 | 
            +
              client.close unless client.nil?
         | 
| 22 | 
            +
            end
         | 
| @@ -14,6 +14,7 @@ require 'ingenico/connect/sdk/domain/payment/personal_name' | |
| 14 14 | 
             
            require 'ingenico/connect/sdk/domain/payout/bank_transfer_payout_method_specific_input'
         | 
| 15 15 | 
             
            require 'ingenico/connect/sdk/domain/payout/create_payout_request'
         | 
| 16 16 | 
             
            require 'ingenico/connect/sdk/domain/payout/payout_customer'
         | 
| 17 | 
            +
            require 'ingenico/connect/sdk/domain/payout/payout_details'
         | 
| 17 18 | 
             
            require 'ingenico/connect/sdk/domain/payout/payout_references'
         | 
| 18 19 |  | 
| 19 20 | 
             
            Definitions = Ingenico::Connect::SDK::Domain::Definitions
         | 
| @@ -22,14 +23,20 @@ Payout = Ingenico::Connect::SDK::Domain::Payout | |
| 22 23 |  | 
| 23 24 | 
             
            def example
         | 
| 24 25 | 
             
              get_client do |client|
         | 
| 25 | 
            -
                amount_of_money = Definitions::AmountOfMoney.new
         | 
| 26 | 
            -
                amount_of_money.amount = 2345
         | 
| 27 | 
            -
                amount_of_money.currency_code = 'EUR'
         | 
| 28 | 
            -
             | 
| 29 26 | 
             
                bank_account_iban = Definitions::BankAccountIban.new
         | 
| 30 27 | 
             
                bank_account_iban.account_holder_name = 'Wile E. Coyote'
         | 
| 31 28 | 
             
                bank_account_iban.iban = 'IT60X0542811101000000123456'
         | 
| 32 29 |  | 
| 30 | 
            +
                bank_transfer_payout_method_specific_input = Payout::BankTransferPayoutMethodSpecificInput.new
         | 
| 31 | 
            +
                bank_transfer_payout_method_specific_input.bank_account_iban = bank_account_iban
         | 
| 32 | 
            +
                bank_transfer_payout_method_specific_input.payout_date = '20150102'
         | 
| 33 | 
            +
                bank_transfer_payout_method_specific_input.payout_text = 'Payout Acme'
         | 
| 34 | 
            +
                bank_transfer_payout_method_specific_input.swift_code = 'swift'
         | 
| 35 | 
            +
             | 
| 36 | 
            +
                amount_of_money = Definitions::AmountOfMoney.new
         | 
| 37 | 
            +
                amount_of_money.amount = 2345
         | 
| 38 | 
            +
                amount_of_money.currency_code = 'EUR'
         | 
| 39 | 
            +
             | 
| 33 40 | 
             
                address = Definitions::Address.new
         | 
| 34 41 | 
             
                address.city = 'Burbank'
         | 
| 35 42 | 
             
                address.country_code = 'US'
         | 
| @@ -56,20 +63,17 @@ def example | |
| 56 63 | 
             
                customer.contact_details = contact_details
         | 
| 57 64 | 
             
                customer.name = name
         | 
| 58 65 |  | 
| 59 | 
            -
                bank_transfer_payout_method_specific_input = Payout::BankTransferPayoutMethodSpecificInput.new
         | 
| 60 | 
            -
                bank_transfer_payout_method_specific_input.bank_account_iban = bank_account_iban
         | 
| 61 | 
            -
                bank_transfer_payout_method_specific_input.customer = customer
         | 
| 62 | 
            -
                bank_transfer_payout_method_specific_input.payout_date = '20150102'
         | 
| 63 | 
            -
                bank_transfer_payout_method_specific_input.payout_text = 'Payout Acme'
         | 
| 64 | 
            -
                bank_transfer_payout_method_specific_input.swift_code = 'swift'
         | 
| 65 | 
            -
             | 
| 66 66 | 
             
                references = Payout::PayoutReferences.new
         | 
| 67 67 | 
             
                references.merchant_reference = 'AcmeOrder001'
         | 
| 68 68 |  | 
| 69 | 
            +
                payout_details = Payout::PayoutDetails.new
         | 
| 70 | 
            +
                payout_details.amount_of_money = amount_of_money
         | 
| 71 | 
            +
                payout_details.customer = customer
         | 
| 72 | 
            +
                payout_details.references = references
         | 
| 73 | 
            +
             | 
| 69 74 | 
             
                body = Payout::CreatePayoutRequest.new
         | 
| 70 | 
            -
                body.amount_of_money = amount_of_money
         | 
| 71 75 | 
             
                body.bank_transfer_payout_method_specific_input = bank_transfer_payout_method_specific_input
         | 
| 72 | 
            -
                body. | 
| 76 | 
            +
                body.payout_details = payout_details
         | 
| 73 77 |  | 
| 74 78 | 
             
                begin
         | 
| 75 79 | 
             
                  response = client.merchant('merchantId').payouts.create(body)
         | 
| @@ -5,6 +5,7 @@ | |
| 5 5 | 
             
            require 'ingenico/connect/sdk/domain/definitions/fraud_results'
         | 
| 6 6 | 
             
            require 'ingenico/connect/sdk/domain/definitions/fraud_results_retail_decisions'
         | 
| 7 7 | 
             
            require 'ingenico/connect/sdk/domain/definitions/fraugster_results'
         | 
| 8 | 
            +
            require 'ingenico/connect/sdk/domain/definitions/microsoft_fraud_results'
         | 
| 8 9 |  | 
| 9 10 | 
             
            module Ingenico::Connect::SDK
         | 
| 10 11 | 
             
              module Domain
         | 
| @@ -13,6 +14,7 @@ module Ingenico::Connect::SDK | |
| 13 14 | 
             
                  # @attr [String] avs_result
         | 
| 14 15 | 
             
                  # @attr [String] cvv_result
         | 
| 15 16 | 
             
                  # @attr [Ingenico::Connect::SDK::Domain::Definitions::FraugsterResults] fraugster
         | 
| 17 | 
            +
                  # @attr [Ingenico::Connect::SDK::Domain::Definitions::MicrosoftFraudResults] microsoft_fraud_protection
         | 
| 16 18 | 
             
                  # @attr [Ingenico::Connect::SDK::Domain::Definitions::FraudResultsRetailDecisions] retail_decisions
         | 
| 17 19 | 
             
                  class CardFraudResults < Ingenico::Connect::SDK::Domain::Definitions::FraudResults
         | 
| 18 20 |  | 
| @@ -22,6 +24,8 @@ module Ingenico::Connect::SDK | |
| 22 24 |  | 
| 23 25 | 
             
                    attr_accessor :fraugster
         | 
| 24 26 |  | 
| 27 | 
            +
                    attr_accessor :microsoft_fraud_protection
         | 
| 28 | 
            +
             | 
| 25 29 | 
             
                    attr_accessor :retail_decisions
         | 
| 26 30 |  | 
| 27 31 | 
             
                    # @return (Hash)
         | 
| @@ -30,6 +34,7 @@ module Ingenico::Connect::SDK | |
| 30 34 | 
             
                      hash['avsResult'] = @avs_result unless @avs_result.nil?
         | 
| 31 35 | 
             
                      hash['cvvResult'] = @cvv_result unless @cvv_result.nil?
         | 
| 32 36 | 
             
                      hash['fraugster'] = @fraugster.to_h unless @fraugster.nil?
         | 
| 37 | 
            +
                      hash['microsoftFraudProtection'] = @microsoft_fraud_protection.to_h unless @microsoft_fraud_protection.nil?
         | 
| 33 38 | 
             
                      hash['retailDecisions'] = @retail_decisions.to_h unless @retail_decisions.nil?
         | 
| 34 39 | 
             
                      hash
         | 
| 35 40 | 
             
                    end
         | 
| @@ -46,6 +51,10 @@ module Ingenico::Connect::SDK | |
| 46 51 | 
             
                        raise TypeError, "value '%s' is not a Hash" % [hash['fraugster']] unless hash['fraugster'].is_a? Hash
         | 
| 47 52 | 
             
                        @fraugster = Ingenico::Connect::SDK::Domain::Definitions::FraugsterResults.new_from_hash(hash['fraugster'])
         | 
| 48 53 | 
             
                      end
         | 
| 54 | 
            +
                      if hash.has_key? 'microsoftFraudProtection'
         | 
| 55 | 
            +
                        raise TypeError, "value '%s' is not a Hash" % [hash['microsoftFraudProtection']] unless hash['microsoftFraudProtection'].is_a? Hash
         | 
| 56 | 
            +
                        @microsoft_fraud_protection = Ingenico::Connect::SDK::Domain::Definitions::MicrosoftFraudResults.new_from_hash(hash['microsoftFraudProtection'])
         | 
| 57 | 
            +
                      end
         | 
| 49 58 | 
             
                      if hash.has_key? 'retailDecisions'
         | 
| 50 59 | 
             
                        raise TypeError, "value '%s' is not a Hash" % [hash['retailDecisions']] unless hash['retailDecisions'].is_a? Hash
         | 
| 51 60 | 
             
                        @retail_decisions = Ingenico::Connect::SDK::Domain::Definitions::FraudResultsRetailDecisions.new_from_hash(hash['retailDecisions'])
         | 
| @@ -0,0 +1,32 @@ | |
| 1 | 
            +
            #
         | 
| 2 | 
            +
            # This class was auto-generated from the API references found at
         | 
| 3 | 
            +
            # https://epayments-api.developer-ingenico.com/s2sapi/v1/
         | 
| 4 | 
            +
            #
         | 
| 5 | 
            +
            require 'ingenico/connect/sdk/data_object'
         | 
| 6 | 
            +
             | 
| 7 | 
            +
            module Ingenico::Connect::SDK
         | 
| 8 | 
            +
              module Domain
         | 
| 9 | 
            +
                module Definitions
         | 
| 10 | 
            +
             | 
| 11 | 
            +
                  # @attr [Integer] fraud_score
         | 
| 12 | 
            +
                  class MicrosoftFraudResults < Ingenico::Connect::SDK::DataObject
         | 
| 13 | 
            +
             | 
| 14 | 
            +
                    attr_accessor :fraud_score
         | 
| 15 | 
            +
             | 
| 16 | 
            +
                    # @return (Hash)
         | 
| 17 | 
            +
                    def to_h
         | 
| 18 | 
            +
                      hash = super
         | 
| 19 | 
            +
                      hash['fraudScore'] = @fraud_score unless @fraud_score.nil?
         | 
| 20 | 
            +
                      hash
         | 
| 21 | 
            +
                    end
         | 
| 22 | 
            +
             | 
| 23 | 
            +
                    def from_hash(hash)
         | 
| 24 | 
            +
                      super
         | 
| 25 | 
            +
                      if hash.has_key? 'fraudScore'
         | 
| 26 | 
            +
                        @fraud_score = hash['fraudScore']
         | 
| 27 | 
            +
                      end
         | 
| 28 | 
            +
                    end
         | 
| 29 | 
            +
                  end
         | 
| 30 | 
            +
                end
         | 
| 31 | 
            +
              end
         | 
| 32 | 
            +
            end
         | 
| @@ -19,6 +19,7 @@ module Ingenico::Connect::SDK | |
| 19 19 | 
             
                  # @attr [Ingenico::Connect::SDK::Domain::Payment::ThreeDSecureData] prior_three_d_secure_data
         | 
| 20 20 | 
             
                  # @attr [Ingenico::Connect::SDK::Domain::Payment::SdkDataInput] sdk_data
         | 
| 21 21 | 
             
                  # @attr [true/false] skip_authentication
         | 
| 22 | 
            +
                  # @attr [String] transaction_risk_level
         | 
| 22 23 | 
             
                  class AbstractThreeDSecure < Ingenico::Connect::SDK::DataObject
         | 
| 23 24 |  | 
| 24 25 | 
             
                    attr_accessor :authentication_amount
         | 
| @@ -37,6 +38,8 @@ module Ingenico::Connect::SDK | |
| 37 38 |  | 
| 38 39 | 
             
                    attr_accessor :skip_authentication
         | 
| 39 40 |  | 
| 41 | 
            +
                    attr_accessor :transaction_risk_level
         | 
| 42 | 
            +
             | 
| 40 43 | 
             
                    # @return (Hash)
         | 
| 41 44 | 
             
                    def to_h
         | 
| 42 45 | 
             
                      hash = super
         | 
| @@ -48,6 +51,7 @@ module Ingenico::Connect::SDK | |
| 48 51 | 
             
                      hash['priorThreeDSecureData'] = @prior_three_d_secure_data.to_h unless @prior_three_d_secure_data.nil?
         | 
| 49 52 | 
             
                      hash['sdkData'] = @sdk_data.to_h unless @sdk_data.nil?
         | 
| 50 53 | 
             
                      hash['skipAuthentication'] = @skip_authentication unless @skip_authentication.nil?
         | 
| 54 | 
            +
                      hash['transactionRiskLevel'] = @transaction_risk_level unless @transaction_risk_level.nil?
         | 
| 51 55 | 
             
                      hash
         | 
| 52 56 | 
             
                    end
         | 
| 53 57 |  | 
| @@ -80,6 +84,9 @@ module Ingenico::Connect::SDK | |
| 80 84 | 
             
                      if hash.has_key? 'skipAuthentication'
         | 
| 81 85 | 
             
                        @skip_authentication = hash['skipAuthentication']
         | 
| 82 86 | 
             
                      end
         | 
| 87 | 
            +
                      if hash.has_key? 'transactionRiskLevel'
         | 
| 88 | 
            +
                        @transaction_risk_level = hash['transactionRiskLevel']
         | 
| 89 | 
            +
                      end
         | 
| 83 90 | 
             
                    end
         | 
| 84 91 | 
             
                  end
         | 
| 85 92 | 
             
                end
         | 
| @@ -8,10 +8,13 @@ module Ingenico::Connect::SDK | |
| 8 8 | 
             
              module Domain
         | 
| 9 9 | 
             
                module Payment
         | 
| 10 10 |  | 
| 11 | 
            +
                  # @attr [String] data
         | 
| 11 12 | 
             
                  # @attr [String] method
         | 
| 12 13 | 
             
                  # @attr [String] utc_timestamp
         | 
| 13 14 | 
             
                  class CustomerAccountAuthentication < Ingenico::Connect::SDK::DataObject
         | 
| 14 15 |  | 
| 16 | 
            +
                    attr_accessor :data
         | 
| 17 | 
            +
             | 
| 15 18 | 
             
                    attr_accessor :method
         | 
| 16 19 |  | 
| 17 20 | 
             
                    attr_accessor :utc_timestamp
         | 
| @@ -19,6 +22,7 @@ module Ingenico::Connect::SDK | |
| 19 22 | 
             
                    # @return (Hash)
         | 
| 20 23 | 
             
                    def to_h
         | 
| 21 24 | 
             
                      hash = super
         | 
| 25 | 
            +
                      hash['data'] = @data unless @data.nil?
         | 
| 22 26 | 
             
                      hash['method'] = @method unless @method.nil?
         | 
| 23 27 | 
             
                      hash['utcTimestamp'] = @utc_timestamp unless @utc_timestamp.nil?
         | 
| 24 28 | 
             
                      hash
         | 
| @@ -26,6 +30,9 @@ module Ingenico::Connect::SDK | |
| 26 30 |  | 
| 27 31 | 
             
                    def from_hash(hash)
         | 
| 28 32 | 
             
                      super
         | 
| 33 | 
            +
                      if hash.has_key? 'data'
         | 
| 34 | 
            +
                        @data = hash['data']
         | 
| 35 | 
            +
                      end
         | 
| 29 36 | 
             
                      if hash.has_key? 'method'
         | 
| 30 37 | 
             
                        @method = hash['method']
         | 
| 31 38 | 
             
                      end
         | 
| @@ -8,43 +8,36 @@ module Ingenico::Connect::SDK | |
| 8 8 | 
             
              module Domain
         | 
| 9 9 | 
             
                module Payment
         | 
| 10 10 |  | 
| 11 | 
            +
                  # @attr [String] display_name
         | 
| 11 12 | 
             
                  # @attr [String] integration_type
         | 
| 12 | 
            -
                  # @attr [String]  | 
| 13 | 
            -
                  # @attr [String] transaction_note
         | 
| 14 | 
            -
                  # @attr [String] vpa
         | 
| 13 | 
            +
                  # @attr [String] virtual_payment_address
         | 
| 15 14 | 
             
                  class RedirectPaymentProduct4101SpecificInput < Ingenico::Connect::SDK::DataObject
         | 
| 16 15 |  | 
| 17 | 
            -
                    attr_accessor : | 
| 18 | 
            -
             | 
| 19 | 
            -
                    attr_accessor :merchant_name
         | 
| 16 | 
            +
                    attr_accessor :display_name
         | 
| 20 17 |  | 
| 21 | 
            -
                    attr_accessor : | 
| 18 | 
            +
                    attr_accessor :integration_type
         | 
| 22 19 |  | 
| 23 | 
            -
                    attr_accessor : | 
| 20 | 
            +
                    attr_accessor :virtual_payment_address
         | 
| 24 21 |  | 
| 25 22 | 
             
                    # @return (Hash)
         | 
| 26 23 | 
             
                    def to_h
         | 
| 27 24 | 
             
                      hash = super
         | 
| 25 | 
            +
                      hash['displayName'] = @display_name unless @display_name.nil?
         | 
| 28 26 | 
             
                      hash['integrationType'] = @integration_type unless @integration_type.nil?
         | 
| 29 | 
            -
                      hash[' | 
| 30 | 
            -
                      hash['transactionNote'] = @transaction_note unless @transaction_note.nil?
         | 
| 31 | 
            -
                      hash['vpa'] = @vpa unless @vpa.nil?
         | 
| 27 | 
            +
                      hash['virtualPaymentAddress'] = @virtual_payment_address unless @virtual_payment_address.nil?
         | 
| 32 28 | 
             
                      hash
         | 
| 33 29 | 
             
                    end
         | 
| 34 30 |  | 
| 35 31 | 
             
                    def from_hash(hash)
         | 
| 36 32 | 
             
                      super
         | 
| 33 | 
            +
                      if hash.has_key? 'displayName'
         | 
| 34 | 
            +
                        @display_name = hash['displayName']
         | 
| 35 | 
            +
                      end
         | 
| 37 36 | 
             
                      if hash.has_key? 'integrationType'
         | 
| 38 37 | 
             
                        @integration_type = hash['integrationType']
         | 
| 39 38 | 
             
                      end
         | 
| 40 | 
            -
                      if hash.has_key? ' | 
| 41 | 
            -
                        @ | 
| 42 | 
            -
                      end
         | 
| 43 | 
            -
                      if hash.has_key? 'transactionNote'
         | 
| 44 | 
            -
                        @transaction_note = hash['transactionNote']
         | 
| 45 | 
            -
                      end
         | 
| 46 | 
            -
                      if hash.has_key? 'vpa'
         | 
| 47 | 
            -
                        @vpa = hash['vpa']
         | 
| 39 | 
            +
                      if hash.has_key? 'virtualPaymentAddress'
         | 
| 40 | 
            +
                        @virtual_payment_address = hash['virtualPaymentAddress']
         | 
| 48 41 | 
             
                      end
         | 
| 49 42 | 
             
                    end
         | 
| 50 43 | 
             
                  end
         | 
| @@ -4,6 +4,7 @@ | |
| 4 4 | 
             
            #
         | 
| 5 5 | 
             
            require 'ingenico/connect/sdk/domain/definitions/card'
         | 
| 6 6 | 
             
            require 'ingenico/connect/sdk/domain/payout/abstract_payout_method_specific_input'
         | 
| 7 | 
            +
            require 'ingenico/connect/sdk/domain/payout/payout_recipient'
         | 
| 7 8 |  | 
| 8 9 | 
             
            module Ingenico::Connect::SDK
         | 
| 9 10 | 
             
              module Domain
         | 
| @@ -11,6 +12,7 @@ module Ingenico::Connect::SDK | |
| 11 12 |  | 
| 12 13 | 
             
                  # @attr [Ingenico::Connect::SDK::Domain::Definitions::Card] card
         | 
| 13 14 | 
             
                  # @attr [Integer] payment_product_id
         | 
| 15 | 
            +
                  # @attr [Ingenico::Connect::SDK::Domain::Payout::PayoutRecipient] recipient
         | 
| 14 16 | 
             
                  # @attr [String] token
         | 
| 15 17 | 
             
                  class CardPayoutMethodSpecificInput < Ingenico::Connect::SDK::Domain::Payout::AbstractPayoutMethodSpecificInput
         | 
| 16 18 |  | 
| @@ -18,6 +20,8 @@ module Ingenico::Connect::SDK | |
| 18 20 |  | 
| 19 21 | 
             
                    attr_accessor :payment_product_id
         | 
| 20 22 |  | 
| 23 | 
            +
                    attr_accessor :recipient
         | 
| 24 | 
            +
             | 
| 21 25 | 
             
                    attr_accessor :token
         | 
| 22 26 |  | 
| 23 27 | 
             
                    # @return (Hash)
         | 
| @@ -25,6 +29,7 @@ module Ingenico::Connect::SDK | |
| 25 29 | 
             
                      hash = super
         | 
| 26 30 | 
             
                      hash['card'] = @card.to_h unless @card.nil?
         | 
| 27 31 | 
             
                      hash['paymentProductId'] = @payment_product_id unless @payment_product_id.nil?
         | 
| 32 | 
            +
                      hash['recipient'] = @recipient.to_h unless @recipient.nil?
         | 
| 28 33 | 
             
                      hash['token'] = @token unless @token.nil?
         | 
| 29 34 | 
             
                      hash
         | 
| 30 35 | 
             
                    end
         | 
| @@ -38,6 +43,10 @@ module Ingenico::Connect::SDK | |
| 38 43 | 
             
                      if hash.has_key? 'paymentProductId'
         | 
| 39 44 | 
             
                        @payment_product_id = hash['paymentProductId']
         | 
| 40 45 | 
             
                      end
         | 
| 46 | 
            +
                      if hash.has_key? 'recipient'
         | 
| 47 | 
            +
                        raise TypeError, "value '%s' is not a Hash" % [hash['recipient']] unless hash['recipient'].is_a? Hash
         | 
| 48 | 
            +
                        @recipient = Ingenico::Connect::SDK::Domain::Payout::PayoutRecipient.new_from_hash(hash['recipient'])
         | 
| 49 | 
            +
                      end
         | 
| 41 50 | 
             
                      if hash.has_key? 'token'
         | 
| 42 51 | 
             
                        @token = hash['token']
         | 
| 43 52 | 
             
                      end
         | 
| @@ -9,6 +9,7 @@ require 'ingenico/connect/sdk/domain/definitions/bank_account_iban' | |
| 9 9 | 
             
            require 'ingenico/connect/sdk/domain/payout/bank_transfer_payout_method_specific_input'
         | 
| 10 10 | 
             
            require 'ingenico/connect/sdk/domain/payout/card_payout_method_specific_input'
         | 
| 11 11 | 
             
            require 'ingenico/connect/sdk/domain/payout/payout_customer'
         | 
| 12 | 
            +
            require 'ingenico/connect/sdk/domain/payout/payout_details'
         | 
| 12 13 | 
             
            require 'ingenico/connect/sdk/domain/payout/payout_references'
         | 
| 13 14 |  | 
| 14 15 | 
             
            module Ingenico::Connect::SDK
         | 
| @@ -22,11 +23,14 @@ module Ingenico::Connect::SDK | |
| 22 23 | 
             
                  # @attr [Ingenico::Connect::SDK::Domain::Payout::CardPayoutMethodSpecificInput] card_payout_method_specific_input
         | 
| 23 24 | 
             
                  # @attr [Ingenico::Connect::SDK::Domain::Payout::PayoutCustomer] customer
         | 
| 24 25 | 
             
                  # @attr [String] payout_date
         | 
| 26 | 
            +
                  # @attr [Ingenico::Connect::SDK::Domain::Payout::PayoutDetails] payout_details
         | 
| 25 27 | 
             
                  # @attr [String] payout_text
         | 
| 26 28 | 
             
                  # @attr [Ingenico::Connect::SDK::Domain::Payout::PayoutReferences] references
         | 
| 27 29 | 
             
                  # @attr [String] swift_code
         | 
| 28 30 | 
             
                  class CreatePayoutRequest < Ingenico::Connect::SDK::DataObject
         | 
| 29 31 |  | 
| 32 | 
            +
                    #
         | 
| 33 | 
            +
                    # @deprecated Moved to PayoutDetails
         | 
| 30 34 | 
             
                    attr_accessor :amount_of_money
         | 
| 31 35 |  | 
| 32 36 | 
             
                    #
         | 
| @@ -42,17 +46,21 @@ module Ingenico::Connect::SDK | |
| 42 46 | 
             
                    attr_accessor :card_payout_method_specific_input
         | 
| 43 47 |  | 
| 44 48 | 
             
                    #
         | 
| 45 | 
            -
                    # @deprecated Moved to  | 
| 49 | 
            +
                    # @deprecated Moved to PayoutDetails
         | 
| 46 50 | 
             
                    attr_accessor :customer
         | 
| 47 51 |  | 
| 48 52 | 
             
                    #
         | 
| 49 53 | 
             
                    # @deprecated Moved to BankTransferPayoutMethodSpecificInput
         | 
| 50 54 | 
             
                    attr_accessor :payout_date
         | 
| 51 55 |  | 
| 56 | 
            +
                    attr_accessor :payout_details
         | 
| 57 | 
            +
             | 
| 52 58 | 
             
                    #
         | 
| 53 59 | 
             
                    # @deprecated Moved to BankTransferPayoutMethodSpecificInput
         | 
| 54 60 | 
             
                    attr_accessor :payout_text
         | 
| 55 61 |  | 
| 62 | 
            +
                    #
         | 
| 63 | 
            +
                    # @deprecated Moved to PayoutDetails
         | 
| 56 64 | 
             
                    attr_accessor :references
         | 
| 57 65 |  | 
| 58 66 | 
             
                    #
         | 
| @@ -69,6 +77,7 @@ module Ingenico::Connect::SDK | |
| 69 77 | 
             
                      hash['cardPayoutMethodSpecificInput'] = @card_payout_method_specific_input.to_h unless @card_payout_method_specific_input.nil?
         | 
| 70 78 | 
             
                      hash['customer'] = @customer.to_h unless @customer.nil?
         | 
| 71 79 | 
             
                      hash['payoutDate'] = @payout_date unless @payout_date.nil?
         | 
| 80 | 
            +
                      hash['payoutDetails'] = @payout_details.to_h unless @payout_details.nil?
         | 
| 72 81 | 
             
                      hash['payoutText'] = @payout_text unless @payout_text.nil?
         | 
| 73 82 | 
             
                      hash['references'] = @references.to_h unless @references.nil?
         | 
| 74 83 | 
             
                      hash['swiftCode'] = @swift_code unless @swift_code.nil?
         | 
| @@ -104,6 +113,10 @@ module Ingenico::Connect::SDK | |
| 104 113 | 
             
                      if hash.has_key? 'payoutDate'
         | 
| 105 114 | 
             
                        @payout_date = hash['payoutDate']
         | 
| 106 115 | 
             
                      end
         | 
| 116 | 
            +
                      if hash.has_key? 'payoutDetails'
         | 
| 117 | 
            +
                        raise TypeError, "value '%s' is not a Hash" % [hash['payoutDetails']] unless hash['payoutDetails'].is_a? Hash
         | 
| 118 | 
            +
                        @payout_details = Ingenico::Connect::SDK::Domain::Payout::PayoutDetails.new_from_hash(hash['payoutDetails'])
         | 
| 119 | 
            +
                      end
         | 
| 107 120 | 
             
                      if hash.has_key? 'payoutText'
         | 
| 108 121 | 
             
                        @payout_text = hash['payoutText']
         | 
| 109 122 | 
             
                      end
         | 
| @@ -0,0 +1,52 @@ | |
| 1 | 
            +
            #
         | 
| 2 | 
            +
            # This class was auto-generated from the API references found at
         | 
| 3 | 
            +
            # https://epayments-api.developer-ingenico.com/s2sapi/v1/
         | 
| 4 | 
            +
            #
         | 
| 5 | 
            +
            require 'ingenico/connect/sdk/data_object'
         | 
| 6 | 
            +
            require 'ingenico/connect/sdk/domain/definitions/amount_of_money'
         | 
| 7 | 
            +
            require 'ingenico/connect/sdk/domain/payout/payout_customer'
         | 
| 8 | 
            +
            require 'ingenico/connect/sdk/domain/payout/payout_references'
         | 
| 9 | 
            +
             | 
| 10 | 
            +
            module Ingenico::Connect::SDK
         | 
| 11 | 
            +
              module Domain
         | 
| 12 | 
            +
                module Payout
         | 
| 13 | 
            +
             | 
| 14 | 
            +
                  # @attr [Ingenico::Connect::SDK::Domain::Definitions::AmountOfMoney] amount_of_money
         | 
| 15 | 
            +
                  # @attr [Ingenico::Connect::SDK::Domain::Payout::PayoutCustomer] customer
         | 
| 16 | 
            +
                  # @attr [Ingenico::Connect::SDK::Domain::Payout::PayoutReferences] references
         | 
| 17 | 
            +
                  class PayoutDetails < Ingenico::Connect::SDK::DataObject
         | 
| 18 | 
            +
             | 
| 19 | 
            +
                    attr_accessor :amount_of_money
         | 
| 20 | 
            +
             | 
| 21 | 
            +
                    attr_accessor :customer
         | 
| 22 | 
            +
             | 
| 23 | 
            +
                    attr_accessor :references
         | 
| 24 | 
            +
             | 
| 25 | 
            +
                    # @return (Hash)
         | 
| 26 | 
            +
                    def to_h
         | 
| 27 | 
            +
                      hash = super
         | 
| 28 | 
            +
                      hash['amountOfMoney'] = @amount_of_money.to_h unless @amount_of_money.nil?
         | 
| 29 | 
            +
                      hash['customer'] = @customer.to_h unless @customer.nil?
         | 
| 30 | 
            +
                      hash['references'] = @references.to_h unless @references.nil?
         | 
| 31 | 
            +
                      hash
         | 
| 32 | 
            +
                    end
         | 
| 33 | 
            +
             | 
| 34 | 
            +
                    def from_hash(hash)
         | 
| 35 | 
            +
                      super
         | 
| 36 | 
            +
                      if hash.has_key? 'amountOfMoney'
         | 
| 37 | 
            +
                        raise TypeError, "value '%s' is not a Hash" % [hash['amountOfMoney']] unless hash['amountOfMoney'].is_a? Hash
         | 
| 38 | 
            +
                        @amount_of_money = Ingenico::Connect::SDK::Domain::Definitions::AmountOfMoney.new_from_hash(hash['amountOfMoney'])
         | 
| 39 | 
            +
                      end
         | 
| 40 | 
            +
                      if hash.has_key? 'customer'
         | 
| 41 | 
            +
                        raise TypeError, "value '%s' is not a Hash" % [hash['customer']] unless hash['customer'].is_a? Hash
         | 
| 42 | 
            +
                        @customer = Ingenico::Connect::SDK::Domain::Payout::PayoutCustomer.new_from_hash(hash['customer'])
         | 
| 43 | 
            +
                      end
         | 
| 44 | 
            +
                      if hash.has_key? 'references'
         | 
| 45 | 
            +
                        raise TypeError, "value '%s' is not a Hash" % [hash['references']] unless hash['references'].is_a? Hash
         | 
| 46 | 
            +
                        @references = Ingenico::Connect::SDK::Domain::Payout::PayoutReferences.new_from_hash(hash['references'])
         | 
| 47 | 
            +
                      end
         | 
| 48 | 
            +
                    end
         | 
| 49 | 
            +
                  end
         | 
| 50 | 
            +
                end
         | 
| 51 | 
            +
              end
         | 
| 52 | 
            +
            end
         | 
| @@ -0,0 +1,46 @@ | |
| 1 | 
            +
            #
         | 
| 2 | 
            +
            # This class was auto-generated from the API references found at
         | 
| 3 | 
            +
            # https://epayments-api.developer-ingenico.com/s2sapi/v1/
         | 
| 4 | 
            +
            #
         | 
| 5 | 
            +
            require 'ingenico/connect/sdk/data_object'
         | 
| 6 | 
            +
             | 
| 7 | 
            +
            module Ingenico::Connect::SDK
         | 
| 8 | 
            +
              module Domain
         | 
| 9 | 
            +
                module Payout
         | 
| 10 | 
            +
             | 
| 11 | 
            +
                  # @attr [String] first_name
         | 
| 12 | 
            +
                  # @attr [String] surname
         | 
| 13 | 
            +
                  # @attr [String] surname_prefix
         | 
| 14 | 
            +
                  class PayoutRecipient < Ingenico::Connect::SDK::DataObject
         | 
| 15 | 
            +
             | 
| 16 | 
            +
                    attr_accessor :first_name
         | 
| 17 | 
            +
             | 
| 18 | 
            +
                    attr_accessor :surname
         | 
| 19 | 
            +
             | 
| 20 | 
            +
                    attr_accessor :surname_prefix
         | 
| 21 | 
            +
             | 
| 22 | 
            +
                    # @return (Hash)
         | 
| 23 | 
            +
                    def to_h
         | 
| 24 | 
            +
                      hash = super
         | 
| 25 | 
            +
                      hash['firstName'] = @first_name unless @first_name.nil?
         | 
| 26 | 
            +
                      hash['surname'] = @surname unless @surname.nil?
         | 
| 27 | 
            +
                      hash['surnamePrefix'] = @surname_prefix unless @surname_prefix.nil?
         | 
| 28 | 
            +
                      hash
         | 
| 29 | 
            +
                    end
         | 
| 30 | 
            +
             | 
| 31 | 
            +
                    def from_hash(hash)
         | 
| 32 | 
            +
                      super
         | 
| 33 | 
            +
                      if hash.has_key? 'firstName'
         | 
| 34 | 
            +
                        @first_name = hash['firstName']
         | 
| 35 | 
            +
                      end
         | 
| 36 | 
            +
                      if hash.has_key? 'surname'
         | 
| 37 | 
            +
                        @surname = hash['surname']
         | 
| 38 | 
            +
                      end
         | 
| 39 | 
            +
                      if hash.has_key? 'surnamePrefix'
         | 
| 40 | 
            +
                        @surname_prefix = hash['surnamePrefix']
         | 
| 41 | 
            +
                      end
         | 
| 42 | 
            +
                    end
         | 
| 43 | 
            +
                  end
         | 
| 44 | 
            +
                end
         | 
| 45 | 
            +
              end
         | 
| 46 | 
            +
            end
         | 
| @@ -78,6 +78,35 @@ module Ingenico::Connect::SDK | |
| 78 78 | 
             
                      error_object = @communicator.marshaller.unmarshal(e.body, error_type)
         | 
| 79 79 | 
             
                      raise create_exception(e.status_code, e.body, error_object, context)
         | 
| 80 80 | 
             
                    end
         | 
| 81 | 
            +
             | 
| 82 | 
            +
                    # Resource /!{merchantId}/hostedcheckouts/!{hostedCheckoutId} - {https://epayments-api.developer-ingenico.com/s2sapi/v1/en_US/ruby/hostedcheckouts/delete.html Delete hosted checkout}
         | 
| 83 | 
            +
                    # @param hosted_checkout_id [String]
         | 
| 84 | 
            +
                    # @param context            [Ingenico::Connect::SDK::CallContext]
         | 
| 85 | 
            +
                    # @raise [Ingenico::Connect::SDK::ValidationException] if the request was not correct and couldn't be processed (HTTP status code 400)
         | 
| 86 | 
            +
                    # @raise [Ingenico::Connect::SDK::AuthorizationException] if the request was not allowed (HTTP status code 403)
         | 
| 87 | 
            +
                    # @raise [Ingenico::Connect::SDK::IdempotenceException] if an idempotent request caused a conflict (HTTP status code 409)
         | 
| 88 | 
            +
                    # @raise [Ingenico::Connect::SDK::ReferenceException] if an object was attempted to be referenced that doesn't exist or has been removed,
         | 
| 89 | 
            +
                    #        or there was a conflict (HTTP status code 404, 409 or 410)
         | 
| 90 | 
            +
                    # @raise [Ingenico::Connect::SDK::GlobalCollectException] if something went wrong at the Ingenico ePayments platform,
         | 
| 91 | 
            +
                    #        the Ingenico ePayments platform was unable to process a message from a downstream partner/acquirer,
         | 
| 92 | 
            +
                    #        or the service that you're trying to reach is temporary unavailable (HTTP status code 500, 502 or 503)
         | 
| 93 | 
            +
                    # @raise [Ingenico::Connect::SDK::ApiException]if the Ingenico ePayments platform returned any other error
         | 
| 94 | 
            +
                    def delete(hosted_checkout_id, context=nil)
         | 
| 95 | 
            +
                      path_context = {
         | 
| 96 | 
            +
                        'hostedCheckoutId'.freeze => hosted_checkout_id,
         | 
| 97 | 
            +
                      }
         | 
| 98 | 
            +
                      uri = instantiate_uri('/v1/{merchantId}/hostedcheckouts/{hostedCheckoutId}', path_context)
         | 
| 99 | 
            +
                      return @communicator.delete(
         | 
| 100 | 
            +
                        uri,
         | 
| 101 | 
            +
                        client_headers,
         | 
| 102 | 
            +
                        nil,
         | 
| 103 | 
            +
                        nil,
         | 
| 104 | 
            +
                        context)
         | 
| 105 | 
            +
                    rescue ResponseException => e
         | 
| 106 | 
            +
                      error_type = Ingenico::Connect::SDK::Domain::Errors::ErrorResponse
         | 
| 107 | 
            +
                      error_object = @communicator.marshaller.unmarshal(e.body, error_type)
         | 
| 108 | 
            +
                      raise create_exception(e.status_code, e.body, error_object, context)
         | 
| 109 | 
            +
                    end
         | 
| 81 110 | 
             
                  end
         | 
| 82 111 | 
             
                end
         | 
| 83 112 | 
             
              end
         | 
| @@ -7,7 +7,7 @@ module Ingenico::Connect::SDK | |
| 7 7 | 
             
              #
         | 
| 8 8 | 
             
              # @attr_reader [Array<Ingenico::Connect::SDK::RequestHeader>] meta_data_headers List of headers that should be used in all requests.
         | 
| 9 9 | 
             
              class MetaDataProvider
         | 
| 10 | 
            -
                @@SDK_VERSION = '2. | 
| 10 | 
            +
                @@SDK_VERSION = '2.26.0'
         | 
| 11 11 | 
             
                @@SERVER_META_INFO_HEADER = 'X-GCS-ServerMetaInfo'
         | 
| 12 12 | 
             
                @@PROHIBITED_HEADERS = [@@SERVER_META_INFO_HEADER, 'X-GCS-Idempotence-Key',
         | 
| 13 13 | 
             
                                        'Date', 'Content-Type', 'Authorization'].sort!.freeze
         | 
| @@ -47,11 +47,10 @@ module Ingenico::Connect::SDK | |
| 47 47 | 
             
                  if value.nil? || value.empty?
         | 
| 48 48 | 
             
                    return value
         | 
| 49 49 | 
             
                  end
         | 
| 50 | 
            -
                  # Replace all sequences of  | 
| 51 | 
            -
                  # This  | 
| 52 | 
            -
                  #  | 
| 53 | 
            -
                   | 
| 54 | 
            -
                  value.gsub(/[\s&&[^\r\n]]*(\r?\n)[\s&&[^\r\n]]*/, '\1 ')
         | 
| 50 | 
            +
                  # Replace all sequences of linebreak-whitespace* with a single linebreak-space
         | 
| 51 | 
            +
                  # This matches the normalization done by DefaultAuthenticator, and ensures that multiline headers
         | 
| 52 | 
            +
                  # will not cause authentication failures
         | 
| 53 | 
            +
                  value.gsub(/\r?\n[\s&&[^\r\n]]*/, ' ')
         | 
| 55 54 | 
             
                end
         | 
| 56 55 | 
             
              end
         | 
| 57 56 | 
             
            end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: connect-sdk-ruby
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 2. | 
| 4 | 
            +
              version: 2.26.0
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Ingenico ePayments
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2021- | 
| 11 | 
            +
            date: 2021-11-08 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: httpclient
         | 
| @@ -135,6 +135,7 @@ files: | |
| 135 135 | 
             
            - examples/merchant/example_configuration.yml
         | 
| 136 136 | 
             
            - examples/merchant/files/get_file_example.rb
         | 
| 137 137 | 
             
            - examples/merchant/hostedcheckouts/create_hosted_checkout_example.rb
         | 
| 138 | 
            +
            - examples/merchant/hostedcheckouts/delete_hosted_checkout_example.rb
         | 
| 138 139 | 
             
            - examples/merchant/hostedcheckouts/get_hosted_checkout_example.rb
         | 
| 139 140 | 
             
            - examples/merchant/hostedmandatemanagements/create_hosted_mandate_management_example.rb
         | 
| 140 141 | 
             
            - examples/merchant/hostedmandatemanagements/get_hosted_mandate_management_example.rb
         | 
| @@ -249,6 +250,7 @@ files: | |
| 249 250 | 
             
            - lib/ingenico/connect/sdk/domain/definitions/lodging_charge.rb
         | 
| 250 251 | 
             
            - lib/ingenico/connect/sdk/domain/definitions/lodging_data.rb
         | 
| 251 252 | 
             
            - lib/ingenico/connect/sdk/domain/definitions/lodging_room.rb
         | 
| 253 | 
            +
            - lib/ingenico/connect/sdk/domain/definitions/microsoft_fraud_results.rb
         | 
| 252 254 | 
             
            - lib/ingenico/connect/sdk/domain/definitions/order_status_output.rb
         | 
| 253 255 | 
             
            - lib/ingenico/connect/sdk/domain/definitions/payment_product_filter.rb
         | 
| 254 256 | 
             
            - lib/ingenico/connect/sdk/domain/definitions/personal_name_base.rb
         | 
| @@ -464,7 +466,9 @@ files: | |
| 464 466 | 
             
            - lib/ingenico/connect/sdk/domain/payout/create_payout_request.rb
         | 
| 465 467 | 
             
            - lib/ingenico/connect/sdk/domain/payout/find_payouts_response.rb
         | 
| 466 468 | 
             
            - lib/ingenico/connect/sdk/domain/payout/payout_customer.rb
         | 
| 469 | 
            +
            - lib/ingenico/connect/sdk/domain/payout/payout_details.rb
         | 
| 467 470 | 
             
            - lib/ingenico/connect/sdk/domain/payout/payout_error_response.rb
         | 
| 471 | 
            +
            - lib/ingenico/connect/sdk/domain/payout/payout_recipient.rb
         | 
| 468 472 | 
             
            - lib/ingenico/connect/sdk/domain/payout/payout_references.rb
         | 
| 469 473 | 
             
            - lib/ingenico/connect/sdk/domain/payout/payout_response.rb
         | 
| 470 474 | 
             
            - lib/ingenico/connect/sdk/domain/payout/payout_result.rb
         |