Sha256: 93baed09be119cc30f7cc3b2ed6a18e8dd2c17a58ec52decaec35c0f2e3efc9f

Contents?: true

Size: 940 Bytes

Versions: 30

Compression:

Stored size: 940 Bytes

Contents

module MangoPay
  # Provides API methods for the UBO entity.
  class Ubo < Resource
    class << self
      def url(user_id, ubo_declaration_id, id = nil)
        if id
          "#{MangoPay.api_path}/users/#{user_id}/kyc/ubodeclarations/#{ubo_declaration_id}/ubos/#{id}"
        else
          "#{MangoPay.api_path}/users/#{user_id}/kyc/ubodeclarations/#{ubo_declaration_id}/ubos"
        end
      end

      def create(user_id, ubo_declaration_id, params, idempotency_key = nil)
        MangoPay.request(:post, url(user_id, ubo_declaration_id), params, {}, idempotency_key)
      end

      def fetch(user_id, ubo_declaration_id, ubo_id)
        MangoPay.request(:get, url(user_id, ubo_declaration_id, ubo_id))
      end

      def update(user_id, ubo_declaration_id, ubo_id, params, idempotency_key = nil)
        MangoPay.request(:put, url(user_id, ubo_declaration_id, ubo_id), params, {}, idempotency_key)
      end
    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
mangopay-3.28.0 lib/mangopay/ubo.rb
mangopay-3.27.0 lib/mangopay/ubo.rb
mangopay-3.26.1 lib/mangopay/ubo.rb
mangopay-3.26.0 lib/mangopay/ubo.rb
mangopay-3.25.1 lib/mangopay/ubo.rb
mangopay-3.25.0 lib/mangopay/ubo.rb
mangopay-3.24.1 lib/mangopay/ubo.rb
mangopay-3.24.0 lib/mangopay/ubo.rb
mangopay-3.23.0 lib/mangopay/ubo.rb
mangopay-3.22.0 lib/mangopay/ubo.rb
mangopay-3.21.0 lib/mangopay/ubo.rb
mangopay-3.20.0 lib/mangopay/ubo.rb
mangopay-3.19.0 lib/mangopay/ubo.rb
mangopay-3.18.0 lib/mangopay/ubo.rb
mangopay-3.17.0 lib/mangopay/ubo.rb
mangopay-3.16.0 lib/mangopay/ubo.rb
mangopay-3.15.0 lib/mangopay/ubo.rb
mangopay-3.14.0 lib/mangopay/ubo.rb
mangopay-3.13.2 lib/mangopay/ubo.rb
mangopay-3.12.0 lib/mangopay/ubo.rb