Sha256: a6f429482db697ce2dff1949938143903a64b174d159b66e9f8fb608c5dd7b43

Contents?: true

Size: 520 Bytes

Versions: 5

Compression:

Stored size: 520 Bytes

Contents

module BluepanClient
  class CreateRecipientRequest < BaseRequest

    PATH = "/v1/:api_token/recipients"

    attribute :recipient_firstname, String
    attribute :recipient_lastname, String
    attribute :recipient_mobile, String
    attribute :recipient_email, String

    def call
      HTTParty.post(uri, {
        body: attributes.slice(*%i[
          api_secret
          recipient_firstname
          recipient_lastname
          recipient_mobile
          recipient_email
        ])
      })
    end

  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
bluepan_client-1.0.0 lib/bluepan_client/requests/create_recipient_request.rb
bluepan_client-0.4.0 lib/bluepan_client/requests/create_recipient_request.rb
bluepan_client-0.3.0 lib/bluepan_client/requests/create_recipient_request.rb
bluepan_client-0.2.0 lib/bluepan_client/requests/create_recipient_request.rb
bluepan_client-0.1.0 lib/bluepan_client/requests/create_recipient_request.rb