Sha256: 0e09f72dda9fee02f0c4cbaefb18ddb298879903948b6eb0881a6c9b0d60ab0c

Contents?: true

Size: 605 Bytes

Versions: 1

Compression:

Stored size: 605 Bytes

Contents

# frozen_string_literal: true

module AppStoreConnect
  class UserInvitationCreateRequest < Struct.new(:first_name, :last_name, :email, :roles)
    def initialize(kwargs)
      super(kwargs[:first_name], kwargs[:last_name], kwargs[:email], kwargs[:roles])
    end

    def body
      { 'data' =>
        { 'type' => 'userInvitations', 'attributes' =>
          { 'firstName' => first_name, 'lastName' => last_name, 'email' => email, 'roles' => roles, 'allAppsVisible' => true, 'provisioningAllowed' => true } } }
    end

    def to_h
      body
    end

    def to_s
      body.to_json
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
app_store_connect-0.7.0 lib/app_store_connect/user_invitation_create_request.rb