Sha256: 724ec6d30078454dfbda5b0f4b53537b2804da6a5b14b9c7431a5337ae56944d

Contents?: true

Size: 828 Bytes

Versions: 1

Compression:

Stored size: 828 Bytes

Contents

# frozen_string_literal: true

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

module ONEAccess
  module API
    module V3_0 # rubocop:disable Style/ClassAndModuleCamelCase
      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", inducements: 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.4 lib/oneaccess/api/v3_0/providers.rb