Sha256: 377d6f159aef7d5717b9675d5b301bf9e73eb22d474f7e2a2e9d99e06cfb9ddd

Contents?: true

Size: 779 Bytes

Versions: 1

Compression:

Stored size: 779 Bytes

Contents

# frozen_string_literal: true

require_relative "../../response/inducement_response"

module ONEAccess
  module API
    module V3_0
      class Providers < Base
        api_path "/providers"

        class << self
          def inducements(recipient_user_id:, sender_email:, subject:, email_body:, receive_date:)
            params = {
              recipientuserid: recipient_user_id,
              senderemail:     sender_email,
              subject:         subject,
              emailbody:       email_body,
              receivedate:     receive_date
            }.reject { |_, v| v.nil? }

            resp = send_post("inducements", inducement: params)

            Response::InducementResponse.from_json(resp.body)
          end
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
oneaccess-0.4.5 lib/oneaccess/api/v3_0/providers.rb